title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
XSLT: Select an element by variable value | <p>I have some XML structured like below: </p>
<pre><code><report>
<columns>
<column col_id="col_1">Column 1 title</column>
<column col_id="col_2">Column 2 title</column>
<column col_id="col_3">Column 3 title</column>
</columns>
<rows>
&... | 1 | 2,035 |
How to use JAXB to process messages from two separate schemas (with same rootelement name) | <p>We have a client that is sending xml messages that are produced from two separate schemas.</p>
<p>We would like to process them in a single application, since the content is related.</p>
<p>We cannot modify the client's schema that they are using to produce the XML messages...</p>
<p>We can modify our own copies ... | 1 | 2,269 |
Is it possible to use concurrent.futures to execute a function/method inside a tkinter class following an event? If yes, how? | <p>I am trying to use the pool of workers provided by <code>concurrent.futures.ProcessPoolExecutor</code> to speed up the performance of a method inside a tkinter class. This is because executing the method is cpu intensive and "parallelizing" it should shorten the time to complete it. I hope to benchmark it's performa... | 1 | 2,439 |
Cross field bean validation - why you no work | <p>I've got a little problem here with my application. I'd like to check if fields password and confirm password match together, so I tried to do it like in the first answer for this question: <a href="https://stackoverflow.com/questions/1972933/cross-field-validation-with-hibernate-validator-jsr-303">Cross field valid... | 1 | 3,762 |
Impossible to access an attribute on a string variable | <p>In my controller i just pass some users on my twig view.
Here is my function :</p>
<pre><code>public function viewAction($id)
{
$em = $this->getDoctrine()->getManager();
$planningRepo = $em->getRepository('SimonPediBundle:Planning');
$userRepo = $em->getRepository('SimonUserB... | 1 | 4,202 |
How to read values line by line from Excel file, and place them into a Map? | <p>My goal is to read an excel document with know format, read each cell and column one at a time. Each row will be set into a bean called Item which will be put into a map with its key as it item number. Once I do this I can continue with the rest of the program and put into a database. I currently a whole column at a... | 1 | 2,915 |
persistent store with apache ignite xml configuration | <p>I want to use apache ignite as a cache for my database and I use <a href="http://apacheignite.gridgain.org/docs/persistent-store" rel="nofollow noreferrer">persitent store</a> for this.
My database is Cassandra and for configuration I use this <a href="https://github.com/irudyak/ignite/wiki/Examples" rel="nofollow n... | 1 | 12,178 |
How to get or parse coverage persentage of Jacoco report in GitHub Actions | <p>I have Spring Boot app it uses gradle for build and package. I have configured Jacoco plugin and generating report in my local as HTML. I want to include it in my GitHub build workflow so whenever build runs I want to upload/store that Jacoco generated html report in the branch in which build is running. Is it possi... | 1 | 1,567 |
AWS kubectl: Unable to connect to the server: EOF | <p>I'm new to Kubernetes and trying to create a cluster on AWS. I haven't been able to run the <code>kubectl</code> command and getting the Unable to connect the server: EOF</p>
<p>I have been trying various forums and help for the last 2 days, but not sure what am missing.</p>
<p>Steps:</p>
<p>I have launched a t2.... | 1 | 1,820 |
Finding longest perfect match between two strings | <p>I am trying to write a script that will perform two functions, when provided with two strings:</p>
<p><strong>1</strong>. Find the longest sequence of characters starting from <code>pos[0]</code> that is the same in both strings</p>
<pre><code>Seq1 = 'ATCCTTAGC'
Seq2 = 'ATCCAGCAATTC'
^^^^ Match from pos[0... | 1 | 1,239 |
cycle terminating; zero elements found by selector | <p>I'm using a jQuery slider and I keep getting an 'error loading image' message, although the slider loads perfectly fine after I click 'okay'. </p>
<p>I believe the answer to problem is here: <a href="https://stackoverflow.com/questions/1657276/jquery-cycle-plugin-zero-element">jQuery Cycle Plugin (zero element?)</a... | 1 | 3,148 |
bind different modelview and view to each TabItem via MVVM in WPF | <p>I'm using MVVM to dynamically create tabs from viewModel.
In code, my attempt is to hold collection of "TabItem" that specify how tab appears (custom template) & in addition ModelView object, and then based on modelview display on the TabItem view #1 / or view #2. </p>
<p>My current s/w architecture is as follo... | 1 | 3,623 |
Parsing my json file by using grok pattern in logstash? | <p>I am trying to parse json file into elasticsearch by using logstash but I couldn't , I guess that I need to write some grok pattern. But I couldn't. How can I send below json into elasticsearch by using logstash.</p>
<p>{"machinename":"test1",</p>
<p>"longdate":"2019-01-29 13:19:32",</p>
<p>"level":"Error",</p>
... | 1 | 2,001 |
Cross-Origin Resource sharing error: Header Disallowed by preflight response | <p>i am learning how to use react as a front end and django as a backend. i am getting these cors issue everytime im hitting post method to django server. It is a very application. Sending a value from react to django server and printing it. In Django server terminal it shows "OPTIONS /sample HTTP/1.1" 200 0... | 1 | 1,312 |
How to add html attributes using python and BeautifulSoup | <pre><code>html_doc="""
<html>
<head></head>
<body>
<ul class="navigation"></ul>
</body>
</html>
"""
link_doc="""
<p>
<li><a href="http://example.com/elsie" id="link1">Elsie</a></li>
<li><a href="http://example.co... | 1 | 1,050 |
Populate ListView from SQLite database on android | <p>I have this database and I need to populate this <code>ListView</code> with the information.</p>
<p>I already have a method on my DBHandler class which is:</p>
<pre><code> public List<Appointment> getAppointments(){
List<Appointment> appointmentList = new ArrayList<Appointment>();
... | 1 | 2,892 |
TypeError: 'range' object is not callable | <p>I have been plotting some plots and then I received the above error for the code below:</p>
<pre><code> lag = range(0, 31)
djia_acf = []
for l in lag:
djia_acf.append(djia_df['Close'].autocorr(l))
plt.figure(figsize = (5.5, 5.5))
g = sns.pointplot(x=lag, y=djia_acf, markers = '.')
g... | 1 | 3,858 |
Error: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed | <p>Whenever I restart the Tomcat server, my webservice code is running fine at first time and produces the result however its throwing below error from second time onwards</p>
<blockquote>
<p>com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.</p>
</blockquote>
<p>This error occurs only after... | 1 | 1,981 |
Laravel 5 Route Group and Basic(/) GET Route within group | <p>I am working on a Laravel 5.0 Web application with Admin panel.
I am facing an issue with Routes. I have Grouped Admin Routes like below,</p>
<pre><code>Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'middleware' => ['user.admin']], function () {
Route::get('login', [
'as' => 'ad... | 1 | 1,460 |
Object 'xxx' not found while deploying random forest in Shiny app | <p>Sorry if it has been asked before. I try to deploy my random forest model to shiny app. but when I try, it says "Object'Region' not found.
I'm not sure what is wrong. I also wonder how to make a print of predicted test set in R.
I really highly appreciate any help. Thank you ver much!
<a href="https://i.stack.i... | 1 | 1,377 |
C# p/Invoke How to simulate a keyPRESS event using SendInput for DirectX games | <p>I've often struggled with simulating keyboard press events for various bots, or other GUI automating programs.</p>
<p>I've managed to simulate keydown events using:</p>
<pre><code>INPUT[] kInput = new INPUT[1];
kInput[j].type = SendInputEventType.InputKeyboard;
kInput[j].mkhi.ki.wVk = 0;
kInput[j].mkhi.ki.wScan = ... | 1 | 1,122 |
HTTP request is returning null object | <p>My code is just throwing back a null object from the server, I don't know if its the way I am trying to grab the info or I don't even know. Anything obvious you can see?</p>
<pre><code>static InputStream is = null;
static JSONObject jObj = null;
static String json = "";
// constructor
public JSONParser() {
}
//... | 1 | 2,986 |
CSS - How to have 100% height element inside of parent | <p>I have only made a 100% of the whole page, but this time I need a 100% height of element (div) inside of a parent. </p>
<p>I tried to re-read this for 100% height elements inside of parents, but nothing has worked so far.</p>
<p><a href="http://peterned.home.xs4all.nl/examples/csslayout1.html" rel="noreferrer">htt... | 1 | 1,035 |
Highcharts show max., min., and average for each serie in legend | <p>I'm having some charts where it would be nice to show <strong>minimum</strong>, <strong>maximum</strong> and <strong>average</strong> values for each serie separately. In the legend is not a "must", but it would be very nice. Another solution might be to show the min, max and actual value right in the chart (at the ... | 1 | 1,682 |
How can I aggregate microservices swaggers into a single swagger | <p>I am trying to generate a single swagger in my microservices project, aggregating all services swaggers into a single one, in the Api Gateway. In order to achieve this, I am following the next tutorial <a href="https://objectpartners.com/2017/09/28/aggregate-services-into-a-single-swagger" rel="noreferrer">https://o... | 1 | 1,501 |
Refresh dynamic table content in Bootstrap modal | <p>I have a Bootstrap modal with a dynamic table in it.
Here is the button that triggers the modal popup:</p>
<pre><code><button class="orgBrowseButton"> <i class="fa fa-search"></i></button>
</code></pre>
<p>Here is the function called when this button is clicked on. When it is clicked, an a... | 1 | 1,492 |
Bootstrapping Jersey with a filter causes Swagger to fail | <p>In my application's <code>web.xml</code> I originally had Jersey configured as follows:</p>
<pre><code><servlet>
<servlet-name>jersey-servlet</servlet-name>
<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
<init-param>
&... | 1 | 3,337 |
NullInjectorError: No provider for Store! AUTH GUARD Angular 9 | <p>I'm trying to develop Auth guard with Angular 9 but when I try to implement it into component in browser console gives me ERROR:</p>
<blockquote>
<blockquote>
<p>ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(SampleModule)[AuthGuard -> Store -> Store -> Store ->
Store]: NullInje... | 1 | 1,742 |
How to enable a button only after a radio button was pressed in java JFrame | <p>After a lot of googling i still haven't found what im looking for, mostly because i don't know what i'm looking for.</p>
<p>Basically i want the lock in button to be disabled until one of the radio buttons is selected, and i only want one of the radio buttons to be selected at a a time.</p>
<p>I haven't done any f... | 1 | 1,442 |
Use non-static WebDriver for parallel execution - Selenium - TestNG - Java | <p>Is this the correct way to initialize a ThreadLocal RemoteWebDriver?</p>
<p>I have seen posts where people say that you should not have a static WebDriver, however, if I remove the static modifier, I end up with NULL pointer exception.</p>
<p>Everything is running fine for the most part, but I am encountering a pr... | 1 | 1,345 |
Java OutOfMemory exception: mmap failed for CEN and END part of zip file | <p>I run my app on production env (Centos7 x64, oracle jre 1.7_05,64bit VM tomcat 6.0.43) with JVM arguments</p>
<pre><code> -Xmx4123M -Xms4123M -Xmn800M -XX:PermSize=500M -XX:MaxPermSize=500M -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=1 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX... | 1 | 3,380 |
Deploying a WPF application that uses Entity Framework Core | <p>I want to build a WPF app that uses entity framework core so that I can handle SQLite databases.</p>
<p>I then do the following, for instance:</p>
<ul>
<li>Using Visual Studio 2017 (15.5.2), create a WPF application.</li>
<li>Open the nuget package manager and install <code>Microsoft.EntityFrameworkCore.Sqlite</co... | 1 | 1,327 |
Reduce Quality of Image/Stream Before Saving | <p>I'm trying to take an input stream (a zip file of images) and extract each file. But i must reduce the quality of each image before they are saved (if quality < 100). I have tried the following but it never compresses the image:</p>
<pre><code>public void UnZip(Stream inputStream, string destinationPath, int qua... | 1 | 1,053 |
OpenCV: parallel for loop. What's wrong with my code? | <p>For the purpose of testing the parallel for loop in OpenCV, I created the following code, which just takes a matrix and does some manipulations and outputs another matrix. The parallel code is supposed to give the same results as given by the serial code. However, it is not the case.</p>
<p>Before compiling the cod... | 1 | 1,483 |
Antd Select Search Box not rendering the matches | <p>I have the data of products, and I am filtering the data using a search value and then rendering the options using that filtered data. The products data is coming from the global redux store as a prop. For some reason, the dropdown shows data only when the search value is null, when I start typing, the <code>filtere... | 1 | 1,303 |
php mysql + create profile page | <p>hey i am new here any one can help me with this chunk of code in php and mysql
i know that this is a little mistake but i could not know where is the error and thank you.
this is the code :</p>
<p>//index.php</p>
<pre><code><html>
<head>
<title>Search for a user</title>
</head>
<... | 1 | 1,487 |
Keep row selected in QTableView | <p>I am working on a program to view and edit records in a file. It features a <code>QTableView</code> that displays all records, a <code>QLineEdit</code> to search for records, and some labels that display the details of the selected record:</p>
<p><img src="https://i.stack.imgur.com/R5Ols.png" alt="record viewer"> ... | 1 | 1,263 |
Setting up audio queue for ffmpeg rtsp stream playing | <p>I'm working on an rtsp streaming(AAC format) client for iOS using ffmpeg. Right now I can only say my app is workable, but the streaming sound is very noisy and even a little distorted, far worse than when it's played by vlc or mplayer. </p>
<p>The stream is read by av_read_frame(), decoded by avcodec_decode_audio3... | 1 | 3,231 |
Load XML file into SQL Server tables using C# | <p>I have complex XML file that export from old program in VB6, now I must write a program in C# to load this XML file into 2 tables. Here is the XML file structure:</p>
<pre><code><?xml version="1.0" encoding="SHIFT-JIS" standalone="yes"?>
<AdminFile>
<PO_No></PO_No>
<Database>
... | 1 | 2,033 |
PHP: Recursive array function | <p>I want to create a function that returns the full path from a set node, back to the root value. I tried to make a recursive function, but ran out of luck totally. What would be an appropriate way to do this? I assume that a recursive function is the only way?</p>
<p>Here's the array:</p>
<pre><code>Array
(
[0]... | 1 | 1,036 |
jQuery show/hide div toggling, remembering previous choices | <p>I am making a dynamic page that holds 3 different div's (might increase, but 3 for now). They are hidden at first, but when a link is clicked the div chosen will appear. I got this working, but now the problem I am having is that I don't really know how to get started on making it remember what div is open, then clo... | 1 | 1,073 |
Decoding YUV to RGB in C/C++ with NDK | <p>I'm trying to convert the Android camera feed to a bitmap for image processing.</p>
<p>I have some code that converts YUV to RGB in native java which works, however, this process isn't quick enough for real time video so I think I need to convert it in either C or C++ before I apply the filters. I already have the ... | 1 | 3,273 |
ReactJS — How to use intersection observer in a Class Component? | <p>I manage to use <code>react-intersection-observer</code> in a Function Component. However, I have not been successful when using it with a Class Component. I tried to follow the documentation but I am getting the following error:</p>
<p><code>Invariant failed: react-intersection-observer: No DOM node found. Make su... | 1 | 1,758 |
HTML 5 Application Cache IE10/11 AppCache Fatal Error when Chrome and Android are working | <p>I created a simple test ASP.NET MVC application trying to use the Application Cache. Chrome seems to work fine, however in IE 10/11, it is giving us the following messages when trying to download the cache. Any ideas or sample where this is working?</p>
<p><img src="https://i.stack.imgur.com/bdNVn.png" alt="IE App... | 1 | 1,098 |
Postgres not using index inside "IN" clause for UUID | <p>I have a table <code>users</code> with an index on <code>id</code>.</p>
<p>I have another table <code>orders</code> which belongs to <code>users</code> and has a <code>user_id</code> field which also indexed</p>
<p>I have the following query :</p>
<pre><code>SELECT * FROM users
WHERE id IN (
SELECT user_id FR... | 1 | 1,062 |
Could not read JSON: Current token (VALUE_STRING) not numeric, can not use numeric value accessors | <p>I was trying to get the getAccessToken with spring rest template as given below. I am getting the below error, while calling oAuthRestTemplate.getAccessToken()</p>
<pre><code>Exception in thread "main" org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Current token (VALUE_STRI... | 1 | 1,595 |
True/False Booleans in core data | <p>Started working with booleans trying to save them within core data and figured I could do a simple true/false save object but after reading I am unsure of whether or not they added the ability to do this in swift or not. I read another post Swift + CoreData: Can not set a Bool on NSManagedObject subclass - Bug?. Rea... | 1 | 1,925 |
php cURL and Instagram Photos | <p>So someone Tweets a link to a photo on Instagram : <a href="http://instagr.am/p/QSVkR8LS3H/" rel="nofollow">http://instagr.am/p/QSVkR8LS3H/</a></p>
<p>This redirects from <a href="http://t.co/bOJ4EX2j">http://t.co/bOJ4EX2j</a> to <a href="http://instagr.am/p/QSVkR8LS3H/" rel="nofollow">http://instagr.am/p/QSVkR8LS3... | 1 | 1,110 |
TypeScript won't import index.js when index.d.ts is present | <p>I'm having strange behavior in TypeScript right now. In a folder separate from my source folder I have generated JS (protobufjs) with type definitions. When I try to import the index file from that folder I get the error <code>[foldername]/index.d.ts is not a module</code>. This even happens if I explicitly import <... | 1 | 1,220 |
Weird JDBC executeQuery exception | <p>I have the following code:</p>
<pre><code> public Object RunQuery(String query) throws Exception{
System.out.println("Trying to run query");
Statement stmt = null;
ResultSet rs = null;
try {
stmt = conn.createStatement();
System.out.println("Got Statement");
rs = stmt.execute... | 1 | 1,499 |
How do I force access by index rowid in Oracle? | <p>I need help forcing Oracle to always use table access by index row id on table "r_rapport" (~60k rows) to subsequently avoid full table scans on "r_attributfeld" (~8m rows) . I have a query resulting in the following plan:</p>
<pre><code>------------------------------------------------------------------------------... | 1 | 10,037 |
select2 multiple select as count in select2 search box | <p>Need to get just values and number of selection in multiple-select search box</p>
<p>Please check first screenshot using select2 multiselect,
<a href="https://i.stack.imgur.com/sUehg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sUehg.png" alt="enter image description here"></a></p>
<p>I wants... | 1 | 1,134 |
Java ora-01830 date format picture ends before converting entire input string Timestamp SQL | <p>I'm having problems getting dates from my database while using Oracle through java. If I use this in Java: </p>
<pre><code>SELECT *
from HA2_BOOKINGS
WHERE ROOM like 'R1'
AND BEGINNING >= (TO_TIMESTAMP('2018-06-11 15:11:43.208', 'YYYY-MM-DD HH24:MI:SSXFF'))
AND END <= (TO_TIMESTAMP('2018-06-11 15:11:... | 1 | 1,165 |
Rails 3.0.0.beta and Facebooker: anyone else seeing the following? | <p>My rails server seems to break after installing the facebooker plugin. Any suggestions on fixing this would be great.</p>
<p>I'm using rails 3.0.0.beta and facebooker. </p>
<p>Here are the steps and the error that I'm seeing:</p>
<pre><code>$ rails -v
Rails 3.0.0.beta
$ rails break; cd break
$ ./script/rails plug... | 1 | 1,859 |
maven with bouncycastle jar error | <p>I am using the following dependecy in my pom.xml from maven:</p>
<pre><code><dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.55</version>
</dependency>
</code></pre>
<p>After running the project inside ec... | 1 | 4,336 |
MSSQL container fails to start when mapping volumes after upgrading to WSL2 | <p>After I changed Docker Desktop to use WSL2, I am unable to start an mssql image using Docker-compose.</p>
<p>If I don't map the volumes the container starts up.</p>
<p><strong>Docker-compose</strong></p>
<pre><code>services:
db:
image: "mcr.microsoft.com/mssql/server:2019-latest"
container_name: ... | 1 | 1,435 |
Download file via vbs | <p>I know this has been asked and answered, it is where I found the code to start my project. But it doesn't work.</p>
<p>I'm stuck. I have tried and tried and the code(s) don't work.</p>
<pre><code>Dim xHttp: Set xHttp = CreateObject("Microsoft.XMLHTTP")
Dim bStrm: Set bStrm = CreateObject("Adodb.Stream")
xHttp.Op... | 1 | 1,659 |
Get property value defined in an abstract class | <p>I'm working on a very simple framework, where I want to automate CRUD functions. For the purpose of this question, I've created the code below, simplified just to illustrate my issue(s).</p>
<p>All items derive from the (abstract) base class "DbItem" (which contains the CRUD functions), whereby the child classes pr... | 1 | 1,493 |
how to configure Jitsi-meet recording? | <p>is there any site that would provide some insight to how to configure jitsi-meet recording functionality , I have tried to follow </p>
<p><a href="https://github.com/jitsi/jibri" rel="nofollow noreferrer">https://github.com/jitsi/jibri</a></p>
<p>but I could not get it working is there any other step to follow ??<... | 1 | 3,503 |
Java resultset.next() not returning results | <p>Got a java class that connects to an apache derby database. Suddenly stopped working and i can't work out why.</p>
<p>Basically a client connects to the server, the server calls the "contact" class, and then the contact class queries the database and returns the result.</p>
<p>Here is the code from the Contact cla... | 1 | 1,462 |
Django login form in bootstrap popup | <p>Using django 1.5 + twitter bootstrap.</p>
<p>Have a popup dropdown (bootstrap) login form on every page.
Authentificating with right credentials working good.
Now, my problem - need to add error message on wrong credentials on the same page, without page reloading. It can be a modal window, or better if it would be... | 1 | 1,607 |
Paypal Sandbox payment problem | <p>I have the following post button that i use for paypal transactions:</p>
<pre><code> <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="my@email.com">
&l... | 1 | 1,380 |
extjs work properly in chrome but does't display anything in firefox or ie | <p>I have work this code properly in Chrome, but in Firefox i cant see any changes, just blank page. In console no errors. All files are loaded.
I am not frontend developer, i wrote on python, ruby and java, maybe i do something wrong?
But...
What are hell is going on?! Its blow my mind.</p>
<p>Its MVC app, i have man... | 1 | 2,800 |
Need help Java amortization table calculations | <p>This is my homework it is due Monday the 16th.
I finally got the months to display right but the amounts are wrong.
Also, not necessary but it would be nice to stop and Print something between each loan.
Like loan 1, loan 2, loan 3...</p>
<p>Any help will be appreciated</p>
<pre><code>/*Write the program in Java (... | 1 | 1,343 |
Angular-material, $mdDialog | <p>Not closed mddialog when calling it from another mddialog.</p>
<p>It is html:</p>
<pre><code><some-auth>
<md-button ng-click="showSign('', $event)" flex-sm="100" flex-md="100"
flex-gt-md="auto">Sign In</md-button>
</some-auth>
</code></pre>
<p>In controller:</p>
<pre><code>$scope.sh... | 1 | 1,162 |
Faster GCD(n, m) in Java? | <p>I'm working on something that's going to need to use the GCD algorithm quite a bit, and I'd like it to be as fast as possible. I've tried the normal method, binary method, and a memoisation method I thought would work better than it did. I copied the binary method from <a href="https://en.wikipedia.org/wiki/Binary_G... | 1 | 2,416 |
Remove USB Accessory permission dialog | <p>I am working on an application which uses USB accessory.When I attach device to arduino it asks for usb permission and it has checkbox in dialog "use by default".When I checked and press ok then it should save permission and do not ask me again but it is asking for permission every time I attach USB.I want to save p... | 1 | 2,409 |
Property 'result' does not exist on type 'EventTarget'? | <p>I have a Javascript inside my .ts file and it keep showing me that property 'result' does not exist on type 'EventTarget' ???</p>
<pre><code>imageUpload() {
window.onload = function(){
//Check File API support zzzz
(<any>$('#files')).live("change", function(event) {
var files = eve... | 1 | 1,091 |
Setting up a file upload stream scan using Clamav in a Django back-end | <p>Working on a React/Django app. I have files being uploaded by users through the React front-end that end up in the Django/DRF back-end. We have antivirus (AV) running on the server constantly, but we want to add stream scanning before it is written to disk.</p>
<p>It is a bit over my head as how to set it up. Here ... | 1 | 1,628 |
{% url %} and jquery | <p>My views will give a dictionary of "build_id", and there is another view responbile generating the details of a given build_id. I.e., the second view "build_details" takes in a parameter "build_id".</p>
<p>Because I have at least one ids from the dictionary, I am going to generate a table. </p>
<pre><code><tabl... | 1 | 1,253 |
Function with recursive CTE seems to be very slow | <p>I am currently working on a function in which I use a recursive CTE, but it seems that have poor performance. I need this to be in function (so no temp tables) so I can easily use it within stored procedures.</p>
<p>Here is the code:</p>
<pre><code>CREATE FUNCTION [dbo].[Web_GetDailyLoadListUDF]
(
@CustomerID ... | 1 | 1,078 |
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column | <p>I have two table Student and Address.I am using hibernate 3 annotation for here.</p>
<h1>My Student class</h1>
<pre><code>package net.viralpatel.contact.form;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import jav... | 1 | 1,632 |
Why won't my While loop, loop? | <p>Okay I have tried this from every angle I can think of and I think I am over complicating things as per usual! </p>
<p>I am building a console c# application that will ask the user to input a price of an item bought and then for a "customer code" depending on this customer code a certain discount will be applied. <... | 1 | 2,926 |
jquery.ui sortable using a table and item:tr , placeholder difficulties | <p>I would like to add support for sorting to tables I have created. </p>
<p>The placeholder I have implemented does not work at all in IE 7 when using item:TR . It works OK in FF.<br>
I have tried the code on <code><UL\></code> and it performs correctly. It seems to be specific to tables and </p>
<p>I have res... | 1 | 1,025 |
mongoid save embedded documents | <p>I'm trying to build up on the following tutorial from railscast:
<a href="http://railscasts.com/episodes/196-nested-model-form-part-1" rel="nofollow">http://railscasts.com/episodes/196-nested-model-form-part-1</a></p>
<p>I'm trying to make everything work with mongodb and mongoid.</p>
<p>the scenario is:
I want to... | 1 | 1,124 |
How to implement a Security token in a WCF soap response? | <p>I am implementing an API from a bank and they require a security token to be provided. In the header of every soap message there is something which looks as follows:</p>
<pre><code><soapenv:Header>
<tpw:BinarySecurityToken ValueType="MAC" Id="DesMacToken" EncodingType="Base64" Value="**xvz**"/>
</s... | 1 | 1,334 |
Android Studio Kotlin Complier Error node.sym must not be null | <p>Suddenly my android studio gradle build fails with unknown error:</p>
<pre><code>java.lang.IllegalStateException: failed to analyze: com.sun.tools.javac.util.ClientCodeException: java.lang.IllegalStateException: node.sym must not be null
</code></pre>
<p>I tried everything like reverting my project back to previous ... | 1 | 2,899 |
didEnterRegion works in foreground but not background or other VCs | <p>If the app is running and the CLLocationManagerDelegate class is the foreground (i.e. visible) then the didEnterRegions triggers and I get both the NSLog as well as the AlertView. However, I get nothing when the app is in the background or, essentially, if the screen is showing anything but the delegate class.</p>
... | 1 | 2,160 |
json: cannot unmarshal array into Go value of type struct | <p>I am building an application that reads information from the London Underground API. I'm struggling on parsing the GET request into something readable and where the user can access specific line information.</p>
<p>Here is my current code, I'm using a struct to store the response from the GET request after Unmarsha... | 1 | 1,638 |
Background image fixed with vertical scroll bar in IE, broken by Tapestry5 components/css | <p>** EDIT November 17th **</p>
<p>Hi again, I wanted to show some code you can use to gracefully solve this issue. Make a blackbird.js file with the line commented out as mentioned in the accepted answer. Place it somewhere in your webapp directory (I put mine in /scripts/blackbird_1_0) along with the other Blackbird... | 1 | 5,245 |
pass parameter from coordinator.xml to workflow.xml oozie | <p>I have a requirement that, I need to take the date from coordinator to workflow in oozie.</p>
<p>For that I have developed sample coordinator and work flowas following. But, after launching coordinator job, all workflow jobs are failing with error code E0701. Means xml parsing error. I tried very hardly, where I am... | 1 | 1,037 |
how to deal with indices info during ROOM migration | <p>CODE:</p>
<pre><code>@Entity(tableName = "UserRepo", indices = @Index(value = "id", unique = true))
public class GitHubRepo {
@PrimaryKey(autoGenerate = true)
public int _id;
public int id;
public String name;
public String description;
@Embedded
public RepoOwner owner;
public GitHubRepo(int id, String name, Strin... | 1 | 1,091 |
Python Flatten Multiply Nested Dictionary JSON with Pandas | <p>I am working with a JSON response that is formatted like a many-nested dictionary below:</p>
<pre><code>{u'addresses': [],
u'application_ids': [20855193],
u'applications': [{u'answers': [{u'answer': u'Indeed ',
u'question': u'How did you hear?'}],
u'applied_at... | 1 | 1,234 |
How to do "Navigation Property binding of aggregations" in xml | <p>I'm developing a UI5 application.</p>
<p>I have the following odata entity:</p>
<pre><code><EntityType Name="order">
<Key>
<PropertyRef Name="id"/>
</Key>
<Property Name="id" Nullable="false" Type="Edm.Guid"/>
<Property Name="creatorId" Type="Edm.Guid"/>
... | 1 | 1,736 |
swiperight function is not working | <p>I am new to jquery. I follow this <a href="https://www.w3schools.com/jquerymobile/event_swiperight.asp" rel="nofollow noreferrer">link</a> to learn the swipe right function. I tried to apply swipe right function in my project. However, it does not have any response when I swipe right. I want the swipe right function... | 1 | 1,571 |
I am very confused on how to include Firebase into html | <p>I recently started integrating firebase into my html project, i installed firebase-tools using npm and initialized the project, but then after I included all the scripts mentioned on the firebase website, I used firebase.auth() to sign in the user, then I got an error that firebase is undefined, so I inserted these ... | 1 | 1,095 |
Naive Bayes Classification with R | <p>I have been wrangling with R to classify tweets using a Naive Bayes classifier model. </p>
<p><strong>Data</strong>:</p>
<p>Training set with 2 columns: Tweet and Class.
There are 300 tweets: 150 classified as "App" and 150 classified as "Other".</p>
<p><strong>Objective:</strong></p>
<p>Test set with 20 data p... | 1 | 1,488 |
What is the maximum number of threads that std::async will create and execute asynchronously? | <p>I have a large number (>>100K) of tasks with very high latency (minutes) and very little resource consumption. Potentially they could all be executed in parallel and I was considering using <code>std::async</code> to generate one future for each task.</p>
<p><strong>My question is:</strong> what is the maximum numb... | 1 | 1,328 |
java Exception : converting date and/or time from character string | <p>While executing below code getting conversation error message. Any help or suggestions really appreciate. </p>
<pre><code>import java.sql.* ;
import java.util.logging.*;
class check
{
public static void main( String args[] )
{
try
{
// Load the database driver
Class.forName( "com.microsoft.sqlser... | 1 | 2,689 |
how to fix fatal error - Class 'User' not found in php | <p>This is user class.</p>
<pre><code><?php
class User {
/*
*public static function get_all_users()
*/
public function get_all_users() {
global $link;
$result_set = $link->query("SELECT * FROM `user`");
return $result_set;
}
}
</code></pre>
<p>Above class is user c... | 1 | 1,422 |
Unhandled Exception: NoSuchMethodError while setting values in setter in Model class | <p>I'm learning flutter programming. I'm making a simple registration form with just 2 fields for now, name and dob. I have successfully create a simple note making application with db so followed the same instructions here. But running into an error "Unhandled Exception: NoSuchMethodError: The setter 'regday=' was cal... | 1 | 3,620 |
How to display html:text using <logic:iterate> for List<String> in Struts1.1 | <p>I have a <code>List<String></code> in my <code>ActionForm</code> which has to be represented as a text field in the JSP page using <code>Struts1.1</code></p>
<pre><code> List<String> url=new ArrayList<String>();
public List<String> getUrl() {
return url;
}
public void setUrl... | 1 | 1,589 |
Cannot access a disposed object (System.Net.Sockets.NetworkStream) on HttpClient | <p><strong>Updated 03/28/2017:</strong></p>
<p>This is a piece of C# code in my Xamarin PCL project running on iOS.</p>
<pre><code>public async Task<string> uploadPhoto(string imageBase64)
{
string responseContent = null;
var uri = new Uri(Constants.uploadImageUrl);
try
{
St... | 1 | 2,875 |
Spring JPA Locking Concept | <p>Anybody have any idea how to use Locking with UPDATE statement in Spring JPA, so that only one thread can UPDATE the record at a time?</p>
<p>Here, I am trying to update the availability of table name aircraft_route and before updating, I want to take the lock of that row so that no other thread can update it at th... | 1 | 1,091 |
JQuery: change content of <div> every 5 seconds | <p>I've set up a radio broadcast server using xml and xslt.
I display the current song playing, but of course, that changed every minute, so I'd like that the <code><div></code> refreshes every second to make sure the displayed data is up-to-date.</p>
<p>I've written a JQuery function, but that does not work.
Al... | 1 | 3,399 |
iOS11 JB debugserver Failed to get connection from a remote gdb process | <p>So there is a jailbreak for iOS11 without substrate/cydia.
Now I want to run debugserver after jb the device.</p>
<p>I already signed with enough entitlements I think:</p>
<pre><code>-bash-3.2# jtool --ent debugserver
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-... | 1 | 1,149 |
Open all .doc files in a folder and apply the code | <p>This is the last step of my work. I have designed a code to retrieve tables from a Word document.
I have written a code which works for each individual Word document. I have thousands of Word documents and I would love to automate the process.</p>
<p>In other words, I would like to run the code for all the .doc fil... | 1 | 1,168 |
There was no TypeHandler found for parameter * of statement + java.lang.ClassCastException: java.util.ArrayList incompatible with [Ljava.lang.Object; | <p>The stored proc spec :</p>
<pre><code>TYPE RESOURCELIST IS TABLE OF VARCHAR2(7);
PROCEDURE save_prvdr_scope_group_xref
(
p_region_id IN bg_prvdr_scope_group_xref.region_id%TYPE,
p_revision_id IN bg_prvdr_scope_group_xref.revision_id%TYPE,
p_bg_revision_id IN ... | 1 | 2,890 |
Find a place lies between source and destination google maps and places API | <p>I have written an application where user can enter source and destination using Google places API auto complete and he also can enter an intermediate place . I just wanna determine whether that intermediate place come along the way of source and destination .</p>
<p>This code was working till last week . Not sure w... | 1 | 5,755 |
Unable to login with Google OAuth when deployed to Heroku | <p>I am unable to login to the app when deployed to Heroku. I had a successful build and deployment, but when I launch the app it starts me logged out and upon attempting to login, it hangs and throws an Application error.
Express/Passport/MongoDB + create-react-app</p>
<p>I chek my keys several time, everesting matc... | 1 | 1,519 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.