dan dan

15353 questions
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
1

votes
0

answer
96

views

How to mock a method that returns a struct?

Here's a little golang program that connects to localhost via ssh and does some sftp-like operations. It works fine but I would like to make the doTheWork() function more testable. I've read up on using gomock to create mocks for interfaces. So I've already created two interfaces, Sftper and Walker,...
Dan Tenenbaum
1

votes
0

answer
23

views

Rails 5.1: using { where(association: @assocition) } now requires _id?

A transaction_record has many documents. class TransactionRecord < ApplicationRecord has_many :documents end class Document < ApplicationRecord belongs_to :transaction_record end Previously in Rails 4.2, I could do: Document.where(transaction_record: @transaction_record) and it would return the resu...
Dan L
1

votes
0

answer
80

views

Selectively apply material via RaycastHit

I am trying to modify the old Unity script Edge Detection to apply an outline to the edges of shapes based on whether or not they are being looked at. So far I have changed EdgeDetection.cs to the code below. This is the script that is attached to the main camera in the scene and it currently doesn'...
Dan
1

votes
0

answer
161

views

Android Library: .so not packed with module

Previously I had two Android Studio projects. One is using some shared library placed in /src/main/jniLibs (lets call that project bmf). The second project is my actual library which is using that other project (bmf) as an .aar. If some application is now using the library I had to add the project w...
dan
1

votes
3

answer
65

views

Can't correct my high-low number game in Python 3?

I have this code for a number game, and I can't see what I'm doing wrong, but whenever I run it tells me that I'm too low no matter what number I pick. Can someone please tell me what I'm doing wrong? Thanks! Also, I know some of the parts may be redundant, but I don't know if they are actually stop...
Dan Hill
1

votes
0

answer
177

views

Visual Studio 2017 Browser Link with custom url

I work on a few websites in different solutions that integrate with each other. To get them to work properly locally, I have to override the URLs. When I change the url from localhost:[port] to local.mydomain.com:[port], browser link no longer works. Can I assume this is a security feature and visua...
Dan Miller
1

votes
0

answer
143

views

a value of type Node * cannot be used to initialize an entity of type Node *

I'm writing a simple tree traversal procedure. I have a class for a node in the tree which holds the node's number, a vector of pointers to it's children and some data. I pass this a pointer to a Node to some function which does BFS from that node. class Node { public: int num; long long weight; l...
Yakov Dan
1

votes
0

answer
27

views

Making unique stats for different classes

What I'm trying to do is I have one class called 'Unit' which describes the general statistics of a unit in the Warhammer TableTop game and a subclass that has the more specific stats initialized for that class and then trying to see if I can successfully program an attack phase(?). public class Uni...
Dan
1

votes
1

answer
2.3k

views

How to speedup tensorflow compile time?

I am doing some customization to the tensorflow core, so I am compiling it several times. Currently, my problem is that each compilation takes about 25 minutes and I would like to reduce the compile time. Each time, I compile using the instruction at this link on a machine equipped with a Intel i7 a...
Dan
1

votes
1

answer
49

views

Overwriting instance variables by looping - is there a better way? [duplicate]

This question already has an answer here: How do you programmatically set an attribute? 3 answers I have a class that I'm trying to create objects for with a given variable adjusted by a loop. I'm struggling to explain so perhaps an example will help. The actual class is more complicated than t...
Dan
1

votes
1

answer
101

views

End to End Google Vision Safe Search Test

I am using the Google Vision API to flag adult images uploaded my application. I would like to be able to perform an 'end-to-end' test where I upload an image and test that it gets handled correctly when flagged. Does anyone know how to do this without an actual pornographic picture? As silly as thi...
Dan Grahn
1

votes
1

answer
108

views

Shortcut (non-advertised) not being created with Wix installer?

I built a simple MSI installer with Wix 3.11. It includes an EXE and a shortcut, but the shortcut never appears on the desktop. I build the MSI without errors, it otherwise installs just fine, and there are no errors in the MSI log file. I viewed the MSI with Orca and I see the shortcut and deskt...
Dan
1

votes
2

answer
46

views

Compatibility issues of Jquery with CSS media queries?

I'm running into instances where CSS media queries, for instance for smaller devices (smartphones), run fine on my page for styling initial page elements, but then apply inconsistently on elements that I'm later inserting into the page using Jquery methods. After testing this a lot – looking for w...
Dan-in-Austin
1

votes
0

answer
448

views

Best way to store timestamp with milliseconds in a mysql database

The value I want to insert into a mysql table has the following format: YYYY-MM-DD HH-MM-SS.MS (MS is for milliseconds). E.g.: 2017-09-07 00:00:31.150 Official mysql docs for the DATE, DATETIME, and TIMESTAMP types say nothing about milliseconds so that's why I am asking. Please, tell me what mysql...
Dan
1

votes
0

answer
151

views

Python, MySQL: how to populate an empty column with values from python array (aka list)?

I have an int list lst = [1, 2, 3] And a mysql table with an empty second column: key value a b c I want to populate the value column with values from my list so as to make the table look like this: key value a 1 b 2 c 3 To do that, I use cursor.execute function: lst = [1, 2, 3] conn = MySQLd...
Dan
1

votes
0

answer
39

views

creating mobile menu in php vs in js

Up until now I always tackled the issue of mobile navigation the same way: Create the menu in php and then manipulate it using css, media queries and js, to act as a mobile menu, when the screen size is narrow, and act as a normal navigation when you are viewing the site on a desktop or a device wit...
D. Dan
1

votes
1

answer
1.9k

views

Run a SSIS Package outside of SSDT (2017)

I have searched multiple forums and found question similar, but doesn't match my environments. Problem: Cannot execute a package within a package Error: To run a SSIS package outside of SQL Server Data Tools you must install st_Check_Files of Integration Services or higher. SQL Server 2017 info SSMS...
Dan Peter
1

votes
0

answer
163

views

How to print out loss value at each iteration with time-stamp in logistic regression model?

I am training my input dataset by using logistic regression model. Initially, my workflow includes the implementation of logistic loss function, its gradient, predictor, weight_update, compute_cost_logistic, logistic_regression. Meanwhile, I need to print out the loss value at each iteration with a...
Dan
1

votes
1

answer
36

views

Changes on published Globalization.en.resx not longer recognized

in my web project in Visual Studio (VS) 2013 there are 2 Globalization files for language support: Globalization.resx for German and Globalization.en.resx for English. The last year while publishing to the Server everythings works fine. For the last 2 days only the changes to the Globalization.en.re...
dan
1

votes
1

answer
1k

views

Spring Validation failed for object with date field

If I remove any reference to the date, the form submits successfully, but when I include the date field I get the following error: There was an unexpected error (type=Bad Request, status=400). Validation failed for object='film'. Error count: 1 My code is as below: addfilm.html Title: Director: De...
Dan
1

votes
1

answer
39

views

What is the right solution for Menu from database => base view model for layout vs model in httpcontext ()

I am trying to figure out what is the right solution for creating a menu in a ASP.NET. The menu has items and subitems and are subject to user rights. So I have a MenuService that returns the menu for the current user. However I do not know how to implement the menu. So far I have found 3 possible...
Dan
1

votes
0

answer
39

views

How can I list all licenses for a single user with google's Enterprise License Manager API

So far all the other API calls I worked with on the admin SDK seem to allow the params needed to properly filter what do/don't need. With this one, however, it seems I need to dump all licenses and them search through the results for the one I need. I need to keep track of the pageToken and make m...
Dan

View additional