title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Using a Windows path within Python's subprocess (point to an executable) | <p>I started developing a small pdf to jpg script on a Windows 7 x64 machine with cygwin installed (Python 2.7). The following works perfectly:</p>
<pre><code>import subprocess
filename = "test"
subprocess.check_output('gs -sDEVICE=jpeg -dPDFFitPage -g2800x3620 -o ' + filename + '-2800-%03d.jpg ' + filename +... | 1 | 1,606 |
Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile | <p>I'm using Vaadin 7 and I want to add an addon to my projet. I followed all the steps described <a href="http://vaadin.com/directory/help/using-vaadin-add-ons/maven" rel="nofollow">here</a> but it doesn't work.
Here is my configuration in pom.xml: </p>
<pre><code><properties>
<project.build.sourceEncoding... | 1 | 5,746 |
Mock Files with PowerMockito | <p>I have the following test code:</p>
<pre><code>@RunWith(PowerMockRunner.class)
@PrepareForTest({Logger.class, Files.class})
public class TestClass {
private static final List<String> LIST = new ArrayList<String>() {{
add("some entry");
}};
private static final Path PATH = Paths.get("/tmp/foo"... | 1 | 1,973 |
Animated Gifs with Imagetools, in WP7 c# | <p>Well, This has been solved. I don't know if it was a glitch on my end or if ImageTools was just a pain to set up accordingly. Thank you for the answers everyone, and they very likely all work. The once I marked as answered does indeed work, BUT HERE IS HOW:</p>
<blockquote>
<p>(Credits go to Patrick for sticking ... | 1 | 2,548 |
pessimistic lock not work using spring data jpa | <p>I want to get serial numbers with the help of database.
Here is what I want:</p>
<p>1.read the entity from database and lock it</p>
<p>2.increase the serial number and upadte the entity.</p>
<p>I am asuming the first thread can lock the record and the other thread won't work until the first thread commits its tra... | 1 | 3,040 |
Evaluating postfix expression. pop() returns incorrect values to calculate function | <p>I am writing a program that converts infix to postfix (through a stack implememnted by linked list), stored in a character array and evaluate the postfix expression. Works fine till conversion.</p>
<p>But when I call the function to evaluate the postfix expression, it gives incorrect answers.</p>
<p>The problem st... | 1 | 2,905 |
Angular 2 open menu on click | <p><strong>header.component.html</strong> have a button, when you click, menu mast show on in <strong>users.component.html</strong>. On click add class to button. How can I add class to menu block, when clicking on button in header (without jQuery)?</p>
<p><strong>header.component.ts</strong></p>
<pre><code>import {C... | 1 | 1,835 |
Save the toggle state using share preference | <p>I try to save the toggle state in my application.Here is my code</p>
<pre><code> boolean on;
public SharedPreferences spref;
ToggleButton tb;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout... | 1 | 1,093 |
Admin(only) registration of users, Flask-Security | <p>I'm currently building a login for a webapp using Flask-Security (which includes Flask-WTForms, Flask-SQLalchemy and Flask-Login). I've been able to fairly painlessly set up the majority of my login flow, including forgotten password; however I want to make it so that the only way users can be registered is through ... | 1 | 1,225 |
Infinite recursion in createDataFrame for avro types | <p>I'm getting a StackOverflowError from inside the createDataFrame call in this example. It originates in scala code involving java type inferencing which calls itself in an infinite loop.</p>
<pre><code>final EventParser parser = new EventParser();
JavaRDD<Event> eventRDD = sc.textFile(path)
.map(new F... | 1 | 1,782 |
Writing HugeInteger class | <p>I am new to C++ and this is what I am suppose to do for an assignment.</p>
<p>Create a class HugeInteger that uses a 40-element array of digits to store integers as large as 40 digits each. Provide member functions input, output, add and subtract. For comparing HugeInteger objects, provide functions isEqualTo, isNo... | 1 | 6,004 |
Ngx-pagination does not work for custom component | <p>I am trying to build a custom ngx-pagination for the library and I am</p>
<p>referring the link <a href="https://github.com/michaelbromley/ngx-pagination" rel="nofollow noreferrer">https://github.com/michaelbromley/ngx-pagination</a> But I do not </p>
<p>understand what I need to do to build the custom pagination.... | 1 | 1,261 |
AlarmManager.AlarmClockinfo.getNextAlarmClock() causes NullPointerException | <h2>The Problem</h2>
<p>When I try to use the <code>AlarmManager.AlarmClockInfo</code> object to <code>getNextAlarmClock()</code> my app throws: <strong><code>Attempt to invoke virtual method 'long android.app.AlarmManager$AlarmClockInfo.getNextAlarmClock()' on a null object reference</code></strong></p>
<h2>My Code<... | 1 | 1,320 |
onClick not working inside the pop up opened via React portals | <p>Below is the code that I have implemented:</p>
<pre><code>import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {Link} from 'react-router'
import {Table, Column} from '../../Layout/components/Table'
import ReactDOM from 'react-dom'
// import ExternalPortal from '../../Sites/components/Ext... | 1 | 1,315 |
React send AJAX request inside input onChange | <p>This is my <strong>SearchForm.js</strong>, on change input <code>keywords</code> I need to send AJAX request with value of this input on other server with, get some values and use them for autocomplete this input. Is it possible at all? How to make it?</p>
<pre><code>import React from 'react';
import ReactDOM from ... | 1 | 1,475 |
Qt - drag and drop with graphics view framework | <p>I'm trying to make a simple draggable item using the graphics framework. Here's the code for what I did so far:</p>
<p>Widget class:</p>
<pre><code>class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = 0);
~Widget();
};
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
... | 1 | 1,664 |
Unable to convert instance of type 'Android.Widget.EditText' to type 'Android.Widget.Button' | <p>I try to execute the following tutorial :</p>
<pre><code>namespace App1
{
[Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bu... | 1 | 3,974 |
Application_AuthenticateRequest keeps calling infinite redirects | <p>This is a continuation of my <a href="https://stackoverflow.com/q/10846307/481656">previous question here</a>.</p>
<p>I have tried to use the built in ASP Login mechanism but it didn't work for me. The primary reason being, I'm asked to keep it bare and simple.</p>
<p>Now, here is where I stand:</p>
<p><strong>We... | 1 | 5,281 |
Leap year program problems- cant seem to get it to run right | <p>I am supposed to Design a program that asks the user to enter a year and then determine if that year is a leap year using for methods, but I can't seem to get it to work. It ran the first time I complied, but it did not work the way I wanted it to. Now I made some changes and it's not running at all. What am I doin... | 1 | 1,110 |
Laravel Sail Database & User not created | <p>I just set up a laravel project with laravel sail and for some reason during build process it doesn't create the given database and user. I am quite confused as to why because I feel like I've configured everything right.</p>
<p>When executing <code>./vendor/bin/sail artisan migrate</code> I get following error whic... | 1 | 2,455 |
How to implement a maze using disjoint sets? | <p>Here's the DisjointSet class i use :</p>
<pre><code>public class DisjointSet{
public DisjointSet(int size){
s = new int[size];
for(int i = 0; i < size; ++i){
s[i] = -1;
}
}
public void union(int el1, int el2){
int root1 = find(el1);
int root2 = fin... | 1 | 1,697 |
Odoo 8 error: werkzeug: Error on request: | <p>When I start odoo server, it starts correctly, showing the OK mesage:</p>
<pre><code>root@des [/opt/odoo/addons/web]# /etc/init.d/odoo start
Starting Odoo Server Daemon (odoo-server): [ OK ]
root@des [/opt/odoo/addons/web]#
</code></pre>
<p>When I see log file, I see this:</p>
<pre><code>root@de... | 1 | 1,128 |
Can auto detect and connect Serial port using C# | <p>This a sample console application with C# i find on website, but i cannot auto detect and connect it 1 port per console application.</p>
<p>any idea and suggestion to solve idea?</p>
<pre><code>namespace ConsoleSinglePortMonitor {
class Program
{
static bool _continue;
static SerialPort _se... | 1 | 2,912 |
bcrypt_ext. so (LoadError) | <p>I get the following Error when i try to start the rails server. </p>
<p>Any ideas?
Im using a
32bit Windows 7 machine with Ruby on Rails 4 and ruby 2.0.0p247 . I included the gem "bcrypt-ruby", "~> 3.1.1" in my gemfile.</p>
<p>Heres my stack trace.</p>
<pre><code>rails s
ansi: 'gem install win32console' to use ... | 1 | 6,164 |
std::string compare( ) giving segmentation fault: | <p>So I am making a function that will add a new string to a vector of strings ONLY IF the string is a unique string not already contained in the vector. Here is my code:</p>
<pre><code>void CityMapper::addToVector(string& s)
{
bool newWord = true;
if(numAirports > 0)
{
for(int i = 0; i <... | 1 | 1,505 |
Mouse hover not working in only firefox | <p>I have tried and isolated the problem below after spending hours on this. First link is not underlined on hover in FF but works in all the other browsers I have tried. The second link properly works in Firefox too. Most of the existing html on the site is structured in the below way so a site wide fix will be apprec... | 1 | 1,202 |
Convert cURL to PowerShell Invoke WebRequest | <p>I do not know much about APIs, but nothing I have seen seems to get me what I need. </p>
<p>This works in the cmd line:</p>
<pre><code>curl -X POST --user user:password --data-raw "Request=GET%2C%2892837F755%29%2C%28" http://url.com
</code></pre>
<p>I cannot seem to convert this to anything working in PowerShell.... | 1 | 1,397 |
Odoo 10 - Display Field From One2many in Standard Tree and Calendar Views | <p>Thanks to the help of smart people on this site, I now have a nice One2many field in my module that allows me to add multiple order lines just like in the sales module. It works quite well, but now for convenience, I would like to be able to see a certain field within that One2many field in my tree and calendar view... | 1 | 1,474 |
Hide Toolbar on scroll with CoordinatorLayout | <p>My app's action bar consists of a <code>Toolbar</code> and a tab view with a <code>ViewPager</code> to display the page's content. I am using a <code>CoordinatorLayout</code> so that I can hide the <code>Toolbar</code> on scroll, but it isn’t hiding. Here is my activity_main.xml:</p>
<pre><code><?xml version="1.... | 1 | 1,093 |
Composer shows conflict between 2 compatible packages (original) | <p>I have an error trying to <code>composer install</code> my dependencies. Same error with <code>composer update</code>.</p>
<p>It says there's a conflict between symfony/web-server-bundle 4.3.3 and symfony 3.4 but those packages are supposed to be compatible:</p>
<ul>
<li><a href="https://github.com/symfony/web-ser... | 1 | 2,495 |
Get exactly data from "stdout" or "stdout_lines" with exact words of output | <p>I have a task</p>
<pre class="lang-yaml prettyprint-override"><code>- name: DELEGATED ADMIN ACCOUNTS - check, get and send to the file domain.list
shell: /opt/zimbra/bin/zmprov -l gaaa -v zimbraIsDelegatedAdminAccount
</code></pre>
<p>and after this task I got output</p>
<pre class="lang-json prettyprint-override"... | 1 | 1,373 |
How to compare two pandas dataframes and remove duplicates on one file without appending data from other file | <p>I am trying to compare two csv files using pandas dataframes. One is a master sheet that is going to have data appended to it daily (test_master.csv). The second is a daily report (test_daily.csv) that contains the data I want to append to the test_master.csv.</p>
<p>I am creating two pandas dataframes from these... | 1 | 1,262 |
Active Directory: Get all group members | <p>Question: How do I retrieve all group members in a consistent manner?</p>
<p>Context: I am retrieving all objects that are either person, group, contact, or computer:</p>
<pre><code>Filter = "(|(objectCategory=person)(objectCategory=computer)(objectCategory=group))"
</code></pre>
<p>I now need to retrieve all mem... | 1 | 5,390 |
What is the difference between return View(model) and return RedirectToAction("ViewName",model) | <p>I can't get my Index() action to Pass a valid model to my Review() Action</p>
<p>... ActionResult Index()...</p>
<pre><code> else
{
return RedirectToAction("Review", wizard); <--wizard is a valid object here....
}
</code></pre>
<p>ActionResult Review() </p>
... | 1 | 1,469 |
Iterating through a map of objects with multiple values using for_each | <p>I have multiple DNS records that I am creating using Terraform. One of my records has two values that it needs to read from. I am having an issue getting Terraform to be able to loop through my variables in order for this to read successfully. Below is my code. I am getting an error that does not make any sense even... | 1 | 1,424 |
Breaking string into multiple lines in Java | <p>I have a single line string of length n, which I want to split into maximum of 3 lines. Each line can have a maximum of 45 chars, after which I want to add a new-line char ("\n"). The 3rd line can have a maximum of 42 chars after which I need to include 3 dots (...) if the string goes beyond that, thus making the to... | 1 | 1,209 |
Jquery Steps Wizard Select List Validation | <p>I am using a jQuery plugin called <a href="http://www.jquery-steps.com/" rel="nofollow">steps</a> to create a form wizard.
Which can be used in conjunction with the jQuery <a href="http://jqueryvalidation.org/" rel="nofollow">validation</a> plug in.</p>
<p>I need to be able to validate a select list before the user... | 1 | 1,550 |
Why is Glassfish 3.1.1 unable to create my Stateless Session Bean? | <p>Glassfish 3.1.1 (build 12)
Application deployed as a WAR using JAX-RS, EJB3, JPA</p>
<p>There are no deployment errors in the logs. This is a very clean glassfish 3.1.1 install, with only this application deployed. <em>This application works in Glassfish 3.0.1</em> I am getting the following exception when web se... | 1 | 4,443 |
Is there a way to disable validation when using Saxon in the XSLT Ant task? | <p>I am running some XSL transforms via Ant's XSLT task. I am using Saxon 9HE as the processing engine. I have a situation where the input XML files all use the same DTD but declare it to be in different places. Some declare it to be in the current directory, some in a folder and others reference a URL. Here is the Ant... | 1 | 1,046 |
Why won't this formula calculate unless i double click a cell? | <p>See this <a href="https://ufile.io/h24b0" rel="nofollow noreferrer">.xlsx</a> file. No macros, of course!</p>
<p>When you open the file, you will see the following cells:</p>
<pre><code>[Series ]
[10 ]
[20 ]
[30 ]
[ ]
[ ]
[=SUM(B3:B7)]
</code></pre>
<p>The sum does ... | 1 | 1,491 |
Reactjs adding the selected react-bootstrap tab key # to the current URL | <p>I have component contain "React Bootstrap Tab", i want if user select any of these three tabs , to add to current url:-</p>
<blockquote>
<p>http://localhost:3000/account</p>
</blockquote>
<p>the selected tab key name, so the url change like this:-</p>
<blockquote>
<p>http://localhost:3000/account#messages<... | 1 | 1,084 |
use TcpClient to send request to server | <p>I am asking this question primarily because I do not have some ideas clear. I belive I understand how a webserver works but for some reason I am getting different results than expected.</p>
<p><strong>So basically I want to replicate what I do with a real web browser with code.</strong></p>
<p>I have a program cal... | 1 | 1,222 |
Mediatr unable to resolve UserManager in ASP.Net Core | <p>I am building ASP.Net Core App depending on this clean <a href="https://github.com/JasonGT/NorthwindTraders" rel="nofollow noreferrer">architecture</a> example which is using MediatR to execute commands.
And i want to use ASP.Net Core Identity in my app, so in my CreateUserCommandHandler i want to use UserManager t... | 1 | 1,072 |
Route 53 alias record not working? | <p>I previously had a website working on AWS. It was created & registered with AWS. It was setup in the hosted zone and point to an EC2 instance. Everything was working fine.</p>
<p>I got "smart" and created a load balancer, which pointed to the EC2 instance, and then I deleted the previous hosted zone record (a... | 1 | 1,149 |
environment variables with Redis | <p>I have a Rails app that sends email notifications using Gmail (it's currently only in development mode). I set the username and password with environment variables like this</p>
<pre><code>GMAIL_USERNAME='me@gmail.com' GMAIL_PASSWORD='mygreatpassword' rails s
</code></pre>
<p>and everything works fine. However, af... | 1 | 3,996 |
Getting the updated state after an action is dispatched in redux | <p>I am using react and redux.</p>
<p>I have a Container component defined as so:</p>
<pre><code>import { connect } from 'react-redux';
import {addTag} from 'actions';
import ExpenseTagsControl from './expense_tags_control'
const mapStateToProps = (state, own_props={selected_tags:[]}) => {
return {
ta... | 1 | 1,704 |
How to fix "cannot unpack non-iterable NoneType object" error in django admin whilst using custom user model | <p>I am trying to use a custom user model and I am working with the <code>AbstractBaseUser</code> class. However, when I try to create a new user from the admin end, I get this error:</p>
<blockquote>
<p>"cannot unpack non-iterable NoneType object"</p>
</blockquote>
<p>I am able to view users from the admin end, bu... | 1 | 4,695 |
How to publish jar to Nexus(snapshot repository)? | <h1>What I want to achieve</h1>
<p>I want to publish jar to Nexus snapshot repository.</p>
<p>If you know how to realize, I would like to know.</p>
<h1>Detail</h1>
<p>I'm planning to publish Java project artifacts (jar) using Gradle from the Jenkins Pipeline to the Nexus3 artifact repository. (But on requirements
... | 1 | 1,451 |
How to junit test a method with Mono return type | <p>What is the proper way to junit mono and get a body response?
I expected "Single Item Only" to be in the body response of MockHttpServletResponse. But instead I see it's returned in Async.</p>
<p><strong>Sample Method:</strong></p>
<pre><code>public Mono<String> getData(final String data) {
retur... | 1 | 1,130 |
Change option of sass-loader in vue.config | <p>I am confused how to change <code>sass-loader</code> settings using <code>vue.config</code> <a href="https://vue-loader.vuejs.org/guide/pre-processors.html#sass" rel="nofollow noreferrer">in this documentation</a> there is a <code>webpack.config</code> but my project doesn't have one and I don't think I should have ... | 1 | 1,997 |
Proxy Pattern in iOS - Swift | <p>I need to create proxy pattern in iOS using swift</p>
<p>I have tried it using Objective C and here is the code</p>
<p><strong>MyProtocol.h</strong></p>
<pre><code>#import <Foundation/Foundation.h>
@protocol MyProtocol <NSObject>
@required
-(void)testMessage;
@end
</code></pre>
<p><strong>TestBO.... | 1 | 1,102 |
Using ChartJs with MVC 5 Razor | <p>I would like to help, I'm trying to display the data of my query in a chart utlizando the ChartJs. How can I return the data in JSON?</p>
<p>FaturamentoIvel.cs</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BiDAL.Entity.... | 1 | 1,359 |
How to batch process functions with Scala Future's? | <p>I have a single function I want to call 100 times but I want to do it in a batched way so that only 2 functions are being run at any one time. This is due to the fact that the function may place a high load on the internet connection, so its better to batch process the functions in groups of 2's.</p>
<p>This is my ... | 1 | 1,199 |
Hadoop 2.2.0 Setup (Pseudo-Distributed Mode): ERROR// Warn util.NativeCodeLoader: unable to load native-hadoop library | <p>I have recently installed the hadoop new version(2.2.0) on the Ubuntu 12.04LTS (64bit).</p>
<p>And testing the hadoop example dont work.</p>
<p>How to solve this problem????</p>
<blockquote>
<p>Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library
/usr/local/hadoop/lib/native/libhadoop.so.1.0.0 w... | 1 | 1,895 |
How to access a @Named bean in PhaseListener? | <p>We are using JBoss 7.1, MySQL/PostgreSQL DB, JSF 2.0 with CDI beans.</p>
<p>I have to implement authentification based on DB by login and password. We have a managment (administration) portal. When the client opens a restricted page without being logged in, it should redirect the request to <code>login.*</code> pag... | 1 | 1,034 |
Multiple countdown timers using a PHP loop | <p>What I'm trying to do is output data from my database using PHP. Alongside this data I'd like to include a countdown timer using the data from my database. Naturally, the timer is done using JavaScript but I'm struggling to work out how to include the PHP variable in the JavaScript code and then loop through all my ... | 1 | 1,582 |
InvalidOperationException - When ending editing a cell & moving to another cell | <p>I made a program in which I wanted to manually update the Data Grid View.
-I have a Method to Refresh the DGV by clearing it and then reinserting the data.
-Using the designer, I made an event handler for the DGV's CellEndEdit. Inside the Event Handler, the data gets updated & the DGV's custom refreshing method ... | 1 | 3,392 |
Force Meteor To Refresh / Re-render Templates? | <p>*For reference I'm using iron router.</p>
<p>Instead of a sign in page I have this global sign in form embedded in an nav (aka on every page).
Right now I'm doing a really hacky refresh to reload the page once a user logs in.</p>
<p>I would like to just reload to the template aka not refresh the whole page.
Basica... | 1 | 2,562 |
location.getLatitude() throws NullPointerException android | <p>I'm trying to get the current latitude and longitude coordinates. </p>
<p><strong>my code</strong></p>
<pre><code> LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_LOW);
String bestProv... | 1 | 1,390 |
How to call this onclick javascript function in my architecture | <p>I am using this article of architecture <a href="http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/" rel="nofollow">http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/</a></p>
<p>In my one class of Dashboardgrid i have two functions are : </p>
<pre><code>,linkRenderer : function (data, cel... | 1 | 3,521 |
Validating several linked databound TextBox values in WPF | <p>I am trying to find an elegant way to validate two related TextBox values in WPF.</p>
<p>The Text property of each text box is bound to a public decimal property on my class which implements INotifyPropertyChanged for TwoWay binding.</p>
<p>I want to validate the two values such that: BiggerValue >= SmallerValue >... | 2 | 1,534 |
rendaring issue with surfaceview in viewflipper? | <p>i am drawing a piechart by extending surfaceview to PieChart Class. now i am creating 2 objects for Piechart and adding to a VieWFlipper to swipe between those charts. now my problem is 2nd Piechart is not visible to the user if user swipes to 2nd view. but all the 2nd pies functionality is working. i am thinking li... | 2 | 2,908 |
Removing nltk stopwords from csv DataFrame rows | <p>I'm attempting to remove stopwords from the following DataFrame read from a .csv. It's basically a long list of bigrams and the frequency of their occurence in a dataset of shampoo labels.</p>
<p>The goal is to remove the whole row when a stopword appears in either column 'word1' or 'word2'.</p>
<pre><code> ... | 2 | 1,152 |
Xdebug, cannot accept external xdebug connection. Local value overwriting master | <p>I've been trying to set up xdebug for PHP CLI commands. I already have it working just fine for debugging Apache 2 (browser/API connections). The server is setup through Vagrant. So I copied over some xdebug settings to my <code>cli/php.ini</code></p>
<pre><code>[xdebug]
zend_extension=xdebug.so
xdebug.remote_conne... | 2 | 1,784 |
How to download 10GB file with Angularjs, Java, Tomcat,Spring and REST? | <p>When I download small file , everything is OK , but I need some way to download large files . If file large, Blob didn't created , haven't enough memory.
Download file without save on client , directly save to disk with many requests on the server or something like that. </p>
<p>My code on server is : </p>
<pre><... | 2 | 1,114 |
Simplify process with linq query | <p>This is my Table:</p>
<p><strong>PupilNutrition</strong></p>
<pre><code>Id PupilId NutritionId
1 10 100
2 10 101
</code></pre>
<p>My another table <strong>Nutrition</strong>:</p>
<pre><code>Id Nutritioncategory BatchId NutritionRate NutritionId Operation
1 A ... | 2 | 1,526 |
Remove filter on image | <p>I'm using AForge.net for my channel filtering, I have 3 button, red, blue and green.
When I click on button red it will apply the filter of red channel. However, when I go on to click on the blue button, it will overlap the red and image goes dark. </p>
<p>Does anyone know how can I "dispose" red channel when blue ... | 2 | 1,075 |
How to stop a thread in a service?after stopService method called? in Android | <h2>Image Upload Using Service</h2>
<p>In my app I am uploading an image to a server,I have used background service to do this,the upload is executed in another thread in service.I have read that ,Service runs on the UI thread and the thread in a service is another process,What I need is,I want to cancel the upload wh... | 2 | 2,214 |
SQLiteException in WorkManager's ForceStopRunnable | <p>I'm using <code>android.arch.work:work-runtime-ktx:1.0.1-rc1</code> and receiving many SQLiteException which I cannot reproduce.</p>
<p>The exception:</p>
<pre><code>android.database.sqlite.SQLiteException:
at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
at android.database.sqlite.SQLit... | 2 | 1,797 |
ElasticSearch nested query filters and dynamic data | <p>I have an index created using the following pyelasticsearch code:</p>
<p><strong>EDIT: UPDATED AGAIN 11/12/13 18:31 GMT</strong></p>
<pre><code> entry_mapping = {
'product': {
'properties': {
'_advertiser_id': {'type': 'integer'},
'advertiser': {'type': 'strin... | 2 | 10,916 |
Hibernate Envers with JBoss, Spring and Maven - Doesn't write audit record | <p>I am trying to do a Hibernate Envers implementation in conjuction with Spring, JBoss and Maven.</p>
<p>I have the following:</p>
<ul>
<li>spring.version: 3.1.0.RELEASE</li>
<li>hibernate.version: 3.5.0-Final</li>
<li>log4j.version: 1.2.14</li>
<li>jboss-as-7.1.1.Final</li>
<li>mysql DB</li>
</ul>
<p>In the pom.xm... | 2 | 1,288 |
How to send Token in Header to server in Android | <p>In my application I want to create a <strong>Login</strong>/<strong>Register</strong> page.</p>
<p>In the login page I send the <strong>Username</strong>, <strong>Password</strong>, <strong>Token</strong> from client to Server.</p>
<p>I should get <strong>Username</strong> and <strong>Password</strong> from <stron... | 2 | 1,321 |
Beta by Crashlytics - Package appears to be corrupted | <p>I recently developed an app for a client and now have to share it on Crashlytics for a Beta.
I did this many times in the past but with this app, there's a problem.</p>
<p>When I upload my app on Crashlytics Studio's plugin, there's no error. The email is correctly delivered to testers.</p>
<p>But at the end of th... | 2 | 1,815 |
X,Y domain data-binding in multiple grouped bar charts in d3.js | <p><a href="http://jsfiddle.net/tsr0y093/" rel="nofollow">Fiddle Example</a></p>
<p>I have been following these two examples (<a href="http://bl.ocks.org/officeofjane/7315455" rel="nofollow">1</a>)(<a href="http://bl.ocks.org/mbostock/3887051" rel="nofollow">2</a>) to create small multiple grouped bar charts on the sa... | 2 | 1,880 |
Use C++20 Concepts to force a class to implement a set of methods | <p>I am wondering if there is a way in C++ (especially with C++20) to write some kind of interface for classes/structs.</p>
<p>For example in Java interface is a completely "abstract class" that is used to group related methods with empty bodies:</p>
<pre class="lang-java prettyprint-override"><code>interface Animal
... | 2 | 1,197 |
Pass multiple checkbox values to dropdown lists in jQuery | <p>I have a checkbox with 5 options. Only two of these can be selected. What I am trying to do is pass the value checked to a dropdown list. Since two checkboxes can be selected, I would like their values to be passed to two dropdown lists. Here's what I have so far.</p>
<p><strong>HTML</strong></p>
<pre><code><in... | 2 | 1,070 |
Implementation of Queue using Linked List- It creates the Linked List but stops working after it prints | <p>Here is what I have so far. I have generated a linked list but when the program prints the linked list out, a pop up comes up and it says my program has stopped working. I am using visual studio. I need to implement a queue using linked list. I am able to create it and print it out but when it prints out, the progra... | 2 | 1,092 |
Spring injection of userdetailsservice in security config class fails | <p>I am new to spring security and i am trying to configure it using java but when i try to inject a UserDetailsService into a security config class i get a 404 error page but when i inject it into a controller the injection works. am using spring version 4.1.6 and spring security 4.0.0</p>
<p>here is my security conf... | 2 | 1,115 |
MongoDB $lookup aggregation resulting in nested array | <p>I have two collections that are in many-to-one relationship (multiple hosts' http services often serve the 'same' e.g. DNS-level load balancing).
I'm trying to build a query returning the relevant documents (from two collections) merged into one.</p>
<p>hosts collection:</p>
<pre><code>{
"_id" : Object... | 2 | 2,852 |
One button two listeners in java | <p>im trying to setup two listeners for one button. Here is my code:
This is the main code</p>
<pre><code> public class LoggingEventsActivity extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void... | 2 | 3,008 |
How to submit Polymer forms to PHP and display response | <p>Using Polymer 1.0, I set up an iron-form to submit a simple contact form. The idea is to submit the form to a database table using PHP and then display a response from the PHP side into the browser without refreshing - typical AJAX. I'm getting hung up on the Polymer environment though - it seems like there should b... | 2 | 2,774 |
NULL values in codeigniter from POST | <p>UPDATE: </p>
<pre><code> Error Number: 42S22/1054
Unknown column 'Array' in 'field list'
INSERT INTO `attendance` (`event_date`, `event_time`, `event_info`, `player_id`, `is_present`, `notes`) VALUES ('2017-03-08', '11:00:00 AM', 'other', NULL, Array, 'notes')
</code></pre>
<p>'NULL' should be the 'player_id'... | 2 | 1,333 |
Node.js SSL error: wrong version number: ../deps/openssl/openssl/ssl/record/ssl3_record.c:332 | <p>Using Node.js and cross-fetch, I receive an error accessing an HTTPS site (see title and comments below). There is no proxy involved. The code below is a simplified version that reproduces the error. The comments in the code contain the exact error text.</p>
<p>This had been working until something (?) changed, whic... | 2 | 1,367 |
Dynamic values passing to sparkSQL | <p>Basically I am passing the dynamic values in pyspark SQL. My code is detailed below: </p>
<pre><code>set_sql = "".join(["set app_list_0 = 'app_3'"])
sqlContext.sql(set_sql)
click_app_join_sql = sqlContext.sql("select click_id, (case when app_new in ${app_list_0} then 1 else 0 END) as ${app_list_0}, dev... | 2 | 1,045 |
DeletionPolicy:Snapshot cannot be specified for a cluster instance, use deletion policy on the cluster instead | <p>I am trying to create RDS cluster and aurora instance using the cloudoformation template below: </p>
<pre><code>{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "example setup",
"Parameters" : {
"DBInstanceIdentifier" : {
"Type": "String",
"Description": "Name for the DB inst... | 2 | 1,177 |
Tomcat can't instantiate org.apache.log4j.varia.LevelMatchFilter class | <p>I'm trying to setup <code>log4j</code> on my web app. Web server is <code>Tomcat 7</code>. </p>
<p>I'm getting the following exception:</p>
<pre><code> log4j:ERROR Could not instantiate class [org.apache.log4j.varia.LevelMatchFilter ].
java.lang.ClassNotFoundException: org.apache.log4j.varia.LevelMatchFi... | 2 | 2,192 |
AWS Cognito User Authentication in C# Unity | <p>I've been struggling to get AWS Cognito User Authorisation to work in Unity 2017.</p>
<p>There is a limitation with the Unity SDK, as per this request:
<a href="https://forums.aws.amazon.com/thread.jspa?threadID=248872" rel="nofollow noreferrer">https://forums.aws.amazon.com/thread.jspa?threadID=248872</a></p>
<p>... | 2 | 2,734 |
Why do I get a "Null pointer exception" from spring security? | <p>I'm new to Spring Securityand can't see why I keep having the message with "Null Pointer Exception", I read the other posts and made some changes but keep having this error. It seems that it does not communiate with my database. Please help me. Thanks</p>
<p>Here is my code:
Dispatcher-servlet.xml</p>
<pre><code>&... | 2 | 4,996 |
GUI calculate button coding error in java | <p>Okay, first of all the project I am working on has two packages, first is murach.business which contains invoiceCalculations.java Second is murach.forms which contain InvoiceForm.java(JFrame) and SwingValidator.java</p>
<p>I need to add an event handler for the actionPerformed event of the Calculate button. Add cod... | 2 | 1,638 |
Media query not responding on window resize, but working in Chrome Dev tools | <p>So I'm trying to have a "list" (not an <code>html</code> list, but just 6 concurrent pictures in a logical fashion) of pictures that go down, but at a certain breakpoint, two move next to each other, and the media query is working in the Chrome dev tools and on Adobe Dreamweaver live preview on the phone, but on bro... | 2 | 1,232 |
ambari cluster + missing folders under /var/run/ambari-server | <p>we have very strange problem</p>
<p>we installed new ambari cluster</p>
<p>but we notice that the folders - stack-recommendations and bootstrap on ambari server machine , are missing</p>
<p>stack-recommendations and bootstrap folders must be under /var/run/ambari-server</p>
<p>what could be the problem ?</p>
<p... | 2 | 1,519 |
Reading data from firebase functions | <p>I've now spent the better part of 16 hours tearing my hair out over javascript, so I figured it was time to ask someone.</p>
<p>I have an android app made in android studio, which is connected to a firebase database that looks roughly like this: </p>
<pre><code>nameOfDatabase
Places
Bar
B00... | 2 | 2,675 |
hudson.model.UpdateCenter#updateDefaultSite: Upgrading Jenkins. Failed to update the default Update Site 'default'. Plugin upgrades may fail | <p>How do I start the Jenkins process in offline mode on one of my servers?</p>
<p>I am trying to start Jenkins by running command java -jar jenkins.war, but it is failing at the below warning because of no connectivity.</p>
<p>Is there any way to skip this plugin upgrade through the internet and bring the Jenkins up a... | 2 | 2,929 |
How to fixe Xcode build error FBLPromises? ( Mac flutter) | <p>How to resolve this error ?</p>
<p>I have the last flutter upgrade, last Xcode 11.5, last MacOS catalina. I have done Xcode 11.5 migration (build phase), move to zsh, selected legacy build system, remove all package not compatible, relaunch pod install by focus the podfile folder with the terminal. Launch flutter cl... | 2 | 7,693 |
show dynamic histogram using d3.js, node.js, postgresql | <p>I fetch the data from postgresql database using node.js and I showed this data in array form in my browser perfectly. I also showed static histogram (made in d3.js code) using node.js. The histogram also uses static array values. Both database values and a static histogram is showed separately on my browser page. No... | 2 | 2,163 |
Xamarin (Frame.)GestureRecognizers doesn't work | <p>I am trying to make a TapGestureRecognizer on some frames, but when I test it, nothing happens.</p>
<p><strong>xaml</strong></p>
<pre><code><StackLayout>
<AbsoluteLayout>
<Frame HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" TranslationY="380" TranslationX="12.5" HeightRequest... | 2 | 1,553 |
SSH tunnel not working with JDBC while trying to route HTTPS traffic | <p>I am trying to connect to Snowflake which only has port 443 open for communications using JDBC driver. Instead of directly connecting to the snowflake server I want to connect to it via tunnel server. So I've created a ssh tunnel from local machine to snowflake server. And I'm passing the forwarded local address and... | 2 | 1,402 |
Jenkins not recognizing my java in linux | <p>I am using OpenSuse and trying to install Jenkins using rpm. I have many trouble in this: </p>
<pre><code>aquarius:/home/jeevan/Downloads # service jenkins start
Job for jenkins.service failed. See 'systemctl status jenkins.service' and 'journalctl -xn' for details.
</code></pre>
<p>The problem is clearly stated i... | 2 | 1,518 |
ScrollViewer ChangeView on SizeChanged | <p>I have <code>DataTemplate</code> which I use in HubSection:</p>
<pre><code><DataTemplate x:Name="dataTemplate2">
<Grid x:Name="greedy">
<ScrollViewer x:Name="scroller" SizeChanged="ScrollViewer_SizeChanged" Height="{Binding Height,ElementName=greedy}" >
<ItemsControl x:N... | 2 | 3,923 |
Jquery used to reset dropdown select menus working on one, but not on another with the same code | <p>I am using the following ajax / jquery / php to pull data into select boxes. After this, I use the code below it to reset the select dropdown menus if the user makes any changed to previous select boxes. The odd thing that is happening is if the user changes the #customer dropdown it resets all of the qty boxes and ... | 2 | 1,549 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.