title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
upload image with username from android to server using multipart post | <p>i want to upload an image and the username from my android application to my server. i developped this code.
in my database i find the image without username ( value 0).i think that i should use the asynctask but i have no idea how to make it. i want to use this method if it's possible.</p>
<p>this is my code:</p>
... | 3 | 2,659 |
Copying database to SD card (java.lang.IllegalStateException) | <p>I have created a function that copies the database from the data/data folder of my app but I keep getting force closes when I use the function CopyDatabase().</p>
<p>Here is my code binded to the button</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-cod... | 3 | 3,659 |
Why does setjmp() take 2 args on windows but only 1 arg on linux? | <p>This <strong>setjmp.c</strong> builds in windows under Microsoft Visual Studio Professional 2019 (Version 16.10.1)</p>
<pre><code>Rebuild started...
1>------ Rebuild All started: Project: setjmp, Configuration: Release x64 ------
1>setjmp.c
1>C:\Users\john\source\repos\setjmp\setjmp.c(48,10): warning C4013:... | 3 | 1,812 |
In Java, Struggling with returning a color | <p>So in my main class I'm doing the following:</p>
<pre><code>String myString = msgBlock.getMsg();
Color fColor = Color.WHITE;
msgBlock.setSuppressed(TernarySwitch.ON); /* suppress original message to display new one */
String[] myStringParts = myString.split("\\s+",13); /*divide into 13 parts */
String finalPart = m... | 3 | 1,324 |
Qt3 vs Qt5 programming syntax | <p>Hi I'm teaching myself Qt based on Qt 5.7.0 (MSVC 2013, 32 bit), Qt Creator 4.1.0 - community edition. I am using an book, "Programming with Qt, 2nd Edition" by Matthias Kalle Dalheimer which focuses on QT3. One of the exercises is to have a slider which uses the LCD number display. There are also two buttons (ad... | 3 | 1,578 |
Spring with maven | <p>I would like use spring and maven for a webservice and when i start the application i have this problem:</p>
<pre><code> Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(default-cli) on project WebService: Command execution failed. Process
exited with an error: 1 (Exit value: 1) -> [Hel... | 3 | 2,960 |
custom Horizontal listview not support imageview | <p>how to load dynamic images in custom listview i follow this tutorial to show listview in horizontal <a href="http://www.dev-smart.com/archives/34" rel="nofollow">http://www.dev-smart.com/archives/34</a> but the problem is this example HorizontialListView not support image view only text will be show if i replace ... | 3 | 10,392 |
Pass data from a Parent ViewController to Child VC without Storyboards - Swift 5 | <p>I couldn't find a way to pass the data to the Child VC once i get the data through a UITextField from the Github API</p>
<pre><code>protocol GithubManagerDelegate {
func didUpdateGithub(_ githubManager: GithubManager, github: GithubModel)
func didFailWithError(error: Error)
}
struct GithubManager {
let... | 3 | 1,400 |
Transforming of images in Java. Transferring of images through sockets | <p>I have a laptop and Microcontroller Evaluation Board MCB1700 with microcontroller NXP1768.
MCB1700 has Ethernet port, LCD (320 x 240) etc. I have IDE µVision V4.03q for developing and downloading C-programs on MCB1700. Also I have ULINK-pro device for downloading C-programs on MCB1700.</p>
<p>My task is: </p>
<ol>... | 3 | 1,142 |
How to run an ignite app in an android device connected to laptop with a cable? | <p>I am trying to run an ignite app in my android phone. I ran this command:</p>
<pre><code>npx react-native run-android
</code></pre>
<p>But it gave these errors:</p>
<p>info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1226 file(s) to forward-jeti... | 3 | 1,935 |
Python PLY Yacc - Parsing division of complex numbers | <p>I'm implementing a calculator in Python to be able to do some maths on real numbers but also complex numbers. </p>
<p>I have a lexer/parser using PLY and I'm creating my own class for complex numbers, voluntarily ignoring the fact that Python already have a built-in type for complex numbers.</p>
<p>The parser work... | 3 | 1,583 |
Focal loss implementation | <p>In the <a href="https://arxiv.org/pdf/1708.02002.pdf" rel="nofollow noreferrer">paper</a> introducing focal loss, they state that the loss function is formulated as such:</p>
<p><a href="https://i.stack.imgur.com/s6Oo2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s6Oo2.png" alt="enter image des... | 3 | 1,855 |
Is it bad practice to mix templates and runtime polymorphism and are there any alternatives? | <p>I am trying to link an enum value to some class object so that I can manipulate the object by only using the enum value. I initially wanted to use a templated approach for learning purposes and the fact it would allow some compile-time computations.</p>
<p>After the initial implementation I've found myself in a situ... | 3 | 1,256 |
Is there a jQuery way to make a <div> appear at the lower left of a table cell that won't destroy responsiveness? | <p>I need to get a <code><div></code> to be at the bottom left corner of a table cell. Something like <code>float: left;</code> and <code>float: bottom;</code> together.</p>
<p>A typical cell is:</p>
<pre><code> <td id="x0900A"> <!-- 0900 room A -->
<p class=... | 3 | 1,352 |
How to summarize over multiple columns programatically using ddply? | <p>Is it possible to specify which columns to aggregate over with ddply from the arguments of a function, without using eval + parse? Heres what I have so far:</p>
<pre><code>x <- c(2,4,3,1,5,7)
y <- c(3,2,6,3,4,6)
group1 <- c("A","A","A","A","B","B")
group2 <- c("X","X","Y","Y","Z","X")
data <- data.f... | 3 | 1,335 |
Font family doesn't work on iPhone and footer freezes mid screen in iPhone | <p>So i completed the website, but i seem to be getting a few errors. The font works fine on my computer, and the footer is positioned in the right place, but when I check the website on my iPhone, the footer is misplaced, and the font is different. I searched for fonts on google fonts and found one called OpenSans bec... | 3 | 2,483 |
Exceptions popping up after button click(java fx) | <p>I am making an application where you have the option to draw a rectangle or a line, and there is also an option to clear the canvas. the clear canvas button works but I have a bunch of exceptions being displayed every time I click the clear canvas button. I am just trying to get rid of the exceptions by trying to pi... | 3 | 4,485 |
Trying to copy text from two different text areas on button click | <p>I'm new to JS so I apologize in advance if this is an easy answer.</p>
<p>I'm trying to select and copy text from two different text area boxes when a button is pressed. I can only figure out how to get one text area to be copied at a time using getElementbyID. I've tried using querySelectorAll("").select(... | 3 | 1,426 |
How to change to tabButtons added dynamically on a TabBar in QML | <p>Lets suppose we add some <code>TabButton</code> using the <code>qml</code>javascript, with the line <code>tabBar.addItem</code> and as argument <code>tabButton.createObject</code>.</p>
<p>Now what i want to do is if i change the language i want the text of the <code>TabButton</code> to change too.</p>
<p>How can t... | 3 | 1,774 |
Elasticsearch CPU spikes while Kibana refreshing | <p>I am facing an issue with Elasticsearch, I see how it goes till 176% CPU usage in my server, so I was wondering whether this is a bug in this release or in the stack itself. It does not happen inmediatelly but after two hours I see these peaks on CPU usage that sometimes lead to an unresponsive server due to the loa... | 3 | 5,182 |
Why is my ModelChoiceField showing three forms instead of two and why is it not reading my choices? | <p><a href="https://i.stack.imgur.com/SVG5a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SVG5a.png" alt="enter image description here"></a>
First of all, I have two model forms fused into one form and they are supposed to show topic name and question type, but for some reason, three forms are show... | 3 | 2,647 |
GStreamer fails to get WAV file duration | <p>I am writing a class in Vala that loads and plays a WAV file using GStreamer.</p>
<pre><code>class Sample : Object
{
private Gst.Pipeline gst_pipeline;
private Gst.Bus gst_pipeline_bus;
private Gst.Element? reader;
private Gst.Element? decoder;
private Gst.Element? convertor;
private G... | 3 | 2,138 |
Encountered error "Invariant Violation: Objects are not valid asa React child | <p>Hi new be in Ractjs here, i want to render a <code>carousel</code> in home page of my existing application,
my <strong><em>index.js</em></strong> file contains</p>
<pre><code>import React from 'react'
import HeaderContainer from 'containers/HeaderContainer'
import Footer from 'components/Footer'
import Flashes from... | 3 | 1,167 |
Parralax mapping does not work correctly using OpenGL and GLSL | <p>I try to implement parralax mapping in my 3D engine using OpenGL and GLSL API but the display is not correct. To learn and apply the complexity of a such technique I was inspired by the following PDF tutorial (page 16, 17 and 18):</p>
<p><a href="https://www.opengl.org/sdk/docs/tutorials/TyphoonLabs/Chapter_4.pdf" ... | 3 | 2,649 |
Pass Data from form 1 to form 2 but redirect form 1 to form 3 using php | <p>It may seems strange but I possible don't know how to get it done. To explain it more, here's my dilemma. I have a page which I named form1.php (just for testing) which has an input textbox and an input submit type which is eclosed in a form which will redirect to form4.html (this is HTML).</p>
<p><strong>Here's th... | 3 | 2,931 |
Form validation without error on IE | <p>I have a html code saved as a php, the form validation works in google chrome but not in IE. In IE after I hit the submit button, the page automatically goes to process form regardless of errors.</p>
<p>This is my code:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>Week 8 ... | 3 | 6,987 |
tagmanager.js on JSF 2.2 form doesn't work. What am I doing wrong? | <p>I have been banging my head against the wall for hours trying to get <strong><a href="http://welldonethings.com/tags/manager/v3" rel="nofollow">tagmanager.js</a></strong> to work on my <strong>JSF 2.2</strong> page and now I am hoping for some help. I had it working fine using jsp pages but those are old and depreca... | 3 | 4,744 |
How to access [object Promise] values from fb messenger chat | <p>I am trying to access the [object Promise] data from my fb messenger chat bot response. When I send the url to scrape via the chat bot the response comes back [object Promise] how do I resolve this and get access to my data?</p>
<p>The code below is what I have tried but to no avail. The <code>getProductInfo()</code... | 3 | 1,215 |
retrieve forign key first value in laravel | <p>I have three tables Products, Category and Images. Category and Image tables have relationship with Product table. when I have use <code>$all_product = Product::with('category','image')->get();</code>product information category information and image information are display successfully want i want is <strong>Que... | 3 | 1,030 |
Django/vanilla javascript ajax posts successfully but the page still reloads | <p>Ajax submitting a form works, but I'm unable to stop the page reload.</p>
<p>I've tried several variations of event listening by id. On the form, the button, tried using inline onclick, onsubmit, tried putting the button outside of the form. </p>
<pre class="lang-html prettyprint-override"><code><form method="p... | 3 | 1,037 |
Gaps between buttons when using float: center | <p>I am trying to create a menu at the top of my webpage. I have four buttons I am attempting to connect together at the top of the webspage to make a menu. I am using </p>
<pre><code>float: center;
</code></pre>
<p>They are centered but there are small gaps between my buttons. Here is a snippet of my code:</p>
<p>H... | 3 | 1,166 |
laravel localization set the default locale parameter replacing other parameters | <p>I am new to laravel. when I set the default locale from localization.php and I click on any of my data list edit buttons it replaces the id variable to locale value like (en/ ur/ sd).</p>
<p>then I remove the default locale parameter from Localization.php</p>
<p>ill get Missing parameter: about</p>
<p>web.php</p>
<p... | 3 | 2,022 |
App crashes when I press the button to connect to raspberry pi | <p>The app crashes when I press the button to connect to a raspberry pi. It prints "Checking Inventory" in the TextView, but crashes immediately after and ends the program on the pi, so I think the problem only has to do with the AsyncTask, but I'm not sure.</p>
<p><strong>here is my code:</strong></p>
<pre><code>pub... | 3 | 1,094 |
Multiple PivotTables from same data source | <p>I'm trying to make multiple PivotTables from the same data source. I would like the PivotTables to be on separate worksheets. As of right now, I have a macro to create one PivotTable and format it how I'd like, but I'm having trouble figuring out how to make multiple. The only differences between the PivotTables wil... | 3 | 1,729 |
NoInitialContextException: heroku war deploy | <p>I have been working on a J2EE project and I am using connection pooling in it too access by database which has been deployed on heroku. I am using following code for setting up Connection object:</p>
<pre><code>Context initContext=new InitialContext();
Context envContext=(Context)initContext.lookup("java:comp/env")... | 3 | 1,810 |
Getting Error during while porting code from Eclipse to Android Studio | <p>I am trying to move my old project code from eclipse to Android Studio , well I have been successful , I am facing an issue for this project .
Below is my gradle file .</p>
<pre><code>apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '27.0.3'
defaultConfig {
... | 3 | 2,242 |
Cannot get ST_DIFFERENCE to provide required outcome in PostGIS | <p>Im used to using PostGIS to undertake a variety of functions, but for some reason am struggling to return the difference between two geometry columns [from different tables]. Assume it's me doing something wrong, but can't quite figure it......</p>
<p>I ostensibly have two polygons <em>test</em> and <em>tc</em>. <em... | 3 | 9,549 |
VSCode different permissions when opened with CLI versus shortcut (macOS Catalina) | <p>I am using the OmniSharp/Microsoft C# extension with VSCode. When I open my project using the <code>code .</code> command inside my project folder, the extension is able to find the dotnet SDKs just fine and everything is good.</p>
<p>When I open VSCode using the shortcut icon, I get this error output from OmniShar... | 3 | 4,340 |
Search any content from div tag and show the searched div at top of all divs | <pre><code> <div class="search-container">
<input type="text" class="input-medium search-query" placeholder="Search">
<button type="button" class="btn">Search</button>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div c... | 3 | 1,881 |
Algolia-Error: Cannot find module 'firebase' | <p>Im following algolia documents.</p>
<p><a href="https://www.algolia.com/doc/tutorials/indexing/3rd-party-service/firebase-algolia/" rel="nofollow noreferrer">https://www.algolia.com/doc/tutorials/indexing/3rd-party-service/firebase-algolia/</a></p>
<p>I did every step that document tell me to do.But It gives me er... | 3 | 2,110 |
Google API Bug - Attribution Inconsistency | <p>Fetching photo data for a place using <code>Google Places API</code> HTTP web service call URL,</p>
<p><code>https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=<LOCATION>&radius=<RADIUS>&sensor=false&key=<API_KEY></code></p>
<p>yields the expected callback. Here is th... | 3 | 1,739 |
Fabric-js patterns: How create pattern for canvas background from Rects without size depending on Zoom and blured Rects | <p>As end target i need to create classic chess like background for canvas to represent 'transparent' background with option to turn it to real transparent and back (in program, no direct user interaction here) - so I'm open on others ways to do it.</p>
<p>At current state i have created more or less correct pattern a... | 3 | 1,335 |
How to update d3-force elements? | <p>I want to update <code>d3-force</code> elements when click, but I find something wrong.
What I want is:</p>
<ol>
<li>generate all links first</li>
<li>then generate all nodes, so that the node can override the link</li>
</ol>
<p>So when clicked the elements should be:</p>
<pre><code><svg>
<line ...><... | 3 | 2,096 |
How can I rotate and translate/scale an overlay so it matches the map rect? | <p>I have an app where users can add an image to a map. This is pretty straightforward. It becomes much more difficult when I want to add rotation (taken from the current map heading). The code I use to create an image is pretty straightforward:</p>
<pre><code>let imageAspectRatio = Double(image.size.height / image.siz... | 3 | 1,093 |
ROOM livedata not emitting results of ROOM.CALLBACK.onCreate() after fresh install | <p>I created a simple ROOM DB and am trying to prepopulate it with some data when the database is being created for the first time.</p>
<p>The results of ROOM's Callback are being shown in the Database Inspector but is not being updated when I'm trying to observe the live data.</p>
<p>Also when I open the app the secon... | 3 | 1,247 |
how to render an SVG from a server and still have the option to interpolate JSX into it? | <p><strong>My goal is to fetch from my own server an SVG and to interpolate the <code>children</code> attribute after the <code><polygon></polygon></code> tag.</strong></p>
<p>I am doing this is to add an interactive layer that can be modified by react.</p>
<p>So far I am able to achieve that by serving my... | 3 | 1,348 |
Graal-js is throwing File system provider error | <p>I am trying to run simple code -
Added all the dependencies as mentioned in this document :<a href="https://github.com/graalvm/graal-js-jdk11-maven-demo/blob/master/pom.xml" rel="nofollow noreferrer">https://github.com/graalvm/graal-js-jdk11-maven-demo/blob/master/pom.xml</a></p>
<pre><code> ScriptEngine graaljsE... | 3 | 1,054 |
Columns and rows flex | <p>So, I am having an issue where I can mostly get my flexbox working, except when it comes to two columns side by side with uneven rows beside each other. For the life of me I can't figure out why it isn't working.</p>
<p>Here is the screenshot of how it looks now:
<a href="http://prntscr.com/ndig4v" rel="nofollow no... | 3 | 1,457 |
PHP Array: Twice if statement in a for | <p>I'm having a difficult to finish a if statement twice.. The rest works fine but when I try to check in another subarray it doesn't work.</p>
<p><strong>EDIT:</strong>
<em>- The first if condition is to check the type of products
- The second if condition is to check the size attributes.
- Products: sweatshirt_cria... | 3 | 3,019 |
SKPaymentQueue Crashing on 'NotifyObserverAboutChanges' | <p>please be patient.</p>
<p>I am a beginner on StoreKit and I'm having a really tough time with this.</p>
<p>The configuration for In App Purchase is all done and I managed to make some previous tests already. But now the app is crashing every other time after launching. Apparently the problem is this error bellow:<... | 3 | 1,091 |
Trying to make a ball bounce back off of an arrays component? (cant think of a better word) C# | <p>I have a ball bouncing off of paddles and walls as desired, i have then added a singular brick via the draw.Rectangle tool and had the ball bounce off of this and then change its colour but could not make it invisible to stop any further collisions.
I am using an array for my bricks as i can have many and can turn t... | 3 | 2,543 |
How do I properly use ASP.NET Core Web Application React project template | <p>Not allowed to say help in title but I need help understanding this template. I am trying to use the ASP.NET Core Web Application React project template for the first time. I am already somewhat familiar with React but not this project template. The template comes with a small weather api to which the FetchData page... | 3 | 3,592 |
Symbolicated iOS crash report from Apple review still not readable | <p>I got a crash report from Apple and symbolicated it following <a href="https://developer.apple.com/library/archive/technotes/tn2151/_index.html" rel="nofollow noreferrer">this document</a>, but I still didn't understand the report. </p>
<p>First, I tried below "XCode approach" to symbolicate the report:</p>
<block... | 3 | 1,659 |
Bizarre HDBScan clustering result for cosine-similarity matrix | <p>I'm trying to cluster similar messages within machine log files (where e.g. I can't ignore numbers). Debugging my code with a subset of messages which all have the same "<em>degree of similarity</em>" I came across a very strange finding: below a certain number of these messages HDBScan produces the expected result ... | 3 | 1,048 |
Mongoose populate from references in another collection | <p>I feel like this has to have been asked before and yet, I can't seem to find an answer. I have the following Mongoose models:</p>
<p><strong>Album Model</strong></p>
<pre><code>const AlbumSchema = new Schema({
name: {
type: String,
required: true,
trim: true
},
user: {
type: ObjectId,
ref... | 3 | 1,042 |
Unable to send mail in php on shared server | <p>I'm unable to send mail on my shared server using ajax and php, is there a problem with the php mail configuration on the server, i'm using hostgator
i have tried in my local ubuntu machine also but there also the same error
as well as how can i get more detail on this error
the error i'm getting is </p>
<hr>
<p>... | 3 | 2,250 |
How to iterate over an array of object and show only the latest value in a child component? | <p>I am trying to build a Card component that takes in data called <code>tag1,tag2,tag3</code>. This data is from my database and a sample of it is shown below.</p>
<p>I am trying to iterate over the values labelled temperature and show the latest value from the API under <code>Temperature</code>.</p>
<p>But currently ... | 3 | 1,337 |
Different Behavior Deploying AWS Lambda Standalone vs within an Application Stack | <p>Hi everybody and thanks for taking time to look at my issue/question.</p>
<p>I am getting different results when deploying my AWS Lambda stand-alone versus within an Application Stack.</p>
<p>I'm trying to connect to AWS Elasticache Redis from within my Lambda. I have .Net Core 3.1 Lambdas (using StackExchange.Redis... | 3 | 1,225 |
I have Created a Whatsapp Clone using MERN Stack. Facing Errors in backEnd side | <p>I have created a WhatsApp clone in the backend of Whatsapp clone i am facing following errors.
when i run yarn start i am facing following errors in console.</p>
<pre><code> yarn start
yarn run v1.23.0-20200615.1913
$ node server.js
(node:4316) [MONGODB DRIVER] Warning: the options [useUnifedTopology] is... | 3 | 3,209 |
Data isnt recode in my database when i add javascript file to the index.html | <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const form = document.querySelector('form');
const full_name = document.getElementById('full_name');
const address = document.getEl... | 3 | 4,855 |
Error using Santiment sanpy library for cryptocurrency data analysis | <p>I am using <em>sanpy</em> to gather crypto market data, compute alpha, beta and rsquared with <em>statsmodels</em>, and then create a <strong>crypto = input("Cryptocurrency: ")</strong> function with a <strong>while</strong> loop that allows me to ask the user for an specific crypto and output its respecti... | 3 | 1,067 |
Notarizing Mac OS app built with Corona SDK no longer working. Fails validation | <p>These are the commands I'm running. This used to work for me every time but now it's failing.</p>
<p><code>codesign -s "Developer ID Application: <YOUR NAME>" --timestamp --options runtime -f --entitlements entitlements.plist --deep <APP NAME>.app</code></p>
<p><code>/usr/bin/ditto -c -k --keepParent ... | 3 | 1,200 |
How to add a Pdfptable little by little to a document when generating a Pdf from a Html | <p>The application I'm working on generates pdf reports from html files using itextsharp library. Apparently, when large tables are generated, itextsharp allocates a lot of memory (~300 MB for a 200KB file).
A solution to this problem is adding the table little by little to the document (so all existing data in table ... | 3 | 1,964 |
Speed up parallelised solving of ODE containing events | <p>The following code represents a simplified version of my actual problem:</p>
<pre class="lang-r prettyprint-override"><code># Libraries
library(desolve)
library(parallel)
# End time
max_time <- 300
# Time vector
time <- seq(0, max_time, 0.1)
# Number of events
n_events <- c(6, 60, 600, 6000)
# p1 value... | 3 | 1,906 |
no onCharacteristicChanged callbacks received from TI SensorTag | <p>I have a TI Sensor Tag that I'm trying to interface with Android using BLE. I'm following the instructions here: <a href="http://processors.wiki.ti.com/index.php/SensorTag_User_Guide#SensorTag_Android_Development" rel="nofollow">http://processors.wiki.ti.com/index.php/SensorTag_User_Guide#SensorTag_Android_Developme... | 3 | 1,208 |
How to concatenate column values in oracle based on other column value? | <p>I have some data in table like:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>CSF</th>
<th>ID</th>
<th>seqNum</th>
<th>Data</th>
<th>rs_id</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>14176159</td>
<td>1</td>
<td>ABC</td>
<td>0x000055.0001882a.017c</td>
</tr>
<tr>
<td>1</td>
<td>141... | 3 | 1,259 |
Subset a dataframe with specific condition in R | <p>hello I have this df</p>
<pre><code> res1 res4 aa1234
1 1 4 IVGG
2 10 13 RQFP
3 102 105 TSSV
4 112 115 LQNA
5 118 121 EAGT
6 12 15 FPFL
7 132 135 RSGG
8 138 141 SRFP
9 150 153 PEDQ
10 151 154 EDQC
11 155 15... | 3 | 1,030 |
How to fusion two (or more) arrays without losing values in numpy | <p>Following the example given in <a href="https://stackoverflow.com/a/44623098/4451521">this answer</a> I am trying to join two (actually more) images but I can not seem to make it right.
Since images are difficult to comprehend (for me) I made a simple example</p>
<pre><code>import numpy as np
import cv2
layer1 = np... | 3 | 2,364 |
How to send the total amount of an order to Stripe Api using Asp.Net Core MVC | <p>I have a Shopping Cart project developed in Visual Studio I am implementing the stripe gateway but I am not sure how to send the total amount of an order to Stripe, all the examples online is showing the amount typed rather than collecting the total of the shopping cart from a list of items and then send the total t... | 3 | 1,775 |
Fragments swipe without re-creation and overlapping | <p>I saw many similar questions, and even took the answer from one (hide/show), but I found that when you rotate devise or turn on the night mode, embedded in the google experience, the fragment opened at this moment replaces the background of other fragments. How i can fix it? It seems that it appears if we replace <c... | 3 | 3,139 |
XmlArray always initializes collections when deserializing XML File | <p>I cannot seem to deserialize a class without the collections (Values and Conditions) being initialized. My desire is to deserialize an XML file without the collections being initialized. Below is my class:</p>
<pre><code>[Serializable]
[XmlRoot(ElementName = "Swag")]
public class SwagCollection : SerializableObserv... | 3 | 1,342 |
jquery ajax post data in php only works for the first time | <p>I'm trying to delete data using jquery ajax in PHP. I'm able to delete the data for the first time but it doesn't work the second time. It only works when i refresh the page after the first time. I checked the HTML response by ajax to make sure nothing wrong but it still not works. Here is my code.</p>
<p>index.php... | 3 | 1,708 |
How to debug clpfd programs? | <p>I have a program in SICStus Prolog (clpfd) and I would like to see what is going on during <code>labeling</code>. I tried <code>trace</code> but it is too verbose which makes it hard to understand what is really going on (what values are assigned to which variables, how are the constraints propagated, etc.).</p>
<p... | 3 | 2,037 |
what(): Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() | <p>I am working on Ubuntu 20.04.</p>
<p>I am trying to test a Neural Network and I have some scripts which are written in python that try to use the GPU. My scripts work fine and I can train and test the model I am trying to build.</p>
<p>However, I noticed that if for some reason my script does not arrive at its end (... | 3 | 2,858 |
How to further process a buggy / malformed PDF that cannot be parsed by Tika / PDFBox but can by Evince / Libre Office Draw? | <p>My program is reading documents with Tika 2.24 to extract their contents.</p>
<p>Yet some PDFs (maybe buggy or malformed) cannot be processed by PDFBox although Evince, Libre Office Draw or even Gimp can open them.</p>
<p>I cannot share these PDFs but what I can tell is that they used to trigger <a href="https://iss... | 3 | 1,202 |
dropdown menu changing position of list elements | <p>When I add a dropdown menu to my liquid navigation bar, all of the list elements are pushed down to the same level my dropdown menu ends.</p>
<p>How do I fix this ?</p>
<p>See <a href="https://jsfiddle.net/pgdjtezu/3/" rel="nofollow">jsfiddle</a></p>
<p><strong>HTML</strong></p>
<pre><code><nav id='menu'> ... | 3 | 1,213 |
Cannot run spark submit in standalone spark cluster | <p>I am working with the following docker-compose image to build a spark standalone cluster:</p>
<pre><code>---
# ----------------------------------------------------------------------------------------
# -- Docs: https://github.com/cluster-apps-on-docker/spark-standalone-cluster-on-docker --
# ------------------------... | 3 | 3,697 |
Most common audio volume range mode | <p>Setting the audio (media) element volume can be done with
<code>media.volume [ = value ]</code>
as stated <a href="https://html.spec.whatwg.org/multipage/media.html#dom-media-volume-dev" rel="nofollow noreferrer">here</a>, where value is a float/double value between 0 and 1. The page also states that "The range... | 3 | 1,400 |
Mean of data with different propabilities | <p>I'm currently facing the following problem:
During an experiment I gathered the counts of events per channel (detector). Plotting the counts against the channels gives almost a normal distribution. I'd now like to calculate the mean of this data set. The problem is that not all of the events that generated the data ... | 3 | 1,088 |
How do I run 1 of 3 javascript functions randomly? | <p>I want to show a random image to a page visitor, then only show that same image to the same visitor until the cookie expires.</p>
<p>Everything works properly but I'm stuck on the initialization.</p>
<p>Basically, if there is no cookie set, I need to run 1 of 3 functions randomly.
How would I go about choosing the... | 3 | 1,098 |
Save full URL path in menu on Twig template engine | <blockquote>
<p>/macros/subdepartments.html</p>
</blockquote>
<pre><code>{% macro displayChildren(departments, parent_id, deep, prefix) %}
{% import _self as macros %}
{% for dept in departments %}
{% if dept.parent_id == parent_id %}
{% set href = dept.seo_title ~ '/' ~ prefix %}
... | 3 | 2,917 |
How to return a list from HTML template to Python Flask application | <p>I am new to Python Flask. I want to update a list in HTML template and return it to the Python Flask application.
So far, I send the list from flask app to the HTML template and display it.</p>
<p>Flask App:</p>
<pre><code>return render_template('er_draw.html', relationship_data=relationship_data)
</code></pre>
<... | 3 | 1,682 |
Uncaught PDOException: Syntax error or access violation: 1064 from improper spacing | <p>I am getting two different types of errors from a single line and it took me long to find out where the error was. This is an interesting behavior php shows while concatenating MySql query statements using bacticks for seperating strings.</p>
<pre><code>$query='SELECT c.name as category_name, p.id, p.category_id, p... | 3 | 1,067 |
Python - Removing Multiples and Finding Prime Numbers | <p>I am starting to learn Python, and I chose to do this problem I found online (as I am just starting to do lists):</p>
<p>"Write a program that adds all integers from 2 to 100,000 to a list. Then, remove the multiples of 2 (but not 2), multiples of 3 (but not 3), and so on, up to and including the multiples of 100,... | 3 | 4,034 |
Mergesort split into 2 arrays | <p>I'm trying to do an assignment, but I can't get this mergesort right. We basically have to make a new version of merge sort. First receiving the original array to sort, then we have to split it into 2 subarrays and then merge them back together on another method.</p>
<p>I CAN'T CHANGE how the methods are created, no... | 3 | 1,135 |
vscode not starting debugger (flask) | <p>This is new behavior, but I don't know what I changed (if anything), although I'm not sure what the Date below indicates as I didn't take any action to update vscode.</p>
<p>I've been using vscode just fine to debug my flask applications for over a year. Today when I tried to start a new debug session, nothing happe... | 3 | 3,683 |
How to pass 2D char array to another function by reference | <p>I want to pass my 2D char array to another function by reference. I did same thing with my int ** it works perfectly. But when it come to char ** same method is broken. I try too many things. I read almost every question but I couldn't see my case.</p>
<p>First of all I have a one char ** which is set to NULL and I ... | 3 | 3,355 |
Spring 4 security login users-by-username-query is always login error | <p>security-context.xml</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.... | 3 | 2,360 |
Paramiko - SSH to remote host | <p>I have a server:</p>
<pre><code>import threading
import paramiko
import subprocess
import sys
import socket
host_key = paramiko.RSAKey(filename='test_rsa.key')
class Server(paramiko.ServerInterface):
def _init_(self):
self.event = threading.Event()
def check_channel_request(self, kind, chanid):
... | 3 | 1,412 |
Loss function used for multi-dimensional feature mapping | <p>I am working on a video animation project using PyTorch. My dataset contains 3904x60 mfcc audio features(input) and corresponding 3904x3 video features(output). The goal is to train a neural network model such that given an unknown audio feature, the model maps it into its corresponding video feature. In other words... | 3 | 1,258 |
first() operand does not publish after a second call inside a function | <p>I don't understand why this does not work but the alternatives below do.</p>
<p><strong>app.component.ts</strong></p>
<pre><code>import { Component } from '@angular/core';
import { Subject, Observable } from 'rxjs';
import { first } from 'rxjs/operators';
@Component({
selector: 'my-app',
templateUrl: './app.c... | 3 | 1,111 |
gradle experimental plugin ndk, stl related problems | <p>I am trying to enable ndk support in android studio, and facing issues related to <code>mutex</code> and other headers. I have taken a look at this <a href="https://stackoverflow.com/questions/4893403/cant-include-c-headers-like-vector-in-android-ndk?rq=1">Can't include C++ headers like vector in Android NDK</a>... | 3 | 9,439 |
how to create a request with ASIHttpRequest like the following? | <p>I was woking on YouTube Resumable Uploads:
<a href="https://developers.google.com/youtube/2.0/developers_guide_protocol_resumable_uploads#Sending_a_Resumable_Upload_API_Request" rel="nofollow">https://developers.google.com/youtube/2.0/developers_guide_protocol_resumable_uploads#Sending_a_Resumable_Upload_API_Request... | 3 | 1,986 |
How do I use django formset_factories? | <p>I am trying to work on a django-based project/website that logs who took out our dogs last. I am very new to django so please bear with lack of knowledge in the field. I currently have my project set up so that I have models based on users/family members, the families' dogs, posts (logs of when and who took out the ... | 3 | 1,763 |
Couldn't fetch other IPs and Ports Gamedig discord.js v12 | <p>I am trying to make all servers information in one embed, but the problem is that the bot fetches all the IPs and ports, giving correct server information but did not give right IPs and ports. It means the bot will give only one server IP and ports from all the servers!</p>
<p>Here is <strong>Updatecmd.js</strong></... | 3 | 1,374 |
Transaction processing - Lookup millions of documents to validate transactions - Cost effective approach | <p>We recently made a shift from a relational to NoSQL (Couchbase). We are facing challenges scaling our backend to handle increasing number of users(reps). One of our product masters has over 50+ million documents and more than a million documents get modified on a day-to-day basis. There are few transactions that are... | 3 | 1,758 |
In iOS tweak development, I cannot overwrite/write file with :writeToFile:atomically method | <p>First of all, I am new to iOS tweak development and sorry if I asked something really seems like dumb. However, I cannot figure out what is the actual problem yet.</p>
<h2>In the following code, I want to do:</h2>
<ul>
<li>Edit the 'integer' value in the dictionary.</li>
</ul>
<h2>So what I did (Expected):</h2>
<ol>... | 3 | 2,146 |
C Linux Sockets( Server Client Synchronization issue ) | <p>I have written a sample socket program in C on Linux.
The server is single process server.
The program is simple where the server is running and the client connects to the server waiting on accept() call.
When the server accepts the client request it sends some string to the client using write call.</p>
<p>Server C... | 3 | 1,499 |
Regexp convert sql LIMIT syntax to SqlServer TOP syntax | <p>I have some query string written for PostgreSQL and I have to convert them to SqlServer. I'm using C# 6.</p>
<p>In order to convert from LIMIT syntax to TOP syntax I've written the following simple regex:</p>
<pre><code>SELECT ([\S\s]*)LIMIT (\d+) -> SELECT TOP $2 $1
</code></pre>
<p>The complete line code is:... | 3 | 1,226 |
Vertical and Horizontal ScrollBars are not working - WPF | <p>I have the following code:</p>
<pre><code><DockPanel>
<Grid>
<Grid.ColumnDefinitions>
<!--This will make any control in this column of grid take 1/10 of total width-->
<ColumnDefinition Width="1*" />
<!--This will m... | 3 | 1,475 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.