title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
C++ Newton Raphson method is slower than bisection?
<p><br> My task is to find the root of a function with both the Newton Raphson and the bisection method within an error margin of 10E-7. The point of all that is, that we learn that the Newton Raphson method is faster and more effective. Now for some reason I come to the opposite result. Although I am aware that the in...
3
1,238
IPv6 Network Programming without IPv6?
<p>OK, so I have started doing some socket programming, I am trying to simultaneously learn how to do things using the standard BSD implementation and also how that translates into the Winsock API on Windows. I am setting my self up a Winsock utility library header that can be included in future projects that incorpora...
3
1,206
how to get which computer (IP and Name) accessed the file in Shared Folder in C#
<p>How to get which computer (IP and Name) accessed the file in Shared Folder in C#, My code it should fetching my system IP address and system name while file accessed by another system, How to get which computer (IP and Name) accessed the file.</p> <p>Monitor network shared folder</p> <p>I am trying to monitor a netw...
3
3,734
Print full text from a textarea
<p>I'm printing a form. The problem I have is when the text of the textarea field is large, when printing it does not print the whole text. I have the following code, to create the form and print:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-co...
3
1,994
How do I force a FloatLayout to keep the same dimensions as the image inside it when window size changes using Kivy?
<p>I have an image of a chessboard added to a FloatLayout. The chessboard resizes just fine, but the layout always shows beyond the borders of the chessboard image. The background of the FloatLayout is green so I can see it.</p> <p>The app opens with window maximized &amp; no matter how I adjust the layout with size_hi...
3
1,381
Props not passing down to a component
<p>I am trying to pass a state function <code>setMyChoice</code> as a prop to a <code>GamePlay</code> component in a rock paper scissors Nextjs application so as to produce a value for comparison. In the gameplay component, I am passing a prop to a component <code>PlayButtons</code> as shown below. In the <code>PlayBu...
3
2,934
Scala: Converting Iterator to RDD
<p>Input : <code>MyRDD.collect()</code></p> <pre><code>Array[(String, List[Int])] = Array((4,List(97, 99, 101, 102, 103)), (8,List(97, 98, 99, 102, 103, 104)), (19,List(97, 98, 102)), (15,List(97, 99, 101)) </code></pre> <p>Output: </p> <pre><code>Array[(String, List[Int])] = Array((4,List(97, 99, 101, 102, 103)), (...
3
3,565
How do I dynamically update the fields of a document?
<p>I'm building a basic crud app for storing movie/tv titles. I am using version 2.4.4 of elasticsearch because my project manager chose this version. I am using the express framework along with the native elasticsearch nodejs driver.</p> <p>Currently this is what my mappings look like for the "titles" index for a "t...
3
1,329
ScrollView with ViewPager can't scroll xml file in that ViewPager
<p>I have a ScrollView in that I have a ViewPager with a PagerSlidingTabStrip. In the ViewPager I have a xml file which contains some TextViews with long texts in it. The problem is that the scrollview don't scroll to the end where the last TextViews are of the second xml file are.</p> <p>First xml with viewPager:</p...
3
3,105
How to convert vertical data to horizontal dynamically without using Cursor or Pivot
<p>Currently I am trying to convert vertical data structure to horizontal data dynamically by implementing a cursor in the stored procedure. However, the execution time takes too long. I am trying to find a way to optimise this approach. What is the better way to use other than Cursor? Note: PIVOT cant be used because ...
3
1,894
access webservice from .net ,throws error
<p>When accessing a cgi web service ,it throws the error [there is an error in xml document(] this error happens only If the return paramater is an array of objects</p> <p>how to resolve this?</p> <p>------------execption details--------------- System.InvalidOperationException was unhandled Message="There is an er...
3
1,274
Can you read a float from a stream bytes via pipelines?
<p>Currently working on making a pipeline among two files in java and I would to transmit a float via stream bytes. However I don't know how I can receive it and convert it into a float. Here is what I have done so far:</p> <p>(3 files)</p> <p><strong>Consumi.java:</strong></p> <pre><code>package tryout5_stream_bytes; ...
3
1,461
How to add to an already existing array in chrome storage?
<p>I'm working with chrome storage for the first time and am having a hard time adding data to an already existing array. I'm attempting to save die roll values so that the keys in the stored object are die types (4, 6, 8, etc.) and the values are arrays of die rolls. </p> <p>Here's my code: </p> <pre><code>let stor...
3
1,199
ActiveModel::MissingAttributeError: missing attribute: project_id when calling to_json
<p>I wrote a below query class, which is throwing a missing attribute error which I didn't put in the select method anywhere. Any idea from where this error might be coming? Why <code>project_id</code> is being searched in the <code>to_json</code> method.</p> <pre><code>class WorkitemPriceResearchPresenter def initia...
3
1,796
Unable to build android studio project cannot access zzbcc class file for com.google.android.gms.internal.zzbcc not found
<p>Everything was fine building but recently in on week time, now the project is not building, </p> <p>cannot access zzbcc class file error is related to maps maybe as it occurs on Add marker method for google map code i have used in my project</p> <p>This is my current gradle build file</p> <pre><code>buildscript {...
3
1,565
Chaining Multiple CSS Animations on SVG in Infinite Loop
<p>I have two animated svg's, with two separate animations. I would like to chain them (and maybe more in the future) — infinite on one element. I would prefer CSS only.</p> <p>I have tried to chain them like this question <a href="https://stackoverflow.com/questions/33004919/chaining-multiple-css-animations">Chaining...
3
3,132
Vega-Lite : stroke color value from data?
<p>In Vega it is possible to take a color value from data, like that : <a href="https://vega.github.io/editor/#/url/vega/N4KABGBEAkDODGALApgWwIaQFxUQFzwAdYsB6UgN2QHN0A6agSz0QFcAjOxge1IRQyUa6SgBY6AK1jcAdpAA04KAHdGAExbYwAVgAMuxREgpG1fFoBM+w1ELo1axjOpbtipZDXo8mHAG0lCFAIEKgZdFRkLUgfdgAbKJtQyAp0ONZkWC0A0NDgSAAPLQMoAE9LEsg49...
3
1,612
Card Positioning in IE 11 is different then Firefox
<p>I'am trying to build responsive website using Materialized framework. I am having issue where my card positioning is not correct in IE. However, It is working fine in Firefox. I am not sure where the problem is occuring. My assumption is something related to the margin I've set to Auto.</p> <p>I've tried to correct...
3
1,522
Jquery Datatables breaks when using on same page with Data List
<p>I am using Jquery datatables on the same page with a data list. Both are populated server side. The datatables works great if I place the code above the data list. However, when placed below the data list, the datatables loses it's formatting/style and throws an error "Uncaught TypeError: Cannot read property 'mData...
3
2,023
Macro to find xlsm workbooks in given folders/sub folders based on criteria, then check a value in each workbook
<p>I'm trying to create a macro that lists all the files in a given folder (and its sub folders) which match criteria for filename (in my example "<em>job checklist</em>") and type (in my example "*.xlsm"). since all the workbooks of this type and naming convention in my search folder are of the same type, i need to o...
3
1,085
How to call post request using application/x-www-form-urlencoded which having following parameters in swift 4
<p><a href="https://i.stack.imgur.com/ku8Um.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ku8Um.png" alt="postman body screen shot" /></a><a href="https://i.stack.imgur.com/ZrTMT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZrTMT.png" alt="Postman header screen shot" /></a>I w...
3
2,015
Enter key triggers jquery .on function for different field
<p>When the enter key is used on the input type=text field, the defined jquery .on function is triggered for the input type=image field within the table. Both those fields are within the same form, however they don't use the same class. Is there a way to prevent the enter key from triggering on the input type=image's f...
3
1,091
Moving navigation drawer items to right
<p>I need your help please help me. I have a navigation drawer in my app. i want to move navigation drawer to right completely . I moved the navigation itself but i want to move menu items to right too.</p> <p><a href="https://i.stack.imgur.com/D0QUJ.png" rel="nofollow noreferrer">My Screenshot of Navigation Drawer</a...
3
1,414
Add custom objects to a keras model while building it
<p>I would like to use a custom accuracy function. I would prefer to add the custom object to the model when creating it (not saving the model and loading it again to add the object).</p> <p>I first load the following libraries:</p> <pre><code>import pickle import numpy as np import matplotlib.pyplot as plt from sklear...
3
1,077
How can I stop this canvas animation drawing new particles after 5 seconds and restart it from zero particles on click?
<p>I would like to stop drawing new particles after 5 seconds and restart drawing on click anywhere.</p> <p>Here is the code <a href="https://codepen.io/Jeremboo/pen/ENVaMY" rel="nofollow noreferrer">https://codepen.io/Jeremboo/pen/ENVaMY</a> for the animation.</p> <p>Right now it keeps on drawing until you click on ...
3
1,502
EDGE laggy in showing keyboard input
<p>The code below, when executed by edge shows a lot of input lag. Steps to reproduce:</p> <ol> <li>copy paste the snippit in a local html file. It will not be reproducable from the snippit editor in stackoverflow. </li> <li>open it with edge </li> <li>make sure auto fill form fields are ON in edge settings/advanced ....
3
5,131
I have filled every field but still showing SQLSTATE[HY000] in user table in laravel why?
<p>I have filled every required field in users table but still getting that error:</p> <pre><code>SQLSTATE[HY000]: General error: 1364 Field 'profession' doesn't have a default value (SQL: insert into `users` (`name`, `email`, `password`, `updated_at`, `created_at`) values (Tushar Saha, test@email.com, $2y$10$LDoHlFMH...
3
1,795
How can I run code from a string?
<p>I have a textbox in my program. In the textbox you can write the name of function/method you want to run as well as pass parameters. This is all parsed and via a big switch block if my case is filled I the code for that specific case, as well as passing the parameters. </p> <p>But what I really want to do is to <st...
3
1,266
communication between dash and another thread using a queue
<p>I've written a program that periodically receives and processes geographic data. I'd like to plot the (latitude, longitude) pairs that are generated by that program in a <code>dash</code> app providing a <code>plotly</code> <code>Scattergeo</code> plot, more or less as the data comes in.</p> <p>Here's a MWE of a tw...
3
1,538
Hibernate keeps creating tables for my enums
<p>I have two differents enums that are in two differents tables (they have the same structure, but different meanings).</p> <p>This is my first table called TYPE, from FIRST_SCHEMA</p> <pre><code>id team desc days 1 "AB" "Do Thins" 2 2 "CD" "Other things" 3 </code></pre> <p>...
3
1,084
OMNeT++ make error in macOS (Catalina 10.15.5) for installation
<p>I tried to compile source for OMNeT++ 5.6.2 in my computer (macOS Catalina 10.15.5). </p> <p>But make some error during "make" command.</p> <p>I don't know why occurs this error. I think the error is probably from "Qtenv" or "QT". </p> <p>I also deleted "Command Line Tools" and reinstalled it, but the error still...
3
2,791
Java Serialization - readbObject works, but operations on the read object do not work
<p>So I've created a program that can create / store / and manipulate tests and surveys. I serialize the objects created, save, load and utilize them. </p> <p>So far, everything with the serialization works, however when I try to load Test / Survey Objects, I can't, for instance, print the questions and possible answe...
3
1,724
MySQL INNER JOIN query to get client information having at least 10 rentals
<p>I am trying to query the code, name, and the number of rentals of customers who have made at least ten rentals.</p> <p>My query:</p> <pre><code>Select client.ClientCode, client.ClientNom, (location.LocationRef) FROM client INNER JOIN location ON client.ClientCode = location.ClientCode WHERE location.LocationRef &g...
3
1,032
Ajax & JS: how to keep a dropdown open during an ajax refresh
<p>I have a chat in a web page having its components refreshed in ajax. I have a userlist and when clicking on the name of a user, a number of actions appear in a drop down.</p> <p>but, when the userlist is being refreshed in ajax, it automatically closes the drop down. Giving only 1.5s max to the user to click on the ...
3
2,014
Making an ASP.NET MVC polynomial root finder
<p>So I've just been experimenting with ASP.NET MVC and I'm really starting to like the way everything has one single purpose (as far as the separation of purpose between the models, views and controllers) but I'm still having some trouble applying my basic knowledge to a somewhat practical purpose.</p> <p>So, I was t...
3
1,880
Pass form to controller
<p>Im trying to use Stripe card Element Example. When I pass the form just receive by $_POST the TokenId. I need to pass all the information of the form. The form works and looks very well , but when I send the form in index.js in the last function stripeTokenHandler(token). the form does not seem to be there. I've ...
3
4,879
Adding a filter seems to produce more results
<p>Weird situation involving adding filters to an existing bool query. </p> <p>This query here, brings up exactly one result, one from the "pages" index. The "documents" index, predictably on our side, has zilch for results for this query. </p> <p>This makes sense. This version of the query works just fine. </p> <p...
3
3,055
SAS GRAPH: align axis for 2 plots with lattice rows
<p>I'm really struggling myself with this problem, I really can't find a solution and I hope that, posting here, someone will help.</p> <p>The problem is that with this 2-lattice-rows template I can't align the axis. </p> <p><a href="https://i.stack.imgur.com/yDjSK.gif" rel="nofollow noreferrer"><img src="https://i.s...
3
7,640
How to add Control to Control from another thread, without Invoke?
<p>I created an app which uses plugins. Plugin contains ToolStrip which I want to add to main ToolStrip Container Panel (in Form1 class). This is easy <code>container.TopToolStripPanel.Controls.Add(plugin.PluginToolStrip;</code>, but if I want to run plugins code in separated thread, then it's not as easy. (I use multi...
3
1,238
JAX-WS service cannot talk to another
<p>We have a JAX-WS servce on one node of our WebSphere 8.5.5 box, and it needs to talk to a JAX-WS service on another node on the same box. It's been doing this in WebSpere 7 for months.</p> <p>Yet suddenly, it won't. I wish I could say that ONLY the server version changed, but no, lots of code changed. But that c...
3
1,465
jqgrid not loaded in ui kindly help me
<p>Hello first time i used jqgrid but data not loaded in UI</p> <p>*<strong><em>html file:</em>*</strong></p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;hea...
3
1,737
Why bidirectional LSTM doesn't converge training multivariate data sequence?
<p>I am training a multivariate data sequence as follows.</p> <pre><code>[[ x x x x x x x] [ x x x x x x x] [ x x x x x x x] [ x x x x x x x]] [ x x x x x x x] [[ x x x x x x x] [ x x x x x x x] [ x x x x x x x] [ x x x x x x x]] [ x x x x x x x] </code></pre> <p>BiLSTM has four steps time sequence and predicts t...
3
1,916
Yii2 execute controller and show view from package in vendor
<p>In my case I am trying to execute <code>slide(controller)/index(action)</code> and render the corresponding view ( <code>index</code> ). They are both in my vendor folder like this way:</p> <pre><code>vendor/ tomaivanovtomov/ yii2-revolution/ controllers/ models/ views/ ...
3
1,808
signalR global hub start connection in a view and use it in a partial view MVC
<p>I have start a connection with hub in a view and make it global for use the some connection in a partial view. But in a partial view the method is connection from hub and send the message, but is not received in other cliente. When I tired global variable and start again the hub connection in partial view, the messa...
3
1,328
Calling a function and having it call multiple times
<p>I'm having an issue in PyQt5 where if I some of my functions, it calls it however many times I've called it so far. I'll try to water down to relevant code. </p> <pre><code>class MainWindow(QtWidgets.QMainWindow, UI.MainUI.Ui_MainWindow): """The Main Window where everything happens""" def __init__(self, pa...
3
1,289
Error message shown to user when invalid credentials
<p>right now I'm trying to make an error message shown to the user if the login credentials are wrong and I just can't get it to work. I use node.js and SQLite for my database. I tried fetching, importing, and exporting but nothing worked. I won't share my front-end code because nothing in there works.</p> <p>Here's my...
3
1,898
Postgresql Numeric precision error on window function
<p>This is my query</p> <p><strong>Example 1</strong></p> <pre><code>SELECT sum(percent::numeric)::numeric FROM ( SELECT (amount::numeric * 100::numeric) / sum(amount::numeric) OVER (PARTITION BY a, b, c)::numeric as percent FROM ( values ('a', 'b', 'c', 1, '609639'::numeric) ...
3
1,486
Calling api when button is clicked
<p>Hello everyone i am trying to make an app which returns the result from an api into my text view which is in my activity right now i just click on the button and the onclick listener should start working but the problem is that it is not returning anything here is the code:- package com.example.youtubehub;</p> <pre>...
3
1,284
Python 2.7 - Print a pyramid made of letters with given amount of layers
<p>My question is almost the same as <a href="https://stackoverflow.com/questions/58845247/python-pyramid-of-letters">Python - Pyramid of letters</a>. I want the same output as in that question, a pyramid made of letters. The desired output:</p> <pre><code> a aba abcba ...
3
2,047
zoo::rollapply window with over column values rather than rows
<pre class="lang-r prettyprint-override"><code>dat = structure(list(index = c(10505L, 10506L, 10511L, 10539L, 10542L, 10579L, 10642L, 11008L, 11012L, 13011L, 13110L, 13116L, 13118L, 13156L, 13259L, 13273L, 13313L, 13365L, 13380L, 13382L, 13445L, 13453L, 13482L, 13483L, 13494L, 13543L, 13550L, 14462L, 14464L, 14564L...
3
1,054
React / Sails.js Error: Plugin/Preset files are not allowed to export objects, only functions
<p>So I´m trying to set up a React/Sails project and I just set the webpack config but its messing with the pluging/preset error.</p> <p>The versions are correct (above 7.*). I´ve already read a lot of similar issues but none of them helped me.</p> <p>ERROR in ./assets/src/index.js Module build failed (from ./node_mo...
3
1,437
Android collapsing toolbar like Google play games app
<p>I'm trying to add a collapsing toolbar in my application like Google play games application. Please help me to implement this.</p> <p>Here is my layout code:</p> <pre><code>&lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.andr...
3
1,423
How to upgrade multiple file of database in magento 2
<p>I am not able to update upgrade schema file.</p> <p>I want to update database using upgrade schema file that i have already updated.</p> <p>In my module i have a database table which is created using install schema file. </p> <p>This is my UpgradeSchema file</p> <pre><code>&lt;?php namespace Mageplaza\HelloWorld...
3
1,170
Cannot step into MEX function
<p><strong>Question:</strong></p> <p>I cannot step into my MEX function. What am I doing wrong? The obvious answer is the <code>SEGSEGV</code> and <code>SIGUSR1</code> but it would be good to get an insight on why that is. Atleast for the <code>SIGUSR1</code> </p> <p>Environment - x86_64 linux Software - Matlab ...
3
1,495
Qt5: serial port signal-slots mechanism signal connect to the wrong slot
<p>I was confused about qt signal-slot. I used the following connect, but it connect to another slot.</p> <pre><code> void MainWindow::on_otpburndata1Btn_Rd_clicked() { if(serialPort-&gt;clear(serialPort-&gt;AllDirections)){ QByteArray otpburndata1ord; otpburndata1ord.resize(3); otpburndat...
3
1,190
Reshaping EPA wind speed & direction data with dcast in R
<p>I am trying to convert long format wind data into wide format. Both wind speed and wind direction are listed within the Parameter.Name column. These values need to be cast by both Local.Site.Name, and Date.Local variables. </p> <p>If there are multiple observations per unique Local.Site.Name + Date.Local row, then ...
3
1,820
R data.table: set row equal to previous row within range
<p>I am trying to clean up a dataset of crime data by giving it better categorical labels. A sample of the table looks like this: </p> <pre><code>d &lt;- as.data.table(read.csv('[filepath]')) print(d) Classifications ucr_ncic_code SOVEREIGNTY NA Treason 101 Treason Misprison 102 Espiona...
3
1,285
trouble using lm function regression using R
<pre><code> No Issuer LR1 LR2 LR3 LR4 LR5 DR1 1 CompanyA 1.41470 1.32430 -0.16422 139.30633 8.49702 0.85071 2 CompanyB 1.44627 0.42427 0.40415 8.77173 6.66632 0.53576 3 CompanyC 1.54267 1.52505 0.81449 261.21500 35.86433 0.53681 4 CompanyD 3.64603 2.70640 2.32230 107.339...
3
1,099
How to create as many nested loops as you want?
<p>I am trying to create a program that can take many numbers as I want in C++ language. Then it find what operators can make the equation true and show all correct possible operation. Example: If I put 3 5 15 Then it output 3x5 = 15 If I put 1 2 3 4 4 Then it outputs 1+2-3+4 =4 </p> <p>The following code is my writt...
3
1,351
Boost.Tests where is entry point?
<p>I'm using JetBrain's CLion and try to run some boost tests, but they won't. Here's my code:</p> <pre><code>#define BOOST_TEST_MAIN 1 #define BOOST_TEST_MODULE ! #include &lt;boost/test/unit_test.hpp&gt; #include &lt;iostream&gt; BOOST_AUTO_TEST_CASE(MyTest) { BOOST_CHECK(false); } int main() { std::cout ...
3
1,543
OpenGL weird results when applying normals to quads
<p>I'm having an issue with ligthing on my white walls, as you can see:</p> <p><img src="https://i.stack.imgur.com/UqjcN.png" alt="enter image description here"></p> <p>The following is the code I use to produce a piece of wall, I used these to make the whole building. I just made a cube for simpler coordinates, adde...
3
1,941
react native redux: how do I update a specific value in a slice
<p>Here's my redux configuration:</p> <p><strong>userSlice.js</strong></p> <pre><code>import { createSlice } from &quot;@reduxjs/toolkit&quot;; const initialState = { name: &quot;&quot;, email: &quot;&quot;, avatar: &quot;&quot;, id: &quot;&quot;, }; export const userSlice = createSlice({ name: &quot;user&...
3
1,409
Can very deeply nesting React routing be simplified by duplicating routes?
<p>I'm using React router v4. I'm building a basic &quot;profile&quot; feature.</p> <p>The main structure is the following one : I got a profile list table ( /catalog-view/profils ) Inside this same page, the user can create a profile by clicking a button.</p> <p>So the user clicks on that button, the routing is changi...
3
1,430
How to use grep function to separate multiple column with common name in R?
<p>For the following data set, I would like to separate columns with <code>beta1</code> only. </p> <pre><code>mydata beta1_C1 beta2_C2 beta1_C2 beta2_C1 beta3_C1 beta4_C2 beta4_C1 beta21_C1 beta21_C2 beta10_C1 [1,] 1 9 17 25 33 41 49 57 65 ...
3
1,164
Docker seems to be killed before my shutdown-script is executed when my is VM preempted on GCE
<p>I want to implement a <code>shutdown-script</code> that would be called when my VM is going to be preempted on Google Compute Engine. That VM is used to run dockers containers that execute long running batches, so I send them a signal to make them gracefully exit.</p> <p>That shutting-down script is working well wh...
3
1,396
Where is my POST() data going
<p>I'm developing a regular form in html using Jquery Ajax and PHP. </p> <p>When i send the email via php function mail, i'm receiving the next email with the empty fields and I don't know why:</p> <pre><code>From: E-Mail: Message: </code></pre> <p>The code I'm using: </p> <p>-PHP (sendMail.php):</p> <pre><code>...
3
1,618
Ruby, How to generate JSON format?
<p>I need to send an input in the below format to an API, I'm running into problems producing the desired format which is below.</p> <blockquote> <p>{ "application" : "{\"attributes\":{\"type\":\"genesis__Applications__c\"},\"genesis__Days_Convention__c\":\"ACTUAL/ACTUAL\", \"RecordTypeID\":\"012260000004RHF\",<b...
3
1,123
how to see what attribute is giving me this error: value too long for type character varying(255)
<p>I'm trying to deploy my rails app with heroku. I ran <code>heroku run rake db:migrate</code> and that worked fine. Then I tried running <code>heroku run rake db:seed</code> and I got this error: <code>value too long for type character varying(255)</code>. </p> <p>I looked through my code and I'm pretty sure that...
3
11,941
Codeigniter how to get an id from current selected record
<p>I have this <strong>package</strong> table:</p> <pre><code>+----+--------------+ | id | package_name | +----+--------------+ | 1 | simple | | 2 | elegant | +----+--------------+ </code></pre> <p>and this <strong>brochure</strong> table:</p> <pre><code>+----+------------+-------------+ | id | package_...
3
1,242
Some fields in a Formik form are not updating
<p>I have a special <code>TextField</code> wrapper for a Material-UI field that seems to be working well. For some reason when I use native Material UI fields, they do not update the form data upon submission.</p> <p>Here is the relevant code (but I've added a code sandbox at the end of the post to help demonstrate the...
3
1,960
Python/Pandas: Create column in appended file based on Excel cell
<p>I appended information from several Excel files into a single data frame. Each Excel file has the same structure but corresponds to a different city. The city name is always located in the same cell (C2). </p> <p>How can I extract the city name in each file so that it appears as a column for the corresponding rows ...
3
1,286
Can tidymodels deal with the retransformation problem?
<p>I was getting acquainted with <code>tidymodels</code> by reading the <a href="https://www.tmwr.org/performance.html" rel="nofollow noreferrer">book</a> and this line in section 9.2 kept me thinking about retransformation.</p> <blockquote> <p>It is best practice to analyze the predictions on the transformed scale (if...
3
1,940
Microsoft Power BI DAX - Convert a table with a range of integer values in two columns, into a new table with a row for each value in the range
<p>I have a situation in which I am using Microsoft Power BI. I have a source table (called Couriers), with a range of weights (MinWeight to MaxWeight) for any given combination of Courier and Country, along with the Freight value.</p> <p><a href="https://i.stack.imgur.com/plXBd.gif" rel="nofollow noreferrer"><img src=...
3
1,179
Django datetimefield not showing datetimepicker widget for new inline form rows
<p>In regards to the image below, when I click "add entry", the new entry row no longer has the datetimepicker widget. Which is odd because it has the right class. The +1 field represents the django form auto-added additional field. Which seems to work fine. It's only the fields that are added after the page has render...
3
2,502
fetching item with specific id from database using axios.get
<p>Hello can anyone please help me identify what is the error here: I keep getting this error in the console:</p> <p>xhr.js:178 GET http://localhost:3000/update/5f6b4ae1d9cde357c8500069 404 (Not Found)</p> <pre><code>import React, { useState, useContext, useEffect } from &quot;react&quot;; import UserContext from &quot...
3
1,316
How to generate dummy variables based on multiple if criteria
<p>I need to generate a few dummy variables in R and would like your input on this.</p> <p>In the dataset, there are 10 observations per participant and each participant is allocated to one of the four treatments (1,2,3,4). The choice is to select either "1" or "2" in 10 tasks (taskno). Below are the observations.</p>...
3
1,459
Error In C File Handling
<p>I am making a quiz program in c for a school project.I was storing question and answers in a text file.The text file contains 1 question and followed by 4 choices and a correct answer(each in a new line) and so on.The code for file handling is</p> <pre><code>#include&lt;stdio.h&gt; #include&lt;conio.h&gt; #include...
3
1,278
C: writing the following code into functions
<p>Dear respected programmers. Please could you help me (again) on how to put the following code into functions for my program. I have read on-line and understand how functions work but when I do it myself it all goes pear shaped/wrong(I am such a noob). Please could you help with how to for example to write the code ...
3
1,161
Serial communication read not working at all time
<p>I am writing a c++ application for half duplex communication to download data from a device. Following is the class i am using for serial communication.</p> <pre><code>class CSerialCommHelper { HANDLE m_pPortHandle; //Handle to the COM port HANDLE m_hReadThread; //Handle to the Read thr...
3
1,112
Error with inlined profile form save in django admin
<p>I really confised, because problem sounds trivial, but I didn't googled anything related to this. I found one very simular question <a href="https://stackoverflow.com/questions/56465018/django-admin-create-form-inline-onetoone">Django Admin Create Form Inline OneToOne</a> but in my case I cannot remove signal, it'll...
3
1,652
Function algebra for adding or multiplying several python functions and packaging parameters in a single vector
<p>I am trying to construct a more complex function from the sum and product of multiple simple functions. I want to create a class where I can add a new simple function and its operation to construct a complex function then evaluate the complex function. </p> <p>For example say I have the functions:</p> <pre class="...
3
1,146
Plone, Archetypes: Change a TextField from text/plain to text/html
<p>I have a family of Plone sites which use Archetypes-based contents.</p> <p>I have some <code>TextField</code>s which need to be changed from <code>text/plain</code> to <code>text/html</code>; say, the schema snipped</p> <pre><code>TextField( name='summary', default='', read_permission=Access_cont...
3
2,114
Struggling to convert JSON string in Javascript to JSON
<p>So I'm making a hybrid mobile application using angular and I have this string that comes from a $http.jsonp request. The response that I receive I'm trying to turn in to JSON. I've checked the JSON request at <a href="https://jsonformatter.curiousconcept.com/" rel="nofollow">https://jsonformatter.curiousconcept.com...
3
1,358
Memory Leak in JdbcRowSet
<p>I try to populate a JdbcRowSet with records from a large table (some ten thousand records). I tried two variations (see code below):</p> <ol> <li>Create a connection object, Instantiate using JdbcRowSetImpl(connection), execute the query in a loop.</li> <li>Instantiate using JdbcRowSetImpl(DriverManager.getConnecti...
3
1,292
How to update dataframe after read the uploaded file using streamlit and python
<p>i want to read file by using <code>file_uploader</code> than i have a function that allow user to update the data in the <strong>uploaded file</strong> than it <strong>save the file</strong> on the desktop after that it <strong>reopen the saved file</strong> and display the updated data.</p> <p>What i want is to ove...
3
1,492
On top how to display Another layout in android
<p>Hi in the below code On top of that want to add one more layout .but I don't no how to add and where to add can any one help me with the issue. What I am expecting is background name with boreder_square that background want to display between above and below of the layouts</p> <p><a href="https://i.stack.imgur.com/i...
3
4,098
Access by browser works ok ,while PHPUnit fails
<p>I am using symfony2.8 ,FOSUserBundle and PHPUnit 5.7</p> <p>I can access /login by browser.</p> <p>However PHPUnit fail.</p> <p>So I just dump the $client->getResponse() of PHPUnit </p> <pre><code>$client = static::createClient(); $crawlerLogin = $client-&gt;request('GET', '/login'); print $client-&gt;getRespon...
3
1,204
How to add a calculated member based on group / subgroups
<p><em>Hi, i have a new challenge for MDX. i defined this mdx:</em></p> <pre><code>WITH MEMBER [Measures].[SubGroupID] AS [Dim Customer].[Customer SubGroup ID].CurrentMember.Member_Caption MEMBER [Measures].[MainGroupID] AS [Dim Customer].[Customer MainGroup ID].CurrentMember.Member_Caption SELECT ...
3
1,269
How can I speed my Entity Framework code?
<p>My SQL and Entity Framework knowledge is a somewhat limited. In one Entity Framework (4) application, I notice it takes forever (about 2 minutes) to complete one of my method calls. The first queries do not take much time, but when I loop through the Entity Framework objects returned by the queries, even though I am...
3
1,622
load more button with vuex ,axios and json server
<p>I am practice for using Vuex and Axios . I get API using Json server to simulate backend. I found a problem in how to send page number in axios.get params as variable .</p> <p>when press in loadMore button I got this error</p> <p><strong>the error :</strong> Uncaught DOMException: Failed to execute 'getRangeAt' on...
3
1,449
Multiple univariate Cox regression with tbl_uvregression() function from {gtsummary}
<p><strong>I can not find how to perform multiple univariate Cox regression with tbl_uvregression() function from {gtsummary}.</strong></p> <p>Here is were I am so far :</p> <ul> <li>performed multiple univariate logistic regression, with:</li> </ul> <pre><code>tbl_uvregression(dataSOF, method = glm, y = death, method....
3
1,749
Is it possible to group a stringified table that has a column with multiline using regex?
<p>My goal is to parse this string into a table. My first thought of solution is regular expression. However, I found it to be challenging.</p> <p>The string:</p> <pre><code> 01/07 SALDO AWAL ...
3
2,658
mxnet - long GPU initialization time
<p>A follow-up of this question: <a href="https://stackoverflow.com/questions/57260730/mxnet-slow-array-copy-to-gpu/57261108">Mxnet - slow array copy to GPU</a></p> <p>Question: mxnet GPU initialization takes around 20 seconds. How can I fix it?</p> <p>I have the following code:</p> <pre><code>import mxnet as mx imp...
3
1,731
check if flutter future function works?
<p>hello iam new to flutter and i want to do a register function when the sign up button is pressed but i need to make sure that the function is sucssessfull so here is this code and i want to figure out whether i can check if the future function works if it does ill move to another screen id it don't ill show an error...
3
5,518
create a updating word cloud using vega
<p>I am creating a word cloud using a array of strings with the help of vega.js, while adding texts one by one i want to update my word cloud.My code is given bellow. The wordCloud is drawing only for the first text string. For the next strings it gives this error at the browser console. "view.data is undefined" Can so...
3
7,216
Shiny ggvis reactive plot
<p>I'd like to make <code>Shiny app</code>, which plots cumstom graphs on the parameters i choose using <code>ggvis</code> package.</p> <p>If I choose All brands, I'd like to get this plot:</p> <p><a href="https://i.stack.imgur.com/ENIop.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ENIop.png" al...
3
1,257
A particular way of resizing a matrix
<p>Having a <em>nxn</em> (<em>6x6</em> in the example below) matrix filled only with 0 and 1:</p> <pre><code>old_matrix=[[0,0,0,1,1,0], [1,1,1,1,0,0], [0,0,1,0,0,0], [1,0,0,0,0,1], [0,1,1,1,1,0], [1,0,0,1,1,0]] </code></pre> <p>I want to resize it in a parti...
3
1,093
Android application activity unable to start componentinfo
<p>much of the code comes from <a href="https://stackoverflow.com/questions/15051204/download-image-and-display-it">Download image and display it</a>, so I was surprised when it didn't work. I've searched all around and cannot figure it out</p> <p>here's the "mainactivity".java in this case called LleUrlEnter.java</p>...
3
4,159
Cannot set adapter in onComplete method Facebook SDK, ANDROID
<p><strong>I cannot set an adapter to my GridView called "lista". This is my Activity:</strong></p> <pre><code>public class ListaAmigos extends Activity { private String TAG = "ListaAmigos"; protected static Context context; private GridView lista; @Override public void onCreate(Bundle savedInstanceState) { supe...
3
2,002
My perl replace dash pattern wipes out all file contents
<p>In my code below I am trying to replace the pattern of &quot;---- ------&quot; with the corresponding number of spaces. When I run the code, all the file contents are wiped out. I cannot figure out why. I have the sample text below where the replacements are to be done. I would appreciate assistance.</p> <pre class=...
3
1,270