title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Error: com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type com.sam.simple.Project | <p>I was trying to store user information, for instance a NAME. But I got into some error. Searched and applied methods, but I got errors, logCat is posted below. Can I get a workaround please?</p>
<p>I want to add a new root called "USERS" and user info under that, like a user profile.</p>
<p>But now I just want to ... | 2 | 3,647 |
Does webpack remove custom variables or event listeners attached to `window` in production? | <h2>The problem:</h2>
<p>We're facing an issue where any event listeners or global variables we attach to <code>window</code> does not seem to be there in our <code>production</code> build (but they are there in the <code>development</code> build).</p>
<ul>
<li>Webpack config: <a href="https://gist.github.com/saadq/9f2... | 2 | 1,276 |
Android Cocos2dX JNI Bridge | <p>I am new to using Cocos2d-X and am just experimenting using JNI in my application. So here is my java code</p>
<pre><code>public class JNITest {
public static native void printSomething();
public static void printSomethingFromJava(){
printSomething();
}
}
</code></pre>
<p>I use javah to g... | 2 | 1,630 |
Using Plates in PHP | <p>I'm new to using Plates template library for PHP. I have a few questions about how to use it.</p>
<p>I'm looking through the docs I don't see a way to set a global layout. Is there not a way to do that?</p>
<p>I'm using it inside of Codeigniter. Ideally, I'd like to set the layout in the MY_Controller file for mos... | 2 | 1,956 |
Exception in thread "main" org.scribe.exceptions.OAuthException: Response body is incorrect | <p>While running example of scribe to login with google it is showing following error.
I am using scribe-1.3.1.jar file.
Please tell me how to resolve it.</p>
<p>code is:</p>
<pre><code>import org.scribe.builder.*;
import org.scribe.builder.api.*;
import org.scribe.model.*;
import org.scribe.oauth.*;
public class go... | 2 | 1,231 |
The pgAdmin 4 server could not be contacted: Fatal error | <p>I upgrade PostgreSQL from 13.3 to 13.4 and got a fatal error by pgAdmin 4. I found other similar question that try to fix the problem deleting the folder: "C:\Users\myusername\AppData\Roaming\pgadmin\sessions" and running pgAdmin as admin but nothing happen. Also i completely remove postgres and reinstall ... | 2 | 2,817 |
How can I use Perl's LWP::UserAgent to fetch the same URL with different query strings? | <p>I have a running LWP::UserAgent that should be applied on following URL:</p>
<pre><code>http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=5503
</code></pre>
<p>This runs with many many similar targets see the following endings:</p>
<pre><code>html?show_school=5503
html?show_school=9002
ht... | 2 | 2,919 |
Align vertical and horizontally an image in Owl Carousel arrow slider | <p>I have an owl carousel setup in my page and I made a custom arrow beside my slider so it looks like this:</p>
<p><a href="https://i.stack.imgur.com/gCfM0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gCfM0.png" alt="enter image description here"></a></p>
<p>What I want is to align vertically m... | 2 | 1,103 |
RunTime Class not found Exception | <p>I got a stacktrace error while running the code. </p>
<p><strong>MainActivity.java:</strong></p>
<pre><code>package com.example.android.effectivenavigation;
import android.app.ActionBar;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.... | 2 | 6,364 |
How to create JSON API service from mysql database in php | <p>I have following mysql database table</p>
<pre><code>id | majorFoodName | cropName | foodType | foodName | quantity | form
1 | Recipe1 | Rice | Breakfast | Foodname1 | 500+60 | 2000
4 | Recipe2 | Rice | Breakfast | Foodname2 | 500 | 1000
6 | Recipe1 | Wheat | Breakfast | F... | 2 | 1,030 |
Laravel Eloquent hasMany\hasOne limit parents to children with records | <p>Using Laravel Eloquent and a hasOne()\hasMany() relationship, is it possible to limit the "parent" table to only retrieve results if a "child\foreign" relationship exists?</p>
<p><strong>FOOS</strong></p>
<pre><code>+----+------------+
| id | etc |
+----+------------+
| 1 | one |
| 2 | two |... | 2 | 1,049 |
How to delete TableViewCell that being a Dictionary Swift | <p>I am trying to delete a table view cell using swipe to delete, but I can't use the line I marked in my code, not sure why. My cells are being made by a Dictionary, with the key for the title and the value for the details.</p>
<pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndex... | 2 | 1,127 |
Infusionsoft webform redirect based on drop down selection | <p>I have a form crated in Infusionsoft that is basically 2 input fields: name and email a drop down select option and a submit button submit button. the form submits to infusionsoft and then re-directs to a thank you page. </p>
<p>I would like to have the user re-directed to a thank you paged that is based on the opt... | 2 | 5,708 |
checkbox checked with php on page load | <p>I am new in programing and stuck at a point. I am using an API which returns multiple values in an array. I get these values in a form which contain check boxes, I just want those check boxes to be checked which have been returned by API. Means it like a ticketing system. For example i have array of seatdata and i w... | 2 | 1,913 |
check if member is of a group | <p>I use buddypress with multiple groups. Every user can also join multiple groups as a member. I use custom profile fields for e.g. the address. Every member can select, who is able to view his profile. This try is based on the plugin 'User Profile Visibility Manager'. Now I need an additional option: View the profile... | 2 | 1,301 |
Flutter how to get the value of a stateful widget's field? | <p>I have a Flutter app, which uses a <code>BottomNavigationBar</code>. I have made a class called <code>CustomBottomNavBar</code>, which describes my <code>BottomNavigationBar</code>. There, I have an integer field called <code>currentIndex</code>, which is the index of the currently selected icon on the navigation ba... | 2 | 2,779 |
Open a modal for a specific card from a list of cards using React hooks | <p>I am using an API to fetch and render the data it into cards. I want to render a corresponding modal for each card when the card is clicked. I am using the <a href="https://material-ui.com/components/modal/" rel="nofollow noreferrer">React modal component</a> by material-ui (the simple modal example). The problem is... | 2 | 3,195 |
How to avoid multiple regions being created in wavesurferjs | <p>i'm using <code>wavesurferjs</code> <a href="https://wavesurfer-js.org/" rel="nofollow noreferrer">https://wavesurfer-js.org/</a> with regions plugin</p>
<p><strong>my problems are:</strong></p>
<ol>
<li>i want to avoid <strong>multiple</strong> regions being created, <strong>only 1</strong> region i want to allo... | 2 | 1,050 |
Method doesnot override method from it's super class | <p>I just copied this code from somewhere put when I tried to run it says method doesnot override method from it's super class. I am a newbie to java inheritance. Please help me understand this. How can I solve this? This error is shown for last two @override methods.</p>
<pre><code>public class MapViewFragment extend... | 2 | 2,867 |
Real Time Update of Devexpress Gauges | <p>I have managed to create a circular guage using Devepxress following their code examples but I have a problem. Once the control is created I do not no how to use their function to update the controls.</p>
<p>They do have an example of how to use a updatepanel so I am considering my best option would be to add an up... | 2 | 1,074 |
Can Hibernate Search index build performance be improved using projection? | <p>I have an entity containing around 40 columns and 7 collections. The collections are not lazy loaded. Indexing 500 000 entities using Hibernate Search MassIndexer takes around 2-3 hours. I use the code below:</p>
<pre><code>fullTextSession.createIndexer()
.batchSizeToLoadObjects(1000)
.threadsToLoad... | 2 | 1,144 |
WebSecurity.ConfirmAccount(Id) is always false | <p>Ive got a problem: my websecurity always throws false on confirmation. What am I doing wrong?
Here is my Validate Action(Ive debugged it, the id received is the right confirmation token:</p>
<pre><code> public ActionResult Validate(String Id)
{
if (String.IsNullOrEmpty(Id))
{
retu... | 2 | 1,731 |
MySQL right syntax to use near ',fields terminated by ',' optinally enclosed by '"' lines terminated by '\n' ign' at line 1 | <p>I have a csv file which I have uploaded here
<a href="https://drive.google.com/file/d/1JfYc-7840utoa3k5iamEC-sScPlzsVVK/view" rel="nofollow noreferrer">https://drive.google.com/file/d/1JfYc-7840utoa3k5iamEC-sScPlzsVVK/view</a>
I have created a Table Titanic it has following structure.</p>
<pre><code>mysql> desc... | 2 | 2,534 |
Using Javascript to generate HTML that contains JSP | <p>I am making a web view using jsp, javascript and html. I have a list of elements that when clicked on calls among other things the javascript function generatePictureSlider. The idea is that a set of pictures is associated with each element in the list and a slider is created when one of the elements is clicked on. ... | 2 | 1,114 |
Angular 4.4.0-4.4.2 production build throwing "No provider for NgForm!" error | <p>I am getting </p>
<blockquote>
<p>"No Provider for e!"</p>
</blockquote>
<p>error when running my Angular application in production mode. On development mode it is working fine.
I am getting following error:</p>
<p><a href="https://i.stack.imgur.com/bvOLd.png" rel="noreferrer"><img src="https://i.stack.imgur.co... | 2 | 1,248 |
Fragment ViewPager with CustomListAdapter and Volley? | <p>I need <code>public class FragmentB</code> that extends <code>ActionBarActivity</code>. It has no errors, but when I try to call it in an adapter.</p>
<p>FragmentPagerAdapter code: </p>
<pre><code>public class FragmentPagerAdapter extends android.support.v4.app.FragmentPagerAdapter{
private static int NUM_ITE... | 2 | 2,902 |
D3.js idles between each mousewheel event | <p>I am having an issue with d3.js when I try to zoom in and out on a graph. The zoom is very slow and laggy. I am trying to debug by using the profiling tool (Opera/Chrome). I was expecting my zoom callback function to be the limiting factor but it turns out there is a lot of idle time between each mousewheel scroll e... | 2 | 3,238 |
Dynamically adding row asp.net (on button click) - using dynamic HTML - row not shown | <p>I have at table and a button. The first time the page loads, this method is called and it works perfectly. When I press the button ' New Slot' and this method is called, I am able to see during debugging that row.count increases for this table, yet in the browser, a new is not rendered (so it isn't the case that may... | 2 | 1,170 |
Knit table with kableExtra package not showing desired output format | <p>I am trying to knit a table as html ouput in Rmarkdown. When I run the print table chunk in RStudio, I do get the desired output format in the Viewer tab:</p>
<p>However, when I try to knit the whole code to html, the table appears to lose its format in the html document:</p>
<p><a href="https://i.stack.imgur.com/... | 2 | 1,230 |
LLVM codegen linker error | <p>I'm writing a compiler for the Decaf language. I'm done with the lexer (flex) and parser (bison). Also, I've generated the AST and implemented type checking. I am now trying to implement codegen using LLVM IR.</p>
<p>However, while linking the files, g++ throws up errors saying it cant find llvm::getGlobalContext()... | 2 | 1,615 |
Direct2D ID2D1RenderTarget::CreateBitmapFromWicBitmap fails with no error | <p>I just try to add LoadBitmapFromFile function from sample (from SDK) to my MFC project. So my app fails during runtime on line, no errors, no warnings. </p>
<pre><code>hr = pRenderTarget->CreateBitmapFromWicBitmap(pConverter, NULL, ppBitmap);
</code></pre>
<p>When I debugging it and goes over this line I rec... | 2 | 1,815 |
how can i set starting position of a tabs in swipe Tabs for removing there scroll? | <p>I make a phonegap app for using swipe tabs i have four tabs and every tab have a specific div getting dynamic data using Ajax. the tabs simply work fine. but there have a problem in scroll bar. suppose i have in First tab page then Ajax call and get data from URL. suppose he get 100 data from the URL now for seeing ... | 2 | 2,002 |
iOS - Terminating app due to uncaught exception 'NSInvalidArgumentException' | <p>So I am really new at developing for iOS, and I've been doing my best, to search for an answer, to debug it and anything I could come up with.</p>
<p>Though, I haven't been able to find a solution to the issue.</p>
<p>I've been trying to fetch an external JSON document, which works fine, but when it comes to parsi... | 2 | 1,065 |
complex XML to array in codeigniter | <p>I am getting complex XML as a response i need to convert in to an array, here is my sample complex XML</p>
<pre><code> <?xml version="1.0" encoding="UTF-8"?>
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SearchResult>
<Re... | 2 | 1,138 |
RecyclerView in FragmentPagerAdaper only updates when screen is rotated | <p>I have a fragment in a FragmentPagerAdpater. The Fragment is basically a RecyclerView. The source for the RecyclerView is provided by a Loader which is inside the Fragment.</p>
<p>My problem is that the list appears empty when it is first instantiated. But when I rotate the screen, it appears fine. </p>
<p>Do you ... | 2 | 1,341 |
Select a images from a folder and then display it in a selectlist or just display it | <p>Hi guys im really new at this!</p>
<p>I have been stuck here for along time. Please i really need your help. Thanks!</p>
<p>My question for you are. How can i display all of my images to a Selectlist or dropdownlist in MVC and then post it on the site? I got a database with PicID, PicTitle etc..</p>
<p>I want to ... | 2 | 1,574 |
Flipping a textview in android in 2 parts, setting some text inbetween | <p>Following the tutorial on this page and modifying the code slightly, I have managed to get what I want working (almost).</p>
<p><a href="http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html" rel="nofollow noreferrer">Android Animations 3D flip</a></p>
<p>What I would like to do is flip a textview fro... | 2 | 1,351 |
foreign key field is null in a one to many relationship (symfony2) | <p>I have two tables with an <code>one to many</code> relationship. My code works fine and the form uses interactive mode for adding details, but when I submit it, everything except the <code>foreign key id</code>, which is <code>null</code>, is saved. Therefore the data on the secondary table is not in a relationship ... | 2 | 5,121 |
Windows Phone - using mutex for Isolated Storage | <p>I am trying to secure my isolated storage with mutex so I can access it from both mobile application and <code>BackgroundAudioPlayer</code>.</p>
<p>These are my helpers class to access files in isostorage:</p>
<pre><code> public static async Task WriteToFile(string text)
{
using (var mut = new Mutex... | 2 | 1,775 |
Loop through all checkboxs in a div with certain class | <p>i want to loop through certain checkboxes with a specific class that are inside a div.
I know how i can achieve this by adding ID's to each and everyone of them but that's not what i want to go for. Below is my code</p>
<p>JS</p>
<pre><code><script>
function calculate()
{
$('#payments').find('.checkBoxP'... | 2 | 1,241 |
How to let child view controller add UISearchBar to parent's UINavigationController? | <p>How to let child view controller modify navigation controller?</p>
<p>I am faced with this problem right now, and have not been able to find a solution that works, let alone one that works well.</p>
<p>Basically, right now I have a <code>UINavigationController</code> that contains a <code>UITableViewController</co... | 2 | 1,141 |
Sklearn FitFailedWarning: Estimator fit failed. ValueError: kth(=-9) out of bounds (1) | <p>I am currently working through a sample tutorial on the california-housing-prices dataste and I am facing this issue when trying to do a grid search for data preparation choices.</p>
<p>Code</p>
<pre><code>num_pipeline = Pipeline([
('imputer', SimpleImputer(strategy="median")),
('attribs_adder', Co... | 2 | 1,846 |
Why I have tidy is missing error runi ng docker container | <p>I create docker container for Laravel 5.5.18 app
with next options in web/Dockerfile.yml :</p>
<pre><code>FROM php:7.1-apache
RUN apt-get update -y && apt-get install -y sendmail libpng-dev libtidy-dev libtidy5 libtidy-dev tidy
RUN docker-php-ext-install \
pdo_mysql \
gd \
tidy \
&&a... | 2 | 2,012 |
Javascript Overlapping, Set Z order of Jquery | <p>Ok I'm stuck. I am using opencart, and I have added the jquery zoom plugin so that the images can be magnified.</p>
<p>Since doing this it is now conflicting with the menu, I cant figure out what to do?</p>
<p>Is there any sort of way of setting a sort order of the jquery on the page. I have tried the JQuery topZI... | 2 | 1,234 |
Calc() pixel height dynamically based on dynamic width and ratio with CSS | <p>Been trying what seems to be an uphill battle.</p>
<p>I have an image, 768px x 411px. It must be fixed because it is part of a javascript scratch game. It can be resized though, but it must have fixed values.</p>
<p>My idea is the set the width to 100vw, then calculate the aspect ratio of the image and then base d... | 2 | 1,078 |
Json.Net deserializing fails with collection of derived types | <p>After trying almost any solution here on SO (<a href="https://stackoverflow.com/questions/15880574/json-net-how-to-deserialize-collection-of-interface-instances">this one is the lastest</a>) I gave up and decided to ask for your help.</p>
<p>I'm trying to serialize/deserialize a collection of objects that extend a ... | 2 | 3,177 |
ngx-quill: Unable to create a custom list blot | <p>In short: I am trying to create a custom list blot to show a letter list in ngx-quill.</p>
<p><strong>What I have done so far:</strong>
I created a custom list blot by coping and pasting from "<a href="https://github.com/quilljs/quill/blob/develop/formats/list.js" rel="nofollow noreferrer">https://github.com/quill... | 2 | 1,499 |
PHP: checking if YT url is valid and if video exists | <p>The function purpose is to validate the URLs of a YouTube video and check if the video exists. This is a snippet of my actual code. I manipulate the string to my desired format and then i proceed to check if it is valid and exists. If it passes the test, then i echo the results. The problem is that I am not calling... | 2 | 2,478 |
solve maze by right hand principle | <p></p>
<p>hello there<br>
i am solving a text book exercise to solve a maze by right hand principle<br></p>
<p>i use switch case to deal it<br></p>
<p></p>
<pre class="lang-html prettyprint-override"><code>switch ( face )
{
case face_EAST:
{
if( map[x][y + 1] == '.' && map[x + 1][y] == '#' ... | 2 | 1,996 |
AWEBER javascript integration | <p>i have 2 raw aweber html code, they are in separate accounts. now i want to have 1 sign up form for this two raw codes. Means when someone sign up on my form, the email should the be saved on my two list. but i got problem on how to integrate this two codes. When i remove 1 form it work for only 1 list but when i in... | 2 | 2,367 |
How to run master/slave Locust runner programmatically so slaves stops at the end | <p>I have this simple master/slave scripts, using <code>locustio==0.13.5</code>. This is the master:</p>
<pre><code>#!/usr/bin/env python3
import logging
import argparse
import os
import sys
import time
import urllib3
import locust
import utils
class TestSomething(locust.TaskSet):
@locust.task(1)
def get... | 2 | 1,120 |
Web Api OData v3 - Cast or IsOf Function must have a type in its arguments | <p>I have a base entity (<code>Store</code>), with two other types that implement it (<code>Customer</code>, <code>Engineer</code>).</p>
<p>However when I try to filter for a certain type:</p>
<pre><code>http://localhost:50050/odata/Store?$inlinecount=allpages&$top=20&$filter=isof(MyNamespace.Data.Core.Entiti... | 2 | 1,190 |
Php 8.0 update does not parse from httpd | <p>I updated php on my test platforms from php 7.4 to php 8.0. The update on the Centos 8 box works normally. The one on Centos 7 does not. The page with <code><?php phpinfo() ?></code> comes up blank while my tester page simply shows the code as text.</p>
<p>The command line seems to work:</p>
<pre><code>[lhadmi... | 2 | 1,856 |
AWS Glue Dynamic Frame to JDBC update operation | <p>I need to read file from S3, load data from db ,compare data and update a table in postgresql . Below is myinput file </p>
<pre><code> tconst|averagerating|numvotes|
+---------+-------------+--------+
|tt0000001| 5.6| 1609|
|tt0000002| 6.0| 197|
</code></pre>
<p>My Table has below col... | 2 | 1,060 |
How to pass ArrayList from Adapter to activity? | <p>I need send ArrayList list_add to activity but I don't know how I can do it if is possible share it on main activity for use it in the future.
Anyone can help me to implement a method for do it?
below have MainAdatper for recyclerview where I have a list_add and want passed it to main activity and after I can add it... | 2 | 1,287 |
React/redux: error rendering nested object properties | <p>I have a react/redux front-end that receives data via RabbitMQ. When a message arrives, our message handler will dispatch an action, e.g. <code>PRODUCT_DETAILS_LOADED</code>, that updates the store and renders the appropriate component with the product details. This is 95% working, but if I try to display nested o... | 2 | 1,588 |
Python Pandas Key Error | <p>I am trying to compare two Excel files and output a file that will let someone see the differences between the two files. I get a key error and I'm not sure how to fix it?
Currently my full code is:</p>
<pre><code>import pandas as pd
import numpy as np
def report_diff(x):
return x[0] if x[0] == x[1] else '{} ... | 2 | 1,480 |
Bootstrap panel-collapse collapses when you click on a link inside it is clicked | <p>In following HTML page, the <code>Heading 1</code> and <code>Heading 2</code> rightly collapse when page loads first time (since I'm using <code>class="panel-collapse collapse"</code>. Then <code>Collapse/Expand</code> works fine when user clicks on a <code>Heading</code>. But when a user clicks on a link inside a <... | 2 | 1,537 |
Magento email template not displaying store email nor phone number | <p>I have the default Magento email template (or maybe it is broken).</p>
<p>I am having an issue where I am not begin able to see the store email address nor the phone number in the output email that is being sent to the customer. </p>
<p>it says: "... If you have any questions, please feel free to contact us at" an... | 2 | 1,837 |
Get values from html form to JavaScript objects | <p>I am having problems with passing values from HTML to JavaScript. This is a little RPG game I'm building and I want the user to type its name, age, class, and race in a form and create a Character object with his information.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babe... | 2 | 2,434 |
XPSDocumentWriter - Printing Specific Pages to Specific Trays | <p>I'm currently working on a printing application. This app has the requirement that certain pages need to come from specific trays on the printer. Here's the guts of what I've got so far:</p>
<pre><code> foreach (var dto in dispensersToPrint)
{
var documents = FilterDocumentSections(DispenserDocumen... | 2 | 1,460 |
SpriteKit issue with zPosition | <p>I am encountering an issue with the zPosition of nodes on my SpriteKit scene. </p>
<p><em>I am building a manager node that enables "layer like" management of nodes zPosition, essentially enabling you to get rid of the manual management of the zPosition property and instead to add nodes with methods like <code>add... | 2 | 1,400 |
CSRF token mismatch even after providing the token in the post Laravel 5 | <p>I am trying to post using ajax in laravel 5.
I get CSRF token mismatch exception.
I have looked around and found may such issues, but in this case I did include all the code necessary.</p>
<p>Please take a look at my code.</p>
<p>View</p>
<pre><code>{!! Form::open(array('url'=>'admin/index','method'=>'POST'... | 2 | 2,573 |
Android file permissions on Android 6.0 | <p>I want to list files and directories under <code>"/proc"</code> in Android. When running as my application process, many files are not readable.</p>
<hr />
<p>If I list the directory as the <code>shell</code> user I get the following output:</p>
<pre><code>shell@flounder:/ $ whoami
shell
shell@flounder:/ $... | 2 | 14,755 |
Time series chart, X axis tick labels turning into | <p>I am using JFreeChart to make a barchart vs time. For some reason on these charts, the tick labels on the x axis turn into "..." occasionally. There seems like there is plenty of room for the labels to expand, but instead it just cuts off the whole thing. How can I fix this. </p>
<p>I tried uploading a picture usin... | 2 | 1,962 |
OpenGL ES 2 using GL_LUMINANCE with GL_FLOAT on Android devices | <p>Using Android Studio, my code renders an array of floats as a texture passed to GLSL with one float per texel in the range of 0 to 1, like a grayscale texture. For that i use GL_LUMINANCE as the internalFormat and format for glTexImage2D and GL_FLOAT for type. Running the app on an android device emulator works fine... | 2 | 3,180 |
plotting netcdf data for selected region | <p>I am finding it difficult to work with the netcdf data I have. I went through the examples here (<a href="https://stackoverflow.com/questions/47538582/plotting-netcdf-file-with-levels-in-r">Plotting netcdf file with levels in R</a>) but I think im missing something. </p>
<p>I am trying to plot mixed layer depth for... | 2 | 1,052 |
Dynamic Form in Sinatra | <p>In teaching myself Sinatra I wanted to make a web app that monitored devices via ICMP and displayed the results in browser.</p>
<p>I have a config page where the user decides how many devices he wants to monitor and what the IP and description of those devices are. I want the form to be dynamic so I can iterate thr... | 2 | 2,580 |
Writing multiple files slows down after x seconds | <p>I have code which gets frames from a camera and then saves it to disk. The structure of the code is: multiple threads malloc and copy their frames into new memory, enqueue memory. Finally, another thread removes frames from queue and writes them (using ffmpeg API, raw video no compression) to their files (actually I... | 2 | 2,752 |
How can i fix java.lang.IndexOutOfBoundsException: Invalid index in ArrayList on Android | <p>In my application I want get some <strong>list</strong> from server, and show this list into <strong><code>ChipCloud</code></strong>. <code>ChipCloud</code> has <strong>Tag</strong> library. <strong>Library Link :</strong> <a href="https://github.com/adroitandroid/ChipCloud" rel="nofollow noreferrer">https://github.... | 2 | 6,051 |
How to check NSCache instance value set or not | <p>I have an instance of <code>NSCache</code>, like: <code>NSCache *imageCache;</code> It is basically used for holding some remote "image" values with different <code>"@keys"</code>. I <code>alloc</code> & <code>init</code> <code>NSCache</code> in a Global class at the beginning and set a <code>if else</code> cond... | 2 | 1,197 |
AppWidget setFillInIntent can't handle data set in setData or componentName? | <p>I want to launch different applications from my app widget. The widget is a list of items and clicking an item should open an app like Google Plus. When pressing an item in the list nothing happens. When I remove setData and setComponentName it pops up a dialog asking what app to use. Is it not possible to merge dat... | 2 | 1,292 |
Blink Detection using dlib and opencv | <p>I have gotten this code from pyimagesearch and tried to run it but when i run the file i get these errors. Can anyone please tell me what is wrong here? I have installed all the needed packages and libraries. All conda packages are up to date. Please look in to the error codes section and have a look if you can figu... | 2 | 2,685 |
label name can not be resolved | <p>I've created a label <code>loginLabel</code> to show message on wrong authentication. I've kept this logic inside <code>actionPerformed</code> method, but I am getting error as <code>loginLabel can not be resolved</code>. How to remove this error? I've created my GUI using window-builder.</p>
<pre><code>import java... | 2 | 2,154 |
JqxGrid Filter values clear when updatebound data | <p>I have a grid with RowFilters . I am searching the Values From DB this is my jqxgrid.</p>
<pre><code>var source =
{
datatype: "obserableArray",
datafields: [
{ name: 'ReceiptId', type: 'int' },
{ name: 'Receipt', type: 'string' },
{ name: 'ReceiptT... | 2 | 2,265 |
Python CSV writer truncates strings | <p>I have script that writes a list of lists into a CSV file. Works fine except for one problem: a certain column in the data is ALWAYS truncated to 256 chars in the output file.
I checked the data before writing (used "print" command) and it seems that it contains the full length (~600 chars). The weirder thing is tha... | 2 | 1,115 |
ExtJs 4 MVC Nested Layouts | <p>I'm trying to implement a simple framework for an app. The idea is to create a background viewport type 'layout' with a north region containing the page header and an interchangeable center region.</p>
<p>When my app starts, a Login form is shown. If the user/password is ok, the form is destroyed and the main layou... | 2 | 2,612 |
How to configure ephemeral storage on ECS Fargate Task via Ruby SDK? | <p>I'm using the Ruby SDK for AWS ECS to kick-off a task hosted in Fargate via <a href="https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ECS/Client.html#run_task-instance_method" rel="nofollow noreferrer"><code>run_task</code></a> method. This all works fine with the defaults — I can kick off the task OK and can sen... | 2 | 1,088 |
Coding First and Follow sets in a CFG | <pre><code>COMPUTING First[A]
------------------
// Procedure computeFirst
//
// Input: productions P_1, P_2, ..., P_m where P_i = A::=X_1 X_2 X_3 ...X_n
// with no alternations allowed in the productions.
//
// Output: Computes first of a term or nonterm accounting for nullability
// and multiple productions for t... | 2 | 2,004 |
Puzzling error with FastAPI's CORS middleware | <p>I'm new to FastAPI. I am having problems posting images. The console says it's a <code>CORSMiddleware</code> problem:</p>
<pre><code>Access to XMLHttpRequest at 'http://localhost:8000/images' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on th... | 2 | 1,731 |
DIV won't move down with jQuery | <p>I've got two big DIVs under each other. In these DIVs are two smaller ones. The first one is always visible and the second one should slideDown with jQuery when clicked on the first one. Well, it does slide down, but it doesn't move the next big DIV located under itself.</p>
<p>In code it looks kinda like this:</p>... | 2 | 2,851 |
a variation of Windy gridworld game problem in reinforcement learning with my matlab code | <p>In reinforcement learning, a typical example is the <a href="http://webdocs.cs.ualberta.ca/~sutton/book/ebook/node64.html" rel="nofollow noreferrer">windy gridworld</a></p>
<p>And I face with a new variation of windy gridworld, which additionally has a wall and stochastic wind, I am stuck in these two new things</... | 2 | 4,593 |
Symfony 4 in new dev project, simple authentification fail with the error "Authentication request could not be processed due to a system problem" | <p>From symfony 4, when I try to login, the page return me this error : </p>
<p>"Authentication request could not be processed due to a system problem"</p>
<p>And in my var/log/dev.log, the detailed error is : </p>
<pre><code>[2018-09-02 23:18:23] security.INFO: Authentication request failed. {"exception":"[object] ... | 2 | 2,872 |
NDK r10b and c++11 features | <p>After reading a lot of post about Make and NDK, i still not able to have c++11 support.</p>
<p>In My Application.mk file : </p>
<pre><code>NDK_TOOLCHAIN_VERSION := clang
APP_CPPFLAGS += -std=c++11
APP_STL := gnustl_static
APP_BUILD_SCRIPT := Android.mk
</code></pre>
<p>Then in my Android.mk file :</p>
<pre><cod... | 2 | 1,698 |
Visual C++, System Argument Exception in System Drawing (Windows Form) | <p>This error shows up when run the program and try to load an image:</p>
<p>A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll
An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll</p>
<p>Additional information: The parameter is invalid.</p>
... | 2 | 1,207 |
Jmeter sampler does not see resources file | <p>I am creating custom sampler for JMeter. I am able to import my jar into library, the sampler is visible within the GUI, but the fields are not displayed properly.</p>
<p><a href="https://i.stack.imgur.com/mlzUZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mlzUZ.png" alt="Project structure"></... | 2 | 1,329 |
Firebase is not saving Facebook user in Auth list | <p>I am creating a single Activity for Facebook Login integrated with Firebase.</p>
<p>I have actived the Facebook login in Firebase, followed all firebase steps and all Facebook steps in Facebook Developer Console also.</p>
<p>My Activity has a com.facebook.widget.LoginButton and after click this button Facebook log... | 2 | 2,128 |
o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: relation "sessions" does not exist | <p>I was trying to run API using Spring Framework. While working on it I got above error message when I tried running endpoints.
Below is the class that I tried testing on Postman. In which I have used <strong>sessions</strong> table from the PostgreSQL data base</p>
<pre><code>package com.pluralsight.conferencedemo.mo... | 2 | 1,279 |
Can't serialize JSON properly using JSON.NET | <p>I using JSON.net to convert very complex XML to JSON and deserialize it to C#.</p>
<pre><code>string text = await blockBlob2.DownloadTextAsync();
XmlDocument doc = new XmlDocument();
doc.LoadXml(text);
string json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(doc);
RootObject x = JsonConvert.DeserializeObject<... | 2 | 1,383 |
How to validate inputs on each step in a multi part form in vuejs? | <p>I have created step in each tabs which represent the steps in the form. I have used v-if condition to check which step should be displayed. As of now the steps work perfectly fine when i click the next button. Even if the inputs are empty I am able to go to the next step. I want some validation on each step that wil... | 2 | 1,845 |
Removing element from a binary search tree | <p>Here is my <code>Binarysearchtree.h</code>. The remove function is not working when the element that has to be deleted has one child.</p>
<pre><code>#ifndef BINARYSEARCHTREE_H_INCLUDED
#define BINARYSEARCHTREE_H_INCLUDED
class BinarySearchTreeNode {
public:
int data;
BinarySearchTreeNode* left;
... | 2 | 2,459 |
Flurry Analytics for Android: Data not being sent to Flurry dashboard? | <p>I am attempting to integrate <code>Flurry Analytics</code> into a simple app I created. I have correctly downloaded and added the <code>SDK</code> to my application. However when I run the app there is no data being sent to the <code>Flurry dashboard</code> despite logcat messages confirming it was, such as:</p>
<p... | 2 | 2,270 |
Problems with making ebay REST api call | <p>I've write following code:</p>
<pre><code> include('httpful.phar');
include('config.php');
use \Httpful\Request;
class fullfil_pol_data{
public $name='1dzien';
public $marketplace='EBAY_PL';
public $category=array('name' => 'ALL_EXCLUDING_MOTORS_VEHICLES');
public $czas_wysylki=array('value'=... | 2 | 1,469 |
How to retrieve the int value of a selected item in a spinner? | <p>I'm making a relational database app in for android that displays an invoice based on the selected id I have used to populate a spinner. The spinner populates correctly, but I need to get the integer value of the id(not the index of the spinner) for the parameter of the <code>viewInvoice</code> method that holds the... | 2 | 2,462 |
Create multiple Web Api with same signature | <p>I have a <code>CAR</code> controller and create my API to Get a list of cars with detailed information of each car in a <code>GRID</code> and work OK. </p>
<p>Now Im creating a <code>ListTree</code> for the cars and only need the basic details. <code>ID and Color</code></p>
<p>How I create another method <code>Get... | 2 | 1,108 |
Access text box value created dynamically when check box is checked | <p>I am a litle confused with ASP.NET lifecycle event. I have a checkbox when it is checked, it will dynamically create labels and text boxes. This is done in checkbox oncheckchanged event.I have Ajax enabled on the checkbox without full postback.</p>
<p>Now in the newly created text boxes I am entering the values and... | 2 | 1,099 |
Allow hundreds of TCP clients to connect within a second or two | <p>So with my software, I send a discover broadcast on the network and every "client" that receives that broadcast will connect over TCP to me. With what I have, it seems to work "OK" but I feel like there has to be a better way. What I am seeing is that some TCP connections into my software are refused (I think) becau... | 2 | 2,119 |
Run Typescript QUnit tests for Typescript source files with Chutzpah | <p>I'm trying to author a Typescript file with unit tests for a Typescript source file. My project structure:</p>
<pre class="lang-none prettyprint-override"><code>/js/my-unit.ts
/js-tests/my-unit.tests.ts
/Scripts/typings/qunit/qunit.d.ts
/chutzpah.json
</code></pre>
<p>Here's the <code>my-unit.ts</code> contents:</... | 2 | 1,479 |
ASP.Net C# - SqlDataSource and Oracle: The network path was not found | <p>Help please with my problem. I get an error when data from Oracle DB "drawing" on web page via asp:SqlDataSource and asp:ListView.</p>
<p>I'm using ODP.Net driver and it works fine (I have many SELECT and UPDATE queries\commands in code-behind and they are working!). But when page must be rendered it says:
"The net... | 2 | 1,926 |
How to Convert any of the 5 Islamic (Hijri) Calendars' Dates to any of 18 World Calendars without External Libraries or Complex Astronomical Formulas | <p>Searching on both StackOverflow and CodeReview sites, the Method described in this Question/Post has not been attempted; which is to convert the 5 Islamic Calendars' Dates to any of the 18 available calendars in Javascript <strong>without</strong> the use of External Date Libraries or using complex math/astronomical... | 2 | 7,591 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.