title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How do I create a border in Pygame so my character doesn't walk over an image?
<p>I need a rectangular border around an image so my character stops walking through it. It would be nice if my character stopped at certain coordinates instead of walking over the image.</p> <p>I've tried to create a border with my 'x' and 'y' coordinates, but the border seems to stretch across the screen.</p> <pre>...
3
1,116
Perl 6 and `multi method new`
<p>I have a class <code>Price</code> that encapsulates an <code>Int</code>. I also would like it to have constructors for <code>Num</code> and <code>Str</code>. I thought I could do this by making <code>Price::new</code> a multi method with various type constraints, but this isn't the behavior I expected. It looks like...
3
1,271
Replicating a read-only solr server
<p>I created a solr 1.4 index and would like to serve queries against it for a high-volume application. The index that I am querying is static -- no more updates are allowed. A couple of client apps making requests on the server drive to CPU load to about 200% on a quad-core ubuntu box, so I was thinking of replicating...
3
1,160
Rotating Metal texture 180 degrees
<p>I added a sample code if someone want's to try fixing it: <a href="https://www.dropbox.com/s/6t6neo40qjganra/To%20be%20fixed.zip?dl=1" rel="nofollow noreferrer">https://www.dropbox.com/s/6t6neo40qjganra/To%20be%20fixed.zip?dl=1</a></p> <hr /> <p>Im making an <code>AR</code> app using <code>Vuforia SDK</code>. Their ...
3
8,105
Variable value resets in onBindViewHolder as i am scrolling down my recycler view for the first time
<p><strong>Basic Idea of What I am doing:</strong></p> <p>I am setting up my recycler view from within my 'Categories' Fragment, which displays a product image, its title, its price and a counter, which when clicked changes the quantity of that particular item. I have a global variable called totalQTY defined in my Pr...
3
4,762
Send mail from package calls .exe
<p>we are using a .EXE file that reads .Xml file from a given Directory to send mails , to run this .EXE we use following function</p> <pre><code> FUNCTION OSCommand_Run (Command IN STRING) RETURN VARCHAR2 IS LANGUAGE JAVA NAME 'OSCommand.Run(java.lang.String) return int'; </code></pre> <p>and ...
3
1,069
Chronometer in RecyclerView : Timer became 00:00:00 when scrolling
<p>I following this <a href="http://abhiandroid.com/ui/chronometer" rel="nofollow noreferrer">1</a> ,<a href="https://stackoverflow.com/questions/526524/android-get-time-of-chronometer-widget">2</a> an this <a href="https://developer.android.com/reference/android/widget/Chronometer.html" rel="nofollow noreferrer">3</a>...
3
3,849
IE7 and IE8 problems on my jquery accordion
<p>i have a problem on my site one of its page is not working on ie7 and ie8 but working with other browsers, returning this error "Unexpected call to method or property access" im using jquery-1.8.3 This is my code: my view...</p> <pre><code>@model SmartTimers.Models.AccountEdit @{ ViewBag.Title = "AccountEdit...
3
6,624
covert my json Array to my json structure in reactjs
<p>I get the data from Backend which is given below. and have to manipulate the data as per the requirement. how to convert the following JSON Array format as per the requirement in ReactJS. the Json Data given below</p> <pre><code>[ { &quot;date&quot;: &quot;2020-12-10&quot;, &quot;airline&quot;: &quot...
3
1,547
Getting not valid cursor error on jpa oracle sql developer
<p>I'm trying to update a field on a table using this JAVA method:</p> <pre><code> @Query(value=&quot;UPDATE tableExample &quot; + &quot;SET tableExample.DTFINE = sysdate &quot; + &quot;WHERE tableExample.prv = :idPrv AND tableExample.DTFINE IS NULL&quot;, nativeQuery=true) public void updat...
3
1,049
Explain the difference between single-line assignment of integer x, item in list[x], and single-line assignments of inter-referencing variables
<p><em>I believe I answered my own question while trying to figure out how to ask it properly, but since I found the answer in <a href="https://docs.python.org/3/reference/simple_stmts.html#assignment-statements" rel="nofollow noreferrer">Python's documentation</a> to be rather opaque, I thought I'd still post the ques...
3
1,183
SQL Server one column data as row and other one as column
<p>Data within the actual table represents the intersection between two categories (for e.g a and b are categories). Data I have has multiple categories. In output table I need to show the intersection between such categories.</p> <p>This is the actual table data. sample data</p> <pre><code>col1 Category Inters...
3
1,707
fitnesse slim java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
<p>I am working with fitnesse. And although i have worked on Fitnesse maintenance before, this is the first time i am implementing it. </p> <p>Everything seems to be in place but I get the below exception on my wiki page when I execute the test. </p> <p>Fitnesse Wiki Page</p> <p><a href="https://i.stack.imgur.com/rr...
3
1,103
php foreach combine 2 array into 1 row (workdays & data)
<p>I have a problem with my current "Attendance Project", so I have 2 arrays.</p> <ul> <li>1st array is to show a "workdays" the 1st array show only workdays in current month ex:April, so the result in my 1st array is (3,4,5,6,7,10,11,12,13,14,17,18,19,20,21,24,25,26,27,28)</li> <li>2nd array is showing Employee Atten...
3
1,051
My view is not binding the angular module
<p>Hi this is my first day in angular and trying to play around with some code however I am lost around with the app.js file which throws error as <code>Uncaught SyntaxError: Unexpected token .</code></p> <p>Here is my structure of application which I cloned from angular-seed and did some cleanup.</p> <p><code>index....
3
1,184
Anyone know of a full suite of Devise Rspec / Capybara tests
<p>I've been learning Rails 3 with Devise and, so far, seem to have it working quite well. I've got custom session &amp; registration controllers, recaptcha is working and a signed-in user can upload an avatar via carrierwave, which is saved on S3. Pretty happy with my progress.</p> <p>Now I'm writing Rspec tests. Not...
3
2,141
OpenGL: All vertices disappear when multiplied by identity matrix
<p>I managed to set up a basic window and draw a triangle shape in it.</p> <p>This is how it looks like:</p> <p><a href="https://i.stack.imgur.com/VUha8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VUha8.png" alt="Single red triangle" /></a></p> <p>But the next step was to use glm::translate to cr...
3
3,188
Slick slider jumps
<p>I am using <em>slick slider</em> for a page.Everything works great except one thing: When I drag the slide sometimes the image or text bounces and that's look really bad. What can I do to avoid that problem?</p> <p>Here is my <a href="https://codepen.io/elene/pen/GZwgQL" rel="nofollow">code</a></p> <pre><code> &l...
3
2,172
php/ajax vote up down
<p>and sry in advance because i'm new here and i'm completly new in php/ajax coding.</p> <p>I use a free script (Ajax vote up/down) from <a href="http://coursesweb.net/php-mysql/voting-up-down-script-ajax_s2" rel="nofollow">this site</a></p> <p>I have a simple php page for my shoutcast server to show the song played<...
3
1,056
AngularJs "Collapse" | ng-repeat multiple accordions
<p>I have two accordions using the same function called "<code>collapse</code>", this is part of bootstrap. </p> <p>The issue I'm having is that on click both accordions open at the same time - this is not what I'm after. </p> <p>What I think is going on is that both accordions are using the same function with no dif...
3
1,200
JavaScript calculator calculates unchecked box
<p>I'm rather new to javascript and i'm trying to make a calculator that instantly calculates a total price of selected products.</p> <p>The calculator works fine but right now the checkbox gets calculated alongside the rest of the products even when unchecked. I'm trying to make it so that when it is unchecked the v...
3
1,382
How do I change default storage of application
<p>This is my sample code, which saves a from the gallery selected image into application memory at <code>/data/data/com.isummation.customgallery/files/</code>. But I want to change file path to <code>/data/data/com.isummation.customgallery/files/photos</code> . What do I have to do? How do I get it changed?</p> <pre>...
3
4,111
Bootstrap navbar text and image horizontal alignement
<p>I try to create a page with bootstrap 4. I have a problem with alignment of my navbar. There are an image in each li of my list. All the ul is vertical. i don't understand. I want to put an horizontal navbar.</p> <pre><code>&lt;nav class="navbar navbar-light bg-transparent navbar-expand-md text-center pt-5"&gt; ...
3
1,351
React AsyncSelect get options from server when inputValue.length > N and user stops typing
<p>I am developing a select with input of type text that get the options from API server and display it on the select options. I am using <code>AsyncSelect</code> to achive it but now, I want only to call the API when the <code>inputValue.length &gt;= 6</code> and when the user stops typing.</p> <p>This is the code:</p...
3
1,101
Concurrent access to a shared resource using conditions in Threads Python
<p>I have the below sample pretty basic code for working with conditions in Python:</p> <pre><code>import threading import random import time class Producer(threading.Thread): """ Produces random integers to a list """ def __init__(self, integers, condition): """ Constructor. ...
3
1,169
UITableView Mix of Static and Dynamic sections Cells ? throw error -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
<p>I am trying to create a UI table view that mixes Dynamic and Static cell section "something like WIFI settings views in ops". </p> <p>The first section will be static. It will hold the text field and labels. The second section will be dynamic it will show the members of the group.</p> <p>I get this exception:</p> ...
3
1,042
Use FirebaseUI in Webcomponent (Polymer 2.0)
<p>I successfully used Firebase-Auth SDK in Polymer and FirebaseUI in a plain js and now try to use it together (FirebaseUSI in a webcomponent). I get close but not quite there (e.g. styling).</p> <p><a href="https://i.stack.imgur.com/ov9RA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ov9RA.jpg" ...
3
1,243
Processing framerate very low and not changeable
<p>I'm building a processing sketch that uses both changing-background-images, oscillators and soundfiles.</p> <p>Basically every draw(), the background changes, an oscillator plays at a certain frequence and a short audio file is played</p> <p>Now, the problem: No matter what framerate I set, it always gets below 5....
3
1,759
Primefaces dataTable is not rendered
<p>i cannot find out what i am doing wrong, so that my dataTable is not shown on the webpage.</p> <p>The User class i created is not really complicated but has more than these three properties which i try to set in the bean.</p> <p>The only thing that is displayed is the facet Text "Test Header"</p> <p>What am i mis...
3
1,212
Matrix class in c++?
<p>I've been trying to write a Matrix class and I am using a main method to test it out. It isn't working... at all. </p> <p>I don't understand why size (the size of allRowValues divided by the size of double) is zero! </p> <p>I've been writing some debug prints but it isn't helping... I'm really, really new with C++...
3
2,095
CI-4 how to show multiple tables in one page
<p>good day all,</p> <p>since i'm new in Code Igniter 4 (i was a native PHP self-learner) and i'm new in MVC, my question is how can i show multiple tables in one page ?</p> <p>i have a dashboard view with 2 tables inside. one is for display students data and the other is for teachers data. there is no relation between...
3
1,932
Destroy FragmentStatePagerAdapter instance with parent Fragment
<p>I am not sure how to ask this. I tried <a href="https://stackoverflow.com/questions/41412926/viewpager-fragment-loads-even-if-the-parent-fragment-is-not-active/">in here</a>, but I guess I was not clear enough. So, I thought I just write a small App to describe the situation. Please note, the App uses Googles <a hre...
3
2,737
i want to convert my gridview table into pdf
<p>**when i tried to convert my grid-view data into PDF i got null reference exception grid-view header row but data is available in grid view.please help me to solve this error. i am using asp.net web API in this.. and i tried to on another grid-view to bind data..it shows same error null reference exception but when ...
3
5,171
loop through json and html elements
<p>I am learning to code and for a challenge I need to get info about a number of twitch channels and update channel info and status if it is streaming live or not. Due to Twitch API constraints I am calling an endpoint to get channel Info and then call another endpoint to see which channel is streaming live and which ...
3
2,048
How to get getitem if found or not Dynamodb in Android
<p>I am having an issue with my Android code where I am reading from Dynamodb using the SDK I want to read an Item using getItem which works but I want to do it if Item is found make a Toast msg "Item is found" and if not found with a toast msg "no item found. in the DynamoDBManager class the file is ok somehow I need ...
3
1,137
Scripts on Google Sheets document only run for me (owner)
<p>I have a shared Google Sheet from my Drive with two buttons tied to functions created in Tools->Script Editor. The basic problem is that everything appears to run fine for me, but not for anyone else with the link. I've also tried logging off and clicking the link, and it did not run for me (vague message about s...
3
1,389
How to process two files paired with Apache Camel
<p>I am building applications using Apache Camel. In this application, two files with the same name as the xml file and extension of jpg are placed in a specific directory. We will process this file using Apache Camel's file2 component. And I'm using Apache Camel Version 2.19.0</p> <p>I would like to meet the followin...
3
1,149
Show image gallery
<p>When I click a picture from <code>galleryview</code>, I want to show the picture I selected from it. I did it with a toast that gives me the picture I clicked, but I want to show it in another activity.</p> <p>How can I do this?</p> <p>This is my gallery activity.</p> <pre><code> public View getView(int position,...
3
1,188
Solving demanding structure task
<p>The structure is given:</p> <pre><code>struct Date { int day, month, year; }; struct Subject { int id; char name_of_subject[100]; double ects; }; struct Grade { char namesurname[100]; int grade_value; struct Subject subject; struct Date date; }; </code></pre> <p>It is necessary to write a function di...
3
4,398
Typescript import aliases not working in VSCode
<p>I'm currently building a NextJS template and trying to configure import aliases.</p> <p><strong>tsconfig.json</strong> aliases-related part:</p> <pre><code>&quot;baseUrl&quot;: &quot;./src&quot;, &quot;paths&quot;: { &quot;@api/*&quot;: [&quot;api/*&quot;], &quot;@components/*&quot;: [&quot;components/*&quot;], ...
3
1,024
Dynamically create adaptive card bot framework azure
<p>i have a problem using adaptive card JSON into python web chat bot (BotFrameWork), i want to know how to customize values in the JSON element, these values are dynamic. I explain more i have to do a list of books information in one card, but title,author,etc... changes everytime. So how i can fill values dynamically...
3
3,318
Java 13 DocumentBuilder breaks when parsing DTD file to validate HTML
<p>I'm working on program that uses DocumentBuilder to parse an old HTML file so that it can be processed accordingly. Within this HTML file, we have the following </p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; </code></pre> <p>Here's the c...
3
2,278
How to implement TensorBoard v2 (tf.contrib.summary) with while_loop?
<p>I want to log the loss and accuracy value evaluated inside a nested body function of a while_loop during training. This is the structure: I have a class, a method of this class builds the graph using a while_loop (build_graph()). Another method calls build_graph() and then runs the session. It works. Or it seems to ...
3
2,186
Scale mesh after combine mesh
<p>First, i create 2 cube and combine into 1 mesh. I want to scale 2 cube in the center of each. </p> <p>How can i do it ??</p> <p><a href="https://i.stack.imgur.com/aPo6m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aPo6m.png" alt="2 Cube"></a></p> <p>My code :</p> <pre><code> private Mesh...
3
2,698
how to stay the color of the button when hit like and refresh page
<p>the default color of my like button is gray and when user hit like button it will run the togglepost "like" and the color will change to red.. i use ajax to insert the data if the user hit like the button... and if the user hit the like button again when its red it will run the togglepost "dislike" and the data from...
3
1,188
Custom Slider in Infowindow not getting focus - Android Google Map v2
<p>I am trying to create the setting panel at the info window such that we can use the slider inside the info window to adjust something. When it comes to the implementation and execution , I have found that the info window is always gaining the onclick focus. There are n NO any responses by clicking the sliders inside...
3
11,898
Unity 2D: Sorting layer changes when shader changes
<p>I have a simple script that detects the nearest interactable and highlights it by applying a shader with an outline. For some reason when the shader is applied it changes layer order and goes under the items above it. In both situations the sorting layer is set to 0 (default). How can I troubleshoot this situation f...
3
1,397
Cannot convert undefined or null to object or not length
<p>If you put a value in every input, it works normally. However, errors appear even if only one input is empty. nameValue.length, an error appears that you cannot work on the length. Object.values(nameValue).length, the error 'Cannot convert undefined or null to object' appears.</p> <pre class="lang-js prettyprint-ov...
3
1,547
Set attribute of basic SVG element with JavaScript
<p>First, below is the desired result without any JavaScript added</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 lang-css prettyprint-override"><code>* { box-sizing: border-box; margin: 0; padding: 0; } html, ...
3
1,094
Gunicorn: UndefinedTable: relation "user" does not exist
<p>Here is the scenario, I'm deploying the Django app on an ec2 instance. I'm following this guide <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04" rel="nofollow noreferrer">Digitalocean deployment guide</a>. when I run my app using <code>p...
3
2,569
How to created the feature like Instagram and twitter to mention users and hashtags?
<p>When user type &quot;@&quot; in textview then it will display the list of the users and from that list user can select the any one.Same for the Hastag.I able to detect the &quot;@&quot; and &quot;#&quot; and open the list accordingly.I got the issue when user edit the text in the textview like remove or add the text...
3
3,186
Solving math equations with fractions on google scripts
<p>I am making a Google Sheets program to create a <a href="https://docs.google.com/spreadsheets/d/1s0tltmOLDwWmjROBZN_-ibpfc5jcnPk6aU-aQ-vLp80/edit?usp=sharing" rel="nofollow noreferrer">math worksheet</a> that randomly generates the numbers within certain parameters. </p> <p>I have succeeded in addition, subtraction...
3
4,099
How to use gson for getstring of json?
<p>I am new to use gson.</p> <p>I found a lots of tutorial there I can learn of gson but there are using recylerview and model file.</p> <pre><code>JsonObjectRequest request = new JsonObjectRequest(LoginUrl, new JSONObject(params), new Response.Listener&lt;JSONObject&gt;() { @Overr...
3
1,151
Iterating over two argument function python
<p>This is a follow-up on a question I posted earlier today, and I think I've cleaned up my code and narrowed down my issue.</p> <p>I am trying to build a simple program to help me with a fantasy football draft. </p> <p>The problem seems to be that it is storing the pick to every team instead of just one. This should...
3
1,735
Embedded TradingView widget chart not showing in xampp
<p>I am trying to embed a TradingView widget. When i am embedding widget in a html file and open it normally in browser it shows me the chart properly. But when i am embedding widget in a php or html file and try to open it using <strong>xampp</strong>, browser does not show me any chart. </p> <p>How can i show the em...
3
2,103
C-Server Socket become wrong Packet
<p>I have the following problem:</p> <ul> <li>I have a Java-client using the apache mina framework to send string.</li> <li>I wrote a C server to receive the string.</li> <li>So, I tried to send an utf8 character to the server:myStringToSend = "Ä"</li> <li>I debugged the mina source to see the packet in byte or hex an...
3
1,632
write from server to multiple outputstreams in java
<p>I am trying to write a simple client-server programme. The server will be having 4 separate clients, which means 4 different inputstreams - outputstreams (I am not supposed to use threads). The only thing server is supposed to do, is write a message to each of the clients (one at a time). The problem i am facing, is...
3
1,156
I can't find the result in lambda expression
<p>I sended this json to my tomcat service</p> <pre><code> { "room": "Platinum", "products": [{ "name": "Agua", "quantity": 2 }], "observation": "", "date": "2016-08-15 12:00:00", "status": 0 } </code></pre> <p>This code consume my json and set data in DB.</p> <pre><co...
3
2,471
Background worker repeats itself
<p>Running into another problem with my code.</p> <p>Scenario:</p> <p>I use a background worker to populate a listView with data from an XML file. Everything works fine, however when I populate the listView using the background worker it repeats itself over and over, usually 3 - 5 times. Here is my full code:</p> <p...
3
6,541
PrimeFaces view with dynamic added component
<p>I need a very dynamic View in PrimeFaces. The View must build to runtime and add PrimeFaces components.</p> <p>In my View I had a panelgrid and added Elements from backing Bean. My Problem is that no setter is called. I added a ValueExpression and the getter is called, but never the setter.</p> <p>my View</p> <pr...
3
1,688
Echo out values of text-boxes created fia for loop in PHP
<p>I have the following form: (please note I am aware that there are no validation in my code)</p> <pre><code>&lt;form name="frmsplitter" method="POST" enctype="multipart/form-data" action = 'step2.php'&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;select styl...
3
1,953
Penalty functions not working as expected in PyGAD
<p>I'm trying to use PyGAD to solve a minimization problem which is part of a bigger algorithm I'm trying to implement, but I have no idea on the appropiate way to include the constraints. I've tried to add <em>if</em> structures to the fitness function to add a penalty value to the objective, but it isn't always worki...
3
2,311
C++ call and definition mismatch
<p>I am looking at this code block at <a href="https://github.com/pytorch/pytorch/blob/master/torch/csrc/autograd/profiler.cpp#L141" rel="nofollow noreferrer">https://github.com/pytorch/pytorch/blob/master/torch/csrc/autograd/profiler.cpp#L141</a></p> <pre><code>pushCallback( [config](const RecordFunction&amp; ...
3
1,565
Why don't the two equal strings match?
<p>I want to compare the <strong>response from the server</strong> with a <strong>string</strong>, but I get a false result when testing the two strings. Why?</p> <p><em>I found this but didn't help: <a href="https://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java/513839?s=1|454.1926#513839">How do...
3
3,734
"InvalidAlgorithmParameterException" SSL exception in server startup
<p>I am getting an error trying to startup a server which has implemented SSL (TLS 3.0)</p> <pre><code>2016-04-04_17:34:26.139 [http-nio-8080-exec-4] INFO g.a.c.c.g.d.ConnectorsController - Inside controller connectors processing request testConnectorConnection 2016-04-04_17:34:26.172 [http-nio-8080-exec-4] INFO c.g....
3
4,082
SQL Data is fetched only once
<p>I have troubles while fetching data from a SQL-Database. The program gets data from a PHP-site and plays the sound if it is a youtube link. Currently, it has troubles when the database is empty. My goal is, that it exits the for-loop, what it does, but it does not receive any data and tries to fetch it once more unt...
3
1,971
What is the difference between mwc.js and mwc.esm.js?
<p>I created a StencilJS project that has a bunch of web components bundled in my <strong>mwc</strong> project. From within Stencil, I can execute <code>npm run start</code> and see my components working as expected. </p> <p>I created an Electron project and in it I'm importing the stencil mwc package using :</p> <...
3
1,156
com.google.api.server.spi.auth.EspAuthenticator not found
<p>I am working on google endpoints api 2.0 and was trying to integrate firebase authentication using <a href="https://cloud.google.com/endpoints/docs/frameworks/java/authenticating-users" rel="nofollow noreferrer">this</a></p> <p>Part of documentation. I encountered a peculiar problem that with the dependencies that ...
3
9,351
printing a page in javascript not following the css
<p>I am printing a div in a javascript and i was putting a css within it, why it doesn't follow my css? anything i put in my css was something nothing or it doesn't have an effect to arrange my print section. Can anyone teach me how to arrange the printing page in a javascript code with css to arrange my print?.</p> <...
3
1,812
Is Chromium known for bugs with Bootstrap/Laravel?
<p>I am having trouble with my Bootstrap/Laravel website.</p> <p>I have a simple navbar at the top, with a logo and a dropdown button menu.</p> <p>The button menu is positioned perfectly, apart from on the sign in page, where it seems it is forced to move down a line. The problem is, the fact that I am using Laravel ...
3
3,761
Integrating SCXML in ROS node using PYSCXML
<p>In the last weeks a faced a problem that still I could not find a solution:</p> <p>I execute a ROS node that starts a StateMachine object from pyscxml. The first time that this node receives a message from another node, an event is send to the StateMachine and everything works fine. But it seems the SM remains in a...
3
1,985
Add a file to `/docker-entrypoint.d/` as part of a app.conf.template file to swap global variables into nginx set up
<p>I would like to pass global variables to my nginx app.conf via a app.conf.template file using docker and docker-compose.</p> <p>When using an app.conf.template file with no commands in <code>docker-compose.yaml</code> my variables translate successfully and my redirects via nginx work as expected. But when I use a c...
3
1,512
React state not updating correctly
<p>I have a usecase where I want to call an API at a regular interval until API returns a response saying not to reload further. Following is my code.</p> <pre><code> const [username, setUserName] = React.useState(); const [reloadEstimates, setReloadEstimates] = React.useState(true); const [estimates, setEstimates...
3
1,143
Combining an ImageLayer and VectorLayer in OpenLayers 6
<p>I'm using <a href="https://openlayers.org/" rel="nofollow noreferrer">OpenLayers</a> 6.3.1, trying to create a VectorLayer with some basic shapes on top of a simple static ImageLayer. </p> <p>Basically, I'm trying to put the shapes from <a href="https://openlayers.org/en/latest/examples/polygon-styles.html" rel="no...
3
2,608
Adding variable number of tags to ListView
<p>Brand new to Android programming and just dinking around.</p> <p>I've built a ListView that is populating posts. I've successfully loaded a JSON and can populate my custom layout with title, post content, and timestamp.</p> <p>The problem is I can't figure out how to add tags (akin to the screenshot below of Zite...
3
2,315
how to get dropdownlist option's Quantity in jquery
<p>I have a problem, I have two dropdownlist, and I want to get option's quantity. for example , if first dropdownlist chose +10 and second list chose +10 then show +10 X 2 , if first list chose +5 , second list chose +10 then show +5 X 1 +10 X 1, how can i do?</p> <p><div class="snippet" data-lang="js" data-hide="fal...
3
1,656
Help with a T_ELSE parse error: syntax error
<pre><code>&lt;?php switch($_GET["action"]) { case "add_item": { AddItem($_GET["ids"], $_GET["qty"]); ShowCart(); break; } case "update_item": { UpdateItem($_GET["ids"], $_GET["qty"]); ShowCart(); break; } case "remove_item": { RemoveItem($_GET["ids"], $_GET["id"]); ShowCart(); break; } default: { ShowCart(); } } func...
3
5,052
Using a firebase storage image URL with CSS background property and url()
<p><strong>UPDATE</strong></p> <p>I wrapped the <code>forEach</code> in a promise to fix the intermediary error I was facing, but I am back to where I began. I was just trying to pass <code>self.data</code> as a parameter between functions but it didn't solve anything.</p> <p><strong>UPDATE</strong></p> <p>I think I...
3
1,887
Embedded Database Login System (netbeans java)
<p>Alright, so i'm <strong>working on a database</strong> where <strong>the only criteria to login is a password.</strong> The database is to be only run from one computer in an offline state (Local) I read around and it pointed me in the direction of creating an embedded database. <strong>I believe im working with der...
3
1,908
Out of range value for column 'date' when executing my python script
<p>I have created a python script that reads a csv file and then stores the data into variables using a dictionary. then I insert the variables to mysql database. Everytime is working 100% .. except when I try to insert a date.</p> <p>i get the error:</p> <blockquote> <p>Out of range value for column 'date'</p> </b...
3
1,421
Rails: acts_as_taggable_on, getting errors when attempting to find articles by tag
<p>I have been following along with a RailsCasts episode, and am trying to make articles taggable. Then I want to make tags clickable on articles show.html page, so that users can find other related articles. I am using Rails 4. However, I have been getting the following error: </p> <pre><code>ActiveRecord::RecordNotF...
3
1,908
Create Temp Table and execute queries on it with Android Room
<p>I'm using android room for my database: I'm looking for a way to execute a sequence of actions as in the subsequent code:</p> <pre><code>@Query( "CREATE TEMP TABLE IF NOT EXISTS t1 (idx INTEGER, rnd_pos INTEGER)") fun shuffle_subquery1() @Query("DELETE FROM t1;") fun shuffle_subquery2() @Query("INSERT INTO t1 SEL...
3
1,024
Using ajax to call a php function, inside that function calling another function that wont fire
<p>Im using ajax on the front end to submit wp_query filters($args) I have a function in my functions.php called filter_function() this is what the ajax is submiting to.</p> <p>Inside filter_function() I have another function distance_haversine() getting called thats inside my functions.php file but that function wil...
3
1,222
PySpark: replace string by numerical values
<p>I have the following table :</p> <pre><code> +----------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+ | _created| _updated| name| description| indication| name| patents_patent| +----...
3
2,157
JS toggling doesn't extend div
<p>I was following a tutorial and it seems that either I have gotten something wrong or there is problem with the code from the tut.</p> <p>Either way, I created a fiddle with the HTML/CSS/JS code. I am trying to achieve that the #content div extends its length when the button (in the code it's an anchor tag) is click...
3
1,937
Modifying Images resolution and size to fit card view properiries
<p>I have an error message from my android app , which using card view and recycle view , i think the problem with the size and resolution for allocated images, this is the error message :</p> <blockquote> <p>D/skia: --- allocation failed for scaled bitmap D/AndroidRuntime: Shutting down VM W/dalvikvm: t...
3
3,780
Omnifaces socket + commandScript combinations
<p>I'd like to implement the OmniFaces &lt;o:socket&gt; with <a href="http://showcase.omnifaces.org/push/socket#ui" rel="nofollow noreferrer">the &lt;o:commandScript&gt; option as documented here</a>.</p> <p>My JSF page looks like:</p> <pre><code>&lt;h:form id="myForm"&gt; &lt;!-- the socket is by default disconn...
3
1,672
XSLT - Strings and numbers ascending order, Saxon processor
<p>I'm try to understand how saxon processor selecting ascending order.</p> <p>I have xml like follows,</p> <pre><code>&lt;catalog&gt; &lt;cd&gt; &lt;title lan="en"&gt;Empire Burlesque&lt;/title&gt; &lt;price&gt;10.90&lt;/price&gt; &lt;year&gt;1985&lt;/year&gt; &lt;/cd&gt; &lt;cd&g...
3
1,341
JavaEE on NetBeans 7.4 GlassFish 4 not deployed
<p>I create a JavaEE project its name EnterpriseApplication6 I create a New SessionBean in EnterpriseApplication6-ejb its name NewSessionBean and its Session type stateless with local interface I creaet a New Servlet in EnterpriseApplication6-war its name NewServlet The problem occure when I declare the NewSessionBean ...
3
1,561
Address substraction value is alway 12? Is size of variables slight?
<p>I'm currently playing with C, C++ and ASM. I can see that there's always difference of 12 between ebp substraction values. My disassembled code:</p> <p>Code:</p> <pre><code>int main() { int abc = 10; int def = 20; short int a = 1; long int b = 1000; //PlayFloat(); GetValue(); return 0...
3
1,355
Fields in a Dojo TabContainer will not switch to edit mode
<pre><code>Why would an Edit button not change the fields in a Tab Container into Edit Mode? Fields outside the Container change mode as expected, but anything inside the Container remains in Read Mode. Is there a setting I need to change in the Dojo Container? &lt;xp:button value="Edit" id="editButton" render...
3
1,733
Wheel file install using pip is not resolving in import
<p>I have two files and one setup.py</p> <p>base.py</p> <pre><code>import json import logging import sys class Base(): def __init__(self, log_level: str) -&gt; None: self.log = self.log_level(log_level) def log_config(self, log_level: str) -&gt; logging: &quot;&quot;&quot;This method ...
3
2,455
Aurelia Validation - Form is loaded with data from a fetch - validation evaluates full fields as empty
<p>I have a form that I successfully load with data from a fetch. If I then click save on that form Aurelia Validation evaluates those form text fields that have data as empty and displays this as an error below the save button - picture below.</p> <p>The validation works perfectly on an empty form but for a form with...
3
3,107
For some reason, my footer isn't very mobile friendly
<p>90% of my website is Mobile-Friendly (everything resizes and such), but for some reason my footer is being basically completely cut off on mobile.</p> <p>The way I have it setup <a href="https://www.factionhouse.org/squallz/" rel="nofollow noreferrer">currently</a> is exactly how I would like it to be setup. This i...
3
2,838
Why would Bing Maps' VEMap.Find be failing silently?
<p>I'm doing some research on using Bing Maps for a proposed application and I've run into a wall. The general idea is that I want to show the locations of various items we have within X distance to a location. The start point is the US map and we're using the user's click to get lat/long, and using that to pick the ne...
3
1,270
OnPropertyChange(null) makes hyperlink disappear
<p>Code first (upper <code>TextBox</code> is simplified for purpose of this question) :</p> <pre><code>&lt;TextBlock Style="{StaticResource FieldNameStyle }" TextWrapping ="Wrap" Height="33" FontSize="12" Visibility="Visible" TextAlignment="Center" ...
3
1,515
Mysql Pivot table for attendance per weekdays of week
<p>for a date interval, I want to display the attendance per weekdays of students records, recorded in three tables [Attendance, Students, Person]. The schema (relevant fields) of tables:</p> <blockquote> <pre><code>Attendance Table --------------------- Attendance_Identifier Student_Identifier Classroom_Identifier...
3
1,985
Listbox not returning data correctly in excel vba
<p>I have a listbox in a userform with 13 options, similar to: <a href="https://i.stack.imgur.com/0ctRx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ctRx.png" alt="This is for demonstration purposes only"></a></p> <p>What I am tying to get it to do is that when an item is chosen, it returns a sp...
3
1,926
Is it possible to pass dynamic props, from one page to another with next.js?
<p>I'm new to Next and have been trying to make a page(index.js) that fetches data(countries) and then displays that data, where each returned element(country) has a button to go to a page(info.js) where that specific countries data will be displayed, was wondering if its possible to pass the props(all country data) to...
3
1,167
Installing sqlite driver in Haskell using stack
<p>I have sqlite3 installed in Ubuntu.</p> <pre><code>$ which sqlite3 /home/user/anaconda3/bin/sqlite3 </code></pre> <p>I'm trying to install the sqlite driver in Haskell and see the following error:</p> <pre><code>$ stack install sqlite sqlite-0.5.5: configure sqlite-0.5.5: build -- While building custom Setup.hs...
3
1,086