title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Retrieving data from web service and populating SQLite3 database efficiently | <p>I am currently developing an app that that will be used by association members that are going to a large annual conference. </p>
<p>The app will pull data from a database that is created by the app and populate it via a web service. The web service is split into 8 pages (this will likely go up). Each page repres... | 3 | 1,768 |
Listview showing but double displayed when srcolling | <p>I tried to create a listview of 629 records part from mysql with json, listview running but the data displayed double when in scrollingdown</p>
<p>this is my StockActivity:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="sn... | 3 | 3,288 |
Generating Fractals with transformation matrices | <p>I'm trying to generate fractals using five different transformations that I have implemented from skeleton code, translate, rotate, scale, non-uniform scale, and image. These transformations are all 3x3 matrices, for example:</p>
<pre><code>Matrix rotate ( Pt p, float theta )
{
Matrix rvalue;
rvalue.data[0]... | 3 | 1,036 |
How to get all products in the cart in woocommerce? | <p>I am writing a custom shipping plugin for woocommerce based on <a href="https://docs.woocommerce.com/document/shipping-method-api/" rel="nofollow noreferrer">this article</a>, but the code I wrote only calculates shipping cost for one product, if I have several ones on the cart the shipping cost will be the same and... | 3 | 13,413 |
Issues with react and react-dom dependencies | <p>I am starting to learn ReactJS. I have node installed on my computer. I am writing a basic "Hello World" Programming to see if my setup is alright.</p>
<p>The package.json file is:</p>
<pre><code> {
"name": "part1",
"version": "1.0.0",
"description":... | 3 | 1,587 |
How to reference the the AWSEBV2LoadBalancer Subnets property? | <p>I'm following the AWS guide for deploying an HA Wordpress site to Elastic Beanstalk which includes using the eb-php-wordpress extension. The process requires editing a couple of configuration files with known resource IDs prior to deploying the application.</p>
<p>In particular, the instructions say to edit the efs... | 3 | 1,141 |
sending input field data to php script in angular 4 | <p>I am trying to build an angular app and i am fairly new to the technology. I have successfully been able to take values from the input field and view them in the console but i want to take those values and send it to the php script where the backend processing can be done. Basically its a simple mail function. Below... | 3 | 1,909 |
Fetch API mode: no-cors assign then function variable | <p>Hello I created this code block, and i don't know how to assign then function variable.</p>
<p><strong>Api Server:</strong> 192.168.1.109:8085</p>
<p><strong>Nginx Client Server:</strong> 192.168.1.137:8086, 192.168.1.109:8086</p>
<p>For Cors all my settings seem to be correct. I think :/.</p>
<p>The main respon... | 3 | 1,367 |
Primefaces and Omnifaces ClassNotFound warning from GlassFish, just warning, the application works correctly | <p>We have a Java EE application where we use JSF with Omnifaces (v 2.6.3) and Primefaces (v 6.1), deployed on GlassFish v 4.1.2.</p>
<p>Although the application runs correctly (I can navigate the pages and use them) we have some warnings in the logs regarding some classes that cannot be found in both of omnifaces and... | 3 | 2,986 |
backward list iteration using iterator | <p>here its a code about listiterator. Work properly in forward direction but when its come to iterate in backward it goes into infinite loop. after every element print i put a plus and at the end list will generate. works fine if backward iteration's not included but problem with backward. why its happening i dont ... | 3 | 1,260 |
Java Interface method supporting variable number of arguments with different types | <p>I would like to build an interface containing a method that can take a variable number of arguments of various types, something like as follows:</p>
<pre><code>interface MyInterface {
boolean myMethod(Object ...args); <--HERE I WOULD LIKE TO PASS ANY NUMBER OF PARMS OF ANY TYPE
}
</code></pre>
<p>In the conc... | 3 | 1,080 |
Capybara Action integer (id) vs. string (name) confusion | <p>Part of my test requires selecting a university from this form field:</p>
<pre><code><div class="js-dependent-fields" data-select-id="user_role" data-option-value="staff">
<div class="form-group">
<%= form.label :university %>
<%= form.select :university_id, options_for_select(Univers... | 3 | 1,962 |
Proper usage of std::promise and std::future, segfaults | <p>I've been trying my luck on a small threadpool implementation.
However, after conceptualizing and implementing i've hit a brick wall.
I've confirmed that the worker threads ate starting up and sleeping correctly, also that they pick up and execute stored tasks correctly.
However, my program segfaults - i'm pretty su... | 3 | 1,202 |
Maven - maven-remote-resources-plugin not including all resource directories | <p>I have a project with multiple resource directories:</p>
<pre><code>src/main/resources
src/main/generator
src/main/generator2
</code></pre>
<p>I declare these resource directories as following:</p>
<pre><code><build>
<resources>
<resource>
<directory>${basedir}/src/... | 3 | 1,341 |
Change RecyclerView.ViewHolder Layout from outside Adapter | <p>I have a layout with <code>recyclerview</code>.</p>
<p>In this <code>recyclerview</code> I have 2 types of layouts: regular + loading.</p>
<p>This <code>recyclerview</code> shows a grid of 3x3 items and for every 5 items I do pagination for the next 5. while doing pagination, each 5th item shows loading until that d... | 3 | 1,746 |
Scanning with ML Firebase Barcode doesn't recognize format | <p>I have been trying to use the MLKit to scan a barcode however I don't seem to get anything on return, the info that I'm getting back is</p>
<p><strong>W/libc: Access denied finding property "ro.hardware.chipname"</strong></p>
<p>This is the code that I'm trying, it does enter in the success listener howeve... | 3 | 1,788 |
Apache CXF Header transform %gt; to > in payload | <p>I need to set this headers to the XML payload:</p>
<pre><code> <soap:Header>
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:C112C31F-04056-4567-T554-02A7CUAI01E1</wsa:MessageID>
<wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing"&... | 3 | 1,193 |
Parallax scrolling: Unwanted gap in between layers | <p>On my website <a href="http://www.reynelee.com" rel="nofollow noreferrer">here</a>, I implemented multi-layered parallax scrolling with CSS and Javascript. The page scrolls up and down, and I have 6 layers all moving in parallax. Each layer going back scrolls at a slightly slower speed than the layer in front. </p>
... | 3 | 1,237 |
Need to replace the tag along with quotes using XSLT | <p>I want to add element inside the quotes, but its not coming if i used this XSLT and I'm using saxon PE 9.6.0.7 and version=2.0 in XSL</p>
<p>My Input xml file:</p>
<pre><code><text_top>
<p>Insulin is a medicine that is now an important part of your treatment plan. But you’re probably wondering, why no... | 3 | 1,676 |
Taking in a String, cutting the first character, then converting to int | <p>The code I'm working on takes in a string from the user in the form "X123" (not limited to 3 characters) where X can be any non-number character, and 123 can be any series of number characters. The code then strips the non-number, converts the number part to an int, adds 5, and prints the result. </p>
<pre><code> .... | 3 | 1,126 |
java.util.Calendar confusion | <p>I have a problem using java.util.Calendar and commons-lang DateUtil
The problem is that my test works correctly on local machine and fails on CloudBees. Seems like there are problems with locales, but I'm not sure.</p>
<p>Here is the code:</p>
<pre><code>import org.testng.Assert;
import org.testng.annotations.Befo... | 3 | 1,585 |
Need help adding array to a tableview | <p>I'm having trouble adding cells with different content to my app. I know (or think) this needs to be done using an array, but I'm new to xcode and objective-c so I'm not exactly sure how to do this. Any help is much appreciated. Thanks.</p>
<p>Here is a copy of my current code:</p>
<pre><code>#import "RootViewCont... | 3 | 1,508 |
Log file is not being generated in log4j2 in spring boot application | <p>I know there are a lot of post similar to this one, but no solution inside them worked for me. I have created a simple java code in eclipse and I am getting the output in the console screen, but the log file is not getting generated.</p>
<p><strong>log4j2.properties</strong>:</p>
<pre><code>name=PropertiesConfig
pro... | 3 | 1,356 |
Give color to specific line C# console | <p>I am working with ASCII art in C# console, and I am wondering if I can give a specific line a different color, or each group of lines a different color. I am yet new with C# so I don't have a good idea how it works. Can you please help me?</p>
<p>I have that draw for an example wich is a flag as background and then ... | 3 | 2,420 |
How to input variables in command prompt and compare the input variables with other variables | <p>I would like to first explain what this application/Python program does so that you have a better understanding of the problem. I am an absolute beginner in programming so please take it easy on my i have tried my best to explain it as vividly as i could.
This application will be used to test 4000 devices for there ... | 3 | 1,868 |
Java/Spring - Object references an unsaved transient instance | <p>Well, my issue is related to when I try to save an entity (Parade) which has a collection of other entity (AcmeFloat) using the corresponding default CRUD method in convenient repository (the code is attached below). When it reaches the save() method, it throws an exception.</p>
<p>I tried to save the pertinent ent... | 3 | 10,330 |
Request must have at least one newMediaItem - Google Photos API | <p>I'm trying to create media item using Google Photos API. Endpoint is documented <a href="https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchCreate" rel="nofollow noreferrer">here</a>. If I copy and paste my payload to an API explorer which can be found in documentation, I get success:
<a ... | 3 | 1,060 |
How do I split a single pandas.DataFrame row into multiple columns delimited by space? Python | <p>I am working with NCEI marine data which are .dat files without headers, using python (<a href="https://www.ncei.noaa.gov/data/marine/icoads3.0/" rel="nofollow noreferrer">https://www.ncei.noaa.gov/data/marine/icoads3.0/</a> for the files)
They look like:</p>
<pre><code>166210151200 4962 35378 1306 101134 N... | 3 | 11,927 |
Android TCP multicast missing message | <p>I build a TCP multicast chat application using asynctask.
I am also trying to order the message in FIFO and causal order.</p>
<p>However, when I try to send a lot of messages simultaneously for testing, it misses some messages but I can't find the reason.
I have tried as hard as I can to improve the performance of ... | 3 | 1,488 |
In R Shiny, how to correctly link matrix values? | <p>In the below MWE code, the user has the option to refine model assumptions/inputs through a series of step-wise matrix inputs (3 in this case). The 1st matrix, presented by default when first invoking the App, is a flat rate Y over X periods. The 2nd matrix, invoked by clicking "Show", allows user to vary ... | 3 | 2,502 |
Google Cloud CDN serves stale content AFTER revalidation | <p>I am attempting to use Google Cloud CDN with the stale-while-revalidate feature (<a href="https://cloud.google.com/cdn/docs/serving-stale-content#serve-stale-while-revalidating" rel="nofollow noreferrer">Google Docs</a>). However, even though I can see asynchronous revalidation requests being made to my backend serv... | 3 | 1,555 |
How do I display select field values rather than their associated stored integers in ruby on rails? | <p>Say for example I allow my users to select their gender and marital status in form and then post that form so their selections are stored in the database.</p>
<p><strong>A form could look like this:</strong></p>
<pre><code><select id="profile_marital_status" name="profile[marital_status]"><option value=""... | 3 | 1,207 |
Use DirectionServices asynchronously | <p>I am a Java developer student and I have a problem understanding how to properly write asynchronous functions in Javascript. I read a lot of tutorials but I don't find a good way to implement proper asynchronous methods all the time.</p>
<p>I am making an app using the Google Maps API and in a method I want to use t... | 3 | 5,666 |
How do I get different colors for parts of string object property binded to label in ItemControl? | <p>This is my object type:</p>
<pre><code>public class selectedLevel
{
public string Level
{
get;
set;
}
public string PlanetSelected
{
get; set;
}
public string houseDetails
{
get;
set;
}
}
</code></pre>
<p>This is my itemTemplate:</p>
<p... | 3 | 1,791 |
Running Service In Background | <p>Am developing an application in which i added licensing. My app works fine for jelly bean 4.1 not for jelly bean 4.2 and above. When i send message from another mobile to activate the licensing the app is not fetching the message in jelly bean 4.2 and above but it works fine in 4.1. Now i run my app in android devic... | 3 | 1,575 |
Trying to get Leaflet Map to change map view to selected country option | <p>I have a <code><select></code> list populated with a bunch of country names. When an option is selected, the <code>value</code> attribute (the ISO of the country) of the <code><option></code> element is used in a PHP cURL routine to search through a JSON file to return a latlng of the country capital. I ... | 3 | 1,050 |
Xgboost tweedie: Why is the formula to get the prediction from the link = exp(link)/ 2? | <p>When I run a Tweedie GLM, one can get the prediction from the link by doing <code>exp(link)</code>. To get the prediction for a Tweedie GLM, I get the prediction from the link by doing <code>exp(link)/2</code>. I don't understand why I need to divide by 2.</p>
<p>Minimal reproducible example below, inspired from the... | 3 | 1,638 |
Why show an error header already sent? | <pre><code> <table>
<tr>
<td width="30"></td>
<td><img src="Images/logo.jpg" width="100" height="100" />
<td><td><h2>&nbsp;&nbsp;&nbsp;&nbsp;Kunal Structures (India) Pvt. Ltd.</h2></td>
</tr>
</... | 3 | 1,604 |
Using DataTables Plugin in Razor View - Cannot set properties of undefined (setting '_DT_CellIndex') Error | <p>I am using a asp.net mvc web app. I have created a table and now I am wanting to use the plugin in <a href="https://datatables.net/" rel="nofollow noreferrer">datatables</a>. I saw you only needed 3 lines of code to make this work. I attempted to do exactly what it required in order for it to work and give me the de... | 3 | 1,323 |
How to initialize Stack navigator? | <p>I have a <a href="https://reactnavigation.org/docs/bottom-tab-navigator" rel="nofollow noreferrer">Bottom Tabs Navigator</a> that contains a <a href="https://reactnavigation.org/docs/stack-navigator" rel="nofollow noreferrer">Stack Navigator</a> on each tab.</p>
<pre><code>const MainNavigator = createBottomTabNaviga... | 3 | 1,618 |
Making a grid system of images and text mobile responsive | <p>I have a container which has three rows and each rows has four columns.
I am trying to make this responsive for mobile view but I am unable to do so.
For mobile view I want the grid to have six rows instead of three and each row having two columns.
And i have tried several ways by changing the css to get the view bu... | 3 | 1,937 |
MSBuild giving "invalid version file" on F# | <p>I'm recently unable to build F# with MSBuild. It is giving me an error "invalid version file". The generated compiler options below show <code>--versionfile:version.htm</code> being added, and I'm not sure why.</p>
<p>I did find that if I go to <code>C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Mic... | 3 | 6,691 |
UnmarshalException when doing unmarshling of xml | <p>Exception javax.xml.bind.UnmarshalException: unexpected element (uri:"<a href="http://services.forddirect.fordvehicles.com/searchTest" rel="nofollow">http://services.forddirect.fordvehicles.com/searchTest</a>", local:"ClassName"). Expected elements are (none)</p>
<p>I am pasting the code part by which I am doing un... | 3 | 1,482 |
ViewHolder GridView laggy | <p>I´m using the first time <code>ViewHolder</code> with <code>GridView</code> and i´m new to android/java
It´s working a lot of better then with <code>ImageView</code>.</p>
<p>But the biggest problem i have is that scrolling is laggy.
I have two questions:</p>
<p>First one: What can I do to make performance better?
... | 3 | 2,280 |
If back button pressed, alert show and application closes | <p>I have code for quiz, if <code>back button</code> pressed, <code>alert</code> show and application closes which is the flow of the application.
But i have problem, if back button pressed, then it is not responding and executing the code.
help me, thanks.</p>
<p>public class GandaActivity extends Activity {</p>
<p... | 3 | 2,133 |
Cancelling multiple alarms? | <p>I have created an events. I have given option for notification before 10 minutes, 30 minutes and before every hour till 12 hours before. I have to set notification for all these intervals.</p>
<p>Now I want to cancel the particular notification if the switch is off. I have given the same intent to cancel the notifi... | 3 | 3,339 |
After chang the content to button the button dose not work Jquery | <p>I have problem when I change the div td tag content to a tag the a tag dose not working after I clicked it same with input
this is the td tag</p>
<pre><code><td class='column2' id='e" . $row["id"] . "'>
<a class='link' state='" . $row["id"] . ",".$_SESSI... | 3 | 2,102 |
Get javascript values from result of php script | <p>I have pie chart webpage (index.html) which is currently getting values from a static .js file.</p>
<p>The original content of the .js file for the pie chart is this:</p>
<pre><code>$( document ).ready(function() {
var ctx110 = document.getElementById("chart110").getContext("2d");
var d... | 3 | 4,854 |
load image gallery using fancybox3 via AJAX request | <p>I have an ASP.NET MVC 4 web page with an image gallery. I am trying to get the "large image" to load asynchronously with an AJAX call, since the page would take too long to load if I were to load my large images upfront.</p>
<p>Here's what I have in my view:</p>
<pre><code>@{
string srcMain = "";
}
<script... | 3 | 1,363 |
I can upload files on remote server, not locally on XAMPP | <p>I use this script for uploading an image file. It should allow to upload jpeg, jpg and png files. </p>
<p>Everything works on remote server, but I can't upload it locally, on XAMPP server. I tried all tips mentioned in this thread <a href="https://stackoverflow.com/questions/3586919/why-would-files-be-empty-when-up... | 3 | 2,069 |
Nothing Inserted while using Mysql and Neo4j in the same maven-web project | <p>We are working on a maven-web project.In this project two databases used, MySQL and Neo4j.
Project is running fine with MySQL(without Neo4j). After adding Neo4j config file(neo4j-config.xml) project build without any error, insert operation to Mysql return successfully but actually nothing inserted to the tables.
Wi... | 3 | 1,474 |
Present ViewController modally shows weird animation | <p>I'm trying to create a simple modal view controller that lets you edit text using a text view. However, when I present the view controller modally, it slides in from the bottom left direction instead of just sliding in from the bottom. </p>
<p>Here's a video of the weird effect: <a href="http://youtu.be/9M_MHA5mt1M... | 3 | 1,066 |
close() was never explicitly called on database, DatabasedObjectNotClosed Exception? | <p>I am getting following error even I have closed all instances as soon as I finish calling them: </p>
<pre><code> close() was never explicitly called on database '/data/data/com.click4tab.fragmentvogella/databases/NewOrderDB'
android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the ... | 3 | 1,116 |
How to use dispatch inside onStompErrorCallback of @stomp/stomp-js library? | <p>My goal is to not duplicate <code>onStompErrorCallback</code> callback.</p>
<p>ps: I am working on another solution, I think it would work.</p>
<h3>TL:DR</h3>
<p>The current solution is to write <code>onStopErrorCallback</code> directly in React Hook.</p>
<pre><code>function LoginScreen() {
const dispatch = useDis... | 3 | 1,440 |
SearchView not sending intent to result activity | <p>I've got a <code>SearchView</code> that doesn't seem to be working. The <code>SearchView</code> shows in the menu bar, and I can enter text. However when I click the search icon on my phone's on-screen keyboard, nothing at all happens. Ideally, this would start a new activity, sending along a query string to be used... | 3 | 1,161 |
AFTER DELETE Trigger fires off but does not Insert a record into an Audit table | <p>I'm using SQL Server 2016. Below is the code that works for the UPDATE and INSERT actions. Meaning that after a record(s) is inserted or updated into MyDB.[dbo].[DocumentText] table a corresponding record(s) get inserted into the [AnotherDB].[dbo].[Audit]</p>
<p>But the same scenario is not working for the DELETE a... | 3 | 1,179 |
simplify lists recursively using unlist | <p>Consider a case like this:</p>
<pre><code>xml_list <- list(
a = "7",
b = list("8"),
c = list(
c.a = "7",
c.b = list("8"),
c.c = list("9", "10"),
c.d = c("11", "12", "13")),
d = c("a", "b", "c"))
</code></pre>
<p>what I'm looking for is a way of how to simplify this construct recursively... | 3 | 1,081 |
C: wrong allocation of the pointer | <p>I have a char-array and I want to remove whitespace just before or after or both, the word (or phrase) and not in the middle.</p>
<p>For example:</p>
<p>"hello" --> "hello"</p>
<p>" hello" --> "hello"</p>
<p>" hello " --> "hello"</p>
<p>" " --> ""</p>
<p>This is my code:</p>
<pre><code>#include <stdlib.h&g... | 3 | 1,119 |
Before and After trigger on the same event? Fill a child table PostgreSQL | <p><strong>Situation</strong></p>
<p>I have a database in PostgreSQL 9.5 used to store object locations by time.</p>
<p>I have a main table named "position" with the columns (only relevant):</p>
<ul>
<li><code>position_id</code></li>
<li><code>position_timestamp</code></li>
<li><code>object_id</code></li>
</ul>
<p>... | 3 | 1,096 |
Code : 7505 ,Error - Request Authorization Tenant Mismatch | <p>It seems it is the common issue with all but there is no actual solution for anyone. Sometimes it work and some it gives. I am using the Eample 3 in the call create documentation of MS.
I am using BOT registration APP create for the call and below are the <strong><a href="https://graph.microsoft.com/beta/communicati... | 3 | 2,496 |
Add a new row to each dataframe in a list of a dataframes R | <p>I have a list of a dataframes, which I have calculated the colmeans for each column of each dataframe except columns 1 and 2 of the dataframes. A small section of my list of dataframes is at the bottom.</p>
<p>I calculated the colmeans with the line below</p>
<pre><code>df_colmeans <- lapply(df, function(x) colM... | 3 | 5,387 |
Material-UI-Search Bar value not clearing | <p>I am using the @material-ui-searchbar to filter data. I'm using the same container for multiple different pages to display the info. When ever I switch between pages (and thus the data) the whole container reloads to display the new data and new {subType}... however, despite me changing the value of {searched} using... | 3 | 12,588 |
How to clear the text from a EditText? | <p>I tried with <code>.getText().clear()</code> and <code>.setText("")</code>, but it doesn't work. Any idea why? I try to clear the text from all the EditTexts when the NewEventButton is pressed. If you have an idea, please add some code. Thanks!</p>
<p>Java:</p>
<pre><code>package com.exemple.android.calendar;
imp... | 3 | 3,475 |
Timing Fade in Order UsingJquery | <p>What I'm trying to do is the following:</p>
<ol>
<li>When the user clicks a trigger, an overlay comes on the screen <em>(this is working)</em></li>
<li>after the overlay fades in, I want to be able to control the delay time before the list items of a UL fade in</li>
<li>Once the list items complete their fade in, I... | 3 | 1,067 |
How Do I Get WiX Project to Pick Up Executable | <p>I have encountered an issue with a VS2017 Project that I am building. For some reason the WiX project is unable to locate the executable and related files. I get the following error message:</p>
<p>The system cannot find the file '......\Bin\Debug\PSALERTSScheduleServer.exe'.</p>
<p>I have checked and the file P... | 3 | 2,221 |
How to load jar's whole class by byte array? | <p>I am trying to load a class into a byte array.
MainC, Loader, ClassByte, and byteClassLoader are all to load classes.</p>
<p>MainC is start point. </p>
<pre><code>public class MainC
{
public static void main(String[] args) {
Loader loc = new Loader();
loc.load();
}
... | 3 | 9,365 |
Moved from linux/apache to IIs and codeigniter DB_driver.php is giving me errors, i can't have empty fields anymore? | <p>I was on Linux with apache. I moved to a IIs server.
I'm running codeigniter 2.0.0</p>
<p>I have an insert with activerecords that inserts the data from a form to a database. The database has default values for each fields. It didn't use to be a problem. Since the move, EVERY field in the form have to be filled... | 3 | 1,432 |
Symfony2 deployment by Capifony crash on symfony:assets:install (vendor/autoload.php) | <p>Deploy crash on <code>symfony:assets:install</code> task</p>
<pre><code>set :application, "example"
set :domain, "#{application}.com"
set :deploy_to, "/fake/path"
set :app_path, "app"
set :user, "opr"
set :use_composer, true
set :composer_options, "--no-dev --verbose --prefer-dist --optimize-autoloader"
... | 3 | 3,889 |
ConcurrentHashMap not giving correct output in multi threaded application | <p>I created one example to understand concurrent HashMap but it seems to be giving indeterministic outout after 7-8 runs.</p>
<p>In my example, I create three threads(they are mimicking three services to fetch scores for Math,Science,English ) which update a concurent HashMap which has just 3 key value pairs (Keys ar... | 3 | 2,331 |
Assigning a object to a field defined outside a synchronized block - is it thread safe? | <p>Is there anything wrong with the thread safety of this java code? Threads 1-10 add numbers via sample.add(), and Threads 11-20 call removeAndDouble() and print the results to stdout. I recall from the back of my mind that someone said that assigning item in same way as I've got in removeAndDouble() using it outside ... | 3 | 1,477 |
ViewController Containment with Subclassing | <p>in an attempt to up my "getting away from massive view controllers" I am trying some stuff with view controller containment.</p>
<p>Here's what I want:</p>
<ul>
<li>have a base class with a scroll view and an embedded stack view</li>
<li>inherit from that class with an implementation of my desired scene</li>
<li>b... | 3 | 2,069 |
image slide, with div outside of container with overflow hidden | <p>so i have an issue, with an image slider i am trying to build.. </p>
<p><a href="https://i.stack.imgur.com/Gcivu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gcivu.jpg" alt="Example image of what i want to achieve."></a></p>
<p>above is what i roughly want to achieve.</p>
<p>i have the grey ... | 3 | 1,374 |
Trouble writing blackjack and solitaire program in java | <p>I have been working on this project for a few days and I can't figure out why it's not working. Hopefully a fresh set of eyes will help. When I run this, several things don't happen.</p>
<p>The only thing that really works is the part that manages the bet from the user. Some problems include:</p>
<ul>
<li><p>It do... | 3 | 1,607 |
Getting -1 while data transfer using bulktransfer() | <p>I am working on an application which needs data communication between Android phone and Camera. Android phone and camera connected via usb.</p>
<p>I can read and write data first time with <code>bulkTransfer()</code>,but when I try it for second time, I am getting negative 1.
I also tried with different timeout. ... | 3 | 2,440 |
Limit bash until loop to 3 retries | <p>I need to pause the starting of init.d/ntpd script until after the server can communicate with a timeserver on the local production network.
When building a replacement server, using pxe kickstart on a separate local build network, the timeserver is not available.
It is cost prohibitive to install a timeserver on ea... | 3 | 1,366 |
String Input error when using stringstream and if-else statement | <p>I am trying to write a part of a large code where a string of 2 numbers is inputted by the user and each number is parsed from the string to do simple addition (just wanted to test the parsing for now).</p>
<p>I do the parsing using stringstream which seems to work but using this code to compute multiple cases is n... | 3 | 1,024 |
How to replace sub query with join in this case when there are different conditions in where clause? | <p>I have two tables. <code>led</code> and <code>Tbl_LoanMst</code> </p>
<pre><code>CREATE TABLE [dbo].[led](
[GLCode] [varchar](10) NOT NULL,
[AccountID] [varchar](15) NULL,
[Dr_Cr] [char](1) NOT NULL,
[amount] [money] NULL,
[LoanRefNo] [varchar](20) NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[Tbl_Lo... | 3 | 1,488 |
Java for loop error | <p>I am trying to get user input for sortValues[] array using the for statement (enter character 1, enter character 2, etc). </p>
<p>However, when I execute this, the program will not allow me to enter for character 2, instead skipping directly to character 3, as seen below. </p>
<p><img src="https://i.stack.imgur.co... | 3 | 1,348 |
SwiftUI: how to make a view fit into a certain size | <p>So basically I have this view in my app.
<a href="https://i.stack.imgur.com/n9YYs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n9YYs.png" alt="enter image description here" /></a></p>
<p>I want the box named LaMarcus Aldridge be the same size as the rest Basically I want to reduce the size of t... | 3 | 2,434 |
ORACLE - DECODE view predicate and apply on base table | <p>I have a view defined as below</p>
<pre><code>CREATE VIEW DQ_DB.DQM_RESULT_VIEW
AS SELECT
res.ACTIVE_FL AS ACTIVE_FL,
res.VERSION as VERSION,
res.rule_constituents_tx,
nvl(ruletable.rule_desc,'N/A') AS rule_ds,
nvl(res.effective_dt, TO_DATE('31-dec-9999','dd-mon-yyyy')) AS effective_dt,
nvl(r... | 3 | 1,296 |
How to get the Table Ids and the Value on clicking a row element in a particular column from multiple tables? | <p>I need some help to write a javascript function to retrieve the clicked value as well as the table id upon clicking a particular column(Tier) from multiple tables.</p>
<p>For example, when I click on Tier 1, I am trying to assign it to tier_token and set the client based on the table id --> tier_token=Tier 1, cli... | 3 | 1,292 |
How to scroll a whole webpage and content at once? | <p>I have a div that has a transparent black so that the actual background color still shows but darkened. Inside this div I have a div with text.</p>
<p>So when added the text to my div I realized it had 2 "scrollable" sections, one for the div with the content and another one for the background div which ha... | 3 | 3,960 |
babel webpack configuration ignored in karma.conf.js? | <p>I am trying to make my first JS unit test with Karma and Jasmin. I am testing a react app.</p>
<p>I generated the karma config with "karma init" and modified it, see below for the karma.config.js
The webpack.config is required in the karma.config.js, but the babel loader is completely ignored, why?
I noticed it's i... | 3 | 2,160 |
D3JS Sunburst not updating text | <p>I'm trying to display a sunburst with text. I used the code from a sunburst example and tried to add text to it (worked), but when it updates, my text disappears. I can only get it to display all text or text when loaded then no text. So when it updates, the text is either gone or is not in sync with the data.</p>
... | 3 | 2,276 |
Unable to show interstitial ads with admob in andengine | <p>I have been trying to show interstitials in my andengine developed game but unable to. I have successfully integrated banner ads though. I prefer using coding for layout. Below are my GameActivity.java and the Gamescene.java classes, please help in understanding where is the root error?</p>
<pre><code>public class ... | 3 | 2,400 |
onChange event does not get called | <p>I have this change function that removes or adds the hidden class to a razor dropdownlist.
This checks if a value in one of the dropdowns is that string, then on change, either remove or add the class based on that selection. </p>
<pre><code><label class="control-label col-md-4 optional" id="PIdsLabel" for="pId... | 3 | 1,609 |
Error when serve Django 1.8 Applications with Apache2 and mod_wsgi on Ubuntu 14.04 | <p>I am trying to serve my django project with Apache2 and mod_wsgi and I am stuck. Everything works fine until I try to integrate mod_wsgi. I am using python 3. The relevant coding are as below:</p>
<hr>
<h2>Apache2.conf</h2>
<pre><code><VirtualHost *:80>
ServerAdmin myemail@example.com
Server... | 3 | 1,128 |
How to compare the slope of interaction variables in mixed effect model in r | <p>I want to test the effects of island area and land use, and the interaction between island area and land use on species richness. For land use, I have three groups, namely forest, farmland and mix. The data is based on transects on different islands, so the island ID is set as random effect.</p>
<p>My model looks li... | 3 | 1,432 |
[C++]Why Iterating over a std::string using std::stringstream gives an exception character? | <p>I'm trying to implement a simple format function that fills in the corresponding content based on the given format character.<br />
I use <code>std::stringstream</code> to convert the given format string into a stream, and then take out the characters one by one. Then, based on the individual characters, fill in the... | 3 | 1,271 |
Linq transformation help needed | <p>I've got a List of this object:</p>
<pre><code>public class WebinarAttendeesList {
public int wa_id { get; set; }
public int PID { get; set; }
public string FullName { get; set; }
public string Email { get; set; }
public string JoinTime { get; set; }
public string TimeInSession { get; set; }... | 3 | 1,235 |
How to prevent menu from showing on mouse hover in this menu , and enable it to show only on mouse click? | <p>I downloaded the sm-blue menu from a site ( which I forgot the address , sorry ). By default it shows the submenu on mouse hover and mouse click. I want it to show the submenu only on mouse click. Here are codes :</p>
<p>example of an application menu :</p>
<pre><code><ul class="sm sm-blue pull-left" style="pad... | 3 | 7,780 |
How to increment field value count using MySQL | <p>I have a student attendance table.</p>
<p><strong>Fields/data sample</strong></p>
<pre><code>id | studid | smonth | syear | total_p | total_a
1 | 20 | 08 | 2015 | 1 | 0
2 | 21 | 08 | 2015 | 0 | 1
3 | 22 | 08 | 2015 | 1 | 0
</code></pre>
<p>Those are the first ... | 3 | 1,594 |
Some confused regarding to Rust memory order | <p>I have some questions regarding to Rust memory barrier, let's have a look about this <a href="https://riptutorial.com/rust/example/21259/atomics-and-memory-ordering" rel="nofollow noreferrer">example</a>, based on the example, I made some changes:</p>
<pre class="lang-rust prettyprint-override"><code>use std::cell::... | 3 | 1,978 |
Library Problems with Struts 2 Ajax JSON | <p>I'm trying to have an Ajax call in my Struts 2 project in Netbeans, and I'm having issues getting it to work that seem to have to do with libraries. First of all, the only combination I've found that works at all is to use the current (2.5.22) JSON plugin with the Struts 2.3 core libraries; if I use the "correc... | 3 | 1,584 |
How can I render an EJS file when making a POST request on express? | <p>My app has the path <code>\</code> which is the homepage (working).</p>
<p>It also has a <code>poems</code> path where I can see a list of poems (working).</p>
<p>It also has a <code>poems/new</code> path where I am called to add a new poem (here is where I need help).</p>
<p>I make a <code>GET</code> request to the... | 3 | 2,884 |
Refresh UIImageView's Image | <p>I have a question that has probably been asked a lot, but I just can't get it. I'm making an iOS tabbed app with Swift 5 and Xcode 11. I have a background UIImageView that changes the image every time a user presses a button. The image actually displays pretty well, there's just one thing: The background image doesn... | 3 | 1,866 |
Seeing unexpected behavior with async and retry spring boot | <p>I have a use case to call multiple REST APIS in parallel. But catch here is, they need an access token to be passed in header of each request. So, I ended up making this class level variable. There's also retry to happen in case of timeout or expired token. In case of expired token, we call loadToken() method to get... | 3 | 3,235 |
Why string.replace(/./gm,function(s){...} can not remove newline in multiline string with `backticks` in javascript | <p><strong>plese run the full functional code snippet</strong>.</p>
<pre><code>function nlin(x){
// I have to use: return x.replace(/[\s\S]/gm, function(e) {
return x.replace(/./gm, function(e) {
/*
the new var e is never 10==e.charCodeAt(0) !
** THAT is PROBLEM and ANSWER **
... | 3 | 2,359 |
Unknown items in a scroll view | <p>I got an interesting problem for you this time. I have an online app on android that I have to update. They want to place the discounts on the main page, "Dispensary Info" as I named it and for now it is in a <code>scrollview</code>. The problem is that I don't know how many products are in a dispensary(they have mo... | 3 | 2,913 |
android calculator buttons doesnt work | <p>I'm trying to make a basic android calculator. when i press button numbers show at edittext but nothing's happining. Thanks for any help.</p>
<p>here is my MainActivity.java`
public class MainActivity extends AppCompatActivity {</p>
<pre><code>private EditText Scr;
private float NumerBf;
private String Operation;
... | 3 | 3,829 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.