title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How does the Scala compiler perform implicit conversion?
<p>I have a custom class, <code>A</code>, and I have defined some operations within the class as follows:</p> <pre class="lang-scala prettyprint-override"><code>def +(that: A) = ... def -(that: A) = ... def *(that: A) = ... def +(that: Double) = ... def -(that: Double) = ... def *(that: Double) = ... </code></pre> <...
3
1,639
Getx() and hide bottomnavigation bar - error with stateful widget rendering
<p>I have a stateful widget (<a href="https://pub.dev/packages/miniplayer" rel="nofollow noreferrer">miniplayer</a>) in my stateless widget. I am trying to hide the bottomnavigation bar and getting the below error when I use Obx... Any idea how to fix this?</p> <p>I/flutter ( 9567): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBR...
3
1,095
Programatically added picture in PDF picture field not being displayed
<p>I have created a PDF with Adobe, which contains an image field called "logo"</p> <p>Now if i want to add a picture using PDFBox it won't be displayed in the created pdf. </p> <p>However no error message is thrown and debugging looks completely fine with a correctly created PDImageXObject object.</p> <p>The used c...
3
2,254
Three reads with the same name in the BAM file
<p>I am dealing with the paired-end BAM file, and come up with many warnings like this: </p> <pre><code>WARNING: Could not find pair for HWI-ST430:177:2:1:4979:15503#0 WARNING: Could not find pair for HWI-ST430:177:2:1:5127:13427#0 WARNING: Could not find pair for HWI-ST430:177:2:1:6521:21452#0 </code></pre> <p>I che...
3
1,496
How can I create a table from answers in a Google Form, in Google Sheets?
<p>So I'm really new to JavaScript, and I've been trying to organise, in a automated way, the answers that I get from a Google Form in a Google Sheet.</p> <p>I need to organise it in a table, with categories as lines and dates as rows, and with every new answer I need that table to updates itself. The date could only u...
3
1,253
BaGet with Apache2 Reverse Proxy on Docker Compose not working
<p>I'm trying to setup <a href="https://loic-sharma.github.io/BaGet/" rel="nofollow noreferrer">BaGet</a> in Docker with Docker Compose behind an Apache2 reverse proxy, where Apache2 is also running in Docker from Docker Compose.</p> <p>I've done this successful with Jenkins and Sonar, but with BaGet (http://localhost:...
3
1,073
Add unique items to recyclerView from geoQuery
<p>I created an app that shows items of users near me.</p> <p>I find the people who near me by using <code>geoQuery</code> and if they are near me, I search in the database what items they have and I populate a <code>RecyclerView</code> with them.</p> <p>I do so by using:</p> <pre><code>List&lt;DiscoverItems&gt; ite...
3
1,339
PowerShell different services to run in particular sequence (Remotely)
<p>First post! I apologize in advance for formatting. I'm just getting familiar with PowerShell and I'm wanting to Stop a service first, restart another service, and start the initial service. Before moving onto the next next service, I want to make sure that the service has stopped before proceeding.</p> <p>I'm using ...
3
1,054
Get pixel value of image draw through onPaint methode
<p>I am developping a custom C# UserControl WinForm to display an image on background and display scrollbars when I zoom with the mouse. For this, I overrided the <code>OnPaint</code> method. In it, if I have an image loaded, according some parameters I know the source and destination rectangle sizes. In the same way, ...
3
1,028
How to use private registry provider, Service Account - from Kubernertes deployments
<p><strong>Update</strong> I suspect this to be a google issue, I have created a new more clean question <a href="https://stackoverflow.com/questions/55416886/authentication-methods-using-a-json-key-file-unauthorized-gcr-login-failed">here</a>.</p> <p><strong>Update</strong>: yes this is different than the suggested "...
3
2,899
How do I show a figcaption in a thumbnail gallery using JavaScript?
<p>I made a thumbnail gallery with JS, and I am trying to show the current image's figcaption when a thumbnail is clicked. JS is working fine for retrieving and showing the thumbnails themselves, but I'm stumped on how to display their figcaptions along with it. (Thumbnail figcaptions are currently set to 'display: non...
3
1,813
java.lang.NullPointerException while trying to add data to object of class in Android
<p>I am facing a silly problem. I am simply trying to add data to an object of my class, and not succeeding.</p> <p>I am fetching data via an Asynchronous task inside my fragment and want to use the resulting JSON to fill my ListView. I am using an ArrayAdapter and have created a class for this purpose.</p> <p>I have...
3
3,869
How to derive multiple classes from a single nib
<p>I’m trying to create a nib for a generic SectionHeader for a TableView as I need several similar SectionHeaders. I’m trying to follow this SO post:</p> <p><a href="https://stackoverflow.com/questions/3117753/how-to-create-multiple-windows-with-the-same-nib-file-in-xcode">How to create multiple windows with the same...
3
1,050
Parse URL using Regex
<p>I have Youtube and Dailymotion Video URL as follows:</p> <p>For Youtube</p> <ul> <li><a href="http://www.youtube.com/v/0PsnoiwMrhA" rel="nofollow">http://www.youtube.com/v/0PsnoiwMrhA</a></li> <li><a href="http://www.youtube.com/watch?v=ok_VQ8I7g6I" rel="nofollow">http://www.youtube.com/watch?v=ok_VQ8I7g6I</a></li...
3
1,055
Why is my graph not showing every Month? Facetgrid, Seaborn
<p>My <strong>sample dataset</strong> is the following:</p> <pre class="lang-py prettyprint-override"><code>dataset = { &quot;ClientId&quot;: [ 10, 20, 20, 20, 10, 5, 3, 7, 5, 20, 12, 5, 3, 20, 5, 8, 10, 9, 7, 20, 21, 5, 3, 10, ], &quot;Year&quot;: [ 2019, 2019, 2019, 2019, 2019, 20...
3
1,469
Navbar menu not collapsing in each page
<p>I'm using Boostrap and my navigation menu is collapsing well in my index.html but not in my second page. I use exactly the same code for the header in both pages. Where does it come from ?</p> <pre><code>&lt;nav class=&quot;navbar navbar-expand-md navbar-light justify-content-between&quot;&gt; &lt;h1 class=&qu...
3
1,056
Change columns presentation based on available size
<p>Im trying to have a layout like in the image. In desktop show 4 items, but if the browser is resized and there is less space show 2 items above 2 below. And if the browser is even more rezied on mobile for example show only 1 item per row.</p> <p>Im trying with this code but its not working. Do you know how to achie...
3
1,038
r- install package returned non-zero exit status warning
<p>I am trying to install gdeltr2 in r but I keep getting an error. I got the following error:Downloading GitHub repo abresler/gdeltr2@HEAD √ checking for file 'C:\Users\pales\AppData\Local\Temp\RtmpI36nL8\remotes14045d19d07\abresler-gdeltr2-1110b37/DESCRIPTION' ...</p> <ul> <li>preparing 'gdeltr2': (1.5s) √ checking...
3
1,103
Grouping JSON data on multiple keys and retaining the keys
<p>I have a flat JSON file that looks like this:</p> <pre><code>{"dataSet": {"dataTable": [{ "id": "List1", "row": [ { "pagenumber": "7", "pageversion": "HE; K12", "category": "3D Print - K12;HE", "pagetype": "Product", "PtrChild": "MakerBot -...
3
4,807
"AttributeError: 'list' object has no attribute 'SMSMessage'"
<p>I have tried many ways but can't seem to get the length of my list through the method in my class my code:</p> <pre><code>SMSStore = [] unreadMessage = [] class SMSMessage(object): def __init__(self, hasBeenRead, messageText, fromNumber): self.hasBeenRead = hasBeenRead self.messageText = messag...
3
1,421
AdobeFlashCS6 Actionscript3 JSON: Exported SWF and HTML banner don't show JSON information
<p>I have a <em>.swf</em> banner that in adobe FlashCS6 plays fine, but when I export it ( <em>.swf</em> and <em>.html</em>) the banner looses JSON information taken from online JSON file.</p> <p>What am I doing wrong?</p> <p>ActionScript Code:</p> <pre><code>play(); import flash.display.Sprite; import flash.events...
3
1,284
Firebase doesn't update the query
<p>I have this code for retrieve my data from database and show it in my recyclerview, but I have no idea how update the query to make an endless list of my data. I search in many posts but I'm new on android and firebase and it's complicated for me.</p> <p>The toast in the scrolllistener only shows the first time(the...
3
1,772
UIScrollView and UIViews
<p>I want to use a UIScrollView to display multiple UIViews as the user scrolls through the UIScrollView control. I'm not worried about showing Pagination just yet.</p> <p>I already managed to implement some of it, but is not working the way I want it to. </p> <p>Currently:</p> <p>I have 3 ViewControllers with diffe...
3
1,101
PostgreSQL not using index for very big table
<p>A table <code>raw_data</code> has an index <code>ix_raw_data_timestamp</code>:</p> <pre class="lang-sql prettyprint-override"><code>CREATE TABLE IF NOT EXISTS public.raw_data ( ts timestamp without time zone NOT NULL, log_msg character varying COLLATE pg_catalog.&quot;default&quot;, log_image bytea ) CRE...
3
2,476
Memory leaking after `tf.keras.Model.fit` is called and training doesn't start
<p>I'm using my yolo <a href="https://github.com/alternativebug/yolo-tf2" rel="nofollow noreferrer">implementation</a> which used to work fine on tensorflow versions prior to 2.5. I tried recently training yolo3 on a small dataset (which uses <code>tf.keras.Model.fit</code>). Here's a colab <a href="https://colab.resea...
3
5,959
group by result not exist in join other tabel laravel?
<p>i have two table and one pivot table. settlement table is this:</p> <pre><code> $table-&gt;ulid(); $table-&gt;string('track_id', 36); $table-&gt;string('payee_user_id', 36); $table-&gt;string('terminal_type', 36)-&gt;nullable(); $table-&gt;string('terminal_provider', 36)-&gt;nu...
3
2,505
Gradle sets incorrect (unexpected?) classpath on running task
<p>I have my project structured in this way:</p> <pre><code>projectRoot +-src +-main | +-java | | +-package/java files go here | +-resources | +-config | +-files go here +-test +-java | +-package/java files go here +-resources ...
3
1,209
Executing a file too many times?
<p><strong>EDIT:</strong> <em>I still have a bug where if I use the command watchit by itself without filtering in an argument I get an endless loop of processes opening without being killed. I think this could be because of the way I set up the binary for watchit to run index.js while also inside of the the watch() I ...
3
1,598
node js app works locally but display weirdly on heroku
<p><strong>solved</strong></p> <p>I've got nodejs app that works fine locally <a href="https://i.stack.imgur.com/QKRIr.png" rel="nofollow noreferrer">how it's suppose to look</a></p> <p>but when run with heroku all I've got was angular braces</p> <pre><code>Total Registered Devices : {{deviceCount}} {{ device.device...
3
1,677
C# Duplicating fields in DataGridView after reading data from multiple files
<p>I'm making a program that downloads zip files from an SFTP server, unzips the files and reads the text file to display certain data in a DataGridView but for some reason its duplicating the values after 10-15 files</p> <p>Result:</p> <p><a href="https://i.stack.imgur.com/tMpr5.png" rel="nofollow noreferrer"><img src...
3
2,947
Firefox 3 with image links and roll over
<p>I have a menu that isnt behaving for firefox 3 (and possible other versions)</p> <pre><code> &lt;div id="menu"&gt; &lt;p style="margin-right: 10px;"&gt; &lt;ul id="image-menu"&gt; &lt;a href="/#middle"&gt;&lt;li class="home_menu"&gt;&lt;/li&gt;&lt;/a&gt; | &lt;a href="/#top"&gt;&lt;li class="about"&gt;&lt...
3
1,048
Reinforcement Learning Agent Policy Won't Update
<p>I am currently training a deep reinforcement learning model in a continuous environment using Ray.</p> <p>The environment I am using was coded up in OpenAI Gym using baselines by another person who's research I am trying to replicate in Ray so that it may be parallelized. The model converges about 5% of the time in...
3
1,446
Using mutex to synchronize two kernel threads causes a system panic
<p>I used the mutex to synchronize the two kernel threads. After running, panic occurred in the system and abnormal memory was found in mutex by kdump.</p> <p>Here is a simplified code example, You can run it directly to reproduce the problem. I changed the memory allocation method to use kmalloc instead of vmalloc, an...
3
3,898
Merge Sort names alphabetically not working
<p>So I'm trying to sort names from a file alphabetically but it's not giving me the correct output. When entering 5 items, the output should be:</p> <p>British Virgin Islands, Hong Kong, Luxembourg, Maldives, New Zealand</p> <p>instead it gives an incorrect output of:</p> <p>Luxembourg, New Zealand, Maldives, New Z...
3
2,403
warn message using hazelcast 3.3 during mapstore loadAll
<p>I am using Hazelcast v3.3. The Hazelcast server runs a few map store implementations. I have sporadically seen the following warning in the logs and need to understand what might be causing this and whether it could lead to data loss in hazelcast. I have a pretty small cluster at the moment for testing (4VMs runn...
3
1,059
Prestashop - The following module(s) were not installed properly era_widget
<p>I tried to use the code below to create a new module but I got an error as the same title. Please help me check!</p> <pre><code>&lt;?php if (!defined('_PS_VERSION_')) exit; include_once(_PS_MODULE_DIR_ . 'era_widget/widgetModel.php'); /** * Description of era_widget * * @author nguye_000 */ class era_widget ...
3
1,418
What format must cells have for datarange for combobox in VBA?
<p>When I select a value in ComboBox1, ComboBox2 is automatically filled with data from a specified range. On selecting a value in ComboBox2 a corresponding value will be placed in a TextBox. It appears that when I have only numbers in the ComboBox value the code will not function. If the value consists of letters or n...
3
1,227
Escaping Fields Array in CakePHP
<p>I currently have:</p> <pre><code>$subQuery = $dbo-&gt;buildStatement( array( 'fields' =&gt; array( "CASE WHEN Application.program_type_id = 3 AND Application.program_type_id IS NOT NULL TH...
3
1,327
Incorrect file output using arrays
<p>Hello everyone I am just learning my first programming language and have just corrected one error in my code only to be left with another error. Thankfully this is the last problem I need to solve but I'm having a little trouble doing it myself.</p> <p>The program is to read in a customer number and expenses associ...
3
1,399
sparql slow if more object value specified
<p>Using virtuoso 7 open source edition,</p> <p>This query below is fast, it return the result instantly,</p> <pre><code>select * WHERE { graph &lt;http://localhost:8890/graph&gt; { ?catAtt qq:catId ?catId; qq:caDataType ?caDataTy...
3
1,519
Odd centering CSS problem in modern non-Chrome browsers?
<p>For some reason, I have this one webpage which renders something great in Chrome, but completely different on FireFox and IE.</p> <p>The effect may be seen <a href="http://www.tiletabs.com/v2.htm" rel="nofollow">here</a>.</p> <p>The other browsers appear to remove my margin centering of my <code>header</code> and ...
3
2,297
MySql query not using indexes set
<p>Recently we switched a db from MariaDB 10.2 to Percona Server (Mysql 5.7) and we have a query that is taking about 15 seconds (before it was about 0.5) because the query optimiser is not using any index on the main table. Because the app logic, we can't change the query format, we need to make the DB to use an index...
3
2,023
Extend a row with rowise() %>% do() when do() returns a vector
<p>How do I make this code more tidy?</p> <pre><code>as_tibble(t(mapply(pmf, x=lhs$mu, y=lhs$sigma))) </code></pre> <p>Here <code>pmf()</code> is a helper function.</p> <pre><code>pmf &lt;- function(x, y) diff(pnorm(c(-Inf, -2, 0, 2, Inf), x, y)) </code></pre> <p>This code takes the mean and standard deviation from...
3
1,491
enum and static const member variable usage in template trait class
<p>I want to test whether a class is streamable to <code>ostream&amp;</code> by seeing whether an overload for <code>operator&lt;&lt;</code> is provided. Based on <a href="https://stackoverflow.com/questions/6534041/how-to-check-whether-operator-exists">these</a> <a href="https://stackoverflow.com/questions/5768511/usi...
3
1,048
jquery gallery not visible when overlay is hidden by default
<p>I have a jquery gallery which is placed inside of full screen absolutely positioned element and by default that element is hidden with <code>display: none</code> until you click a button and then that element is shown with jquery <code>.show()</code>. The problem is that when I click on a button, that fullscreen ele...
3
1,640
How can I use zope.schema to group portal types into categories?
<p>I need to create a Plone configlet that delivers this kind of structure:</p> <pre><code>types = { 'News articles': ['NewsMediaType', 'News Item'], 'Images': ['Image'], 'Pages': ['Page'] } </code></pre> <p>I made a prototype to show what I was thinking to have in the form:</p> <p><img src="https://i.s...
3
1,254
Created table, but where is it?
<p>I set up and connected a derby database called <code>timezonedb</code> <img src="https://i.stack.imgur.com/ZLZ8h.png" alt="database development view"> Then I used the SQL scrapbook to create the table <code>Users</code>. <img src="https://i.stack.imgur.com/1x45v.png" alt="SQL Scrapbook configuration"> <img src="http...
3
2,931
flutter problem: change state of bottomSheet
<p>Here I want to change my Icon when first time will click on &quot;A-Z Alphabetically&quot; then my isSelectAlpha will be true then my Icon will be &quot;UP&quot; when I click again on &quot;A-Z Alphabetically&quot; then will be change &quot;DOWN&quot; icon.</p> <p>But Its not working when I reload the page then my I...
3
3,688
How to save video playing currentTime in Laravel using ajax
<p>This is my route which shows the lesson.</p> <pre><code>Route::get('/lession_video/{lession_id}','FrontendCommonController@lession_video')-&gt;name('lession_video'); </code></pre> <p>Here is my another route which I am using for saving video currentTime in the database using ajax</p> <pre><code>Rout...
3
1,758
R 3.4.1 gsub on Windows 10 - find and replace all strings except for
<p>I am trying to clean up data for a class project. The data deals with NOAA Storm data from 1950 to 2011. The storm types (EVTYPE) are only supposed to be 48 different levels, but there are over 1000 unique entries. I am trying to find all the snow related entries, which gives me:</p> <pre><code> table(grep("snow", ...
3
2,092
Is there anyway to improve this query computational cost?
<p>I'm using PostgreSQL 9.6.1 on my own machine for this database.</p> <p>I have this database of transactions. Entire database is around 100 million rows x 30 columns. Transactions span over the past four years.</p> <p>For this query, there are three relevant columns:</p> <ul> <li>transaction timestamp which is rou...
3
1,298
ActiveSupport::MessageEncryptor generating different encryption for same data
<p>I am using ActiveSupport::MessageEncryptor to generate encrytion of my token and i use this encrypted token for caching. The problem is the ActiveSupport::MessageEncryptor is generating a different encryption for the same data for every call as shown below. Any suggestion on how to avoid this.</p> <pre><code>2.3.1 ...
3
1,277
Angular-timer siddii
<p>in my web app (which is with angularJs in the front part and with Symfony2 in the back part) i need to integrate a timer (count down of a quizzer) i found this timer <a href="https://github.com/siddii/angular-timer" rel="nofollow">https://github.com/siddii/angular-timer</a> on github and it seems to be cool but i d...
3
1,469
NSFetchedResultsController doesn't update UITableView after launch
<p>I have a simple UIManagedDocument-based Core Data app. I'm new to programming in iOS and I've barely got it off the ground and I'm stuck. I have People NSManagedObjects stored in Core Data. When I first launch the app, no entries are there, but if I slide up a modal VC and dismiss it, they magically appear. My d...
3
1,501
OpenLayers 3 doesn't show KML layer
<p>I'm newbie with OpenLayers and I'm trying to add a KML layer to a map.</p> <p>Here is my script:</p> <pre><code>var projection = ol.proj.get('EPSG:3857'); var mapa = new ol.layer.Tile({ source: new ol.source.OSM() }); var map = new ol.Map({ target: 'map', controls: ol.control.defaults({ attri...
3
1,513
How do I remove the old SVG elements and then replace it with a new one?
<p>So I have been working on this code and I have gotten it to work. My problem is that it works perfectly for the first input, but if the user keeps putting in inputs the new picture overlaps the old. I have successfully coded in the ability for the ellipse to be replaced when a new input is given, but I am having tro...
3
3,940
Javascript won't draw the animation taking value from HTML input element
<p>I wanted to create physics simulation with dropping ball. To have more fun I wanted to give to user an access to input his values of dropping ball radius and count. If you would run this code on browser, you could click button 'CREATE' to display animation with default values and it would have worked. When I enter b...
3
1,191
VBA Clear and Copy without blank rows to another sheet on entering value greater than
<p>My 2010 macro updates on opening a sheet. Does 2016 work the same when when they have the target sheet opened in a new 'instance'? It has to be idiot proof (I don't know why they asked me to do it :P). So the macro has to run once when opening the sheet; if the sheet is opened on the second monitor run every time a ...
3
1,556
libGDX consult with speed
<p>What i need to do is, when the points its "example 10" the speed of the ball raise, when the points its "example 20" the speed of the ball raises again, etc. I dont know if i do that in the Ball class or in the GameScreen class and i dont know how to do it. Thanks for your help!.</p> <pre><code>public class Ball { ...
3
2,229
How to set a multiple button on a one image (4x4)
<p>I want to divide a picture into 4x4 and it should have a 16 buttons.</p> <p>As of now I have created 3x3 buttons alone (without picture).</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android...
3
1,100
MERN Application is not storing session
<p>My MERN application is failing to store the session on the browser. The backend is being hosted on Heroku and the client is being hosted by Vercel. When I switch over to localhost, it works as expected, but on deployment, it fails to store any sessions. If I try to log in a user, it will pass the authentication, ...
3
1,036
Swift - didSelectRowAt indexPath next VC not showing up /no storyboards/
<p>I have a problem with "didSelectRowAt indexPath" because row is not firing next VC. In console I've printed string for particular row so selecting a row is working however next VC is not opening. I've of course tried to find a solution on stack overflow and google however I cannot find a solution. Below I'm pasting:...
3
1,267
Is their any way of getting metrics from google ads accounts via api?
<p>I was trying to display metrics from google ads accounts that gave me consent via an Oauth prompt. any ways of displaying data from google ads accounts that went through consent prompt? please fix the code listed below if possible so i can display data on a table via getElementById if possible.</p> <p>Code I tried</...
3
1,243
Select query native in Spring MVC
<p>I want to show JSON data from a database (use SAP HANA database) but I found an error. I want to show data from two or more tables however It was failed. How to fix it? What is the best simple practice to select query table from data JSON? Thank you.</p> <p>controller:</p> <pre><code>@RestController public class I...
3
3,763
ExpandableListAdapter methods are not working properly in my case. Any alternate to ExpandableListView
<p>I am using an <code>ExpandableListAdapter</code> for the first time. I have some textviews in the groupView and some buttons in childView. I've used the following code from the internet and tried to convert it according to my preference. But there is a problem in the <code>getGroupCount()</code> method. I know in my...
3
1,994
error in my speachto text python programm
<p>every time i start my programm it woks perfectly fine but at a point in the programm i get this error</p> <pre><code>Exception in Tkinter callback Traceback (most recent call last): File &quot;C:\Program Files\Python39\lib\tkinter\__init__.py&quot;, line 1892, in __call__ return self.func(*args) File &quot;c...
3
1,759
Keras-WGAN Critic And Generator Accuracy Stuck At 0
<p>I am trying to implement WGAN in Keras. I am using David Foster's Generative Deep Learning Book and <a href="https://github.com/eriklindernoren/Keras-GAN/blob/636ec0533df1d1ba2bfe4ec9ae7aa66bd7ee2177/wgan/wgan.py" rel="nofollow noreferrer">this code</a> as reference. I wrote down this simple code. However, whenever ...
3
3,269
Parallel request historical options chain prices / Last known price in IBrokers (R)
<p>I am trying to create <strong>Current</strong> Options Chain (options per strike, per expiration) for a ticker. </p> <pre><code>library(IBrokers) tws &lt;- twsConnect() # Lets say only Call prices AA &lt;- reqContractDetails(tws, twsOption(local="", right="C", symbol="AAPL")) </code></pre> <p>Native implementa...
3
1,555
Robocopy from Process sometimes Gives Access Denied, Not in BAtch File
<p>We're running a Robocopy through a Process, so we can look at the log file after the Robocopy command fails. Sometimes, the Robocopy will give Access Denied. It's very inconsistent when the Access Denied happens. Running using an admin acct. Here's the code ...</p> <pre><code> using (Process p = new Proc...
3
1,368
AJAX data being sent to the wrong Django view
<p>I'm new to django and ajax so I've been working on a project to learn it. I have two buttons, one that adds a marker and one that deletes a marker.</p> <p>Here is the views.py</p> <pre><code>@csrf_exempt def save(request): searchVar = request.POST.getlist('search[]') waypoint = Waypoint() waypoint.name...
3
1,497
How to parse JSON data in Swift 3?
<p>I need to get my GPS location from mySQL by PHP in Swift 3. I tried to write the code for get data but it still not work, could you advise me?</p> <p>JSON Data from PHP:</p> <blockquote> <p>[{"id":"3752","latitude":"11.2222","longitude":"111.2222","Speed":"0.000000","Volt":"3.97","Percent":"87.000000","Dates":"2...
3
1,305
(PyQt) QVBoxLayout shrink upon multiple loading of addWidget
<p>Why is the layout shrinking like this and other times going back to normal?</p> <p><a href="https://i.stack.imgur.com/SJVeH.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SJVeH.gif" alt="enter image description here"></a></p> <p>I've created several separate UI files in QtDesigner, one is the M...
3
1,660
Conditional keyed join/update _and_ update a flag column for matches
<p>This is very similar to the <a href="https://stackoverflow.com/questions/29658627/conditional-binary-join-and-update-by-reference-using-the-data-table-package">question</a> @DavidArenburg asked about conditional keyed joins, with an additional bugbear that I can't seem to suss out.</p> <p>Basically, in addition to ...
3
2,232
function bind_param() on a non-object in my new code
<p>I am trying to change my PHP code into another secure one so I change the update.PHP page <a href="https://stackoverflow.com/questions/33560398/how-to-prevent-sql-injections-by-updating-codes/">from this</a> to that:</p> <pre><code>&lt;?php require_once ('../include/global.php'); $id=$_REQUEST['id']; if (isset...
3
1,138
EJS just outputs the first found user in some cases
<p>I'm Using mongoDB and ejs to display all my users in a table. The table also has some action buttons to delete the user and to change the users role. The buttons open a popup to change the role or to confirm the deletion. But EJS doesn't pass the users info into the popup. It works totally fine in the table, but not...
3
2,599
Django cannot find all my files in static files
<p>I'm totally fresh to Django. I downloaded a template that presents a well-structured web page. But after I put all the template files in the static dir, it didn't show any images or run any js/CSS files. Here is my dir:<a href="https://i.stack.imgur.com/IenJV.png" rel="nofollow noreferrer"><img src="https://i.stack....
3
1,816
My Permissions Interface Is Not Working Properly For Android API 24 And Upwards
<p>I want to create a code that as soon the app begins, it asks for permissions ( WRITE and CAMERA ). If one or all permissions are denied then the app shows a warning text (in TextView ) asking for permissions and also a button “Permission” ( also made from a TextView ) that WILL REMAIN VISIBLE while the user keeps de...
3
4,030
How to separate a concatenated string when first word (same beginning string pattern) of every observation contains a different ending string in R?
<p>In R I have a much larger data set with the issue I need to resolve. So I have a data frame in R and the first word of every observation in the <code>Post</code> variable has a concatenated string. Fortunately the beginning of the string contains the same word but the ending of the concatenated string is always di...
3
1,336
socket.request.user undefined in Passport.js, Socket.io, and Express
<p>I am learning NodeJs, Express, and Socket.io through a tutorial, the tutorial used a previous version of NodeJs, Express, and Socket.io to access userID. I am using current versions to do the same but it wasn't successful, I adjusted my code to conform with the current version but what I get is an empty string.</p> ...
3
2,074
SUM distinct inside window function
<p>I have a data structure similar to this:</p> <pre><code>CREATE TABLE some_table ( dude_id INTEGER, main_date TIMESTAMP, how_many INTEGER, how_much NUMERIC(5,2), their_ids INTEGER[] ) </code></pre> <p>This is the query I've got so far</p> <pre><code>SELECT dude_id, main_date, how_m...
3
1,349
multi language change in android studio app
<p>i am working on a project that i need to have some settings that users can choose there language</p> <p>when I use the old version of material design librarys , it work well but if i want to change the dependencys to androidX (android V30) it not work</p> <p>it's mean that if i use</p> <pre><code>import android.supp...
3
1,375
Strange results with dividing in assembler on intel 80368 32 bit
<p>It gets stuck in an infinite loop in function "prebroj". It should count how many digits there are in my result number so i can return it as a string later and exit when <code>%eax</code> becomes 0. When I run it in the debugger when i divide my number (<code>%eax</code>) by the required base (<code>%ecx</code>) so ...
3
2,222
How do you assign a char from one char array to another char array in a loop in c?
<p>I am trying to write code that will read in morse code from one .txt file into a char array. I then read in a test file into another char array. From there I want to read the test file into morse code and print it to the monitor.</p> <p>My input files are:</p> <pre><code>A.- B-... C-.- D-.. E. F.._. G--. H.... I.....
3
2,388
innerHTML not working properly. JavaScript
<p>I am trying to print the result but for some reason <code>innerHTML</code> is not working properly. Can anyone take a look ?</p> <p><strong>Not working</strong></p> <pre><code>let show = document.querySelector('#show') fetch('/fetchDataAll') .then((resp) =&gt; resp.json()) // Transform the data into json ...
3
1,743
TCP C: Client not connecting using the IP address you entered?
<p>This is just a simple chat program wherein echoclient sends data to echoserver. In the example code given to us, why is it that the client wouldn't connect if I use an ip-address xxx.xxx.xxx.xxx (where xxx ranges from 0-255, for example 123.124.12.1) but it would if I input random numbers such as 12312 or 23423? In ...
3
1,400
js.cycle.js and jquery.js conflict
<p>I am new to javaScript and Jquery. I want to design a website that contains both an accordion navigation and a slideshow on the same page. In order to do this, I downloaded this auto scrolling slideshow plugin from htmldrive.net:</p> <p><a href="http://www.htmldrive.net/items/show/110/Auto-Scrolling-Slideshow-Tabs-...
3
1,842
Return ViewData from view to controller razor pages
<p>I have view is C#:</p> <pre><code>@{ var itemList = (List&lt;Item&gt;)ViewData[&quot;itemsList&quot;]; } &lt;div class=&quot;row&quot; style=&quot;margin-top: 10px;&quot;&gt; &lt;div class=&quot;col-md-6&quot;&gt; @if (itemList != null) { var id = 0; &lt;table class=&q...
3
1,881
How do I integrate numerically a function in Python?
<p>I'm trying to write a Python code (based on a Mathematica notebook) that includes some integrations, but I had no luck so far.<br> The integral I'm trying to evaluate is:</p> <p><a href="https://i.stack.imgur.com/EKTPf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EKTPf.png" alt="Integral"></a>...
3
1,262
How to manage libraries when building projects?
<p>I have a project <code>XXX</code> that depends on another framework <code>YYY</code>. The framework provides a <code>YYYConfig.cmake</code>. When I configure my project with <code>cmake-gui</code> I add the framework over the <code>YYY_DIR</code> variable. I generate and build the solution. Now when I run <code>XXX....
3
1,108
Java Swing: Controlling focus with textfield and autocompletion dialog/menu
<p>I have a <code>JTextField</code> that I'm trying to add an autocompletion menu to. But I'm having issues with how I should handle the focus.</p> <p>Here's a <a href="http://sscce.org/" rel="nofollow noreferrer">SSCCE</a></p> <pre><code>package test; import java.awt.Point; import javax.swing.JDialog; import javax...
3
1,608
"re-starting" a loop after adding items to an NSMutableArray
<p>I have the following code to simulate a process flow in my laboratory. Whereby a timer adds new items to a NSMutablearray. How do I get the while [array count] !=0 loop to recognise the new additions?</p> <p>Or is there a better methodology?</p> <p>I'm using GCD blocks to simulate a parallel process. The HEFTBooke...
3
1,328
multiple countdowns starting at oncewith no end
<p><strong>First Problem:</strong> <br>I have 4 Countdowns(which start from different values) that should start when i click on the imageview next to them. But the problem is, when i click the first picture, all 4 countdowns start; when i click the second picture, the second, third and fourth countdowns start and so on...
3
1,592
What is the best way to serialize xml into appropriate objects when versioned by namespaces?
<p>My question is the following.</p> <p>I have xml that is versioned by a namespace. I want to serialize this received xml into the appropriate object, but the only way I know to do this means I have to process the xml two times. First to discover the namespace, and then in order to serialize to the object of the pr...
3
1,740
micropython: loading data from a file in function causing an endless loop
<p>I am working on a lopy4 from pycom and I have encountered an od problem while loading config data from a txt file:</p> <pre><code>def loadFromConfigFile(): f= open('config.txt') for line in f: if &quot;uuidExpected&quot; in line: uuidExpected=line[13:len(line)-1].strip() elif &quo...
3
1,170
Data not posting on mongoose with express and jade
<h2>My registration form data is not posting on mongoose database Here is my code</h2> <p>my code working when i get the data from my database but its not posting code please help me guys</p> <pre><code> app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(bodyP...
3
3,884
Tooltip: position & full width (at the same time)
<p>What CSS would force a tooltip:-</p> <ul> <li>to be positioned just above its reference text and</li> <li>to take up the full width of its reference text's container</li> </ul> <p>...at the same time?</p> <p><a href="https://i.stack.imgur.com/VgXOz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V...
3
1,151
Create multiple chart.js charts from jsonfile data
<p>I have created a json file using python which is a list of lists. Each sublist has data for a chart.js chart i.e.<code>chartObject[0]</code> has <code>chartObject[0][0]</code> and <code>chartObject[0][1]</code> for x and y axis.</p> <p>This is the <a href="http://secstat.info.s3.eu-west-2.amazonaws.com/testthechar...
3
1,338
wr new printwriter *bw( error). Program gets basic info form user (id,name last name.) However still getting that error. Any idea?
<p>i am using the following code:</p> <pre><code>package Presentacion; import java.util.ArrayList; import java.util.List; import java.util.*; import java.io.*; public class RegistroUser { String Nombres, Apellidos, id, dia, mes, ano, s, ce, df, celu, RH; Scanner sc = new Scanner(System.in); List&lt;Li...
3
2,542
Symbols resolution in standalone IntelliJ parser
<p>I'm trying to use IntelliJ SDK as standalone java parser and it works fine in most cases, but failing to resolve return type of generic methods.</p> <p>When I debugging <code>resolveMethod</code> for <code>verify(mock).simpleMethod()</code> in next sample inside of IntelliJ:</p> <pre><code>public class ResolutionT...
3
3,607
ERROR streaming.StreamJob: Job not successful
<p>I install Hadoop 2.9.0 and I have 4 nodes. The <code>namenode</code> and <code>resourcemanager</code> services are running on master and <code>datanodes</code> and <code>nodemanagers</code> are running on slaves. Now I wanna run a python MapReduce job. But Job not successful! Please tell me what should I do?</p> <p...
3
2,619