title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Rails Migration Error - relation 'users' does not exist ('"users"'::regclass) - (rails 3.2.6 / Postgresql) | <p>Good afternoon,</p>
<p>I'm having serious troubles getting my database back up and running. I dropped my tables earlier this week (wanted to rebuild) and am having all kinds of problems.</p>
<p>I have done the following:</p>
<pre><code>rake db:drop:all
rake db:create:all
rake db:migrate
</code></pre>
<p>I get t... | 1 | 7,883 |
how to show the proper number of columns in a QTreeView for a model with different hierarchical column counts | <p>In the code example below I populate an item model with a set of top level items which contain key-value properties that I can view and edit with a QTreeView.</p>
<p>Looking at the Qt Documentation for <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html#hasChildren" rel="nofollow noreferrer">QAbstractItemModel::... | 1 | 2,941 |
reading raw data from a wav file on android | <p>So this code records audio into a wav file that is stored in the emulated storage. How can I then take this wav file and get an array of the raw audio data?</p>
<p>The code would go down in the buttonDecode section where it says:
//read raw data from wav file</p>
<pre><code>package com.example.wesle.noisemachine;
... | 1 | 9,548 |
MySQL insert row from HTML table into db table | <p>I am using a <code>for</code> loop to construct a HTML table from the contents of a MySQL table select query. I have a link on the end of each row to copy that row into another table.</p>
<p>I'm unsure how to get the data from the table row for the MySQL insert query - I have marked the place where I'm struggling w... | 1 | 1,922 |
Android constraint layout: resize images for all resolutions | <p>I have placed small image buttons on the one background image. I have managed the positions of small images using constraint layout. But now, the issue is with the size of small image buttons. As screen size changes images are not changing the size. </p>
<p>I have tried with drawable-hdpi, drawable-xhdpi, drawable-... | 1 | 1,246 |
Python referencing database connection on another script | <p>I'm in the depths of learning Python whilst trying to make an application, using data stored on a MySQL/MariaDB, and I am nearly at the stage that I can make some good progress with the project. I can connect to my DB via SSH, and retrieve data from a python script, but I am now looking to display that data in a GUI... | 1 | 1,073 |
No such method exists | <p>I've been playing around with code I found at <a href="http://www.droidnova.com/playing-with-graphics-in-android-part-ii,160.html" rel="nofollow noreferrer">Android Development - Playing with graphics in Android</a>.</p>
<p>Unfortunately, I haven't been so lucky with my implementaion of the code lol I believe, based... | 1 | 4,632 |
Android invalidate(Rect) invalidates entire region | <p>I don't understand why invalidate(Rect) is invalidating the entire region.
The region is divided up into 5 sections and a line graph is being drawn in each one. Each section contains 100 points. As the data arrives for times tn to tn+100 I call invalidate(new Rect(left, top, right bottom)) where top is the top of th... | 1 | 1,880 |
How to get Data from map objects Firebase (Flutter) | <p>I have a small problem whit the class maps... I'm using firecloud (NoSql DB) for my flutter app , but i have a lot of problems retriving my data!!</p>
<p>This is my meeting class where i contain all the data , I can get all the data but i some problems with the List _Tags , and the List _Users. How can i map and ge... | 1 | 1,603 |
In MS Word find the Heading under which a table is in the document | <p>The folowing VBA problem:</p>
<p>I have a Word document with several chapters ("Heading 1"). At the beginning of the chapters there follows a table with information I want to process.
It is easy looping through the "Tables" collection of the document to extract the information in the tables. </p>
<p>But how is it... | 1 | 2,101 |
Too many buckets, aggregation fails on histogram | <p>I have a query to elastic that contains total 8 nested aggregations, all aggregations are <code>term</code> aggregations except one which is a <code>histogram</code> aggregation. If I remove that histogram aggregation, the query runs perfectly. But with histogram aggregation it is throwing this particular error:</p>... | 1 | 1,056 |
Why does before_action :authorize fail with 'wrong number of arguments'? | <p>I have set up Pundit together with Devise for authorization on my application. In one of my controllers, I have <code>before_action :authorize</code>.</p>
<p>I then have the following test:</p>
<pre><code>describe SomeController do
before(:each) do
login_user(FactoryGirl.create(:user, :user_type => :admin... | 1 | 4,847 |
Error initializing caching connectionfactory in tomcat 7.0 | <p>i have found some similar tasks but none of them seems to fix my problem. I have a spring-application and deploy this application into a maven-jetty-plugin. All works fine... jetty comes up without errors, integrationtests are green. Next i wanted to get my app running in tomcat 7.0 but i get an exception and i'm no... | 1 | 6,874 |
java.lang.ClassNotFoundException: org.springframework.http.converter.json.MappingJacksonHttpMessageConverter | <p>I am using spring mvc in my project. I am trying to return json object from the controller. </p>
<p>My dispatcher looks like </p>
<pre><code> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/conte... | 1 | 6,447 |
react-native pass state globally using redux | <p>In my app, the LoginScreen(fristScreen) could login with facebook and when the user successfully login, the app receives a facebook <code>access token</code> and navigates to the next screen(VerifyScreen). In the VerifyScreen(secondScreen), when I click a button I want to bring the global state <code>facebookToken</... | 1 | 1,872 |
How to extract claims from token in Resource Server, in Spring Boot | <p>My authentication server is configured to retrieve check credentials against a table on my database, with a token enhancer which I use to pass additional claims - access control related stuff.</p>
<p>As such, I've written it like this:</p>
<pre><code>@Configuration
@EnableAuthorizationServer
public class Authoriza... | 1 | 3,164 |
Spring-Boot Quartz Job is not running | <p>I just started to create Quartz Scheduled Jobs in a dynamic way. So there is a QuartzConfig class where I create a <code>SchedulerFactoryBean</code>, <code>JobDetailFactoryBean</code> and <code>CronTriggerFactoryBean</code>. Wherein the Job and CronTrigger beans are prototype ones.</p>
<pre><code>@Configuration
pub... | 1 | 1,030 |
CSS box-shadow transition | <p>I have several div elements on my website that are part of a class that has an inset box-shadow. When I hover over those div boxes, I want the inset property removed from the box-shadow, and I want it to transition to an outward shadow. However, though the shadow changes correctly, it doesn't transition during the c... | 1 | 1,431 |
Highcharts - equal spacing between X-axis values having tickPositioner | <p>I am passing some values for the x-axis through the tickPositioner attribute. These values are not equally spaced from each other. My requirement is that I want these values to be equally spaced from one another even though they are not having equal difference from each other. Pls see my code below:</p>
<pre><code>... | 1 | 2,115 |
passing bash variable for awk column specifier | <p>There are loads of threads about passing a shell variable to awk, and I've figured that out easily enough, but the variable I want to pass is the column specifier variable (<code>$1,$2</code> etc)</p>
<p>Given that the shell uses these variables as default command line argument variables as well, this is getting co... | 1 | 3,110 |
How to download an excel (xlsx) file using Angular 5 HttpClient get method with Node/Express backend? | <p>I have an excel file in a directory on my nodejs server - Path to the file is - ./api/uploads/appsecuritydesign/output/appsecdesign.xlsx</p>
<p>On click of a button in my Angular 5 component I am just trying to download the file using FileSaver. </p>
<p>Below is my Angular component.</p>
<p><a href="https://i.sta... | 1 | 2,234 |
Why is width: 100% not working here? | <p>I'm bussy with my footer, but for some reason the width: 100% tag isn't working.
Screen of what I mean:</p>
<p><a href="http://gyazo.com/9c23897cd7b9a74ca55ee9fb977f810c" rel="nofollow">http://gyazo.com/9c23897cd7b9a74ca55ee9fb977f810c</a></p>
<p>My css code:</p>
<pre><code>/*..Portfolio - Lars Beute..*/
body{
... | 1 | 3,243 |
Significant difference between contains and containstable? | <p>I have a full-text index created upon a column of type varchar(max) with filestream enabled. The filestream contains data such as JPG's, TIF's, PDF's, and XML's (although this is mostly irrelevant to the question, I believe).</p>
<p>I have two queries that I've created that allow me to search upon the index. </p>
... | 1 | 1,371 |
Why nginx's proxy_pass does not direct to asp.net core app? | <p>I am deploying an angular app with asp.net core 2.2 api to Ubuntu 18.10 using nginx. With the following nginx configuration in the <code>default</code> file I get the client app working ok, but the api app cannot be found. Nginx returns 400 code. </p>
<p>While when I'm checking it locally with <code>curl</code>, it... | 1 | 3,849 |
Hot Deck Imputation in Python | <p>I have been trying to find Python code that would allow me to replace missing values in a dataframe's column. The focus of my analysis is in biostatistics so I am not comfortable with replacing values using means/medians/modes. I would like to apply the <a href="https://en.wikipedia.org/wiki/Imputation_(statistics)#... | 1 | 1,385 |
Shell script to fetch sql query data in csv file | <p>Need to extract the below query data along with header in csv file using shell script.</p>
<p>Below is the query.</p>
<pre><code>SELECT SourceIdentifier,SourceFileName,ProfitCentre2,PlantCode,
tax_retur ReturnPeriod,document_number DocumentNumber,TO_CHAR(invoice_generation_date,'YYYY-MM-DD')
Docume,Original,custom... | 1 | 1,235 |
Failed Binder Transaction when returning camera image | <p>I get the Failed binder transaction error in the logcat when returning the image taken with the camera from the camera intent back to the parent intent (as a byte[] using putExtra). I don't understand why, its not like its a big bitmap or anything. It only happens when i take pictures with lots of light, because the... | 1 | 1,849 |
tableView.reloadData() How to correctly reload data? | <pre><code>class ProductTableViewController: UITableViewController
{
var products = [Product]()
override func viewDidLoad() {
super.viewDidLoad()
getData()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
override func numberOfSections(in ... | 1 | 1,132 |
OpenCV-CUDA Win10. Python Module Not Found on Import | <p>So, I have been working on getting opencv with nvidia gpu support for a few days now and can't get python to import cv2 (importing precompiled opencv-python works as expected). Out of frustration I just deleted then unzipped the opencv_contrib_master and, to my surprise, a few new lines popped up in CMake:</p>
<p>... | 1 | 7,826 |
Android App crashes when rotate | <p>I put the following code in my manifest.xml</p>
<pre><code><activity android:name="CPohonApp" android:configChanges="keyboardHidden|orientation"></activity>
</code></pre>
<p>and this is the code in my activity</p>
<pre><code>@Override
public void onConfigurationChanged(Configuration newConfig) {
s... | 1 | 1,228 |
Troubles with implementing IClientValidatable- GetClientValidationRules never fires | <p>I am building a custom validator for my MVC4 application. To keep things simple and focus on the purpose of this question let's say that I'm reimplementing the <code>RequiredAttribute</code> class's server and client side validation:</p>
<pre><code>[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, I... | 1 | 1,183 |
-segueForUnwindingToViewController: fromViewController: identifier: not being called | <p>I have created a custom segue that presents a view controller inside a container that is very similar with Apple's own modal view controllers (I've implemented it as a UIViewController subclass).</p>
<p>I'm now trying to create a custom unwind segue but there's no way I can get the method <code>-segueForUnwindingTo... | 1 | 1,457 |
Spark broadcasted variable returns NullPointerException when run in Amazon EMR cluster | <p>The variables I share via broadcast are null in the cluster. </p>
<p>My application is quite complex, but I have written this small example that works flawlessly when I run it locally, but it fails in the cluster: </p>
<pre><code>package com.gonzalopezzi.bigdata.bicing
import org.apache.spark.broadcast.Broadcast
... | 1 | 1,490 |
WSO2 Identity Server error starting, cannot find admin | <p>Starting WSO2 Identity Server for the first time gives me this error:</p>
<blockquote>
<p>"Caused by: org.wso2.carbon.user.core.UserStoreException: Admin user
can not be created in primary user store. User store is read only.
Please pick a user name which is exist in the primary user store as
Admin user"</p... | 1 | 6,288 |
Getting cucumber.runtime.DuplicateStepDefinitionException despite adding Background in the feature file calc.feature | <p>I am getting following error while running my <code>Cucumber</code> <code>Selenium</code> tests using <code>Spring Boot</code></p>
<p>I have already added <code>Background</code> in the feature file. Not sure how to generalize the parameters that are getting passed in it. </p>
<p>Please guide.</p>
<p><strong>Erro... | 1 | 1,596 |
Creating an XML file in OpenCV | <p>I have created an XML file, but when I try to read it in I get an error about a duplicate key. When I opened the XML file I noticed that nothing was nested and everything was treated as it's own individual node. I was wondering if there was a way to properly create the XML file and be able to parse through it as wel... | 1 | 2,582 |
Devise & Heroku Error | <p>I'm trying to make devise work on Heroku. It works fine on my computer but when I push my code on Heroku, I get this error each time I try to create a user : `We're sorry, but something went wrong.</p>
<p>If you are the application owner check the logs for more information.`. I checked the log aand there is no erro... | 1 | 11,832 |
R Studio installing xlsx package | <p>I'm trying to install the xlsx package using R Studio but I am encountering some problems. When the installation process starts I am asked the question "Package which is only available in source form, and may need compilation of C/C++/Fortran:‘rJava’ Do you want to attempt to install these from sources?" to which I ... | 1 | 1,417 |
Angular 2 routerLink doesn't work | <p>I can't click on the <code><a routerLink="/login">Login</a></code> to navigate from the home page to the login page. I have already read the tutorial and the developer guide on the website of Angular 2.</p>
<p>This is what I have in my code:</p>
<p>index.html:</p>
<pre><code><html>
<head&... | 1 | 2,569 |
Sending json data from python to php | <p>What I want to do here is to send json data from python program and receive in php and store it in database and show it in a browser.</p>
<p>This is the code I am using for sending the json data from python :</p>
<pre><code>import httplib,json,urllib
headers = { "charset":"utf-8",
"Accept": "text/plain"}
conn = ht... | 1 | 1,638 |
To Do List Example | <p>I am new to Android App Development and have a small problem.</p>
<p>I have tried to follow an example to create a to do list app. However it doesn't work even though I have copied it exactly.</p>
<p>It shows no errors when I run it however, a blank screen appears and after a few seconds it closes and says "Unfort... | 1 | 2,293 |
The method getSupportFragmentManager() is undefined for the type MainActivity for Actionbarsherlock | <ul>
<li>I am using Actionbarsherlock library, This is a project to perform
drawer operation</li>
<li>I have also ensured i don't mix compatibility packages, still i am
getting this error</li>
</ul>
<p><strong>MainActivity.java</strong></p>
<pre><code>import java.util.ArrayList;
import android.app.FragmentManager;
im... | 1 | 4,051 |
Java: how to sort and group a list of objects by their attributes | <p>For Example I have a java object called RecordGroup. class signature is give below:</p>
<p>public class RecordGroup {</p>
<pre><code>private String owner;
private Integer startRow;
private Integer recordCount;
public RecordGroup() {
}
public RecordGroup(String owner, Integer startRow, Integer recordCount) {
... | 1 | 1,055 |
Are MakeGenericType / generic types garbage collected? | <p>It is well known in .NET that types are not garbage collected, which means that if you're playing around with f.ex. Reflection.Emit, you have to be careful to unload AppDomains and so on... At least that's how I used to understand how things work.</p>
<p>That made me wonder if generic types <em>are</em> garbage col... | 1 | 1,604 |
Unknown command in django core managment | <p>I use Docker, Python and Django in my TDD project. When I run dcoker command on console:</p>
<pre><code>docker-compose run app sh -c "python manage.py test"
</code></pre>
<p>The get error with message:</p>
<pre><code>Starting recipe-app-api_db_1 ... done
Creating test database for alias 'default'...
System check ... | 1 | 1,500 |
Parsing DateTime from ExcelSheet | <p>I'm looking for a bit of advice. </p>
<p>I'm writing a class to automatically extract information from an excel spreadsheet (using NPOI api) in C#, and then import this information into a database. I've got it all working fine except for one small issue. </p>
<p>One of the spreadsheets I'm working with, contains t... | 1 | 2,877 |
How to space flex items within a flex container? | <p>I have a flex container that's aligning the child elements along a row in the main-axis. I gave it a space-between for its justify-content in order to maintain some space between both divs. </p>
<p>I also gave the left div a flex-grow by 3, and the right div stayed constant at 1.</p>
<p>My goal is to show a featu... | 1 | 4,572 |
WixEdit - Custom UI sequence | <p>I am using <a href="http://wixedit.sourceforge.net/" rel="nofollow">WixEdit</a> to create an installation for our application. I am looking at creating a custom dialog to put in the UI sequence that allows the installer to enter some configuration that goes in the <code>.config</code> file that is installed alongsid... | 1 | 1,945 |
Very simple WebView crashes under API 23 Emulator | <p>I have just created an API 23 emulator on my machine:</p>
<ul>
<li>HAXM: v1.4 with 1GB allocated RAM</li>
<li>AVD Base: Nexus 4</li>
<li>RAM: 768MB, and 896MB in a second try</li>
<li>Heap: 64 MB</li>
<li>GPU acceleration: no</li>
</ul>
<p>I tried it successfully with a few apps of my own. But each time I try an a... | 1 | 1,259 |
Custom command button from grid isn't updating partial view | <p>I have created a sample project to illustrate my problem</p>
<p><strong>Index.cshtml :</strong></p>
<pre class="lang-html prettyprint-override"><code>@using Kendo.Mvc.UI
@model IEnumerable<KendoUIMvcApplication3.Models.Product>
@{
ViewBag.Title = "Home Page";
}
<script type="text/javascript">
f... | 1 | 1,246 |
Getting null from document.getElementById().value | <p>document.getElementById().value returning null
below is my html code
</p>
<pre><code><div id="container">
<h1>dknfknf</h1>
<div id="innerContainer">
<div style="height:auto;float:left;width:auto;">
<input type="text" id="wordone" value="plane" readonly/>
... | 1 | 2,270 |
Four color theorem Java implementation of U.S. map | <p>I am attempting to assign a color to each of the states so that no two adjacent states share the same color (<a href="http://en.wikipedia.org/wiki/Four_color_theorem">http://en.wikipedia.org/wiki/Four_color_theorem</a>). The program will output each state and its color.</p>
<p>I'm reading in a text file with the fo... | 1 | 1,210 |
Java arrays for list of people, age, and weight | <p>I have an assignment that uses arrays but I can not seem to get it to print the correct results. The assignment asks to create a class which has functions that allow the user to :</p>
<p>1- insert a name, age, and weight for an infinite number of people, until the name "FINISHED" has been entered.</p>
<p>2- It sho... | 1 | 1,883 |
How to Align an ImageView to the right side? | <p>I want to set an imageview to the right side inside the cardview but aligning is not working... please suggest me</p>
<p>Layout</p>
<pre><code> <FrameLayout
android:id="@+id/framelayout"
android:layout_height="match_parent"
android:layout_width="match_parent"/>
<LinearLayout
andro... | 1 | 1,275 |
java.lang.IllegalStateException: Failed to load ApplicationContext ,springboot setting | <p><strong>The following is the error message</strong></p>
<blockquote>
<p>java.lang.IllegalStateException: Failed to load ApplicationContext</p>
<p>at
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125)
at
org.springfr... | 1 | 6,104 |
Can't connect from application to the standalone cluster | <p>I'm trying to connect from application to Spark's standalone cluster. I want to do this on one machine.
I run standalone master server by command:</p>
<pre><code>bash start-master.sh
</code></pre>
<p>Then I run one worker by command:</p>
<pre><code>bash spark-class org.apache.spark.deploy.worker.Worker spark:... | 1 | 2,475 |
Member at n is not an ELF object | <p>I am trying to build a library (Tesseract OCR) for Android. It seems to compile just fine, and I get a bunch of static libraries, but it fails during the linking phase.</p>
<p>The command is:</p>
<pre><code>libtool: link: /opt/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-... | 1 | 1,460 |
How to fix "Uncaught TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement' | <p>I am working with Cuepoint.js to create text links that cue HTML5 video to a time marker corresponding with particular lines of text. I need to dynamically assign the links a time value already written to an array as a string. I know I need to use parseInt() to recast the values as integers when they are retrieved f... | 1 | 1,522 |
How to send additional parameters to success function in jquery ajax | <p>I have the following Jquery code, I'm trying to display information in <code>$('.cbs-List').HTML(divHTML);</code> based on the region value. But in the success <em>function</em>, I can't read the value for the region, it states that </p>
<blockquote>
<p>'data is undefined'</p>
</blockquote>
<p>What is the correc... | 1 | 1,152 |
Hmaster is not running | <p>I am new to Hadoop and Hbase. I am running Hbase on my local file system and tried creating some table through Hbase but came to know that Hmaster is not getting started. I changed the hbase-site.xml, but seems no improvement. I have the following entries in my xml:</p>
<pre><code><property>
<name>h... | 1 | 1,163 |
Puppet ssl errors " SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed" | <p>I am trying to setup puppet master and puppetdb on same node using puppetdb module.</p>
<p>When I try to run puppet agent -t, I see following erorr</p>
<pre><code>notice: Unable to connect to puppetdb server (ip-10-172-161-25.us-west-1.compute.internal:8081): SSL_connect returned=1 errno=0 state=SSLv3 read server ... | 1 | 1,582 |
After deployment of WAR to tomcat docker container always getting 404 | <p>I have a grails app, that already runs and was deployed to AWS through Elastic Beanstalk on Tomcat8 Jre8.</p>
<p>I am now trying to deploy it on multi-docker environment and I have quite weird behavior.</p>
<p>I am using <code>tomcat:8.0-jre8</code> (<a href="https://hub.docker.com/r/library/tomcat/" rel="noreferr... | 1 | 1,331 |
Updating a nested object in elasticsearch | <p>I have the below mapping for an index</p>
<pre><code>{
"mappings": {
"xxxxx": {
"properties": {
"ID": {
"type": "text"
},
"pairs": {
"type": "nested"
},
"xxxxx": {
"type": "text"
}
}
}
}
}
</code></pre>
<p>the <co... | 1 | 2,206 |
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure - Caused by: java.net.UnknownHostException: null: unknown error | <p>I'm getting this error form a couple of days, without changing anything on the application.</p>
<p>This is the exception, I could not find anything related to it with the </p>
<pre><code>Caused by: java.net.UnknownHostException: null: unknown error
</code></pre>
<p>This is the stack trace</p>
<pre><code> com.... | 1 | 1,986 |
IE 8 JQuery .find() not working on XML string | <p>JQuery does not seem to be able to find my selector string inside of a returned XML string. It <strong>appears</strong> to be working in Chrome, but I can't debug in the same environment due to browser authentication issues.</p>
<p>I know these type of questions have been asked in the past, but I haven't found anyt... | 1 | 2,769 |
Wildcard formatting in XML & XSLT | <p>Why doesn't this line:</p>
<p><strong><code>apply-templates select="*/*</code></strong> (under the "shop" element in the XSLT file)</p>
<p>apply bold formatting to <code>Blake2</code>? The output looks like this:</p>
<blockquote>
<p>Start of root in XSLT</p>
<p>"Step 1 start" <strong>Alexis</strong> (Task:... | 1 | 1,100 |
Install chromedriver in eclipse Java | <p>I am trying to learn about selenium in Java and I have started this code with my first failure ..
Here's the code I have in eclipse for Java</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint... | 1 | 1,028 |
android: saving json to sqlite | <p>i'm a new bie in android and java i want to save a table from sql server(external database) to sqlite(internal database).
1. my json is not getting stored and every record is same like this "com.example.db_client.DeptTable@b3e4e9e0" when i opens the db file in sqlite browser. I don't understand what is this.</p>
<... | 1 | 3,675 |
Native crash of RenderThread with signal 6 (SIGABRT) | <h2>Updates!</h2>
<p>See below</p>
<h2>Situation</h2>
<p>We're having a difficult to diagnose issue with our app. When we attempt to use an intent to have the camera app return a picture, we receive a low-level crash situation that we are unsure how to debug. This is occurring on Nexus 5x devices on bother Android 6... | 1 | 2,797 |
Call AsyncTask multiple times parallel | <p>I am trying to call AsyncTask from a loop.It is working properly but the issue is it taking quite more time to execute all the request.Please suggest me how could i make it more fast .</p>
<pre><code>for (int i = 0; i < 6; i++) {
response = requestWeatherUpdate(location);
}
</code></pre>
<p><strong>request... | 1 | 2,163 |
Download *.csv from my server | <p>I am new to Golang and now I'm writing small app which parse some page.
I got index page:</p>
<pre><code><form action="/" method='POST'>
Enter credentials:<br>
Login: <input type="text" name="login" >
<br>
Password: <input type="password" name="password" >
<br>... | 1 | 1,041 |
Am I writing my unit tests correctly? NUnit + NSubstitute | <p>I recently started learning how to write unit tests, and what part of the unit to test for functionality and what to mock out. I'm using NSubstitute as my mocking framework. My example basically calls a repo class, which then makes an WEB API web call to an external service, ie: AddCreditCard, which then returns a r... | 1 | 1,390 |
Reading and writing a serialized object in android | <p>I've been searching on here but can't seem to find what works. I'm trying to write a simple object list to a serialized file and can't seem to locate the file in android. It's my first time building an app and I had this working in netbeans by pointing to src/list.ser, however, this doesn't work in android studio.... | 1 | 2,058 |
Configuring Nginx with Traefik | <p>I'm new to Linux in general, and even newer to Traefik, and have been trying for some time to setup a nginx container to serve some AngularJS web pages, using Traefik as reverse-proxy. I have a small Ubuntu 20.4 server hosted on DigitalOcean (if that's of any relevance).</p>
<p>I have tried following a few different... | 1 | 1,908 |
Cookie value is not changing. Each time getting the previous value | <p>I am using cookies. When you first time open the page i set the cookie like this</p>
<pre><code>public class SessionTimeoutFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
throws IOException, ServletException {
Object is... | 1 | 1,802 |
ajax pass object to controller | <p>HomeController: </p>
<pre><code> [HttpPost]
public JsonResult SetDefaultHomeCategoryOrder(CategoryOrderModel categories)
{
return Json(new { msg = "ok" });
}
public class CategoryOrderModel
{
public int DisplayOrder;
... | 1 | 1,076 |
onOffsetChanged method from OnOffsetChangedListener of AppBarLayout being constantly called | <p>I have been looking for an answer to this for days. There's not a single thing online I can use.</p>
<p>My problem is that when adding an OnOffsetChangedListener to the AppBarLayout, its method (onOffsetChaned) gets called over and over again, even if I'm not touching the screen. Aditionally, the values of vertical... | 1 | 3,597 |
C# Parallel library, XmlReader, XmlWriter | <p>I have a use case where I need to:</p>
<ul>
<li>iterate through each Input node in an Xml document</li>
<li>perform a time-intensive calculation on each Input, and </li>
<li>write the results to an XML file.</li>
</ul>
<p>Input looks something like this:</p>
<pre><code><Root>
<Input>
<Case>... | 1 | 1,057 |
Python: Trying to plot error bars on a graph gives "ValueError: err must be [ scalar | N, Nx1 or 2xN array-like ]" | <p>I've got the following problem when I try to plot error bars on my graph.</p>
<pre><code>import numpy as np
import sys
import matplotlib.pyplot as plt
col1 = []
col2 = []
col3 = []
while True:
try:
N = input('Please enter the full name of your numbers text file with
its file format (e.g "Numbers.txt... | 1 | 1,362 |
TFS 2017 test task run fails on VS 2017 build machine if code coverage is enabled | <p>We're executing a number of tests on a build machine with VS 2017 Enterprise where we've enabled code coverage on the Visual Studio test task. This fails with the following error in the TFS 2017 console:</p>
<pre><code>##[section]Starting: Test Assemblies **\*test*.dll
Preparing task execution handler.
Executing th... | 1 | 1,951 |
Integration testing with Testcontainers + Quarkus + MongoDB | <p>Trying out testcontainers for integration testing. I am testing rest api endpoint. Here is the technology stack -
quarkus, RESTEasy and mongodb-client</p>
<p>I am able to see MongoDB container is started successfully but getting exception. Exception: "com.mongodb.MongoSocketOpenException: Exception opening socket"... | 1 | 1,520 |
Rails 3 how do I use link_to to change the value of a boolean in the db? | <p>I'm trying to create a simple link that will allow an admin to approve a user on my website </p>
<p>quite similar to what this guy was trying : <a href="https://stackoverflow.com/questions/7124781/in-rails-3-how-do-i-use-button-to-to-change-the-value-of-a-boolean">In Rails 3 how do I use button_to to change the val... | 1 | 1,306 |
WPF code tried to reactivate a BindingExpression that was already marked as detached | <p>I have a <code>WPF</code> application in which different user controls (images, labels, value converters) have a binding to a <code>listview</code>. So as a list view item is selected additional information is displayed in these controls.</p>
<p>Everything works fine, but every time I try to scroll the <code>listvi... | 1 | 1,351 |
Why does GitVersion increment the major of my version number when merging a pull request to develop? | <p>We have master, and develop branches. Master is currently at 1.0.0.</p>
<p>From develop, I have branched out a new branch, made small changes, and changed the next-version attribute to 1.0.0. When I make a pull request, I'd expect the GitVersion to calculate it to 1.0.1 or something similar, but for some reason, it... | 1 | 4,109 |
Calculating the area of an irregular polygon using JavaScript | <p>I got this as an assignment, but I'm stuck on implementing the area portion. The assignment is already turned in (finished about 80%). I still want to know how to implement this, though. I am stuck on line 84-86. Here is the prompt.</p>
<p>Prompt: Calculate the area of irregularly shaped polygons using JS </p>
... | 1 | 1,117 |
How to install cffi package on AWS Beanstalk | <p>This question looks the same as <a href="https://stackoverflow.com/questions/27630823/elastic-beanstalk-ebextensions-config-no-package-libffi-found">this post</a>, but since there was no answer, I am re-asking here.</p>
<p>I have a Django project to be deployed on AWS Beanstalk, which is using a package <code>cffi<... | 1 | 5,724 |
Material Table rowStyle background color change based on cell value in | <p>I am trying to have the color of the row change colors based on the priority number. For example, if the priority is 4 the color of the entire row should be blue. The problem is that I'm unsure of how to achieve this. I know Material Table assigns ID's to the rows, but I have no way of accessing them. Below is what ... | 1 | 2,137 |
HTTP post working on postman but not on Angular 2 | <p>I have a template which (click) triggets addUseCase():</p>
<pre><code>import {Component} from "@angular/core";
import {DataService} from "../shared/data.service";
import {Config} from "../shared/strings";
import {Headers, Http} from "@angular/http";
@Component({
selector: "add",
styleUrls: ["add.component.... | 1 | 2,007 |
Select data from database when i click the submit button | <p>i have a table when i want to click a button it get data from database to table i try this code but i get error.</p>
<pre><code> <div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-12">
<div class="ibox f... | 1 | 5,409 |
Error Key properties cannot be empty | <pre><code>Hi all i'm try to deploy a esb project into jboss server 5.1ga
But i got this error
**My Enviroment is
Jboss 5.1 ga,
Jboss Developer Studio 5.0**
Jboss esb 4.11
Riftsaw 2.3.0
17:58:49,155 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/D:/jboss-5.1.0.GA/server/default/deploy... | 1 | 4,828 |
Configure Autofac DI container in ASP.NET CORE 3.1 Web API and consumer service from controller | <p>I need to configure Autofac DI container in ASP.NET CORE 3.1 Web API application and call register class from the container in Web API controller. I install Autofac.Extensions.DependencyInjection (6.0.0) and try to register container in my Startup.cs class but I am not able to use service. Also, do I need to configu... | 1 | 1,314 |
always return to Login screen | <p>I have an app start by <code>Splash activity screen</code> for 5 seconds Then open <code>Login activity screen</code> then after you put correct user and password open the <code>Menu activity (listActivity)</code> then each row click open <code>MyCity activity</code>.</p>
<p><strong>UPDATE:</strong></p>
<p><strong... | 1 | 3,480 |
Impossible NullReferenceException? | <p>I'm investigating an exception that a colleague just got while running an application through Visual Studio 2010:</p>
<pre class="lang-none prettyprint-override"><code>System.NullReferenceException was unhandled by user code
Message=Object reference not set to an instance of an object.
Source=mscorlib
StackTr... | 1 | 2,124 |
R: attempt to use zero-length variable name in filter.data.frame | <p>I'm not an R expert at all and am getting this error:</p>
<blockquote>
<p>Error in initialize(...) : attempt to use zero-length variable name
Calls: %>% ... filter.data.frame -> filter_rows -> -> initialize -> .Call</p>
</blockquote>
<p>With logs, I've narrowed it down to this line of code:</p>
<pre>... | 1 | 1,149 |
Using cookies to load colorbox on first page load only | <p>I have tried a reference code from the web to load a particular element only once on page load</p>
<p>Here is the sample code</p>
<p><pre><code>
<script type="text/javascript">
$(document).ready(function(){
$.colorbox({width:"40%", height:"63%", inline:true, href... | 1 | 1,300 |
$.fn.yiiListView.update doesn't update ClistView | <p>I'm trying to update my ClistView in Yii 1.1.15, using <code>$.fn.yiiListView.update</code>. <strong>I do get it to echo the proper results</strong> back, but it doesn't update the list.</p>
<p>in my JS</p>
<pre><code>var ajaxRequest = "lat="+position.coords.latitude+"&lng="+position.coords.longitude;
$.fn.yii... | 1 | 1,940 |
UTC time to Local Time Zone(Central Time) Conversion MS SQL Sever | <p>This question is a follow up from this <a href="https://stackoverflow.com/questions/8038744/convert-datetime-column-from-utc-to-local-time-in-select-statement">question</a>.
I have a UTC time column and I want convert to into current local time <code>(Central Time Zone or America/Chicago)</code>. I tried to use the... | 1 | 1,187 |
How to pass a Json String from mvc controller to a d3.js chart? | <p>Controller: </p>
<pre><code> public ActionResult JsonString()
{
var p = new Parser("ALL");
return Content(p.BuildJson());
}
</code></pre>
<p>JSON:</p>
<pre><code>[{"date":"28-Feb-14","count":2},{"date":"27-Feb-14","count":4},{"date":"26-Feb-14","count":4},{"date":"25-Feb-14","count":5},... | 1 | 1,717 |
TypeError 'buffer size mismatch' error when defining a series in xlsxwriter | <p>I am trying to programmatically create a chart in an xlsx file using xlsxwriter and pandas data.
Writing cells is succeeding fine, however when I try to define a Data Series for a Scatter chart I get a TypeError 'buffer size mismatch' and I'm fairly certain my defined range is acceptable.</p>
<p>Example code:</p>
... | 1 | 1,560 |
replacing multiple tabs and with single tab in c# regex | <p>I have the following text that I would like to format in a sensible way</p>
<pre><code>"\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tEIMC\\t\n\t\t\t\t\t\t<!--<td valign=\"top\"><span class=\"HEAD\">EIMC<br>\\t</span></td&... | 1 | 1,320 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.