Daniël

23118 questions
1

votes
0

answer
92

views

Singularity error when doing Tobit regression

I'm trying to estimate a standard tobit model which is censored left at zero. Variables are Dependent variable: Happiness Independent variable: City(Chicago,New York), Gender(Man,Woman), Employment(0=Unemployed, 1=Employed), Worktype(Unemployed, Bluecolor, Whitecolor), Holiday(Unemployed, 1day a wee...
Daniel Cho
1

votes
0

answer
88

views

How do I get rid of BSON objects after a mapReduce?

I'm a complete beginner to map-reduce and relatively new with MongoDB. I am trying to perform a map-reduce on a collection (by the name Customers). My map function: var map = function() { emit(this.nationality, {edad: this.age, telefono: this.phone_number}); }; My reduce function: var reduce = funct...
1

votes
2

answer
51

views

How to eliminate the through-line from a legend element in R using ggplot

I'm having trouble eliminating a black through-line from an element in my legend. The black line is in the '% of Hires by Casual Users' element. Below is my code, followed by a link to the output plot EDIT - please note that I've added code to reproduce the problem elsewhere. This data is random and...
Daniel Patterson
1

votes
0

answer
171

views

Send continuous data via bluetooth while button pressed

I want to send data via bluetooth while a button is pressed. I am using an ontouchlistener. After the button down event happens the data transfer is started but when the button up event happens the transfer is not stopped immediately. At the bluetooth receiver side I see a lot of data incoming still...
Daniel
1

votes
1

answer
303

views

Serializing custom classes with custom Settings Provider

I'm trying to save the following classes using a custom Settings Provider but keep getting a null reference error (error details below). [Serializable] public class SoundClips { [System.Xml.Serialization.XmlElementAttribute('Items')] public List Items { get; set; } public SoundClips() { Items = new...
Daniel
1

votes
0

answer
30

views

