dan dan

15375 questions
1

votes
2

answer
4.7k

views

Check axios request url before sending

API requests are failing because the URL generated by Axios is incorrect due to my config. I know what the request url is suppose to look like, so I want to see the request url Axios generates. I can point Axios to my local server and see the requests there, but I want to debug this on the client. I...
Dan
0

votes
0

answer
3

views

Getting black screen for 3 seconds when moving to another activity?

I am working on an app which on moving from Activity 'A' to another Activity'B' shows black screen for 2 to 3 seconds. I am performing calculation on huge amount of data in Activity 'B', so on moving to Activity 'B' due to load on mainUI it gives black screen to load. But when i move my calculation...
dan walker
1

votes
2

answer
1.1k

views

Container getting connection refused

I am having an issue with my docker containers, where one of them is a REST API server and the other is just a test container to curl the former one. I have created a custom docker network with a specific IP address range and both containers are connected to it. In the Dockerfile(REST API Server im...
Dan
1

votes
1

answer
130

views

Specifying a url to a .whl file in a conda env .yml file

I want a specific older version of a package (h2o) to be installed when I load a conda env .yml file. However, the older versions for this package only seem to work if I install them using pip directly from a the url hosting the .whl file. For example if I want to install version 3.18.0.8 I need to...
Dan
0

votes
1

answer
11

views

Replacing an if statement's condition character with a variable

This is probably an easy one. In R, can I replace an if condition character (such as >) with a character and execute the if statement with it? For example, if the if statement is: ifelse(1 < 2, 'T', 'F') But I'm getting the > condition character through a variable: cc
dan
1

votes
1

answer
41

views

Resize outer-div (relative pos) min-height to height of inner-div (absolute pos)

I'd like to have a couple of divs that are at least the height of the viewport. .fullheight { position: relative; min-height: 100vh; } Each of those contains other divs and in case the content is taller than the viewport-height, the fullheight div should grow. While that works well if the content d...
dan
1

votes
2

answer
26

views

Remove row if term found in a CSV column

I need to remove a row from a table if I find a certain kind of email address in my CSV table. There are multiple email fields but I only want to do this for one email column, not any which is what I think the code below would currently do. How can I specify that? $data = foreach ($line in Get-Conte...
Dan
1

votes
0

answer
7

views

Create a custom exchange with RabbitMQ for filtering location

I am trying to develop a game with a pub/sub mechanism, so for each client-map I have a Notify Update channel. The client must subscribe to that to receive updates. But this subscribe must be conditioned by player's Area Of Interest. This interest is given by a rectangle which is based on avatar coo...
Dan Cehan
0

votes
1

answer
23

views

Using an Objective-C typedef void in Swift

I am using an Objective-C API in a new Swift environment. For the most part everything is working great but I'm getting stuck on a typedef issue. The API has a typedef defined as: typedef void* TESTHANDLE; Usually in Objective-C I'd simply use this like declaring any kind of variable: TESTHANDLE New...
Dan James Palmer
1

votes
2

answer
2k

views

Binding ObservableCollection of ObservableCollections to nested ListView in TabControl TabItems

Rather than declaring a tab for each of the ObservableCollections explicitly as in the first TabControl below I need them to generate dynamically as in the second TabControl and have the ItemsSource of the nested ListView set to each of the nested ObservableCollections. In other words: Why aren't th...
Dan
1

votes
3

answer
7.2k

views

Google App Script Adding one Day to a date

I can't figure out how to add one day to a date in Google App Script. I have this script: function dateTest() { var testDate = new Date(); var secondDate = new Date(testDate.getDate()+1); Logger.log(testDate); Logger.log(secondDate); } Which produces the following log: [16-11-30 16:35:02:499 GMT] We...
Dan Howard
1

votes
1

answer
151

views

Populate a Django Model from List of Lists

I have a list of lists. I'd like to populate a Model with that data. my_list = [['January', 'February', 'March'], [10, 20, 30], [2, 4, 6]] The Model I's like to build is: MyModel(models.Model): month = models.Charfield(maxlength=12) # This is my_list[0] sales = models.DecimalField() # This is my_lis...
Dan
1

votes
1

answer
1.2k

views

How can I convert a column vector to the diagonal of a matrix? [duplicate]

This question already has an answer here: How do I convert a n*1 matrix to a n*n diagonal matrix 3 answers I have a column vector that I would like to convert to a diagonal matrix. That is I have the vector v = (1,2,3) and want to turn it into: [1, 0, 0] [0, 2, 0] [0, 0, 3] How can I do this in Exc...
Dan
1

votes
2

answer
893

views

CSS use color from another class?

Is it possible to import a color from one CSS class to another? Or create some sort of global color define and then use it in multiple classes so that doesn't have to be updated in multiple places if you want to change a color? For example say I have a CSS class that I want to use for specific eleme...
Dan
1

votes
2

answer
449

views

What is the right way to snyc/import tables from a postgres DB to elasticsearch?

I want to import some tables from a postgres database into Elastic search and also hold the tables in sync with the data in elastic search. I have looked at a course on udemy, and also talked with a colleague who has a lot of experience with this issue to see what the best way to do it is. I am surp...
Dan
1

votes
1

answer
1.7k

views

Auto resize WebView to fit content

I am working on a Xamarin.Forms PCL project that displays posts in the form of a WebView so I add clickable content such as hashtags. The problem I am having is the WebView doesn't adjust to the size of its content. The WebView does not load an actual site I am binding the HTML to each post in a Lis...
Dan
1

votes
1

answer
78

views

How are GOARCH and GOOS used during go toolchain compilation?

I am trying to reconcile why make.bash accepts GOARCH, GOOS and other target variables when it also supports cross compiling to all supported architectures by default. I am compiling this for amd64/linux but will be using the compiler to cross-compile apps for arm/linux in an embedded context. Build...
Dan
1

votes
1

answer
17

views

json_decode: 'Syntax error' for valid JSON from HEREDOC string

I have the JSON code below. According to a one or two JSON validators it is valid JSON. { 'patterns': { 'email': '/[a-z0-9._%+-][email protected][a-z0-9.-]+\\.[a-z]{2,}/i', 'phone': '/(?:(?:\\(?(?:0(?:0|11)\\)?[\\s-]?\\(?|\\+)44\\)?[\\s-]?(?:\\(?0\\)?[\\s-]?)?)|(?:\\(?0))(?:(?:\\d{5}\\)?[\\s-]?\\d{4,5})|(?:\\d{4}\...
Dan Stevens
0

votes
0

answer
3

views

Should Managed Service Identities be used for Azure App Service access from Console App

I have a console app that is running inside our enterprise that needs to access as App Service Web API. What is the best way to handle authentication. I tried registering the App with AD, but it still seems like it cant't see the App Service. I tried the following code, but I am not sure this is...
Dan Blake
1

votes
2

answer
4.4k

views

Remove default buttons from Button Panel in datepicker

I want to keep the button panel but I do not want the 'Today' or 'Done' buttons jquery: $(document).ready(function () { $('.datepicker').datepicker({ showOn: 'button', buttonText: 'Date', showButtonPanel: true }); }); html: Start End
dan_vitch
2

votes
1

answer
83

views

Targeting One Tab Set in Multiple Tab Sets

I have some JQuery that controls the open and close of tabs. It works great - until I have multiple sets of tabs. On click functionality impacts all the sets of tabs. I want to be able to isolate the functionality to the set of tabs that are being interacted with. How do I do this efficiently? Each...
Dan Lee
4

votes
4

answer
161

views

DataTables API undefined with Symfony Webpack Encore

I'm using Webpack Encore with Symfony 3.4 (part of migration to Symfony 4). I have Datatables (installed via NPM to node_modules) working with jQuery but the api functions such as .columns are returning: .column is not a function at Package Versions: jQuery 2.14.4 Datatables 1.10.19 Webpack Encore 0...
Dan
1

votes
1

answer
40

views

Is it possible to apply type erasure to returned value in protocol?

Okay now, the title might be a little bit ambiguous, but basically, what I'm trying to achieve is the following: Let's say I have two classes that I use to fetch data from backend and they both cache the fetched data, thus, they both have an invalidateCache() method. Since they are used for data fet...
Dan Karbayev
1

votes
1

answer
90

views

CSS opacity animation changes position? [closed]

Does the CSS animation property when used to change opacity also change the position of an element? If so, what is going on in the DOM that makes that happen, and how can it be offset? Context: I've added a Javascript EventListener to a set of images, which when clicked calls a function that initiat...
Dan-in-Austin
1

votes
0

answer
84

views

Removing blank lines in csv output on Windows 10 without an error

I'm using Scrapy 1.4.0 and Python 3.6.3. When I run 'scrapy crawl -o items.csv', every other line of the csv file is blank. While I did find a solution here, it generates the following error: 2017-12-31 18:39:48 [scrapy.utils.signal] ERROR: Error caught on signal handler: Traceback (most recent...
Dan
1

votes
0

answer
334

views

exotic font size calculation using css3 calc

I would like to dynamically change font size between width 1300px and 1880px. However, the space that I have available only changes in 1 dimension. 1300px: |--|------------------------|--| | container: 1170px | 1880px: |------|------------------------|------| | container: 1170px | HTML: As...
D. Dan
1

votes
0

answer
136

views

EXCEL VBA: Testing for non-numeric input data

I am developing a macro program in EXCEL 2016 VBA. I am currently experiencing a problem with my code for one of the initial pre-processing steps: I am trying to check for non-numeric data selected by the user. I have the following example data: My code takes the selection specified by the user and...
Dan
1

votes
1

answer
301

views

My Angular 4 Application cannot request token to Spring Boot Server

I am currently developing an Angular 4 application with Spring Boot as backend. When I want to request a token to the backend server, I get different error messages for each browser. 1. Chrome console message : Failed to load http://localhost:4002/oauth/token?username=wiko&password=shefvaas&grant_...
Annas Dan
1

votes
1

answer
288

views

Qt widgets do not adjust correctly after font size change

In my app a user can increase/decrease the font size by calling a css file with the new size definitions, and updating the stylesheets. However, I have issues with some widgets after the size changes. The first one is that QComboBox items are overlapping: I tried to set the height of the items but i...
Dan Tavori
1

votes
0

answer
73

views

Shiny Server on AWS not viewable on Chrome behind firewall

Hello Shiny / sysadmin / AWS gurus: I have Shiny Server running on an Ubuntu AWS instance here: http://54.163.27.74:3838/ I followed this R-bloggers post to get it set up, with custom TCP rules for 3838 (Shiny) and 8787 (RStudio). It was not viewable when I tried to access at work, where some firewa...
Dan Flynn
1

votes
1

answer
119

views

Stopping clicks on object on one stage going through to the nextStage in EaselJS / CreateJS

I have two canvases and two stages in CreateJS / EaselJS. The first stage has autoClear set to false and I am doing dynamic drawing on it starting with a stagemousedown event. The second stage uses nextStage to send mouse events to the first stage. The second stage has interface such as a Bitmap t...
Dan Zen
1

votes
0

answer
107

views

NiFi DecryptContent - the cipher stream is too small to contain the salt

I'm testing with NiFi and I've run into an error that I can't find explained anywhere. I am using the EncryptContent processor with MD5_AES128, NiFi Legacy KDF, and a password. I'm encrypting something about 500KB, and it encrypts fine. If I immediately pipe the output of that operation into a seco...
Dan
1

votes
0

answer
51

views

Variable substitution in Swift 3+

Is it possible in Swift to do what I think of as meta programming. For example can I pass a variable in place of an object value. Say I have a constant struct called Colors which has several attributes like this: struct Colors { static let grayUltraLight = '#F2F2F2' static let grayLight = '#C4C...
Dan
1

votes
0

answer
44

views

Subsetting a data.frame

Probably an easy one. I have a data.frame with three columns: cluster, groupand id. Each set.seed(1) df
dan
1

votes
1

answer
879

views

Creating Custom Form Template

I'm creating a vb.net project with over 20-30 forms. I want to apply same options for every form like 'no border,backcolor,picturebox at left bottom etc.'. and it takes much time to do these for ever form. Please tell me a shortcut :) (I've thinked about creating one form and duplicating it.)
dan dadadadan
1

votes
0

answer
505

views

Keycloak logout not working for “bearer-only” application exposing REST services

I am unable to logout an user. The logout works for a 'confidential' applications but it doesn't for a 'bearer-only' application (the REST services are still accessible after logout). I have the following configuration: I have one 'database' client application defined in Keycloak having access type...
Dan Nemes
1

votes
0

answer
81

views

cakepdf - subfolder /pdf/ missing template

I followed every installation and configuration step described in the guide, and I'm trying to render the pdf and force download. As the guide says, the template should be placed in a 'pdf' subfolder like 'invoice/pdf/view.ctp' to trigger the pdf rendering (if I have understood), and I can't figure...
Dan
1

votes
0

answer
18

views

Apache2 301 Redirect Not Working

I have attempted to read various documentation, as well as other answers online, and I cannot find a solution to my problem. Here is my issue: I have a permanent www to non-www redirect setup to point traffic from www.domain.com to domain.com This works, but I am having issues when trying to visit s...
Dan Zuzevich
1

votes
0

answer
54

views

Most efficient way to track multiple small objects in MATLAB?

I am relatively new to image processing, and have never attempted to do anything with images in MATLAB, so forgive me if i am making some very rookie errors. I am attempting to make a program that will track ants in a video. The video is taken from a stationary camera, and records the ants from a bi...
Dan Hope
1

votes
0

answer
67

views

IIS Freezes up with making call (only from IE11)

I'm running a ASP.NET MVC (4.5) app. I can access everything fine on Chrome, FireFox, Safari, and Edge. When I try and access the site in IE11, I can login, access the main landing page, and click on any one of a number of links. When I click a link, it is supposed to open up in an iframe. From...
Dan G

View additional