title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Request runtime permissions on android | <p>I am trying to get runtime permissions on my app. However the app is not displaying the dialog to request the specific permission. The code below only works when the GPS is turned on on the phone manually.
I am running the app on Android 5.0.</p>
<pre><code>protected void onCreate(Bundle savedInstanceState) {
su... | 3 | 1,071 |
How do I connect a MS Access database with a password and a .mdb , accdb database | <p>I want to connect different access database (they have same tables, same columns) to my system to make a report and this database has a password. I use a <code>openfileDialog</code> to take this database from my files and I want to connect both <code>.mdb</code>, <code>.accdb</code> but but when I use Microsoft.jet.... | 3 | 1,553 |
Success string not found jupload on tomcat 7 | <p>I was previously using jupload with tomcat 5.5 and it worked great! Now I was tasked with upgrading tomcat to version 7(7.0.70 to be exact) and found out that jupload no longer works. I havent changed the code one bit .Only thing changed is the tomcat distr,(I even used the same connector definition on server xml)
... | 3 | 4,904 |
API call missing header information for file transfer | <p>i am writing a java code which will send a file to certain URL through a API call, but there is some information miss out during the <strong>GET</strong> response from the URL, it's seen like my file information missing which are display_name, file_type. The display_name will be the file name of my file <br><br> Her... | 3 | 1,326 |
svg rectangle blinking on hover | <p>can anyone explain why the svg rectangle is blinking on hover? I thought it should remain stable. I would like an infobox on hover, but I don't want to use Jquery. The rectangle in question is the orange one to the right (Graphic designer) demo: <a href="http://jsfiddle.net/0yphnkmL/2/" rel="nofollow">http://jsfidd... | 3 | 6,667 |
Can't center menu | <p>I'm trying to center my menu after I changed my menu with a bar over the full length of the page. But now whatever I try it won't center my menu in the middle of the page. If I try to do it my menu will be at the right or starts in the center but will not be central in my page. I also want the H1 to be with the menu... | 3 | 1,363 |
Transact SQL - which Join to Use | <p>I have two simple SELECT statements:
The first shows a list of Features.</p>
<pre><code>SELECT * FROM Features
id name
-- ----
1 24 Hour Access
2 24 hour CCTV monitoring
3 Airport location
4 Break-Out Areas
5 Business Lounge
6 Business park location
snip..
</code></pre>
<p>and the second statement s... | 3 | 1,140 |
JSON.parse: unexpected character error with ajax and json | <p>I'm having some problem with Json. I want to send a json object to a database on a server and in return get a json result. I'm working with KnockoutJS, jQuery and struts-2.</p>
<p>This is javascript code:</p>
<pre><code>function(ko, dataservice, config, router, messenger, Utente, Vario) {
var
logge... | 3 | 3,969 |
unable to delete only the very first of a series of objects | <p>This is kind of long - don't know if anyone will bother to read it (don't know if I would), but been beating my head against this for over a day.</p>
<p>I have a problem where the first of a series of objects I create is not ever being deallocated. I'm removing event listeners from the object, using the localconne... | 3 | 1,208 |
Working in Dymola, failing in OpenModelica | <p>I have a code generated in Dymola and working there but failing in translation when run in OpenModelica.</p>
<p>Error:
Component cellGeometry of variability parameter has binding 'cellGeometry' of higher variability continuous.</p>
<p>..in code part:</p>
<pre><code>Lib_thermosyphon.Thermosyphon.ThermosiphonCells... | 3 | 1,832 |
Django Rest API. Get all data from different models in a single API call | <p>I am trying to get all data related to model Post using one single API call. This call should include post contents, comments, upvote and downvotes.</p>
<p>I have 4 models and Post model is a foreign key to every other model.</p>
<pre><code>class Post(models.Model):
title = models.CharField(max_length=200, null=... | 3 | 1,254 |
Using POST and Auth with Firebase Database and Swift | <p>I need to use REST Api on my iOS app to post/retrieve data from my server. The app is set up with a key generator, which gets me a id token, and then I format my http request with the id. I know something about my url request is wrong, I just don't know what, but I get back a status code 400 whenever I run this. Any... | 3 | 1,835 |
How do I make the x-axis category label in a polar chart of HighChart non-wordwrap? | <p>Here is the source code:</p>
<p><a href="https://jsfiddle.net/24zrbqpL/" rel="nofollow noreferrer">https://jsfiddle.net/24zrbqpL/</a></p>
<pre><code>Highcharts.chart('container', {
"chart": {
"type": "line",
"polar": true
},
"xAxis": {
"min": 0.5,
"max": 6.5,
"categories": ['Clarify Objec... | 3 | 1,292 |
Tensorflow can't handle multiple input | <p>Have one model to proccess image and one model to proccess numerical values.
Merged both models getting this:
<a href="https://i.stack.imgur.com/JC9Eh.png" rel="nofollow noreferrer">Merged model</a></p>
<p>For the image input I created a image data generator from a dataframe + pictures:</p>
<pre><code>print('Impor... | 3 | 2,178 |
IMG path to db and then show it | <p>I'm trying to upload image path to DB in a table with next structure:</p>
<p><a href="https://i.stack.imgur.com/urYKb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/urYKb.png" alt="enter image description here"></a></p>
<p>This is HTML (I did not include other form-groups, only image one.):</p>... | 3 | 1,704 |
BlueMix: Unable to import updated sklearn into iPython | <p>I am running an ipython notebook on IBM BlueMix and the default version of sklearn is version 0.11 -- I want to upgrade to sklearn-0.18.</p>
<p>Edit: I meant I want to upgrade to sklearn-0.17. </p>
<pre><code>import sklearn
print sklearn.__version__
0.11
</code></pre>
<p>The BlueMix docs say to use:</p>
<pre><... | 3 | 1,269 |
Update the list automatically after selecting the option with JavaScript or jquery | <p>I want to update the list after choosing the option of another list</p>
<p>HTML code</p>
<pre><code> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/boo... | 3 | 1,113 |
React Native Posting/Fetching to Backend | <p>I am having trouble posting data to an express backend with React Native via Android Emulator. The goal of the app is to allow customers to post microtask requests like home chores and lawn care where all the data will be stored to a AWS RDS MySQL Server. On the flip side there are freelancers who can view the custo... | 3 | 7,837 |
Bug! Copy duplicate json data in fragment on Android | <p>I want show 3 <code>fragments</code> in my <code>Activity</code> and load data from <strong><code>json</code></strong> in any <code>fragments</code>! I want show each json data into one fragment, but in my application copy duplicate json data in fragment one ! <br>
<strong>For example :</strong> when running applica... | 3 | 2,994 |
Broken link check while initiating cron-multi | <p>This code checks broken link of a page by initiating multiple cron. However it is not identifying the correct links which are broken . It always returns 0 broken links though there are broken links available on the page.
$url_list is array of links of a page.</p>
<pre><code>$mh = curl_multi_init();
for ($i = 0... | 3 | 2,081 |
Deserializing JSON to C# Class | <p>I'm calling an API that returns JSON data as follows (the array has around 500 items):</p>
<pre><code>[
[
1571702400000,
"8197.28000000",
"8297.99000000",
"8000.00000000",
"8020.00000000",
"34651.82866300",
... | 3 | 2,095 |
Java Thread join problem | <pre><code>public void setGifImage(InputStream inputStream) {
checkWidget();
if (thread != null) {
thread.stopRunning();
try {
thread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
Image... | 3 | 1,910 |
WordPress load posts onClick when posts have specific value in meta_key | <p>On the Create Company page you can insert name, year and version. After you press Save it will save the information together with a generated token to a wordpress post as metadata and the category company. if you click on "show companies" it will load all posts with category company from the current user and put 2 b... | 3 | 1,078 |
Variable changes after loop | <p>I have the following code:</p>
<pre><code> """
Parameters
----------
image : numpy.ndarray(dtype=np.uint8)
A grayscale image represented in a numpy array.
kernel : numpy.ndarray
A kernel represented in a numpy array of size (k, k) where k is an odd
number strictly greater... | 3 | 1,095 |
<svg> not fit into its embeded <path> | <p>I am using BootStraps CSS framework version 4.6, in below HTML</p>
<pre><code><div class="d-inline-block col-6">
{% if not item.comment.is_removed and allow_feedback %}
{% if show_feedback and item.likedit_users %}
<a class="text-base font-bold" titl... | 3 | 1,468 |
Why does the Null check operator used on a null value trigger here? | <p>Hey I have trouble with the Null check operator used on a null value error. In general I nearly have no problems with this, just in one case.</p>
<p>So I have a site where you can chose between two options & this works always, but in this one case not</p>
<p><a href="https://i.stack.imgur.com/Jq65P.png" rel="nof... | 3 | 2,548 |
How to get a value from RecyclerView | <p>I have created an app where you can order things. Then I have this section/window where you can see what you have already ordered: <a href="https://i.stack.imgur.com/7PnGC.jpg" rel="nofollow noreferrer">Overview</a></p>
<p>When you click on an order, you can see more details:
<a href="https://i.stack.imgur.com/St64... | 3 | 3,482 |
Not executing sensor acquisition on C# | <p>I am trying to develop a program for RS-422 sensor by using c#. there is no
error in program but when i connected to the sensor for acquisition there
is no result was shown. Program is running without error.
I used A Chart for using rtChart and below the chart I am trying to show the chart result when I click the... | 3 | 1,055 |
Why is my UIpickerView now taking my builds 3 hours to complete? | <p>I have created an application in xcode 10.3 with swift to effectivly work out out 9 vairables to give 5 results. To select the variables it is though a 9 wheel picckerview. </p>
<p>I have added all the variables in some of the example code below, and it runs perfectly giving the correct results. However the build t... | 3 | 2,655 |
Querying two MongoDB collections with PHP, first returns correct result, but second is empty | <p>I run two MongoDB queries from PHP, one on a first collection (named "products"), second on another collection (named stats).</p>
<p>Some datas of the two collections :</p>
<pre><code>{
"_id" : "20711122",
"labels_hierarchy" : [
"en:pgi"
],
"languages_hierarchy" : [
"en:french"
],
"labels_prev_hierarchy"... | 3 | 1,221 |
Face Recognition with FisherFace always predict a person.How to return -1(unknown person) when not have trained person to face the camera? | <p>I have a data set consisting of 2 people (<code>PERSON A</code> and <code>PERSON B</code>). </p>
<p>My code works perfectly when <code>PERSON A</code> or <code>PERSON B</code> go to the camera(real time). But I test again with <code>PERSON C</code> (not have training images of <code>PERSON C</code> in .csv file ) w... | 3 | 2,239 |
Download image from Website Using Coldfusion | <p>I am fairly new to ColdFusion. I have the following code that displays the images on the page that I reference on a tutorial which works fine. </p>
<p>When the user selects on any of the images, it will display the image in the browser. However, I would like to allow the user to download the images, rather than dis... | 3 | 2,626 |
Google Script Video Upload Fails | <p>I am very new to Google Scripts - like I just started learning how to use it yesterday. I have put together a google drive dropzone based on code from <a href="https://stackoverflow.com/a/34777747/3052484">this answer</a>. I have my script working, and it uploads photos to the correct folder. The problem is, I am no... | 3 | 3,345 |
Database gets populated on page refresh | <p>I have a script which validates and submits the data to the MySQL database but whenever the Index page is refreshed or revisited in a new tab in both the case the database gets populated. The populated data is BLANK. I want to stop this automated resubmission of data but not sure how to do it. </p>
<p>This is my sc... | 3 | 1,946 |
Canvas overlay after creating object | <p>After drawing a shape, i would like to automaticly create overlay(or just add color to rest of the screen) outside the object (It will be locked so user can create only one shape - as for now i dont know how to code that also)
My code:</p>
<pre><code><body>
<label class="btn btn--primary" id="btnRoof">&... | 3 | 2,042 |
Weird blank spaces in my PHP/HTML code | <p>I have been converting my PHP files from ANSI to UTF-8 and something weird happened to my code and I don't know why. This is my index.php code </p>
<pre><code><?php get_header(); ?>
<div id="container">
</div>
<?php get_footer(); ?>
</code></pre>
<p>And my header.php is this:</p>
<pre><co... | 3 | 1,938 |
Load value from db on rendering directive template | <p>I am stuck in a doubt <br/>
I have html :<br/></p>
<pre><code><div ng-repeat="mydata in data" class="ng-scope ng-binding">
<p class="ng-binding">{{mydata.postdata}}</p>
<div my-rating rating-value="rating" data-cat="post" data-id="mydata.id" ></div>
<div ng-repeat="child... | 3 | 1,155 |
WebRTC MediaDevices with Golang and Pion on a Windows 10 "pkg-config error" | <p>I try to follow this documentation <a href="https://github.com/pion/mediadevices" rel="nofollow noreferrer">https://github.com/pion/mediadevices</a>. But somehow i constantly run into errors. First i had to install MinGW (gcc). Then i had the problem that i have to install the 64_84 version of it. That done i had th... | 3 | 1,289 |
How can I build a List in flutter with selectable items that allows me to switch screen | <p>I'm new on Flutter so please don't go hard on me! I'm trying to understand how to build screens and navigate back and forth through them bringing values to other screens during navigation.</p>
<p>I wanna build this screen:</p>
<p><a href="https://i.stack.imgur.com/Johlb.png" rel="nofollow noreferrer"><img src="https... | 3 | 1,673 |
webpack alias not resolving as expected within React class function | <p>I'm trying to play an audio file from a dynamic data object, but I'm receiving the following error:</p>
<pre><code>App.js:12 Uncaught Error: Cannot find module "."
at webpackMissingModule (App.js:12)
at App._this.playAudio (App.js:12)
at onClick (App.js:29)
at HTMLUnknownElement.callCallback (react-dom.deve... | 3 | 1,879 |
String serialization in C++ | <p>I have a following class fields:</p>
<pre><code>int _number;
string _name;
int _amount;
bool _isAvailable;
double _price;
int _storageTime;
int _entranceDay;
int _entranceMonth;
int _entranceYear;
</code></pre>
<p>How shall I serialize/deserialize an object of that class?</p>
<p>I tried this:</p>
<pre><... | 3 | 1,049 |
Adding an image - ReactJS | <p>I have a code using 'array of objects' that showing employees with details. I want to upload their images also. So where do I need to keep images(their path) in my ReactApp or I can upload from laptop's hard drive directly. What will be the code to upload an image for every single employee.</p>
<p>Here is my code be... | 3 | 1,214 |
Django slow load and PosgresSQL optimization | <p>I have build in app in Django and upload it to Heruko.
I am using SQLPostgres of amazon.</p>
<p>And I have installed the Newrelic plugin and Django Debug Tool.</p>
<p>My problem is slow loading pages all over my app:
I will show you part of my code of a very slow loading page.
can you please point me on what I am do... | 3 | 3,022 |
Testing with RSpec I have a message like git detached HEAD state | <p>I'm reading a book Multitenancy with Rails 2nd edition.
And I configured the project and then testing with RSpec.
The results of the test was <code>48 examples, 0 failures</code>.
But before that I take a lot of messages who I don't like to show any time I will run the tests. The long messages is like this:</p>
<p... | 3 | 3,358 |
Python Spider: Extract certain word form results | <p>I'm trying to figure out how I can extract only a part of text in a list.</p>
<p>Below is my script that I'm currently use:</p>
<pre><code>import scrapy.selector
import urlparse
from scrapy.spiders import Spider
from scrapy.http import Request
from MediaMarkt.items import MediamarktItem
def complete_url(string)... | 3 | 1,082 |
How copy a file when emulate command is provided on IONIC 2 | <p>I have an IONIC 2 application, and recently I added aws-sdk reference, like this:</p>
<pre><code>npm install aws-sdk --save
</code></pre>
<p>My problem is when I run the command to emulate the application, the application show me an empty interface. And when I see the console, it tells me that region_config.json f... | 3 | 5,748 |
How to handle data occlusion in d3js? | <p>I am trying to create a sort of raw distribution of the data with:</p>
<ul>
<li>X axis: Person (a or b)</li>
<li>Y axis: Intensity (on a scale of 0 to 4)</li>
</ul>
<p>Is there any way in which I can prevent data points from occluding each other? Such as, when there is an existing data point the next data point wi... | 3 | 1,233 |
Why am I getting a Value error on my python code | <p>Used: tensorflow, keras, python, flask</p>
<pre><code>Error: ValueError: Input 0 of layer conv2d_3 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: (32, 224, 1)
</code></pre>
<p>Structure of Neural Network:</p>
<pre><code>______________________________________________________... | 3 | 1,884 |
Set on item click listener for items in a listview and go to a new activity | <p>I have list view(data is retrieved from the database and put into the listview). What I want to do is make each item in the clickable and once clicked I want it to go to a new activity I have tried a <code>setOnItemClickListener</code> but it does not work</p>
<pre><code>public class MomentsActivity extends AppComp... | 3 | 1,763 |
Unable to get Control back to the flow after catch exception strategy | <p>After catching and handling the exception using catch exception strategy I am unable to bring back the control to the main flow in mule. Is there any way to continue the normal execution in mule like we have in java.
Please refer the code for more detais.</p>
<p>Simple web service class:</p>
<pre><code>public cla... | 3 | 1,426 |
export module (element type is invalid expected a string ) | <p>i call to Trafik.js in index page but it doesnt run and i took wrong , i dont know why...</p>
<p>Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of <code>dene1</code>.</p>
<p>1-index.android.js</p>
<pre><c... | 3 | 1,598 |
Kernighan and Ritchie Exercise 2-2 Debugging? | <p>I am working through K&R (2nd edition) for my own edification and encountered the following exercise (exercise 2-2 p42):</p>
<pre><code>Write a loop equivalent to the following without using && or ||:
for (i=0; i<lim-1 && (c=getchar()) != '\n' && c != EOF; ++i)
s[i] = c... | 3 | 1,302 |
Why is my dispatch/console.log not firing when I call the action? | <p>I was working on my final project for Flatiron and I came across a bug while working on my frontend. I tried many things, but always came back to this one issue. My callback function inside my dispatch is not firing. So while I may be interested to know whether my code should be refactored/fixed of bugs, the biggest... | 3 | 1,969 |
Jasmine test spec failing to pickup React import statement | <p>I am trying to write unit tests for my reactjs code using Jasmine with the Karma test runner - automated with gulp. I am having an issue where my test spec includes import statements which are then not being picked up by the test body.</p>
<p>Here is my test spec:</p>
<pre><code>import React from 'react';
import U... | 3 | 1,396 |
error displaying images - code from PHP & MySQL Novice to Ninja | <p>I am new to PHP and MySQL and in 2 chapters of Kevin Yank's book - PHP & MySQL Novice to Ninja there are mistakes in the code. The only one I haven't figured out lies in chapter 12, and having tried suggestions from multiple posts on this and other fora, nothing works. Thanks to in advance for your help</p>
<p>... | 3 | 4,066 |
Import CSS styles from HTML snippet | <p>I'm playing around with dynamically loaded HTML content on a webpage I am building. What I want is to have a list of HTML files with snippets that will be dynamically imported into my webpage using javascript/jquery and an ajax request. This would allow me to e.g. store several blog posts as separate files and dynam... | 3 | 1,047 |
windows-build-tools installation is taking long time.. possibly froze | <p>I recently encountered an issue while executing <code>npm install</code> on on old project with below error:</p>
<pre><code>npm ERR! path C:\Users\sdamarla\Downloads\Vue Codebase\parts-chat-ui\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
n... | 3 | 2,581 |
Fragment does not get displayed in viewpager | <p>PFB my code and my requirement and my research</p>
<p>Requirement :</p>
<p>I have 4 tabs (Tabs A,B,C,D) having 4 different Fragments (Fragments A,B,C,D on each corresponding tabs) and they are attached with viewpager </p>
<p>I can swipe through tabs using the help of FragmentStatePagerAdapter where it saves the s... | 3 | 6,594 |
Checkbox and label not properly aligning in different code the same is working separately | <p>I have just started learning html and css3. trying to create a login page but when I am trying to add once check box its not inline with label. When I run the same code only for check box its inline. not able to understand what is the exact issue. </p>
<p>HTML Code is </p>
<pre><code><div class="checkbox1">
... | 3 | 2,122 |
Build a "path" with XSLT Recursion | <p>I have a problem an at the moment no idea to solve it ;-(</p>
<p>I have a category structure as input document (xml) and want to build a path structure.
I can only use xslt and want to generate a new xml structure.</p>
<p>The input structure looks like this:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?... | 3 | 1,283 |
Scrollview stopped working when I added tabs to the actionbar | <p><strong>Background:</strong> I develop for Android 4 (SDK 15) and use the native actionbar. In one of my activities I have a fragment with a scrollview as the root element. The fragment fills the content. I do not set a layout for the activity, I only add the fragment. It all works fine.</p>
<p><strong>Problem:</st... | 3 | 4,020 |
fixing the code in python to change a text file | <p>I have a big text file like the small example:</p>
<p>small example:</p>
<pre><code>chr1 37091 37122 D00645:305:CCVLRANXX:1:1104:21074:48301 0 -
chr1 37091 37122 D00645:305:CCVLRANXX:1:1104:4580:50451 0 -
chr1 37091 37122 D00645:305:CCVLRANXX:1:1106:13064:5974 0 -
chr1 37091 37122... | 3 | 1,389 |
Custom segue won't resize Subview | <p>I am using a custom segue for transitioning from a collection view cell to a view controller with a kind of <strong>zoom in/zoom out</strong> style - pretty much like App's do it on the <strong>Homescreen</strong>, when you <strong>open/close</strong> them. </p>
<p>In the destination view controller I am adding one... | 3 | 1,400 |
Google Maps Zoom and Description dialog not working right | <p>Well I'm having a couple problems getting google maps to work using the v3 API.</p>
<p>Look here: [Removed by Poster]</p>
<p>Both maps are, in fact, working but the zoom level seems like it is random. The zoom is set to 12 when the map is initialized. Also, if you click on the marker, the description box is missin... | 3 | 1,097 |
Aligning nav bar items, logo and image | <p>So I have a navbar that currently looks like this:</p>
<p><a href="https://i.stack.imgur.com/cb9Nt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cb9Nt.png" alt="enter image description here" /></a></p>
<p>I'm trying to change the position of the "info" icons so that they're slightly mo... | 3 | 1,351 |
Why isn't Postgres multicolumn partition pruning smarter than this? | <p>In Postgres (v12), we have some large tables that are partitioned by "country" and "sector", but have found that the pruning behaviour is only optimal for queries that identify an exact value for each, and becomes sub-optimal when 2 or more values are specified for either. In addition the "... | 3 | 1,345 |
Firestore doesn't retrieve more than 600 items | <p>I am trying to load some data from Firestore in a Flutter app.
When I load upto 600 items , it works fine. but even if I try retrieving 700I don't get anything.</p>
<p>Here is the code:</p>
<pre><code>Stream<List<Booking>> listenToWeekEntries() {
return FirebaseFirestore.instance
.collection... | 3 | 1,099 |
Changing numbers in a string r | <p>I have a huge data frame. However, I have similar IDs and these were different observations. What I am trying to do is change the last/last two digit(s) in the column ID. So for ID alnfru_00001 in row 5 should be alnfru_00006 and so on. this sequence is seen right throughout the data frame even with other IDs. Can ... | 3 | 1,028 |
Spring Boot CrudRepository able to read, but not write | <p>So I've been working on an extremely simple website over the past 2 days, but I figured it would be neat to somehow link the website with a Discord bot. For the Discord bot part, I've been using the JDA library.</p>
<p>The issue I'm running in to is that I seem to be unable to use the <code>save</code> method. Howe... | 3 | 1,201 |
Picking up where the script ended when time limit is reached | <p>I'm trying to implement the solution that Anton Soradoi proposed on 12/22/11 to enable a mail merge script that will exceed its maximum execution time terminate gracefully, wait a period of time, then pick up where it left off and continue doing so until its run is complete. <a href="https://stackoverflow.com/questi... | 3 | 1,919 |
c++ binary write or read | <p>I have a problem when I tried to make a conversion of a text to binary format:</p>
<p>As described in the code below, it worked well for test3.txt or test4.txt, however, <code>fout3.write(str1.data() ,len);</code> doesn't work for test5.txt (WHICH REALLY puzzled me) so I used <code>fout3.write(reinterpret_cast<c... | 3 | 2,293 |
Why the MediaPlayer object is giving an exception? | <p>This is my question about the exception which I am getting when I am playing an audio file. In my Jumbled words game app, I have two sound files, viz. clap.mp3 and oops.mp3. These files are played when the user provides a correct answer and wrong answer respectively. When the user provides the correct answer, the au... | 3 | 2,044 |
aws elasticsearch signed delete request returns 403 forbidden (using apache httpclient) | <p>I'm getting an http <code>403 forbidden</code> error trying to delete an <code>aws elasticsearch</code> index via the java <a href="https://github.com/searchbox-io/Jest" rel="nofollow noreferrer">Jest(v6.3)</a> elasticsearch client (which delegates the http calls to <a href="https://hc.apache.org/httpcomponents-clie... | 3 | 1,072 |
jquery background image scroll effect speed issue | <p>I have purchased a template for my shopify store that scrolls a site wide absolutely positioned background image at a slower speed than what the user scrolls for a neato perspective effect.</p>
<p>I have found the script used in the template that animated the scrolling effect for the background image. It is as foll... | 3 | 2,264 |
How to use psycopg2.extras.execute_values | <p>I have a DF like this</p>
<p>where I have converted <em><strong>expiry</strong></em> column from string to date time as</p>
<blockquote>
<p>df["expiry"] = pd.to_datetime(df["expiry"])</p>
</blockquote>
<pre><code> instrument_token exchange_token tradingsymbol name expiry ... | 3 | 1,545 |
Formatting dates for {closest_state} output in r (bar chart race) | <p>In this bar chart race, with a Y-m-d date format ("2010-11-30… etc"), the gif (<em>below</em>) runs through the dates fine...</p>
<p><a href="https://i.stack.imgur.com/vMlIl.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vMlIl.gif" alt="enter image description here" /></a></p>
<p>...but... | 3 | 2,019 |
How to keep track of Player vs Computer scores | <p>I am trying to complete my first coding challenge as i am very new to coding, and i have to admit i am struggling with showing a scorecard that keeps track of the player vs computer score over x amount of games played.</p>
<p>I have attempted all kinds of ways to do this including loops, and multiple functions, I fe... | 3 | 1,108 |
Replace Symfony 5 default router | <p>Using the CMF code as a reference I am trying to replace the default router with the chain router...not just decorate...</p>
<pre><code>public function process(ContainerBuilder $container)
{
// NOT available using alias for some reason???
$definition = $container->getDefinition('MyBundle\Routing\ChainRou... | 3 | 2,022 |
Made a "virus", need tips | <p>First of all, it's not really a virus that is used to spy, or steal bank accounts. I don't even know if it's a virus at all. I only made it to troll friends/people I know, and practice my programming skills. I will show you the code, then I will try to explain it a bit;</p>
<pre><code>package pracatice;
import jav... | 3 | 1,222 |
React-Redux : Data gets consumed in UI only after change in state | <p>In our application I am trying to get the data from an API and add it to an array which would be fed to the UI but the data in the UI would be empty until there is any change in any state. That is the UI would not show any data but after I click on a button which changes a state, the data would be visible or is bein... | 3 | 1,453 |
Javascript typeof() operator is returning a different value to the known variable type | <p>Hey I am experiencing a strange bug when I <code>console.log(typeof(variable)</code> compared to <code>console.log(variable)</code>. <br>
In the console the variable is clearly an array of objects, but when I <code>console.log</code> the <code>typeof</code> it says it's an <code>object</code>.<br> I am fetching from... | 3 | 1,040 |
Video is not visible but audio works fine in iOS, flutter video player | <p>This works fine in android device both audio and video is playing accordingly. But in the case of iOS, only audio work and there are no visuals.
I'm running the app in the iOS simulator. I also searched for the issue on GitHub where people suggested that it will work fine on a real device but it isn't.</p>
<p><stro... | 3 | 1,992 |
Array Data Reading Failed | <p>I am reading the data from a "Torque Wrench" using "USB Host Shield2.0" and Arduino UNO. I am receiving correct data from my "Torque Wrench" Data is receiving in a array.
But when I started reading data after "for" loop inside <code>Void loop()</code> I am receiving incorrect... | 3 | 1,729 |
How to loop through each and every row, column and cells in a GridView and set its value ASP.NET | <p>I want to to loop through each and every row, column and cells. and then populate each column with a list.I have a list of employe object each employe has a id name and a city. I want to populate a gridview with the employe list. The first column should have the id of all the employes the second one should have the ... | 3 | 2,415 |
C#: is it possible to generate or fake a visual tree in a service? | <p>I have a windowsservice that is supposed to generate thumbprints of videos.
To achieve this i am trying to use the MediaElement-class (<a href="https://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=vs.110).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/system.windo... | 3 | 1,631 |
Including an AJAX-retrieved select input in an HTML form with ColdFusion | <p>I have AJAX that loads a drop-down menu of teams within a selected department, and then another with agents within that selected team. I'd like to be able to submit the form and use the agent selected in the last dropdown (#form.selectAgent#) to set a variable (#empHistoryRACF#) & run a query. I am able to see b... | 3 | 2,115 |
C# late binding and File exceptions | <p>Simple host app searching for assemblies by special Interface and importing from them list of delegates, now it's <code>Func<string,string></code>.
Then it can execute any <code>Func<T,T></code> and there's no problem.
Problems starts when any of this <code>Func</code> tries to access file, which doesn... | 3 | 1,219 |
Issue compiling variables in alternate method to output desired statements? | <p>I've written this program and am having issues with my method call to "calculateTotalPrice". I have a logic error somewhere that is not compiling my code to the proper output format (Giving final price, items ordered, taxes associated with the purchase and a total price). It would be greatly appreciated if someone c... | 3 | 1,809 |
Circular array and elimination in C, how to return the last "living" element index? | <p>I am trying to write a code that will simulate a <code>circle</code> of a fixed size of people that have one sword. The closest "living person" to the current <code>index</code> will be eliminated and the sword will be passed to the next living person (after the one who got killed) and so on.</p>
<p>I want... | 3 | 1,756 |
Get a single model from server using HTTP in flutter | <p>I would like to retrieve the information of a <strong>single</strong> user from a response sent by a server.</p>
<p><strong>Get the response :</strong></p>
<pre><code>import 'dart:convert';
import 'package:flutter_project/model/user_model.dart';
import 'package:http/http.dart' show get;
class PhpUser
{
PhpUser()... | 3 | 1,117 |
Android ProgressBar does not work unless the progress value and max value are the same | <p>The xml code:</p>
<pre><code><ProgressBar
android:id="@+id/meditationProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:background... | 3 | 1,065 |
Submit button to other workbook | <p>Im making a new excel template where the managers can add info so that we can make a quote based on their template. The meaning is that if they are clicking on the submit button that depending on the value segment gos to the correct excel file (follow up list) and that the customer name, customer id and general info... | 3 | 1,347 |
Swift problems parsing JSON | <p>I would like to make a mini app with pokeapi which contains the pokemon.</p>
<p>I'm having a lot of problems parsing this particular JSON, the data doesn't come out in the TableView.</p>
<p>This is website: <a href="https://pokeapi.co/docs/v2#info" rel="nofollow noreferrer">https://pokeapi.co/docs/v2#info</a></p>
<p... | 3 | 1,166 |
combine to outputs of diffrent rules in Snakemake | <p>I would like to use snakemake to first merge some files and than later process other files based on that merge. (Less abstract: I want to combine control IGG bam files of two different sets and than use those to perform peakcalling on other files.</p>
<p>In a minimal example, the folder structure would look like thi... | 3 | 1,112 |
R SVM Predict - Error in predict.svm: test data does not match model | <p>I started with a data frame of 23,515 rows and 3 columns. I split the data 70/30 into training/testing. I am fitting a classification model with SVM from the e1071 package to predict variable MISSING. After I fit the model, I attempt to predict MISSING in my test set but I get the error below:</p>
<pre><code>> f... | 3 | 1,105 |
Pandas to_csv drops rows (when writing to file-like object) | <p>When using a <code>tempfile.TemporaryFile</code> as an intermediate to writing a pandas DF to csv (<code>to_csv</code>), some rows are silently dropped from the end of the DF.
The number of rows that is dropped depends on both the length and width of the DF, in a seemingly unpredictable manner. </p>
<p>Indeed, if t... | 3 | 1,112 |
Adding Dynamic Javascript with jQuery stops previously added from functioning | <p>I have a script that adds an draggable element to a form.</p>
<p>This works really well until I add another - plus its script - and then the previous on just stops responding. Both scripts are present in the DOM. </p>
<p>Why did the first one stop?</p>
<p>I have tried</p>
<pre><code>$.noConflict()
</code></pre>
... | 3 | 1,584 |
Scala macro annotation - case class with type parameters | <p>I'm trying to write a simple macro annotation for case classes which adds a method to the companion object. The catch is that the new method must account for type parameters on the annotated case class.</p>
<p>Here's the test that I need to pass</p>
<pre><code>package my.macros
import org.scalatest._
class Defau... | 3 | 1,322 |
Remove and add a row with a server side control to a table using Jquery | <p>I have a row which has a server side control. Depending on a condition I need to remove the row completely, so that the HTML cannot be read by screen-readers and re-added later when the condition is changed. </p>
<p>here is the code i am trying but it is not working</p>
<p>my original ASPX</p>
<pre><code> tabl... | 3 | 1,289 |
Price won't show up in the html parsing | <p>I'm trying to get the price of this object into a variable and print it out/put it in a CSV.</p>
<p>This is the section of html that I am trying to parse:</p>
<pre><code><span class="price" data-js-product-price="">
<span>$429.00 USD</span>
</span>
</code></pre>
<p>This i... | 3 | 1,171 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.