title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Cython not giving speedup | <p>I have been trying to test the speedup potential of using Cython as compared to the base Python code. For this purpose, I wrote two scripts 'linearAdvec_mat.py' and 'linearAdvec_mat.pyx' as follows:</p>
<p>linearAdvec_mat.py:</p>
<pre><code>import numpy as np
def Adv_mat(N):
A = np.zeros((N, N));
for i in r... | 3 | 2,592 |
Windows phone app 8.1 - Background Task is not launched | <p>Timer Background task in my windows phone 8.1 app was fired only when app was running in debug mode from visual studio. But if I launch even debug binary without debugging it doesn't work, not after 15 minutes, not after several hours. I tested it on windows phone 8.1 emulator and on nokia lumia 920 - the same resul... | 3 | 1,286 |
jQuery UI Resizable + Draggable: disappearing on drop | <p>I am trying to allow an image to be dropped into a container and enable resizing, however, when dropped it disappears until the handle is dragged. I have no errors in the console.</p>
<p>Does this appear to be a CSS generated issue? I have tried changing the z-index but to no avail.</p>
<p>Does anyone have any sug... | 3 | 1,194 |
MYSQL - Joins and what happened next query? | <p>I've set up a database to record the performance of a group of people picking sports events.
So every day around 40 people choose an team or person or horse or whatever they think will win that day.</p>
<p>The tables I have are Tipsters, Selections & Choices. </p>
<p>Tipsters is a list of all those involved.</... | 3 | 1,032 |
api platform ManyToMany persist | <p>I need to persist a ManyToMany relation with api platform, but i get a error, i've tried with cascade={"persist"} and with groups.</p>
<p>When i send the request with the object, i get; Nested documents for attribute "idVehicles" are not allowed. Use IRIs instead.</p>
<pre><code>{
"na... | 3 | 1,617 |
Why is the activation stored procedure not triggering on my SQL Server QUEUE? | <p>I am new to SERVICE BROKER and QUEUE functionality in SQL Server. I've mostly been trying to follow some examples:</p>
<ul>
<li><a href="https://sqlperformance.com/2014/03/sql-performance/configuring-service-broker" rel="nofollow noreferrer">https://sqlperformance.com/2014/03/sql-performance/configuring-service-brok... | 3 | 1,731 |
How to move carousel arrows further apart? | <p>I am a beginner and want to ask how do I move the arrows further apart from the text? Like the left arrow more to the left and the right arrow more to the right? When on full desktop view I want the arrow to be further away from the middle and stay in that position when on response mode. It seems like whatever I do ... | 3 | 1,353 |
Calculate total data from several tables and groups by date | <p>i've 3 tables</p>
<ol>
<li><b>equipment1</b> </li>
</ol>
<pre>
+-------------+-------------+-------------+
| id_skt1 | status_kt1 | tgl_skt1 |
+-------------+-------------+-------------+
| 1 | ON | 2019-07-23 |
+-------------+-------------+-------------+
| 2 | ON | ... | 3 | 1,102 |
Excel Data Display in PHP Automatic show of set of rows | <p>Hi I am having issue in Displaying data in PHP
My Requirement is I would like to Display excel Data in Table and Column
with refresh in Data </p>
<p>I would like to Show sets of 5 Rows at a time
refresh table and show next set of Rows </p>
<p>I am working on PHP with PHPExcel Objects already included </p>
<... | 3 | 1,510 |
Am I doing something wrong or is this a bug in Go's C compiler? | <p>So I'm porting <a href="http://code.google.com/p/xxhash/" rel="nofollow">xxhash</a> from using cgo to Go's native 9p C, however I'm running into a rather weird problem.</p>
<p>The hash function works perfectly fine if called as a cgo function, however if I try to use the "native" version it returns the wrong hash.<... | 3 | 1,917 |
Bugs in Release not in Debug | <p>I'm building a top-down view demo for a path planning/collision avoidance method. c++ in Visual Studio 2010.</p>
<p>When I run in Debug mode everything is fine. But when I run in Release, crazy behavior occurs. Previously my characters would speed up immensily and change direction when running into other characters... | 3 | 1,055 |
Adapter not display content | <p>I am trying to populate data from my main activity using the adapter below. When i run the activity the screen remains blanked. I believe it has to do with the ArrayList which is null perhaps. Can someone tell me why my data is not being displayed. am on this bug for three days now :/</p>
<pre><code>public class ... | 3 | 3,561 |
Moving AJAX call from IIS6 to IIS7.5, fails on System.Web.Handlers.ScriptModule.OnPostAcquireRequestState | <p>I am making an AJAX call to a WebMethod under IIS6 on Win2003Srv like this and it works fine:</p>
<pre><code><System.Web.Services.WebMethod()> _
Public Shared Sub EmailManagers()
'code
End Sub
</code></pre>
<p>with the AJAX call like this:</p>
<pre><code> function EmailManagers_Click() {
aler... | 3 | 1,051 |
SwiftUI How do I record the index of the grid item that is currently being displayed on CollectionView? | <p>I am trying to have a scrolling horizontal list of items, where each item takes up almost the full screen width (UIScreen.main.bounds.width - 50). There should be just enough of the next item visible for the user to know there is something to scroll to. I'd like to be able to determine the index of the item that's... | 3 | 6,476 |
Make object accessible outside JavaScript fetch function | <p>My project to compare two cities weather
my problem that I can't access the objects outside the fetch function call
my object</p>
<pre><code>submitBtn.addEventListener("click", function () {
// getting user data
resultArea.innerHTML = "";
loadingSec.style.display = "block";
con... | 3 | 1,104 |
How to hide wx.Dialog(why .Hide() doesnt work)? | <p>My question is how can I hide wx.Dialog when press OK? I tried </p>
<blockquote>
<p>wx.Dialog.Destroy(), </p>
<p>wx.Dialog.Close() and </p>
<p>wx.Dialog.Hide()</p>
</blockquote>
<p>All of them shut my wx.Dialog down. I'm trying to press OK and then open the frame or panel (I definetely... | 3 | 3,534 |
Is there any way to export many pie/donut charts with exact same size and position? (matplotlib) | <p>I want to export some donut plots that need to have the same exact position and size (e.g. so I can paste an also circular image and have it centered just by knowing the position at which it should be pasted thanks to the standarized size/position). As an example of what would be desirable, imagine that if someone w... | 3 | 2,545 |
Im having problem with wordpress theme, Parse error: syntax error, unexpected end of file, | <p>Im having problem with one theme, im installing theme and trying to open website but when i open is saying like this.
''Parse error: syntax error, unexpected end of file in D:\Programs\xampp\htdocs\wordpress\wp-content\themes\xwp-directory\header.php on line 68
There has been a critical error on your website.</p>
<p... | 3 | 3,492 |
Handling multiple <select> elements in HTML using Javascript | <p>I am using a mixture of JavaScript and HTML in Blogger's HTML interface to create a dropdown feature that cycles through pictures. Bear with me; although I know how to code generally, I have no knowledge of JavaScript or HTML. This is my reduced code:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data... | 3 | 1,433 |
How to optimize integer toString method with javascript? | <p>I want to use <code>Number.toString(62)</code> but ECMAScript does not support it (only support radix from 2 to 36), so I'm writing myself version of <code>Number.toString</code>.</p>
<p>And I only need to use it to format <code>int64</code>, do not need to care about <code>double</code>.</p>
<p>So, I benched the ... | 3 | 1,165 |
Doesn't save data django Foreignkey model | <p>I've two model. I would like to save data from ForeignKey model. I'm created a modelform and save with my main foreignkey model. But I got this error <code>ValueError at /c/customer/1/
Cannot assign "'1'": "BillingData.customer" must be a "CustomerData" instance.</code></p>
<p>I created Django model form and hocke... | 3 | 1,231 |
How to calculate probability from probability density function in the Naive Bayes Classifier? | <p>I am implementing Gaussian Naive Bayes Algorithm:</p>
<pre><code># importing modules
import pandas as pd
import numpy as np
# create an empty dataframe
data = pd.DataFrame()
# create our target variable
data["gender"] = ["male","male","male","male",
"female","female","female","female"]
# create o... | 3 | 1,852 |
structuremap: Setting all properties of an object using setter injection | <p>I am using <a href="http://structuremap.github.io" rel="nofollow noreferrer">structuremap.net</a> as my container. I want to pass all dependencies of a class as a dependency object instead of one parameter per dependency.</p>
<pre><code>// Dependencies of Controller
class Dependencies {
public IUserDatabase Use... | 3 | 1,379 |
Calling WCF with Ajax - 404 Error | <p>I've been trying to follow this <a href="http://www.encodedna.com/wcf/tutorial/invoke-a-wcf-service-method-with-multiple-parameters.htm" rel="nofollow">article</a> and create a WCF Service to access with an Ajax call. I am getting a 404 on my Ajax call and have no idea why because it looks ok to me. Can someone plea... | 3 | 2,116 |
How to update and add attributes in a XML file by using python pandas data frame | <p>I am new to the XML, Is there any efficient way to match text using pandas data frame and update XML file ?</p>
<p>This is a small part of my large XML file which still follows the appropriate format.</p>
<p><strong>XML file</strong> (input.xml):</p>
<pre class="lang-xml prettyprint-override"><code><?xml version=... | 3 | 3,549 |
Java mail with domain smtp? | <p>I am trying to send email via my domain email. I tried with 2 different ports 465 and 587. However, in both forms this exception occurs.</p>
<p>When I run this code with google smtp 465 port, it works perfectly. But because of daily limit of google, I need to send email via domain email address.</p>
<p>Thanks in a... | 3 | 1,273 |
AttributeError: 'NoneType' object has no attribute 'shape' / Convert from multiple contour box to singular | <p>Hello and good morning!</p>
<p>I am a novice in python and opencv so if I sound or come off unprofessional, i apologize in advance.</p>
<p>I am trying to detect an MCB and determine its dimensions. However this error keeps poping up.
AttributError: 'NoneType' object has no attribute 'shape'.</p>
<p>I have done a... | 3 | 3,095 |
Cordova Android not sending AJAX request | <p>Hi I have developed an app using Cordova and mainly developed it by testing IOS first. I have now published the app on the App Store and now want to publish it onto the google play store.</p>
<p>I have been testing the app via android studio and can't get past my login page. When I fill the form and submit it no AJA... | 3 | 2,675 |
Why does myBatis+postgresql 9.3 issue a ROLLBACK even if the query succeeds? | <p>I have a piece of Java code that uses myBatis, postgresql 9.3 server, and postgresql-9.3-1100-jdbc41 JDBC driver.
We're also using mybatis-guice for @Transactional support.
Until now we've been using only Serializable transactions, and now we want to put queries that only read from the db in a less strict isolation... | 3 | 2,639 |
How can I set up multiple combo-boxes with the same data source? | <p>I'm trying to create a set-up interface for a program which simulates a board game in C#. I have 1 ComboBox which allows the user to select the number of players, which in turn hides or displays the selected number of comboboxes. Each combobox should initially have all four options (Red, Blue, Green, Yellow), howeve... | 3 | 9,369 |
Filter data from MongoDB with .NET driver | <p>I need to create a filter for my mongo collection filter. I'm using Mongo driver 2 for .NET.</p>
<p>Here is my JSON.</p>
<pre><code>[
{
"a": "val_a0",
"b": "val_b0",
"arr":[
{
"c": "val_c0",
"d": "val_d0"
},
{
... | 3 | 1,139 |
Field injection in viewModels with Hilt | <p>I have the following situation:</p>
<p><a href="https://i.stack.imgur.com/Z250u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z250u.png" alt="UML Diagram" /></a></p>
<p>The MainActivity has a fragment, and they each have a viewModel, MainViewModel and FragmentViewModel respectively. I want to in... | 3 | 2,130 |
Zend Framework 3 - Add and Remove new input element section using javascript | <p>I want to add multiple school locations in zend-form on click of anchor tag or button.
So that zend form validation can be applied to all dynamically created fields
Please see attached image.I want to clone div with in red border in image
<a href="https://i.stack.imgur.com/fmYW1.png" rel="nofollow noreferrer"><img s... | 3 | 7,540 |
Why there are different animation when performing hamburger to arrow animation on toolbar? | <p>I have 2 different apps, which will perform hamburger to arrow animation on toolbar.</p>
<p>Both app are using <code>implementation 'com.android.support:design:27.1.1'</code></p>
<h2>First app - Simple hamburger to arrow animation</h2>
<p><a href="https://www.youtube.com/watch?v=i0-vmhOQPB0&feature=youtu.be" ... | 3 | 1,062 |
bitbake error when remove wayland in local.conf on Ubuntu 14.04 | <p>I'm using Yocto Project 2.4 and i.MX6 Quad sabreSD platform.I build Yocto Project on my Ubuntu 16.04 computer.</p>
<p>I want to have qt5.9 library in my rootFS so I build my image with below command.</p>
<pre><code>bitbake fsl-image-qt5
</code></pre>
<p>After that, I tried to remove wayland cause I want to use eg... | 3 | 10,755 |
Get array of partial model from sub document array (MongoDB C# Driver) | <p>I'm trying to receive new array with only sub fields filled using MongoDB C# Driver. For example I have the following document: </p>
<pre><code>{
"_id" : "fca739d0-cddd-4762-b680-597d2996404b",
"Status" : 1,
"AccountId" : "1112",
"Timestamp" : ISODate("2016-04-27T13:46:01.888Z"),
"CartItems" : [... | 3 | 1,262 |
Android reducing height of an image leaves trail | <p>I'm trying to set the height of an image view using single touch for my app. I want it to decrease image height as I swipe up and increase as I swipe down. This is my code:</p>
<pre><code>public class MainActivity extends Activity {
private static final String DEBUG_TAG = "MainActivity";
private VelocityTr... | 3 | 1,747 |
Trying to get Media Queries to work on Portrait OR Landscape | <p>here it is, this is the css, and the media queries is down below, just search @media and it will find it.</p>
<p>Thanks so much for your help, idk why it is not working, the media query has no effect on the ipad emulator, in portrait mode, i changed the background just to see if it would work and it still did not, ... | 3 | 1,928 |
Swing with Spring troubles | <p>I'm trying to use <code>@Autowired</code> statement in Swing application which locates in Spring Web MVC project. I just run it as Java aplication.</p>
<pre><code>import javax.mail.MessagingException;
import javax.swing.*;
import org.springframework.beans.factory.annotation.Autowired;
import net.babobka.blog.head... | 3 | 3,881 |
Can the CSS Grid Allignment be controlled by a child React components? | <p>I have a react project structured in the typical dashboard layout in CSS Grid. The primary work area, where React components are constantly being loaded/unloaded, is just a single Grid Cell. My problem is that depending on the work component, I may want to align it <code>center</code> or top center (I believe this i... | 3 | 2,042 |
Replace value of column based on other datatable columns | <p>I have three datatables created from the csv that are in this public bucket <a href="https://console.cloud.google.com/storage/browser/securitas" rel="nofollow noreferrer">https://console.cloud.google.com/storage/browser/securitas</a></p>
<pre><code>data_total = "source_year", "state", "is_male", "child_race", "weig... | 3 | 1,188 |
Nougat is much slower when compared to marshmallow | <p>I've been making an android game and I noticed that it runs more than twice as slow on Nougat than on Marshmallow. In fact I figured out that between any two points in my code it seems to have roughly the same increase in time.</p>
<p>So I made a test application that, when the back button is pressed, does a test ... | 3 | 1,151 |
check if an email in my database while sign up, using hibernate | <p>I am programming an IHM for sign up the users, I need to check if this user is already in database(mysql), checking by his email . can you help me please.
I can save my user now but how to check if this user by his email</p>
<p>this is my Dao layer class :</p>
<pre><code>public class UserDaoMysql implements UserDa... | 3 | 1,264 |
Why Android dropped thousands of supported devices | <p>I want to know why the Google Play Store has dropped support for thousands of devices intended for my new app version compared to the old app version. I used DevExtreme to combine a different template and the current code to make a single Cordova mobile hybrid app. Now I use one configuration file, let DevExtreme ma... | 3 | 2,446 |
Multiple events get different instances of a field declared in singleton? | <p><strong>Edit: My bad, no strage events behavior. Error was somewhere else in code. Thx everybody for help. Please ignore this question</strong></p>
<p>Please can someone explain to me what is happening here. I'm experiencing an unexpected event behaviour.</p>
<p>There is a singleton class:</p>
<pre><code>internal... | 3 | 1,235 |
Create an efficient way to sum | <p>i have wrote a code to calculate the sum of the lengths whereby</p>
<p><code>syra(1) = 1</code></p>
<p><code>syra(2) = n + syra(n/2) if n%2==0</code></p>
<p><code>syra(3) = n + (n*3) + 1</code></p>
<p>eg.</p>
<ul>
<li>syra(1) will generate 1</li>
<li>syra(2) will generate 2 1</li>
<li>syra(3) will generate 3 10... | 3 | 1,276 |
I just need to make this code working on p5.js as my code isn't really functioning | <ol>
<li><p>just need to edit this code to make it working</p>
</li>
<li><p>I think I placed the coords in the wrong section so please assist if possible.</p>
</li>
</ol>
<pre><code> let loadTSP;
let loadSol;
let City = new Array();
citySize = 12;
let minX, maxX, minY, maxY;
let mulX,mulY;
v... | 3 | 1,485 |
How to determine coordinates of different areas in h:graphicImage | <p>I am writing a JSF app that's similar to the dukes-bookstore case study in the Java EE tutorial. In the dukes-bookstore example the h:graphicImage consists of 6 areas, each displaying a book in the index.xhtml page. The coordinates for each area are hardcoded in the Application Configuration Resource file faces-conf... | 3 | 1,071 |
How to include this node_module's .html asset in webpack? | <p>I am using the package <code>electron-notifications</code> and it relies on a <code>.html</code> and <code>.css</code> file in its <code>assets</code> folder. This assets folder is not included in webpack (1.14.0) though.</p>
<p>I know I should not add a module as an entry point. I have come across a concept called... | 3 | 1,285 |
Apply advanced search filter in android while getting data from locally stored Json file, in autocompletetextview / edittext | <p>I am kinda new to android with json, and the search.</p>
<p>I want to apply advanced search filter in my autocompletetextview / edittext, in android from json file stored in assets folder.</p>
<p>The json file is consists of FAQs for my app.</p>
<p>And now I want to create advanced search filter like in Google ch... | 3 | 1,492 |
Cannot convert Value - Powershell insert into sql | <p>I have a script only i run that takes users from AD and puts their info into a database. This script piece fails to insert email addresses I think due to the @ sign. How can i fix this?</p>
<pre><code> $_.samaccountname | Get-QADGroupMember -type user -SizeLimit 0 -DontUseDefaultIncludedProperties -IncludedProp... | 3 | 1,048 |
How to plot many 3D cubes with different colors and opacities | <h2>Goal</h2>
<p>I want to plot a large number of cubes (arranged in a 3D grid) with different colors and opacities.</p>
<h2>Current State and question</h2>
<p>I have come up with a solution using <code>vispy</code>, but the performance is very poor - drawing takes very long and the window is very unresponsive. Also, t... | 3 | 1,585 |
Benchmark functions in <cmath> with GCC and MSVS | <p>I am tasked to benchmark the time cost of almost every function in <code>cmath</code> for 64-bit integer and <code>double</code>. Here is my source code:</p>
<pre><code>#include <unordered_map>
#include <string>
#include <cmath>
#include <cstdint>
#include <vector>
#include <random&g... | 3 | 13,401 |
Spring MVC model keeps attribute from previous request for same mapping | <p>When I was testing a controller, I found out that following code works without problems.
But I do not understand why model contains "passProperty" attribute after returning in post mapping.
PassProperty class is only annotated with validation constraints.
In controller it is annotated only with @Valid anno... | 3 | 2,643 |
How to access kendo-react widgets when accessing the react dropdowns javascript by script instead of import? | <p>I added this to my page:</p>
<p><code><script type="text/javascript" src="{!URLFOR($Resource.kendoReact, 'kendoReact/kendo-dropdowns-react-wrapper.min.js')}"></script></code></p>
<p>To access a static resource of the kendo react script I downloaded. </p>
<p>Then set this up in page:</p>
<pre><code>cl... | 3 | 2,365 |
Sencha touch build error - iPhone Developer: no identity found | <p>Am trying to build sencha touch app using my mac. Earlier it was working fine. But now i can build the app but when i try to install it in to itunes am getting an error "Itunes Sync installation failed". Then i googled some and find out my ios development certificate is expired so i create a new certificate and prof... | 3 | 2,394 |
java.lang.RuntimeException: Unable to start activity ComponentInfo cannot be cast to android.widget.ZoomControls | <p>I'm new to android development, hope you all can help me. I got this androidVNC viewer source code from internet. When i'm running the androidVNC application in the emulator, it will exit automatically then i get following errors in LogCat. Can anyone one help me? Thanks.</p>
<pre><code>FATAL EXCEPTION: main
java.l... | 3 | 1,756 |
Binary search in an array works after rewriting it in the exact same way | <p>I'm performing a binary search in an array, looking for a specific value inside of it. When I wrote the code the first time, my for loop for sorting the array in ascending order always added a 0 right in the middle of it so that I could not search for the last element of the array, since the middle part got now repl... | 3 | 1,143 |
Django handling database table names differently in Ubuntu vs Windows | <p>I've built a Django application locally and I'm now trying to deploy it (or at least test) on an AWS EC2 instance using Ubuntu 20.04 (t2.micro).</p>
<p>When hosted locally, the application works fine. When hosted on AWS, I get a ProgrammingError (1146, "Table 'database_name.exampleAppName_modelname' doesn't exi... | 3 | 1,034 |
Android layout spacing between elements | <p>I have the following xml layout:</p>
<p><a href="https://i.stack.imgur.com/6L4DR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6L4DR.png" alt="enter image description here" /></a></p>
<p>Result I have at the moment:</p>
<p><a href="https://i.stack.imgur.com/yXHrh.png" rel="nofollow noreferrer"><... | 3 | 3,174 |
Microsoft.ServiceBus.InvalidRequestException: The connection was failed. Cache refresh timed out | <p>Microsoft.ServiceBus.InvalidRequestException: The connection was failed. Cache refresh timed out. Server stack trace: at Microsoft.ServiceBus.RelayedSocketInitiator.Connect(Uri uri, TimeSpan timeout) at Microsoft.ServiceBus.ConnectivityModeConnectionInitiator.Connect(Uri uri, TimeSpan timeout) at Microsoft.ServiceBu... | 3 | 1,048 |
CSS responsive markup section | <p>Looking for improving my css skills, I created small site, the idea is to get best practice when creating responsive web sites. following simple HTML markup:</p>
<pre><code> <section class="bg-image">
<img src="https://placehold.it/1606x1189" alt="imagem"/>
<div class="title"&g... | 3 | 1,390 |
Dapper Dommel - query join automatic mapping | <p>I'm sorry for my bad english, but here it goes, I am using Dapper with Dapper Dommel to simplify operations like crud, but in Dommel's Github says that it supports Join operations too, so I'm trying to implement it on my code, so far I managed to return a simple entity with Get. </p>
<p>But when I am trying to use... | 3 | 1,736 |
Pandas: How to group rows in a dataframe by a column, and then take the smallest n number of rows per group | <p>I have this starting data set:</p>
<pre><code>word1 word6 0.12 0.2
word1 word34 0.52 0.4
word1 word4 0.33 0.2
word1 word7 0.44 0.1
word2 word8 0.25 0.6
word2 word9 0.001 0.09
word2 word10 0.002 0.08
word2 word11 0.13 0.15
word3 word6 0.015 0.25
word3 word4 ... | 3 | 1,191 |
Getting java.lang.OutOfMemoryError thrown at me when running Spark inside Docker | <p>I'm trying to run a Spark instance within Docker and am frequently getting this exception thrown:</p>
<pre><code>16/10/30 23:20:26 ERROR SparkUncaughtExceptionHandler: Uncaught exception in thread Thread[Executor task launch worker-1,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
</code></pr... | 3 | 1,231 |
Display data from database in listview on android | <p>I have 3 class and DB</p>
<p>1.class MainActivity</p>
<pre><code>public class MainActivity extends ListActivity {
private static final String DB_NAME = "sajgo_v1";
private static final String TABLE_NAME = "PREHRANA";
private static final String PREHRANA_ID = "_id";
private static final String NAZIV... | 3 | 2,514 |
file writing function working on localhost but not on azure | <p>I have a function in my node js app that takes information and creates a csv file, then uploads it to the server. The code is below:</p>
<pre><code>
//check user has enough credits
if (req.user.credits >= 5) {
//check if user selected a recipient, and handle
let { name, address, state, co... | 3 | 2,461 |
CSS Grid With Resizer Wonkiness (no js) | <p>Seriously pulling out what hair I have left on this one...</p>
<p>TLDR : :</p>
<p>CSS only resizer works great with multiple Grid columns except when there is little (narrow?) content in the most right column?</p>
<p>Yeah...</p>
<p><em>read on...</em></p>
<br />
<p>GOAL: To resize the middle "results" colu... | 3 | 1,769 |
Query to get number that is smaller than the fixed number | <p>I'm given a task to find out which have the smaller or equal MOQ(Minimum order quantity) compare to the fixed MOQ. At first, I used the method which was while read() (using c#) and go for line by line.</p>
<p>But it is slow when there are 60k records.</p>
<p>Now I want to update all at one time instead of update and... | 3 | 1,545 |
Android studio throwing error on startup, linux machine | <p>I just upgrade my Android Studio from 1.5 to 2.3, i just unzipped the folder and copied in the download folder, now when I'm starting android studio, I'm getting this message:</p>
<pre><code>Internal Error. Please report to https://code.google.com/p/android/issues
java.lang.RuntimeException: com.intellij.ide.plugi... | 3 | 1,880 |
4.4.2 Layout Call Issue (Eclipse) | <p>I'm very new to android development (this is actually my first project) and I have searched for a solution to this issue ever since the last update, but I haven't found anything that I hadn't previously tried, or actually pertained to my problem. I apologize if the answer is already out there and I have not found it... | 3 | 1,912 |
How can I make an MDDataTable in another screen? | <p>I can't find a way to put an MDDataTable into a second screen after I press a button. I want to be able to display my table in the second screen when I press a button from the first screen. I don't know what to write to have the view_account function to run in my the account screen. There seems to be no way that the... | 3 | 1,208 |
How to acces a view from tableViewCell to TableViewController | <p>I have a <code>UITableViewController</code> and <code>UITableViewCell</code>. Now I am try to access a view from a <code>UITableViewCell</code> to <code>UITableViewController</code> by <code>didSelectRowAt</code> function. But I could not do it.</p>
<p><strong>TableViewController</strong></p>
<pre><code>import Fou... | 3 | 1,697 |
set the content of togglebutton based on condition in xaml | <p>I don't have that much experiences in WPF and XAML files, and maybe my question is very simple. so let me get your help if possible.</p>
<p>As a brief, it's a survey system that will go through some questions, where each question has exactly three answers. Answers are in a ListBox. </p>
<p>In order to make it easi... | 3 | 1,024 |
Inferring language attribute while traversing the dom | <p>I'm working on a site where there there are multiple language attributes declared throughout it. I'm trying to extract all of the text from each language, but sometimes the language is inferred from a parent element, so each element itself may not have the attribute. Sometimes, the element which set the language att... | 3 | 1,300 |
why direct io much slower than non-direct io on SSD(performance measured after system cache cleared)? | <p>I'm new to optimizing disk IO performance. I compared the performance of reading from file with or without direct IO enabled. The chunk size is 512KiB. As Direct IO reads data from disk directly to buffer in user space, I think Direct IO should be faster than non Direct IO(data is not cached before measurement). How... | 3 | 1,248 |
Dynamic Column and Row In datagrid in React JS | <p>I need dynamic column and row in Data Grid in react JS. I need dynamic column and row in Data Grid in react JS. I need dynamic column and row in Data Grid in react JS. I need dynamic column and row in Data Grid in react JS. I need dynamic column and row in Data Grid in react JS. I need dynamic column and row in Data... | 3 | 1,143 |
Undefined reference to my function | <p>I have some trouble with building the part of my project. Here it is:<br>
<strong>utility.h</strong>: </p>
<pre><code>#ifndef UTILITY_H
#define UTILITY_H
#include <boost/array.hpp>
#include <boost/shared_ptr.hpp>
#include <fstream>
#include <iostream>
#include <openssl/md5.h>
#includ... | 3 | 1,111 |
Improve the search functionality | <p>How can I improve the search functionality.? I have written some codes to search for something.The search was taking too much time. And the code snippets here,</p>
<p>I am pulling the data from the database using this method.,</p>
<pre><code> OracleConnection connection = null;
OraclePreparedStatement ptmst =... | 3 | 1,116 |
Performing 1-to-1 Left Outer Join in LINQ using Lambda expression | <p>I have the below LINQ query:</p>
<pre><code>dbContext.NAVSummaries
.Join(dbContext.NAVSummaries.DefaultIfEmpty(),
current => new
{
current.Portfolio,
PD = SqlFunctions.DatePart("dw", current.ValueDate) == 2 ? DbFunctions.AddDays(curr... | 3 | 1,227 |
Java method referance complains about class not being functional interface | <p>I have got two cases of method referance:</p>
<p>Case 1:</p>
<pre><code>public class Main {
static List<Person> personList = List.of(
new Person("Daria", 27, List.of(new Book("Potop", "H. Sienkiewicz"),
new Book("Dywizjon 303", "... | 3 | 2,784 |
I can't get external JavaScript to work | <p>We're (me and a few friends) working on a website, we want to display 4 images on a page and have 8 we want to cycle through. I think I've written an adequate script but none of my friends know JS and it's my first time using it. I'm not sure if I have errors in the JS or am having trouble linking to it from the HTM... | 3 | 1,085 |
OnConfiguring DbContextOptionsBuilder makes my database test fail | <p>I'm trying to test if my data is being saved in the database. When I create an ApplicationDbContext
object with the parameter set with an in-memory database SqliteConnection connection, my test fails. I get a NullReferenceException. When I remove the override OnConfiguring method in the ApplicationDbContext object ... | 3 | 1,354 |
Validation on custom username and password using jQuery | <p>In given code, I want to validate a custom username and password only for demo purposes. If the custom username and password does not match then it should display an error: "Incorrect user ID or password. Please type the correct user ID and password, and try again." </p>
<pre><code>Username: user@lc.com
Password: 1... | 3 | 1,163 |
webpack fail misteriously on Linux: cannot find module | <p>I'm using webpack for bundling react app. Everything works find on my Windows machine. But when I try to run it in the Linux server (centos 6.5) . I got following error: </p>
<pre><code>[root@xxxxx]# webpack
module.js:457
throw err;
^
Error: Cannot find module './Parser.js'
at Function.Module._resolveF... | 3 | 3,379 |
Azure autoscaling exception when trying to read performance counter | <p>I am working on an example from Microsoft that shows how to use autoscaling (<a href="http://www.windowsazure.com/en-us/develop/net/how-to-guides/autoscaling/" rel="nofollow">http://www.windowsazure.com/en-us/develop/net/how-to-guides/autoscaling/</a>). The worker role installed on the cloud generates a performance ... | 3 | 1,935 |
Remove elements from list in python based on multiple conditions | <p>I have the foll. list in python:</p>
<pre><code>list_vals = ['primf_to_primf', 'primf_to_primn', 'primf_to_secdf', 'primf_to_secdn', 'primf_to_urban', 'primf_to_c3ann', 'primf_to_c4ann', 'primf_to_c3per', 'primf_to_c4per', 'primf_to_c3nfx', 'primf_to_pastr', 'primf_to_range', 'primn_to_primf', 'primn_to_primn', 'pr... | 3 | 1,529 |
plot.area() isnt showing in pandas | <p>I have a dataframe named <code>df1</code> where I have columns <code>col_names = ['issuedate','channel','coupons','revenue']</code>, and df is looking something like that:</p>
<pre><code> issuedate channel coupons revenue
0 2009-01-01 WWW 9999999 103082.98
1 2010-01-01 Агенты 5 ... | 3 | 1,550 |
Trouble using Redux-Sauce in App? What am I doing wrong? | <p>I am supposed to fetch data from an endpoint and display the results using Redux-Sauce.
All is fine except I can't seem to update the state after I fetch data. Read the docs so this is what I could come up with. Please tell me what I am doing wrong!?
How do I update the state calling the action creators inside HomeC... | 3 | 1,557 |
Django. Star rating multiple form displayed in a grid view not working | <p>I've got a little problem. I have a page that is used to rate ski resorts. They are displayed in a grid view and each resort has a star rating form beneath.
The problem is that only the first item in the grid can be rated.
I tried to assign each form an unique id but that didn't work.</p>
<p>Here is the code:</p>
<p... | 3 | 2,254 |
How to encode two arrays using json_encode? | <p>I am using <code>json_encode</code> to get the JSON data but along with it I want to pass message if data is successfully passed or not that in the JSON. I am confused how to get the solution. I need only one response not two.</p>
<pre><code><?php
$url = isset($_REQUEST["url"]) ? $_REQUEST["url"] : '';
require_o... | 3 | 2,251 |
Optional int parameter 'movieId' is present but cannot be translated into a null value | <p><strong>I am working on Maven multi module project so this might build error?</strong></p>
<p>I am trying to perform unit test of delete method from controller and I quite don't understand why it is happening here because methods similar to this one works. </p>
<p>Exception speaks for itself - cannot convert int t... | 3 | 3,278 |
Blackjack game error? | <p>This is my blackjack game, and every time I run it, I get this error:</p>
<pre><code>Traceback (most recent call last):
File "...", line 42, in <module>
mydeck = deck()
File "...", line 9, in deck
deck.append(suit+rank)
TypeError: Can't convert 'int' object to str implicitly
</code></pre>
<p>(I t... | 3 | 1,145 |
delete function and upload | <p><strong>it must be said that I download the database and all my function is in class.</strong></p>
<p>That's how I was incredible pleased function and think they are nice ..</p>
<p>That's how I'm going to build a gallery where the id of the upload to the site if it fits with the id_session is log in page, you have... | 3 | 3,979 |
how to change display value of x axis in bar graph-achartengine | <p>I'm using achartengine library forline graph.Instead of timestamp how can i show date in x-axis
<img src="https://i.stack.imgur.com/ebkGD.png" alt="enter image description here"></p>
<p>my code is</p>
<pre><code>public GraphicalView getLine(Context context, LinkedHashMap<String, List<Item>> data, Strin... | 3 | 1,253 |
Iterate a dict repeatedly/in a circle/ (simulate the data communication between sensor and data logger) | <p>I am designing a code snippet to replay logged sensor data. Can you help inspire me?
The system works in this way:</p>
<ul>
<li>the sensor sends out 11 frames(one value in one frame) every 50ms.</li>
<li>Randomly start and end data logging</li>
</ul>
<p>Here is the logged data:</p>
<pre><code>dat = {'frame1':[0,1,2,... | 3 | 2,110 |
R Shiny: write image from r shiny input to sql then render | <p>ui</p>
<p><img src="https://i.stack.imgur.com/99qC3.png" alt="enter image description here" /></p>
<pre class="lang-r prettyprint-override"><code>tabItem(tabName="imageinput",
box(status = "info",solidHeader = TRUE,collapsible = TRUE,
width ... | 3 | 1,085 |
How to test for Failure Action in Jest using runSaga | <p>I've tested a successful response, but I'm having trouble with a failing response. </p>
<p>Here's the action:</p>
<pre class="lang-js prettyprint-override"><code>export function* searchSaga({ searchParams }) {
try {
const { text, customers, searchField } = searchParams;
const results = customers.filter(c... | 3 | 2,346 |
Android Firebase app crashes after updating ArrayAdapter | <p>Hello I am currently working on my very first android app and I have came across and issue where the Application crashes after I add an item into the database and attempt to display the additional item to the UI.
I am using Firebase and a custom <code>ArrayAdapter</code> to display the database.
The issue only happ... | 3 | 3,422 |
Highlight DataGridViewRows based on value comparison with other rows | <p>I have a Part class with the fields list in the code below. I have a DataGridView control, which I am filtering with the Advanced DGV (ADGV) DLL from NUGET. I must include the ADGV in my winform. I currently have a DataGridView, a search box on the form, and a button to run the following function. I need to go throu... | 3 | 1,793 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.