title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Setting FlushMode.COMMIT in Spring
<p>I would like set my Hibernate/JPA FlushMode to COMMIT, but in configuration file (applicationContenxt.xml is one of my files), i have a entityManager in my DAO, but i don't know how to set this in configuration file.</p> <p>So, this is my applicationContext.xml</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8...
1
1,835
libtooling can't find stddef.h nor other headers
<p>I am writing a tool to parse C family source code projects basically following these two tutorials <a href="http://kevinaboos.blogspot.com/2013/07/clang-tutorial-part-ii-libtooling.html" rel="noreferrer">1</a> <a href="http://clang.llvm.org/docs/LibTooling.html" rel="noreferrer">2</a> on clang 3.4 (trunk 192426) on ...
1
1,890
Using QJson library in Qt Creator under Ubuntu
<p>I'm trying to use the QJson library in an application that is being created in Qt Creator . The operating sytsem is Ubuntu 12.04 32-bit.</p> <p>I used synaptic to install libqjson0 (0.7.1-6). The libary was installed in </p> <pre><code>/usr/lib/i386-linux-gnu/libqjson.so.0 /usr/lib/i386-linux-gnu/libqjson.so.0.7....
1
1,113
how to detect the wrong person who are not in database and prompt error if no face are detected inside the image box?
<p>Here's the code when go into examination pages. I straight load the face from my folder to get to recognize who's the candidate and there's no problem to recognize each of the person who been enroll into the system but i have no idea to detect if the person is not the candidate. </p> <p>My program is goes like : Lo...
1
4,028
ACF repeater field content into tabs
<p>I'm trying to present a clean easy to use client back end field submission in the WP Admin dashboard that can sort repeater field data into appropriate tabbed content. here is the setup. </p> <p><strong>Field setup</strong> <a href="https://i.stack.imgur.com/W09Ge.png" rel="nofollow noreferrer"><img src="https://i....
1
2,741
Warning: Cannot update a component while rendering a different component. ReactJS
<p>In my ReactHooks/Typescript app, I have a Navigation component, that renders a PatientInfo component. The PatientInfo child is rendered conditionally based on what props it is passed, as decided by a searchbox in another child component - MyPatients.</p> <p>In this structure, I am getting the following error:</p> <p...
1
1,091
Django rest framework ignores missing csrf tokens with httpie
<p>I am using <a href="https://github.com/jakubroztocil/httpie" rel="nofollow">httpie</a> to play with my api written in django 1.7 and django rest framework 2.4. Today I was trying to delete an object:</p> <pre><code>$ http DELETE :8000/api/items/8/ --verbose DELETE /api/items/8/ HTTP/1.1 Accept: */* Accept-Encoding:...
1
1,351
Why is "if not (a and b)" faster than "if not a or not b"?
<p>On a whim, I recently tested these two methods with <code>timeit</code>, to see which evaluation method was faster:</p> <pre><code>import timeit """Test method returns True if either argument is falsey, else False.""" def and_chk((a, b)): if not (a and b): return True return False def not_or_chk(...
1
1,237
Global variable sencha touch 2.1
<p>Hi I need to define a global variable to use in anywhere of my application. I declare a global variable <strong>baseUrl</strong> in my <strong>app.js</strong>. Please see below app.js</p> <pre><code> //&lt;debug&gt; Ext.Loader.setPath({ 'Ext': 'touch/src',//Location of the sencha touch source files 'blue...
1
3,024
kubernetes default gateway not routing to local network
<p>I'm seeing a weird issue on kubernetes and I'm not sure how to debug it. The k8s environment was installed by kube-up for vsphere using the 2016-01-08 kube.vmdk</p> <p>The symptom is that the dns for a container in a pod is not working correctly. When I logon to the kube-dns service to check the settings everythi...
1
4,895
Android: Change toggle button background color, indicating option enable or disabled options
<p>I have a toggle button, the back ground of which I would like to change when pressed. My objective is to change the color of the button even after the press event to a new color. When it is pressed again, it goes to initial state.</p> <p>I have used the following code, but in my case the color is not retained after...
1
1,353
Efficiency of very large collections; iteration and sort
<p>I have a csv parser that reads in 15+ million rows (with many duplicates), and once parsed into structs, need to be added to a collection. Each struct has properties Key (int), A(datetime), and B(int) (and others that aren't relevant here).</p> <p><strong>Requirement A:</strong> The collection needs to enforce uni...
1
1,068
How do you use masks from pngs with moviepy?
<p>I am trying to use masks with moviepy.</p> <p>I would like to use an image file like this (<a href="http://imgur.com/1IGHflk" rel="nofollow">http://imgur.com/1IGHflk</a>) and overlay it as a mask on top of a video, so that only the black part of the image is transparent in the video. </p> <p>I am able to get this ...
1
1,116
Slow Performance within While Loop when Updating MYSQL Table
<p>The following code runs incredibly slowly when performing a WHILE LOOP using data from table <code>product</code> and updating another table <code>stock_figures</code> within the same database. </p> <p>The code loops through each row in <code>product</code> taking the value from <code>product_id</code> and <code>wh...
1
1,913
Ball to ball collision handling JavaScript
<p>I'm trying to get collision detection and handling working in JavaScript using two balls at the moment. I can detect when the balls collide with the boundary of the canvas and can get them to bounce back and I can tell when the balls collide with eachother but I can't get them to bounce off eachother properly.</p> ...
1
1,230
How to use Quartz .net in Windows form?
<p>i try to write a project to use Quart.net (http://quartznet.sourceforge.net/) to make job scheduling system (Quartz.NET is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems.) But i can not use listbox1.items add in execute method. How can use win...
1
1,262
Linking hard float to softfp bad performance
<p>I'm writing c++ code to run on ARM cortex a9 CPU. My code links to a closed source 3rd party library which is compiled with soft-float. I'm running a cortex-a9 ARM cpu.</p> <p>I noticed that if I compile my code with gcc flag <strong>-mfloat-abi=softfp, it runs much faster than compiling with -mfloat-abi=hard.</st...
1
1,839
PHP - Multiple file upload stuck at 20 items
<p>I'm trying to setup a multiple image uploader and whenever I try and upload more than 20 files, only the first 20 files are uploaded. </p> <p>Before I continue, id just like to say that max_file_uploads in php.ini is setup to 400, so other answers to very similar questions do not seem to resolve my problem.</p> <p...
1
1,413
angular 2 test a component with forkJoin
<p>I have a <strong>LogComponent</strong> in my application. Inside <strong>ngOnInit</strong> I retrieve logs from a server via <strong>LogService</strong> and display them in a grid.</p> <p>Here are 2 ways of how to do it:</p> <p>The 1st:</p> <pre><code>import { Component, OnInit } from '@angular/core'; import { Ro...
1
2,690
Paramiko hangs while executing a large wget command
<p>Hi I am having problems executing a command that performs a wget of a 100mb file over a Ubuntu 10 server. Shorter commands work fine except for this. The below class contains how I use paramiko and my different tries of overcoming this problem (see the different run or exec methods). In the case of exec_cmd the exec...
1
2,735
NextJS process.env.NEXT_PUBLIC variable is empty in production
<p>I have a NextJS &quot;^11.1.2&quot; app, which gets build in a Dockerfile and deployed to production via CI/CD. <strong>But my <code>process.env</code> variables are not rendered</strong></p> <p>I have this in my client side code, which should be rendered at runtime:</p> <p><code>const PublicApiUrl = process.env.NEX...
1
1,336
Any json editor in angular 10?
<p>I was using ang-jsoneditor before I upgrade my nodejs (was 8, now 12) and angular (was 7, now 10). After the upgrade, the ang-jsoneditor seems not working, and error is</p> <pre><code>core.js:4442 ERROR TypeError: Cannot read property 'nativeElement' of undefined at JsonEditorComponent.ngOnInit (ang-jsoneditor.j...
1
2,643
java.nio.file.ProviderNotFoundException: Provider not found
<p>I´ve got this exception provider not found, but don´t know how to solve it. Here is my code:</p> <pre><code> @Bean public FileSystem fileSystem() { try { Path path = Paths.get(&quot;C:/Users/home/Desktop/mydir&quot;); FileSystem ext2fs = FileSystems.newFileSystem(path, Thread.curr...
1
3,149
reducing number of return statements in a method
<p>I have a java code in which there are multiple return statements in a single method. But for code cleaning purpose, I can have only one return statement per method. What can be done to overcome this.</p> <p>Here is a method from my code:-</p> <pre><code>public ActionForward login(ActionMapping mapping, ActionForm ...
1
4,750
GCC compilation yields "real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)"
<p>I'm trying to compile GCC 4.7.2 on a <a href="http://www.buffalo-technology.com/en/linkstatio-pro-duo.html" rel="nofollow">Buffalo LinkStation Pro Duo</a> (after <a href="http://buffalo.nas-central.org/wiki/Open_Stock_Firmware_LS-VL" rel="nofollow">unlocking</a> it) which runs Linux 2.6.31.8 armv5tel.</p> <p>Unfort...
1
1,253
gstreamer "Internal data flow error" for videotestsrc
<p>I am working on an app using gstreamer svgoverlay plugin. My hardware platform is AM335x starter kit and OS is Arago linux (ti provided). The gstreamer which is part of the root-fs does not have the svgoverlay plugin. So I replaced the gstreamer with packages from <a href="http://feeds.angstrom-distribution.org/fe...
1
3,558
Error: connect ENOBUFS
<p>I am writing a little javascript application to test a small HTTP server I wrote using express. The server is working fine, I can make requests to it through a browser, and I can make requests to it through code, but only once. As soon as I perform multiple requests inside a loop, it no longer works as expected. </p...
1
1,211
Restarting the game after game over
<p>in the game that I made I have an game over screen that shows your score, now I want to make the game restart if you press space so that you dn't need to close the program and open it again to play it again. The problem isn't how to make the game restart when you press space but to acctualy make it restart. I have t...
1
10,294
SNMP extend as an INTEGER and not a STRING
<p>I am trying to extend freeradius statistics to snmp. I want to monitor these values and collect them within rrd files. My problem is that these values should be rrd counter but it appears that counter values needs to retrieve an INTEGER and not a STRING. You can see in this snmpwalk that the value is returned as STR...
1
1,262
How to address java.lang.ExceptionInInitializerError and java.lang.NoClassDefFoundError when running cucumber script through Selenium Java
<p>I have a cucumber and selenium test which has always worked fine and suddenly stops running with the below error.</p> <pre><code>1 Scenarios (1 failed) 14 Steps (14 skipped) 0m0.004s java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) a...
1
1,884
Text-like JPanel wrapping in Java Swing
<p>In short, I want to achieve this layout using swing:</p> <p><img src="https://i.stack.imgur.com/GyRrE.png" alt="enter image description here"></p> <p>Notice two main objectives:</p> <ul> <li><p>JPanels behaves as text, they are wrapped to <strong>width</strong> of a window, and in case of lack of space, they are ...
1
1,758
No destination specified for message, but my NServiceBus configuration appears to setup correctly
<p>I have created a standard NServiceBus publish subscribe program. I keep getting the following error when sending a message to my publisher NServicBus host:</p> <p>No destination specified for message TrackEventPublisher.TrackEventPublisher.InternalMessages.TrackEventMessages. Message cannot be sent. Check the Unic...
1
1,545
C# Parallel.ForEach Does Not Wait Until Finished
<p>I am a beginner at this thread thing and I have been hitting my head against the wall for two days. I read everywhere the Parallel.ForeEach will wait until the threads are finished before it comes out of the ForEach. I am here to tell you that is a bunch of you know what. This will just set up a bunch of tasks as sc...
1
2,982
iOS 5 Twitter Framework & completionHandler block - "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
<p>I am very new to programming and Objective-C and I am trying to work out what is wrong with my code. I have read a bit about blocks but I don't know how any of what I have read so far is relevant to my code. </p> <p>My code is using the iOS 5 Twitter Framework. I use most of the sample code that Apple provides so I...
1
1,290
How to generate UsernameToken for WS-Security?
<p>I have some web service (wrote in Java) and I need create client for it in .NET. The WebService has WS-Security and need PasswordDigest. First of all, I've tested it in SoapUI and it's works for:</p> <pre><code>POST http://192.168.100.101:8181/services/ws/SomeService HTTP/1.1 Accept-Encoding: gzip,deflate Content-...
1
2,504
How can I set a header over a RecyclerView?
<p>My Android app lists the audio files inside an specific folder by using a <code>RecyclerView</code>. However, I want to display at the top of that <code>RecyclerView</code> a header that indicates the current folder with a <code>TextView</code>, but I do not know how to do it. </p> <p>Is there an easy way to achiev...
1
1,316
Updating ShowMessageAsync Progress Value From "External" Method
<p>I have a WPF C# app using the <a href="http://mahapps.com/" rel="nofollow noreferrer">MahApps.Metro UI</a> resources. I'm trying to tie the <a href="http://mahapps.com/controls/dialogs.html" rel="nofollow noreferrer">progress dialog</a> control to a method call from another class and manually increment the progress ...
1
2,025
Artemis activeMQ embeded not working with spring integration tests
<p>I try to use artemis activeMQ with the embedded mode in Spring boot integration tests, but when i send a message, it can't recive it. I use the native mode and it works good but it's not the case when i run the integrations tests (embedded).</p> <p><strong>Here is my <code>applications-test.properties</code> (src/t...
1
1,486
AJAX call returns page HTML / doesn't hit Page Method is ASP.Net (no MVC or Json)
<p>I am updating a tool for my current company that provides basic product layout documents depending on choices picked. Recently it appears a bot of some sort has been hitting the toolbox periodically, and after some discussion with the company we built the toolbox for we have decided to add the ReCaptcha tool to the...
1
1,739
Vuetify CSS missing when i build for production
<p>We purchased a web app written in Vue from someone and we developing to change/improve it. One thing we added was Vuetify so we can use the Vuetify elements and everything has been working great while in development mode, but when we build for production the CSS for Vuetify elements is missing.</p> <p>I have searche...
1
2,724
Change Brightness using WMI
<p>I have tried this Windows example <a href="https://msdn.microsoft.com/en-us/library/aa390422(v=vs.85).aspx" rel="nofollow noreferrer">Getting WMI Data from a Remote Computer</a> and this other <a href="https://msdn.microsoft.com/en-us/library/aa390421(v=vs.85).aspx" rel="nofollow noreferrer">Calling a Provider Metho...
1
3,456
React native section list not re-rendering when item changes
<p>I have a sectionList in my react native project. it does not re-render if item changes. My code:</p> <p>test.js</p> <pre><code>class Test extends React.Component { started = false; causeData=[]; showLess=false; items = []; _start = () =&gt; { const { ws } = this.props; this.showLess = false; if (ws.c...
1
1,156
Vagrant + VirtualBox VM aborted after sleep
<p>I have a problem with my Vagrant VM running on VirtualBox: every time I close the lid of my MacBook, the VM is aborted and I have to 'vagrant up' it again. I don't think it's the intended behaviour, and it's quite annoying to start over every time.</p> <p>Checking the DiagnosticReports folder I can find a crash rep...
1
1,100
Second layout is not showing with include tag in android studio
<p>I have designed two Android layouts which should be shown in order. So, the first layout must be showing in top of the page and the second layout must be showing in bottom of the page. However, the following code only shows the first layout. How can I show the second layout too?</p> <p>the main layout is </p> <pre...
1
1,217
Unable to compile the class for JSP
<p>We are facing the below exception when I click on View button to see the user details :</p> <pre><code>2017-06-30 19:23:52,831 ERROR [com.myapp.jsp] - &lt;Unable to compile class for JSP: An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp apache cannot be resolved or is not a field 5...
1
3,511
"Bluetooth Share has stopped" alert when detecting iBeacons on Android
<p>I'm using <a href="https://github.com/RadiusNetworks/android-ibeacon-service" rel="nofollow">Android iBeacon Library</a> from Radius Networks to play with iBeacons. After some time I see constantly alerts popping out of the blue: "Unfortunately, Bluetooth Share has stopped." with [Report] [OK] buttons.</p> <p>Phone...
1
2,725
preventing form auto submit ajax laravel
<p>I have fetched the data from <code>database</code> using <code>ajax</code> and i am showing it to the user using javascript <code>confirm</code> dialog. But even after user selects <code>cancel</code> option, <code>form</code> is being submitted, but I want to submit a form only when user wants to proceed further b...
1
1,166
How to order multiple routes in route.config?
<p>I have multiple route controls for multiple actions in my web application.</p> <p>This actions is called by parameter-</p> <pre><code> routes.MapRoute( name: "SpecificRoute", url: "{BusinessName}", defaults: new { controller = "Business", action = "OpenPage" } );...
1
1,208
could not extract ResultSet in Hibernate application
<p>I have problem trying authenticate user using spring security and extracting users from the db. I am using Postgres for this purpose and I am sure it is configured because I am able to manipulate entities from other tables. Here is the error I receive:</p> <pre><code> org.springframework.security.authentication....
1
5,418
Pandas merge multiple times generates a _x and _y columns
<p>I have 2 dataframes where I found common matches based on a column (tld), if a match is found (between a column in source and destination) I copied the value of column (uuid) from source to the destination dataframe.</p> <p>Now I also need to check if a different column is a match. (company_name)</p> <p><strong>Da...
1
1,591
How to setup debugging in Visual Studio Code for React Native?
<p>I searched but I can't find any external sources except for Visual Studio Code docs, and just following those docs don't allow to debug React Native apps both in iOS or Android.</p> <p>I keep getting the error message (this one for Android, for iOS is similar:</p> <blockquote> <p>[vscode-react-native] [Warning] ...
1
1,113
Running JavaFX Application using framebuffer error Cubieboard A10
<p>Since javafx support Raspberry PI. I want to run FX application in frame buffer. I am using Lubuntu LCD display image.</p> <p>When I am try to run JavaFX application</p> <pre><code>java -Djavafx.platform=eglfb Hello.jar </code></pre> <p>I am getting the following error</p> <p>I am using java8 embedded hardfloat....
1
1,054
iPhone Objective C - error: pointer value used where a floating point value was expected
<p>I do not understand why i am getting this error. Here is the related code:</p> <p>Photo.h</p> <pre><code>#import &lt;CoreData/CoreData.h&gt; @class Person; @interface Photo : NSManagedObject { } @property (nonatomic, retain) NSData * imageData; @property (nonatomic, retain) NSNumber * Latitude; @property (no...
1
1,133
How to draw decision boundary in SVM sklearn data in python?
<p>I am reading email data from training set and creating train_matrix, train_labels and test_labels. Now how do I display decision boundary using matplot in python. I am using svm of sklearn. There are online example for pre given data sets through iris. But plot fails on custom data. Here is my code</p> <p>Error :</...
1
1,663
Reference external type enum and contains method
<p>Since I have switched to .net 4.5 and EF 5.0 I have started using enums mapping. In my project I'm using model first. Because all of enums were declared earlier so I have decided to user option "Reference external type" while I was converting fields to enums in EDM. Everything works fine but when I'm trying to execu...
1
2,532
Replace HTML nodes with Cheerio
<p>I'm using <a href="https://www.google.fi/search?q=cheerio%20js&amp;oq=cheerio%20js&amp;aqs=chrome..69i57j0l5.1613j0j7&amp;sourceid=chrome&amp;ie=UTF-8" rel="nofollow noreferrer">Cheerio JS</a> to simplify some ancient HTML code and transform it into HTML5. Among other things, I'm replacing some markup-heavy quotes t...
1
1,731
TypeError: Cannot read property 'substr' of undefined - source-node.js
<p>This error comes as a result of resolving <a href="https://stackoverflow.com/questions/41893245/upgrading-to-ionic-v2-0-0-issues">this question</a></p> <p>Here is my <code>ionic info</code>:</p> <pre><code>Cordova CLI: 6.5.0 Ionic Framework Version: 2.0.0 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 Ionic...
1
1,330
How to link Retrofit and Repository/ViewModel for a MVVM pattern?
<p>I have trouble linking Retrofit with MVVM architecture. Indeed, after reading documentation where they only talk about Room which is for SQLite local database, I searched the same but for data that comes from a Rest Server. So, I tried to do something similar to this and it doesn't worked : <a href="https://proandro...
1
2,539
Android: Finding nearby places with Google Places API
<p>I am trying to get list of the nearby places using Google Places API. I have enabled requried API from Google Devloper Console and have an valid API key. I am able to get my corrent location. After I got the my current location I am trying to get nearby places list but it returns empty.</p> <p>I have also tried giv...
1
1,826
retrieving data from python bottle using ajax jquery
<p>I am trying an html page to interact with a python script which returns a json string, using ajax/jquery. I installed bottle for the basic functionality of url routing.</p> <p>The problem is that my browser shows that my ajax script is recieving a content-length of 5 (which is the string "tring" (see server.py func...
1
1,316
HttpServer - HttpExchange - Seekable Stream
<p>I work on a sample java http server and a .Net client (on tablet). using my http sever, the .Net client must be able to download files.</p> <p>It's working perfectly, but now I have to be able to resume download after a connection disruption.</p> <p>Here some code :</p> <p><strong>Java server :</strong> ( It is l...
1
1,584
JUnit test with javax.websocket on embedded Jetty throws RejectedExecutionException: NonBlockingThread
<p>I'm trying to write a test case which creates a socket and connects to an embedded jetty instance. I'm using </p> <ul> <li>Jetty: 9.2.0.RC0</li> <li>javax.websocket-api &amp; javax.websocket-client-api: 1.0</li> <li>javax.websocket server &amp; client impl: 9.1.5.v20140505</li> </ul> <p>Starting the embedded jetty...
1
2,771
Grouping Nested KeyValue pairs to Dictionary
<p>I have the following code:</p> <pre><code>using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; public class Test { static void Main() { var list = new List&lt;KeyValuePair&lt;int, KeyValuePair&lt;int, User&gt;&gt;&gt; { ...
1
1,037
Stange random crashes with Rails 3.1 in production
<p>I see some stange random crashes with my brand new Rails 3.1 rc5 application running in production mode. The backend is nginx with 3 thin instances.</p> <pre><code>[Exception] users#show (NoMethodError) "undefined method `text?' for nil:NilClass" undefined method `text?' for nil:NilClass  activerecord (3.1.0.rc5)...
1
9,984
"Unknown error (0x80005000)" trying to read remote IIS 6 Metabase with DirectoryEntry and Impersonation (C#)
<p>(EDIT) <strong>The plot thickens:</strong> The same code (with no need for impersonation!) runs successfully from a Windows 7 client, but NOT from a Windows 2008 R2 client! Here's the code in question. (Original message follows code below.)</p> <pre><code>var entry = new DirectoryEntry("IIS://" + tbHost.Text + "/W3...
1
1,221
QGraphicsScene is missing a particular item update
<p>I've got an application where you can watch replays for a given 2D game :</p> <p>Basically, a vehicle is moving on a map. The view is centered on vehicle so the map is scrolling as replay is playing, something <em>Micro Machines</em>-like (it's just to give an idea, the actual game is not <em>Micro Machines</em>).<...
1
1,246
Unit Testing custom ConfigurationElement & ConfigurationElementCollection
<p>I have created a custom <code>ConfigurationElement</code> and <code>ConfigurationSection</code> to make it easier to set up a host of application parameters at startup. However, I'd really like to unit test this logic. </p> <p><strong>ServiceConnection</strong></p> <pre><code>public class ServiceConnection : Confi...
1
1,079
Executing several SQL queries with MySQLdb
<p>How would you go about executing several SQL statements (script mode) with python?</p> <p>Trying to do something like this:</p> <pre><code>import MySQLdb mysql = MySQLdb.connect(host='host...rds.amazonaws.com', db='dbName', user='userName', passwd='password') sql = """ insert into rollout.version (`key`, `value`) ...
1
1,215
Magento mass reindexing gives internal server error
<p>How can we reindex a Magento 1.7.02 version site having more than 24,000 products and hundreds of categories? </p> <p>When I try to reindex the product price index in Magento Admin Index Management, it generates an internal Server Error 500. When I checked the server log for errors it shows up with messages:</p> ...
1
1,071
How to bundle Nunjucks files via Webpack
<p>I have a complete site that I want to design a build tool for it.In fact, I chose Webpack for doing that. The project structure is like this:</p> <p><a href="https://i.stack.imgur.com/XC50V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XC50V.png" alt="enter image description here"></a></p> <p>...
1
1,712
Auto scroll to bottom of table
<p>I followed the most popular solution, as follows:</p> <pre><code>let elem = document.getElementById("mytable"); elem.scrollTop = elem.scrollHeight; </code></pre> <p>But it doesn't seem to work. <code>elem.scrollTop</code> always stays as <code>0</code>.</p> <p><div class="snippet" data-lang="js" data-hide="false"...
1
4,664
Spring Boot Exception evaluating SpringEL expression
<blockquote> <p>ERROR 4904 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine<br> : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "index": An error happened during template parsing (template: "class path resource [templates/index.html]")</p> <p>org.thymeleaf.exceptions.TemplateInputExcept...
1
2,078
Reading from one byte file returns 0xEF 0xBF 0xBD
<p><strong>Solved</strong>, accepted answer below because it pointed me at checking how my file got corrupted. Please read the end of this question for the Maven reason.</p> <p>I created a 1-byte file containing the byte <code>0xA8</code>. I'm trying to read it into any Java structure that will allow me to work with i...
1
1,452
Win32 API: How to catch escape key in Edit control?
<p>I found that for some unknown reason when focus is in <em>Edit control</em>, the Escape key never produces a messages. Below is a code to create a parent window, and <em>Edit control</em> above it. In <em>MyCallBckProcedure()</em> I laid <em>printf()</em> under a *WM_COMMAND*, to catch a messages, produced by <em>Ed...
1
1,625
Trying to return multiple rows from database json encode
<p>i am working on a little something, i have snipped together code from all over the place and am having trouble to get it to work.</p> <p>So what im trying to do is have one page request another via ajax/json/php and query a database and then return the multiple results and print it out on the first page.</p> <p>My...
1
1,168
Rendering QImage on QGLWidget of QML plugin
<p>I'm trying to write a <strong>QML plugin</strong> that reads frames from a video (using a custom widget to do that task, NOT QtMultimedia/Phonon), and each frame is converted to a <code>QImage</code> RGB888, and then displayed on a <code>QGLWidget</code> (for performance reasons). Right now nothing is draw to the sc...
1
1,255
Mocking using MOQ and generic types
<p>Method to unit test: GetUserInfo</p> <p>Following is the class containing the method: </p> <pre><code>public class AccountService : IAccountService { IUnitOfWork _UnitOfWork; public AccountService(IUnitOfWork unitOfWork) { _UnitOfWork = unitOfWork; } public UserInfo GetUserInfo(string...
1
1,599
Excel VBA running very slow looping
<p>I have a small supplier price list which is effective data from x to y dates (in rows) with number of same products (in columns - quite a few). I am trying to copy the rows into another sheet but this time at a date level instead of range x/y that I need to export into a csv. Only limitation I have that I cannot cha...
1
2,213
How to set ReFrames in ffmpeg?
<p>I tried to set the ReFrames to 3 using the above command, but the output shown by MediaInfo is always ReFrames = 4 frames.</p> <p>I also tried <code>"-x264opts ref=3"</code>, but still the ReFrames is always 4. How to set this using the right ffmpeg option?</p> <p><code>ffmpeg -ss 00:00:00.000 -t 00:00:18.000 -i /...
1
2,799
Android Gradle Build Errors
<p>I am getting errors building my Libgdx project with gradle. the android version is broken, but desktop works fine. I have all jars setup in build.gradle as well. It does successfully clean and build the android project file, but when I run the APK on mobile, it immediately crashes. Here are the errors. Thank you.</p...
1
5,064
How to use <div> properly in Struts 2
<p>I have a list in JSP page which is iterated by Struts tag and when I try to create <code>&lt;div&gt;</code> for each iteration it is not working fine.</p> <p><strong>Here is my code:</strong></p> <pre><code>&lt;div style=&quot;height:300px;width:700px;border:solid 2px white;overflow:scroll;overflow-x:hidden;overflow...
1
1,284
Can't override write method on Odoo 13
<p>I am trying override <strong>write()</strong> method for sale.order but it <strong>doesn't work</strong> with error</p> <pre><code>Error: Odoo Server Error Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/http.py", line 619, in _handle_exception return super(JsonRequest, self)._handle_except...
1
1,227
What's the most unsound program you've had to maintain?
<p>I periodically am called upon to do maintenance work on a system that was built by a real rocket surgeon. There's so much wrong with it that it's hard to know where to start. </p> <p>No, wait, I'll start at the beginning: in the early days of the project, the designer was told that the system would need to scale...
1
1,170
Cannot build project due to gradle project sync in progress
<p>I'm new on using android project version 0.82. I was creating a new apps (from scratch), and then I try to run the app. but the build process take forever because the gradle project sync failed, and in the top of the text editor, it says gradle project sync in progress. this takes forever. I've check the graddle wra...
1
1,296
An exception of type 'System.Data.Entity.Infrastructure.DbUpdateException'
<p>I´m new to mvc and I try to to do a simple Ajax call to my controller, so I can use a date- and timepickers in my create view.</p> <p>You can see this <a href="https://stackoverflow.com/questions/32714653/making-a-simple-ajax-call-to-controller-in-mvc/32715429#32715429">thread</a> where I previously asked for help....
1
2,362
Restructure Inventory Management Database (2 to 3 Tables; Development Stage)
<p><strong>I’m developing a database. I’d appreciate some help restructuring 2 to 3 tables</strong> so the database is both compliant with the first 3 normal forms; and practical to use and to expand on / add to in the future. I want to invest time now to reduce effort / and confusion later.</p> <p><strong>PREAMBLE<...
1
2,004
Sqlite Database locked issue using threading : Android
<p>I have some issue relating sqlitedatabase.i have create two thread.one is for webservice call and insert into database and second thread is for retrieving all database data.but i got some error:</p> <pre><code> 09-18 13:45:48.724: E/SQLiteDatabase(7189): android.database.sqlite.SQLiteDatabaseLockedException: databa...
1
5,314
Android - Function to route audio between smartphone and bluetooth module
<p>This is my first post on Stackoverflow. I try to route audio on android smartphone for the past few days but I don't find function to do that properly.</p> <p>It is for making a Bluetooth Babyphone.</p> <p>I need to make a routing between smartphone and Bluetooth module. The Bluetooth module is initially used to m...
1
1,063
Hide table column based on TD id
<p>I have one html page with this dynamically generated table and I need to hide the entire columns from certain td ids like "Id_Position", "Id_Equipe" and "Id_Vehicule" with javascript. How do I do that?</p> <pre><code>&lt;table width="100%"&gt; &lt;tbody&gt; &lt;tr class="HeaderRow"&gt; &lt;t...
1
2,674
Form.ShowDialog in Java
<p>I would like to do in java sth like this:</p> <p><a href="http://msdn.microsoft.com/pl-pl/library/c7ykbedk.aspx" rel="nofollow">http://msdn.microsoft.com/pl-pl/library/c7ykbedk.aspx</a>.</p> <p>The program is <strong>waiting for the reply</strong>. I have one class which extends JFrame (PlayerWindow) and the secon...
1
2,635
onkeypress event not firing
<p>I have written a code for work with both mouse and keyboard events. But the <code>onkeypress</code> event is not firing in Firefox, IE etc. I have tried with <code>keydown</code> event also, but this does not work. The HTML code for the <code>li</code> elements are: </p> <pre><code>print "&lt;li class=\"ui-menu-ite...
1
1,072
iOS Swift WebRTC - Failed to set remote offer sdp: Failed to set remote video description send parameters
<p>I am trying webRTC video call between iPhone devices. One application is creating the offer SDP as below. When i tried to set this SDP, am getting error in another application as </p> <blockquote> <p>Error Domain=org.webrtc.RTCPeerConnection Code=-1 "Failed to set remote offer sdp: Failed to set remote video desc...
1
1,428
VBS Script for Windows Update
<p>How would I remove the users request to "approve" everything in this .VBS script and instead just let it autorun/install everything found? </p> <p><strong><em>Details on how the script runs:</em></strong></p> <p>This .VBS script here runs on the Windows computer, searchs for Windows Update, then manually ask the u...
1
1,701
React.js component apparently renders, but no change in what's displayed
<p>This is my first venture into React territory, so I'm sure my problem is a simple newbie one. As an exercise I'm trying to convert an existing working web application to use React. I have a ProductTable which displays a list of products. It has a 'selectedProducts' field as part of its state, which gets updated when...
1
2,582
How to apply position absolute to canvas
<p>I have the photo and the canvas in the div. The photo takes the whole div and I want to position absolute the canvas to be able to hide some parts of the photo with it. </p> <p>But I have a problem, the canvas doesn't take the whole width and height (the style that I use is <code>position: absolute;left:0;right:0;t...
1
2,988
isSubmitting is not defined in Reactjs Formik library?
<p>I am trying to keep a track of form submission to display a circular progress until the form has submitted. </p> <p>According to formik documentation, i can use isSubmitting variable to to do that but i am getting error "Uncaught ReferenceError: isSubmitting is not defined"</p> <p>this is being writting in reactjs...
1
11,617
AJAX refresh, setInterval timing and localhost crash
<p>I am working on an app using Django, Leaflet, OSM and jQuery. The app displays a map with markers and a table with all the marker data (time, lat, lng). </p> <p>I want to automatically update the table and the map markers without reloading the whole page (I basically want to eliminate the flickr of the map tile lay...
1
1,510
Where should i get context.xml for tomcat7-maven-plugin
<p>When i run embedded tomcat with the help of <strong>tomcat7-maven-plugin</strong> it crashes with following error:</p> <pre><code>SEVERE: Missing context.xml </code></pre> <p>I have following configuration in maven plugin:</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;o...
1
1,551
Android: How to display string on textview from console
<p>I'm trying to display string on the textview. I'm succesfully able to print it on the console from database, but I'm not able to figure out how to print all the strings on different different textviews. Here is my code:</p> <p>MainActivity.java</p> <pre><code>public class MainActivity extends Activity implements O...
1
1,754
How to set an alarm on Android Q?
<h2>Background</h2> <p>Android Q seems to have plenty of new restrictions, but alarms shouldn't be one of them:</p> <p><a href="https://developer.android.com/guide/components/activities/background-starts" rel="noreferrer">https://developer.android.com/guide/components/activities/background-starts</a></p> <h2>The pro...
1
4,041