title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Updated value of form item fetched with ajax | <p>I am working in wordpress and I am using an ajax call to return aid field. I have a form in for loop and there are multiple submit buttons. I want the updated value of aidd field returned. aidd always return the first clicked value</p>
<pre><code>jQuery(function ($) {
$(document).on("click",".star", functio... | 3 | 1,064 |
The output I'm trying to print doesn't print, trying to make a text based alarm clock with a HashMap | <p>I'm trying to compare the current time to the values in a HashMap to print a notification message (like an alarm). However, it doesn't print when the current time hits the time equal to a value within the HashMap. Is this because there isn't enough time for the containsValue method to iterate of the HashMap or anoth... | 3 | 1,204 |
How can I apply put one event listener of the other? | <p>I'm trying to get this effect, whereby, the img background color is white at initial and when it is hovered, it should be red. But when it is clicked, a function should be carried out and the img background color should stick to red. However, when the imge is clicked again, the style should be like the initial style... | 3 | 1,095 |
Randomly select DynamoDB entry | <p>I'm have a DynamoDB table called <em>URLArray</em> that contains a list of URL's (myURL) and a unique video name (myKey).</p>
<p><a href="https://i.stack.imgur.com/RsUPS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RsUPS.png" alt="See URLArray table here" /></a></p>
<p>I need to do two things:<... | 3 | 2,166 |
GET URL parameter in angular 4 / 5 | <p>I'm trying to pass an URL using the GET method. </p>
<p>Actually a microcontroller is sending the GET sequence to a specific web page. On the Web site, I'm trying to get the parameters embedded in the GET sequence for further storage and processing.
When I write directly the destination URL in chrome, it works with... | 3 | 1,531 |
Compare dataframe date columns and return new column | <p>I have a data-frame <code>df</code> comprising of an identifier column and 4 columns of dates. Please see below for the head of the data-frame.</p>
<pre><code> Identifier A \
0 12253 1989-11-09 00:00:00
1 11413 1990-09-03 00:00:00
2 12337 1977-09-07 00:00:00
3 ... | 3 | 1,254 |
Profile's href attribute shows empty string on creation Django | <p>After creating a new user, profile of user is created but it doesn't show default image. When I check view page source, src attribute show empty string like <code>src=''</code>. But when I go to profile link where I can update my profile then at that time it automatically load default image and and all the posts cre... | 3 | 2,000 |
bcrypt password comparison is not working in Node.js with mongoose | <p>Whenever I send a post request with <code>Postman</code> to <code>/api/user/login</code>. It shows <code>user.password</code> is not defined. I'm trying to compare the plain password with the existing hashed password stored in the <code>MongoDB</code> but it's showing a <code>ReferenceError: user is not defined</cod... | 3 | 1,700 |
NodeJS pbkdf2Sync password hasing portability from v0.12.7 to v6.9.1 | <p>I have been working on porting an application written from node v0.12.7 to node v6.9.1. </p>
<p>We are using MEAN stack with all of them upgraded to their latest versions.</p>
<p>We have been able to upgrade everything except for one problem. We used pbkdf2Sync method (comes inbuilt with express) for hashing passw... | 3 | 1,230 |
403 Forbidden when using csrf angularjs | <p>I use <a href="https://github.com/expressjs/csurf" rel="nofollow noreferrer">csurf</a> library in my project but it doesn't work. This is my code:</p>
<p>server.js</p>
<pre><code>var express = require('express');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var csrf ... | 3 | 1,569 |
py2neo - Unable to fetch Data from a remote server | <p>I am using Py2neo package to query my database which is located in a server machine.</p>
<p><strong>My code snippet:</strong></p>
<pre><code>from py2neo import Graph,authenticate
import time
from py2neo.packages.httpstream import http
http.socket_timeout = 9999
def dbConnect():
graph = Graph("http://... | 3 | 1,172 |
How do I identify List fields using reflection and add new objects to that list? | <p>I have two objects that have mostly properties with the same type and name, and I have a method that assigns values from object A to the matching properties in object B. I'm writing a unit test which should call that method, and then assert that for the each property in object A that has a matching property in obje... | 3 | 1,188 |
PHP: ReflectionMethod::getAttributes throwing error 'Call to undefined method' | <p>I am very new to PHP (did some small projects a few years back, but nothing since) and trying to get familiar with it again by creating a RESTful API project. Coming from a C# background, I'm trying to setup the boiler plate stuff to be similar to that of .NET, where controllers handle the request and attributes hel... | 3 | 2,597 |
Polymorphic associations break in rails 6.1 | <p>I have inherited some legacy rails code with workarounds around standard polymorphic associations. These used to work up until rails 5. Now I am trying to upgrade to rails6.1 and they break and I have no clue as to how to fix them.</p>
<p><strong>Problem:</strong>
We have following 2 tables:</p>
<ol>
<li><p>posts</p... | 3 | 1,221 |
Retrieve 1st item ID for Active Accordion tab in jQuery | <p>I have an accordion with some list items inside (code below). Is there any way to find out the 1st item data-id of the active accordion tab. For example., on page load, the active tab is Temperature Gauge which is the 2nd tab. Now I want to retrieve the 1st option data-id which is 11.</p>
<pre><code><script>
... | 3 | 1,197 |
Inheritance in Null Safety - Flutter | <p>I'm working on Flutter Clean Architecture. Initially I developed my project without sound null-safety. I recently migrated it to null-safety.</p>
<p>Migrating to null-safety was pretty smooth but unfortunately there is an issue with inheriting classes that I'm unable to resolve.</p>
<p>Here is a sample of my code I'... | 3 | 2,317 |
CodeBlocks Debugger Not Working. Error Creating Process (error 2) | <p>I installed the gnu gcc compiler for c and when I installed codeblocks everything was working fine except the debugger. The program even compiles and runs but the debugger wont start.</p>
<p>This is the message in the debugger tab. It ends with error 2.</p>
<pre><code>Active debugger config: GDB/CDB debugger:Default... | 3 | 1,533 |
Writing 2 rows to TXT in 1 loop | <p>I have a DataTable like this:</p>
<pre><code>TerminalNo Payment ORNO Time
PHW0501 1,000.00 1 1:05pm
PHW0502 2,000.00 2 1:05pm
PHW0501 3,000.00 3 1:10pm
PHW0502 4,000.00 4 1:10pm
PHW0501 5,000.00 5 1:15pm
PHW0502 ... | 3 | 1,679 |
MongoDB $lookup result as object instead of array | <p>Table "user":</p>
<pre><code>{
"_id" : ObjectId("573b09e6322304d5e7c6256e"),
"name" : "John",
"age" : 30,
"list" : [
"userId1",
"userId2",
"userId3",
"userId2"
]
},
{
"_id" : "userId1",
"name" : "Derek",
"age" : 34
},
{
"_id" : "userId2",
"... | 3 | 1,365 |
What is the point of using a cursor in a Sybase stored procedure for a simple 1 row UPSERT? | <p>I am looking to re-write a legacy Sybase stored procedure that's 20 years old.</p>
<p>The logic seems pretty simple (an UPSERT of a <strong><em>single row</em></strong> into a table, with the only wrinkle being that unique key for table lookups can be 2 or 3 columns, based on input parameter).</p>
<p>The problem i... | 3 | 1,463 |
ngModel Not Updating In Directive | <p>I have a directive that detects the change of a file input and aims to set a model. However the imagefile model is not being set after the file change. I have been able to print out the values of controller.modelValue[0].name and it is set. However when it returns the image file model is null. </p>
<p>Any suggestio... | 3 | 1,029 |
Why prepared statement doesn't work? | <p>I am using this code to check if the user is logged:</p>
<pre><code> function login_check_admin($mysqli) {
// Check if all session variables are set
if(isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'])) {
$user_id = $_SESSION['user_id'];
$login_string = $_SESSION['log... | 3 | 1,293 |
Redraw all container if are created with method [DART] | <p>I write my first app, i created three container with method, but if the method setState() in a container it's call the setState do not redraw other containers.</p>
<pre><code> Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
chi... | 3 | 1,523 |
POMM2 in Symfony3 project, trouble with registering converter | <p>The idea is this. In table 'driver' I have fields that describe 'driver', but I need to store another set of fields about 100 which I didn't need to be table columns. So I decided to store them in Jsonb field. I need to be able to work with this fields as model fields, but they need to be automatically saved in one ... | 3 | 3,001 |
Convert php query result into json | <p>I have the following code that queries multiple tables to get information about activities. I would like to convert the query result into array and call it whenever needed.
My question is: can this query be converted into array?</p>
<pre><code><?php
function view_full_activity($activity_field){
globa... | 3 | 1,599 |
Cannot broadcast bitcoin transaction Golang | <p>I've encouraged an error broadcasting my bitcoin transaction <a href="https://live.blockcypher.com/btc-testnet/pushtx" rel="nofollow noreferrer">here</a>.</p>
<pre><code>Error validating transaction: Error running script for input 0 referencing 78b6df775e4132f747d8d15909cfe61834e6ff1d3b1e42219ace64aae7151e18 at 0: S... | 3 | 4,560 |
How to combine two polar charts? | <p>I founded a very interesting <a href="https://www.boraji.com/how-to-combine-line-chart-and-bar-chart-in-jfreechart" rel="nofollow noreferrer">code</a> that allows to combine two differents charts.</p>
<p>I would like to do the same with two polar charts to permit multiple scale, but there is no renderer as line and ... | 3 | 1,563 |
Appending descriptions of books in divs crafted using loops, wants to append as HTML code instead of text in quotations | <p>I am working on this project for a college course and I was wondering how I could get the description of these books (an example of one provided below) appended, as a paragraph, into a newly-created div as HTML code instead of a string beginning and ending with quotation marks. Also note that I cannot manipulate the... | 3 | 1,319 |
multiprocessing.Pool imap feeds duplicate tasks to worker process | <p>I have 62 known files to be processed and using Pool/imap to speed things up. Unexpectedly and for unknown reason imap started feeding the same file name to the same worker process multiple times. Code:</p>
<pre><code>def worker_proc(file):
procname = current_process().name
info("{} {}".format(procname, fil... | 3 | 2,634 |
can a JSON feed be filtered to just show time from timestamp string? | <p>I am remotely retrieving an external JSON feed via JSONP. The JSON feed contains much data including start_time and end_time variables in an array that have the time data encoded in the "JavaScript built-in JSON object and ISO8601" like this:</p>
<pre><code>2016-01-21T13:00:00+10:00
</code></pre>
<p>I want to put ... | 3 | 2,148 |
generate mock class with python google mock | <p>I am trying to generate a mock class automatically using the gmock_gen.py script with python 3.7.2.</p>
<p>here is <code>my IController.h</code> file</p>
<pre><code>#include <iostream>
class Gui;
class IController
{
public:
virtual void display(Gui *gui) = 0;
virtual void count(int val) = 0;
};... | 3 | 1,233 |
Reverse ttk.Progressbar() | <p>Curious how to fill a ttk.Progressbar() to the maximum value (any number specified by user) and reduce the bar with step in specified increments. So take a 100% filled bar (for instance user specifies 100 as the max value) and reduce it 25% every 15 seconds. here is what I've got:</p>
<pre><code>#import module for ... | 3 | 2,503 |
Animating ItemsControl items | <p>I am a bit stuck as to how to approach this problem.</p>
<p>I have a tabcontrol on my solution and on a datatrigger I hide the tabcontrol and show an itemscontrol in its place with each item(tab) in a shape of a rectangular tile. And on selecting (simple mousedown) a 'tile' (another datatrigger ) I hide the itemsco... | 3 | 1,416 |
how to show the contacts using AutoCompleteTextView android? | <p>i want to show contacts using AutoCompleteTextView in my application. I googled and using some code from stack overflow but some times it is not working well and some times it is crashing too. Please any one help me in this.</p>
<p>custcontview.xml:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<... | 3 | 3,773 |
Improve performance of a nested term aggregation? | <p>Is there a way to improve performance of a nested term aggregation without sampling?</p>
<p>Terms query:</p>
<pre><code>GET <INDEX>/_search?pretty&request_cache=false
{
"_source": false,
"sort": [
"_doc"
],
"size": 0,
"track_total_hit... | 3 | 2,926 |
How can I push ItemName to my database(SQL) from Select2() dropdown list | <p>i am new on asp.net razor page</p>
<p>this is my Html</p>
<pre class="lang-html prettyprint-override"><code><div class="form-group row">
<div class="col-4">
<select class="form-control" id="itemslist" name="itemName"... | 3 | 1,784 |
Guava 23.5 Conflict with hbase-testing-util 1.2 | <p>I am using guava 23-5 in my application and <code>hbase-testing-util</code> 1.2.0. This is causing a conflict in my application and throwing the below exception whenever I am trying to use <code>startMiniCluster()</code> . Can some one let me know how can I get around this?</p>
<pre><code>java.lang.NoSuchMethodErro... | 3 | 11,985 |
Android - Populate recycler view problems | <p>I have done something doing that when arraylist.day == calendar.dayofmonth, it programmatically scroll into the arraylist position but when i start my activity i've got this error : "Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference".</p>
<p>Can someone ... | 3 | 1,105 |
How to calculate time outside of work hours | <p>This seemed pretty straight forward initially, but has proved to be a real headache. Below is my table, data, expected output and SQL Fiddle of where I have got to in solving my problem.</p>
<p><strong>Schema & Data:</strong></p>
<pre><code>CREATE TABLE IF NOT EXISTS `meetings` (
`id` int(6) unsigned NOT NUL... | 3 | 1,113 |
jQuery form validate and submit multiple forms on the the same page gives "Uncaught SyntaxError: Invalid or unexpected token" | <p>I am trying to submit user details to a MailChimp list via PHP for multiple forms on the same page. </p>
<p>My code is as follows: </p>
<p>index.html</p>
<pre><code> <form id="contact-form" name="contact-form" action="assets/php/send.php" method="post" novalidate="novalidate">
&... | 3 | 2,350 |
Action not rendered in Zend_Navigation output? | <p>I pass the following array to:</p>
<pre><code>$container = new Zend_Navigation($fullmenu);
$this->view->navigation()->setContainer($container);
</code></pre>
<p>The array (dumped with print_r):</p>
<pre><code> Array (
[0] => Array (
[label] => menu
[module] => a... | 3 | 1,162 |
php shopping cart session id remove | <p>if have session cart items more than 1 its not work.. but its have only one its work. what happen for this</p>
<p>I put my all of codes in session. check what happen for this case...</p>
<p>here is my php code for this link <code>?action=remove&id=<value></code></p>
<pre><code>function checkCartForItem(... | 3 | 1,514 |
Questions about object has no attribute(Python) | <p>When I try to change my teacher's code to create a new dialog, the shell always shows that <code>NameDialog object has no attribute _column_enter</code>. </p>
<p>However, my teacher's code can work so I am wondering, what's the difference to make my code can not work:</p>
<pre><code>import tkinter
Font=('Helveti... | 3 | 2,827 |
Delete user account Dialog - firebase with React JS | <p>This dialog must delete the user authentication info of the currently signed user:</p>
<pre><code>import React, { Component } from 'react';
import fire, { firestore } from '../config';
var user = fire.auth().currentUser;
var email = user ? user.email.toString() : "";
var password = "";
var typed... | 3 | 1,289 |
Dynamic Forms in Netlify | <p>I have two components in React that in a sense are both forms. One component is a parent form of some sorts that contains a map function that iterates over a <code>children</code> state item to produce a number of children sub forms. This means that people using the forms can click a button to add a new instance of ... | 3 | 3,511 |
How to refresh database reference in android | <p>Code</p>
<pre><code>public class TakingQuiz extends AppCompatActivity {
TextView que;
TextView sco;
TextView qn;
Button opt1;
Button opt2;
Button opt3;
Button opt4;
String RecieversId;
Integer mScore = 0;
Integer mQuestionNumber = 1;
String question;
String option1;
String option2;
String option3;
String option4;... | 3 | 1,996 |
check out my Java Generic's Wildcard | <p>In the below code , I do not know if I coded correctly the last method which is <code>public boolean addAll(SimpleSet<? extends E> s) {</code>
Can you check it out if it is correct (please explain to me how <code>(SimpleSet<? extends E> s)</code> works) and look at the other methods as well !</p>
<pre><... | 3 | 1,433 |
Python - How to count specific section in a list | <p>I'm brand new to python and I'm struggling how to add certain sections of a cvs file in python. I'm not allowed to use "import cvs"
I'm importing the TipJoke CVS file from <a href="https://vincentarelbundock.github.io/Rdatasets/datasets.html" rel="nofollow noreferrer">https://vincentarelbundock.github.io/Rdatasets/d... | 3 | 3,809 |
How to change the order of jobs placing in the Machines - javascript | <p>I am newbie to javascript.I am doing a program sequencing number of jobs in n number of machine.I found this code logic online.But i have a small problem.That highest time consuming job goes to last machines.I want highest time consuming job should place on the first machine..
this is my ouput</p>
<pre><code>8 Jobs... | 3 | 1,607 |
Zf2 changing layout | <p>I am trying to change the layout based on my routes, here what I have done until now:</p>
<pre class="lang-php prettyprint-override"><code><?php namespace Application\Listener;
use Zend\EventManager\AbstractListenerAggregate;
use Zend\EventManager\EventManagerInterface;
use Zend\Mvc\MvcEvent;
use Zend\View\Mo... | 3 | 1,589 |
How to redirect to locally stored index.html file when localhost:<port> is called from a browser | <p>I am creating a socket server in android. I have a directory in my local storage in which there is index.html and all other resources needed. I want that when i start the socket server and then call localhost: from my mobile's browser then it redirects to the index.html.
My socket is running. the logs are printing. ... | 3 | 2,199 |
Setting attributes from semantic action(s) for expression passed into qi::phrase_parse | <p>During parsing I have a few attributes that I need to set in semantic action only ( as they are derived from data being parsed and I want to avoid <code>global</code> variables and dependency on <code>BOOST_FUSION_ADAPT_STRUCT</code> as well as my code should be generic so that I can reuse it for multiple types). I... | 3 | 2,086 |
Loop to check user's input for empty space | <p>I have an assignment to write an application that will take an input from the user, and store each answer in a String array. This application must also check the user's input for an empty value and re-prompt the user to enter their answer. The application must repeat ONLY the empty question, as there is scope for th... | 3 | 1,555 |
HTML list comprehension issue while using Beautiful Soup w Python | <p>I've narrowed my HTML down and I want to pull the hrefs from each line IF the content following the a tag is past 2010. What's the best way to do this? I'll post my code first, and then the HTML.</p>
<p>Code:</p>
<pre><code>links = [STEM_URL + row.a["href"] for row in divyclass.findAll("td") if row.a and int(row.a... | 3 | 1,040 |
Chained jQuery deferred, all progress callbacks are called even after a then statement | <p>I'm trying to chain some calls based on jquery deferred object. To make it simple, I want to :</p>
<ol>
<li>Call an asynchronous method returning a deferred object</li>
<li>Observe its progress</li>
<li>When done, call another method</li>
<li>Observe its progress</li>
</ol>
<p>At first, I wrote something like that... | 3 | 1,041 |
ajax render template versus partial stack level error | <p>Been away from rails for about a year and trying to remember everything by experimenting with a prototype. I inherited the scaffold template to provide a Show view that allows drilling down to related has_many models.There are some deeply nested models but I never go more that 1 deep and use the show view to drill d... | 3 | 1,042 |
Can I have xml schema define data type choises | <p>I have a somewhat simple XML file:</p>
<pre><code><?xml version="1.0" encoding="utf-8" standalone="no" ?>
<SearchSettings>
<ChangeHistory>
<Changed By="Joe Schmoe" On="2013-07-17">Initial creation of this file.</Changed>
</ChangeHistory>
<Logicals>
... | 3 | 2,333 |
How to parse Inner json objects arrays | <p>I am working with the ESPN Sports API. Can any one help me how to parse this?</p>
<p>I am pasting my code, I am able to parse only the name and id–please help how to parse inner objects items.</p>
<pre><code>public class BaseballActivity extends ListActivity{
private static String url = "http://api.espn.com... | 3 | 1,262 |
Failed to start the Kernel. OSError: [WinError 123] | <p>Since a few days I can't run my code (not even a simple <code>print("Hello wolrd")</code>) file in my python interactive window anymore. When I try to start the kernel I get the following message:</p>
<blockquote>
<p>Failed to start the Kernel. OSError: [WinError 123] Die Syntax für den Dateinamen, Verzei... | 3 | 4,054 |
Why does this parent class setter call use type(self) rather than self? | <p><a href="https://gist.github.com/Susensio/979259559e2bebcd0273f1a95d7c1e79" rel="nofollow noreferrer">Python @property inheritance the right way</a> explains how to call the parent setter.</p>
<pre><code>class Number:
def __init__(self):
self._value = None
@property
def value(self):
... | 3 | 1,598 |
SparkSession null point exception in Dataset foreach | <p>I am new to Spark.</p>
<p>I want to keep getting message from kafka, and then save to S3 once the message size over 100000.</p>
<p>I implemented it by Dataset.collectAsList(), but it throw error with <code>Total size of serialized results of 3 tasks (1389.3 MiB) is bigger than spark.driver.maxResultSize</code></p>
<... | 3 | 1,278 |
Repurposing some Javascript for a similar DOM element | <p>On my page I have an unordered list with some list items that serve as links to load content into a div.</p>
<p>The art direction requires that the list items be fully justified to the left and right. I've written some JavaScript to figure out how wide the <code>ul</code> is and calculate the width of the individua... | 3 | 1,405 |
InvalidArgument: Webhook views require an associated state with the webhook | <p>I'm trying to get a webhook setup with python and nextcord. I would like the embedded messaged thats passed to the discord to include buttons that have callbacks when clicked. Not the most experienced with python. Been looking at documentation for days and no luck.</p>
<pre class="lang-py prettyprint-override"><code... | 3 | 1,233 |
How to get the "lastEventId" from fastapi websocket answer? | <p>I want to get the "lastEventId" from a websocket answer from fastapi. When inspecting the code in the browser I see that the returned object has a field "lastEventId" but unfortunately it is empty. Does anyone know how to get this variable?
(The code is derived from the example code on fastapi we... | 3 | 1,110 |
Why is this div not centered? | <p><a href="https://codepen.io/cavad/pen/wvoOJdL?editors=1100" rel="nofollow noreferrer">https://codepen.io/cavad/pen/wvoOJdL?editors=1100</a></p>
<p>I hate css.</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-css l... | 3 | 1,381 |
Firebase database is giving an error that firebase.database.rel is not a function in web | <p>I have been experimenting with Firebase recently. I have implemented Firebase Authentication in my apps but i am experiencing an error with Firebase realtime-database. I have searched online but there are no results for this exact problem. I have been trying to fix it but i can't, I have tried everything.
Here is my... | 3 | 1,147 |
Jump speed increasing I don't know why Libgdx | <p>I'm creating a 2D game. I have a character which can move LEFT, RIGHT and JUMP. But every jump is faster and I donat know why. </p>
<p>When I start the game first, the jump is OK. But every next jump is faster. I think something is increasing the speed but I don't know what. </p>
<p>Can someone look into my code?<... | 3 | 1,289 |
Why I got strange norm value in es? | <p>I got the explain result:</p>
<pre><code>{
"_index": "scoretest",
"_type": "test",
"_id": "2",
"matched": true,
"explanation": {
"value": 0.8784157,
"description": "weight(content:chinese in 1) [PerFieldSimilarity], result of:",
"details": [
{
... | 3 | 1,088 |
confirmation message error [error] Element id=popup_ok not found | <p>i was testing registration page but error "[error] Element id=popup_ok not found" is appearing instead of confirmation message. confirmation message never come on browser therefore i need to add some manual code in source before requesting command </p>
<pre><code> </thead><tbody>
<tr>
<td>op... | 3 | 1,045 |
Populate second and third select box after change the selected value of the first box | <p>Have three select boxes, at first the "device_sel" and "prob_sel" are disabled. When i choose value from the first select box, "customer_sel" i use $.post to populate device_sel. My problem is i what to do the same thing when i select value in "device_sel" then "prob_sel" populates. I think there is some error that ... | 3 | 1,912 |
How to get asynchronous calls using HtmlAgilityPack *In a Discord Bot* | <pre class="lang-cs prettyprint-override"><code>using System.Threading.Tasks;
using System.IO;
using System.Net;
using System.Linq;
using System.Collections.Generic;
using System;
using HtmlAgilityPack;
using Discord.Commands;
using static HorsemenBot.Modules.LadderPosition;
namespace HorsemenBot.Modules
{
publ... | 3 | 4,648 |
react native app crash after sending notification from firebase via gcm | <p>whenever i try to send notification from firebase my app crash.</p>
<p>then i am trying to figure it out where the crash come from with adb logcat.</p>
<p>it seems like there is something wrong with gcm dependencies, i have no idea where the erorr come from.</p>
<p>it said "unable to instantiate receiver com.go... | 3 | 2,661 |
LLVM 6 Trunk Build on Ubuntu 16.04 not building lld | <p>I am building LLVM 6 on Ubuntu 16.04. I want <code>lld</code> too. But no matter what I do, <code>lld</code> doesn't build/install.</p>
<p>Followed the following instruction from <a href="https://llvm.org/docs/GettingStarted.html#overview" rel="nofollow noreferrer">here</a>. <em>Still sifting through first and seco... | 3 | 1,163 |
Why do I get a warning when cloning elements with new props in render() with react/redux? | <p>I'm working on a react/redux app and want my tabbed components to use the redux store for their active tab state. I attempted to do this in as generic a way as possible to share the functionality among all of my different tab components; this resulted in a generic tab panel with the following render method:</p>
<pr... | 3 | 1,159 |
same img size in a row /// col-8 <-> col-4 | <p>I am absolute newbee and wanna create 2 rows. One with 2 img col-4 size and col-8 size and the other row à 3 x col-4 size.
My problem is that the col-8 img is a little bit bigger (height) then the col-4 img.
How can I fix it? I tried a lot but nothing worked.
Thanks for your help.
[problem</p>
<p><div class="snippe... | 3 | 1,171 |
Java android connect to device by Bluetooth | <p>I try to connect to the device used by Bluetooth. When I try to connect I get :</p>
<pre><code>java.io.IOException: read failed, socket might be closed or timeout, read ret: -1
</code></pre>
<p><strong>I do this:</strong></p>
<pre><code>BluetoothSocket mmSocket;
public ConnectThread(BluetoothDevice device) {
... | 3 | 1,102 |
javascript function doesn't work under MVC project | <p>Function <code>rangeChanged</code> doesn't work. The <code>alert</code> function also don't work. If I remove the variable <code>callbackRangeCalendar</code> then the <code>alert</code> is working.</p>
<p>Is the code written in a different way in MVC?</p>
<p>How do I resolve this?</p>
<pre><code>@{
ViewBag.Ti... | 3 | 1,626 |
Ruby on Rails tutorial: RSpec test failing when refactoring with matcher | <p>I'm working through <a href="http://ruby.railstutorial.org/chapters/sign-in-sign-out#sec-rspec_custom_matchers" rel="nofollow">Michael Hartl's Rails tutorial</a> and can't get one Rspec test to pass when refactoring with a matcher. </p>
<p><strong>terminal output</strong></p>
<pre><code>Failures:
1) Authenticat... | 3 | 1,414 |
Hibernate Spring Integration, Tables Are Being Created, But SessionFactory is not Autowired | <p>I have integrated Spring and Hibernate, when i run my application using jetty plugin for maven, Hibernate creates tables but i my sessionFactory object is null, </p>
<p><strong>web.xml</strong></p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j... | 3 | 3,568 |
JQuery blur and hide causing over-firing | <p>I'm using jQuery v1.11.2 and have created a basic JSFiddle here (<a href="http://jsfiddle.net/k1g3upbv/" rel="nofollow">http://jsfiddle.net/k1g3upbv/</a>). It does not show up very well in JSFiddle because my project also uses twitter Bootstrap. I also rushed through the JSFiddle a bit because I had to remove cod... | 3 | 1,274 |
ZipImportError while toolchain build python3 for kivy-ios programming | <p>Trying to re-install the kivy-ios environment for iOS application, but "python3 toolchain.py build python3" gives me following ZipImportError error.
I learned that, /usr/include folder is gone due to Apple's new strategy from Big Sur, so tried many things on the web like,</p>
<ol>
<li>CommandlineTools re-i... | 3 | 1,538 |
Getting devices labels from enumerateDevices in Xamarin Forms WebView in Android | <p>I have a Xamarin Forms application that is mostly a wrapper around a WebView control.
The website that is loaded in the webview uses camera and microphone to create a WebRTC connection and publish the streams to an audience.
The problem: I need to be able to distinguish between the audio input devices (built in and ... | 3 | 1,313 |
no output from php script | <p>I have a <code>username</code> and <code>password</code> box and a <code>login</code> button. My <code>php</code> script should check if the boxes are empty and if the length of whats passed in is less than 6 characters. It is not doing what I want it to do and I am not sure why. I am new to php so I am using <code>... | 3 | 1,149 |
Save to array an array content that it's inside array | <p>I have this array. I want to extract to a new one array the content of only one of this array ([choices]). How can i do it in php?</p>
<pre><code> Array
(
[0] => Array
(
[key] => field_54df3275b708a
[label] => Idioma
[name] => idioma
[type] =... | 3 | 1,196 |
Attach files in batches of 7, change Subject & Body accordingly | <p>The below code attaches one file per email. I need to attach seven files from the folder.</p>
<p>I have approximately 150 files.</p>
<p>I need to</p>
<ol>
<li><p>In the first email attach the first 7 files and then loop to attach 7 files to each subsequent email then in the last email attach the remaining three PDF ... | 3 | 1,145 |
Which type of buffering is used by the two file descriptors returned by `pipe`? | <p>As per the manual of <code>man 2 pipe</code>, which says that[emphasis mine]:</p>
<blockquote>
<p>pipe() creates a pipe, a unidirectional data channel that can be used for interprocess communication. The array pipefd is used to return <em><strong>two file descriptors</strong></em> referring to the ends of the pip... | 3 | 1,910 |
Report MemoryError and OverflowError arbitrarily | <p>I employed the "Sieve of Eratosthenes" to produce primes.</p>
<pre><code>def primes(n):
if n < 2:
return None
primes_sieve = [True] * (n + 1)
primes_sieve[1] = False
primes_sieve[0] = False
# sieve
for i in range(2, int(n ** 0.5) + 1):
if primes_sieve[i]:
f... | 3 | 1,067 |
Virto Commerce and Azure website template- Virto Commerce Manager LocalizationModule error version 1.11.0.0 | <p>I have an error trying to access my new site I created in Azure. I cannot upgrade. I have a link from the Virto /admin page to direct me to <a href="http://mywebsiteurlhere.azurewebsites.net/App_Admin/VirtoCommerce.application?storeurl=http://mywebsiteurlhere.azurewebsites.net/" rel="nofollow">http://mywebsiteurlher... | 3 | 2,366 |
Unable to set an icon in a listview | <p>I'm new to android programming. I created a ListView and tried setting an icon for each list item using simple adapter. I'm not familiar with viewbinder, so i tried calling super.setImageView and super.setTextView methods from the getview method in the adapter class, but only the icons get displayed not the text. </... | 3 | 1,117 |
Read operation timed out (Requests) in Python 3.9 | <p>I'm trying to write a program that logs aircraft positions within the airport range. The database that provides me with information is often really slow. Everything works as hoped except it sometimes crashes with the explanation that "The read operation timed out". I thought it would be the database that c... | 3 | 2,259 |
Firestore rules do not permit claims for signInWithCustomToken user using custom JWT | <p>I'm having a structured set of Firestore rules that everything works fine except for custom user claims inside a custom JWT.</p>
<p>I'm using Laravel framework and <a href="https://github.com/kreait/firebase-php" rel="nofollow noreferrer">kreait/firebase-php</a> with <a href="https://firebase-php.readthedocs.io/en/... | 3 | 1,661 |
Navigation using images nested inside Touchable Opacity | <p><strong>Background:</strong></p>
<p>I've designed a custom footer for my app in React Native, I've set some images to act as icons. I'm trying to have them redirect to other pages of the app upon touch.</p>
<p><strong>What I have tried</strong></p>
<p>I've been trying to use the same images nested within TouchableOp... | 3 | 1,415 |
Hamburger Menu in XAML disappears after Frame is opened | <p>I created this 'Hamburger Menu' in XAML for my UWP application. I'm using a frame to show different pages when a menu item is clicked.</p>
<p>My XAML:</p>
<pre><code><Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF298025" Offset=... | 3 | 1,398 |
should i call ProcessEngines.getDefaultProcessEngine(); every time? | <p>i'm coding to develop REST backend server with activiti7.<br />
i tried to initialize RepositoryService field by @Autowired annotation.<br />
when i execute below code i got this error</p>
<blockquote>
<p>java.lang.NullPointerException: Cannot invoke
"org.activiti.engine.impl.interceptor.CommandContext.getProce... | 3 | 5,761 |
Getting an error in Bitz and pizza app that i am using to build it with Head first android development book | <p>When i am adding viewpager using fragment pager adapter....it show error ,all the code looks fine but in mainactivity.java its an error.</p>
<p>I think mainly the problem is in the import function, which is used in older version ....but i can't find anything in any of the browsers(google and youtube etc.</p>
<p>My c... | 3 | 1,300 |
How to get EditText View from multiple identical id's from a reused Fragment with Espresso? | <p>I'm trying to use <code>onView()</code> to get an EditText view that lives inside of a fragment but every EditText in each fragment has the same id.</p>
<p>Given this pseudo-code:</p>
<pre><code><Activity>
<Fragment>
<EditText android:id="@+id/input" />
</Fragment>
<... | 3 | 6,136 |
tick and render aren't working for other class's what do I do | <p>When I try to <code>tick()</code> and <code>render()</code> my other class's in my game class doesn't work. </p>
<pre class="lang-none prettyprint-override"><code>Exception in thread "Thread-2" java.lang.NullPointerException
at ca.patrick.main.window.Game.render(Game.java:87)
at ca.patrick.main.window.Gam... | 3 | 1,527 |
How to access WPF user control's elements inside viewmodel which is a content of tab items? | <p>In WPF app I have a user control which consists of four TextBoxes. Six units of such user controls form a datatemplate using which I populate tab items of my TabControl in main window. The content of the datatemplate's bound through viewmodel to data layer.
My problem is, I can't find a way to access IsEnabled prop... | 3 | 2,681 |
Vb.net export data to excel | <p>I have a problem with the following code to export the data to excel with following button click Event:</p>
<pre><code>Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
ExportToExcel()
End Sub
</code></pre>
<p><strong>here is the code</strong> </p>
<pre><code>Priv... | 3 | 2,016 |
rails problem with multi model not working | <p>I'm trying to process the dsc files from an ubuntu's sourcecode repository to populate a rails application, for this I used 3 models:</p>
<pre><code>class Architecture < ActiveRecord::Base
has_many :srcpkgs, :dependent => :destroy
has_many :binpkgs, :through => :srcpkgs, :dependent => :destroy
ac... | 3 | 1,429 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.