title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Threading a class in Python
<p>I'm currently doing a program in python using an UI done in Qt. This UI consists of programming some data and sending them after a click of a button every 200ms. My problem is that if I do this in my main class, the program completely crashes (freeze) so I have to do this in another class or function. After a bit of...
3
2,717
PHP : Recursively add parant child to the multi dimension array
<p>I have a function which gives an array of the below format</p> <pre><code>$result = [ [ &quot;name&quot; =&gt; &quot;text&quot;, &quot;id&quot; =&gt; &quot;928610&quot;, &quot;entity_type&quot; =&gt; &quot;node&quot; ], [ &quot;name&quot; =&gt; &quot;folder&quot;, ...
3
2,236
How to loop function through list of vectors
<p>I have a list called <code>x</code> containing 8 vectors of different lengths, which I randomly generated like so:</p> <pre><code>set.seed(1852020) # specify how many vectors I want N &lt;- c(1:8) # set up output x &lt;- vector("list", length(N)) # loop to generate binomial vectors of a random length between 1 a...
3
1,870
Count unique Ips from access.log by day and minute
<p>I'm wondering if it is possible to count unique IPs by minute on a specific day (Apache access.log) on Ubuntu.</p> <p>I already found this useful request which gives the requests per day/minute. But I unfortunatly dont make it to count the ips instead of the request lines:</p> <pre><code>grep &quot;06/Sep/2021&quot;...
3
2,548
ld returned 1 error exit status C++
<p>I keep getting "undefined reference to 'x'" where x is the function prototypes. I have the functions mapped out but the main still needs work just fyi. I just want to fix the ld return error 1 before pressing on but I can't seem to pin point the issue.</p> <pre><code> #include &lt;iostream&gt; #include &lt;iomani...
3
1,236
Polymorphism in C++ never upcasts
<p>I have been a java developer for a long time. Im sure Im thinking of this the wrong way. </p> <p>But I have a class Animal and a class Dog. Dog extends animal and in my main, I make a bunch of dogs and stick them into a vector of Animals. </p> <p>While iterating over them, I can not access Dog specific methods on ...
3
1,126
How do solve left gap semantically in Media Queries menu
<p>I have a css issue with a media queries menu, I want the dropdown menu to be 100% width but there is a css issue on the left hand side of the menu showing a gap.</p> <p>Any help would be great!!</p> <p>please see fiddle here <a href="http://jsfiddle.net/kavbE/" rel="nofollow">http://jsfiddle.net/kavbE/</a></p> <...
3
2,556
HTML CSS & JAVASCRIPT Doesn't Work as Coded When Returning to a Page After Pressing the Back Arrow Button on the Browser
<p>The HTML, CSS, and JAVASCRIPT all work as I would like them to. That is until I return to the same page after pressing the back arrow on my browser (I'm currently using Google chrome). For example: when I have the menu bar open on the smartphone browser it stays in one position on the screen as I'd like it to. Howev...
3
5,448
Obtaining real device of VLAN-interface through the netlink
<p>I need to obtain the <a href="https://elixir.bootlin.com/linux/v4.4.172/source/net/8021q/vlan.h#L29" rel="nofollow noreferrer"><code>real_dev</code></a> (f.e. ID) of the given VLAN-inteface.</p> <p>I wrote some test snippet using <a href="https://www.infradead.org/~tgr/libnl/doc/api/" rel="nofollow noreferrer"><em>...
3
1,028
How do I set up webpack and babel when react app is not loading on localhost:3000
<p>I've followed several tutorials and none seem to work. I can configure webpack, babel, and some simple React components but they are not rendering on my localhost:3000. Any suggestions as to what I am doing wrong as there are no console logs or errors being thrown in terminal.</p> <p>package.json</p> <pre><code>{ ...
3
1,430
Countdown timer in iOS doesn´t work in background
<p>I had implemented a simple countdown with <code>UIDatePicker</code> and <code>NSTimeInterval</code> and it works correctly, but I have the following problem: when I run the app in the Xcode simulator, if I press <code>Ctrl + shift + h</code>, the countdown works in background, but when I run the app on my iPhone 6 a...
3
2,865
Setting focus to a DataGridView row
<p>The following source code is intended to set focus to the immediately previous row of a deleted row.</p> <p><a href="https://i.stack.imgur.com/U5LZW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U5LZW.png" alt="enter image description here"></a></p> <p>Suppose I want to delete an unwanted word...
3
1,785
Java JLabel HTML display garbled when font conflicts with system font
<p><strong>UPDATED</strong> - problem is now solved in an ugly way - but there must be a proper way to do it?</p> <p>I am having problems rendering text in a custom font, in HTML in a JLabel <em>when the font name conflicts with the name of a font already installed on the system</em>.</p> <p>The system font is in a d...
3
1,298
Passing the url in a link not working
<p>I'm trying to pass the id of a blogpost in an url. It works in the adminpanel (read blogpost) now I want to do the same on my frontpage, so that it says read more under every blogpost, but when I use the same code it doesn'nt pass the id.</p> <p>My code that isn't working:</p> <pre><code>$db_connection = mysql_con...
3
1,905
How to insert custom value in the script
<p>all, I have this script: (I'm sorry I'm putting it all here, but I'm not sure what's important) [php]</p> <pre><code>&lt;?php add_action('the_content','rpf_content_filter'); add_filter('wp_head', 'rpf_init'); $rpf_options = get_option('rpf_options'); function rpf_content_filter($content){ if(is_admin()) ...
3
10,293
Not able to read special character from pdf using node.js
<p>I have some pdf file which I need to upload in my system and read all the data properly and I have done that in node.js but I have one problem 1. Am not able to read special character which is present in pdf Below is the code and pdf</p> <pre><code> var express = require('express'); var app = express(); var fs = ...
3
4,743
Start activity from fragment Android
<p>I am trying to start a new activity for recording audio. This activity is started when pressing a button (recordSong) in the fragment Settings. When I run the app on my phone, and press the button the app stops with the message "Sorry, the app has stopped" (translated from Swedish). </p> <p>This logcat is returned:...
3
5,570
show listview in the second activity
<p>In my first <code>Activity</code> I have a list of elements, and every time I clicked on a row in my list, I take two elements from the list and pass the elements of a second activity to Fill A Url.</p> <p>I analyze the result of JSON in a <code>ListView</code> (like a shopping cart) then a button that lets you see...
3
1,894
JQuery val() throws runtime error when setting form value
<p>I'm new to Javascript/JQuery, so apologies if I'm missing something simple. I'm trying to make a button to calculate the total from a quantity &amp; unit price, and populate the total field with the result. This is done in ASP.NET MVC3, using VS2010.</p> <p>My code appears to pull the values of SpoilageQuantity a...
3
1,789
Are all the values on the Stack smaller than a passed value?
<p>I am in the middle of completing a Stack program and am unsure how to formulate a method that determines if all the values on the Stack are smaller than the passed value.</p> <p>So, for example, for a stack containing top- (1) (1) (2) (3) (5) (5) (2), allSmallerThan( 3 ) should return false because there values on ...
3
1,605
Problems accessing pre-defined array of floats in C++
<p>I'm trying to make use of precalculated values by outputting them to a header file and then compiling them for use.</p> <p>The precalculated values are cube co ordinates mapped onto a sphere and the data structure takes the form of:</p> <pre><code>typedef float heightMapCubeFace[5][5][3]; </code></pre> <p>I am de...
3
1,278
How to add remove ads button in action bar in android studio?
<p>So, basically, I want to add a Remove ads button in my action bar which would on click open a paid version of my app in the play store.</p> <p>I have made the design pretty much but don't know how to implement it in code.</p> <p><a href="https://i.stack.imgur.com/VzMgW.png" rel="nofollow noreferrer"><img src="https:...
3
2,002
WebGL2 instancing with UBO
<p>I'm trying to implement geometry instancing in my engine using Uniform Buffer Objects. The idea is simple. I fill all visible entities states to single UBO for current scene. And then after commands sorting:</p> <ol> <li>In case without instancing - I bind InstancingUBO range of current instance (glBindBufferRange)<...
3
1,059
loginaction says "please re-type password
<p>This is my viecontroller -</p> <pre><code> import UIKit import FirebaseFirestore import FirebaseAuth import Stripe import FirebaseFunctions class SignUpViewController: UIViewController { var paymentContext = STPPaymentContext() @IBOutlet weak var email: UITextField! @IBOutlet weak var password: UITextField! @I...
3
1,422
Python TypeError JSON parsing from api not working
<p>I'm pretty new to Python so forgive me here.</p> <p>I'm trying to call/print/log JSON from a GET request. I need to get the id's following this tree: items &gt; track &gt; artists &gt; id.</p> <p>Basically im trying to just get the ID's from each track on this JSON file/list. I keep getting errors no matter how I fo...
3
2,559
Google Sign In Button error when trying to login
<p>I have followed all the steps of the Firebase instructions for adding a Google Sign In Button. I have two problems when I open the app I have to wait a couple of minutes before pressing the Google button otherwise it gives me an error, after the first sign in if I try more still gives me the error. (I added all the ...
3
1,412
Public Sub not firing after use of UserForm
<p>I have an issue where, once I use a userform within the file, the public sub that is inserting columns on my sheets stops working. I run into this issue once I use this specific userform. I can add certain information and have the public sub add in the new columns, however, once I use the one userform, it no longe...
3
5,238
Javascript & Django Channels: Chat app sign off notification on window close
<p>I am writing a chat app with Javascript and Django Channels. I am trying get a "User has left chat." message to send when the window is closed, maybe also when the websocket is closed. I'm not sure if the websocket is closing too quickly, but the code as I have it currently is not working. It's possible I should ...
3
2,026
CSS and other resource files are not getting mapped in Spring MVC project
<p>I have created a page with an external CSS file. I am unable to mapp my css file with my jsp page.The same code is working fine in netbeans but causing issue in Sprint Tool Suite(eclipse).</p> <p><a href="https://i.stack.imgur.com/XYoIG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XYoIG.png" a...
3
5,266
SSRS not inclusive for dates; While Management Studio is?
<p>Why is it that when I run the query in Management Studio with the following where clause, it returns the data correctly when the cash_date equals the parameter, FromDate.</p> <pre><code> FILMTRAN.cash_date &gt;= (@FromDate) AND </code></pre> <p>However, when I copy the same query to SSRS it no longer includes the ...
3
1,936
QtCreator Custom Module Issue
<p><em>edited with workable example</em></p> <p>Using Qt 5.10.0, QtCreator 4.5.0, Qt5.10.0 MSVC2015 32bit compiler on Windows7 64bit</p> <p><strong>The Problem</strong></p> <p>After creating a custom module (all files autogenerated from File->New File or Project...->Qt->QtQuick UI File) and attempting to drag and dr...
3
1,703
Geckoboard shows invalid type provided: expected "float64", got "string"
<p>I am using <code>Geckoboard</code> to display certain metrics. I have used the Java API which to push my content to widgets in Geckoboard. However, when I try to push my data to <code>Text</code> widget I keep on getting the error as <code>invalid type provided: expected "float64", got "string"</code>. There isn't m...
3
1,044
Vue Transition to popup menu
<p>I have a Vue project where I try to learn how to use Vue and Vue transitions. One of the things I am trying out is how to create a popup menu which sits at the bottom of sidebar.</p> <p>When closed the menu just shows just the usericon, username and the an arrow. This arrow should move be down when the menu is close...
3
1,393
How can I improve my Mongodb aggregation pipeline, if possible?
<p>For one, I'm using MongoDB version 5.0.10 but I believe in the latest there might be a simpler solution using $group and the new accumulators ($firstN) so if you can let me know one that works in my current version and latest please!</p> <p>Goal: Paginate through a collection starting from the last page going back t...
3
1,111
Spring MVC Hibernate Application loading database table
<p>I created a simple web application with SpringMVC and Hibernate. Everything works fine, my employees are added to database (using MySQL) but page don't show the list of them:</p> <p><img src="https://i.stack.imgur.com/fl4fL.jpg" alt="that&#39;s how it look"></p> <p>Also logger don't show any output message when I'...
3
4,321
Why i cannot fetch data when the users setting is private like location etc. (Facebook PHP SDK)
<p>First sorry for this noobish question, I am trying to get data from facebook. I've set up facebook application for my website, fetching data is working but when i set the location(Facebook Information) to private, the data returned is not containing the location data. </p> <p>Here is the model </p> <pre><code>cl...
3
1,591
Java: Creating objects with variable type and calling methods on an object with variable name
<p>I have a hashmap with keys of type String and values of type ArrayList.</p> <p>It looks something like this:</p> <pre><code>key: ".avi", value: {new VideoResource(var), "videoResources"} </code></pre> <p>I want to do the following things:</p> <p>1. Create a new variable with the same type as that of the one foun...
3
2,784
Access Denied Error in Spring Secirity while upgrading from spring boot starter 1.3.5.RELEASE to 1.5.2RELEASE
<p>I'm using the following dependencies.</p> <pre><code>&lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-eureka-server&lt;/artifactId&gt; &lt;/dependency&gt; &lt;!-- zuul Spring Security dependencies --&g...
3
2,057
Nesting GetContext() calls - Is this Custom UILabel reusing the CoreGraphics context?
<p>My issue is as follows - I'm able to use the below function: takeSnapshotOfScreen to take a properly scaled snapshot of the screen when there exists only an image in any UIView. However, when I add a label, as seen below, the final snapshot image saves down with a smaller, squished version of the larger image, super...
3
1,971
Image Map for dynamic Google Charts
<p>I am using <a href="http://code.google.com/apis/chart/docs/making_charts.html" rel="nofollow">Google Charts</a>. Now I want to make different parts of these charts clickable. For this I am using <a href="http://code.google.com/apis/chart/docs/json_format.html" rel="nofollow">these instructions</a>. But problem is th...
3
1,327
How to update and insert records after every 1 minute in sqlite?
<p>I have created a django project which contains one table. I want to automatically update the records in sqlite databse after every minute. How can be this done?</p> <p>I have already used time.sleep(18000) library of python but it didn't worked.</p> <p>In if:else statement insert and update operations are performed....
3
1,657
Adding a textfield widget to Stack results in RenderFlex children have non-zero flex but incoming width constraints are unbounded
<p>I'm trying to create the following design <a href="https://i.stack.imgur.com/0d4H6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0d4H6.png" alt="enter image description here" /></a></p> <p>Nothing complex. I'd be done in 30 minutes if it was just plain HTML and CSS but its not and Flutter is dri...
3
2,106
Assign Graph API App Permissions to Managed Identity in Azure DevOps Pipeline - Authorization_RequestDenied
<p>I have the the following cobbled together from various sources in my devops pipeline:</p> <pre><code>$MIName= &quot;my-identity-test-mi&quot; $RGName = &quot;my-identity-test-rg&quot; $Location = &quot;eastus&quot; $GraphAppId = &quot;00000003-0000-0000-c000-000000000000&quot; $PermissionName = &quot;Directory.Read....
3
1,133
How to replace a double while loop?
<p>The program, which assesses password strength, initially checks whether the length of the password is correct (6-12) and whether the password contains extented ASCII characters, i.e. 127-255. </p> <p>The problem I have is that if the user first inputs a password which is too short or too long, the program then does...
3
1,825
Undefined reference to vtable with nested class
<p>When I try to compile the following code:</p> <pre><code>Alien::Action::Action(ActionType type, float x, float y) { Action::type = type; pos = Vec2(x, y); } Alien::Alien(float x, float y, int nMinions) { srand(time(NULL)); sp = Sprite("img/alien.png"); box = Rect(x, y, sp.GetWidth(), sp.GetHeig...
3
4,527
this.angularFireList.remove is not a function
<p>Hi I am following <a href="https://www.youtube.com/watch?v=UHTBnTg4rno&amp;list=PLtKjv92L0ihAJ90_NbqCINRu4uKy3RJJU&amp;index=13" rel="nofollow noreferrer">this tutorial</a> and now I am unable to remove a record from firebase realtime database.</p> <p>(updated 11 June 2018) -- previously I was suspecting this error...
3
2,634
Trying to use a while or do while loop to run a basic math game with certain conditions
<p>The body of the code is supposed to run until the user has <strong>entered at least 10 questions</strong>, has <strong>not entered more than 20 questions</strong>, and until the student's <strong>percent correct is 85% or higher.</strong></p> <p>This is not the whole body but i think im having the most trouble with...
3
1,261
Uncaught TypeError: Cannot read property '0' of undefined yii2, JSON, AJAX, Array
<p>I am trying to highlight all the dates that have been scheduled. Ajax and JSON working correctly, I get all the results on console.log(), except for this error when I try to go through the array. But the array has data in it and shows up on console.log. What am I doing wrong? Please help!!!!</p> <pre><code>'beforeS...
3
1,745
Executeable jar with maven to contain ressources
<p>I have a problem with building an executable jar using maven it create a jar but I can't open it because it doesn't find my file, and I don't know what to do anymore I am using this for loading a file, if I add an absolute path to file it works great</p> <pre><code>ClassLoader classLoader = SelectionLab.class.getCl...
3
1,195
Drupal 7 and Varnish image cache setting src to 127.0.0.1
<p>I have a Drupal 7 installation that is sometimes setting the src path of images to 127.0.0.1. Here is an example.</p> <pre><code>&lt;img height="291" width="233" style="width: 233px; height: 291px; float: left;" class="media-image media-element file-default" typeof="foaf:Image" src="http://127.0.0.1/sites/default/f...
3
1,548
Confusing Arduino Output with Basic Code
<p>thanks in advance for your answers!</p> <p>I am attempting to build a Poor Man's Oscilloscope using an Arduino Mega 2560. Assuming I have wired everything correctly, I need some help understanding the code involved and the output.</p> <p>Here is the code uploaded to the Arduino:</p> <pre><code>#define ANALOG_IN 0...
3
4,047
QHeaderView with checkbox - how to differentiate clicking right on the header checkbox from clicking anywhere in the cell
<p>I have a custom header <code>QProduitCartoHeaderView</code> defined in a class inheriting from <code>QHeaderView</code>.</p> <p>In my header I have a checkbox used to check/uncheck all the checkboxes in the same column for all rows of data.</p> <p><a href="https://i.stack.imgur.com/Nx3Jx.png" rel="nofollow noreferre...
3
3,091
trying to parallelize my code however when I run it, it never gives the correct output
<p>I have a program that initializes a vector of 1,000,000 size and then finds all the prime numbers in it. The primes are stored in a new vector, I then iterate through that vector and try to find all of the happy numbers in it. I am trying to use task parallelism to split the work between 2 threads however I never re...
3
1,052
I want to disable background when i click button popup
<p>I can't disable background when I open popup, I want hide or make it shadow but I don't know how to add css, please help with my code, I'm a newbie in develop. Thanks for help!</p> <pre><code> &lt;div class="searchbox"&gt; &lt;form&gt; &lt;input type="text" placeholder="Tìm phòng ...
3
1,025
Displaying dictionary word with GDB in Jonesforth
<p>In <a href="https://github.com/nornagon/jonesforth/blob/master/jonesforth.S" rel="nofollow noreferrer">Jonesforth</a>, a dictionary entry is laid out as follows:</p> <pre><code>&lt;--- DICTIONARY ENTRY (HEADER) -----------------------&gt; +------------------------+--------+---------- - - - - +----------- - - - - | ...
3
1,289
How to correct sql statement to give correct result
<p>I'm running a local MySQL Server on port 3306 with a schema "sys" featuring a table "users" <a href="https://i.stack.imgur.com/JpFER.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JpFER.png" alt="Table in sys schema"></a></p> <p>Now I have a small spring boot application to query all entries fro...
3
1,028
How to modify Hibernate entity effectively(Using Java8 lambda's or anything else)
<p>I am having simple scenario when I am getting Entity from DB and modify it. </p> <p>I dont know which fields are being modified so I am just getting the current entity from db and set all values by the new DTO(newModifiedUserDTO). </p> <p>The code is getting cluttered, ugly and long. </p> <p>Maybe you could advic...
3
1,187
Three.js material isn't applied correctly to hexagonal faces
<p>I have a mesh, created in blender and exported to .obj. The mesh looks valid and has UV map applied and exported into the same .obj as well. For some reason, when I try to apply a texture material, or even basic material to the mesh, only half of the hexagon is actually painted.</p> <p>This is a mesh</p> <p><img s...
3
1,418
Shared variable value not being 'shared' when updated
<p>I am building an Angular app that contains the following:</p> <p><strong>Very Important: 1 shared variable: element_id This variable is defined without a value and lives in a service called api.service.ts</strong></p> <p><strong>api.service.ts:</strong> This service contains 3 shared functions: 1 (getMenus) for ge...
3
1,419
Incremental count in SQL Server 2005
<p>I am working with a Raiser's Edge database using SQL Server 2005. I have written SQL that will produce a temporary table containing details of direct debit instalments. Below is a small table containing the key variables for the question I'm going to ask, with some fictional data: </p> <pre><code>Donor_ID Ins...
3
1,534
Beginner PHP scraping help - getting img src?
<p>I am currently trying to increase my knowledge of PHP and I have set myself the task of scraping a website and turning the data I retrieve into a JSON format.</p> <p>Here is an example row of the data I am trying to parse:</p> <pre><code> &lt;tr&gt; &lt;td class="first"&gt; &lt;img id="ctl00_Content_ctl00_rp...
3
1,099
Running a program through minikube job
<p>I need to run a program with a parameter by making a .yaml file.</p> <p>I write command kubectl apply -f test.yaml</p> <pre><code>apiVersion: batch/v1 kind: Job metadata: name: o spec: template: spec: containers: - name: o image: mzylowski/life-calculator:0.1 command: [&quot;unive...
3
1,452
On of @media queries gets skipped
<p><strong>EDIT</strong> I have actually fixed the issue by recreating the bootstrap grid inside of the HTML, removing the need for the most media queries created. Thanks for all your help all!</p> <p>I've run into a problem and can't seem to find the issue.</p> <p>I have a project running on my web server, and all the...
3
1,401
Node/Express server starts before variable sets
<p>There is an issue on my node/express server startup in that it loads the server before the IP address function/script, which dynamically retrieves the hostIp from EC2 finishes. So my calls to a backend are all returning <code>undefined</code>.</p> <p>Example: (search.js)</p> <pre><code>const awsHost = require('./h...
3
1,186
How do I go about making this work with a #include? It works fine when dropped straight into the code
<p>I have a block of code that I want to #include in my z/OS Metal C program, it works fine when it's just part of the program, but when I put it into a .h file and #include it, the code won't compile.</p> <p>I have successfully gotten this code to work without #include. I'm sure I'm overlooking something having to d...
3
4,943
Typing: declaring classmethod-like decorators
<p>mypy has the binding semantics for <code>@classmethod</code> baked into it (in fact from looking at the source code I believe it is hard-coded for <code>builtins.classmethod</code>) so this works:</p> <pre class="lang-py prettyprint-override"><code>from __future__ import annotations from typing import Any class Fo...
3
1,140
MySQL CONCAT and INNER JOIN - Adding another child table
<p>The query below creates a hierarchical relationship with tables and records:</p> <pre><code>program -&gt; accreditation_standard_group -&gt; accreditation_standard -&gt; learning_event </code></pre> <p>Base on the following tables structures:</p> <pre><code>+------------+----------------+ | program_pk | program_nam...
3
1,334
Closing Popup and setting button label
<p>I'm writing a C++ wxWidgets calculator application. I want to compress trigonometric function buttons into a single one to save on space, using what's basically a split button. If you left click on it, the current option is used. If you right click, a popup menu is opened, which contains all the buttons; when you cl...
3
1,120
purrr::walk not working as expected
<p><strong>UPDATE</strong></p> <ol> <li><p>When I comment out the popup code the duplication goes away...</p></li> <li><p>When I add in the informaiton I want in the popup inside of the walk() function I get what I want without duplication, so I suppose it was taking the assigned <code>Popup</code> and running it thro...
3
1,581
Rails HABTM :through
<p>I have products in 3 different stores.. All stores may have the same products but the inventory can be different and so is the price.. I thought BABTM through would be the best solution</p> <pre><code>class Product &lt; ApplicationRecord has_many :store_products has_many :stores, through: :store_products end cl...
3
1,664
nameError within Inheritance
<p>When the program is run I get this error:</p> <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last): File "G:/assets/gametest1.py", line 141, in &lt;module&gt; cam = camera(318,0,220) File "G:/gametest1.py", line 85, in __init__ super(camera,self).__init__(playerposX,characte...
3
2,188
Cannot get state in Hyperledger fabric correctly?
<p><strong>Problem:</strong></p> <p>I have developed a Hyperledger fabric network and after that, I install a chain code in there. This is my Initialize ledger methods looks like.</p> <pre><code>async initLedger(stub, args) { console.info("============= START : Initialize Ledger ==========="); let drivers = [...
3
1,704
How to enable optimization by optim() return close estimate?
<p>First, I need to clarify that I have read the following posts but my problem still cant be solved:</p> <ol> <li><p><a href="https://stackoverflow.com/questions/39747569/r-optim-l-bfgs-b-needs-finite-values-of-fn-weibull">R optim() L-BFGS-B needs finite values of &#39;fn&#39; - Weibull</a></p></li> <li><p><a href="h...
3
2,394
Passing an instance of a class as an argument to the action/method of Url.Action
<p>My goal is to achieve the following:</p> <ol> <li>While on an ASP.NET page, the user selects a server from a list of <code>Server</code> objects.</li> <li>The user clicks a button to export information about that server.</li> <li>Clicking the button executes a C# method <code>ExportServerInfo()</code> with the curr...
3
1,045
Show different image in dataGridview from sql server
<p>I have a table in sql server that have column have images, and I retrieve the image by adding image column in <code>Gridview</code> if the user click on image column, the application go to database and check if that row have data in image column will show the picture in new form, every thing is perfect and this is ...
3
2,527
CometD jQuery client not working IE9
<p>I am working on CometD jQuery client, which works with different channels. I am trying to to listen messages from cometd server on the channels after publishing a message but not able to receive any message on a subscribed channel (The callback of the subscribe does not execute).</p> <p>Note : Its working fine with...
3
2,063
Limit change to specific table id
<p>I'm trying to do a very simple checkbox input for an html table. I have 3 tables in my page, the problem if I uncheck ".PrenomTCG", it hides all the results (Prenom) in 3 tables.</p> <p>So, is it possible to assign an id in my jQuery function ? For example "prenomTable"</p> <p><div class="snippet" data-lang="js" d...
3
1,410
select group background color labels
<p>I am building a dynamic form to order products and have styled the radio buttons. I haven't added all the CSS, but enough to see the issue I'm having. I have some javascript to add a class when the radio button is selected, however it's not working correctly. I would like it to work so when you select one of the opt...
3
1,833
Non-typed ExtendedData for a gx:track in a balloon
<p>I am trying to attach some extended data (non typed) to a gx:track (finally, inside a gx:multitrack) such that if I click a track, i'd like to see a balloon with the text I put. </p> <p>UPD Note: I need different data for different tracks inside a multitrack (which is inside a placemark), i.e.:</p> <pre><code>&lt;...
3
1,492
angular properties not synchronised with view
<p>I am using angular 9.1.13 and ionic 6.13.1.</p> <p>My use case is I want to navigate from my app to phone native settings and view the value of these settings in my app with a toggle button when I come back to my app.</p> <p>When I come back in my app the value of my settings is not updated into the view. If I click...
3
1,327
Removing things from lists in Python
<p>When I run this program, I would like it to remove whatever number has been chosen, and not make it reappear the next time it loops through the code, however when it loops through the code for a second time it completely forgets about removing the number from the first time. Please help (sorry I'm not great at expla...
3
2,653
How to connect heroku to MongoDB Atlas
<p>I've been having a complete nightmare, trying to connect my heroku app to MongoDB Atlas, as mLab has now been deleted as a Heroku addon.</p> <p>The problem I'm having, is that I can't seem to connect my app, to my Atlas DB.</p> <ol> <li>I've created a cluster in Atlas.</li> <li>Set my cluster IP address to <code>0.0...
3
1,241
Not receiving the data from Node JS and use it in React JS
<p>I'm trying to figure out how to connect NodeJS and send some data to React JS for it to use. The information is being sent when I access the backend, but React JS receives an empty object {}. I'm not sure what I'm doing wrong. Might the problem be related to CORS? Or do I have to use JSON.parse(r)? Not sure.</p> <p...
3
1,189
How to add email verification in this flutter? I need to verify users before signing them in
<p>This code must provide me email verification for the user when they click sign in firstly they have to verify their mail afterwards they can sign in</p> <pre><code> onPressed: () async{ if (nameTextEditingController.text.length &lt; 4) { displayToastMessage(...
3
1,545
Angular <mat-select> component is not working on a FormGroup
<p>I'm trying to use inside a formGroup but although it builds the component and I can navigate through options, I couldn't select any of them. When the page is loaded I can see this error : </p> <blockquote> <p>ERROR TypeError: "this._selectionModel.onChange is undefined"</p> </blockquote> <p>Here's my component....
3
1,231
Can I copy data from one spreadsheet to a new spreadsheet?
<p>I am currently working on a script to automatically send an email when a cell is updated based on a specific value of cells. Now I want to take those same values that I am emailed and populate them into a new spreadsheet and post a timestamp of when that row was updated. In the new SS it will be A(timestamp), B, C, ...
3
1,082
ProgressBar framerate drops when Label draws on top
<p>I'd not normally ask for help here, but I'm stumped - this bug is the strangest thing I've seen in a long time.</p> <p><a href="https://gfycat.com/FluidFrigidEastsiberianlaika" rel="nofollow noreferrer">https://gfycat.com/FluidFrigidEastsiberianlaika</a></p> <p>I've got a simple UI object called <code>GhostProgres...
3
1,093
How do you setup counter_cache on a second degree model in Ruby on Rails
<p><strong>Problem</strong></p> <p>Okay, so I have a weird structure issue, and the rails conventions I know are not helping.</p> <p>In my system, Users have Memberships to Servers. This is generically a HABTM association, but I am using has_many through the Memberships model to simplify some things (according to ad...
3
1,317
why data not pass correctly codeigniter model
<p>I'm using codeigniter framework. In that model file i want to get count of answer , not answer.etc. my model like this.</p> <pre><code> function daily_report() { $user = $this-&gt;session-&gt;userdata['id']; $date = $this-&gt;input-&gt;post('sdate'); $sql="SELECT count(cl.`C_ansornot`) as bb, ...
3
1,564
How to get drawable resources on FAB in Android
<p>I am trying to use a FAB with Bottom NavigationView in my app. I have designed drawable xml resources for that FAB to give the FAB gradient color and an icon along with a drop shadow of custom color. But the problem is when I try to get the drawable xml resource on FAB background attribute it doesn't work and the ap...
3
5,902
Changing a textbox's IsEnabled property from button command in another window isn't working?
<p>I have two windows. I want to click a button in one window and it enable two textboxes in another window. My code seems correct, I have the data context set like </p> <pre><code>&lt;Window.DataContext&gt; &lt;local:MainWindowViewModel/&gt; &lt;/Window.DataContext&gt; </code></pre> <p>and the inotifypropertycha...
3
1,511
HTML email not rendering properly
<p>I've designed a very basic HTML layout for my Laravel app's emails, however, it doesn't display properly in the Spark email client (no formatting whatsoever) and in Apple Mail the preview pane shows the HTML instead of text.</p> <p><a href="https://i.stack.imgur.com/8ajiL.jpg" rel="nofollow noreferrer"><img src="ht...
3
1,093
Android Studio throws an exception trying to execute an app with logback support and minSdkVersion = 17
<p>I'm writing an Android app with Android Studio 2.2.<br> I defined the <code>minSdkVersion 17</code> and I added the following libraries to use <a href="https://github.com/tony19/logback-android" rel="nofollow">logback-android</a>:</p> <pre><code>compile 'com.github.tony19:logback-android-core:1.1.1-6' compile 'com....
3
1,143
Table Splitting Issue in iText PDF
<p>Through my android App, I am generating a quote pdf, where the proper format of the quote has to be like below image:</p> <p><a href="https://i.stack.imgur.com/1KLg5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1KLg5.png" alt="enter image description here"></a></p> <p>But while developing, th...
3
3,937
Route between multiple markers
<p>Is it possible to plot multiple markers as well show routes between these and origin? For example: I have one origin and four different destinations. I want the routes to be shown between the origin and the destinations, so that it is A to B, A to C, A to D, A to E. Can this be done? I have only seen the option to d...
3
2,556
SQL - Convert few dates records to single date range
<p>I have 2 table Named Leave Request and Leave Request Details and it contain data like below</p> <pre><code>Leave Request Leave_Req_Id|start_date | end_date | ------------+-----------+-----------+ lvl10001 | 2013-01-05| 2013-01-08| | | | Leave Request Detail Req_Detail_Id |start_...
3
2,010
iPhone/xCode - EXC_BAD_ACCESS on 4th run of Animation Code
<p>This code works for the first 3 times, and every time without fail, it crashes on the 4th run, with a <code>Thread 1: EXC_BAD_ACCESS (code=1, address=0x4)</code>. I have researched all afternoon, but have come up with nothing, is it that I am not releasing something?</p> <pre><code>- (void)animateImageView:(UIImage...
3
1,156
Authorizing service account to access Picasa private data
<p>I try using the OAuth2 authentication with the PicasaService in a Java application.</p> <p>Maven dependencies:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;com.google.gdata&lt;/groupId&gt; &lt;artifactId&gt;core&lt;/artifactId&gt; &lt;version&gt;${version.gdata}&lt;/version&gt; &lt;/dependency&gt; &lt;depen...
3
1,068
NextJS Microfrontend (MFE) - resolving expose incorrectly
<p>I have been following blog on NextJS MFE. However I have hit a dead end and would like some help.</p> <p><a href="https://thekevinwang.com/2021/03/26/micro-frontends-nextjs/" rel="nofollow noreferrer">https://thekevinwang.com/2021/03/26/micro-frontends-nextjs/</a></p> <p>I have 2 apps - one <code>shell</code> and ot...
3
1,236
ComboBox binding - SelectedItem lost after ViewModel change
<h1>The situation</h1> <h2>Main Window and ContentControl</h2> <p>I have a MainWindow with a HamburgerMenu at the left. The DataContext of MainWindow is MainViewModel. </p> <p>Therein are commands defined to switch between the ViewModels of the 'child views' which are displayed in the center area of MainWindow using...
3
1,695