Rails iteration (for unique ID's) and javascript, multiple forms in one view

I have a rails-app with multiple forms(edit-modals) in one (index)view. In order to avoid identical id's I gave every form and every field a unique ID by using namespace: That works well and all fields have unique ID's. Some of the fields use a js DateTime-picker that's related to the id's: $(docume...
Daniel
1

votes
2

answer
583

views

How does one plot an ISO week time series plot in Data Studio that does not begin on Week 1?

I am trying to overplot four years of data to see how they compare over a year. I have created a field called season to separate the four years and have another field called week corresponding to the ISO week. However, I cannot figure out the way to make the plot start at, say, week 31 instead of we...
Daniel Logan
1

votes
0

answer
62

views

Dropdown selected options not displaying on Safari iPad

Using jQuery, I'm trying to change the selected option in a SELECT element dynamically. It's working fine on Chrome/IE on windows but not working on iPad/Safari. Here is my code: $('#ddlRegion').find('option').attr('selected',false).prop('selected', false); $('#cicddlRegion option[value='' + currCod...
Daniel Smith
1

votes
0

answer
33

views

Why my second adapter does not show up?

Being bogged with the fact that few of the games and graphics applications run in my GPU (AMD Radeon 6600M) choosing instead the Intel HD3000, I wrote this small code to start investigating. #include #include #include int enumGraphicsAdapters( void* pFactory ) { int rc = ERROR_SUCCESS; HRESULT rc...
daniel.franzini
1

votes
1

answer
146

views

Neo4j 3.3.1- Custom APOC Procedures failing

I am trying to write my own procedures in Neo4j 3.3.1 version using APOC. As an exercise I stared with returning all node id's. Since I am new to java environment facing issues to run it successfully. Below is my java code to return the node id's. package example; import java.io.File; import java.u...
Jack Daniel
1

votes
0

answer
221

views

How can you make Moshi handle complex nested data?

Suppose I've got some JSON data coming in that I ultimately want to represent in code like this: data class Parent(val id: String, val children: List) data class Child(val id: String, val parentId: String) But the JSON that comes in is more like this: { 'id': 'parent-1', 'children': [ { 'idPrefix':...
Daniel Lew
1

votes
0

answer
21

views

Force dock name on Fedora with Java Swing

I have a Java Swing application running on several OS. On Fedora, when I start the application the Java main class is displayed with dashes as a menu next to the Applications and Places menu. How can I force this name to be my application name and not the Java class with the full package before? On...
Daniel
1

votes
0

answer
143

views

d3 single stacked chart with rounded corners only on first and last rect's

I have a stacked chart that i need the corners to be rounded , i tried adding .attr('rx',10) and ry , 10. But that way all rects are getting round, and thats not what i need, the first one needs a left round corner and the last one needs a right round corner. this is the chart js var datavars = [22...
1

votes
1

answer
235

views

Visual Studio Extension - How to listen on Solution \ Project item selection change

I Creating a Visual Studio Extension and I would like to listen when user selection item change or when current project selection change. I try to listen - OnChange in SelectionEvents: var dte = ServiceProvider.GlobalProvider.GetService(typeof(EnvDTE.DTE)) as DTE2; var dteEvents = dte.Events as Even...
Daniel Tshuva
1

votes
0

answer
67

views

Focus on input / textareas in bootstrap modal stolen when AJAX request made in background

I have a very specific problem when displaying a bootstrap modal that contains text inputs or textareas. This only occurs in Google Chrome. Firefox and Edge are fine. When one of these inputs or textareas has focus, and a jQuery AJAX request is made in the background, the focus on the input or the t...
Daniel Procter
1

votes
0

answer
35

views

Python/NumPy - Tail letter placement algorithm

I'm currently trying to write a program that correctly centers handwritten letters in a similar fashion to Microsoft Word. Using a standard handwriting grid for comparison, the bottom of the letter is placed right on the lowest gridline for most letters: Image. However, there are five tail letters w...
Daniel Q
1

votes
0

answer
105

views

Get MediaStore.Images.Media._ID by using Content URI

I have just saved a photo in the gallery using the camera and I have the content Uri which looks like: Uri contentUriOfPhoto = content://com.example.photorq.provider/external_files/Pictures/Photorq/IMG_20180105_231322.jpg Now I would like to get the MediaStore.Images.Media._ID of this image. This...
Bogdan Daniel
1

votes
0

answer
300

views

Install PyQt4 on a macOS Sierra 10.12.6

No matter what I have done in the last 2 weeks, I am unable to use PyQt4 library with Pycharm. This happens while I try to activate python alone or with QtDesigner integration. I receive: 'ModuleNotFoundError: No module named 'PyQt4'' all the time. whether from Pycharm while I try to add an interp...
Daniel Gontar
1

votes
0

answer
51

views

Executing C++ with Armadillo in PHP script

Me and my colleague are working on a project together. We have a compiled C++ program which we execute from a PHP script, returning the C++ data to an array. Nothing weird about that. (We are running on Ubuntu, Apache, locally), two different machines. exec('./program', $array); He has just given me...
Daniel
1

votes
0

answer
188

views

ProgressTracker and contract errors not showing up in console

On Windows, when running the nodes and interacting with them I don't get any feedback from the console apart from 'Unstarted' and 'Done'. When it doesn't work it just says 'Unstarted'. And if it works it says both. Also when I when I initiate a transaction that doesn't fulfill the contract, the erro...
Daniel Bedggood
1

votes
1

answer
50

views

Username in domain after slash

What is the best way to rewrite the url from https://www.example.com/user/?user=MaxMustermann to https://www.example.com/MaxMustermann I have tried that in the .htaccess-File with a RewriteRule, but if I open the URL exmaple.com/login.php, I get the Message 'User not found', whats correctly. How can...
Daniel Müller
1

votes
0

answer
50

views

How to use (Is there) code completion without using vue-cli

i try to do my first steps with vue.js. My Question is: Is there a possibility for the use of code completion if i dont wat to use the cli. Therefore i have no .vue-Files. I just use vue by binding the script (vue.js) over the < script>-tag to my html code. I created a new javaScript-File (myVue.js)...
Daniel Stiefel
1

votes
1

answer
357

views

How to send keyboard keys to nested input in ion-input using protractor

Hi I am having a problem trying to send keystrokes to an ion-input in an ionic application. I can successfully click the ion-input but when i try to send keys it says Failed: unknown error: cannot focus element I think protractor is binding to the ion-input and not the nested input element in the...
Daniel
1

votes
0

answer
33

views

Trouble modifying a codepen

This is the codepen that I want to modify: https://codepen.io/anon/pen/WdzPoe The end goal is for it to display a random image from an array instead of only one image. I created an array with 2 images for a start and I get a random image from it: let allLogos = ['https://upload.wikimedia.org/wikiped...
Daniel Allen
1

votes
0

answer
308

views

Robust web Socket Streaming to Kafka in Java

I need to record from an unreliable web socket connection and stream into Kafka. Our Kafka cluster is pretty reliable and we can make it highly available. What is the best approach to make the web socket connection as reliable as possible? I would like to minimize data loss. One solution would be...
Daniel
1

votes
1

answer
165

views

Razor Html.BeginForm Submit button works in every browser except chrome

I've been searching and found various answers but so far none seem to hit on my issue here. Seen things not working in other browsers but not yet chrome and I don't use chrome much. My issue is that when I click the submit button to this login form, it works in every single browser except chrome. Th...
Daniel Jackson
1

votes
0

answer
131

views

Failure to upload files on Glitch using Express js

I created a Glitch project and I want to upload files to it via user input. I am using express-fileupload and I followed the sample code from their docs to upload a file, but I keep getting an error. I think it might have to do with the directory I am using to move the file to. I have tried using '/...
Daniel Hernandez
1

votes
0

answer
69

views

Magento 2 - Catalog Price Rules Time

I want to add time handle to price rules (by default there is only date). What I did is: 1. In database, table catalogrule, I changed columns from_date and to_date to datetime 2. In form, added datetime picker to fields from_date and to_date. Dates are saved correctly in database but what next? I'm...
Daniel Łyciuk
1

votes
2

answer
72

views

AndroidMediaplayer.create freeze (still running but dont do anything) the App

I was using MediaPlayer to play sounds in my App but from Its start to freeze the App: Thats the code where I call create method. I moved the code inside an AsyncTask class : public class BackgroundSound extends AsyncTask { MediaPlayer mpB; MediaPlayer mpG; Context ctx; BackgroundSound(Context appct...
1

votes
0

answer
46

views

Wordpress shortcode displays widget but not content

I am trying to create a shortcode that will display a current widget and it's contents. It seems to function perfectly fine for wordpress default widgets, however when it comes to my custom widgets it does not work. Any ideas on how to fix it? Shortcode (I believe the issue stands with $widget_id no...
Daniel Vickers
1

votes
0

answer
187

views

Webpack config not in strict mode, don't want to change the code

I trying to build production webpack of BitShares UI https://github.com/bitshares/bitshares-ui The issue is that webpack is not running in strict mode I don't want to have to change the code though. Is there a way to force that webpack config is interpreted in strict mode so that I avoid this probl...
Daniel C
1

votes
1

answer
265

views

Swift 3 Line Chart Get Index

So Im making a graph using the Beautiful Charts Api. Im doing it in SWIFT 3. I got the graph working but now Im trying to get the selected value index, I have tried many things but they have not work. Heres my latest attempt at it. func chartValueSelected(_ chartView: ChartViewBase, entry: ChartDat...
Daniel Cisneros
1

votes
2

answer
77

views

Index folders and files in python3

I wanted to create an index of all the files and folders that i have in an enterprise cloud so i could then do the backup of it and store the index into a txt file and after i will compare the two last backups ( the txt files ) to check which files/folders changed names. I have tried this code, but...
Daniel Santos
1

votes
1

answer
557

views

JAVAFX Build Fails with Intellij on MAC

I have been trying to complete this step for 2 days and can't find a solution. I am running IntelliJ on Mac 10.13.2 After creating a brand new project with nothing more than the 'Hello World' Title screen I attempt to build artifacts. I have my project settings correct for what I can tell and set th...
Daniel H.
1

votes
1

answer
295

views

Range.InsertXML throws when inserting Open XML

I'm writing a VSTO add-in for Word. I'm manipulating some content controls and have their Range objects. I'm trying to use the Open XML SDK to create XML element objects (OpenXmlElement) such as a Run (Run/w:r) and properties for it. Here's the XML: Hello world this should be bold When I pass this t...
Daniel A. White
1

votes
0

answer
113

views

What causes “Cannot connect to iTunes Store” using In-App purchases in an Ionic 3 app?

I wrote an Ionic 3 app for iOS and use the native in app purchase. I know, that in app purchase (IAP) is only working on a real device. The problem is, that I submitted my app to Apple and they rejected the app because IAP isn't working. Only the error 'Cannot connect to iTunes Stores' shows up. A...
Daniel
1

votes
0

answer
82

views

O(1) constant c value?

As per the coding interview book by Narasimha Karumanchi , there is a question to find the upper bound for f(n) = 410 Logically, The Answer should be O(1) with n0 = 1 and c = 410 But the answer is mentioned as O(1) with n0 = 1 and c = 1 Is there a mistake in the answer or am I wrong here? Reason fo...
Daniel Isaac
1

votes
0

answer
409

views

Tensorflow Summaries: You must feed a value for placeholder tensor with dtype float

I'm experiencing a weird case and I have no idea how to solve this. Basically I am training a multi layer NN. However when I try to add summaries, I receive the next error: Caused by op 'Placeholder_2', defined at: File 'multilayer.py', line 235, in train_model(data, real_output, real_check, args.l...
Daniel Zapata
1

votes
1

answer
919

views

How to resolve FOREIGN KEY constraint failed

I am following a tutorial on a basic concept. How to customize a user in django. I don't want to use the built in auth user. I found this tutorial which seems to work until a point. I get through the whole tutorial with everything working. however when I run my project, log in and open the user in t...
Daniel Tate
1

votes
0

answer
35

views

How to change the language of a plugin in a specific page?

I would like to know if I can set a plugin to a different language than the one WordPress is using in a specific page. The site I'm working on is in English, but I need to display a form in Spanish in a single page. The plugin itself has the translation to Spanish (checked using LocoTranslate) but I...
Daniel Rodríguez

View additional