title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How do I pass data from jList to database(mySQL) | <p>I need some help regarding my program. How do I pass data from JList into database?</p>
<p>In ItemDetails.java, I have passed the checkbox value into a JList in another JForm. Now I want to retrieve the data from JList into my database.</p>
<p>ItemDetails.java</p>
<pre><code> private void jButtonNextActionPerf... | 3 | 2,001 |
Java IllegalArgumentException: MONTH | <p>When I am trying to save an entity into the DB I get the following error and I don't where the mistake could be. I am using only LocalDate. I have an example of entity below.</p>
<pre><code>java.lang.IllegalArgumentException: MONTH
at java.base/java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2645) ~[n... | 3 | 2,404 |
Can I define a regular polyline function in one line?(2)y=-x,y=x | <p>(ref)</p>
<p><a href="https://stackoverflow.com/questions/71308739/can-i-define-a-regular-polyline-function-in-one-line">Can I define a regular polyline function in one line?(1)y=x,y=0</a></p>
<p>(question)</p>
<p><a href="https://i.stack.imgur.com/D9BcG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur... | 3 | 1,729 |
Use interceptor for components in shared modules | <p>I am using Angular's new interceptor feature within "app.module" and all components in my app are successfully using it:</p>
<pre><code>import { ProgressInterceptor } from "./progress.interceptor";
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: ProgressInterceptor, multi: true }
]
</code></pre>
<p>Ho... | 3 | 2,496 |
Spring Batch - Custom Job - Dynamically Passing Partition FileName | <p>I am trying to build a spring batch application where the batch job is built dynamically (not spring managed beans) and launched using JobLauncher. The job is built based on source file and few other information like target store etc... Based on these details I have to build a Job with corresponding reader/writer. <... | 3 | 1,274 |
Clojure : parse a XML, remove head and tail lines first | <p>I come today with a problem I cannot solve.</p>
<p><strong>Context</strong></p>
<p>I have a catalog with this kind of input :</p>
<pre><code><catalogue>
<produit>
<nom>mince</nom>
<sku>25</sku>
<criterias>
<criteria>65</criteria>
<... | 3 | 1,776 |
Reload Entire Core Data Object Rather than Add Specific Data | <p>I am very new to iOS. I am completely new to Core Data. I am taking over the code base of a project from my professor's former grad students. </p>
<p>When my app fetches an image from its database, the path to the img is this:</p>
<pre><code>/Users/matt/Library/Developer/CoreSimulator/Devices/DA58E774-84BE-48F6-B5... | 3 | 1,150 |
Which is the best way to perform this query? Maybe UNION | <p>I have these four tables described bellow. Basically I have feeds with entries relationed with categories, and each category can be a main category or not (flag named as "principal").
Also each feed can be a partner feed or not (flag named as "parceiro").</p>
<p>I want to select all feed entries from partrners feed... | 3 | 1,134 |
How to force excel to open text in webbrowser? | <p>I have to perform alot of searches in Google, so I made a Excel document that simply inserts the text into the google link:</p>
<p>"John" AND “Soccer” OR “Sport”</p>
<p>"Andre" AND “Soccer” OR “Sport”</p>
<p>For example in have the name "John"in cell A1 and I insert it in the following link.</p>
<blockquote>
<... | 3 | 1,024 |
FOSUserBundle discriminator mapping registration | <p>I have a class <strong>User</strong> and two children-classes <strong>Prestataire</strong> and <strong>Membre</strong>.
I've made a mapping discrimination.</p>
<p>Class User.php</p>
<pre><code>namespace Annuaire\AnnuaireBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use DateTime;
use Doctrine\Common\Co... | 3 | 1,083 |
Google Charts with different Json files | <p>With all the different ways to write a Json file, I wanted to learn more about how to write them and how to use them in a Google Chart.</p>
<p>First I started with making and using the following Json:</p>
<pre><code>[
{
"Voetballer" : "Christiano Ronaldo",
"Jaar_2010" : 79000000.00,
"Jaar_2011" : 79700000.00... | 3 | 2,879 |
How can I know if the cursor in textarea is still active? | <p>Here is my jsFiddle: <a href="http://jsfiddle.net/7NdHM/3/" rel="nofollow">http://jsfiddle.net/7NdHM/3/</a></p>
<p>When the label is click on it shrinks the size of the text to leave space to see what is being written. Also when a user clicks outside the input region the text goes back to the original size. All of ... | 3 | 1,767 |
How can I write WiX XSLT which merges components | <p>I have a .wxs file which looks like this:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Directory>
<Directory Id="d1">
<Component Id="c1" ...>
&l... | 3 | 1,207 |
Modelica web colors | <p>I thought it might be convenient to define some colors as constants to use later on in Modelica color annotations. As it seems the web colors are an accepted standard, I copied all of them into a package of constant arrays:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Web_colors" rel="nofollow noreferrer">htt... | 3 | 1,428 |
Symfony notifier attach custom metadata to envelope | <p>I'm using the Symfony notifier and messenger components to asynchronously send SMS messages (and in the future push and email notifications).</p>
<p>Everything works just fine, however once a message is sent, I'd like to log information about it.</p>
<p>I can catch a successful message by subscribing to <code>Worker... | 3 | 2,752 |
Jmeter doesn't work in other environment though it works local | <p>Hi I had configure a .jmx to work with a thread group that does a simple http request.</p>
<p>It works perfectly locally, but when I upload the .jmx to another server in amazon it doesn't work.</p>
<p>Differences between local machine and ec2 server:
<strong>local:</strong></p>
<p>is ubuntu when jmeter was instal... | 3 | 1,234 |
Mysql query where condition with or in php | <p>Hi all i am trying to fetch duedate for particular course when i assigned a course so i have 3 types of table where i can assign course to user in those 3 tables i have userid column same so in my course table it has to satisfy the condition but its not working nw if i gave only one condition is working </p>
<p>Her... | 3 | 1,807 |
How can I launch a fragment from a Broadcast Receiver? | <p>How can I launch my a particular fragment within an activity from my Parse Broadcast Receiver? When a user receives a notification I want them to open immediately to Fragment B of Activity A, for example. Is this possible? I feel like I should be able to force a fragment change from Activity A in its onCreate method... | 3 | 1,053 |
How to amend LDAP connection properties in LDAPCertStore for X509 cert chain validation | <p>I'm trying to validate X509 certificate chain using sun.security.validator.PKIXValidator according to <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/certpath/CertPathProgGuide.html" rel="nofollow noreferrer">Oracle official guide</a>. One of the steps in validation is to check CRLs. I'm prov... | 3 | 1,171 |
JAXB - A message body writer for Java class was not found | <p>I am trying to interrogate a rest service, and I need to put some data.</p>
<p>The code I want to use to make the call is the following:</p>
<pre><code>WebResource resource = this.client.resource(url);
DocumentIndexFields myDocumentIndexFields = (DocumentIndexFields) resource.type(MediaType.APPLICATION_XML_TYPE).p... | 3 | 1,322 |
PHP curl request on remote images taking forever, what can I do to improve my code? | <p>Here is the code I have, I cannot work out what is causing the delays?</p>
<p>To load the remote URL it doesn't take more than a second, should I pass a user_agent?</p>
<p>Please excuse if this is a stupid question, I'm new to PHP, would it be worth setting a timeout as part of the curl request?</p>
<pre><code>&l... | 3 | 1,910 |
Buttons aren't shown in the LinearLayout | <p>I want that it looks so (this is a screenshot from the Graphical Layout editor):</p>
<p><a href="https://i.stack.imgur.com/DjXGY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DjXGY.png" alt="enter image description here"></a></p>
<p>So I created the layout:</p>
<pre><code><?xml version="1.... | 3 | 1,041 |
cublas device api outputs weird result | <p>everyone:
Recently I have tried to utilize the most recent property of cuda 5.5 to program, i.e., dynamic parallelism. But I have some very confusing problem. My code is here:</p>
<pre><code> /* Includes, system */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#inclu... | 3 | 1,972 |
PHP Email Function sending a blank body message with subject & sender email | <p>I am trying to make a quote forum that sends the input to an email. I have PHP sending the email, displaying the subject and the senders email, but it doesn't display the main body of content in the email that is sent.. here is my code:</p>
<pre><code> <?php
$action=$_REQUEST['action'];
if ($action=="") /... | 3 | 2,532 |
Android: Unable to navigate from one fragment to another | <p><a href="https://i.stack.imgur.com/n5kEQ.png" rel="nofollow noreferrer">This is the login screen, which leads to the next screen(Chat Screen)</a></p>
<p><a href="https://i.stack.imgur.com/i2LIy.png" rel="nofollow noreferrer">This is the Chat Screen- which I am unable to navigate to</a></p>
<p>I am trying to implem... | 3 | 5,218 |
Executing azcopy sync command through python concurrent.futures | <p>I am trying to sync almost 1000 azure storage containers from one storage account to another using <code>azcopy sync</code> command. Since the number of containers is more, I wrote a python script to run azcopy command concurrently. Execution works fine. I also want to generate a CSV report at the end of the run. Bu... | 3 | 1,887 |
Replace blocks of text with perl regex with conditional | <p>I have a perl script that does some regex replacements on a text file, which I need to modify along the following lines: (a) I need to process the text as blocks of text, and then, depending on the presence/absence of one line different replacements need to be done. (b) I need to add text to the end of each block.
... | 3 | 1,879 |
JSX Unexpected token - Webpack and babel-loader | <p>I'm getting JSX parse error after upgrading <strong>webpack</strong> from <code>^1.14.0</code> to <code>"^3.0.0"</code></p>
<pre><code>ERROR in ./shared/Application.js
Module parse failed: /Users/arjunkumar/Documents/Work/test/web/shared/Application.js Unexpected token (25:2)
You may need an appropriate loader to h... | 3 | 2,243 |
Get-ChildItem not listing files on Win Server 2003 but works fine on XP | <p>I am trying to return a list of files based on a filter of cash_st_export*.txt but it doesn't work! If I run gci *.dll on an XP workstation in the default Powershell working directory it works fine.</p>
<pre><code>PS C:\Program Files\iNovah 2 [Test]\WebServices\iNovah2WebService\ExportFiles>
gci cash_st_expor... | 3 | 1,352 |
How to correctly handle the "AttributeError: module 'matplotlib.pyplot' has no attribute 'clear'" when trying to release memory? python related | <p>I'm currently backtesting a trading strategy with around 286 trading pairs, and at the end of the loop I'm saving the plots with the backtest results in a particular path before repeating the process with the next trading pair.</p>
<p>The thing is, I realized that my memory available starts increasing as the number ... | 3 | 1,125 |
Recursively extract key paths from array - excluding numeric keys | <p>In php, I need a function to return all keys in array of objects. For arrays and objects I need keys like <code>parentkey->key</code>. If the key is again an array, then I need <code>parentkey->key->key1</code>.</p>
<p><strong>My code as below</strong></p>
<pre><code>$array=json_decode('{"client"... | 3 | 2,915 |
Foreach loop with json data laravel | <p>I want to make a table in html with json data using laravel excel, the data looks like this</p>
<pre><code>4 => {
+"id": 5
+"date": "2020-1-3"
+"grade": "7"
+"nama": "["bryan","anderson"]"
+"status&q... | 3 | 1,113 |
Jetpack Compose inside Fragment ViewTreeLifecycleOwner not found from ConstraintLayout | <p>I'm getting <code>IllegalStateException</code> error while using Compose in my fragment.</p>
<blockquote>
<p>java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from
androidx.constraintlayout.widget.ConstraintLayout</p>
</blockquote>
<p>The activity is AppCompatActivity:</p>
<pre><code>class MainActivi... | 3 | 1,114 |
How to Create Tables Automatically in Code First Approach using PostgreSql | <p>I am trying to create the tables using code first approach with postgresql database. My DB context is below.While doing migration i am getting the below error.
<strong>Cannot use table 'AspNetRoles' for entity type 'AspNetRole' since it is being used for entity type 'IdentityRole' and there is no relationship betwee... | 3 | 5,226 |
Why does Xcode 8.1 + Metal. crash the Timer I use to manipulate my 3D model? | <p>I have an arcball manipulator that uses a <code>Timer</code> to create a smoothly decelerating attenuation of the current rotation angle. It has been working just fine in my <code>GL</code> app. In <code>Metal</code>, it crashes the app.</p>
<p>Here is how I instantiate the timer:</p>
<pre><code>rotationTimer = Ti... | 3 | 1,966 |
Ember-Cli, Rails and Torii Session 400 Bad Request | <p>I am new to ember-cli, currently I am having trouble with oauth2 with LinkedIn, the server side is rails. This is also my first question so please let me know if there's any other information needed or if it's too verbose. When i attempt to sign in I get the linkedin popup but then get the following error:</p>
<p... | 3 | 2,402 |
Design : multiple visits per patient | <p><img src="https://i.stack.imgur.com/DHepv.jpg" alt="enter image description here"></p>
<p>Above is my schema. What you can't see in tblPatientVisits is the foreign key from <code>tblPatient</code>, which is <code>patientid</code>.</p>
<p><code>tblPatient</code> contains a distinct copies of each patient in the da... | 3 | 1,059 |
SerialPort doesn't actually open the VirtualCOM port | <p>I have a microcontroller hooked up via USB CDC/ACM to the PC. When I try to open the port with an app I'm trying to make that uses SerialPort, I see nothing on the microcontroller. I can easily set break points in the micro and watch the port open/write/read/close events get triggered when using RealTerm, TeraTerm... | 3 | 2,251 |
How to infer correct type when returning `payload is T` in typescript? | <p>I have a type guard check function that does tells JavaScript that a value is a promise or not, and at the same time it tells TypeScript that the variable is a promise:</p>
<pre><code>function getType (payload: any): string {
return Object.prototype.toString.call(payload).slice(8, -1)
}
function isPromise (p... | 3 | 1,670 |
Laravel Eloquent concat and groupBy() AND return one title of each group | <p>I have a table that contains, amongst other columns, a column of browser versions. And I simply want to know from the record-set, how many of each type of browser there are.</p>
<p>my code is :</p>
<pre class="lang-php prettyprint-override"><code>$whereBrowser = [['owner', '=', 12]];
$browser = ProfileTracke... | 3 | 1,652 |
collect <select><option> values with Scrapy | <p>I pretend crawl every item in of the drop-down list in the top of this page: <a href="https://www.anmp.pt/anmp/pro/mun1/mun101w3.php?cod=M2200" rel="nofollow noreferrer">https://www.anmp.pt/anmp/pro/mun1/mun101w3.php?cod=M2200</a> with Scrapy framework.
Then for every item found I get a new page, where I get some m... | 3 | 1,027 |
How to declare a variadic template function *instance* as a friend | <p>My issue <em>extends</em> this one: <a href="https://stackoverflow.com/questions/21793092/how-to-declare-a-variadic-template-function-as-a-friend">How to declare a variadic template function as a friend?</a></p>
<p>I know how to make a template variadic function a friend of a class
for <em>all</em> instantiations o... | 3 | 2,468 |
Example of a chain of referents, referrers | <p>Working further with the <a href="https://pypi.python.org/pypi/dill" rel="nofollow noreferrer">Dill package</a>. Posted yesterday exemplifying some <a href="https://stackoverflow.com/questions/25651491/referrers-referents-parents-and-children">ignorance of referents, referrers, inheritance and containers</a>. The an... | 3 | 1,202 |
hover effect not working after Jquery | <p>I am currently making a website for an architecture firm, HLArchitects.
In the projects page I have created an HTML / Javascript image gallery.
When you hover over a smaller thumbnail the opacity changes from 0.5 to 1.
It can be viewed here for reference: <a href="http://www.hla.co.za/projects/Hyuandai_Training_Cen... | 3 | 1,285 |
Having trouble with Binary Search Static method cannot be referenced | <p>The problem I face is understanding how to utilize the <code>binary search</code> to search a given <code>array</code>(movies) for a user input title? I have a feel for the search itself but don't understand how to use the return value to display the title if found or not found.</p>
<p>The chuck of code that follo... | 3 | 1,279 |
How to add await in a for loop to wait for function call? | <p>im a beginner in Javascript / Nodejs.</p>
<p>i want to read a folder, and then each by each call a function with await...</p>
<p>I have a Folder, inside that folder i have Images.
with readdir i get all Folder Images with extension.</p>
<p>with that code i read the folder and split the ImageName and the .png, so i h... | 3 | 1,044 |
Parsing data with e.parameters | <p>I'm receiving the data from the JavaScript client in the format of:</p>
<pre class="lang-golang prettyprint-override"><code>type ContactDetails struct {
Email string
Subject string
Message string
Color1 []string
Color2 []string
}
</code></pre>
<p>The data had been sent from the <code>PostForm... | 3 | 3,788 |
Efficiently use Eigen for repeated sparse matrix assembly in nonlinear finite element code | <p>I am trying to use Eigen to efficiently assemble a Stiffness matrix for non-linear finite element computations.</p>
<p>From my finite element discretization I can exactly extract my sparsity pattern. Therefore I can just use:</p>
<pre><code>mat.reserve(nnz);
mat.setFromTriplets(TripletList.begin(), TripletList.end... | 3 | 4,821 |
Error: ReferenceError: getUnreadEmails is not defined | <p>please when I call the method getNumberOfUnreadEmails in the App.js i have this error :
YellowBox.js:67 Possible Unhandled Promise Rejection (id: 0):
Error: ReferenceError: getUnreadEmails is not defined
Error: ReferenceError: getUnreadEmails is not defined
at blob:<a href="http://localhost:8081/16f9ab34-0ee8-4... | 3 | 1,628 |
Pagination in Python and Django | <p>I'm a newbie in Python development. I want to pagination my page in Django. I create a dropdown list for user choose number items want display in view. Ex: When i choose '10' in dropdown list and click submit button then the view display 10 items, but when I click 'next' or 'previous' button then the view display 25... | 3 | 1,529 |
JQ query output in csv format | <p>I have been trying to extract a csv from the below json file using jq but not able to get so far. Does any experts out here can help?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-overri... | 3 | 1,282 |
Configuring a docker container to use host UID and generate files on the host system - Preferably at runtime | <p>I am currently working on a research tool that is supposed to be containerized using docker to hopefully be run on as many different systems as possible. This works fine for the most part, we have run into a permission problem because of the workflow though: The tool takes an input file (which we mount into the cont... | 3 | 1,224 |
how to accelerate c++ for loop code into query using MySQL | <p>code of c++ sub function</p>
<h1>insert data into MySQL</h1>
<pre><code>bool mysqlinsert2(int sourceindex,int targetindex,string source,string target)
{
MYSQL *conn_ptr;
conn_ptr = mysql_init(NULL);
if(!conn_ptr)
{
fprintf(stderr,"mysql_init failed\n");
... | 3 | 1,302 |
xslt - Firefox error when use analyze-strong | <p>I try use analyze-string but in Firefox I get error some like </p>
<blockquote>
<p>"firefox An error occurred during XSLT transformation: XSLT
transformation failed."</p>
</blockquote>
<p>source file XML:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XML><?xml-stylesheet type=... | 3 | 2,699 |
How to select the correct id for the specific button pressed in dynamic table | <p>I'm relatively new to jquery and cannot for the life of me get this to return the proper youtube id it just always returns the first one in the table.</p>
<p>php.
I load the youtube id from my database then display it in the table.</p>
<pre><code>require_once 'library/Zend/Loader.php';
Zend_Loader::loadClass('Zend... | 3 | 1,150 |
Global list mutation inside function in Python | <p>I am working on a backtracking solution for this problem - "Given a string s, partition s such that every substring of the partition is a palindrome."</p>
<p>I have written this code where I am not able to get <strong>how is the global 2D list strings is getting updated?</strong> What exactly is happening here? I t... | 3 | 1,370 |
Why does reading of this stream from a binary file stop at the 0x1A character? | <p>I have found that 0x1A is Substitute but I am not sure what that means and why stream reading stops. Also I would of course like to know how to fix the problem.</p>
<p>To start with, I generate the binary file using this code:</p>
<pre><code>unsigned char bytes[] = {
0xA1, 0x58, 0x02, 0x01, 0x03, 0x02, 0x01,... | 3 | 1,782 |
Creating XML RSS from Oracle | <p>What I'm trying to do is create a stored procedure that will generate an xml that looks like the following.</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<rss xmlns:georss="http://www.georss.org/georss" version="2.0">
<rowset>
<row>
<title>myTitle</titl... | 3 | 1,427 |
android.osnetworkonmainthreadexception even if I have AsyncTask | <p>I had followed this tutorial to implement crud php mysql android application
but when I excecuted the android project and I click on one item from the list of products
I have this error : </p>
<pre><code>android.osNetworkOnMainthreadException
</code></pre>
<p>here is the asynctask doinbackground : </p>
<pre><co... | 3 | 1,344 |
redmi device restarting when trying to put creadentials in entry control in xamarin forms app | <p>I am getting an issue with Entry field on a particular device (Xiaomi Note7 Pro) that is when I try to put value in the entry field it will cause restart the MIUI of device (Xiaomi Note7 Pro). I have done some digging but did not find any solution yet. Please help me out with this issue.</p>
<p>I have tried to chang... | 3 | 2,362 |
Trying to implement Durand-Kerner-Method in C++ using Matrices | <p>My implementation of the Durand-Kerner-Method (<a href="https://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method</a>) does not seem to work. I believe (see following code) that I am not calculating new approximation correctly in ... | 3 | 1,221 |
Split XML file into multiple files using XSLT | <p>I am having trouble splitting an XML file into multiple files using XSLT.</p>
<p>I've tried splitting the file based on the attached XSLT code. I've succeeded in getting the file to split. However, I haven't been able to figure out how to replicate the file and create one for each in the original file.</p>
<pre... | 3 | 13,031 |
view scrolls down to tabhost when fragment opened | <p>When I open fragment with scrollview and tabhost inside the scrollview, it automatically scrolls down to the start of the tabhost hiding the top part of the scrollview. I've tried changing various things, nothing worked so far. Will keep trying, just throwing this here in hopes someone can help me. Here is the relev... | 3 | 1,929 |
Google map and PHP, SQL | <p>I want to link my json result to the google map. I have a <code>imei_number</code> in the database which is the password of the user. Once the user enter the right password(<code>imei_number</code> in the database), the system will select the longitude and latitude of the <code>imei_number</code> selected and later ... | 3 | 1,439 |
Getting error in output text box | <pre><code><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="js1/jquery.mobile-1.4.3.css" type="text/c... | 3 | 5,230 |
Laravel index route issue when using for a subsection in another fw (external public dir) | <p>I'm using a Laravel app with an external public directory, e.g. <code>root/Laravel</code>, and <code>root/html/public</code>.</p>
<p>I need this app to load from a require on a php file (<code>root/html/this-section.php</code>) that already has another framework loading it, hence that other fw has its own head, and... | 3 | 1,520 |
Django: Spelling Mismatch Despite not being written | <p>There's a perplexing issue that I cannot resolve.
<br>
The <code>models.py</code> has : </p>
<pre><code>class Meetings(models.Model):
team_id = models.ForeignKey( Team )
meeting_id = models.AutoField( primary_key = True )
mentor_meeting_rating = models.IntegerFie... | 3 | 1,184 |
Button click doesn't stop triggering | <p>I have a button in an ASP page that I click to save some data to an SQL server. It works as intended, except that any time the page reloads (when doing other things) it triggers the submission again of that button. The result is duplicate records in the database. I realize I could probably validate for duplicates, b... | 3 | 1,050 |
SOAP envelopes to the sharepoint webservice to manage to upload a file | <p>I have to send SOAP envelopes to the sharepoint webservice to manage to upload a file to the sharepoint. But I don't want to use C# code.</p>
<p>I use the webservice copy (_vti_bin/copy.aspx).</p>
<p>I send the envelope with the header SOAPAction <a href="http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems"... | 3 | 1,170 |
Using Spirit qi::success callbacks to set fields after a rule match | <p>I am trying to use <code>qi::on_success</code> callback (<a href="https://stackoverflow.com/a/51254774/2987773">here</a>) to set a field when a rule is matched. The code below is slightly adapted from this <a href="https://stackoverflow.com/a/62970956/2987773">code</a> though my slight changes to the rules/ast class... | 3 | 2,293 |
Unexpected results for 'finding the digits' problem using recursion in Common Lisp | <p>The "<em>finding the digits</em> problem" is this:</p>
<pre><code>Find unique decimal digits A, B, C such that
CCC
+ BBB
+ AAA
= CAAB
</code></pre>
<p>To solve it using recursion in Common Lisp, I've written this code:</p>
<pre class="lang-lisp prettyprint-override"><code>(defun find! ()
(... | 3 | 1,096 |
change logo scrolling navbar - materialize? | <p>I hope someone can help me, I would like the scroll of the navbar to change the image of the logo. </p>
<p>I am a novice but stubborn I tried online to look for something similar but for my purpose, I could not find anything.</p>
<p>I just want to change the logo image on the scroll.</p>
<p><div class="snippet" d... | 3 | 1,994 |
How to filter an array of json with jq in linux? | <p>I have the following JSON input:</p>
<pre><code>{
"paging": {
"count": 0,
"total": 0,
"offset": 0,
"max": 0
},
"executions": [
{
"id": 5,
"href": "https://localhost.com.br",
"per... | 3 | 1,277 |
My projectile system not working, what's wrong with it, how can I fix it? | <p>I'm making an asteroid shooter system, that can shoot projectiles where the player is facing, however, when you shoot (press space), the projectile does not move.</p>
<p>I've tried to add cosine and sine to the X and Y, but that obviously doesn't work. I tried adding print statements to see where it went wrong and i... | 3 | 1,678 |
Setting an array value to null | <p>I am trying to change a value of an array to null.</p>
<p>I have an array called card[100].
In this array I have I have 100 cards stored. Each card hold two int values and a string value: </p>
<pre><code>public Card(int manaCost, int damageDone, java.lang.String name) {
</code></pre>
<p>Every array index has been... | 3 | 2,612 |
Google apps script impossible to convert undefined in class | <p>hi i'm not really into js but tried to run this script:</p>
<pre><code>function doGet(e){
var op = e.parameter.action;
var
ss=SpreadsheetApp.openByUrl("xxxxx");
var sheet = ss.getSheetByName("Catalogati 2018");
if(op=="insert")
return insert_value(e,sheet);
//Make sure you are sending proper par... | 3 | 1,415 |
Parse a json string from url and store it in empty string | <p>Im trying to parse a json string that is exist in a online server and store in an empty string like this <code>String data = "";</code> but when i try to parse it and i see the log i see that the response from the server show all the json code (brackets and quotes and jsonobject) when i only need it to parse one spe... | 3 | 5,233 |
Changing the Visibility of Elements in a RecyclerView Row OnClick | <p>I have the following app I'm working on, where I am trying to make it so whenever an image in the RecyclerView is clicked, its two corresponding buttons from the row xml will become visible (they are invisible by default).</p>
<p>Here's my code...</p>
<p>MainAcitivity.Java</p>
<pre><code> package com.mdadi.ani... | 3 | 2,707 |
Python/jython join two lists in list of lists with condition | <p>I have a text file that was used for fortran and the line limit on the text file is limited to 80 characters. I am attempting to parse it in python.</p>
<p>There are characteristic tables for different projects and within those tables there are tables of tables. Different sites may have all or none of the data sho... | 3 | 2,128 |
Thread ending, ends the entire program? | <p>The following loop is inside the main of the program. It accepts an incoming connection, and has a thread do work with it.</p>
<p>The problem is, as soon as any thread terminates, it terminates the entire program. Here's the code:</p>
<pre><code>#include <sys/socket.h>
#include <sys/types.h>
#include &... | 3 | 1,718 |
trying to get div to float next to another div | <p>I have two divs featureText and skillsText one right after the other, I am trying to get the second one to float right of the next one instead of stacking, I have tried position relative on the second one with float left to no avail, the container itself is positioned relative. When I inspect the first div it shows ... | 3 | 1,690 |
WKWebView not able to recognize the text returned by JavaScript | <p>I am using a WKWebView in my iOS app to display an HTML string. Now I need to let my app capture the word being tapped in the HTML page. I have a piece of jQuery code embedded in the HTML to capture the word and then redirect the page to a fake URL including this word. And in the WKWebView's WKNavigationDelegate met... | 3 | 1,410 |
Drop-down values | <p>I got two php files the Add.php and Edit.php</p>
<p>In Add.php. A drop-down list of date and gender. </p>
<pre><code> <tr>
<td width="400" id="caption" style="text-align:right;">Birthdate</td>
<td>
<select id="monthID" name="month">
<option value="1">January<... | 3 | 3,249 |
cleaning data within groups in R | <p>I have data from survey that comes with typos, missing data and others. I need to populate/clean data within groups, considering that if there is any valid value (making sure there is just one valid value) for the variable within the group, it should replace the other values in variable in same group. See below my m... | 3 | 2,568 |
i made the gui program for a calculator but i want to show a confirm messgae in java if the value in the textfield is a string | <pre><code>public class x extends JFrame implements ActionListener {
JFrame calc;
JPanel holder;
JTextField zzz;
JLabel updating;
JButton a, s, m, d, c;
float input, ans;
String lol, n;
boolean f = true;
JOptionPane p;
public x() {
ans = 0;
calc = new JFrame(&quo... | 3 | 1,466 |
How to add sheet to excel when called inside a function? | <p>I have written a code in python that calls stock market data from an API, performs some functions and puts the results in an excel sheet. the only problem is whenever I call this function, it overwrites the new data on the existing sheet instead of creating a new sheet and entering the data into that. The function l... | 3 | 1,358 |
Limiting number of Job Posts under <Li> tags Collected through Selenium Web Scraping | <p>I am currently working on a web scraping script to pull job posting data from LinkedIn. I have managed to get nearly everything to work except for a way to limit the number of job posts to be included in my final data frame. I am trying to find a way to include something like a while or if statement to set a specifi... | 3 | 1,505 |
pq: insert or update on table violates foreign key constraint gorm | <p>I have three tables: AnaData, AnaStepData, and AnaStepInputData. Here are the model mappings for these tables:</p>
<pre><code>type AnaData struct {
ID string `gorm:"primary_key;column:ana_ins_id" validate:"max=36"`
Name string `gorm:&quo... | 3 | 1,111 |
am I using boolean wrong? | <p>I'm trying to get a button to load a class and set a boolean then when the button is clicked again it loads another class..etc. I don't think it's setting MODE to false after it's done, is something wrong with my code?</p>
<pre><code> Button button = findViewById(R.id.button);
button.setOnClickListene... | 3 | 1,307 |
Make PHP code with MySQL work with MsSQL | <p>We have had a project developed by a group of students as part of their masters degree final project. The overall solution turned out to work great, unfortunately it was developed for MySQL database and we are using a MsSQL Server databases. </p>
<p>I have been trying to work out a wait to make it work but I am not... | 3 | 3,388 |
Issues with SQL Server functions and triggers | <p>I have been working on this project by using "advanced" features of SQL Server and creating functions, triggers, but two of these are giving me serious issues.</p>
<p>I am supposed to create a function that includes one input parameter and returns a table. The function itself will return a summary of the individual... | 3 | 1,583 |
Using Ajax to livesearch mySql and return results hidden by jquery toggle | <p>How do i get the toggle to function in the search results? I am not sure what I need to do to get this to work. Have a MySQL db, and am using AJAX to perform live search. The search populates in table rows, and I want to hide certain rows unless user clicks "toggle". The code to toggle and populate table works on... | 3 | 5,283 |
Java Application in JFrame gets stuck after StartMenu | <p>I have made a game with 20+ classes in it and if I run the application in Eclipse it perfectly works. </p>
<p>Now if I export the game to a runnable jar, it gets stuck when I try to launch the game. But the weird thing is that my intro plays and I can continue by pressing "enter" to my menu, but if I try to start t... | 3 | 2,202 |
Reading from SQLite database causes stack overflow | <p>Can't find the problem with why the SQLite database cannot be read, it's taken me so long and I still can't figure out why trying to read from it is giving me stack Overflow, appreciate all help, thank you. </p>
<pre><code>public class DatabaseHandler extends SQLiteOpenHelper {
private static Context ctx;
//... | 3 | 3,259 |
Maven: change plugin deeper dependency version | <p>There are Maven plugins:</p>
<ul>
<li><code>org.apache.maven.plugins:maven-dependency-plugin:3.1.2</code></li>
<li><code>org.apache.maven.plugins:maven-site-plugin:3.9.1</code></li>
</ul>
<p>that indirectly use <code>commons-beanutils:commons-beanutils:jar:1.7.0</code>. According to <a href="https://maven.apache.org... | 3 | 3,846 |
Why is the sprite image not resetting to default when I'm not pressing anything in this pygame script? | <pre><code>import pygame
from config import *
from spritesheet import *
import math
class Player(pygame.sprite.Sprite):
def __init__(self, game, x, y):
self.game = game
self._layer = PLAYER_LAYER
self.groups = self.game.all_sprites
pygame.sprite.Sprite.__init__(self, self.groups)
... | 3 | 3,161 |
Socket.io emits the same message more than once on private messages | <p>I'm trying to implement private messaging between two users using socket.io, nodejs, and react. I think the private message is being emitted multiple times even though we click send once on user A side, and user B doesn't get the message until we type something on some text box on the page</p>
<p>If anyone can at le... | 3 | 3,105 |
Why am I getting this error from pyinstaller? | <p>I am trying to build a python application with pyinstaller, but I get several errors whilst doing that. Any help would be appreciated!</p>
<p>Input:</p>
<pre><code>iloveeveryone@iloveeveryone-GF63-8RD:~/Desktop/Computer science/Py code/App_folder$ pyinstaller app.py
</code></pre>
<p>Output:</p>
<pre><code>40 INFO: P... | 3 | 2,706 |
Running driver for Java Swing MVC does not show View | <p>I'm not very knowledgeable in MVC so forgive me if this is a basic question.</p>
<p>I'm currently working on a school project, and I can't seem to get the program to run properly. I've tried compiling these java files with no errors coming out. However, when I try to run the MenuDriver.java file, the GUI window/Vie... | 3 | 1,160 |
Change in string initialization induces UB | <p>Edit: Please refer to this abbreviated version of the question:</p>
<hr />
<p>Why does the definition</p>
<pre><code>char word[2];
word[0]='a';
word[1]='b';
</code></pre>
<p>introduce UB?</p>
<hr />
<p>Summary: I have written code which renders the alphabetic portion of a string. When applied to a single string, it ... | 3 | 1,462 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.