title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
how to manage multiple session in express js
<p>i am building a site that as two url ('/','/admin') session are conflicting here is my app.js session code</p> <pre><code> app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(session({ secret: "JHGF&gt;,./?;;LJ8#...
1
1,655
Do current x86 architectures support non-temporal loads (from "normal" memory)?
<p>I am aware of multiple questions on this topic, however, I haven't seen any clear answers nor any benchmark measurements. I thus created a simple program that works with two arrays of integers. The first array <code>a</code> is very large (64 MB) and the second array <code>b</code> is small to fit into L1 cache. The...
1
2,200
Listener / Observable implementation, synchronized vs concurrent collections
<p>When implementing thread-safe listeners I usually wonder which type of <code>Collection</code> is the best to hold the listeners. I've found three options so far.</p> <p>The standard <code>Observable</code> uses <code>synchronized</code> access to a simple <code>ArrayList</code>. Using a copy of the listeners is op...
1
1,342
Sagemaker : How do I set content_type in Predictor (Sagemake > 2.0)?
<p>Requesting assistance with the following error.</p> <blockquote> <p>An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (415) from model with message &quot;Content-type application/octet-stream not supported. Supported content-type is text/csv, text/libsvm&quot;</p> </bloc...
1
1,682
c++ How can I count the unique elements in a vector?
<p>I have this <code>c++</code> code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;fstream&gt; #include &lt;string&gt; #include &lt;sstream&gt; #include &lt;cstdlib&gt; #include &lt;cmath&gt; using namespace std; struct szemelyadat { string vnev; string knev; int szulev; int szulhonap; in...
1
1,265
java slick2D simulate gravity for jumping
<p>So I made a little game in java with slick2D, but I want my character to jump. Now I have this: </p> <pre><code>if (container.getInput().isKeyPressed(Input.KEY_UP) &amp;&amp; !jumping) { verticalSpeed = -1.0f * delta;//negative value indicates an upward movement jumping = true; ...
1
1,744
org.hibernate.ObjectNotFoundException: No row with the given identifier exists
<ol> <li>EmpInformation file contains the <code>&lt;composite-id&gt;</code> tag having many-to-one with Department Class.</li> </ol> <p></p> <pre><code>&lt;hibernate-mapping&gt; &lt;class name="EmpInformation" table="emp_info" &gt; &lt;composite-id name="id" class="info"&gt; &lt;key-proper...
1
1,418
stop\start connector within my code
<p>I need to stop and then start the https connector programmatically. In tomcat 6 the following scrap of code works fine:</p> <pre><code> final ObjectName objectNameQuery = new ObjectName("*:type=Connector,port=443,*"); MBeanServer mbeanServer = null; ObjectName objectName = null; ...
1
1,057
Android Widget Change Background Color
<p>I have been searching for how to make the Background of a widget change color I tried putting an Icon that fit over the activity and change that, but it didn't work. I tried Creating a service that would change it, but that seemed like over kill and didn't work for me. Someone said to change it as a drawable.</p> ...
1
1,533
IdentityServer4 custom AuthorizeInteractionResponseGenerator
<p>Sadly documentation on the implementation of a custom <code>AuthorizeInteractionResponseGenerator</code> in IdentityServer4 is sorely lacking.</p> <p>I'm trying to implement my own <code>AuthorizeInteractionResponseGenerator</code> because I need a further step of user interaction (after authentication). My scenar...
1
1,121
Socket io client in android using socket io java client
<p>I have a node server running. i want to connect to server with socket. i'm using socket io java client (<a href="https://github.com/Gottox/socket.io-java-client/wiki" rel="nofollow">https://github.com/Gottox/socket.io-java-client/wiki</a>) here is my server code :</p> <pre><code>var app = require('express')() , h...
1
1,544
Pull SwipeRefreshLayout to refresh RecyclerView In Fragment in android but Not Working
<p>How can I refresh RecyclerView through SwipeRefreshLayout? I have searched a lot on google but its not working. Here is my code in fragment I am fetching data from server through Jason Parsing and getting into array and setting array into my RecyclerView adapter. Data is showing fine but SwipeRefreshLayout not work...
1
1,469
How to make Update Mutation - GraphQL (plus mongoDB)
<p>I would like to do an update mutation to albums, but I'm having issues getting the update and getting the return value. </p> <p>Schema Mongoose:</p> <pre><code>var AlbumSchema = new Schema({ name: String, dateCreated: { type: Date, default: Date.now }, dateUpdated: { type: Date, default: Date.now } });...
1
1,025
Rijndael 128 Encrypt/decrypt between vb.net and php
<p><strong>EDIT:</strong></p> <p>sorry for this question, i solved it immediately by myself ... the only thing i had to do was to set the padding to zeros:</p> <pre><code>aes.Padding = PaddingMode.Zeros </code></pre> <p>i am trying to encrypt the traffic between my VB.Net Application without SSL (cause the user shou...
1
1,756
Android - How to make an activity to load faster?
<p>I am currently working on an SMS app which will be quite similar to stock sms app.</p> <p>But the problem is my app is loading much slower than the stock(inbuilt) app.</p> <p>Here is my app's code :-</p> <pre><code>public class ThreadData extends ListActivity { private static final Uri SMS_URI = Uri.parse("conten...
1
1,701
Laravel 7 upgrade failing
<p>I was following the Laravel 6.x to Laravel 7.x upgrade doc and made the necessary changes. But it is failing and showing the following error. At the time of running <code>composer update</code> there were not 3rd party packages. Then i installed some other packages and after that tried to update again and stuck at t...
1
1,061
Creating an array using recursive php from mysql
<p>I need to create an array from a mysql database organized like so</p> <pre><code>id description parentId 1 Level 1 0 2 Level 2 0 3 Level 1a 1 4 Level 1b 1 5 Level 1a1 3 6 Level 1a1a 5 </code></pre> <p>So that the o...
1
1,041
TypeORM and NestJS: Creating database tables at the beginning of an e2e test
<p>I'd like to have database tables created at the beginning of each test or test run, so that either 1) all migrations are run against the test database, or 2) a single migration sets up all the tables (faster). <a href="https://django.readthedocs.io/en/1.5.x/topics/testing/overview.html#the-test-database" rel="nofoll...
1
1,270
Using async/await and yield return with TPL Dataflow
<p>I am trying to implement a data processing pipeline using <code>TPL Dataflow</code>. However, I am relatively new to dataflow and not completely sure how to use it properly for the problem I am trying to solve.</p> <p><strong>Problem</strong>:</p> <p>I am trying to iterate through the list of files and process eac...
1
2,200
Is there any listener on Android SearchView to notify if SearchView is expanded and ready to take input?
<p>I want to show some default suggestions in SearchView when User hasn't typed anything. I am setting my custom suggestion adapter manually using matrix cursor. I tried setting adapter in onFocusChange and onClickListner but suggestions get hidden behind a keyboard, apparently suggestions are loading earlier than key...
1
4,753
Javascript Error $(...).dxChart is not a function
<p>I'm trying to display a dxChart with jQuery binding in an ASP.NET MVC project (with DevExpress). So I included the necessary scripts in the rootLayout:<br></p> <pre><code>&lt;script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts...
1
1,181
PHP Excel and Codeigniter
<p>I would like to ask for your help.</p> <p>I'm doing a project using CodeIgniter and I need to generate Excel files besides the charts that I'm making. I am using PHPExcel to generate the Excel files.</p> <p>I added the Classes folder in the third_party folder of the project.</p> <p>I created a file called Excel.p...
1
1,604
Flutter use Stream or Future?
<p>I'm using Firestore database to store a list of objects. To retrieve them I use the <code>Stream</code> provided by the Firestore package, like this:</p> <pre><code> class FirestoreApi implements Api { FirestoreApi._(); static final instance = FirestoreApi._(); @override Stream&lt;List&lt;Job&gt;&gt; getJ...
1
2,074
Import swagger-codegen project into existing Android project
<p>Im trying to integrate a "module"-project generated by swagger-codegen, into my Android project.</p> <p>Haven't worked that much with gradle before and the swagger-codegen creates a quite messy build.gradle from my point of view.</p> <p>I have a hard time finding documentation on how to do this. And I feel a bit l...
1
1,767
FATAL_ERROR|System.LimitException: Too many SOQL queries: 201
<p>I am getting too many SOQL queries 201 error in apex class</p> <p>I tried to check the no of queries within loop Below is exact error - </p> <blockquote> <p>11:48:43.9 (2785518121)|FATAL_ERROR|System.LimitException: Too many SOQL queries: 201</p> </blockquote> <pre><code>Class.GEN_CalculateActToWinScores.calcU...
1
4,383
Generating different marker shapes in plotly/cufflinks
<p>This post is similar to this one (<a href="https://stackoverflow.com/questions/48650826/change-marker-shapes-in-plotly-js">Change Marker Shapes in Plotly .js</a>), but I can't seem to get anything to work in python. First off, I am trying to make a multi-line graph (which I have done in both plt and plotly...code b...
1
1,100
Langton's Ant Algorithm
<p>The problem of <a href="http://en.wikipedia.org/wiki/Langton%27s_ant" rel="nofollow">Langton's Ant</a> is simple. An ant walks a board with white and black squares. </p> <ul> <li>At a white square, turn 90° right, flip the color of the square, move forward one unit</li> <li>At a black square, turn 90° left, flip th...
1
1,376
DataTables how to fill a column with a hyperlink?
<p>I am using DataTables server-side processing and would like to add a hyperlink in the first cell of some of the tables. </p> <p>I am able to add a column and have the table render correctly, but I can't figure out how to get a hyperlink into the cell. </p> <p>I don't want this in every table, right now it's just g...
1
2,798
ViewPager with ImageView gives "java.lang.OutOfMemoryError: bitmap size exceeds VM budget"
<p>I made a <code>ViewPager</code> to display images. When I advance some pages I get an <code>java.lang.OutOfMemoryError: bitmap size exceeds VM budget</code> error. </p> <p>There are more questions about this issue but I did not find the solution (<code>BitMap.Recycle</code>, <code>System.gc()</code> etc). If you ha...
1
1,295
How to test Material UI Select Component with React Testing Library
<p>I am using react testing library for component testing. Material UI select options are rendered in a popover. debug does not list the options. How can on click event is fired in case of select options.</p> <p>Following is my select Component.</p> <pre><code>import TextField from '@material-ui/core/TextField'; impo...
1
1,183
How to implement get service to fetch data into my mat-table in angular 2
<p>I have created a dropdown with name <strong>department</strong> using the <strong>mat-selec</strong>t and applied filter for the dropdown.</p> <p>I created a service with name <strong>accountdetail</strong> from which i can fetch data from a json file into the department dropdown.</p> <p>I have implemented the tab...
1
2,533
OpenCV - find object shape
<p>I'm learning OpenCV and I've reached a point where no matter what I do, I get stucked. What I'm trying to do is to isolate an object (rectangular object) from its background. </p> <p>An example is the following picture of a battery: <a href="https://i.stack.imgur.com/cu4tQ.jpg" rel="nofollow noreferrer"><img src="h...
1
1,280
How to use Content Provider and Content Observer in API Level 8?
<p>I want to use <code>Content Provider</code> and <code>Content Observer</code> from the Api level-8. I am able to create this in Api-15 (ICS). but i have to support my app from Api-8. </p> <p>If i mention android:minSdkVersion="8" like this i am getting this errors <code>Class requires API level 11 (current min is 8...
1
1,306
I get 'ImportError: No module named web' despite the fact that it is installed
<p>I would like to run a simple 'Hello world' app. Every time I run it I get </p> <pre><code>'ImportError: No module named web' </code></pre> <p>I installed web.py using pip and using easy_install several times. I tried uninstalling it and installing again. I tried installing it a as sudo. Nothing seems to work. I us...
1
4,355
How to Delete The Session and cookie in symfony2
<p>what I need</p> <ul> <li>i Need When user click logout cookie is deleted.</li> <li>code is working in chrome , mozilla.</li> <li>bug in mozilla ver 30 , Ie 10.</li> </ul> <p>php code</p> <pre><code> public function flushAction() { $service = $this-&gt;get('acme.twig.acme_extension'); $detect=$service-...
1
1,496
Android webview post a form trouble on new Android Versions
<p>I have a working scenario on Android version that I tested, 2.3.6- 4.2.2. </p> <p>Firstly, manually I set an html string to WebView, which opens a new web page. </p> <p>However, on Android 4.4.2 and 5.0, Webview returns errors about an SSL certificate. What difference are these versions?</p> <p>HTML:</p> <pre><c...
1
2,830
Yii 2.0 login from database not working
<p>Right i am working on yii 2.0 trying to amend the login system. It works when the users are just a hand coded array. Instead i want to make this work from a database.</p> <p>I will show you what the initial Model looks like:</p> <pre><code>&lt;?php namespace app\models; class User extends \yii\base\Object implem...
1
2,852
MediaSession not getting any callbacks from MediaStyle Notification
<p>I created a service that extends MediaBrowserServiceCompat. This service holds a reference to my player and creates a new MediaSession with a callback. Everytime the player changes state, I update the MediaSession's playback state and create a MediaStyle notification. The notification is showing when I start to play...
1
6,969
Using discrete custom color in a plotly heatmap
<p>I'm trying to generate a <code>plotly</code> <code>heatmap</code>, where I'd like the colors to be specified by a discrete scale.</p> <p>Here's what I mean:</p> <p>Generate data with 2 clusters and hierarchically cluster them:</p> <pre><code>require(permute) set.seed(1) mat &lt;- rbind(cbind(matrix(rnorm(2500,2,1...
1
1,859
Publish WCF Service in IIS with support for both HTTP and HTTPS
<p>I have a WCF-Service configured with two endpoints using webHttpBinding, one for http and the other for https. They use the same address, the endpoints just differ by the used protocol:</p> <p><code>&lt;services&gt;<br> &lt;service name="Blubb.ClientService"&gt;<br> &lt;endpoint binding="webHttpBinding"...
1
1,093
Changing accuracy value and no change in loss value in binary classification using Tensorflow
<p>am trying to use a deep neural network architecture to classify against a binary label value - 0 and +1. Here is my code to do it in tensorflow. Also this question carries forward from the discussion in a <a href="https://stackoverflow.com/questions/40709074/binary-classification-in-tensorflow-unexpected-large-value...
1
3,754
javax.naming.NamingException, Tomcat7 and Struts2 can't access to DB resource via JNDI
<p>I'm developing new web app with Struts2 framework, eclipse, and I've mapped the db structure with Hibernate. The problem is that when I execute my "list" action the framework returns me this error: </p> <pre> Struts Problem Report Struts has detected an unhandled exception: Messages: This cont...
1
1,946
General Tips to Improve Haar Vision Training Data Results [openCV]
<p>Using trainCascade to train for HAAR-like features. Seeking advice from the community to get better results. In general, what is considered to be a good acceptance ratio?</p> <p>I started with a smaller Training, following this link as a guide: <a href="http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-c...
1
3,106
SSL3_get_client_certificate: verify failed
<p>I have a <code>TLS/SSL</code> server developed in <code>c</code> using <code>openssl-1.0.2k</code> api. In order to authenticate client, I have provided <code>CAfile</code> and also set following options as below.</p> <pre><code>SSL_CTX_load_verify_locations(ctx, "rootCAChain.chain", NULL ); SSL_CTX_set_client_CA_l...
1
2,750
Log4J2 (2.6) - Delete logs automatically
<p>I'm currently trying to get the Delete Action running in the new Log4j2 (2.6). There is the possibility to delete log files, with preconfigured conditions, like file size or age. The information about that is really rare on the web, but enough to configure it someway. Anyway, it's not working for me.</p> <p>We are u...
1
1,103
maven dependency not found in repository
<p>I'm trying to run the project, which uses gwt-dev. The instructions are at: <a href="http://neiliscoding.blogspot.ru/2012/05/how-to-setup-examples-for-use-in-gxt-3.html?showComment=1362999279386" rel="nofollow">http://neiliscoding.blogspot.ru/2012/05/how-to-setup-examples-for-use-in-gxt-3.html?showComment=1362999279...
1
1,195
How can I restore STDOUT after redirecting it to a file in a Perl script?
<p>Below is the part of my code, my code enters "if loop" with <code>$value =1</code> and output of the process <code>iperf.exe</code> is getting into <code>my_output.txt</code>. As I am timing out the process after <code>alarm(20sec)</code> time, also wanted to capture the output of this process only.</p> <p>Then af...
1
1,132
Spring Rest Docs with JUnit 5 and Webflux
<p>I am unable to get a Spring Rest Docs test with JUnit 5 and Webflux working.</p> <p>I have a working integration test with <code>@WebFluxTest</code> like this:</p> <pre><code>@WebFluxTest(SomeController.class) class SomeControllerTest { @Autowired private WebTestClient testClient; @MockBean privat...
1
1,103
How to get CONTEXT for the provider to work? Flutter
<p>In the Future fetchStudentInfo() function, i would like to use the userId from my Auth class to do filtering. The userId is embedded in the URL and it will retrieve data from database. But, the issue is that the context is lacking in the function itself. However, I couldn't figure out a way to pass in the context. I...
1
2,095
ASP.NET MVC 3 Validation on Nested Objects not working as expected - validates child object twice and not parent object
<p>I am trying to get ASP.NET MVC 3 to generate forms from complex, nested objects. There is one validation behaviour I found which was unexpected and I am not sure if it's a bug in the DefaultModelBinder or not.</p> <p>If I have two objects, lets call the "parent" one "OuterObject", and it has a property of type "In...
1
1,495
Attribute error while executing a python code
<p>I am a student and working on GNU Radio.</p> <p>I have a python code which i want to run in GNU radio companion but i am unable to search for the right block to execute that code...can anyone help me with that??When I execute the same python code(not in GNU), I get the following error:</p> <p>AttributeError: 'top_...
1
3,598
How to Make Tooltip Appear on TD Hover Using JS or JQuery
<p>having troubles doing this, so thought I'd turn to old Stack to help me out. :) I have my Table already and I want a different Tooltip to appear for each TR when a User hovers over a TD... So say if a User hovers over the Apple name, description, or image I would like a tooltip to appear saying the link to Apple's w...
1
1,044
Cannot forward after response has been committed
<p>I am trying to forward from Servlet to JSP along setting attribute but I am getting the following exception: </p> <blockquote> <p>java.lang.IllegalStateException: Cannot forward after response has been committed</p> </blockquote> <p>Please help.</p> <p>My code:</p> <pre><code>public class setPassword extends...
1
1,546
How to add p values for correlation coefficients plotted using splom in lattice?
<p>I am making a scatterplot matrix using lattice and plotting the correlation coefficients of 12 variables in the upper half of the panel. I would also like to add the p values beneath the correlation coeffiecients or stars indicating their level of significance. Here is my R code. How can I achieve this? Many thanks ...
1
1,312
invalid conversion from ‘const void*’ to ‘const char*’ in tokoyo cabinate table database
<p>i am new to tokyo cabin ate and i compile the example program and i am getting an error can any one tell me why i get this error <code>invalid conversion from ‘const void*’ to ‘const char*’</code></p> <pre><code> #include &lt;tcutil.h&gt; #include &lt;tctdb.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdbool.h&...
1
1,234
Update an entity with Morphia and its BasicDAO
<p>I make a REST webservice with SpringBoot web and the Morphia DAO (to use MongoDB).</p> <p>As I did when I used Hibernate on MySQL, I would like to use Generic entities, repositories and endpoints so that I just have to set my entities, inherit Repositories and Services and let use the generated CRUD with REST calls...
1
4,186
PHP json_encode() adding extra double-quotes around Array Elements
<p>I have an Array named $items that looks like the following:</p> <pre><code>array ( 0 =&gt; '{"id":"1", "qty":"1", "price":"12.51"}', 1 =&gt; '{"id":"2", "qty":"2", "price":"25.02"}', ) </code></pre> <p>I'm trying to build a mySQL INSERT statement which includes the data in $items ...
1
1,029
Can I read and write to multiple filehandles simultaneously (Perl)?
<p>I'm trying to read from two files, and generate output in a third. I first wanted to edit the first one on the go but I didn't find a suitable method save for arrays.</p> <p>My problem is that the third file (output) is empty whenever I uncomment the "_ref_param_handling" function. <strong>BUT</strong> the followin...
1
1,608
Confusing with getGlobalVisibleRect, different values
<p>I'm try to zoom a FrameLayout with the following example from der android developers site: <a href="http://developer.android.com/training/animation/zoom.html" rel="nofollow">http://developer.android.com/training/animation/zoom.html</a></p> <p>My concrete Problem, in the first time the animation is right, is expand ...
1
7,491
jqGrid additional POST data editURL with inline editing
<p>need help on sending addtional editURL data to the server. below is my code but it is not working</p> <pre><code>progGrid.jqGrid({ url : rootURLProgExecList, editurl : '/ProgGrid.php', editData : {'action':'weekID','userID':userID}, mtype : "POST", postData : {'action':'w...
1
2,315
open quote is expected for attribute "android:id" associated with an element type <RelativeLayout
<p>I want to design my XML but i found an error in my program it said "open quote is expected for attribute "android:id="@+id/OpenButton"" associated with an element type <p>Here is my code, hopefully anyone can give me a solution?</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/a...
1
1,063
org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI
<p>Hi i am new Spring Mvc.</p> <p>and i am not unable to solve this problem</p> <p>Dispatcher servlet (servlet-context.xml)</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; </code></pre> <p>http://www.springframework.org/schema/mvc/spring-mvc.xsd <a href="http://www.springframework.org/schema/be...
1
2,554
Why isn't the BeginGetResponse callback being called?
<p>Here's my code:</p> <pre><code>namespace RequestApi { public partial class MainPage : PhoneApplicationPage { private BackgroundWorker bw; private string ans; private JObject ansJson; private static ManualResetEvent allDone = new ManualResetEvent(false); // Constructor...
1
1,187
Java UDP - Packet Send Problem
<p>Everytime I try to send a UDP packet to an address I get the following exception:</p> <pre><code>java.lang.ArrayIndexOutOfBoundsException at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:625) at services.servicetypes.network.host.Server_UDP_Thre...
1
1,149
PHP Displaying user info when logged in
<p>Alright, I have tried and searched everywhere to fix this but no luck.</p> <p>All I am trying to do is display a users username and email (Who are logged in) and then print their details to thier account page. <strong>The problem is that all of the users in the database are being logged, I only want the users who ...
1
1,539
Return to main menu from sub menu in java
<p>So my current code has the problem that from the sub menu when I hit exit(4) it doesn't return me to the main menu, it just repeats the if statement within the main menu while loop which initiates the sub menu. How do I fix this?</p> <pre><code>import java.util.Scanner; import java.util.*; import java.util.ArrayLis...
1
2,912
Struts 2 unable to load interceptor file
<p>I'm new to struts2 and I'm having problems loading the custom interceptor file into my demo Struts2 application. I have tested and checked all my java, jsp and xml files and everything seems ok. At run time I have the following error and I'm not sure how to fix it. The application works but the interceptor is not...
1
2,815
jQuery Real Person - always fails
<p>No matter what I type in (even the correct captcha), I always get missmatched output. I've tried echoing the values (they are supposed to match if you type in the right code). and I always get something like this:</p> <p>6952304285049<br/> -1247767175</p> <ul> <li>I am using jquery-1.10.2.min.js (and have this lin...
1
1,680
Android and Java: Error in declaring R.id.Edit Text
<p>Eclips show error at editText1 when i write <strong>ed1=(EditText) findViewById(R.id.editText1);</strong> although i declare it in layout and also add layout to android <strong>Menifest file</strong>. </p> <pre><code>`public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); (1)setConten...
1
1,568
How to suspend execution for a random amount of time at random intervals
<p>I'm back again ... already.</p> <p>As the second part to my program, I need to be able to pause my program at random intervals - for example, 10 minutes into the program it gets paused for 20 seconds, 47 minutes in it gets paused for 3 minutes 49 milliseconds ... something like that. I'm not going to attempt a shot...
1
1,482
How to retrieve last node using XPath in C#?
<p>I have following part of xml file.</p> <pre><code>&lt;UN N="@U1"&gt; &lt;DT N="24/06/2011"&gt; &lt;PN N="@P1"&gt; &lt;TM N="02:24:11"&gt; &lt;JB T="GP"&gt; &lt;A&gt;notepad&lt;/A&gt; &lt;Z&gt;Notepad&lt;/Z&gt; &lt;N&...
1
1,116
Struts2: Malformed OGNL expression
<p>In my JSPs, I'm using a plugin named <a href="http://tagedit.webwork-albrecht.de/" rel="nofollow">TagEdit</a>, It has to have an input text field with " name='tag[]' " like below:</p> <pre><code>&lt;s:form theme="simple" action="myActionn" method="post"&gt; &lt;s:textfield theme="simple" name="tag[]" value="" c...
1
7,196
Want to automatically insert current Date in the table When a post Request is made
<p>I have a User Entity and an Order Entity. One of the field in order entity is date. Till now i have the user enter the date. Now i want that at the time post request is made the date is automatically set to the current date and stored in the database.</p> <p>Tried using @Prepersist annotation But since this is my f...
1
1,768
MS CryptoAPI doesn't work on Windows XP with CryptAcquireContext()
<p>I wrote some code using the Microsoft CryptoAPI to calculate a SHA-1 and got the compiled exe working on Windows 7, Win Server 2008, Win Server 2003. However, when I run it under Windows XP SP3, it does not work. </p> <p>I narrowed down the failure to the <code>CryptAcquireContext()</code> call.</p> <p>I did not...
1
1,117
Spark cannot read files stored on AWS S3 in Frankfurt region (Ireland region works fine)
<p>I run Apache Spark (2.11, 1.5.2) on a local machine using input files stored in AWS S3. If the files are stored in a bucket in the Ireland region (eu-west-1) it works fine.</p> <p>But if I try to read files stored in an S3 bucket located in Frankfurt (eu-central-1) it fails with the error message:</p> <p><strong>T...
1
1,065
spring-boot returns 404 on html
<p>I can't explain why my spring-boot app won't render my html pages anymore. I am running Spring-Boot 1.1.7 and have my index.html under src/main/resources/templates/. I am using AutoConfiguration, but when I try to navigate to my home page, nothing is rendered and I get the following in my logs:</p> <pre><code>o...
1
1,998
How to place a search box on top of a carousel?
<p>I want to make something like <a href="http://www.airbnb.com" rel="nofollow">airbnb</a></p> <p>This is my carousel code using twitter bootstrap.</p> <pre><code>&lt;div id="carousel-example-generic" class="carousel slide" data-ride="carousel"&gt; &lt;!-- Indicators --&gt; &lt;ol class="carousel-ind...
1
1,305
Single PowerShell Script to Create Folder, AD Groups, and Apply New Groups to Folder
<p>I'm wanting to:</p> <ul> <li>Create New Folder</li> <li>Set Share Name for folder so that users can see it</li> <li>Create AD Group FS-TESTSHARE-R</li> <li>Create AD Group FS-TESTSHARE-RW</li> <li>Apply Both groups to the new share folder</li> <li>Set Full Read permissions to FS-TESTSHARE-R</li> <li>Set Full Read/R...
1
1,625
Code Golf: Decision Tree
<p>In Google Code Jam 2009, <a href="http://code.google.com/codejam/contest/dashboard?c=186264" rel="nofollow noreferrer">Round 1B</a>, there is a problem called Decision Tree that lent itself to rather creative solutions.</p> <p>Post your shortest solution; I'll update the Accepted Answer to the current shortest entr...
1
1,278
ReactNative - FlexBox UI messed up on keyboard open
<p>I am trying to make react native UI using FlexBox. But when keyboard pops up, it messes up the UI. Take a look at screenshots and code. I think something is wrong with my FlexBox code. It is trying to divide remaining screen space between elements according to given flex value.</p> <p><a href="https://i.stack.imgur...
1
1,354
JSON.decodeValue Decode Exception
<p>I want to make this java code works:</p> <pre><code>RequestManager rm = Json.decodeValue(request.getBodyAsString(), RequestManager.class); </code></pre> <p>But i have this error:</p> <p><code>io.vertx.core.json.DecodeException: Failed to decode:No suitable constructor found for type [simple type, class RequestMan...
1
1,225
Parsing a string as date in logstash while inserting in elasticsearch
<p>One record in my csv file looks like </p> <pre><code>,No,FMN1116CD,Holiday Order,2782427,Mr Vijay Ran ,9/6/2014,17/11/2014,,To Deliver,0,S,FALSE,2726149,-1,-1,,0,,,,-1,Delhi Inbound,NEW DELHI,Basic Hotel Order Details,Custom Package,Double,,Others,25500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,890,0,0,3280,0,29670,,,FALSE...
1
1,158
Delphi: load BASS DLL and play MP3
<p>I want to load a <a href="http://www.un4seen.com/" rel="nofollow">bass dll</a> manually from somewhere and then play a mp3 file. How to do that? Delphi XE2.</p> <p>My attempt doesn't work:</p> <pre><code>type QWORD = Int64; HSTREAM = LongWord; type TBASS_ChannelPlay = function(handle: HSTREAM; restart: LongB...
1
1,477
Parsing XSLT/Xpath data for a list of XML nodes
<p>I am searching for a lib or tool or even some simple code that can parse the Xpath/XSLT data in our XSLT files to produce a Dictionary/List/Tree of all the XML nodes that the XSLT is expecting to work on or find. Sadly everything I am finding is dealing with using XSLT to parse XML rather than parsing XSLT. And th...
1
1,823
How to delete rows with less than a certain amount of items or strings with Pandas?
<p>I have searched a lot but couldn't find a solution to this particular case. I want to remove any rows that contains less than 3 strings or items in the lists. My issues will be addressed more clearly further down. </p> <p>I'm preparing a LDA topic modelling with a large Swedish database in pandas and have limited t...
1
2,393
Pandas Rolling mean with GroupBy and Sort
<p>I have a DataFrame that looks like:</p> <pre><code>f_period f_year f_month subject month year value 20140102 2014 1 a 1 2018 10 20140109 2014 1 a 1 2018 12 20140116 2014 1 a 1 2018 8 20140202 2014 2 a 1 2018 20 20140209 2014 2 a 1...
1
1,346
Laravel Eloquent Attribute Casting not work
<p>I have a Laravel Models that return string value instead of integer in my staging server. I decided to <a href="https://laravel.com/docs/5.3/eloquent-mutators#attribute-casting" rel="noreferrer">cast</a> attribute's values to get always the integer value.</p> <p>I report my Model:</p> <pre><code>&lt;?php namespac...
1
1,497
Visual Studio Code won't properly step on TypeScript code
<p>I am trying to configure Visual Studio Code to use TypeScript (in a Node package), I'm also using <code>ts-jest</code>/<code>Jest</code> to create tests, additionally, I have the Jest extension installed.</p> <p>I have been able to figure out how to make breakpoints work, but now I notice I can't properly step in m...
1
2,129
Java/Guice Error configuring application listener of class MyExample.GuiceServletConfig
<p>I'm trying to get a bare-boned framework going and I'm having some trouble getting it to actually run.</p> <p>The following files are all in the 'example' package:</p> <p><em>AbstractController.java</em></p> <pre><code>package example; import java.io.IOException; import javax.servlet.ServletException; import ja...
1
4,065
deserialize dynamic object
<p>I am having a lot of trouble trying to figure out how to deserialize my response from making calls to facebook api. my c# code looks like this:</p> <pre><code>FacebookClient client = new FacebookClient(); string path = "SELECT message, type, attachment FROM stream WHERE source_id = " + fbid.ToString(); dynamic res...
1
3,282
React: How to log user out if their cookie is expired?
<p><strong>Background</strong>: On an express backend, I am using express-session to assign user sessions. On a React front-end, I have in place functionality to prevent users from entering protected routes. There is one bothersome edge case though: If an <strong>authenticated user</strong> remains in an application lo...
1
2,545
Airflow Celery worker : command returned non-zero exit status 2
<p>I trust you all doing good. </p> <p>I am getting below error and trying to fix it for hours and did get any luck. Below logs are from airflow celery worker. </p> <pre><code> airflow command error: argument subcommand: invalid choice: 'tasks' (choose from 'backfill', 'list_dag_runs', 'list_tasks', 'clear', 'paus...
1
3,503
FFMPEG -filter_complex drawtext with style like bold italic and underline
<p>I am trying to add text on padded area of my video. There are 4 to 5 things that i am not able to do </p> <ul> <li>1) Draw text styling (bold, italic, underline)</li> <li>2) Padded area opacity</li> <li>3) Subtitle vertical alignment. When i give some value to VAlign it sometimes goes out of the window. how to calc...
1
1,545
Atom Package - Unable to verify the first certificate
<p>I've just installed the Atom text editor. When I try to install my first package I get the following error:-</p> <pre><code>"Unable to verify the first certificate" </code></pre> <p>This happens when trying to search for the package e.g. Emmet, AtomLinter. I've restarted my machine but I still get the same error m...
1
1,308
Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate com.sun.proxy.$Proxy0.toString()
<p>I am using JDKProxy to implement mybatis, but I have a question</p> <p>I have no code with <code>proxy.toString()</code></p> <pre class="lang-java prettyprint-override"><code>public class BootStrap { public static void start(){ MySqlSession sqlSession = new MySqlSession(); TestMapper testMapper...
1
1,044
Can't pass selected value DropDownListFor to javascript function
<p>My simpel test Model:</p> <pre><code>public class MovieModel { public string SelectedCategorieID { get; set; } public List&lt;CategorieModel&gt; Categories { get; set; } public MovieModel() { this.SelectedCategorieID = "0"; this.Categories = new List&lt;CategorieModel&gt;() {new Categ...
1
1,109
JPanels not added to JTabbedPane
<p> For my homework extra credit I am creating a JTabbedPane and adding two Jpanels. I feel like I am very close, but it still does not compile. When I run it, both JPanels open, but the JTabbedPane does not. I get a lot of Unknown Source errors. I suspect that at this point my issue in in the JPanels themselves becaus...
1
1,872
ThrottleService(79): unable reading network stats
<p>I am getting Exception <code>" ThrottleService(79): problem reading network stats"</code><br> I don't know why this is giving me exception and in the App there is some communication with server which is working fine but the XMPP packet listener which was working in past, is not working now. Can anybody tell me what ...
1
1,419
New/delete operator overload and base class
<p>whI have a big headache at the moment.</p> <p>Basically I have this :</p> <pre><code>Class A -&gt; Class B Class A -&gt; Class C Class A -&gt; Class D Class E with constructor with declaration E(int, A *objptr, bool IsObjPtrOwner = true) </code></pre> <p>As you see B C and D inherit from A, A being the base clas...
1
1,173
PrimeFaces + DataTable(edit row) + JAVA + MYSQL
<p>I would like to edit datatable row. My code here: </p> <p>There is my jfs page (Teszt.xhtml) <strong>UPDATED</strong>:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;ht...
1
5,915