title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
i cannot receive any notification from my server | <p>this is my class that receive data from server: it does not show notification
<strong>but if i take sendBroadcast(intent) and Intent out of try and catch blocks and make msg=null; it show notification but with empty message</strong>
please i need your help.</p>
<pre><code>package com.example.hussienalrubaye.myapp... | 3 | 1,786 |
SQL Query - referencing inner query | <p>I'm not an seasoned SQL writer, but can do generic selects and joins, but I have a more complicated SQL that I'm trying to write where I need to grab a inner result set and the do some joins based on it.</p>
<p>My sub or inner query is as such:</p>
<pre><code> (
SELECT a.item_code,
Conca... | 3 | 1,879 |
how to get user object by userid from result of aggregation | <p>I'm trying to query mongoDB to fetch data aggregation. Here is my document:</p>
<p><strong>Relations:</strong></p>
<pre><code>{
"_id" : 1,
"from" : "a",
"to" : "b",
"message" : "a to b",
"createdAt" : ISODate("2015-06-06T16:42:32.789Z"),
"updatedAt" : ISODate("2015-06-06T16:42:32.789Z")
}
{... | 3 | 2,812 |
cannot load such file -- sass/cache_stores | <p>I'm working on a rails 3.2 app and have started getting these errors relating to cache_stores.</p>
<pre><code>% rake --trace
rake aborted!
cannot load such file -- sass/cache_stores
/home/map7/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/sass-3.1.10/lib/sass/engine.rb:4:in `require'
/home/map7/.... | 3 | 1,361 |
Tinkerwell on Remote Host using ProxyCommand? JumpHost ssh | <p>Trying to get Tinkerwell (for Laravel and General PHP development) to connect to a remote host, that is only connected to using a ProxyCommand.</p>
<p>Our remote dev servers are using Coder.com which uses a CLI to write a bunch of entries to your ~/.ssh/config. Each workspace does not have a set IP, and it changes e... | 3 | 2,196 |
How to pass single tag header in php soap client for wcf? | <p>I am trying to consume WCF service from PHP . I need to pass a header field in soap client of PHP in order to consume it. Soap header will be something like this:</p>
<pre><code><header>
<LisenseKey>Lisense key goes here</LisenseKey>
</header>
</code></pre>
<p>The namespace for LisenseKey e... | 3 | 1,631 |
Use function in HTML form to specifc camps | <p>I want to when I click the button it will add what I wrote in the field with the prefix say and send it through POST, the POST is working fine because if I don't use the script it will send it but without the "prefix" </p>
<pre><code> <script>
function say() {
document.actionsv.command.... | 3 | 1,265 |
Responsive parallax or layered vertical text effect | <p>I'm trying to reproduce the text effect as seen on <a href="http://www.balmain.com/en_eu/" rel="nofollow">http://www.balmain.com/en_eu/</a> - the text is vertically and horizontally centered in each div, but as you scroll down, the top position changes so that it has a parallax effect. As you scroll down, the text i... | 3 | 1,874 |
The xAxis(date): Undefined is not a function | <p>I'm having a problem while getting the xAxis done. I'm a newby using D3 and I just got lost by using the D3 Date method. Could anyone help me to figure it out the problem that is causing the <code>undefined is not a function</code>. I will really appreciate the help, here is my code:</p>
<p>index.html</p>
<pre><co... | 3 | 1,191 |
C++ Rvalue arrgument and move | <p>Trying to understand the difference between rvalue formal parameter and call by value parameter.</p>
<p>When I called fun(move(Demo{}) I see only default constructor called once.
While I called gun(move(Demo{}) I see default constructor and rval constructor called. Please some one help me to understand the behavi... | 3 | 1,167 |
How to get Angular getter and setter working? | <p>trying to apply 'Intercept input property changes with a setter' from the angular.io guide. the template of the child shows, but no changes are being made to the input of the parent..?? it worked before :-) :-(</p>
<p>This is the child component: ts and html:</p>
<p>ts file</p>
<pre><code>```import { Component, OnIn... | 3 | 4,754 |
Issues with IPN and data entry in a MySQL database | <p>When I test my IPN handler, if I use the IPN Simulator from:
<a href="https://developer.paypal.com/developer/ipnSimulator/" rel="nofollow noreferrer">https://developer.paypal.com/developer/ipnSimulator/</a> everything works fine.</p>
<p>Although, when I try to use the sandbox environment on my website: <a href="htt... | 3 | 6,373 |
Can't parse form-data twice | <p>What I am trying to do is delete the images with same id before I upload a new image, if the user has inputed image. Multer does not provide a way to detect if there is an input only, it has to upload the file first.</p>
<p>So I figured out to use another form-data libarary to do just that. But when I do that multer... | 3 | 1,059 |
How to click through an object that doesn't completely cover the background and disappear on hover while exiting the element through window object | <blockquote>
<p>This question is related to but not the same as <a href="https://stackoverflow.com/questions/32927336/how-to-click-through-an-object-that-doesnt-completely-cover-the-background-and">How to click through an object that doesn't completely cover the background and disappear on hover</a></p>
<p>I... | 3 | 2,426 |
Can't receive SMS through Twilio trial account in Rails 4 | <p>I'm trying to implement <strong><em>phone number verification</em></strong> in my app and I've decided to go with <a href="https://github.com/twilio/twilio-ruby" rel="nofollow noreferrer"><strong><em>twilio-ruby</em></strong></a> after dumping <a href="https://github.com/getprove/prove-ruby" rel="nofollow noreferrer... | 3 | 1,315 |
What does git push -u origin BRANCH do when you are not on BRANCH? | <p>When I first started using git, I was told by another team member to always push using</p>
<pre><code>git push -u origin MYBRANCH
</code></pre>
<p>because it would prevent me accidentally pushing code to the wrong branch. I didn't fully understand and today tried to understand what happens that means.</p>
<p>I crea... | 3 | 1,056 |
android.database.sqlite.SQLiteException: no such table: countries (code 1 SQLITE_ERROR) | <p>I just implemented SQLite database in my project, the app worked perfectly in the old app but after I transfer database files to another app and try to run it, It gave me this error</p>
<pre><code>android.database.sqlite.SQLiteException: no such table: countries (code 1 SQLITE_ERROR): , while compiling: SELECT * FRO... | 3 | 1,964 |
How to nest variable in ansible with for | <p>I am working with Ansible and I need to display a list of the hosts' network interfaces. In a Jinja2 format template I need the following values: Name, IP, Mask and Network for each of the interfaces. To have this information I use the ansible_facts but I have a problem when making the for.</p>
<p>I get the network ... | 3 | 1,812 |
Following code displaying NAN and INF value on screen | <p>Following code displaying INF and NAN value on screen when displaying values from mysql. I ran the query in mysql and I was able to get the desired values but on the web page while returning the values I get the above values.</p>
<pre><code>function get_preelections_results_public(){
global $mysqli;
$return... | 3 | 1,190 |
Pointer to an object in inheritance | <p>Here I'm not getting correct output, Here I used inheritance concept, but I don't know, how to call method using object of pointer type.</p>
<p>Please some one give me some solution. </p>
<pre><code>#include <iostream>
#include <cstring>
#include <iomanip>
using namespace std;
class person
... | 3 | 1,732 |
SIGSEGV in OpenGL fragment shader on Android device | <p>I have a fragment shader in an android app using GLES 2.0 which works fine on the emulator but crashes with a "Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1)" on a Nexus 4 when I try to link the shader program. </p>
<p>I basically started from Google's tutorial (<a href="http://developer.android.com/training/grap... | 3 | 1,320 |
container border round inside row in flutter | <p>I made some container, there is 2 container in one row. i try to make rounded border in each container using boxdecoration but seems like it cant place on here so i removed it. so anyone can help me to solve this.</p>
<ul>
<li>and another question, how to make width margin in a column?i want to add a bit space on le... | 3 | 2,327 |
UnknownError: Failed to get convolution algorithm when running LSTM using Tensorflow-gpu | <p>I'm trying to run a RNN using tensorflow-gpu since with CPU it took me around 13 minutes to treat 1 epoch (8000 pictues in train/ 2000 in test). However, I tried several times the installation of tensorflow-gpu on my Windows 10 but could not manage to run it successfully. I have the following configuration:</p>
<p>... | 3 | 1,867 |
check_rhub is trying and failing to install BiocManager | <p>I am trying to submit an R package to CRAN. I am at the stage of testing it with check_rhub(). If I use a platform like linux-x86_64-centos-epel or windows-x86_64-release it installs without any problems. However, when I try one of the debian platforms, such as debian-clang-devel, it tries to install BiocManager man... | 3 | 1,489 |
Interactive drop down menu that auto fills drop down values depending on what user inputs | <p>I'm trying to create an interactive drop down menu that uses mysqli query to autofill the values in each drop down. So far the first drop down menu echo's the Brands in the database for each part so that works fine. However the second drop down displays regardless of the $selected value being true or false, but also... | 3 | 1,396 |
I need to do the best 3 out of 5 but I can't get the code to return a score, what should I do? | <p>To elaborate on what I'm asking, I need to make a counter that allows me to decide the winner of the two opponents (basically a rock paper scissors game) by 3/5 matches. I have the code set to return the winners score +1 but its coming out as 0/0 no matter who wins and I don't know how to fix what ever problem I'm h... | 3 | 1,027 |
Strange Array and cannot do replacement | <p>I have this Array from an API. I want to replace the word 'test' with 'yes'</p>
<p>I have tried all kinds of stuff... can you help.</p>
<p>Here is the array.</p>
<p>I tried string replace and a few others. I think it is not a standard array. Looks like the values are wrong. Please help.</p>
<pre><code>Array
... | 3 | 1,371 |
Can't Complete a "Hello World" Build in Android Studio: preDexDebug, can't find path | <p>Two weeks after first installing AS, and I still can't finish a "Hello World" build. This is with me not even doing anything except creating a new project and trying to build. It has something to do with "preDexDebug" failing and "the system cannot find the path specified" and I know there have been numerous posts s... | 3 | 1,253 |
How to achieve a similar behavior to display: inline with flex items when text breaks? | <p>I have a piece of text (let's call it the "title"), and a "badge" on the right. I want the badge to stick to the end of the title when the title breaks.</p>
<p>As in the following snippet, I could achieve this by setting the <code>display</code> of both the title and badge elements to either <cod... | 3 | 1,162 |
Looping array data within blade | <p>I make some API calls and fill up an array. I have identified three different ways an array element might come</p>
<pre><code>array:9 [▼
0 => array:2 [▼
"jobData" => array:5 [▶]
"clientData" => array:3 [▶]
]
5 => array:3 [▼
"jobData" => array:5 [▶]
"clientData" => array:3 [▶... | 3 | 1,546 |
Python3 RecursionError while decoding Unicode (for BeautifulSoup/RoboBrowser) | <p>I'm working on a web scraping component using BeautifulSoup and RoboBrowser, and have run into a curious problem with one case in particular. The page in question contains all the same chrome and structure as all the other cases that work fine, but its main data field (a neatly labelled div) is one huge line (around... | 3 | 1,532 |
How to extract only filenames from an URL with RegEx even with ANSI escaped characters? | <p>I need to extract ONLY the file names from any URL. I looked at all previous answers on stackoverflow regarding URLs and filenames, but no one considered the case of a file name with escaped characters.</p>
<p>I have for example an URL like this:</p>
<pre><code>https://content.com/pbpython.py/notebooks/thirsty-allie... | 3 | 1,901 |
CannotLoadBeanClassException when try to get a bean from applicationContext.xml | <p>i have just started a course about Spring framework and i am struggling getting over this exceiption: </p>
<pre><code>Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [TrackCoach] for bean with name 'myCoach' defined in class path resource [applicationCont... | 3 | 1,067 |
Pentaho Spoon transformation throws: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP | <p>Hey I'm doing a simple transformation with Pentaho Spoon, the transformation has two steps:</p>
<ol>
<li><p><strong>Input table:</strong> I use a SQL to extract the data from an Oracle 11g database.</p>
</li>
<li><p><strong>Excel Output:</strong> I write the data from the database in an excel file.</p>
</li>
</ol>
<... | 3 | 3,676 |
BarButtonItem Doesn't Show button after added | <p>I want custom navigation item as <code>facebook</code> app.
Have two buttons and one <code>UISearchBar</code>. Buttons is <code>leftBarButtonItem</code> and <code>rightBarButtonItem</code>. <code>UISearchBar</code> is <code>titleView</code>.
to make searchbar in titleview become wide i removed two buttons by set it... | 3 | 1,253 |
Tkinter "out of stack space" error with Pymol on Windows | <p>I've been writing a plugin for Pymol (visualization software for macromolecular structures). For this I am using python and tkinter.</p>
<p>My plugin works, and I can register it in the Pymol "Plugin" Menu.</p>
<p>After installing the plugin.py file from the Pymol-own Plugin Manager, there are three options to sta... | 3 | 1,168 |
Trouble adding the value ontop of each horizontal barchart | <p>I just plotted multiple horizontal bar charts that share the same y-axis. To elaborate, I have 4 dataframes, each representing a bar chart. I used these dataframes to plot 2 horizontal bar charts at the left and another 2 at the right. However, I do not know how to add the bar values for each horizontal bar as there... | 3 | 1,050 |
How do i define Jquery button styles? | <p>I have been working on a jquery mobile page and it has several buttons on it that have unique styles for example:</p>
<p>As part of a sort of client side "jquery driven wizard" have ...</p>
<pre><code><button data-function="back" class="back">Back</button>
<button data-function="next" class="next"&g... | 3 | 1,264 |
'es' is not recognized as an internal or external command | <p>when I run a python script from powershell on windows 10, the script runs successfully but at the end it outputs the following even though I have never typed any such command like <code>es</code></p>
<pre><code>'es' is not recognized as an internal or external command,
</code></pre>
<p>And once this error message is... | 3 | 3,115 |
How to clean images format in a pandas dataframe? | <p>I have fetched some images and stores in a dataframe column-df['images']</p>
<p>Currently the images are fetched in following formats-</p>
<pre><code>['image1.jpg','image2.jpg','','','']
</code></pre>
<p>Now I need to remove bracket and '' from this as below-</p>
<pre><code>image1.jpg,image2.jpg
</code></pre>
<... | 3 | 1,703 |
Generating text in a new fragment based on Firebase getRef() | <p>I have a listview that generates a list of clubs in Edinburgh including an image, title and special deals. When a user clicks on the club they wish to see more about a new fragment opens and is populated by data about that club. I was able to get the correct child name using getRef() and output this to a toast, the... | 3 | 2,383 |
join Javascript embed code | <p>This is about a Blogger template called Bloggertube
Its originally coded to embed youtube videos and grab url image and post the image thumbnail</p>
<p>I also modified to work with Dailymotion</p>
<p>But I'm pretty newbie at Javascript, and I'm trying to figure out how to make a condition to make them work at same... | 3 | 2,165 |
hover drop down nav disappears when moving over margin, javascript & css | <p>My UL for nav has a top margin of 6.4px so it can be centered vertically, when moving mouse from the parent li to the ul that drops down, it disappears when crossing the margin.
Here is my code and at the bottom I will put things that I've tried.</p>
<p>css</p>
<pre><code>nav ul li > ul {
flex-direction: colu... | 3 | 2,132 |
Create nested json from flattened JSON in javascript | <p>Started with javascript recently. I have a flattened json which looks like :</p>
<pre><code>[
{"timestamp":"2019-01-01T00:00:00.000Z","MarketShare":89905.0,"Territory":"PHILADELPHIA PA"},
{"timestamp":"2019-01-01T00:00:00.000Z","MarketShare":82991.0,"Territory":"SEATTLE WA"},
{"timestamp":"2019-02-01T00:00:00.000Z"... | 3 | 1,531 |
Flink S3 StreamingFileSink not writing files to S3 | <p>I am doing a POC for writing data to S3 using Flink. The program does not give a error. However I do not see any files being written in S3 either.</p>
<p>Below is the code</p>
<pre class="lang-java prettyprint-override"><code>
public class StreamingJob {
public static void main(String[] args) throws Exception {... | 3 | 1,106 |
Swift Loading Images in a UITableView Asynchronously - top cells have no picture | <p>Right now I am using Google Places API to download a list of places radially near the user. When I get the JSON response, I parse it and make an array of places which is used to populate the table view. Previously, I loaded the image synchronously which made the load time for the tableview far too long. I've since a... | 3 | 1,222 |
SageMathCell ValueError When Printing String (Sometimes) | <p>When I execute <a href="https://sagecell.sagemath.org/?z=eJzVV1tv2zYUfg-Q_3DqYKi0yK5lrMMWVAPSpO2yKQlQO-iDERiMTNtsJZImqabur98hJcWU4iQd1j7MQGKZ_Hgu37nw6ODg-3_29w7gRMwpHJdmJZQ-gmM-V_QWzimjCgif4442jMO5WKkIRsP4pT3T_lzQG0X0JwIfqM7phnC44uwzVUybjUW_pwuqKM_oEZxnf5NNBB8UW65MBJdf883XTyJymt6zbFUIPh9AR8WJ4NoQbmDCCgrvKKeKGCY4iAW8... | 3 | 1,835 |
Stack - Linked list implementation - string not being used correctly | <p>I have made a stack in C, using the linked list implementation. I'm having trouble with when I try to input string. In each node I push to the stack, the string in all nodes are equal to the value of the string of the top node.
For example:</p>
<p>push->
row:9
seatletter:a
name: fsda</p>
<p>push->
row:3
seatletter... | 3 | 1,694 |
Oracle 19 Error on docker run with data volume mounted | <p>I have build an Oracle Database 19 docker image (tagged as oracle:19) as described in the oracle official documentation
<a href="https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance" rel="nofollow noreferrer">https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance</... | 3 | 1,096 |
App crash upon reverting to backup database | <p>I'm making an Android app that downloads a database from a server to use locally on the phone. After a successful download, I make a copy of the .db file and save it in the data/data/app_name/files folder. In the event that the database becomes corrupted, I delete the original .db file and make a new one in it's pla... | 3 | 2,209 |
BeanPostProcessor methods are not getting invoked | <p>I am trying to understand the sequence of static initialization, instance initialization, InitializingBean and BeanPostProcessor, so I created below example, everything is working except that BeanPostProcessor are not getting invoked, am I missing something?</p>
<pre><code>import org.springframework.beans.factory.B... | 3 | 1,370 |
Laravel Eloquent relation depending on type of item | <p>I have model <code>Product</code>, it has 2 types: <code>Lamps</code> and <code>Bulbs</code>. A lamp have set of attributes that differs from a bulb, so I have 2 another models <code>Lamp</code> and <code>Bulb</code> which represent set of attributes. What type of relation from Product to attribute model should I im... | 3 | 1,310 |
Lock-free cache of swappable object pools | <p>I'm trying to implement a cache which must be (obviously) optimized for getting and recycling items.</p>
<p>There is one challenge though: The cache may be invalidated from time to time.</p>
<p>From an architecture perspective, what I did so far is to implement the cache comprising a pool. The pool itself is actuall... | 3 | 1,136 |
One form three pages. How to pass state between them? | <p><strong>My goal:</strong><br>
I want to let the user to create a new object, let's say a car. It is divided into three steps/pages/views:</p>
<ol>
<li>Information about the car - form with inputs (First page <code><app-car-create-page1></app-car-create-page1></code>) </li>
<li>Information about the curr... | 3 | 1,274 |
How can I generate random text file with random content and size? | <pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Tests
{
class RandomTests
{
private static Random random = new Random();
public static string RandomString(int length)
{
... | 3 | 2,011 |
Traceback when building an exrm release of a Phoenix app | <p>After SCP-ing my Phoenix app dir from my Macbook to my Fedora VM, I try to build a production exrm release but an exception is raised:</p>
<pre><code>==> Building release with MIX_ENV=prod.
==> Generating relx configuration...
==> Generating sys.config...
==> Generating boot script...
==> Performing ... | 3 | 1,318 |
How to fire alarms with same time and date android | <p>I have this goal setting app wherein in each activity of the goal set in the app is set with an alarm time and date.</p>
<p>For example:</p>
<p>Goal 1: A</p>
<pre><code>Activity a1: nana
Deadline: 11/5/2015
Alarm Time: 9:00 am
</code></pre>
<p>Goal 2: B</p>
<pre><code>Activity b1: hehe
Deadline: 11/5/2015
A... | 3 | 1,321 |
Nodemailer stops sending mails after a while | <p>I'm using Nodemailer to send mails if "/send" is called with an email (receiver) and token variable. It works perfectly however it stops responding after a few hours... It has worked for days before without problems but recently it can't even last a few hours.</p>
<p>No error codes are displayed, cmd only ... | 3 | 1,118 |
How to mock a query inside a function with Mockito | <p>I'm writing a Junit test, but some of the test depends of specific data from the database, so my plan is to use Mockito to not depend on the db, but I'm having problem with some functions that contain queries, using MongoMorphia.</p>
<p>This is the test:</p>
<pre><code>@Test
public void testExceptionIDisValid() ... | 3 | 1,478 |
Failed building the Rust documentation: The system cannot find the path specified | <p>I'm on Windows, trying to build the Rust documentation.</p>
<p>I cloned the Rust repository, copied the <code>config.toml.example</code> under the name <code>config.toml</code> and executed <code>./x.py doc</code> but here is the error I get (with the <code>RUST_BACKTRACE</code> environment variable set to <code>ful... | 3 | 4,225 |
Getting Error in Project during start project with Npm start, Project created with create-react-app | <p>I am using ubantu 16 OS and i have installed </p>
<blockquote>
<p>Node version v10.13.0 and npm version 6.4.1</p>
</blockquote>
<p>I am creating Reactjs project based on <a href="https://github.com/facebook/create-react-app" rel="nofollow noreferrer">create-react-app</a>.</p>
<p>I have created project using com... | 3 | 1,240 |
Which design pattern would be appropriate for the following api implementation? | <p>I would like to add oEmbed tags to my site (I'm the oEmbed api provider). My api should respond the results based on the file type.</p>
<p>oEmbed Types has</p>
<ul>
<li>Photo</li>
<li>Video</li>
<li>Link</li>
<li>Rich</li>
</ul>
<p>My response to <strong>photo</strong> contains the following field</p>
<pre><code... | 3 | 1,796 |
How to add data from another class to JTextField | <p>I have a Gadget, Mobile, MP3 and GadgetShop class. The Gadget is the super class, the Mobile and MP3 are Subclasses of the Superclass and the GadgetShop is the GUI I made.</p>
<p>I just need my GadgetShop to gather the information to place it in the TextFields I've made when I click the button I've made. I have no ... | 3 | 3,114 |
Is it possible to implement parser for prefix notation with parentheses and non-constant number of operands? | <p>I need to write a java parser for expressions like this:</p>
<pre><code>x - true, false, unknown
EXAMPLE:
or(x, x, and(x, x, x, or(not(x), x, x)), atleast(3, x, x, x, x, x, x, x, x)))
</code></pre>
<p>I figured out, that I could use antlr4, but I'm a total newbie. I was struggling with this problem for 3 days, I ... | 3 | 1,148 |
Close connection with client after inactivty period | <p>I'm currently managing a server that can serve at most MAX_CLIENTS clients concurrently.</p>
<p>This is the code I've written so far:</p>
<pre><code>//create and bind listen_socket_
struct pollfd poll_fds_[MAX_CLIENTS];
for (auto& poll_fd: poll_fds_)
{
poll_fd.fd = -1;
}
listen(listen_socket_, MAX_CLIENTS... | 3 | 1,348 |
unsetting session variable before setting it again results in 'undefined index' on use | <p>I'm unsetting some session variables before setting them again, but I've found that they result in <code>undefined index</code> on usage.</p>
<p>I removed the line that unsets the variables before setting them again and that works well.</p>
<p>I don't understand why unsetting them before resetting them yields <cod... | 3 | 1,972 |
Bootstrap theme doesn't charge with flask | <p>I'm start approach to Flask and Bootstrap someone can tell me why bottstrap doesn't charge?
I am sure there is an obvious solution but I am stuck all morning</p>
<p>app.py: this is the script typed</p>
<pre><code>from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def main():
... | 3 | 1,991 |
The result of my code is zero and I don't know why | <p>The question is to print out the smallest prime number but bigger than other not prime number. after hours of work, my code print out 0 no matter what I type in. Where have I gone wrong? </p>
<p>(I posted this yesterday but because of my lack of communication ability, no one seem to figure out the problem, I have t... | 3 | 1,191 |
Making Activity with several ViewPagers | <p>Im trying to make an Activity that contains several View's added to LinearLayout inside ScrollView.Those View's are layout files inflated with LayoutInflater,and they contain TextView and ViewPager(that uses FragmentPagerAdapter).The problem is that only the first ViewPager shows fragments, and other ViewPagers just... | 3 | 1,136 |
Same Files Are in Different Size in IPAD1 and IPAD2 When I Retrieved Using ALAsset Block | <p>I have synced an image to 2 Ipads (Let Say IPAD1 and IPAD2) through ITunes.
Then ,when i retrieved the images using ALAssetLibrary block , the file size is different in 2 Ipads .</p>
<p>(IPAD1 File size: 0.024059,IPAD2 File size: 0.024325).</p>
<p>May i know, why the same files are in different size in IPAD1 and... | 3 | 1,257 |
Javascript and the Google Maps API | <p>I'm in a spot of bother and my hairline is on the chopping block. When I integrated the maps API on this site, <a href="http://ritaknoetze.com/contact/" rel="nofollow">ritaknoetze.com</a>, everything worked perfectly.</p>
<p>However, copying that exact code for a different demo website, <a href="http://scarabpaper.... | 3 | 1,071 |
Error replacing text in PDF with NodeJS and hummus | <p><a href="https://stackoverflow.com/questions/36778637/how-do-i-replace-a-string-in-a-pdf-file-using-nodejs">How do I replace a string in a PDF file using NodeJS?</a> has a solution to replace text in a PDF. With the same code, I have a puzzling issue: the text is replaced in the source code of the PDF but does not r... | 3 | 1,310 |
Replace NaN with another character using JavaScript | <p>Can you please tell me how to replace <code>NaN</code> with another character? There are variables that are assigned some numeric value.
Further in the function, these variables get their values, which I then display in the html <code>tabl</code>e. But sometimes some variable returns <code>NaN</code>.</p>
<p>To fix... | 3 | 1,196 |
Using a Derived class of a Java Swing control to create listener for self | <p>At the outset: I know that what I am doing is bad design. I am trying this to get a better feel of Java - what is possible, what is not and why?</p>
<p>I have written the following code:</p>
<pre><code> import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ButtonTest
{... | 3 | 1,099 |
Implementing custom objective function in keras | <p>I am trying to implement my own cost function, specifically the one below:</p>
<p><a href="https://i.stack.imgur.com/fFxJ5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fFxJ5.jpg" alt="enter image description here"></a></p>
<p>Now I know this question has been asked several times on this site ... | 3 | 2,731 |
I try to sort the value and update the same of both columns by onclick of name and Lname(its TH) | <p>I try to sort the value and update the same of both columns by onclick of name and Lname(its TH)
Below is the link which am refering
<a href="https://codesandbox.io/s/customtablereact-forked-drnc0" rel="nofollow noreferrer">https://codesandbox.io/s/customtablereact-forked-drnc0</a></p>
<p>am trying to sort both colu... | 3 | 1,453 |
FirebaseRecyclerAdapter inside FirebaseRecyclerAdapter | <p>I'm building an events app and this is my cards mockup for each event:</p>
<p><a href="https://i.stack.imgur.com/2wirW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2wirW.png" alt="enter image description here"></a></p>
<p>Now this is my events data from my database. I have an <strong>"events"... | 3 | 2,959 |
How we Assign TabId to Tab Content div from Model Value In asp.net MVC | <p>This following code for Rendering Tabs</p>
<pre><code><ul id="myTab" class="nav nav-tabs customTabs">
@foreach (var p in ViewBag.ProductMenu)
{
if (p.Visible)
{
if (p.Id == 1)
... | 3 | 1,456 |
pyAudioAnalysis, Tuple index out of range | <p>So I am trying to make a rudimentary emotion classifier using the <a href="https://github.com/tyiannak/pyAudioAnalysis" rel="nofollow">pyAudioAnalysis library</a>, and I have collected a small datasample to test if it works. my code is as following:</p>
<pre><code>from pyAudioAnalysis import audioAnalysis as aA
... | 3 | 1,103 |
checkboxes not styled after ajax call | <p>I have a script file scripts.js with a function that styles all checkboxes in page. This file is referenced in the master page.</p>
<p>There is a user control and a aspx test page for it. On page load, the UC shows a list of checkboxes and the style is applied.</p>
<p>On clicking a button, an ajax call gets a list... | 3 | 1,086 |
EF Alter Table with FK error message | <p>I run in the following error message when I try to run the Seed method.</p>
<blockquote>
<p>System.Data.Entity.Infrastructure.DbUpdateException: An error occurred
while updating the entries. See the inner exception for details. --->
System.Data.Entity.Core.UpdateException: An error occurred while
updating t... | 3 | 3,489 |
NPE on ManyToMany in DataNucleus | <p>I have this entity</p>
<pre><code>@Entity
public class ContactList extends Base {
private static final long serialVersionUID = BaseEntity.serialVersionUID;
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private Collection<User> contacts = new HashSet<User>();
public C... | 3 | 1,268 |
Horn-Schunck Optical Flow (Averaging Velocity) | <p>I'm currently trying to implement the HS-method for optical flow but my <code>u</code> and <code>v</code> always seem to have only zeros in them. I can't seem to figure out my error in here:</p>
<pre><code>vid=VideoReader('outback.AVI');
vid.CurrentTime = 1.5;
alpha=1;
iterations=10;
frame_one = readFrame(vid... | 3 | 1,080 |
MongoDB Lookup with Conditions | <p>Sorry for what I'm sure is a newbie question but after a couple dais I'm at a total loss on how to approach this.</p>
<p>I've currently two collections, one being <code>orders</code> and another one being <code>offers</code>. Offers are basically quote offers to the orders (linked by <code>_id<->orderId</code... | 3 | 3,055 |
New Record Does Not Show In ASP.net Datagrid Inside Updatepanel | <p>I have an asp.net webpage that contain a gridview with edit, select and delete enabled, and a detailview for inserting new record. Each control is placed inside a asp.net ajax extension control-updatepanel. And the two controls are bonded to the same datasource which is LinqDataSource. </p>
<p>After new record was ... | 3 | 1,394 |
Looping through music | <p>I have an app that I want to cycle through music. Basically play 15 secs of a song then move on to the next one.</p>
<p>I have a struct (MusicLibrary) that holds an array of song information (a struct called SongItem) including the persistentID of the songs on the iPhone. This struct is working perfectly and if I j... | 3 | 1,636 |
How to have the proper vertical scroll range, but make the physical size of the track different? | <p><strong>EDIT (2/3/22):</strong> Based on what I have here, I was thinking about changing this custom RecyclerView into a scrollbar class, with all scrolling bits in one layout imported into each view and then feeding the view to the class. My idea with this is to try and make the track height fixed, and then use the... | 3 | 2,258 |
Simple React component throwing "too much recursion" error | <p>I came across this barebones React component in a recent question. I was playing around with it, and tried to add a new item (an object) to the array of existing objects in <code>state</code>. But it throws "too much recursion" error. </p>
<p>I've looked at other questions with similar problems in React, but I'm no... | 3 | 1,045 |
how to stop a timer with 'if' | <p>hi guys i am new to java... :(
i just want my button(start) to start a timer but i want to stop the timer automatically with 'if' so for example... when a user enters a time and the timer get's to the timer it stops... so far my coding is like this...</p>
<pre><code>private void startTimerActionPerformed(java.awt.e... | 3 | 1,381 |
How to set a delay after each shot in HTML 5 JS Canvas football penalty game | <p>I am trying to make a simple football penalty game using HTML5/JS Canvas. The aim is to make a game where you control the goal keeper and you have three attempts to save the ball.</p>
<p>I have most of the functionality done, I have a score system and collision detection.</p>
<p>My problem is that after the ball i... | 3 | 4,379 |
I get StackOverflow error when I create new instance in external class | <p>I have my main class CalculatorGUI.java and my second class KeyHandler.java. If I create instance of my main class in external class (e.g. CalculatorGUI one = new CalculatorGUI();), I get:</p>
<pre><code>Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
</code></pre>
<p>Why is that? I have to mak... | 3 | 11,506 |
Pass ArrayList<String> with onActitityResult | <p>i have a custom Gallery where i can select Images and write the Path of the Images to an ArrayList. The Custom Gallery is called from my MainActivity class with an onActivityResult Intent. The Problem is that in my Custom Galery the ArrayList is correctly (when i select 4 images I get 4 Strings with the Imagepath in... | 3 | 1,065 |
getElementsByClassName is not working. I want class instead of ID | <p>Yesterday I was created <a href="https://stackoverflow.com/questions/73754444/automatic-autoclick-needed-for-my-datatable-jquery-javascript">this Post</a>. But I did'nt get any response from it. So I am creating this post. Now I have a jQuery autoclick script which is working with my datatables. But it is not workin... | 3 | 3,087 |
How do I group different elements of a csv file into the same group? | <p>I'm making a grouped bar plot. Here is my code:</p>
<pre><code>imagedata <- read.csv(file = "C:\\Users\\Owner\\Documents\\firstactivity\\data\\synthea_sample_data_csv_apr2020\\csv\\imaging_studies.csv")
bodysite <- imagedata$BODYSITE_DESCRIPTION
mod <- imagedata$MODALITY_CODE
bodysite_case <- t... | 3 | 1,076 |
Trying to create a basic "encrypter" | <p>It's a simple concept and not very secure, but just a practice session as i am a very early beginner (2 to 3 weeks)</p>
<p>I basically wanted to interject a random amount of random characters, like numbers and expressions, in to the inputted message after each letter. So for example, "HELLO" would become &... | 3 | 1,453 |
Correlation Matrix by group/category | <p>I'm writing a code to calculate a portfolio's volatility for different clients in my company but I'm stuck in a process that will be explained below:</p>
<p><a href="https://i.stack.imgur.com/VzeBF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VzeBF.png" alt="enter image description here" /></a>... | 3 | 12,829 |
How to push a protectedSource in django-ckeditor? | <p>I am currently using django-ckeditor for a site, It works great, but I need to a some In-article ads (google adsense). After saving a register the code is stripped and I don´t know where or how to set the protectedSource to allow the tag.</p>
<p>I have sucessfully allowed script content, but not the ins tag used b... | 3 | 1,450 |
Forcing sample() in R to sample a given fraction of rows over all of k subarrays | <p>My problem is as follows and I have considered many derivations:</p>
<p>I have an array, say with dimensions dims = c(10000, 5, 2) - that is 10 rows, 5 columns and 2 subarrays.</p>
<p>I would like to be able to use the sample() function to sample a given proportion (say m) of rows in EACH subarray and move them BE... | 3 | 1,662 |
Can't determine range rows count | <p>I have 3 comboboxes placed on a worksheet named cbo1, cbo2, and cbo3. When the user clicks an element from one, my code retrieves data from a database and places the results in a range of cells below the cbo.</p>
<p>The Change event of each cbo sends its number (1, 2, or 3) to the routine below to identify which cb... | 3 | 1,880 |
Why do I keep getting a list of properties when adding a node in powershell? | <p>I'm using powershell to update the Version node in a wpf csproj file. Everytime I add the version node (never understood I have to when it's already there), suddenly a list of properties appear.</p>
<pre><code># My Wpf App
Write-Host "WpfApp Versioning started"
$sourceDir = "C:\Users\me\source\repos\... | 3 | 2,298 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.