Daniël

23155 questions
1

votes
1

answer
1.6k

views

Jupyter widget does not appear in notebook

I'm running a jupyter notebook but the jupyter widgets does not appear. Instead I receive the folllowing message: Failed to display Jupyter Widget of type Button. If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean that the widgets JavaScript is still loading....
Daniel Zapata
1

votes
0

answer
9

views

python 'environments have crashed'

I'm just getting started with using universe in python to learn how to make a game bot. I'm using a demo code to start with. However I get the same error after I run the code on PyCharm. import gym import universe env = gym.make('flashgames.DuskDrive-v0') env.configure(remotes='vnc://localhost:5900+...
Daniel dos Santos
1

votes
2

answer
1.1k

views

Bootstrap modal x button out of position

I'm setting up a Boostrap modal and what I've put below is fairly basic code, but the x close button on the modal is out of position. The button is sitting down lower than the vertical center of the div. I can't see anywhere that this might be affected? Monsta Desk $(window).on('load',function(){...
Daniel Williams
1

votes
1

answer
340

views

Asterisk HANGUPCAUSE always 0 when caller hangs up Queue

Using Asterisk 11, with an inbound route configured to call Queue app, every time the caller hangs up the HANGUPCAUSE variable is 0, it works and returns the NORMAL_CLEARING code only when the assigned queue member hangs up or if not using queues. Example code: [from-trunk] exten => s,1,Answer() sam...
Jeferson Daniel
1

votes
1

answer
1.5k

views

Sublime GDB for Sublime 3 doesn't work: You have not configured the plugin correctly

I've googled this issue and haven't seen any useful advice. My understanding is that the default settings should work; I can't see any information about mandatory modifications to the default settings. You have not configured the plugin correctly, the default configuration file and your user configu...
Daniel Paczuski Bak
1

votes
2

answer
269

views

Correct implementation of weighted K-Nearest Neighbors

From what I understood, the classical KNN algorithm works like this (for discrete data): Let x be the point you want to classify Let dist(a,b) be the Euclidean distance between points a and b Iterate through the training set points pᵢ, taking the distances dist(pᵢ,x) Classify x as the most frequ...
Daniel
1

votes
0

answer
9

views

Xamarin.Forms ScrollView adds extra space

My ScrollView adds extra spaces above the first child and under the last on my iPhone X. There is no padding or margin. I gave the ScrollView a blue background to see it's dimensions better. If I remove the ScrollView, the spacing also is gone. Here`s the code I am using .... Is this maybe a bug or...
0

votes
0

answer
5

views

Range minimum query of special binary array

Let A be a binary array (that is, it contains only -1s and 1s), but with a special rule: the true value of A[i] is A[0] + ... + A[i]. Suppose A = {1,1,-1,-1}, than the array of real values should be {1,2,1,0}. How can I retrieve the index of a Range Minimum Query on A without preprocessing the real...
Daniel
1

votes
2

answer
32

views

Python MQTT callbacks in OOP

I'm currently trying to use the paho mqtt library in Python3 in a object oriented context. However, for some reason, the callback functions don't get called. import paho.mqtt.client as mqtt import time import logging logger = logging.getLogger('IDS_LOGGER.refining') logging.basicConfig(level=logging...
Daniel Siegel
1

votes
1

answer
38

views

Observe when variable is deleted

I'm using Python as a wrapper to a library that, for desired reasons, keeps certain objects in memory until the process is killed and system GC removes them (or, a command is sent to explicitly remove them). A user can retrieve references to one of these objects using a Python function, so I know wh...
1

votes
2

answer
26

views

Query/Replace element in DataFrame with element directly beneath it

I have a dataframe in which I need to query and replace 0.00s with a value directly below it if certain conditions are met. I have looked for documentation on such a behavior but have been unable to find an efficient Pythonic solution. The logic is as follows: IF [Symbol] = 'VIX' AND [QuoteDateTi...
Daniel Sims
1

votes
2

answer
22

views

SQL syntax for removing a specific row [time] from a specific group [symbol]

I'm running up against the edge of my SQL Query knowledge and could use a point in the right direction. (I am using Presto, but ideally that shouldn't matter because Presto uses common SQL syntax.) What I would like to do is always exclude the 9:31:00 [QuoteTime] ONLY on the 'VIX' Symbol. If possibl...
Daniel Sims
1

votes
4

answer
1.6k

views

Substitute for LD_PRELOAD or LD_LIBRARY_PATH

I'm doing some C programming on a machine for which I don't have root access. I've compiled some shared libraries that I'm linking to, but because I cannot install the libraries in the typical location (/usr/local/lib) I have to explicitly specify the location of the libraries each time I compile an...
Daniel Standage
-1

votes
1

answer
17

views

<UL> <LI> Foreach Loop Displaying all content on one <UL>

I know this is relatively simple but its driving me absolutely insane! a little background, my app takes an xml feed to parse, this has nested fields suchs as features its in my db, as an obj/array, with 'feature' as the key. now my for each loop is displaying all this data in one UL. Code Below. An...
Daniel Horrobin
0

votes
0

answer
14

views

code explanation about the “Combination Sum of Coins ” solution

The question is: Given many coins of 3 different face values, print the combination sums of the coins up to 1000. Must be printed in order. eg: coins(10, 15, 55) print: 10 15 20 25 30 . . . 1000 And the solution is: public static void coins(int c1, int c2, int c3) { Set sums = new HashSet...
Daniel K
0

votes
1

answer
31

views

SQL Server - Insert 2M+ records in sql script with 7000 rows per insert

I'm looking for any suggestion for workaround of 1000 lines per insert limit in SQL Server. I have mysql dump script which has few 100 lines , each line is a insert statement which contains approx 7000 rows. I cannot insert that directly to SQL Server because of the limit of 1000 rows per insert. Is...
Daniel Hanczyc
0

votes
1

answer
22

views

C++ - passing declared array as argument to struct

float_t rotations[6] = {1.0f, 2.5f, 3.0f, 4.0f, 5.0f, 6.0f}; fla_algo_config_t config_alt = {20.0f, 20.0f, {1.0f, 2.5f, 3.0f, 4.0f, 5.0f, 6.0f}, mock_error_callback, nullptr}; fla_algo_config_t config = {20.0f, 20.0f, rotations, mock_error_callback, nullptr}; config_alt works. However, it is cumbers...
1

votes
2

answer
3.3k

views

Yii2 RBAC DbManager error Call to a member function getRole() on null

I've set up the database etc by having implemented SQL code to set up the tables and the rbac/init script to fill out the roles / permissions. I have an assign() at user creation but I keep receiving this error on the getRole(): yii\base\ErrorException Call to a member function getRole() on null pub...
Daniel O'Leary
1

votes
3

answer
2.9k

views

Criteria query for unidirectional one-to-many relationship

So, I have the following entities: @Entity public class Supplier { @Column(name = 'SUPPLIERID') private BigInteger supplierId; @OneToMany @JoinColumn(name = 'ID_SUPP', foreignKey = @ForeignKey(name = 'fk_POIS_SUPP')) private List posList; ... } @Entity public class POS { @Column(name = 'POSID') priv...
Daniel Rusev
0

votes
0

answer
11

views

Maven project : IOException error when creating a Jar file

I try to create a jar file with a Maven project but when i run the jar file I have a IOException.Is there something to add to the pom.xml file? I use a Maven project because i have to add jfreechart dependency. Thanks you
Daniel xx
7

votes
3

answer
145

views

C++ Get binary value of a buffer

I'm really sorry for the wording of the question, it's a bit confusing. So lets say I have a buffer: char buffer[4] = {0, 0, 2, 0}; if we convert it all to binary, we get one 32 bit unsigned int: 00000000 00000000 00000010 00000000 The value of it is 512. So my question is, how do I get to th...
Daniel
1

votes
3

answer
599

views

Android: Retain values of previous activity

I have a main activity in which there is a spinner and a button. Spinner contains four items: Item 1, Item 2, Item 3, Item 4. When this activity is loaded, by default Item 1 is selected. On the click of the button, new activity (activity2) is called like this: Intent intent = new Intent(getApplicat...
Daniel
1

votes
2

answer
2k

views

How to make matplotlib.pyplot subplots that overlap?

I am learning how to use subplots. For example: import numpy import matplotlib.pyplot as plt plt.figure(1) plt.subplot(221) plt.subplot(222) plt.subplot(223) plt.show() plt.close(1) I am getting 3 subplots in figure1 Now I want to make a large subplot with the other subplots within the first one. I...
daniel
2

votes
3

answer
28

views

How to get 2 different numbers from a RNG that is being called to multiple times [duplicate]

This question already has an answer here: rand() returns same values when called within a single function 5 answers I am calling to a random number generator function twice and theoretically should be getting 2 random numbers each time but instead I am being given the same number both times. I have...
Daniel Gibson
1

votes
1

answer
270

views

Disable word based suggestion in Visual Studio Code

I want to disable word based suggestion, it's annoying and useless in my opinion. For example Brackets will offer suggestion for variables, methods and language and will not pollute the suggestion list with all similar words written in file. I just want code suggestion. I tried 'editor.wordBasedSug...
Daniel
1

votes
1

answer
909

views

How to animate the color of a RaisedButton in Flutter?

I have a RaisedButton. I want to animate it's color from green to red, and vice versa, every time the user clicks it. How this could be done?
Daniel Oliveira
1

votes
3

answer
83

views

TypeScript: “TypedArray” interface for Typed Arrays

How do I tell TypeScript that given parameter contains one of the Typed Arrays? It is not uncommon to have the ability to choose the type of Typed Array that best suits your needs (for instance the Flatbush library does this). I want to check if what is passed into the constructor indeed identifies...
daniel.sedlacek
1

votes
4

answer
52

views

Constructor Jeans cannot apply given types

I'm working in CodeHS, and I get this error: constructor Jeans in class Jeans cannot be applied to given types; I've looked, but I can't find how to solve this issue. I've tried using just one of the parameters from the superclass, then all of them, then all plus one I created. The jeans have to be...
Daniel Barfuss
1

votes
2

answer
72

views

Can I use deprecated classes?

Will using deprecated classes cause severe problems to the program? What is the meaning of deprecated? Can I still work with deprecated classes? An example for it is the ProgressDialog view in Android. It deprecated from API 26 and the replacement is the ProgressBar view. What happens if I will stil...
Daniel Reyhanian
1

votes
2

answer
313

views

Validate schema programmatically using hibernate

In mose projects the way to run your java app with schema validation is with that configuration (when using spring): spring.jpa.hibernate.ddl-auto=validate I ran into a problem that I need to validate my schema at a specific times during running, is there any way to implement that? I saw that hibern...
Daniel Taub
1

votes
2

answer
67

views

Regular expression: extract string between two characters/strings

I have a model formula (as string) and want to extract the value for a specific argument, id in my case. Now I have found a way that returns the string without the needed string value. I want exactly the opposite, I only want the string value that is missing in my result: xx [1] 'gee(formula = brea...
Daniel
1

votes
1

answer
74

views

pandas performance: columns selection

I've observed today that selecting two or more columns of Data frame may be much slower than selecting only one. If I use loc, or iloc to choose more than one column and I use list to pass column names or indexes, then performance drops 100 times in comparison to single column or many column select...
Daniel R
1

votes
2

answer
56

views

Amend a commit on upstream master without force push to master

Let's say I $ git log and get something like this - fix(login): can login # I want to amend this commit msg - bleh - feat(login): facebook oauth I can do... git checkout -b fix/history git rebase -i # use reword to amend a non-previous commit git push origin fix/history While the diff for this PR is...
Daniel Lizik
1

votes
3

answer
50

views

How to create an array without knowing how many values will be store?

In C# I'm storing values in an array. So to create this array I'm using this code, 'int[] values = new int[10];' But, what if I need more than 10 values, or in the case I never know how many values I will have. Could be 1, 10 or 100. I understand the idea that I need to let the compiler know how b...
Daniel
2

votes
1

answer
18

views

How can I extract whole documents based on how they compare with their whole collection?

I'm trying to extract the latest available daily measurements from a 'sparse' collection that might not have a measurement for every day. I'm interested in getting the whole original document as output. The collection contains several series of measurements identified by a unique id. For example,...
Daniel Beaudry
1

votes
2

answer
84

views

How do I specify that a list property's contents are xml serialized, but the property itself should not be respresented in the markup?

I've got a class like this: [XmlRoot('channel')] public class Channel { [XmlElement('title')] public String Title { get; set; } [WhatElseGoesHere] [XmlArrayItem('item')] public List Items { get; set; } } My desired output is this: The title {item content} {item content}
Daniel Schaffer
1

votes
3

answer
1.7k

views

Programmatically halt -webkit-overflow-scrolling

I have a phonegap application that uses iOS native scrolling through -webkit-overflow-scrolling in a div. I want to be able to manually halt an ongoing scroll when the user clicks a button (to scroll back to the top of the page). Is this doable?
Daniel Maly
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

View additional