title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
composite key join columns
<p>My table VENDORBRANCH has <strong>composite keys</strong>: "vendorCode" and "vendorBranchCode" which I have defined using the @Id annotation and using @IdClass. The field "vendorCode" is referenced as a foreign key in VENDORCRTERMS class. I'm using postgresql db. Right now my sql query in the service implimentation...
0
1,781
SQL Query error in JSF, JPA application
<p>I have a problem with a query in my application. This is the query method doing the query:</p> <pre><code>public List&lt;Product&gt; obtainProductListByCategory(String category) { Query query = em.createQuery("SELECT p FROM PRODUCT p WHERE CATEGORY='" + category + "'"); List&lt;Product&gt; ret = quer...
0
1,561
Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTRATION (has extras) } U=0: not found
<p>I am trying to get the registration id of a device (testing using the emulator) to set up push notifications using GCM.</p> <p>I have tried the following code, which gives me the following error: </p> <pre><code> Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTRATION (has extras) } U=0: n...
0
2,532
Sampling from a texture in OpenGL is black
<p>I'm trying out my hand at graphics, following a tutorial at <a href="http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_06" rel="nofollow noreferrer">http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_06</a></p> <p>Problem: When I try to texture my cube, my sample is black.</...
0
1,142
How to add an icon in a search box
<p>Questions to cover:<br> How to add an icon in a search box / form<br> How to add an icon in an input field</p> <p>I had the following issue whereby I could't get the FontAwesome fa-search icon to sit to the right of the input field / search box.</p> <p>Here is an image of the form:<br> <a href="https://i.stack.imgur...
0
1,224
C#: How do I dynamically load/instantiate a DLL?
<p>I've seen a couple examples out there that could possibly help me, but I don't have that much time to explore them as I just found out today that my bosses have to demo this a week earlier than planned, and I want to add this new functionality. I'll try and keep this short and sweet.</p> <p>Ok, this is like my 10t...
0
1,151
Git pre-commit hooks keeps modifying files even after I have staged previously modified files
<p>I'm running git <a href="https://github.com/pre-commit/pre-commit" rel="noreferrer">pre-commit</a> and running black as one of the hooks.</p> <p>Now when I run <code>commit</code>, black fails and says:</p> <pre><code>All done! ✨ ✨ 15 files reformatted, 1 file left unchanged. </code></pre> <p>I reviewed the refo...
0
2,002
How do I automatically bind a string array to a WPF DataGrid?
<p>I have a <code>DataGrid</code> inside of a <code>UserControl</code>. It looks like this:</p> <pre><code>&lt;UserControl x:Class="ExternalDataSourceComparison.ImportedInfoGrid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...
0
1,631
OpenMP schedule(static) with no chunk size specified: chunk size and order of assignment
<p>I have a few questions regarding <code>#pragma omp for schedule(static)</code> where the chunk size is not specified. </p> <p>One way to parallelize a loop in OpenMP is to do it manually like this:</p> <pre><code>#pragma omp parallel { const int nthreads = omp_get_num_threads(); const int ithread = omp_g...
0
1,137
List all possible combinations of k integers between 1...n (n choose k)
<p>Out of no particular reason I decided to look for an algorithm that produces all possible choices of k integers between 1...n, where the order amongst the k integer doesn't matter (the n choose k thingy). </p> <p>From the exact same reason, which is no reason at all, I also implemented it in C#. My question is:</p>...
0
1,231
How to create General Ledger/T-Account using PHP Mysql
<p>I am trying to create a double entry financial accounting system. I have completed designing the database for it, please check this link to see the diagram of my database . <a href="http://i39.tinypic.com/juhbv6.png" rel="nofollow noreferrer">http://i39.tinypic.com/juhbv6.png</a> </p> <p>I have tried a lot to dev...
0
1,715
How to uncheck or clear the radiobutton group?
<p>I'm new to android..</p> <p>Im facing a problem in uncheck the radio button in a group....</p> <p>My problem is....</p> <p>I am developing an quiz based app. there will be 1 quest and 4 opt(radio buttons) when user opens this app radio button will be unchecked but the prob comes when the user answers 1 quest and ...
0
3,841
Pipe complete array-objects instead of array items one at a time?
<h2>How do you send the output from one CmdLet to the next one in a pipeline as a complete array-object instead of the individual items in the array one at a time?</h2> <p><strong>The problem - Generic description</strong><br /> As can be seen in help for <a href="https://technet.microsoft.com/en-us/library/hh847902.a...
0
1,072
Java. GUI WindowBuilder scroll bar in text area doesn't work
<p>I don't know why my scroll bar in text area doesn't work. I found many solutions in internet, but no 1 helped for me.</p> <pre><code>textArea1 = new JTextArea(); textArea1.setBounds(13, 28, 182, 199); panel.add(textArea1); JScrollBar scrollBar = new JScrollBar(); scrollBar.setBounds(205, 1, 17, 242); panel.add(scr...
0
3,140
error when installing pecl memcached
<p>I've been having real trouble installing the pecl memcached package. </p> <p>Have not had any joy with any yum or pear/pecl install commands I referred to this question <a href="https://stackoverflow.com/questions/22102326/install-pecl-memcached-error">Install PECL Memcached Error</a> and started trying to configur...
0
1,190
NPM install for packages not working
<p>T hanks in advance for any help I can get.</p> <p>I am trying to install packages like grunt, bower, and yeoman using nodejs and the NPM in my mac OSX 10.8's terminal.</p> <p>I check node and NPM's versions to confirm they are installed correctly and have found that to be true. However when I begin to run a comman...
0
8,909
IllegalArgumentException: Type cannot be null
<p>I am confronting with an issue and it seems that many people encountered it and probably couldn't solve it.</p> <p>I have the following MYSQL stored procedure. This is just a sample to see if everything works fine, then I would've start adding parameters like <code>inactive</code>.</p> <pre><code>CREATE DEFINER=`r...
0
5,224
SQL Azure - One session locking entire DB for Update and Insert
<p>SQL Azure issue.</p> <p>I've got an issue that manifests as the following exception on our (asp.net) site:</p> <blockquote> <p>Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.</p> </blockquote> <p>It also results in ...
0
1,237
Unable to process jar entry from Jar
<p>I'm trying to run simple program on restful API and I'm getting the following Exception</p> <pre><code>&gt;Sep 12, 2016 10:05:02 AM org.apache.catalina.startup.ContextConfig processAnnotationsJar SEVERE: Unable to process Jar entry [javassist/tools/rmi/RemoteRef.class] from Jar [jar:file:/C:/Users/user/examples/.me...
0
1,607
jersey-spring3 instantiating Spring-managed bean (null!)
<p>I first want to point out that this is by and large the biggest problem in terms of time wasted that I have ever dealt with in my career. (Over two days straight now with essentially 0 progress.) Every single "work-around" or "solution" I have attempted hasn't worked, so I am blocked and pretty desperate for some ...
0
8,320
Json Parsing Error : JSON.parse: bad control character in string literal
<p>I have created web service for mobile web site using mobile jquery and it will return json string. When i start to parse this json using jQuery.parseJSON method, for sometimes it is working fine but in some situation ,it gives an error like: <code>JSON.parse: bad control character in string literal</code> . </p> <p...
0
1,851
log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment)
<p>I am trying to use log4j2.xml instad of log4j but I keep getting </p> <pre><code>log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment). log4j:WARN Please initialize the log4j system properly. </code></pre> <p>File is located under src/main/resources</p> <pre><code> &...
0
1,421
Unexpected character ('%' (code 37)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
<p>For several day I trying to figure out what this error means. I getting the error when i try to download file from web service.</p> <p>The full error is:</p> <pre><code>java.lang.RuntimeException: org.codehaus.jackson.JsonParseException: Unexpected character ('%' (code 37)): expected a valid value (number, String,...
0
6,615
Xamarin Forms Master Detail Page Icon, and Menu Icon
<p>I'm following the instructions here; <a href="https://www.syntaxismyui.com/xamarin-forms-masterdetail-page-navigation-recipe/" rel="nofollow noreferrer">https://www.syntaxismyui.com/xamarin-forms-masterdetail-page-navigation-recipe/</a></p> <p>The navigation bar icon is placed too far to the right by default. Is th...
0
1,601
Tornado/Python self.render("example.html") ignores CSS
<p>I'm a novice in Python and programming in general. I use a web server called Tornado to "host" my websites. Whenever I use self.render("example.html", <em>variables here</em>) to generate a dynamic html page, the html page produced has no CSS incorporated into it, as in it just generates the html page with no CSS i...
0
2,617
How do I center the outputs on a Python Jupyter notebook?
<p>I have a report that I have created in a Jupyter Notebook. I want the outputs (plots) to be centered for aesthetic reasons.</p> <p>I have tried the answer given here:</p> <p><a href="https://stackoverflow.com/questions/19782317/centering-output-on-ipython-notebook">Centering output on IPython notebook</a> </p> <p...
0
2,327
Nodejs, TypeScript, ts-node-dev & top-level await
<p>I have spent an hour now searching for a solution to a new error after needing top-level await. Everything else I have tried so far did not solve the error such as adding <code>&quot;type&quot;: &quot;module&quot;</code> to the package.json file.</p> <p>The message of the error is <code>Cannot use import statement o...
0
1,033
Java Tip Calculator for newbie
<p>I hope I'm posting in the right place.</p> <p>I'm pretty new to Java (meaning this is only my third program besides 'hello world').</p> <p>I have a tip calculator I'm working on for an assignment. I'm not getting an 'error' as such, but the method for splitting the bill always seems to think each customer pays 'in...
0
1,100
React native android connect backend service at localhost
<p>I have a register service which is handled by Nodejs. This service is working on 3001 port. I try to connect this service from React Native application. But always returns </p> <blockquote> <p>ReactNativeJS: [TypeError: Network request failed]</p> </blockquote> <p>My component and package.json code is below. Als...
0
1,686
javax.security.auth.login.LoginException: No LoginModules configured for SomeLogin
<p>Well I'm trying to create JAAS authentication for my Servlet (running on Tomcat 7 in Eclipse), but I'm getting this error.</p> <p>He're's the complete stack trace: '`</p> <pre><code>INFO: Starting Servlet Engine: Apache Tomcat/7.0.32 Geg 19, 2013 9:53:08 PM org.apache.coyote.AbstractProtocol start INFO: Starting P...
0
3,239
Java 8 Lambda Expression Within REST Service not working
<p>If I put a Java 8 Lambda expression in a REST service, it crashes. If I remove the lambda expression, it works. It does not matter if I use the lambda expression or not. Just the existence the lambda is enough to crash. Everything else Java 8 related seems to work.</p> <p>Below is my code (simplified):</p> <pre><...
0
1,096
Spring boot Spring ws security for soap based web service
<p>I have the following implementation in place for SOAP based web service and its security. </p> <pre><code>package com.hcentive.webservice.soap; import org.apache.log4j.Logger; import org.springframework.boot.context.embedded.ServletRegistrationBean; import org.springframework.context.ApplicationContext; import org...
0
5,273
Can read(2) return zero when not at EOF?
<p>According to the man page for read(2), it only returns zero when EOF is reached.</p> <p>However, It appears this is incorrect and that it may sometimes return zero, perhaps because the file is not ready to be read yet? Should I call select() to see if it is ready before reading a file from disk?</p> <p>Note that ...
0
1,025
Firebase FCM Instance ID is nil (running quickstart app on real device)
<p>Running the FCM demo app on my iPhone doesn't work - The Firebase ID is <strong>nil</strong>.</p> <p>Steps to reproduce:</p> <ol> <li><code>pod try Firebase</code>, and run <code>10: quickstart-ios/messaging/FCM.xcodeproj</code></li> <li>Copy my <code>GoogleService-Info.plist</code> file into the project</li> <li>...
0
1,340
Datatables buttons not showing for Bootstrap example
<p>Any idea why the buttons (csv, excel, pdf, print etc) are not showing when using this code for bootstrap?</p> <p><a href="https://datatables.net/extensions/buttons/examples/styling/bootstrap4.html" rel="noreferrer">https://datatables.net/extensions/buttons/examples/styling/bootstrap4.html</a></p> <p>I have this fo...
0
1,086
Using LINQ to convert List<U> to List<T>
<p>I have 2 classes which have some identical properties. I stock into a list properties from 1st class, and after that, I want to take some needed properties and put them into a list of 2nd class type. I've made cast sequence through C# and that runs OK, but I must do with LINQ. I tried to do something but without goo...
0
1,238
CSS Formatting to Keep Together
<p>Having a heck of a time with getting this formatting correct so any ideas would be appreciated. we have a bunch of information pertaining to <em>foos</em> that we want to keep grouped together. So if we had a bunch of <em>foos</em> listed next to each other, if that element causes the <em>foos</em> to wrap, the en...
0
2,881
Search functionality and fetch api in React
<p>I'm working on an app that makes a call to Unsplash's API and displays the response. I was able to get/display the response easily with just the <code>/photos</code> endpoint when I had the fetch request in the <code>componentDidMount()</code>, but I want to make the app searchable, so I added <code>performSearch()<...
0
1,757
how to modify xml file using xslt
<p>I need to change the value of particular element of a node in a xml through xsl file Below is my xml data</p> <pre><code>&lt;hospitals&gt; &lt;hospital&gt; &lt;department&gt; &lt;clinic&gt; &lt;cid&gt;8&lt;/cid&gt; &lt;clinicName&gt;clinic8&lt;/clinicName&gt; &lt;status&gt;1&lt;/...
0
1,257
UICollectionView scrolling is slow
<p>I have just created a <code>UICollectionView</code> in which The user can add images from their phone to the photo album feature in the app. I have the images save to the a subdirectory in the documents directory so more can be added and removed. However, when I scroll up and down the collection view, it is very lag...
0
1,861
nokogiri gem installation error
<p>I know there are a lot of questions about this gem but no answer has worked for me.</p> <p>When I run in SSH <code>gem install nokogiri</code> I get this error:</p> <pre><code>Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.8.0... OK Running patch with /home/user58952277/.gem/ruby...
0
2,247
Spring Data Repository - No qualifying bean Injection
<p>I'm new to Spring framework. I just started learning following various guides (<a href="http://spring.io/guides" rel="nofollow">http://spring.io/guides</a>) and I'm trying to complete the full tutorial about web services (<a href="http://spring.io/guides/tutorials/bookmarks/" rel="nofollow">http://spring.io/guides/t...
0
3,838
Internet Explorer 11 replaces Authorization header
<p>What would cause Internet Explorer to replace the HTTP header</p> <p><code>Authorization : Bearer &lt;server-provided-token&gt;</code></p> <p>with</p> <p><code>Authorization : Negotiate &lt;some token&gt;</code> </p> <p>when making an AJAX request?</p> <p><strong>Details</strong></p> <p>In Internet Explorer, s...
0
1,507
Error inflating class android.support.v7.widget.Toolbar
<p>I have moved my app from using actionbar to toolbar however end up with the error (full error at bottom). My code:</p> <p>My Activity:</p> <pre><code>public class MapsActivity extends ActionBarActivity implements LocationListener { @Override protected void onCreate(Bundle savedInstanceState) { sup...
0
4,123
ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file
<h1>Overview</h1> <p>I want to replace Oracle.DataAccess with Orcale.<strong>Managed</strong>DataAccess, but opening a connection with the latter throws an <em>ORA-12537 network session end of file</em> exception.</p> <p>Exception message / stack trace</p> <blockquote> <p>{OracleInternal.Network.NetworkException (...
0
2,778
Email validation using regular expression in PHP
<p>I am pretty much new with regular expression. I am developing a project in PHP and i need to validate email address. After searching in this site and google i found the following regular expression says it should work best.</p> <pre><code>if (preg_match("/^(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x2...
0
1,037
show input fields instead of text when you click an "edit" link
<p>I am currently creating a backend. What I need is some jquery to insert some different form fields. I can for example have this code:</p> <pre><code>&lt;div&gt; &lt;div&gt; Name &lt;/div&gt; &lt;div&gt; Type &lt;/div&gt; &lt;div&gt; &lt;a class="edit" href="#"&gt;Edit&lt;...
0
1,867
Values retrieved from database in textbox missing after spaces
<p>This is for edit_inv.php which have some textboxes which users can edit.<br> The problem is for values that contains spaces. eg. Cisco Router (in phpmyadmin), when I printout the value in the textbox (to be edited or left the way it is) it only have Cisco. The word Router is missing. This would be bad if the user do...
0
1,293
rtsp over http over a proxy
<p>I am trying to fetch an RTSP stream over HTTP using a proxy. The behavior of the Real client seems to be a bit hectic: it tries all the possible ports, methods and protocols at once. The only thing that should work is HTTP GET over port 80. Such a request is indeed issued, and is received on the server. Here's how t...
0
1,266
File transfer server/client using socket
<p>I am trying to make a file transfer between server and client, but is working very badly. Basically what needs to happen is:<br> 1) The client send a txt file to the server (I called it "quotidiani.txt")<br> 2) The server saves it in another txt file ("receive.txt")<br> 3) The server runs a script on it that modifie...
0
4,647
Enable APCU CLI on docker php 7.3
<p>I'm trying to enable apcu cli on my docker container in order to run my test. This is my docker file, I use :</p> <ul> <li>basic php image</li> <li>install composer</li> <li>install xdebug</li> <li>install more docker libs</li> <li>install apcu</li> </ul> <p>When I try to run my test inside this docker, it fails d...
0
1,139
How to create a timetable in php
<p>I want to create a student time table having 5 subject, 5 teacher, 5 class, per day 5 hour and 5 day in a week. I have completed everything, but now the issue I am facing is if there is no data inserted for specific one day (suppose for Monday there is no class) and i am inserting data for Tuesday. Then the Tuesday ...
0
3,216
Permission Denied Error XMLHttpRequest
<pre> <code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Calling a Web Service Using XmlHttpRequest&lt;/title&gt; &lt;script type="text/javascrip...
0
2,448
Networkx never finishes calculating Betweenness centrality for 2 mil nodes
<p>I have a simple twitter users graph with around 2 million nodes and 5 million edges. I'm trying to play around with Centrality. However, the calculation takes a really long time (more than an hour). I don't consider my graph to be super large so I'm guessing there might be something wrong with my code. </p> <p>Her...
0
1,408
Synchronize server with client java sockets
<p>Currently I am working on a server/client application which sends data using java with <code>Runnable</code> and <strong>threads</strong>. The problem is that the client is sending the data and when the server starts to read it the client has already finished and closed the connection which on the server side only a...
0
1,696
Android: `java.lang.IllegalArgumentException: Service not registered` when onStop() called
<p>I have an applications which is bound to a long running <code>Service</code>. I need to make sure that when the user navigates away from the <code>Activity</code> the <code>Service</code> stops.</p> <p>Therefore I implemented the <code>onStop()</code> to close the service:</p> <p>here is the code:</p> <pre><code>...
0
1,265
Eclipse Luna (4.4.0) and Subclipse not working
<p>I know there are tons of Eclipse/Subclipse questions out there regarding issues with javahl. I've been using Eclipse/Subclipse together for a long time without the javahl issues.</p> <p>I'm now running into the same issue though.</p> <p>I just recently upgraded to Java 7:</p> <pre><code>$ java -version java versi...
0
1,169
Android: How do I retrieve Edittext.getText() in custom AlertDialog?
<p>The topic explains what i'm after... I can't retrieve the EditText from my custom view in android. All I get is a Nullpointer Exception. :/ I've marked where the problems are in the code with comments. The ID:s are correct and my XML layout is a simple RelativeLayout containing two EditText attributes. Obviously I'm...
0
1,324
WCF Service Client: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding
<p>I've got a WCF Service running on my local IIS server. I've added it as a service reference to a C# Website Project and it adds fine and generates the proxy classes automatically.</p> <p>However, when I try and call any of the service contracts, I get the following error:</p> <blockquote> <p><strong>Description:...
0
2,891
Visual Basic Password Generator
<p>I have been tasked with creating a visual basic random password generator. I have come up with the below which works however its a bit crude with its password criteria. I would like each password it generates to have at least 1 number, uppercase and lowercase in it. However how I have coded this it will generate a r...
0
1,440
java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbook
<p>when i tried to create a workbook in normal java class it is creating but when i tried to run the same on servlet it is throwing exceptions</p> <p>Normal java class</p> <pre><code>import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import org.apac...
0
1,739
How Parsing string between [STX] and [ETX] using C# - Split/Append output using Regex or String Functions
<p><strong>Language = C#.NET</strong></p> <p><strong>Anything that is between [STX] and [ETX] must be accepted rest of the things must be rejected.</strong></p> <blockquote> <pre><code>string startparam = "[STX]"; string endparam = "[ETX]"; String str1 = "[STX]some string 1[ETX]"; //Option 1 String str2 = "sajksajsk...
0
1,080
MapStruct - Cannot find implementation
<p>Using latest Springboot and MapStruct versions and building with Maven, I am trying to implement the "Start Here" example given in <a href="https://mapstruct.org/#get-started" rel="noreferrer">the official MapStruct site</a></p> <p>My code is even simpler:</p> <p>pom.xml</p> <pre><code>&lt;org.mapstruct.version&g...
0
1,432
The process cannot access the file because it is being used by another process at deletion
<p>I thought I solved this problem by closing and disposing my reader, but still in some cases the file was in use. Next I called the Garbage Collector, so the file will be released. This solves 99% of all the issues which will bring up this error. Code used:</p> <pre><code> public override void Finish() ...
0
1,639
How to obtain sound envelope using python
<p>Hello I new with python and also with sound signal analysis. I am trying to get the envelope of a birth song (zebra finch). It has a very rapid signal fluctuations and I tried with different approach. For instance I tried to plot the signal and get the envelope with the following code base on other examples that I f...
0
1,367
How to loop through objects in php
<p>I am not too familiar with objects, i usually convert them to arrays using a script, but i thought it was time to man up and learn this, so i am asking how can i loop through an array of objects and pull out the specific information i need, the example of what is being returned is below.</p> <pre><code>[2] =&gt; st...
0
3,910
didRegisterForRemoteNotificationsWithDeviceToken never called on specific device
<p>First of all, I am on iPhone 6 Plus/iOS 8.1 and I've tried everything here: <a href="https://stackoverflow.com/questions/4086599/why-didregisterforremotenotificationswithdevicetoken-is-not-called">why didRegisterForRemoteNotificationsWithDeviceToken is not called</a></p> <p>Still no avail. To summarize:</p> <ul> <...
0
1,073
What can cause a HV000028 validation exception?
<p>The application can persist users which can be modified later. Lately a user could not be modified and the <code>HV000028</code> exception was thrown. The user entity was persisted without errors or validation. Does someone have an idea what could have caused such a behaviour or how I could find out more details? <...
0
1,953
ADD / EDIT / DELETE using Modal popup in ASP.net MVC4
<p>I've spent plenty of time in understanding how to use modal popup but I've not found any good answer yet or I should state Full working code.</p> <p><strong>I'm looking for an approach which uses MVC HTTPGET, HTTPPOST methods and In Javascript or Ajax should not have hardcoded property names</strong> </p> <p>Her...
0
1,163
TypeError: must be real number, not none type plus more errors
<p>Oh, goodness. I've become a regular here. I have all of my code but it's weird because I'm trying my best but I cannot seem to get it to work. I've tried rewriting parts of it and even making minor changes but it just won't work. At all.</p> <pre><code>""" WeeklyPay.py helps calculate the gross pay of multiple empl...
0
1,464
R plotting rows of a list
<p>Final edit: Result using matplot() I'll see to it that I work with ~3 digit values to get a more distinctive result, but basically it's what I wanted <img src="https://i.stack.imgur.com/PjQry.png" alt="enter image description here"></p> <p><strong>Original Question</strong></p> <hr> <p>I want to create a graph t...
0
1,125
Why different persistence units with separated data sources query the same data source?
<p>I'm developing a webapp which needs access to two different database servers (H2 and Oracle). The container is an <a href="http://tomee.apache.org/apache-tomee.html">Apache Tomee 1.5.1</a> and I'm using the Java EE stack with libraries provided in it (JSF, JPA, CDI, EJB, etc.).</p> <p>I'm trying to use two entity m...
0
1,608
How can I make this PowerShell script parse large files faster?
<p>I have the following PowerShell script that will parse some very large file for <a href="https://en.wikipedia.org/wiki/Extract,_transform,_load" rel="nofollow noreferrer">ETL</a> purposes. For starters my test file is ~ 30&nbsp;MB. Larger files around 200&nbsp;MB are expected. So I have a few questions.</p> <p>The ...
0
4,170
How to Bind ItemsSource with ObservableCollection in WPF
<p>In my WPF Application - I add new item to <code>ObservableCollection</code> via <code>Button Click Event Handler</code>. Now i want to show this added item immediately as it adds to <code>ObservableCollection</code> via <code>Binding</code> to <code>ItemsControl</code> I wrote code but it is not working. Can anyone...
0
1,376
Build succeeds, but publish fails
<p>Up until two days ago, I was able to use Visual Studio 2010's "Publish Web" option by right clicking on my project and clicking the publish button on the context menu. Now when I try to do the same thing, I get the following output:</p> <pre><code>------ Build started: Project: ELMS, Configuration: Debug Any CPU --...
0
2,176
How to make flutter card auto adjust its height depend on content
<p>In the project, I'm using images and text inside the flutter card, but the card returns a fixed height. and then I also tried just using a card with an empty value, but it still returns a fixed height. what should I do to make the height of the card auto adjust with content?</p> <pre> @override Widget build...
0
1,116
Spring jdbcTemplate - Connection is Closed
<p>I've had a long running issue with my Jersey REST application that utilizes Spring <code>jdbcTemplate</code> to make basic <code>SELECT</code>, <code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code> queries to our database (we use DB2).</p> <p>This issue happens every few days so I don't have a System.ou...
0
4,628
How to detect audio sampling rate with avprobe / ffprobe?
<p>I am using libav 9.6, installed via Homebrew.</p> <pre><code>$ avprobe -version avprobe version 9.6, Copyright (c) 2007-2013 the Libav developers built on Jun 8 2013 02:44:19 with Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn) avprobe 9.6 libavutil 52. 3. 0 / 52. 3. 0 libavcodec 54. 35. ...
0
1,500
convert a 4-digit military time into the standard 12 hour time format
<p><strong>What I'm trying to do:</strong></p> <p>I'm trying to convert a 4-digit military time into the standard 12 hour time format, with a colon and an added PM or AM without the use of importing anything before my code (I'm making a method that requires nothing other than java 101 techniques).</p> <p><strong>My s...
0
1,399
NSubstitute - Received for async - “call is not awaited”warning
<p>I am trying to verify that an asynchronous method was called with the correct parameters. However, I get the warning:</p> <p>"Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call". This warning appe...
0
1,330
Incorrect DateTime Value '0000-00-00 00:00:00' - Date_Sub() in Having
<p>So I have an insert which looks like this:</p> <pre><code> INSERT INTO TempDupeData (Sys_InvoiceID, DupeSetID, Netted, InvoiceNo, InvoiceDate, Sys_SupplierID, SuppInvNo, NetAmount, VATAmount, GrossAmount, PayDate, PayRef,PayRefNo, PayType, PayAmount, Curr, GBPNetAmount, GBPVATAmount, GBPGrossAmount, NetAmountA...
0
1,235
Can you use the same OnClickListener for different buttons?
<p>In android, can I use the same OnClickListener for different buttons? If yes, how do I get which button the click is generated from? I currently have 4 buttons and each button have their own OnClickListener. Each of the OnClickListener are doing the same exact thing with the exception of getting the text of the b...
0
1,657
Spark Exit Status 134. What does it mean
<p>I get the following failed error for some of my tasks when running my job. But the job finishes successfully on the whole and exits. What does this mean? Can I trust the results?</p> <blockquote> <p>ExecutorLostFailure (executor 8 exited caused by one of the running tasks) Reason: Container from a bad node: containe...
0
1,562
SciPy optimize.fmin ValueError: zero-size array to reduction operation maximum which has no identity
<p>UPDATE2: A better title (now that I understand the problem) would be: What is the proper syntax for input in scipy optimize.fmin?</p> <p>UPDATE: runnable code was requested, so the function definitions have been replaced with runnable code. Sample input data has been hard-encoded as the numpy array 'data'. </p> <p...
0
2,819
Decoding polyline with new Google Maps API
<p>I am drawing a route between two points in a map. I receive the points this way:</p> <pre><code>StringBuilder urlString = new StringBuilder(); urlString.append(&quot;http://maps.googleapis.com/maps/api/directions/json&quot;); urlString.append(&quot;?origin=&quot;);// from urlString.append(Double.toString...
0
6,582
How to use user input as parameter for query?
<p>So I'm very new to java and SQL and they are my first programming languages. I am trying to do some work with JDBC. I want to allow for a user to input an id and return a query based on the variable. If someone could at least point me in the right direction... Here is the code I'm starting with. Mind you its crude b...
0
1,036
Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server.?
<p>i have a problem with My dataGridVew</p> <p>i am trying to export data from my DB to excel fie</p> <p>it's a small page where there are only data grid view and button to export like this :</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;...
0
3,610
Protocol violation exception in Java application
<p>We have an application developed in java(jdk1.5 and DB is oracle 10g). At some point of time our application is giving below error and terminating. I had searched in the internet and all forums says that "this could be the driver issue (compatibility between oracle JDBC driver and DB). To resolve this we need to upg...
0
2,607
FrameLayout margin not working
<p>My layout structure is like this</p> <pre><code>LinearLayout FrameLayout ImageView ImageView FrameLayout TextView LinearLayout </code></pre> <p>I have set margin's for the two ImageView which are inside FrameLayout. But FrameLayout margins are discarded and it always set's the Image to to...
0
1,036
How can C#'s string.IndexOf perform so fast, 10 times faster than ordinary for loop find?
<p>I have a very long string (<strong>60MB</strong> in size) in which I need to find how many pairs of '&lt;' and '>' are in there.</p> <hr> <p>I have first tried my own way:</p> <pre><code> char pre = '!'; int match1 = 0; for (int j = 0; j &lt; html.Length; j++) { char c =...
0
1,338
android youtube download url 403 forbidden
<p>there are some videos that can't download.</p> <p>I got download url by using this</p> <pre><code>http://www.youtube.com/get_video_info?video_id=itGNQbJwRSk </code></pre> <p>Is there anyone why below url is not available to download?</p> <p>total url:</p> <pre><code>http://r1---sn-a5m7lnek.googlevideo.com/video...
0
1,043
HttpURLConnection GET call with parameters not working
<p>I have a very simple code which is not working.</p> <p><strong>Class HttoCon:</strong></p> <pre><code>package test; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.net.UR...
0
1,320
npm ERR! registry error parsing json - While trying to install Cordova for Ionic Framework in Windows 8
<p>I was trying to instal Ionic framework in my Windows 8 system and was trying to install Cordova first.</p> <p>I'm getting this error while trying to install Cordova, that says </p> <pre><code>Your environment has been set up for using Node.js 0.12.4 (x64) and npm. C:\Users\Sworup&gt;npm install -g cordova ionic n...
0
1,049
Commands out of sync; you can't run this command now
<p>I am trying to execute my PHP code, which calls two MySQL queries via mysqli, and get the error "Commands out of sync; you can't run this command now".</p> <p>Here is the code I am using</p> <pre><code>&lt;?php $con = mysqli_connect("localhost", "user", "password", "db"); if (!$con) { echo "Can't connect to My...
0
1,262
Tomcat 7 LinkageError: loader constraint violation
<pre><code>INFO: Deploying web application archive test-1.0-SNAPSHOT.war 20-Sep-2011 12:08:42 org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\software\apache-tomcat-7.0.21\webapps\test-1.0-SNAPSHOT\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7...
0
2,341
Run a Ant task in Maven only if a property is set
<p>My <code>pom.xml</code> is running an Ant task to deploy a file using FTP. However, this deployment must be only done if the <code>-Dftp=true</code> argument is given in the Maven command (i.e. <code>mvn clean install -Dftp=true</code>). Thus, I wrote the following code:</p> <pre><code>&lt;build&gt; &lt;plugins...
0
1,171
Using a custom FileFilter with a JFileChooser
<p>I need to filter files in a filechooser that only allows image files to be chosen. I cant seem to figure out whats wrong with my code here:</p> <pre><code>import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.awt.image...
0
1,106
The device is not ready error when typing url on browser
<p>I am using Stripe payment gateway for Ecommerce transaction. To communicate I have to use webhook url means I will provide a url so that they can commincate with us. I created a controller and Action which is <code>[AllowAnonymus]</code>. When I run application locally and type controller and action on browser then ...
0
3,191
Plotly express is not rendered in jupyter lab
<p>The following code does not render in Jupyter lab:</p> <pre><code>%matplotlib widget import plotly.express as px import numpy as np import pandas as pd df = pd.DataFrame(np.random.randint(0,100,size=(5, 4)), columns=list('ABCD')) px.bar(df, x='A', y='B') </code></pre> <p><a href="https://i.stack.imgur.com/qf4w...
0
1,170
Record phone calls on android phone?
<p>I tried it and use the following code for recording outgoing calls but it does not..</p> <pre><code> @Override public void onReceive(Context context, Intent intent) { this.context = context; if (intent.getAction().equalsIgnoreCase(Intent.ACTION_ANSWER)) { try ...
0
1,235