title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Timer in the Service | <p>I have an app that records the time of the job, i mean that calculates the job time for that purpose i used chronometer to run the time. Since the job is 9 hours long so user can't open the app for that long. For that purpose i am using the Service which indicate the time. Since i cannot use Chronometer because</p>
... | 3 | 2,283 |
Exec To Another Program + Child Death | <p>I'm trying to write a program where, based on a user input value 'n', I'm going to fork that many processes to run <em>simultaneously</em>. In addition, each child is trying to exec to another file that I've created, that will generate a x sleep time, and a x exit value. Ultimately, when a child dies, the parent nee... | 3 | 1,097 |
Uncaught SyntaxError: Unexpected identifier in JavaScript - Quiz | <p>I need help. I wrote this JS code and when I want to see in the browser it shows only the created button with ID "submit". In console of the browser was written Uncaught SyntaxError: Unexpected identifier and kviz.js:38. I know I dont have a results part, but it doesn't matter now, it has to show me a question I thi... | 3 | 2,282 |
How to create a function for split that uses only awk and accepts any string as input and as delimiter? | <p>The proposal is to be a function using only awk for splitting strings that accepts any string as a delimiter and any string as an input.</p>
<p>How to create a function for split that uses only awk and accepts any string as input and as delimiter?</p>
<p>There are many, many proposals (<a href="https://stackoverflow... | 3 | 2,587 |
Branch.io deep link webhook: event contents between test and live mode are different | <p>I am trying to add referral functionality using branch.io deep link with a web hook. So, I’ve created the web hook by following the documentation (<a href="https://docs.branch.io/apps/deep-linking-api/#webhook-create" rel="nofollow noreferrer">https://docs.branch.io/apps/deep-linking-api/#webhook-create</a>) and set... | 3 | 1,741 |
remove whitespaces from text inside textarea | <p>I have a textarea and inside it, looping through a unserialized array.</p>
<p>I am trying to take text inside of textarea, break the string into an array with new line spaces as a separator, and serialize the array and store back to database.</p>
<p>But with these spaces, I am getting a whole string as a single ar... | 3 | 1,633 |
Calculate distance between points using gdist() for grouped subsets | <p>A subset of my data for 2 individuals (<code>squirrelID</code>) can be found <a href="https://figshare.com/s/ace5b44bc12394a7c46d" rel="nofollow noreferrer">here</a>.</p>
<p>My data looks as follows (only showing the relevant columns):</p>
<pre><code>lat lon NatalMidden squirrelID... | 3 | 1,452 |
Troubles with javascript calculator functions not being called | <p>Note: the problem seems to be mainly caused by the program being unable to call the functions correctly, as changing them to just be 'alert()' made them all work fine.</p>
<p>I recently wanted to make a calculator on an html page using javascript, which was going fine until I noticed that after I finished, the butt... | 3 | 2,964 |
Accessing a given child of a ControlTemplate programmatically | <p>I have this ControlTemplate that contains stuff (gradients in this case) that I want to be able to access programmatically and after hours of trial and error I feel that it's finally time to turn to you for assistance, StackOverflow.</p>
<p>The template generates a flower, and I didn't know what to use, so I just p... | 3 | 1,117 |
Enable multi user management in c# | <p>In the table <strong>users</strong> a MySql db for each user can be stored with a different color, for example:</p>
<pre><code>Users colors
Foo green
Pluto yellow
Foo red
</code></pre>
<p>When the user is authenticated I need to know what color is associated with the user who logs on.</... | 3 | 1,288 |
Web component IE11 with Svelte | <p>I'm struggling as I'm trying to adapt webcomponents made with Svelte for IE11. I managed to show the webcomponents in the browser but I did not manage make them fully functional.</p>
<p>When using <strong>Svelte transitions</strong> I get the following error:</p>
<p><code>object doesn't support property or method &q... | 3 | 2,914 |
jsonschema.exceptions.ValidationError: 'os-fault.json' is not of type 'object' | <p>I want to create JSON file the schema is 'http://json-schema.org/draft-04/schema#'.
This is JSON file that I write.</p>
<pre><code>{
"cloud_management" : {
"driver": "universal"
},
"node_discover": {
"driver": "node_list",
... | 3 | 3,350 |
Django Rest: Correct data isn't sent to serializer with M2M model | <p>I have a simple relational structure with projects containing several sequences with an intermediate meta model.</p>
<p>I can perform a GET request easily enough and it formats the data correctly. However, when I want to post the validated_data variable does not contain data formatted correctly, so I can't write a ... | 3 | 1,372 |
MediaElement doesn't play files from internal memory of device | <p>I'm writing a simple app which plays mp3 files with help of MediaElement. My test device has SD card. The problem is that app can play files from SD card but can't do that with the same files from internal memory.</p>
<p>Here are simplified parts of my code:</p>
<ol>
<li><p>MainPage.xaml</p>
<pre><code><Page
... | 3 | 1,173 |
Ruby Celluloid and resources consumption | <p>I'm new to Celluloid and have some questions about pools and futures. I'm building a simple web crawler (see the example at bottom). My URLS array dozen of thousands of URLs, so the example is stripped to some hundred.</p>
<p>What I now want to do is to group to max. 50 req/s using futures, get their callbacks and ... | 3 | 9,394 |
Laravel webpack vue code splitting lazy routes are not versioned | <p>I'm working on a Laravel + Vue SPA project and I tried to optimize the project with code splitting and defining lazy routes, but now every lazy route file are not being versioned.</p>
<p>Let's see if I can describe the problem.</p>
<p><a href="https://i.stack.imgur.com/Jtio0.png" rel="nofollow noreferrer"><img src="... | 3 | 2,499 |
Is there a way to understand clusters of zeros and then remove it from numpy array? | <p>I want to remove zeros from the middle of a numpy array (but not all zeros should be removed)</p>
<p>Removing zeros are demonstrated in multiple examples across stackoverflow, but I am still finding it hard to write a logic for my problem.</p>
<pre><code>import numpy as np
a = np.array([255,255,255,255,255
,255,2... | 3 | 1,303 |
h:inputText returning null values into Data table | <p>I'm sure this is a common problem but I can't seem to find a solution to it at all. Basically when I add the data I want into each of the input text boxes and click the command button all seen on the input page below, The data does not go through to the designated data table and I am left with null values instead.... | 3 | 4,071 |
How do I create a mobile version of Nav Bar | <p>I've posted the code for my nav bar in another post <a href="https://stackoverflow.com/questions/30032023/fixing-nav-bar-to-top-of-page">Fixing Nav Bar to top of page</a> and now I would like to create a mobile version it but I'm new to the whole realm of creating for mobile as when I learned web design there wasn't... | 3 | 1,749 |
CSS is not loading for Cypress component testing using angular | <p>I am trying to do component testing using Cypress component test runner. The web components are built using stencil. We compile the stencil components and create respective "Angular component" and import them into our projects.</p>
<p>The component is as expected when launched in the angular app. However w... | 3 | 7,939 |
How to turn on specific elements inside Button-group with javascript/jquery | <p>I have a btn-group inside the form to select between the 7 days of the week, the method is already working for create and edit forms... but in the Get view from the Edit I need to "Turn-on" the buttons that are already coming true from the object in the controller... I tried several ways ( you will see in ... | 3 | 3,486 |
Ignite compute broadcast closure - class not found exception | <p>The code <code>final Collection<Long> result = ignite.compute(group).broadcast(() -> 42L);</code></p>
<p>Throws an exception about not being to find the lambda's declaring class. What am I missing?</p>
<p>package com.example;</p>
<p>class IgniteSandbox() {
...</p>
<pre><code>public static void main(... | 3 | 2,063 |
Mask collision between two sprite groups | <p>My player attacks by throwing their weapon at the enemies. This is currently done by using a singular sword that gets thrown, then teleports back to the player to be thrown again. I want to change this so that I have a class called sword which I can call when the player wants to throw a weapon. However, I have no id... | 3 | 2,332 |
delay or setitimeout in ajax php codeigniter | <p>I have ajax call to calling a php function like this :</p>
<pre><code>$('#btn-footer').click(function(e) {
e.preventDefault();
var id = $("#id_user_edit").val();
var id_perusahaan = $('#id_perusahaan').val();
//console.log(id_perusahaan);
var nama = $('#na... | 3 | 4,502 |
Linking my encryption class to the DB and HTML form | <p>I'm going to jump in straight away.. I currently have the following code:</p>
<p>An Encryption Class:</p>
<pre><code>class Encryption {
var $skey = "cryptkey";
public function safe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+','/','='),array('-','_',''... | 3 | 1,956 |
The remote server returned an error: (415) Unsupported Media Type Vb dot net | <p>I am facing the issue in one of my vb dot net application while posting the values to web api method.</p>
<p>My code:</p>
<pre><code>Dim uri As String = "http://server/api/TMS/CreateIndent"
Dim request As Net.HttpWebRequest = Net.HttpWebRequest.Create(uri)
Dim headers As WebHeaderCollection = New WebHeader... | 3 | 1,676 |
JavaFX 15 TableView not displaying information | <p>I am working on a school assignment in Java using JavaFX 15. It's a simple number guessing game, where a random number is generated and the player guesses the number. When the right number is guessed the player can begin a new round or end the game. When the game ends a window displaying some statistics is supposed ... | 3 | 1,329 |
JavaScript remove double brackets (with inner text) from HTML block element | <p>I want to remove substrings like <code>[[any content here]]</code> (double-bracked text with brackets) from HTML block element.</p>
<p>When I use this, it works:</p>
<p><code>$('#comment-263353 .ticket-comment-body').html('Replaced with this text successfully!');</code></p>
<p>But when I try to replace my needed ... | 3 | 1,168 |
Get data from database and append data to aframe | <p>I want to get data from database and append that data to aframe. I did and data is getting from the database but not appending to the aframe scene. Here is my working flow.
This index file:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://aframe.io/... | 3 | 1,054 |
self submit form and cookie PHP | <p>I have a form that gets information from a database, after a user registers they are sent to a page where they make selection from radio buttons, after each selection I want to save the selection "10 in total" the first time the page show, the first selection shown and after that nothing. $count stay at 1 "not incre... | 3 | 1,345 |
How to optimize data aggregation in day of week, time of day for a period of one month back | <p>Here is the situation:</p>
<p>I have a SAAS Application which is a simple RSS Feed reader. I think most people know what this is - users subscribing to RSS feeds and then reading items from them. Nothing new. One feed can have many subscribers.</p>
<p>I've implemented some statistics for the users, but I don't thi... | 3 | 3,570 |
Missing plugin Amplifydatastore in Flutter using web | <p><a href="https://docs.amplify.aws/start/getting-started/integrate/q/integration/flutter/#querying-for-todos-and-observing-updates-in-real-time" rel="nofollow noreferrer">https://docs.amplify.aws/start/getting-started/integrate/q/integration/flutter/#querying-for-todos-and-observing-updates-in-real-time</a></p>
<p>So... | 3 | 5,884 |
Tensorboard debugger graph disappears, only queue left, why? | <p>I am trying to use the tensorboard debugger to debug my application. I see how the graph gets slowly build, but when the training starts I only see the queue nodes on the CPU and the rest of the graph and the whole GPU section is not visible anymore. It is easiest to explain with a few pictures.</p>
<p>Before I run... | 3 | 1,210 |
Dictionary different output than the trial site version | <p>
I try to use LIWC dictonary 2015 version in R.</p>
<p>A dummy text for text analysis:</p>
<pre><code>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ult... | 3 | 1,880 |
Cometd Oort Cluster - Spring configuration | <p>I am trying to enable Oort with multicast in our Comet app following <a href="https://github.com/cometd/cometd/blob/master/cometd-java/cometd-java-oort/src/test/java/org/cometd/oort/spring/OortConfigurator.java" rel="nofollow noreferrer">this</a> example. I just need the Oort now. Not the Seti part. But Oort doesn't... | 3 | 2,488 |
Fitting polynomials of different degrees to function with custom loss function | <p>I am trying to fit polynomial functions of different degrees to some data I generated and I am doing gradient descent without a library. I am also using a custom loss function that I manually calculated the gradient of (hopefully it is correct). The problem is I am getting infinity and nan for the mean of the square... | 3 | 1,125 |
Add different table in one email | <p>I have a system that automatically invoke an email.
What I want to do is when the system trap that today is FRIDAY I want to create a
different tables in one email.</p>
<p>As of now my system can invoke an email per day.</p>
<p>Here is what I want to achieve.</p>
<p>Example today is Monday The system will send ... | 3 | 2,996 |
Why can't Controller/Action path being found? | <p>I posted my observables from js to server-side. But I got this error message from firebug.</p>
<p><strong><em>"POST <a href="http://localhost:54964/Administration/User/CreateUser" rel="nofollow">http://localhost:54964/Administration/User/CreateUser</a>" 404 Not Found</em></strong></p>
<p><strong>UserModel.js (my k... | 3 | 1,028 |
Can't play video with AVKit | <p>I am trying to make a video player but somehow I can't see the video playing, although I can hear its sound. I've tried using AVPlayerViewController like so:</p>
<pre><code>import UIKit
import AVKit
class VideoPlayerViewController: UIViewController {
private var videoPlayer: AVPlayer?
private let ... | 3 | 2,720 |
How to use Google Recaptcha before doing an AJAX Post | <p>I have a form which submits data to a Kulahub API, using AJAX, but I need to verify first that the user filling in the form is genuine, then upon getting the OK from Google, do the AJAX post, however, I can't find a simple solution.</p>
<p>The Post works fine, and submits the data to the API.</p>
<p>Its the recapt... | 3 | 3,000 |
i would like to open comments and comments input form in a modal popup | <p>Here is my problem</p>
<p>where this button - link - php call:</p>
<pre><code> <a href="<?php bp_activity_comment_link(); ?>" class="fa fa-reply
acomment-reply bp-primary-action " id="acomment-comment-<?php
bp_activity_id(); ?>"><div class="comnekaj">Comment</div></a&g... | 3 | 2,792 |
Hierarchical Edge Cluster Group Name | <p>I have the following cluster graph which works mostly fine. AT a guess it's something to do with how I package things together?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><co... | 3 | 5,285 |
React App Table Help - Data is not rendering on page correctly | <p>I am trying to create an app that takes data from an API, puts it in a table, and paginates the data. I am currently in the beginning stages but I am already running into an issue. The data from the API below is not successfully rendering to the table I created. Below is a snapshot of the code, the only thing that p... | 3 | 1,172 |
adding new row in buttom of datagrid by editing cell one by one | <p>try to add new row at my datagrid "sgv1" , the content of the datagrid is bound to table "TOR" .. problem is when i try to put value to first cell and leave it , i get nullexception reference because of the other cells.
well that's right ,so how to deal with other cells .. how to pervent checking other cells untill... | 3 | 1,362 |
How to load a TImage using task dialog common icons? | <p>I'm trying to load icons used by Delphi's task dialogs into a <code>TImage</code> control.
As I've learned <a href="https://stackoverflow.com/a/36764762/4528159">here</a>, I'm using <a href="https://docs.microsoft.com/it-it/windows/desktop/api/winuser/nf-winuser-loadimagea" rel="nofollow noreferrer"><code>LoadImage<... | 3 | 1,429 |
Name in Sendgrid Email with Rails | <p>I'm using <a href="http://careerfoundry.com" rel="nofollow">careerfoundry's</a> tutorial on using Sendgrid to send emails with Heroku. I'm using their exact code for the user mailer and thank_you action in the pages controller. This code is working for the most part. The issue is that the subject line I receive i... | 3 | 1,067 |
Google Charts: Invalid column label | Category Filter as Column Selector | <p>I tried to use the fiddle <a href="http://jsfiddle.net/asgallant/WaUu2/" rel="nofollow">Code to use a CategoryFilter as a column selector by Andrew Gallant</a> to create a CategoryFilter in a Google Charts-LineChart.</p>
<p>The error I get is:
"One or more participants failed to draw()" &
"Invalid column label... | 3 | 2,730 |
How to resolve this reference error : Audio is not defined | <h4>Problem</h4>
<p>I'm trying to play some audio files in some specific situations.
e.g)</p>
<ul>
<li>When users access to login page, the audio plays 'Please enter your phone number'</li>
<li>when an error message alert comes up, audio file is played such as 'your phone number has been already registered'</li>
</ul>
... | 3 | 3,446 |
VisualStudio 2019: Switch app from Console to Windows, get tons of linker errors | <p>I have an OpenGL app I've just ported to Windows, and it works fine as a Console app. However, for the Release build, I'd like to avoid having that console terminal window pop up. My understanding is that all I have to do is go into Properties > Linker > System > SubSystem and switch it from Console to Wind... | 3 | 4,481 |
Pandas AttributeError: 'DataFrame' object has no attribute 'Timestamp' | <p>so i want to get the monthly sum with my script but i always get an AttributeError, which i dont <br />understand. The column Timestamp does indeed exist on my combined_csv. <br />I know for sure that this line is causing the problem since i tested al of my other code before.<br />
<strong>AttributeError: 'DataFrame... | 3 | 2,628 |
FromBase64String fails with Kendo charts | <p>I have Kendo charts drawn on a page and I am posting their image data to an action to save this base64 encoded data to a (SQL Server) database. </p>
<p>Here is the <code>exportImage</code> call in which I first split the base64 data from the dataURL:</p>
<pre class="lang-js prettyprint-override"><code>chart.export... | 3 | 1,068 |
Python download videos from HTTP URL with bad internet | <p>I have problem with downloading videos from my server e.g. <a href="http://screensfiles.dbtouch.com/screens2/Companies/89/HD/Cornaro%20USLUGE.mp4" rel="nofollow noreferrer">http://screensfiles.dbtouch.com/screens2/Companies/89/HD/Cornaro%20USLUGE.mp4</a></p>
<p>All works perfectly when internet is OK, but when I di... | 3 | 1,635 |
Problems with Forms => Variables are not accepted in the form | <p>Not sure where the problem is in the following form used in a template file in Drupal7. Help is highly appreciated. The problems are the following:<br>
1. The variables $title and $surname are not passed over to the form's default value.<br>
=> Error Message: Notice: Undefined variable: title in form_user_informa... | 3 | 1,589 |
Heroku/postgres error | <p>I am trying to deploy a ruby on rails app to Heroku and am getting and an error. I have followed the tutortial and added postgres to my gem file but when I try to "git push heroku master" I get the following error:</p>
<p><em><strong></em></strong> Output <strong>**</strong></p>
<pre><code>id: treebook $ git push... | 3 | 2,402 |
Error while integrating google_maps: 6.2.0 for flutter web | <pre><code>TypeError: Cannot read properties of undefined (reading 'maps')
at http://localhost:63982/packages/tripdesk_agency_web/app/pages/location/maps.dart.lib.js:57:47
at http://localhost:63982/dart_sdk.js:172648:63
at IdentityMap.new.putIfAbsent (http://localhost:63982/dart_sdk.js:28154:21)
at _eng... | 3 | 1,790 |
After adding Global Route Guards in Vue Router the URL won't update anymore | <p>I've been following the VueMastery courses and stumbled upon an unexpected problem I cannot seem to resolve myself.</p>
<p>Without using the Global Router Guards the URL updates normally on both modes. But as soon as I add the following hooks to my router (router/index.js) I get no errors whatsoever, but the URL wo... | 3 | 1,219 |
Elasticsearch Query DSL: Length of field, if field exists | <p>Say I have a field, <code>data.url</code>. Some our logs contain this field, some do not. I want to return only results where <code>data.url</code> is more than, say, 50 characters long. Really I just need a list of URLs.</p>
<p>I'm trying:</p>
<pre><code>GET _search
{
"query": {
"bool": {
... | 3 | 1,714 |
XPages - Field is not a valid date using bootstrap date picker | <p>Getting error as per the title....</p>
<p>I'm using the date time picker as described here: <a href="https://xpagesandmore.blogspot.co.uk/2015/06/using-bootstrap-3-datetime-picker.html" rel="nofollow">https://xpagesandmore.blogspot.co.uk/2015/06/using-bootstrap-3-datetime-picker.html</a></p>
<p>Everything works pe... | 3 | 1,647 |
Search keyword from HTTP response in #<Nokogiri::XML::Comment data | <p>I am using ruby to send a http request, and receive response. Now I need to search for a keyword in the response. I use Nokogiri::HTML(response.body) and following is the part of the http response that I want to look into for the keyword:</p>
<pre><code>#<Nokogiri::XML::Comment:0x0c24940 "\n\t<div style=\"flo... | 3 | 3,300 |
CompositeNavigationProp, 'undefined' is not assignable to type '{ a: ParamListBase; b: string; c: {}; }' | <p>In my ReactNative application, I have defined a stack-drawer composition like below</p>
<pre class="lang-typescript prettyprint-override"><code>const Auth = createStackNavigator<AuthStackParamList>();
const Main = createStackNavigator<MainStackParamList>();
const Drawer = createDrawerNavigator<DrawerP... | 3 | 1,475 |
Why am I getting error messages in my "customer.cpp" file | <p>I am unsure about why I am getting this error message when I hover over <code>purchaseArray</code> in my <code>string Customer::save()</code> method in the <code>customer.cpp</code> file:</p>
<blockquote>
<p>identifier is undefined</p>
</blockquote>
<p>And this error message when I hover over <code>getline</code> in... | 3 | 6,110 |
HTTP Request authentication for SPARQL Insert in Virtuoso endpoint | <p>I am trying to perform a SPARQL Insert in a Graph that I have loaded in Virtuoso, doing it trough a HTTP Request against the Virtuoso endpoint.</p>
<p>For the HTTP Request I am using <a href="https://github.com/axios/axios" rel="nofollow noreferrer">axios</a>, and I have already made some SPARQL Select queries succ... | 3 | 1,401 |
Images uploaded with ImageField doesn't show | <p>I have such problem: From django admin I'm trying to upload a cover image for my article, but image doesn't show on template, and its name is written in red <a href="https://i.stack.imgur.com/Xki7p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xki7p.png" alt="like in this picture"></a> in PyChar... | 3 | 1,037 |
PHP Sign up page | <p>Here's registo.php</p>
<pre><code><html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.m... | 3 | 1,960 |
Aurelia - Unhandled rejection - Chart.js and Moment.js | <p>I have trouble with aurelia, chart.js and moment.js. </p>
<p>Actually I'm using moment.js and chart.js separately in other classes and it works find. Nonetheless if I try to use chart.js time-scale feature for drawing a plot with a time-dimesion on the x scale I get this error: </p>
<pre><code>[Warning] Unhandled ... | 3 | 2,306 |
Passport Not Authenticating Correctly | <p>This is my first time doing user authentication and I think I'm nearly complete. I'm using Express with Passport.js and MongoDB/Mongoose. When I run my gulp file everything loads correctly but when I attempt to login with my credentials I'm constantly redirected to the failure page (home screen). Here's my code:</p>... | 3 | 1,376 |
failed to lazily initialize a collection of role custom UserDetailsService | <p>I am trying to customize <code>UserDetailsService</code>, my class is:</p>
<pre><code>@Service
public class UserService implements UserDetailsService {
@Override
// @Transactional
public UserPrincipal loadUserByUsername(String username) {
UserPrincipal principal = userRepository.getByUsername(use... | 3 | 5,849 |
How to edit user (even password) with SpringSecurity Core and UI in grails | <p>my goal is to create an edit page where the user can change his data.</p>
<p>this is my _form:</p>
<pre><code><div class="fieldcontain ${hasErrors(bean: user, field: 'firstName', 'error')} required">
<label for="firstName">
<g:message code="userSec.firstName.label" default="First Name" />
<spa... | 3 | 1,873 |
jquery error from variable selector name. Can someone show me the proper way to do this? | <p>If it isn't clear what I'm trying to do here, I need to select a dynamically generated class from the document and bind a click function to it. Here is the code. Selecting the variable class, if it exists is posing the problem.</p>
<pre><code>if( item.current == '2' )
{
... | 3 | 1,147 |
How can I push new value to array of object by dynamic key in useState? | <p>I have a website for recording the video 15 seconds.
And I want to capture <code>canvas</code> to <code>blob</code> every 40 millisecond. (25FPS)
So, then I should to get 375 blobs.</p>
<pre class="lang-js prettyprint-override"><code>// requestAnimationFrame
const loop = async () => {
sequenceRef.current = setT... | 3 | 1,210 |
CSOM Query paginated Files results | <p>Trying to figure out how to update the following code to get paginated results by passing 'page' and 'pageSize':</p>
<pre><code>using (ClientContext spClientContext = new AuthenticationManager().GetACSAppOnlyContext(siteUrl, _clientId, _clientSecret))
{
if (spClientContext != null)
{
CamlQuery camlQu... | 3 | 1,381 |
Speed up placing imgs inside a div without overlap | <p>U use this script for spreading <code>img</code>s inside <code>div</code>, without any overlapping.</p>
<p>Result is good but it's too slow. How can I accelerate this?</p>
<p>I mean, sometimes my browser is crashing because input positions of images are "bad".</p>
<p><strong>CSS</strong></p>
<pre><code>.gallery{... | 3 | 1,309 |
Mysql JPA throws javax.transaction.RollbackException: instead of ConstraintViolationException | <p>I am using Mysql & JPA on Jobss7.1 for astruts2 based application.
I use user transaction not CMT.
I would like to catch ConstraintViolationException when I insert a duplicate row into the table</p>
<p>the below code catches the javax.transaction.RollbackException but not ConstraintViolationException</p>
<pre>... | 3 | 8,025 |
upgrading from Hiberante 3 to Hibernate 4 can't persist data to datatbase | <p>OK, we have an Hibernate 3 application that I am trying to update to hibernate 4. I can retrieve the data without any problem, but cannot add or update the database. I don't get any error messages, the transaction seems to work, but nothing gets changed in the database. Some help would be greatly appreciated.</p>
<... | 3 | 3,532 |
How to change VAR? | <p>I've got a part of a PHP script, but it gives a T_CLASS error.</p>
<p>But i'm not sure how to convert the VAR element into a php5 compliant code...
Can somebody help me?</p>
<pre><code><?php // Defining the "calc" class
if (!class_exists('calc'))
class calc {
var $number1;
}
?>
</code></pre>
<p>p.s. this is... | 3 | 1,097 |
Why the div element is not appearing Infront of the current div but its only visible at the static div? | <p>The problem is when I click the Option (button) that appears on every div after I fetch the data using the While loop it only appears the top div but not the current div that I am viewing. This is the picture when I click the Option it only appears the one place:<br />
<a href="https://i.stack.imgur.com/AHhT3.png" r... | 3 | 1,466 |
Xamarin widget button, NameResolutionFailure HttpWebRequest | <p>So I am facing what I think is a strange problem.</p>
<p>I have made a small xamarin app that uses a widget button to POST to a server using HttpWebRequest. Everything works just fine when I use my phone in debug mode trough VS.</p>
<p>But when I disconnect my phone and try to use the app I get the NameResolutionFai... | 3 | 1,649 |
React Link changes URL on the browser but doesn't render new content | <p>I am building a chat app and trying to match the id params to render each one on click.I have a RoomList component that maps over the rooms via an endpoint /rooms</p>
<p>I then have them linked to their corresponding ID. THe main components are Chatroom.js and RoomList is just the nav</p>
<pre><code>import moment fr... | 3 | 2,346 |
EF Core - Creating Unexpected Incomplete Rows in Sql Server LocalDb | <p>I have a new VS2022 solution with EFCore 6.0.1 available at: <a href="https://github.com/RobBowman/BillByTime" rel="nofollow noreferrer">https://github.com/RobBowman/BillByTime</a></p>
<p>I've created a db context to represent the following:</p>
<p><a href="https://i.stack.imgur.com/bPI8g.png" rel="nofollow noreferr... | 3 | 3,705 |
can't make work together opencv and kivy with buildozer on android smartphone | <p>I have a problem can't make work together opencv and kivy with buildozer on android smartphone. On pc works fine but when I packaging with buildozer and put in on android device it seems that opencv don't work properly and immediately crashes, I have already tried to grant permissions to camera but nothing, here is ... | 3 | 5,409 |
How to redirect_to root after users/sign_up with devise? | <p><em>Running Rails (v7.0.1), ruby (v3.0.1) and added the devise the gem to the Gemfile.</em></p>
<p>I'm testing the users/sign_up route in the browser on localhost:3000/users/sign_up.
It successfully saves the user to the database (postgresql)
I want to redirect_to root after sign_up,
just like the sign_in currently ... | 3 | 1,310 |
Optimizing .gs search & replace script? | <p>Hoping someone could just point out my probably obvious mistakes.</p>
<p>Code searches a Data page & copies matched info to a Results page. This is fine & works quickly.
What happens is when I add an overwrite section to the script. It overwrites matched entries as "Done" on the data page, so if th... | 3 | 1,044 |
Bitbake depends AAA packet, it will rdepends AAA-dev | <p>I add depends packet to a exist <code>.bb</code> file, such as add <code>DPENDS="AAA"</code> line to <code>.bb</code> file, when I compile the <code>.bb</code> file, it failed for <code>XXX rdepends on AAA-dev [dev-deps]</code>, and I search google, all the answer almost is add line <code>INSANE_SKIP_${PN} += "dev-d... | 3 | 1,522 |
How to find difference between two same array in JS? | <p>I want to find difference between two arrays. I tried below code from one of the solution given on SF community, but not working from me.</p>
<p>My below code is not working if there is number repeated EVEN NUMBER of time(like <strong>"7"</strong> repeated twice in both the arrays <strong>a & b</strong... | 3 | 1,217 |
Generate APK's with different keystores | <p>I've created project with different flavors.
Each flavor has it's own application id and it's keystore and password.</p>
<p>On gradle file, I added the <code>signingConfigs</code> section to set the <code>keyAlias</code>, <code>keyPassword</code>, <code>storeFile</code> and <code>storePassword</code>.</p>
<p>Next... | 3 | 1,277 |
Sorting php object by nearest dates | <p>I have php object getting by new WP_Query( $query_args ). I need sort that object by nearest date. Every event have start date and end date. If the start date of the event is closer to today, this event should be the first in the output.</p>
<p>This is my object in $result value.</p>
<pre><code> array(4) ... | 3 | 6,517 |
How to get the market products from checkbox after clicking button? | <p>I have a list of products and every product has a checkbox. I want to get the market products when I mark them and click the button "Add To Cart". When I try to dump the products, there are no data in the array.</p>
<p>Here is my Twig</p>
<pre><code>{% extends 'base.html.twig' %}
{% block body %}
<link rel... | 3 | 1,468 |
Python - Unintended replacement of original data | <p>I am currently trying to run a program that takes a 2D array and filters out Nan values and high-amplitude noise. </p>
<p>The program does this by deconstructing the 2D array first into row slices and then by index of each row, replacing Nan values and values that are greater than the 1st standard deviation of the ... | 3 | 1,209 |
PHP error checking for DST, Daylight Savings Time | <p>Since the time has just changed the past weekend in places that use Daylight Savings Time I'm sure there's going to be a few queries related to this.</p>
<p>I am trying to determine if a date used DST or not. For this I assume the 30th of October 2011 does not use DST, as the switch occurred on that date..is this ... | 3 | 1,030 |
advice with removing object from react state array | <p>So this has me puzzled. I've been banging my head against the wall trying to figure this out.</p>
<p>So I am trying to remove an object from a state managed array. I don't believe I am mutating the array.</p>
<p>I am using prevState. My delete function which gets sent to another component</p>
<pre><code>{this.state.... | 3 | 3,194 |
Java ActionListener not responding | <p>hello all been using this site for ages as a lurker but come across this problem and cant find the solution Anywhere...</p>
<p>i have actionlistener in a inner class that just wont respond... any chance you guys could look over my beginner coding and see what you think?</p>
<p>sorry theres so much code here the on... | 3 | 3,183 |
FlexBox in SwiftUI | <p>Good day.
I am trying to release dynamic placement of elements based on their size. Works in an empty project, but sometimes does not show the entire text. And in a working project, a maximum of 2-3 elements are displayed. Maybe I'm on the wrong path. Please tell me in which direction to look.
I thought to use UICol... | 3 | 3,248 |
Deserialize an abstract class that has only a getter using Newtonsoft | <p>I'm trying to deseralize JSON I'm getting:</p>
<pre><code>[
{
"Name":"0",
"Health":0,
"TypeName":"SpellInfo",
"Info":{
"Effect":1,
"EffectAmount":4
}
},
{
"Name":"1",
"... | 3 | 1,592 |
Auto ajust and fit width items on using weight | <p><strong>THE PROBLEM:</strong></p>
<p>I have to display multiples rows.
Each row has an internal weight: the description has a specific weight, the price, and so on.</p>
<p>In the following pictures, you can see two kind of screenshot. The first one shows each row perfectly.</p>
<p>The second one, some prices not ... | 3 | 2,219 |
Getting Error When Using Next.js With Jest | <p>I am trying to run a test in next.js using jest, but i keep getting an error:
<code>The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment.</code></p>
<p>I have tried following the link ... | 3 | 1,547 |
Angular Eslint config is not extending Project Eslint config | <p>I have an angular 12.x project and it uses eslint, this is the current root configuration file:</p>
<pre><code>{
"env": {
"browser": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": &qu... | 3 | 2,404 |
How I can parse HTML from Blazor-based website? C# | <h1>THE PROBLEM</h1>
<p>There is a web page with students' schedules: <a href="https://education.khai.edu/union/schedule/" rel="nofollow noreferrer">https://education.khai.edu/union/schedule/</a>.</p>
<p>When I make a request by the link I get "empty" HTML. It means that responded HTML contains JS-scripts onl... | 3 | 4,057 |
RBAC rules not working in cluster with Kubeadm | <p>In one of our customer's kubernetes cluster(v1.16.8 with kubeadm) RBAC does not work at all. We creating a ServiceAccount, read-only ClusterRole and ClusterRoleBinding with the following yamls but when we login trough dashboard or kubectl user can almost do anything in the cluster. What can cause this problem?</p>
<... | 3 | 2,059 |
Django renders information to wrong database field | <p>so I was implementing a database in Django to take in username and password using the given Users model. However, when I hit submit the password gets taken into the email field. Any suggestions on what I could be doing wrong? This is for user signup. Thank you! could it be that Users does not come with a passwords s... | 3 | 1,705 |
Aggregate duplicate records with Linq in polymorphic case | <p>I would like to aggregate records stored in a <code>List<></code>. </p>
<p>In the case I got a <code>List<int></code>, the solution would be </p>
<pre><code>var results = list.GroupBy(x => x).Select(g => g.Sum());
</code></pre>
<p>In the case I got a <code>List<MyObject></code> with </p>
... | 3 | 1,226 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.