title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
REACT this.props.history.push does not redirect | <p>I've got this search method where I want to redirect the user after searching. The issue is that it does not do anything and I don't know why. this.props.history IS defined but the "location" property of the object "history" does not seem to change accordingly to what i put in the parameters of the push method ('./c... | 1 | 2,544 |
c++ how-to: import numeric variables from .txt or .csv file | <p>still being a beginner at C++, I cannot figure out how to use <code>fstream</code>.
I want to assign values to a set of <code>double</code> variables in my program, from
a <code>.txt</code> or a <code>.csv</code> file (<code>.csv</code> might be better for practical reasons.)</p>
<p>Let's say that my <code>input_fi... | 1 | 1,197 |
Phonegap - onDeviceReady() wasn't fired | <p>Please have a look and helps me resolve this issue. I have spent 2 days of headache. The function onDeviceReady never be called.
Here is my codes:</p>
<pre><code> <!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>DemoSimpleControls</title>
... | 1 | 1,661 |
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type with complex and nested objects | <p>I`m trying to build web api for complex object. For this aim I built the custom binder which deserialize this object from JSON.</p>
<p>My Customer Binder looks like:</p>
<pre><code>var paramType = p_BindingContext.ModelType;
dynamic updatedParam = Activator.CreateInstance(paramType);
JsonReader reader = ... | 1 | 2,851 |
Spring Batch: Retrying a tasklet using @Retryable and @EnableRetry annotation | <p>I have this tasklet which uploads a file to Amazon S3. Now, I want to retry the tasklet execution whenever an <code>AmazonClientException</code> is thrown. I figured using <code>@Retryable</code> annotation will do the job.</p>
<p>Tasklet:</p>
<pre><code>@Component
@StepScope
@Retryable(value=AmazonClientException... | 1 | 1,547 |
How to delete item from custom listview on long click in android? | <p>I have a listview with custom base adapter which validate some items in listview. What i want is when i long click on item oflistview, a dialog should open stating "Yes" or "No" and when i tap on "Yes" it should delete that item from adapter.How can i do that.</p>
<p>Here is code of Adapter</p>
<pre><code>private ... | 1 | 1,599 |
Why ConstraintLayout slower than LinearLayout in RecyclerView item? | <p>I'm changing the xml item of recyclyerView from LinearLayout to ConstraintLayout.
When I'm scrolling the recyclerView horizontal, it lags and renders very slowly than LinearLayout.</p>
<p><strong>ConstraintLayout</strong></p>
<p><img src="https://i.stack.imgur.com/DEQvt.gif" alt="ConstraintLayout"></p>
<p><strong... | 1 | 3,332 |
Android/Java - Test if date was last month | <p>I am working on an app where I store some information between each use, this data essentially boils down to counting the number of times an event has happened today, this week, this month and in the apps lifetime. I store this data in 4 distinct counters I can load/save using SharedPreferences.</p>
<p>Alongside the... | 1 | 1,686 |
Mongoengine - command find requires authentication | <p>I am new to using Mongoengine with an authenticated MongoDB.</p>
<p>I have a Mongo Database called 'gambit_test'. I have enabled authentication on it and I have a proper user that can I authenticate into the database to perform read and write.</p>
<p>I created the user for 'gambit_test' using the following command... | 1 | 1,211 |
Connect remote scylla db server shows error | <p>I have installed scylla-db in google cloud servers.</p>
<p><strong>Steps i have followed:</strong></p>
<pre><code>sudo yum install epel-release
sudo curl -o /etc/yum.repos.d/scylla.repo -L http://repositories.scylladb.com/scylla/repo/a2a0ba89d456770dfdc1cd70325e3291/centos/scylladb-2.0.repo
sudo yum install scyl... | 1 | 2,088 |
How to read healthKit Heartrate data? | <p>I know this questions been asked, but hasn't really been answered. I've tried things from threads like this:
<a href="https://stackoverflow.com/questions/31440205/heart-rate-with-apples-healthkit">Heart Rate With Apple's Healthkit</a></p>
<p>I tried converting this from Objective-C to Swift but didn't work.</... | 1 | 1,558 |
What is the best way to read and write data to a buffer for my bar code reader? | <p>I need to write a driver for a bar code reader for Linux in C. The bar code reader works through the serial bus. When I send a set of commands to the bar code reader, the bar code reader should return status messages to me. I managed to configure the port and to create a signal handler. In the signal handler, I read... | 1 | 1,261 |
null pointer exception when retrieving from HashMap even though containsKey() returns true | <p>I've been developing an Android guitar app, and currently I'm having some problems with <code>HashMap</code>.</p>
<p>To sum it up, I get a <strong>nullpointer exception</strong> when I try to retrieve a value from a <code>HashMap</code> with <code>get(key)</code> despite <code>containsKey(key)</code> returning <cod... | 1 | 1,491 |
Android HTTPPost List<NameValuePair> post to php? | <p>I have been searching for hours and I am still unclear on <code>HTTPPost</code> method. I have code like this...</p>
<pre><code>httpclient = new DefaultHttpClient();
httppost = new HttpPost(url);
// Add your data
Log.i("ACTIVITY","PostInfo");
List<NameValuePair> pairs = new ArrayList<NameValuePair>();
p... | 1 | 1,647 |
How do I fix 403 Errors when trying to display an SVG <image>? | <p>I'm building an interactive report based on this: <a href="https://avocode.com/design-report-2017" rel="nofollow noreferrer">https://avocode.com/design-report-2017</a></p>
<p>Everything worked great on localhost, but when I uploaded it to the server, I'm getting a 403 (Forbidden) error for all of the SVG images.</p... | 1 | 1,483 |
Program to determine total stops taken by elevator | <p>I was asked a question to write a optimal program that would determine the total number of stops a elevator has taken to serve X number of people. Question description is as below.</p>
<p>There is a elevator in a building with M floors, this elevator can take a max of X people at a time or max of total weight Y. Gi... | 1 | 1,190 |
Initial SessionFactory creation failed.org.hibernate.HibernateException: Missing column: dept_id | <pre><code>Initial SessionFactory creation failed.org.hibernate.HibernateException: Missing column: dept_id
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.atom.HibernateOne.HibernateUtil.buildSessionFactory(HibernateUtil.java:18)
at com.atom.HibernateOne.HibernateUtil.<clinit>(Hib... | 1 | 1,681 |
SQLite subtract time difference between two tables if there is a match | <p>I need some help with a SQLite Query. I have two tables, a table called 'production' and a table called 'pause':</p>
<pre><code>CREATE TABLE production (
date TEXT,
item TEXT,
begin TEXT,
end TEXT
);
CREATE TABLE pause (
date TEXT,
begin TEXT,
end TEXT
);
</code></pre>
<p>For every ite... | 1 | 1,058 |
Heading identification with Regex | <p>I'm wondering how I can identify headings with differing numerical marking styles with one or more regular expressions assuming sometimes styles overlap between documents. The goal is to extract all the subheadings and data for a specific heading in each file, but these files aren't standardized. Is regular expressi... | 1 | 2,443 |
How to retrieve browser session data in ASP.Net MVC Controller? | <p>I'm having a pretty tough time with this issue. I've done a lot of research but haven't found anything that works!</p>
<p><strong>What I want to do:</strong>
I want to use javascript to capture the user's timezone and utc timezone offset, store these two pieces of data in the browsers session, and then retrieve th... | 1 | 1,049 |
Entity Framework Foreign Key (or lack thereof) | <p>So I have pouring of this code forever, trying to figure this out... I am using Entity Framework 1.0 with ASP.NET MVC in .NET 3.5 SP1 with EFPocoAdapter (so separate Poco classes).</p>
<p>So I have the following code for one of Controllers:</p>
<pre><code> [AcceptVerbs(HttpVerbs.Post)]
public ActionResult ... | 1 | 1,170 |
CSS layout zoom issue | <p>My issue is that when I zoom in or out of the page (in all the browsers I tried), only some parts of it are displayed as zoomed (the contents that are in the divs, but not the divs themselves). I put the borders to show it easily.</p>
<p>When I searched for a solution, all of them mentioned that it is because of fi... | 1 | 1,354 |
Android default button styling not working | <p>I'm trying to set up my styles to make all buttons a particular color combination, specifically blue with white text. Here's my main styles.xml:</p>
<pre><code><resources>
<style name="CustomTheme" parent="MaterialDrawerTheme.Light.DarkToolbar">
<!-- various items -->
<ite... | 1 | 1,404 |
Bootstrap 3.0: Full-Width Color Background, Compact Columns in Center | <p>I was looking to make a striped business theme, similar to the one created by W3Schools. The theme can be found <a href="http://www.w3schools.com/bootstrap/bootstrap_theme_company.asp" rel="nofollow">here</a>. It is characterized by horizontal sections, separated by different background colors.</p>
<p>The one issue... | 1 | 1,070 |
Errors while installing python autopy | <p>Hey I have looked at and old question here but it doesn't answer my question</p>
<p>I have installed libpng, then try to install autopy and get complie errors.</p>
<p>I am not great at python yet so I am not sure on how to fix them.</p>
<pre><code>Ashley:~ ashleyhughes$ sudo easy_install autopy
Searching for auto... | 1 | 1,997 |
AVCodecContext settings for H264 (1080i) | <p>I'm trying to configure x264 for 1080i capturing. Most of these settings below are found in different examples. However, compiled together they don't work. ffmpeg API reports no error, but <code>avcodec_encode_video()</code> always returns zero.</p>
<p>Some of the numbers are strange to me... for example, <code>gop... | 1 | 1,304 |
AngularJs datatable dynamic table change | <p>I am working on a project and i want to do some things which are new to me. I am new in AngularJS and newer in angular data tables.</p>
<p>I got angular data table from <a href="http://l-lin.github.io/angular-datatables/#/welcome" rel="nofollow"><strong>here</strong></a> and is a little bit tricky for me because i ... | 1 | 2,654 |
CollectionView Cell size to fit Label | <p>I have set up a collection view using which scrolls horizontally and displays the elements in the ‘companies’ array. </p>
<p><a href="https://i.stack.imgur.com/NSAD8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NSAD8.png" alt="enter image description here"></a></p>
<p>The cells automatically ... | 1 | 1,143 |
CSS Bug with inline ul li in IE7 | <p>I've got a little issue with a inline menu, bug only appears in ie7. The only menu li that has another menu underneath it, is not inline with the rest, the rest seem to appear pushed down.</p>
<p>HTML</p>
<pre><code><div id="topnav">
<ul id="jsddm">
<li id="">
<a id="" href="/">Home</a&g... | 1 | 1,175 |
Could not find goal 'single' with Maven running mvn package | <p>I am trying to compile some java classes with maven to produce an executable jar file that is stand alone</p>
<pre><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven... | 1 | 1,106 |
setBackgroundColor() doesn't seem to work | <p>I have a <code>RelativeLayout</code> and a <code>Button</code> in my <code>Activity</code>
I want to run a code when I click on the <code>Button</code>, so I wrote the following code:</p>
<pre><code><ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height... | 1 | 1,345 |
Heroku Login fails | <p>I'm getting following error while login to the Heroku using CLI:</p>
<pre><code>Enter your Heroku credentials.
Email: *****@gmail.com
Password (typing will be hidden):
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/is... | 1 | 1,522 |
Qt Plugins: :-1: error: cannot find -lpnp_basictools | <p>I have been trying for days now to use third party libraries in my simple Qt projects, but to no success so far.</p>
<p>I have tried the <a href="http://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-app-example.html" rel="nofollow noreferrer">Plug & Paint Example</a> and the <a href="http://doc.qt.io/qt-5/qtwidge... | 1 | 1,205 |
how can i publish my application in app brain market? | <p>i develop one application in android i want to see my app in app brain please help me tell me how can i publish my application in appbrain i.e.., below link.</p>
<pre><code>http://www.appbrain.com/
</code></pre>
<p>i didn't use any permissions in android manifest file</p>
<pre><code> <?xml version="1.0" encod... | 1 | 1,263 |
Posting JSON from ajax to Struts2 Action | <p>Hey I am trying to post JSON from Ajax to Struts2 action class method. Little more info: I am running client on WAMP server and Struts2 on Eclipse Tomcat.</p>
<p>My client side code:</p>
<pre><code><html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></s... | 1 | 2,127 |
Insert HTML Table cell values into MySQL | <p>I have a HTML Table with Dynamic Columns which increase or decrease as per the user's selection.
I need to Insert this HTML Table in a MySQL Database table after taking inputs from the users in the front end.</p>
<p><a href="https://i.stack.imgur.com/zdeZl.png" rel="nofollow noreferrer"><img src="https://i.stack.im... | 1 | 1,817 |
Symfony2 choice field not working | <p>I asked a question here <a href="https://stackoverflow.com/questions/16441771/how-to-use-repository-custom-functions-in-a-formtype">How to use Repository custom functions in a FormType</a> but nobody anwsered, so i did a little digging and advanced a little but i still get this error:</p>
<pre><code>Notice: Object ... | 1 | 1,434 |
d3 bar chart using rangeRoundBands - why is there outer padding? | <p>I'm creating a bar chart using an ordinal scale for the x axis, and using rangeRoundBands. I'm following this example: <a href="https://bl.ocks.org/mbostock/3885304" rel="nofollow noreferrer">https://bl.ocks.org/mbostock/3885304</a></p>
<p>However, my chart has outer padding -- big spaces at the beginning and end o... | 1 | 1,598 |
Open html link in a div using jquery | <p>I am trying to drag and drop html link into a div element. My requirement here is to open the link in within that div element. I have 2 divisions on my page "left-panel" and "canvas".</p>
<p>Idea here is on my left panel I'll have multiple links, when I drop any of these link in canvas div it should open that html ... | 1 | 3,068 |
Write to CSV and text file | <p>In C# can someone teach me how to write the output of this program to a csv and a text file with unique ID each time? Like instead of writing to the console I want everything to go to a csv file and a text file at the same time. And also for the txt file includes a unique ID as record keeping.</p>
<pre><code>using ... | 1 | 1,251 |
Leaflet.js and JSON data : optimization and performance | <p>I'm currently working on my first real outing using Javascript to build an interactive map of our customer data .</p>
<p>So Far I've got the basics working but the performance starts to drop when I start going above around 500 poi's with markers or 10,000 with circle markers.... if anyone could offer some advise on... | 1 | 2,365 |
At which phase is managed bean constructed and which constructor is used | <p>Consider example of JSF based web-app <code>hello1</code> from official tutorial with addition constructor in managed bean. The follow <code>index.xhtml</code> facelet</p>
<pre><code><html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
... | 1 | 1,296 |
How to create a line in bootstrap grid system like this screenshot | <p>The layout would like to achieve:</p>
<p><img src="https://i.stack.imgur.com/cHIsO.png" alt=""></p>
<p>And the actual implement so far
<img src="https://i.stack.imgur.com/ctvG1.png" alt="enter image description here"></p>
<p>The problem is , notice the blue line under those topic , if I use the grid system, the i... | 1 | 2,907 |
Having trouble with ellipsis with angularjs | <p>I am having issue with ellipsis and angularjs. I want to update max-width dynamically from parent as TD element width. I tried for 2 approach. One is updating dom after printing the table structure. Another is to provide directive. But nothing works.</p>
<p><strong>HTML:</strong></p>
<pre><code><table class="ta... | 1 | 1,043 |
webpack-bundle-analyzer shows webpack -p does not remove development dependency react-dom.development.js | <p>This is my webpack setup</p>
<pre><code>const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const SOURCE_DIR = './src';
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: SOUR... | 1 | 1,408 |
How to convert Action to Func<Task> without running the Task? | <p>I have code that works precisely as desired. However, our corporate build server rejects any check-in that has a compiler warning.</p>
<p>The following warning is (as expected) displayed for the Action constructor with the Action to Func conversions, since I am not using an await statement.</p>
<blockquote>
<p>This ... | 1 | 1,111 |
Store checked checkbox value in javascript | <p>MY each div contain multiple checkbox and I have such several div . iwant to keep a track of which checkbox selected and their respective div . I am trying to store it inside a multidimensional array but it's not proper ..
If you have any other idea then plz share with me.</p>
<pre><code><html>
<head>
... | 1 | 3,266 |
C++ Protected Variables Not Inherited | <p>I have written some code to calculate the RSA cryptographic algorithm. The program uses classes and inheritance because I want to calculate a public and private key for multiple users. There is a parent class <code>rsa</code> and child classes <code>public_key</code> and <code>private_key</code>.</p>
<p>When compil... | 1 | 1,067 |
sap.m.MessageBox.confirm working sap.m.MessageBox.error or sap.m.MessageBox.warning not working | <p>In my sapui5 project i am using <code>sap.m.MessageBox.confirm</code> its working fine but when i use <code>sap.m.MessageBox.error</code> or <code>sap.m.MessageBox.warning</code> it shows error </p>
<pre><code>Uncaught TypeError: undefined is not a function
</code></pre>
<p>I have added <code>jQuery.sap.require("s... | 1 | 1,350 |
How to work with System.Web.UI.DataVisualization.Charting | <p>This is what i did so far. Please go through the entire description to know my requirement</p>
<pre><code> System.Web.UI.DataVisualization.Charting.ChartArea chartArea1 = new System.Web.UI.DataVisualization.Charting.ChartArea();
System.Web.UI.DataVisualization.Charting.Legend legend1 = new System.Web... | 1 | 1,571 |
How to use backBehavior: 'history' on my bottomtabnaviagor | <p>I have a BottomTabNavigator in my Expo app as the initial page. Whenever I navigator to another screen and go back I want to have the last opened tab on the tabnavigator open. I have read that: 'backBehavior: 'history' does just that, but it doesn't work for me, it instead goes to the initialtab. This is my Tabnavig... | 1 | 1,036 |
Does base64 encoding has any string length limit to encode? | <p>I have tab application which converts password using Base64 encoding. It is send to web application via web service where it gets decoded. Code for decoding is,</p>
<pre><code>public static string DecryptStringPassword(string base64StringToDecrypt)
{
//Set up the encryption objects
u... | 1 | 1,223 |
Adding directive makes controller undefined in angular js code | <p>Here is my angular js app with html code</p>
<pre><code><html>
<head>
<title></title>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/angular.min.js" type="text/javascript"></script>
<script type="text/jav... | 1 | 1,989 |
Facebook iOS SDK 3.1 post image on friends wall error | <p>I am using the latest Facebook iOS SDK 3.1.1
while trying to post UIImage on friends wall i`m getting error 5 (Error: HTTP status code: 403).</p>
<p>if i try to post the image on MY wall its working well, but not of one of my friends.</p>
<p>My Code:
1. before posting i am checking if the user has the right permis... | 1 | 1,772 |
Trouble with client side validation using Struts 2. Xml based validation rules not recognized | <p>My issue is that when I don't see a client side validation error message when I don't enter any values for that field even when it is configured as required. The page is reloaded and goes to the result page and client validation fails. I am not sure what I am doing wrong.</p>
<p>I have a simple form where I have a ... | 1 | 2,373 |
Updating Text in UI from Async Task using onProgressUpdate | <p>I am using <code>AsyncTask</code> to do a http request. But the code is crashing while trying to update UI elements.</p>
<pre><code>class ServerRequest extends AsyncTask<String,String,String> {
private View rootView;
private Activity rootAct;
private String result;
public ServerRequest(View v... | 1 | 1,797 |
ESP-12 wifi module's the GPIO pin is HIGH on turning it on but should be LOW | <p>I need help. I am using ESP-12 WiFi module to automate lights of my room and controlling it. But when I turn on my ESP-12 WiFi module the GPIO2 pin, which I set for relay input, is going HIGH (by default it should be LOW) and then freezing. But if I connect GPIO pin after turning ESP on then its working fine. How ca... | 1 | 1,119 |
Open USB host communication on a device already connected at the launch of the application | <p>I'm developping an application and I need to manage a device using the usb host mode of my tablette.</p>
<p>At this point, I could only activate the USB, at the connection of the device.
Process step :</p>
<ol>
<li>No application launch, connection of the device.<br></li>
<li>Android ask me if I wan't to launch my... | 1 | 2,004 |
phpmyadmin ignores config.inc.php | <p>I have a phpmyadmin installation on a Debian Server and it seems to me like phpmyadmin is ignoring the /etc/phpmyadmin/config.inc.php.</p>
<p>I created a user which should only be able to read one database. When I login to phpmyadmin I get the error message:</p>
<pre><code>Connection for controluser as defined in ... | 1 | 1,436 |
MVC5 app not working in IIS 7 - Error 404 - File or directory not found | <p>there! </p>
<p>After some comings and goings, I finally got my very first MVC app working in my dev machine. </p>
<p>The scenario is as following: </p>
<ul>
<li>it's an intranet app (therefore I'm using Windows Authentication)</li>
<li>it's a MVC 5 app (with Bootstrap and jQuery stuff - no .aspx pages)</li>
<li... | 1 | 4,342 |
Change input shape dimensions for ResNet model (pytorch) | <p>I want to feed my <strong>3,320,320 pictures</strong> in an existing ResNet model. The model actually <strong>expects input of size 3,32,32</strong>. As I am afraid of loosing information I don't simply want to resize my pictures.
What is the best way to preprocess my images, so that they are able to run on the ResN... | 1 | 1,737 |
How can I call a WebMethod to return json with ajax? | <p>I get 404 every time I try this. I can't find the error in my code. I have other webmethod to delete and it works. I am using a WebForm , ADO.NET with a connection string, .NET 4.5.</p>
<pre><code>[System.Web.Services.WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string ListarTiposLi... | 1 | 1,040 |
error occur on HttpTransportSE call method in android | <p>i am making one example of calling wsdl webservice made in Zend (framework of php) and i am using ksoap api(jar file) and i got this error </p>
<p><code>org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <definitions name='Ccc_Core_M... | 1 | 4,597 |
Not able to play live video through ExoPlayer | <p>I am using ExoPlayer for playing video in Android,. We are using the ExoPlayer for playing mp4 and live videos. But sometime we are getting the exception described below.</p>
<pre><code>> 12-01 14:15:09.388 12080-12517/com.mse.monumentalsnetwork
> E/ExoPlayerImplInternal: Source error.
> ... | 1 | 1,114 |
Android: ListView Multiple Selection | <p>Problem:</p>
<p>When i click on the 2nd checkbox item in the listview then automatically 10th item is checked. I can not understand what's happen?</p>
<pre><code>import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.... | 1 | 1,208 |
Unhandled Exception Error in Java even with try-catch | <p>I am quite new to Java and started learning on YouTube. To practice GUI Programs, I decided to make my own and am now trying to resize an image to add to a button in my aplication. I searched how to resize images and found some source code online which I decided to test and put in my own program, but when I call the... | 1 | 2,469 |
algorithm - Coin change in java | <p>I have seen quite many coin change problems and this one is quite unique. I tried using DP and recursion but I wasn't able to solve it. </p>
<p>This is the problem:</p>
<p>Let's say given a price, X, where X is in cents and I have 5 finite coin denominations, 1,5,10,20,50. I have different number of 1,5,10,20,50-c... | 1 | 1,518 |
How to make Python Dict from JSON data using BeautifulSoup | <p>I am scraping a website from which I need certain information. The information I need is the dictionary after <code>Sw.preloadedData["overview"] =</code>:</p>
<pre><code><script type="text/javascript">
Sw.preloadedData = {};
Sw.preloadedData["overview"] = {"Title":"Facebook","Description":"A social ut... | 1 | 1,922 |
snmpget : Unknown user name | <p>I am trying to install <code>net-snmp</code> from scratch to make <code>snmpv3</code> to work on my computer.</p>
<p>I did install <code>net-snmp</code> and create the user, but when I want to make <code>snmpget</code> it reject me with <code>snmpget: Unknown user name</code></p>
<hr>
<ul>
<li>To install net-snmp... | 1 | 3,714 |
Python: How can we smooth a noisy signal using moving average? | <p>For an evaluation of a random forest regression, I am trying to improve a result using a <code>moving average filter</code> after fitting a model using a <code>RandomForestRegressor</code> for a dataset found in <a href="https://drive.google.com/open?id=0B2Iv8dfU4fTUdlE0VUJKUnctSkE" rel="nofollow noreferrer">this li... | 1 | 1,252 |
How to update the same component with different params in Angular | <p>I've done the <a href="https://angular.io/tutorial" rel="nofollow noreferrer">tour of heroes</a> from angular. It works perfectly. </p>
<p>Now I want to put the dashboard component in the hero detail view. So it shows me the top of heroes, and after that, the hero detail view.
<a href="https://i.stack.imgur.com/yGD... | 1 | 1,275 |
opencv python is faster than c++? | <p>I am trying to time the houghcircle in python and c++ to see if c++ gives edge over processing time (intuitively it should!)</p>
<h3>Versions</h3>
<ul>
<li>python: 3.6.4</li>
<li>gcc compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609</li>
<li>cmake : 3.5.1</li>
<li>opencv : 3.4.1 </li>
</ul>
<blockquote... | 1 | 1,992 |
Dagger 2: multi-module project, inject dependency but get "lateinit property repository has not been initialize" error at runtime | <p>Dagger version is 2.25.2.</p>
<p>I have two Android project modules: <code>core</code> module & <code>app</code> module. </p>
<p>In <code>core</code> module, I defined for dagger <code>CoreComponent</code> , </p>
<p>In <code>app</code> module I have <code>AppComponent</code> for dagger.</p>
<p><code>CoreCom... | 1 | 1,850 |
IOError: [Errno 13] Permission denied: 'Test.xlsx' | <p>the goal of my program is to read the sheet SNR_COPY1 from the Test.xlsx file, using the data to do some computations and then write those to a new sheet within Test.xlsx... Now yesterday my code worked perfectly, but then when I reran it, I got the above mentioned error.. Both the python script and the xlsx file ar... | 1 | 3,422 |
Need help in adding a new XML node | <pre><code><?xml version="1.0" encoding="utf-8"?>
<mappings>
<mapping>
<aID iskey="true">ABC</aID>
<bID iskey="true">DEF</bID>
<SubAccount>PS</SubAccount>
<Account>PS</Account>
</mapping>
<mapping>
<aID isKey="tru... | 1 | 1,049 |
WCF and SSL Mutual Authentication 403 - Forbidden: Access is denied | <p>I have created a wcf data service and expose it over HTTP, with SSL required.
I am trying to have a setup where both the service and the clients are authenticated through certificates (mutual authentication).
I am using developer certificates.
so, I added the server's certificate to the client's trusted people store... | 1 | 1,527 |
Passing a dictionary key value in payload for a python request API | <p>I am trying to create a script for an API request for a vmware application. I need to pass a variable from a dictionary in payload . </p>
<p>Here is the code which was able to develop from postman and output is taken as "python requests" :- </p>
<pre><code>import requests
url = "url@domain/api-path"
payload = "{\r... | 1 | 1,494 |
AHK: Assign hotkey only for one specific active window and not for others | <p>I have just done a piece of code that does the following thing. When I make a selection by mouse in Firefox or EndNote, the script sents a Ctrl+c and checks the clipboard for a regex match. If there is a match, it changes the clipboard contents and shows a tooltip. It works fine for these two programs. Adobe Acrobat... | 1 | 1,173 |
Add my own bundle sources to pax-exam when building with pax-maven-plugin | <p>I'm trying to build my OSGI bundle with <a href="http://www.ops4j.org/projects/pax/construct/maven-pax-plugin/" rel="nofollow noreferrer">pax-maven-build</a> and in the same time test it with <a href="http://team.ops4j.org/wiki/display/paxexam/Pax+Exam" rel="nofollow noreferrer">pax-exam</a>. It have some bundle in ... | 1 | 4,235 |
net.sf.json.JSONException | <p>I converted a normal JavaScript <code>array</code> (which is in one JSP page), did a <code>JSON.stringify()</code> to that array and passed it across to another JSP as a parameter. In the other JSP, I'm reading it using <code>request.getParameter()</code>.</p>
<p>Now, while converting the string to a <code>JSONArra... | 1 | 2,388 |
I keep getting this error on Slim 4 after installing new version 4.12 | <p>I keep getting this error <code>Slim Application Error</code> after installing the new Slim 4 framework.</p>
<p>I tried switching back to old version of slim but I keep getting the same thing.</p>
<pre><code><?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as... | 1 | 1,099 |
Issues getting CasperJS to upload image to file field - tried CasperJS fill() and PhantomJS uploadFile() | <p>I'm trying to use CasperJS to upload images to a web-form.</p>
<p>My form looks something like this:</p>
<pre><code><form action="" method="POST" enctype="multipart/form-data" class="form-vertical">
...
<legend>Campaign Banner</legend>
<div class="co... | 1 | 1,827 |
Verilog ,cannot be assigned more than one value | <p>I am New to Verilog, I am trying to make a CPLD power up protection logic, it actually use a bunch of Timer to validate the state machine. I have a CPLD with 1Mhz OSC, and I am trying to make a 15s timer, I figure the code, but it have compile error, says <strong>"cannot be assigned more than one value".</strong> I ... | 1 | 5,248 |
Select a single node XML object using VBA | <p>Hi I'm trying to access the XML response object below</p>
<pre><code><?xml version='1.0' encoding='UTF-8'?>
<gfi_message version="1.0">
<header>
<transactionId>123</transactionId>
<timestamp>2018-02-08T15:59:41+08:00</timestamp>
<processingTime>... | 1 | 1,277 |
Transferring 5 megabytes file using wcf | <p>I am trying to use wcf for transferring a file larger then 5 mega.(i cant use streeaming for now it demands major changes to running code). </p>
<p>I configured the server and the client to the maximum settings and still i get the exception of maximum length. </p>
<p>Here is my server web.config: </p>
<pre><c... | 1 | 1,444 |
MVC 3 Get result from partial view into model | <p>I'm sure this is easy, but maybe I haven't searched well ...</p>
<p>I want to know how to get results from a partial view back to the model and/or controller.</p>
<p>If the user enters a FirstName, Gender (from drop down) and Grade (from drop down), I only find then FirstName and Gender in the model. I want to kn... | 1 | 2,297 |
iphone EXC_BAD_ACCESS with NSMutableArray | <p>Ok so I have a UIViewTable and a UISearchBar with two scope buttons. The idea being that when I press a scope button the datasource for UIViewTable gets changed but I am getting
EXC_BAD_ACCESS error.</p>
<p>I have the following code in my UIViewController SearchViewController.m:</p>
<pre><code>- (void)searchBar:... | 1 | 1,146 |
Docker and libseccomp | <p>I'm running into a problem with docker. I've got here OpenSuse 13.2 with a self-built version of libseccomp library. it's fresh version 2.3.1 from couple of weeks ago. If i'm running any docker container, i get the following error:</p>
<pre><code>hostname:/usr/lib/docker # docker run hello-world
Unable to find imag... | 1 | 1,090 |
ArrayList error - Cannot find symbol | <p>I'm working on a final project for school and having some troubles. I have never done any programming in Java or really anything Object Oriented, so my code's likely not going to be that great.</p>
<p>I'm having some issues with my array list. I am getting an error that says cannot find symbol - class studentInfo. ... | 1 | 1,863 |
Spring Data Repository StackOverflow | <p>Found some strange behavoir when working with Spring Data Repositories.</p>
<p>I wrote these classes and interfaces:</p>
<pre class="lang-java prettyprint-override"><code>@Transactional(readOnly = true)
public interface UserRepository extends Repository<User, Integer> {
@Transactional
@Modifying
... | 1 | 9,255 |
URL Scheme not working in iOS9 | <p>I am working on an app in which a user confirmation mail sent to user email.
I am able to receive the mail in this format"<a href="http://www.sample.com//Register.aspx?xxx(with" rel="nofollow">http://www.sample.com//Register.aspx?xxx(with</a> parameters)".
Now on click of this mail i have to launch the register page... | 1 | 1,158 |
Easy way to add a drawer item with custom onPress? | <p>I'm using DrawerNavigator and, as long as I want to navigate to a new screen, all's fine.</p>
<p>Now I want to add a drawer item which does not navigate to a new screen but simply triggers an action (in general). Specifically, I want to use 'react-native' Share functionality.</p>
<p>I got this to work but I think ... | 1 | 1,531 |
null value in findcontrol of gridview, item template confusion | <p>I have Template Field for gridview as below:</p>
<pre><code><asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:TextBox ID="txtEmpName" runat="server"></asp:TextBox>
<asp:TextBox ID="txtBonus" runat="server"></asp:TextBox>
... | 1 | 2,063 |
ZF2 tutorial Album PHPUnit test failing with Undefined property: AlbumTest\Model\AlbumTableTest::$controller | <p>I am building the ZF2 Album tutorial application and when I unit test I am consistently receiving the same error even though I've rebuilt the application again. Can someone tell me what is going on here? I am dumping all relevant information here to assist. The error is:</p>
<pre><code>PHPUnit 3.7.10 by Sebastia... | 1 | 7,340 |
How do I return an array from an array function using groovy? | <p>How do I return an array from an array function using Groovy? I am currently trying it with the following code but I am getting errors when I execute the code! I want to be able to get values from an array function where I am extracting the data from excel and I want to be able to use arbitrary values retrieved from... | 1 | 1,167 |
Two ajax updates with h:selectOneMenu f:ajax | <blockquote>
<p>In short, if a component has been updated by Ajax, it can not launch new events Ajax</p>
</blockquote>
<p>I have three h:selectOneMenu: A, B and C.
When I fire change event in A, then update the B h:selectOneMenu.
When I fire change event in B, then update the C h:selectOneMenu.</p>
<p>The problem ... | 1 | 1,747 |
Using ezplot with specified ordinate range | <p>I have a symbolic function that I am plotting with ezplot:</p>
<pre><code> ezplot(f, [0,1]);
</code></pre>
<p>I could not find a way to specify the y-values (ordniate) to plot this function. However, I want f to be plotted for x in [0,1] and y in [0,1] also. Default ezplot plots my function for y in [0,20] or som... | 1 | 1,067 |
override core controller in custom module in Magento | <p>HI i have to extend the core controller in my own module for this i am referencing the below link
<a href="http://inchoo.net/tools-frameworks/how-to-extend-magento-core-controller/" rel="nofollow">http://inchoo.net/tools-frameworks/how-to-extend-magento-core-controller/</a></p>
<p>below is my module structure</p>
... | 1 | 1,164 |
"Error converting data type nvarchar to numeric." | <p>I'm trying to create a function that returns a table with a bunch of fields.
The query used in the function inserts data to a temp table which then inserts into the returning table.
query runs fine when I run it outside of the function but when I select from the function I get "Error converting data type nvarchar to... | 1 | 1,164 |
move my progressbar with an image android | <p>i have this code </p>
<p>is a progress bar that fill with a red color</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<gradient
... | 1 | 1,267 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.