Dániel

17018 questions
1

votes
1

answer
1.6k

views

JSON.stringify() - Escaping Issue

I am currently using AJAX with JQuery to send json to an API server. However, there seems to be an issue with a server that is escaping the JSON string when I use JSON.stringify() but on another server when using the exact same code it works without any problems. Here is an example of the Javascrip...
Daniel West
-1

votes
0

answer
25

views

Appending Binary Files Delphi

I am trying to create a fileuploader backend where I receive the uploaded file in chunks of 10 000 000 bytes max. var FileTo, FileFrom: File; Buffer: array [1 .. 1000] of Byte; RecordsRead: Integer; begin FileMode := fmOpenReadWrite; AssignFile(FileTo, ToFilePath); Reset(FileTo, 1); try AssignFile(F...
Daniel Venter
0

votes
0

answer
4

views

Umbraco 2 level document type

I have a document type called Web Page and a document type called elements. The elements doc type holds all the different layouts eg, cards, banners, carousels, etc the page doc type has the default common elements for a page. What I want to is when adding the page doc type in the content section th...
Daniel Rogers
1

votes
3

answer
107

views

determine if an array has the numbers a to b each once [duplicate]

This question already has an answer here: How to tell if an array is a permutation in O(n)? 16 answers Given an array A of size n, and two numbers a and b with b-a+1=n, I need to determine whether or not A contains each of the numbers between a and b (exactly once). For example, if n=4 and a=1,b=4...
Daniel
1

votes
1

answer
308

views

How to sum two variables: constant and iterated in text input's “name”?

I have a function: jQuery(function($) { var scntDiv = $('#div'); var i = $('#div p').size() + 2; var x = ; var a = 0; $('#add').click (function() { $('Remove').appendTo(scntDiv); i++; a++; return false; }); $('#delete').live('click',function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } re...
Daniel
1

votes
2

answer
199

views

Access Windows Registry inside R

How can I access the windows registry inside R. For example, I want to access the folder: [HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R\3.0.2] and the key called "InstallPath" to get: "C:\\Program Files\\R\\R-3.0.2" Many thanks!
Daniel Bonetti
0

votes
0

answer
4

views

How do I properly include an npm run test command in docker run?

I am sure I have run this command before, but I tested the following command in my terminal and got this error: ✗ docker run aa1112d76852 npm run test -- --coverage ERRO[0001] error waiting for container: context canceled docker: Error response from daemon: OCI runtime create failed: container_lin...
Daniel
1

votes
1

answer
399

views

Can't figure out how to test proxy with Soundcloud API

I am trying to use my proxy with the Soundcloud API. The format is client = soundcloud.Client(client_id=client_id, client_secret=client_secret, username=username, password=password, proxies=proxies) However, when I pass something into the proxies variable like proxies = {'http': 'notavalidip'} the...
Daniel Ni
1

votes
1

answer
818

views

Google Visualization Column Chart not showing all data

I have made a small column chart and all the data I have is not visible. Is it possible to get so that everything is visible without enlarging the width? Or is there any way to include a scrollbar so that everything can be seen? For the code see: jsfiddle.net/danielbemler/4x8s3e4j/5/ As seen in the...
Daniel
1

votes
1

answer
137

views

Factory girl conflict between field names with association

For legacy reasons, I have a model in Rails with two fields: city and city_id. city is a string with the city name. city_id is a reference to a city object. How should I declare my factory with factory_girl? I would like to populate both city_id and city like this: factory :address do street "Street...
Daniel Cukier
1

votes
1

answer
417

views

ANTLR4 sending a null context attribute to listener

I'm creating a simple language compiler, and I'm facing an unexpected behavior. I simplified the grammar as follows: grammar Language; program : (varDecl)* (funcDecl)* EOF; varDecl : type IDENTIFIER ('=' expression)? ';'; funcDecl : type IDENTIFIER '(' ')' statementBlock; type...
Daniel Castro
1

votes
1

answer
57

views

jQuery GET overwiting POST

I've got a simple jQuery script that isn't behaving correctly. What am I doing wrong? The idea is that the user enters a value into a textbox and then clicks a button. The jQuery then uses POST to send the value to a PHP file. The PHP file then runs a simple SQL query and gives a response. jQuery .l...
Daniel Dunn
1

votes
1

answer
2.5k

views

Filling an empty value in Scala Spark Dataframe [duplicate]

This question already has an answer here: Convert null values to empty array in Spark DataFrame 2 answers I am currently working with a dataframe right now in scala, and can't figure out how to fill a column with a Seq.empty[Row] value if the value in that row is null. I understand there is the df....
Daniel Dao
1

votes
2

answer
3.5k

views

Woocommerce Excluding Certain Category from Shop Page

Trying to exclude a single category from my WooCommerce's Shop Page I was using this code but it would break my sites's attributes filter links: add_action( 'pre_get_posts', 'custom_pre_get_posts_query' ); function custom_pre_get_posts_query( $q ) { if ( ! $q->is_main_query() ) return; if ( ! $q->is...
Carlos Daniel
0

votes
0

answer
4

views

How to input “2 keys at once”

I am building a Mortal Kombat game in assembly as an final project. I have problems input keys from 2 users without delay or other crappy things. I have already tried to use the buffer. However, in the game you need to hold the 'd' button for letting one player move right and in the same time hold t...
Daniel Bartov
1

votes
1

answer
1.5k

views

Using simple PyQT UI to choose directory path crushing

I am kind of new to Python and especially new to PyQT. I Used PyQT5 to create a very simple gui. Now, I would like to upgrade it to involve something more real then to calculate number operations. I want a user to choose a directory with images. After that and some other small operations like tickin...
Daniel Glazer
1

votes
1

answer
51

views

Write to EBX register eventually leads to program segmentation fault

I have a curious case of the ebx register causing a segfault when I perform any writing operation on it. I can't figure out why. Is there some limitation of the ebx register where I can't use it? I have tried using other registers with this algorithm and it functions. It's only when I use the ebx re...
Daniel Smith
1

votes
3

answer
4.5k

views

How can I modify multicast TCP/IP packets' TTL?

I'm supporting a 3rd party app that sends multicast packets with a TTL of 1. We cannot modify the app, but need a higher TTL to route the packets to another customer's network. Is there a network appliance or windows (server 2003) app that will let me modify this? Is there a better approach for c...
Daniel
0

votes
0

answer
22

views

Add delay before slide change

I'm using Swiper Slider. Is there a way that after I click next/prev buttons to add a delay before the slide changes? For example: I click on the next button, wait 1 sec and change to the next slide. I need this because I've made my own animations using CSS and it takes aprox. 1 sec to be finished c...
Daniel Gabe
0

votes
0

answer
6

views

Is there a way to run a Mininet command while Mininet is executing another command?

I have created a simple network emulation in Mininet. h1 ---------------- h2 (without a switch or anything in between) I am running an iperf server on h2 and an iperf client on h1. Then I am perfoming the measurment from h1 to h2 in some interval repeated. But in the same time I want to run a pi...
Sero Daniel
-2

votes
1

answer
22

views

How can I save the SwichButton setting? [duplicate]

This question already has an answer here: Swift 4 save from the background color that was consulted in the App 1 answer I've got 4 SwichButton, this is standard to Off. How can I save the setting when a switch button is set to on ? I have this: @IBAction func SwitchNofic(_ sender: UISwitch) { let...
Daniel.P
1

votes
1

answer
10

views

write to ebx register segmentation fault

I have a curious case of the ebx register causing a segfault when I perform any writing operation on it. I can't figure out why. Is there some limitation of the ebx register where I can't use it? I have tried using other registers with this algorithm and it functions. It's only when I use the ebx re...
Daniel Smith
0

votes
0

answer
4

views

AWS CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. The headers are present

I have been battling with these dreaded CORS issues with AWS for a while now. I thought I had it sorted out and then it turned up again... I have done exactly want I have in the other Lambda functions that work fine. Why won't it work now? I have added in the headers in the response to all of the L...
Daniel Edwards
1

votes
2

answer
3.8k

views

How to have LLDB print the locations of shared libraries in memory?

I am trying to gather as much information as I can about an apparent infinite loop issue seen when using Valgrind 3.11.0 on Mac OS 10.11.1 'El Capitan'. When I run valgrind on my program in LLDB or attach to valgrind running my program and then stop the process, I get a backtrace like the following:...
Daniel Trebbien
0

votes
1

answer
15

views

Maven - Project classes not recognized in Intellij

I am new to Maven and working in intellij What I did Create new maven project Copy in my directory of java files from a previous project edit my POM for all dependencies Intelij says it can not find my project classes when I call them from other files. (See Picture) I have tried a re-build and clean...
Daniel H.
1

votes
2

answer
202

views

Connect to two cloudsql instances from GAE

I can't figure out the syntax to connect my AEF environment to multiple cloud_sql instances. These are the two configs that I have tried: beta_settings: cloud_sql_instances: - pore-gdic:europe-west1:a-django - pore-gdic:europe-west1:a-airflow-5 Failed: ERROR: (gcloud.app.deploy) Error Response: [13...
Daniel Lee
0

votes
1

answer
12

views

Making a query inside another query in MySql

I have executions and each execution has several images, example, table execution id | name 1 execution1 table image id | executionId | image 1 1 'path' 2 1 'path2' I want a query that get all the executions, with each execution having all their images like...
daniel gon
1

votes
2

answer
707

views

pipenv install failing due to timeout

C:\Users\danie01\fox\test\robotframework>pipenv install --python 3.5 Creating a virtualenv for this project... Pipfile: C:\Users\danie01\fox\test\robotframework\Pipfile Using C:\Users\danie01\AppData\Local\Programs\Python\Python35\python.exe (3.5.0) to create virtualenv... Traceback (most recent cal...
1

votes
1

answer
429

views

Get transaction details using transaction ID - Paypal

What I am trying to do is I would like to verify transaction ID of Paypal payments. But paypal sends me back a: {"name":"INVALID_RESOURCE_ID","message":"Requested resource ID was not found.","information_link":"https:\/\/developer.paypal.com\/docs\/api\/payments\/#errors"} my current code right now...
Daniel
0

votes
0

answer
2

views

OpenDKIM not signing mails

I know this is a common problem. But none of the existing threads could help me. I am currently setting up OpenDKIM for a mailing list. I have followed a tutorial on DigitalOcean (https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy) but f...
Daniel Eckhoff
0

votes
0

answer
3

views

IPBoard Secondary Groups

I've been trying to discover how to assign Secondary Groups through my SSO System. Currently the only thing I currently got this: if ($ssoMember->division->code == "ME") { $member->member_group_id = '21'; } else { $member->member_group_id = '20'; } This only sets the Primary Group, however, I am wa...
Daniel Johnson
1

votes
1

answer
23

views

Typescript Inteface where “id” must be number and other properties must be string

I need to define a interface for a data which comes from the server where id in a number, but all other properties are strings. I tried: interface AnyChartsData { id: number; [key: string]: string; } but i got this error: [ts] Property 'id' of type 'number' is not assignable to string index type 's...
Daniel Santos
1

votes
1

answer
24

views

Trigger a jQuery function on document.ready

I have a bit of Javascript within my .change() function and would like to apply the same code within the function on the .ready() function. Is there any way I could achive this, without copy and pasting the code into the function aswell? $('.selabw').change(function(){ let that = $(this); let value...
daniel
1

votes
1

answer
52

views

How to Make Square Icon Buttons with Rectangular SVG Icons Inside Them

I am attempting to make my own icon button using React, styled-components, and SVG. My icons are generally rectangular, however I want the buttons to be squares and to have the icons centered inside of them. This is where I am getting stuck. I tried tweaking the viewBox dimensions on the SVGs but...
Daniel Bank
1

votes
2

answer
27

views

How to choice what method should be called when use polymorphism

I need a way to choice who method should be called. I'm calling a parent method who calls one of its methods using "this". The problem is that I override that method in my class so when call the parent method then It calls to my method instead of its method. public static class A { public String m1(...
7

votes
1

answer
274

views

Open PWA when clicking on push notification handled by service-worker ng7 + android

We've a PWA implemented on angular 7 and NodeJS as backend. Push notification are sent from backend with web-push and handled by the angular service worker service. The behavior that we hope to have in Android is when the user clicks on the notification, the application opens in the device (i.e. th...
daniel
0

votes
0

answer
8

views

no matching function for call to 'make_shared'

I am getting compiler error "no matching function for call to 'make_shared'" whenever I try to use a constructor that takes any arguments. So, for example: std::shared_ptr foo = std::make_shared (); works fine. But, std::shared_ptr foo = std::make_shared (10); Gives the following error: /usr/bin/c...
Daniel Goldfarb
1

votes
0

answer
8

views

Material-UI Getting a scrolling effect in iPhone view

With MUIs Grid API I have not been able to figure out how to remove the scrolling effect from the iPhone view. This is where I believe the issue lies: return ( Welcome! Email Address this.setState({ username: evt.target.value })} onKeyPress={(evt) => { if (evt.key === 'Enter') { this.setState({ user...
Daniel
5

votes
1

answer
38

views

Advanced slicing. Higher order slicing/selecting

I'm confused about the semantics of numpy advanced slicing in some code I found in our codebase today. Let me start out with an example: # example boolean matrix a = np.random.rand(5, 5) > 0.5 # Outputs array([[ True, False, True, True, False], [ True, True, False, True, False], [False, True,...
Daniel Varab
2

votes
0

answer
19

views

How to really work in team on React Native project?

How do you work in team on react native projects? I'm working in Team of 2 people and having a lot of issues with working on the same project. I don't understand how to properly create environment so we can sync code between each other while working on the same project. Now, we create git repo with...
Daniel Kunin

View additional