title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
In C: Proxy HTTP requests to another server
<p>I'm trying to proxy HTTP requests to another HTTP server. The hostname and port number of the upstream HTTP server, respectively, are server_proxy_hostname and server_proxy_port.</p> <p><strong>The first step</strong> is to do a DNS lookup of the server_proxy_hostname.</p> <p><strong>Secondly</strong>, I create a ...
2
1,050
MVVM with realm: Passing Realm-results across threads?
<p>Using Xcode-8.2.1, Swift-3.0.2, RealmSwift-2.2.0, iOS-Simulator-10:</p> <p>I try applying the MVVM pattern (<a href="https://www.youtube.com/watch?v=9VojuJpUuE8" rel="nofollow noreferrer">explained by Steve Scott here</a>) using Realm.</p> <p>Everything works until the moment (inside the VIEW-part - see below) whe...
2
1,762
How to center a DIV created by Javascript?
<p>Here is my code for a counter (modified from www.w3schools.com code).</p> <p>I'm struggling to horizontally center the output. I have tried to wrap in a DIV and then use the following techniques to center that DIV, but no success, any pointers appreciated:</p> <ol> <li>Using CSS to style the outside DIV with <code...
2
2,272
After form submission clear fields and provide message
<p>I have an HTML form that is using jQuery to process the form selections. The form submits and processes correctly but how do I clear the fields after submission and place a message next to the Submit button that says "Statements sent." Thank you.</p> <p><strong>HTML5</strong></p> <pre><code>&lt;!DOCTYPE html&gt; &...
2
2,871
In Leaflet, how to convert leaflet viewport bounding box in EPSG3857 so I can retrieve data stored in EPSG4326
<p>My government supplied mapping data is stored in our database with projection EPSG4326. Because all the data is stored as longitudes and latitudes, this data can be loaded and displayed in leaflet successfully and correctly, even though leaflet itself is defaulted to projection EPSG3857. It's ok to do that, as there...
2
1,214
How do I get callback on pressing device's back button?
<p>According to my requirements i need to implements tabs for my apps. Such that each tabs associated with multiple activities. Like: Tab1, Tab2, Tab3...etc. Tab1: Activity1,Activity2,Activity3....etc. I want to launch activities in such order: eg: Tab1 -> Activity1 -> Activity2. This is fine i have doen it.</p> <p>Bu...
2
2,530
Material Textfield text is displayed backwards but CupertinoTextfield text is displayed correctly Flutter
<p>I have a textfield connected to its <code>TextEditingController()</code>. Inside the <code>onChanged:</code> callback I perform a text check to only allow for time input. When running on iOS <code>CupertinoTextfield</code> is used and it behaves as expected, at every input cursor moves so next digit is at the right ...
2
2,968
Update method in generic repository does not update navigational properties
<p>I would like to know if entity framework automatically tracks changes in navigational properties for an entity and also updates those changes when the related entity is updated using SaveChanges(). I am using a generic repository, unit of work, ninject with code first entity framework 5 in MVC 4. I have a post and t...
2
3,755
Content is not allowed in prolog, but prolog is fine at run-time? Groovy, Jenkins, Java, Pipeline, XML
<p>I am trying to get the version number from an XML file in a Jenkins pipeline. However, I keep getting the following error message </p> <blockquote> <p>"org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog."</p> </blockquote> <p>I have tried encoding using a different...
2
1,788
What is classpath for Groovy Console / jdbc driver prblem?
<p>Such database code is OK in Java environment (without binded value 'c'), but in Groovy console can't properly use jdbc, with exception</p> <pre><code>java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost;databaseName= </code></pre> <p>Driver class is known for script (is loaded without nul...
2
1,491
LUA ERROR attempt to perform arithmetic on boolean value
<pre><code> ``` local xpNeed = 100; -- E.g. 100 * lvl = XP you need to rank up! addEvent("onPlayerLevelUp", true); function addPlayerXp(player, xp) local acc = getPlayerAccount(player); local oldexp = getAccountData(acc, "exp") or 0; local oldlvl = getAccountData(acc, "lvl") or 1; ...
2
1,564
Thread 1 EXC_BAD_ACCESS when loading custom UIView from .xib file
<p>I am trying to load a number of custom UIViews from a .xib file into a UIScrollView and I keep getting "Thread 1: EXC_BAD_ACCESS".</p> <p>Since it's the first time when I'm actually trying to load a custom UIView (done this many times for UICollectionView and UITableView cells), I've been following this <a href="ht...
2
1,591
How to disable button click until item selected/activated?
<p>Trying to disable button in table. and enable it only when item selected/clicked/activated</p> <p>button code </p> <pre><code>&lt;td&gt;&lt;a class="btn btn-info" ng-disabled="isDisabled"&gt;Edit&lt;/a&gt;&lt;/td&gt; </code></pre> <p>disabled bool <code>$scope.isDisabled = false;</code></p> <p>trying to ena...
2
1,120
Unable to upload file using PHP
<p>I am unable to upload files to my CentOS 7 server running httpd using php.</p> <p>I have searched all over and still cannot figure out why I am unable to upload files. :(</p> <p>Here is the form:</p> <pre><code>&lt;div class="container"&gt; &lt;div class="row"&gt; &lt;div class="col-lg-4 col-lg-offset...
2
1,194
Google App Script - Google Spreadsheets Move Row based on cell value efficiently
<p>I am trying to move rows based on cell values, the function I have written works. However when there are more than 24 rows to move the script times out. Is there any way to make the loop run faster or more efficiently, as it will always time out. </p> <p>The script reads the cell value of column 7(G) and if it m...
2
1,195
asp-for inputs not binding to ViewModel
<p>I have a simple form that uses the <code>asp-for</code> attribute. </p> <pre><code>@using System.Threading.Tasks @using MyApp.Controllers @using MyApp.Models.Login @model MyApp.Models.Login.LoginModel &lt;form asp-controller="Login" asp-action="Login" asp-route-returnUrl="@ViewBag.ReturnUrl" method="post" class="f...
2
1,448
Issue in Running Unit test using Karma for Angular Project in GitLab CI
<p>I am getting below error :</p> <ul> <li>313 $ npm run test</li> <li>314 > angular-base-line@0.0.0 test /builds/8800/IT/EAPC/base-line-project/angular</li> <li>315 > ng test</li> <li>316 30 01 2020 10:45:00.853:WARN [karma]: No captured browser, open <a href="http://localhost:9876/" rel="nofollow noreferrer">http://...
2
1,503
Parsing through CSV file to convert to JSON format file
<p>I am given the following CSV file which I extracted from an excel spreadsheet. Just to give some background information which could be of assistance, it discusses AGI Numbers (think of it as protein identifiers), unmodified peptide sequences for those protein identifiers, and then modified peptide sequences with mod...
2
1,899
Why is multithreading slower than sequential programming in my case?
<p>I'm new to multithreading and try to learn it through a simple program, which adds 1 to n and return the sum. In the sequential case, the <code>main</code> call the <code>sumFrom1</code> function twice for n = 1e5 and 2e5; in the multithreaded cases, two threads are created using <code>pthread_create</code> and two ...
2
8,467
how to add foreign key to access table using adox
<p>I am trying to creat a database with two tables. i want to add in a foreign key in one of them. but the following code is not working, i debug it and i found that the only problem is in adding the foreign key.</p> <pre><code>private static bool creatDatabase() { bool result = false; Catalog cat...
2
1,944
Django 2.0 Tutorial - Error when executing python3 manage.py makemigrations
<p>i am interested in learning Django for python. Therefore i followed their Tutorial - yet now i am stuck at the following point of the second tutorial element:</p> <p>Problem: According to the tutorial i shall run a "Database Migration" by using the following codes:</p> <pre><code>python3 manage.py makemigrations p...
2
2,024
How do I *save* the results of an angular material modal dialog?
<p>I have a component which opens a modal dialog to let the user input two dates. I would then like to save those two dates to a db model behind the component, but I am having trouble wrapping my head around when and where to obtain those results.</p> <p>To be clear: I can currently see the dialog result as two dates ...
2
1,364
Video Recording with AVCaptureSession Doesn't Save Any Video
<p>I am attempting to record video and save it to file using AVCaptureSession. I am using a singleton to handle my capture session, as there are several VCs in my app where I'm displaying a video preview. </p> <p>The video preview displays correctly, but when I attempt to record video everything appears to work and I ...
2
1,525
data-prototype not correctly rendered using nested collection form fields in a symfony2 form-type
<p>Im building a project with symfony2.2, I'm posting here because i'm having trouble with nested collection, within collection. I want to render a form, for this kind of Doctrine Entities :</p> <p><a href="http://i.stack.imgur.com/QmESP.jpg" rel="nofollow">http://i.stack.imgur.com/QmESP.jpg</a></p> <p>But here, the ...
2
2,019
How to use complex numbers with boost::multiprecision::mpfr?
<p>According to <a href="https://stackoverflow.com/a/17932632/1700939">https://stackoverflow.com/a/17932632/1700939</a>, it should be possible to use complex numbers with boost::multiprecision with gcc-4.7. This indeed works fine with boost::multiprecision::float128:</p> <pre><code>-----------test.cpp------------ #inc...
2
1,734
Pyspark save to S3
<p>I am trying to save a large file to an Amazon S3 bucket. Following code works perfectly: </p> <pre><code>sqlContext.createDataFrame([('1', '4'), ('2', '5'), ('3', '6')], ["A", "B"]).select('A').repartition(1).write \ .format("text") \ .mode("overwrite") \ .option("header", "false") \ .option("codec"...
2
1,588
AngularJS 2.0 - post data to Laravel method
<p>Let's say I built an API with Laravel that allows to index and store <strong>heroes</strong> in my database.</p> <p>This is how my store method looks like in my laravel hero controller:</p> <pre><code>public function store(Request $request) { $hero = new Hero; $hero-&gt;name = $request-&gt;nam...
2
1,835
Could not find class [org.springframework.boot.autoconfigure.condition.ConditionalOnJava$JavaVersion]
<p>i use intellij and java 1.8 for running my springboot</p> <p>i have tried to create main jar like this on my code :</p> <pre><code>@SpringBootApplication @RestController public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } ...
2
1,515
How to find out why mounting an emptyDir volume fails in Kubernetes?
<p>I have a very strange effect with a pod on Kubernetes: It tries to mount a volume of type <code>emptyDir</code>, but fails to do so. The events list of the pod brings up the following entries:</p> <pre><code>LAST SEEN FIRST SEEN COUNT NAME ...
2
2,008
Make wireshark packet readable -> JSON/octet-stream
<p>I'm trying to read a post request which got captured using wireshark. </p> <p>Now i was wondering, if there's a way to make the packet content readable, such as requests in fiddler to have readable data?</p> <p>I would appreciate any kind of suggestions.</p> <p>The captures packet(Wireshark->Follow TCP Stream):</...
2
4,165
CometD and Tomcat is not Using Long-Polling
<p>I have problems getting tomcat work with cometD and Longpolling.</p> <p>I see in firebug that all requests are in ms area although the poll should stay for at least 1 second. The Server does not respond in ms time.</p> <p>Here is what i got in firebug:</p> <pre><code>8ms dojo.j...ssed.js (Zeile 11610) POST h...
2
4,186
How to add a QMouseEvent to an EventFilter?
<p>I added an EventFilter to a QCompleter because I had the same problem as <a href="https://stackoverflow.com/q/11865129/8450121">this</a> person. </p> <p>Now I want to add a left mouse button event if an item is clicked from the PopupCompletion. I tried but I have no idea if I'm on the right track because im new to ...
2
1,098
CSS keeps disappearing with enabled BE compression Typo3 4.5.5+ and with any Windows browser?
<p>In my TYPO3 4.5.5, 4.6.8, 4.7.0 installation I've enabled the BE compression and I've added the filetype css.gzip and js.gzip to the gzip encoding however it seems to work only when I use Linux to load the backend. When I load the backend from a Windows box the backend css keeps disappearing like in this question: <...
2
2,032
What is a suitable replacement for the SQL Like operator to increase performance?
<p>I'm working on an application that runs on Windows Mobile 6 that needs to be able to retrieve all items from an item table that contain a given string (provided by the end user) within the item's description field. The problem is that there are approximately 170,000 items in the table. Since I need to return all ite...
2
1,482
opencv vs 2010 dependencies issue
<p>I am having an issue with trying to setup opencv 2.4.6 with visual studio ultimate 2010 on a 64-bit windows 8 machine. I know to add in the includes and dll references, but when I execute the code I have it shows this huge external linking error:</p> <p>code:</p> <pre><code>#include "opencv2/highgui/highgui.hpp" #...
2
1,687
Open-CV memory management in iOS (Objective-c with ARC)
<p>This might be a silly question but does ARC (automatic reference counting) interact with Open CV when programming in the iOS?</p> <p>I am asking this because I just recently started using Open CV in general. While on iOS with ARC it is not necessary to worry about objects since I only have to make sure to have no p...
2
1,536
Custom (separate) metadata form in alfresco share
<p><strong>Seemingly simple requirement</strong></p> <p>I need a form containing 4 fields (textfield, authority, and date x2), that behaves exactly as does the edit metadata form, the fields representing 4 properties on the node.</p> <p>This form however, should be available as a separate UI from the edit-metadata fo...
2
1,385
Change the Chart point color according to value - JFreeChart
<p>I have a CSV file which looks like this <a href="https://www.dropbox.com/s/lh7bb2gbenw2q8a/Electrical.csv?dl=0" rel="nofollow noreferrer">(the file can be be downloaded here)</a><br><br> <a href="https://i.stack.imgur.com/U2Oaj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U2Oaj.jpg" alt="enter ...
2
2,251
get the index of a tal:repeat in another tal:repeat function
<p>As you can see I have 3 lists: <code>Procedur_Headers</code>, <code>Diagnoses</code> and <code>List_Procedur</code>. <code>Procedur_headers</code> gives the headers of my tabels, <code>Diagnoses</code> gives the specific id of a procedure and <code>List_Procedur</code> is a list of lists (query’s) where all the dat...
2
1,893
How to save fetched rows from while loop into a new array?
<p>Let's say I have this loop in my header.php:</p> <pre><code>&lt;div id="top-20"&gt; &lt;h2 class="top-20-title"&gt;TOP 20 TEAMS&lt;/h2&gt; &lt;div class="top-20-content"&gt; &lt;?php $params = array( 'limit' =&gt; -1 // get everything ); $match...
2
1,901
How do I get multiple input values in the same directive?
<p>EDIT: Below is the working example for anyone looking. I have live validation on the promoCode with the directive that takes in 2 input values.</p> <p>Hello I'm stuck on a problem. I have 2 inputs, an email and a promo code and one directive that checks if the promo code and associated email are valid. However I am...
2
1,062
Bootstrap Carousel Toggleable / Dynamic Tabs
<p>i try to do in every tab an Picture Gallery (Home, Menu1, Menu2, Menu3) , in the first tab it works but in the other tab(Menu1) it won´t work. It start the gallery but cant switch with the selektor icons. Have anybody an idea? .</p> <p><div...
2
3,941
Firing twice when swipeleft and swiperight in jquery mobile?
<p>I am new to jQuery mobile. I am using the swipe concept for swiping multiple separate html pages. It's working correctly when I come from swipepage3 to swipepage2. swipepage2 to swipepage1 and swipepage2 to swipepage3, It's firing twice. How to fix this issue?</p> <p>Here is my code: </p> <p><strong>Swipepage1.ht...
2
2,026
Apache Virtual Host Server Alias matching using Redirect
<p>Apache 2.4.6 is hosting four domains using name based Virtual Hosts. Calls to port 80 for http are redirected to port 443. Each virtual server has two ServerAlias args for the directive to redirect calls to <a href="http://domain-example.com/" rel="nofollow noreferrer">http://domain-example.com/</a> or <a href="http...
2
2,978
Java beats C++ on recursive algorithm speed comparison on my simple test
<p>With this divide and conquer algorithm (Programming Pearls p80) to find the max sum found in any contiguous subvector of an array, the Java program is faster than the C++ counterpart tested on Win7 x64 with 8GB of RAM.</p> <p>Both of Java and C++ runs on 1 CPU core.</p> <p>What kind of optimization is done on the ...
2
2,478
DES Implementation in Java: Error during Key Generation Phase
<p>I am a student doing a mini-project - DES implementation. I had a doubt previously about converting a 64 bit key to 56 bit key, and could do that successfully, thanks to some guidance received here.</p> <p>I have divided my implementation into the key-gen phase (where I generate a new key for each of the 16 rounds)...
2
6,297
Maven Docker issue Java Spring Boot Failed to execute goal io.fabric8:docker-maven-plugin
<p>I'm trying to create a Spring-boot container, but i'm having some trouble with it:</p> <p>This is the error i'm getting on a compute-engine vm on gcloud running Debian.</p> <p>The command i ran is </p> <pre><code>maven clean install </code></pre> <p>I have tried google searching these issues, but most of the ans...
2
2,453
Google VISION API read barcode in textview
<p>I am trying to integrate Google Vision API in my code but having hard time converting value in to text view. Also the camera surface view doesn't get destroyed. </p> <p>Manifest Meta-data -</p> <pre><code>&lt;meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode...
2
1,386
MongoDB & Spring Data - Searching for a user by firstname/lastname
<p>I have the following collection:</p> <pre><code>User { firstname, lastname } </code></pre> <p>I want to search for users by firstname and/or lastname (firstname/lastname/firstname+lastname).</p> <p>What I have:</p> <pre><code> Criteria criteria = new Criteria(); criteria.orOperator(Criteria.where("firstna...
2
1,042
iPhone Image Processing--matrix convolution
<p>I am implementing a matrix convolution blur on the iPhone. The following code converts the UIImage supplied as an argument of the blur function into a CGImageRef, and then stores the RGBA values in a standard C char array. </p> <pre><code> CGImageRef imageRef = imgRef.CGImage; int width = imgRef.size.width; in...
2
2,894
What does this IIS error log mean?
<p>I'm using Debug Diagnostic Tool, trying to understand why around 5% of the requests that are sent to my webservice just crash, without necessarily throw any error inside my application.</p> <p>One of the errors this tool took is below. Can anyone here understand exactly what could be happening?</p> <p>Thanks!</p> ...
2
3,175
Git Server Setup using Apache 2.2 on Windows 7
<p></p> <p><strong>Environment</strong> Windows 7 64-bit</p> <p><strong>Software</strong> Git 2.10, Apache 2.2, Python 3.3.5, Strawberry Perl 5.24, Libgti2 0.22, Open LDAP</p> <p>Git Server setup has been done. The <code>httpdf.config</code> file from Apache 2.2 has config entry</p> <pre class="lang-none prettyprin...
2
1,380
Installed self-signed SSL certificates, Apache won't start
<p>I'm trying to build a website which requires the Stripe payment gateway, and therefore requires SSL. I'm using XAMPP on Windows 10. After generating SSL certificate and key pair and installing in Apache, Apache no longer starts.</p> <p>I'm attaching a few error messages and configs. Please help.</p> <p>This is mes...
2
1,970
Convert a Bitmap image to grayscale within BlackBerry J2Me
<p>I have been trying to use the samples from here: <BR> <a href="https://stackoverflow.com/questions/2412054/j2me-convert-transparent-png-image-to-grayscale">J2ME: Convert transparent PNG image to grayscale</a><BR> and here:<BR> <a href="http://www.java2s.com/Code/Java/Collections-Data-Structure/intarraytobytearray.ht...
2
1,521
Pyserial read bytes return garbage values from serial port
<p>in my python programme , I am using PySerial library to read the data out as bytes from serial port. But most of the bytes are garbage values. I am giving the source as well as out come of the read bytes using this python module.</p> <p>So can some please let me know (correct configuration settings) to read the cor...
2
4,064
Autofac resolve all EventHandlers of abstract base class
<p>Hi Some how I cannot find the answer to this problem: I Have event handler ala:</p> <pre><code>public class MyEvenHandler : EventHandler&lt;MyEvent&gt; </code></pre> <p>Where EventHandler is an abstract class</p> <pre><code> public abstract class EventHandler&lt;TEvent&gt; : IEventHandler&lt;TEvent&gt; where ...
2
1,048
mapred.JobClient: Error reading task output http:... when running hadoop from Cygwin on Windows OS
<p>I was running the "Generating vectors from documents" sample from the book "<strong>Mahout</strong> in Action" from <strong>Cygwin</strong> on <strong>Windows</strong>. <strong>Hadoop is started only on the local machine.</strong></p> <p>Below is my running command: </p> <p><strong>$ bin/mahout seq2sparse -i reut...
2
1,321
I got undefined reference to 'avcodec_register_all' Ffmpeg on android
<p>I am working on ffmpeg and i want to write Jni wrapper for ffmpeg to i can call decode_video method of ffmpeg avcodec class.</p> <pre><code>Swap:SwapFfmpeg swap$ ndk-build Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml Compile thumb : com_exampl...
2
1,203
Android OpenGL ES 2.0 lighting?
<p>I am new to GLES 2.0. It is really making me nervous because OpenGL ES 1 II just set GL_LIGHTNING1 and then the lighting was set. In GLES 2.0 it is not working. In fact the whole screen is black. So please tell me what should I do with the code below. These are the vertices I am setting:</p> <pre><code> stat...
2
3,116
Cypress.io how to get length of a array in a before hook, and reuse it later?
<ol> <li>My task is to enter the page, get the array length (of the <strong>&quot;a&quot;</strong> tags) and store it so I can use in in the next step. I need it once, so I do this firstly in before hook.</li> <li>Forward, I need to get the <strong>&quot;a&quot;</strong> tags and check if they have a <strong>&quot;titl...
2
1,369
run py2exe under windows 7, can not excecute file under windows XP
<p>I created a exe-file from my Python+Gtk application using py2exe. With windwos 7 it works, but I can't get it running under windwos XP. I get the following error:</p> <pre><code>Traceback (most recent call last): File "debug4iConnect.py", line 1, in &lt;module&gt; File "startApp.pyc", line 1, in &lt;module&gt; ...
2
2,343
Filter the product list with data-price attributes
<p>I am able to filter the product list on basis of store and brand in my code, but I'm not able to filter it with price range.</p> <pre><code>&lt;div id="prod"&gt; &lt;div class="content" data-brand="Andrew" data-price="1000" data-store="JCPenny"&gt;Andrew&lt;/div&gt;&lt;br /&gt; &lt;div class="content" data-...
2
2,411
Spring security concurrency-control does not work
<p>I try to implement concurrency-control in Spring security 3.2. I use form-login for auth. Here is my security.xml</p> <pre><code> &lt;beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-in...
2
2,173
How do I serve protected videos from cloudfront
<p>I'm trying to serve private video content over RTMP, accessible only through a signed url</p> <p>Here are my CloudFront distribution settings: </p> <pre><code>Origin Domain Name : ct.recorder.s3.amazonaws.com Restrict Bucket Access : Yes Origin Access Identity : Use an Existing Identity Your Identities : CT ...
2
1,083
R ggplot custom percentiles
<p><strong>For context:</strong> I'm looking at multiple different correlation coefficients.For each correlation I created a bootstrapped distribution, and I'm using the bootstrap percentile method to create to create confidence intervals for each coefficient. As I'm looking at multiple correlations, I'm actually using...
2
2,096
Singleton in Flutter gives runtime error "Unhandled Exception: Reading static variable '_instance@545324594' during its initialization"
<p>I tried to implement the MVP-Pattern in a Flutter App (Flutter version 1.12.13+hotfix8). My controller (presenter) is a singleton and looks like this:</p> <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart'; // local file imports import 'package:prototype/gui/screens/welcome/we...
2
2,890
Code Chef DSA Learning Series : Multiple of 3
<p>Consider a very long K-digit number N with digits d0, d1, ..., dK-1 (in decimal notation; d0 is the most significant and dK-1 the least significant digit). This number is so large that we can't give it to you on the input explicitly; instead, you are only given its starting digits and a way to construct the remainde...
2
1,598
Spring JPA/Hibernate @ManyToOne relationship always inserting child row
<p>I'm attempting to use Spring JPA/Hibernate to maintain a Parent table with a child table related based on an Id. If I attempt to insert the same object twice, the Parent table gets "updated" properly, but the child table is always inserted to even though the entry in the child table is already present.</p> <pre><co...
2
1,481
SOAP:fault error in WSDL definition generated by Delphi 2010
<p>I got a problem with WSDL generation in Delphi 2010. I wrote a example and copied the generated WSDL File:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IHalloWeltIntfservice" targetNamespace="http://www.micos.de...
2
1,558
lavaan - measurement Invariance
<p>I want to test for metric equivalence by gender, but i get an error.</p> <p>I have the following correlation matrix:</p> <p>(How can I obtain an output in the console that gives me a reproducible covariance/correlation matrix with the sds)?</p> <pre><code>&gt; cor(sub1, use="pairwise.complete.obs") V...
2
1,579
Parsing GeoRSS Feed with jQuery
<p>I'm attempting to use the jQuery <a href="http://plugins.jquery.com/project/jFeed" rel="nofollow noreferrer">jFeed plugin</a> for parsing an Atom, <a href="http://en.wikipedia.org/wiki/GeoRSS" rel="nofollow noreferrer">GeoRSS</a> feed and I'm running into issues extracting the information I need. For example, I need...
2
1,420
Rock, Paper, Scissors Game not keeping score correctly
<p>I'm having an issue with my rock, paper, scissors game. When I play the game it records a win or a loss as both win and a loss. I'm trying to make it so that it records a win and a loss and does not add a point to win and loss. Any suggestions?</p> <pre><code>import java.io.*; public class RPS { static Buffere...
2
1,905
C++11 g++ with brace-enclosed initializer lists
<p>I'm new to programming so I apologize if this is an obvious question, however I am having trouble with the syntax presented to me in a book (Programming Principles and Practice using C++ 2nd Edition by the creator of C++, Bjarne Stroustrup). In it, the following is presented for creating a vector of strings:</p> <...
2
1,191
Webpack file-loader serving images but not audio (mp3)
<p>I'm writing a TypeScript application using Webpack and file-loader for serving images and audio. I can't get the webpack config to work with audio files.</p> <p>Im getting <code>GET http://localhost:8080/media/d.mp3 404 (Not Found)</code></p> <p>The images work fine on the dev server and also build fine with the w...
2
1,604
Supress default browser: Java, Android studio
<p>I'm setting up a simple AI, chat functions etc. Right now, I'm working on a small web view "browser". Opens up to google by default, then has a little textedit and button for further navigation. However, whenever a link is clicked on or I try to navigate, it opens the default browser instead. I tried using some code...
2
3,853
Using variable in XQuery expressions
<p>using Xquery, how can I embed variable in an xquery expression on the following xml document. I have the following xml document </p> <pre><code>&lt;CD&gt; &lt;TITLE&gt;Picture book&lt;/TITLE&gt; &lt;ARTIST&gt;Simply Red&lt;/ARTIST&gt; &lt;COUNTRY&gt;EU&lt;/COUNTRY&gt; &lt;COMPANY&gt;...
2
1,123
base.dispose() causing Object Reference Not Set To An Instance Of An Object
<p>I have a program that I have been developing over time which has suddenly started throwing errors up when closing forms.</p> <p>Normally when you debug the software if it throws up one of these errors you get taken to the code and you can find what the issue is, however for some reason this error does show in the d...
2
1,516
"Error: /run/airflow doesn't exist. Can't create pidfile." when using systemd for Airflow webserver
<p>I have configured my Airflow setup to run with systemd according to <a href="https://github.com/apache/airflow/tree/master/scripts/systemd" rel="noreferrer">this</a>. It was great for a couple of days but it has thrown some errors that I can't figure out how to fix. Running <code>sudo systemctl start airflow-webserv...
2
1,451
html and css rocket animation
<p>I was doing the following tutorial on this video: <a href="https://www.youtube.com/watch?v=mAewuQPMFI8&amp;t=106s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=mAewuQPMFI8&amp;t=106s</a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snip...
2
1,494
How to clear text field value of an external page in jQueryMobile
<p>I have two pages index.html and external.html.In index.html i have two text field. Inserting some text in those text field and clicking on a button i goes to external.html page.This external.html page has one button linking to index.html. When in click in that button it moves me to index.html. </p> <p>Now the probl...
2
1,045
NullPointerException when creating new String
<blockquote> <p><strong>SOLUTION</strong></p> <p>I was adding a <strong>new instance</strong> of <code>A</code> to the list: <code>aList.add( new A() )</code>, whose <code>name</code> property is of course null, <strong>instead of adding the actual initialized instance</strong>. Sorry for the dumb question.</p> </block...
2
1,115
How do I use sendmessage for sending wm_timer that has timer proc in win32
<p>I have a timer, ID 1, which has a timerproc as a callback function.</p> <p>I am making the other timers (ID 2, 3, ...) in the timerproc and they use <code>WM_TIMER</code> event, not another timerproc.</p> <p>When creating window, I want to immediately generate Timer Event, ID 1.</p> <p>So I used SendMessage funct...
2
1,183
Cast to ObjectId failed for value "" at path "_id" for model
<p>I have already checked the other entries on <code>StackOverflow</code>, but it did not help.</p> <p>I am building a <code>RESTapi</code> with <code>node.js</code>, and I am using <code>MongoDB</code> with <code>mongoose</code> I have a <code>Schema</code> that contains three different models. I am able to save <cod...
2
1,290
Display Images in JFrame from JComboBox event
<p>I want to achieve following functionality :</p> <p>Eg :</p> <ul> <li>When user selects "Profile Pic"item from JComboBox releted images from "Profile Pic" folder should be loaded on same frame.</li> <li>Again when user selects "Product Img" item related images from "Product Img" folder should be loaded replacing pr...
2
2,086
Browser cannot find imported javascript package, generates error 404
<p>I'm trying to build a webpage that imports and uses a JS package, following a <a href="https://developers.livechatinc.com/docs/agent-app-widgets/#developing-your-own-widget" rel="nofollow noreferrer">tutorial</a> for LiveChat. This says to import using </p> <p><code>import LiveChat from '@livechat/agent-app-widget-...
2
1,034
Websockets in Flutter
<p>I'm trying to listen to my Laravel BackEnnd using flutter websockets. There is no documentation about the backend of such a situation and i'm not sure how to go about it. The laravel app seems to work fine when i listen on browser but not on my flutter app. <a href="https://flutter.dev/docs/cookbook/networking/web-s...
2
1,233
updating state in reducer not updating component
<p>I was trying to update my state from an api, using <a href="https://redux.js.org/docs/recipes/reducers/ImmutableUpdatePatterns.html#updating-an-item-in-an-array" rel="nofollow noreferrer">this approach</a>. So I created the following code in my reducer:</p> <pre><code>export default function(state = null, action){ ...
2
1,199
when using sendmail gmail relay, verify fail
<p>i followed steps from here <a href="http://beacon.wharton.upenn.edu/bflad/2010/10/setting-up-gmail-as-sendmail-relay" rel="nofollow">http://beacon.wharton.upenn.edu/bflad/2010/10/setting-up-gmail-as-sendmail-relay</a></p> <p>2 questions 1. how to Modify it so that www-data (php+apache) can relay through Gmail? 2. ...
2
1,347
"Object reference not set to an instance of an object"-exception on mobile sharepoint page
<p>My Situation:</p> <p>When I try to access the (custom) masterpage of a SharePoint 2010 solution, I'm developing, in the mobile view (using the Microsoft Mobile Device Emulator /w Win Mobile 6.1/IE6) I get the "Object reference not set to an instance of an object" exception without further explanation. The error is ...
2
1,114
PHP session problem
<p>I am using session_start() function in config.php file and this file is included in all files. in my add_page.php page, i am submitting a form and saving a message(in submit action) in the session, and then re-directing to index.php page(using header('location:...')). but after re-directing, i am not getting the mes...
2
1,232
Flutter audio_service dependancy issue in iOS
<p>I'm adding <a href="https://pub.dartlang.org/packages/audio_service" rel="noreferrer"><code>audio_service</code></a> package for run audio in background. in android it works but author hasn't implement in iOS so getting below error when run app in iOS.</p> <p><strong>Error:</strong></p> <blockquote> <p>Launching...
2
2,881
KineticJS - Use of coordinates while drawing shape
<p>I want to use KineticJS to draw a set of complex shapes in a grid. My shapes are 80 wide and 150 high. When I draw them, there is a gap between the shapes that is the width/height of the shapes - I expected them to be butted up against each other in a tight grid, not separated. </p> <p>It looks like somehow I'm dra...
2
1,863
Quick Sort C++ Implementation (using random pivot) breaks and stuck in infinite loop
<p>I am trying to translate my Python Quick Sort implementation into C++ and have written some code. The code seems to break. I am using Xcode for development and all I see, when I compile &amp; run the code is <code>(lldb)</code> and the program seems to be stuck in infinite loop.</p> <p>Please help me find the bug a...
2
1,423
Bootstrap 3.3.7 multiple items carousel - advance all items instead of 1
<p>I've been trying to add a multiple items carousel to my page. When using the code below, the animation should be advancing 1 image. Instead, the animation advances all. I have tried multiple Stackoverflow solutions to fix it but unfortunately they don't seem to work in this case - is it because of the screen size? I...
2
3,000
SQLZoo "More Join Operations" #15
<p><strong>Edit</strong>:</p> <p><a href="http://sqlzoo.net/wiki/More_JOIN_operations" rel="nofollow noreferrer">SQLZoo More Join Operations</a> problem 15 has changed since I asked this question. It now states: "List the films released in the year 1978 ordered by the number of actors in the cast, then by title."</p> ...
2
2,921
Angular cli update error
<p>All I am trying to do is update my angular project which was version 4 to version 6. I upadated the angualr cli(<code>by npm uninstall -g angular-cli and after installing again</code>) after attempts to upgrade to version 6 failed with errors. after installing the new angular cli I am now getting this error.</p> <p...
2
1,637
Update div on AJAX submit jQuery is updating all divs
<p>I'm trying to update a div with an ajax post. Problem is...it's updating every div.</p> <p>Here's the json.php:</p> <pre><code>//json.php $data['months'] = $db-&gt;escape_value($_POST['check']); $data['id'] = $db-&gt;escape_value($_POST['hidden']); $query = "UPDATE month SET months = '{$data['months']}' WHERE ...
2
1,844
JTable display data in arrayList
<p>coding in Java Eclipse here. Making a booking system. The idea is to take the info from the database ,store it in the ArrayList and from the ArrayList show it in the GUI through JTable. Having some problems with the last part and just can't figure it out.. ArrayList:</p> <pre><code>import java.util.ArrayList; publ...
2
2,361
PHP / MySQLi Excel export has no column headers
<p>I have some code I used to export to Excel using MySQL. I'm switching the syntax over to MySQLi, and it works except it's not printing the column headers in Excel.</p> <p>I am new to MySQLi.</p> <p>Here is the code (I'll try to leave out unnecessary code):</p> <pre><code> &lt;?php include("../include/database.ph...
2
1,294
How to get google spread sheet data from Sheet ID (From gid) instead of Spread Sheet Id in php
<p>I have one spreadsheet and it contains multiple sheets in tab format .</p> <p>My code is getting only first spread Sheet data and I have an array which contains all the sheet Id.</p> <p>My problem is how can I get all the Sheet Data, as I have unique gid for all.</p> <p>Here SpreadSheet Id is same for all the she...
2
1,412