title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How do I get py.test to recognize conftest.py in a subdirectory? | <p>So, I just lost a <em>day</em> trying to find out why <code>py.test</code> isn't executing my autouse, session-scoped setup and teardown fixtures. In the end I stumbled over (hat tip to <a href="https://stackoverflow.com/a/13686206/599884">this SO comment</a>!) this little tidbit in the <a href="http://pytest.org/la... | 0 | 1,100 |
Executing a SQL query with C# | <p>I would like to add some information to my database. I searched for some tutorials, but none of them work.</p>
<p>NonQuery can do what he needs to do, because the messagebox returns "Success" (1). But it does not update my database. If I put the same query to "Add New Query", directly to my database, it works.</p>
... | 0 | 3,209 |
I'm having trouble with "AXIOS PATCH" method | <p>I am trying to update my database record using "axios patch" method.</p>
<p>This is my code:</p>
<pre><code>editClient(client) {
let data = new FormData();
data.append("name", this.client.name);
data.append("email", this.client.email);
data.append("phone", this.client.phone);
data.append("_method", "PATC... | 0 | 1,246 |
Enable button based on TextBox value (WPF) | <p>This is MVVM application. There is a window and related view model class. </p>
<p>There is <code>TextBox</code>, <code>Button</code> and <code>ListBox</code> on form. Button is bound to <code>DelegateCommand</code> that has <code>CanExecute</code> function. Idea is that user enters some data in text box, presses bu... | 0 | 2,322 |
How to make a Scroll Listener for WebView in Android | <p>How to implement the Scroll Listener for <code>WebView</code> in Android</p>
<p>i tried this but its not calling my <code>Log.i</code> on scrolling the webview.</p>
<pre><code>package com.example.webview.full.width;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import a... | 0 | 1,263 |
Error "Caused by: java.lang.ClassNotFoundException:" | <p>During android vogella tutorial regarding to sqlite I have encountered annoying problem with following error: </p>
<pre><code>09-05 09:18:06.127: E/AndroidRuntime(981): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.de.vogella.android.todos.contentprovider.MyTodoContentProvider" on path... | 0 | 3,439 |
400 BAD REQUEST when POST using Axios in React with Nodejs/Express | <p>I use Axios with React to use POST method to my Nodejs server. The first time I tried it gave me an error regarding CORS policy. And I have added the header to it but still it gives me status code of 400 mentioning this:</p>
<pre><code>xhr.js:166 POST http://localhost:3000/api/user/register 400 (Bad Request)
dispat... | 0 | 3,591 |
System.TypeLoadException: Method 'Create' in type 'MySql.Data.EntityFrameworkCore.Query.Internal.MySQLSqlTranslatingExpressionVisitorFactory' | <p>I'm trying to add a new user to the database with the following code:</p>
<pre><code>public async void SeedUsers(){
int count=0;
if(count>0){
return;
}
else{
string email="jujusafadinha@outlook.com.br";
_context.Add(new User{LoginEmail=email});
await _co... | 0 | 1,615 |
Bootstrap scrollspy offset on a fixed navbar does not work | <p>I have created and exact fiddle of my problem here for testing: <a href="http://jsfiddle.net/aVBUy/7/">http://jsfiddle.net/aVBUy/7/</a></p>
<p>The issue is, when I click on navbar items, I have a script which scrolls to the element id. And I am using scrollspy to highlight the nav elements when page is in correct p... | 0 | 1,914 |
"Enabling" comparison for classes | <p>I would like some help on my CSC HW. It is on classes/objects, and it's a simple class on defining a circle, with the name class Circle(object).</p>
<p>The exact text of the HW (I completed the first two parts of this hw and thus this 3rd part is an expansion on the initial problem):</p>
<p>"""Expand on your Circl... | 0 | 1,026 |
WARNING 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing | <p>I successfully deployed my Maven artifact to the Central Repository. However, I saw this warning when I ran <code>mvn release:perform</code>:</p>
<pre><code>[INFO] Invoking perform goals in directory /Users/miguelvelez/Documents/Programming/Java/Projects/messages/target/checkout
[INFO] Executing goals 'deploy'...
[... | 0 | 6,205 |
sgen.exe fails during build | <p>After changing the output directory of a visual studio project it started to fail to build with an error very much like: </p>
<pre><code>C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\sgen.exe /assembly:C:\p4root\Zantaz\trunk\EASDiscovery\EASDiscoveryCaseManagement\obj\Release\EASDiscoveryCaseManagement.... | 0 | 1,695 |
XSLT How to check if XML Node exists? | <p>I have XML file:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<Data>
<Records>
<Record>
<AddInfo>
<Info>
</Info>
</AddInfo>
</Record>
</Records>
</Data&g... | 0 | 1,405 |
The data types text and varchar are incompatible in the equal to operator | <p>I am trying to access all the records from database on a data grid view depending upon the type of user logging in through a form having 2 text-boxes for user_name and password respectively and on submit button records are displayed. But the code I have written is giving me the following error: The data types text a... | 0 | 1,359 |
How to print a df in Terminal without loosing format? | <p>How can I print a df in the Terminal without loosing the format?</p>
<p>Lets say I have a df like this:</p>
<pre><code>In: df
Out:
TFs No Esenciales Genes regulados Genes Regulados Positivamente Genes Regulados Negativamente No Tentativo de genes a silenciar No Real de genes a silenciar No Tentativo de ... | 0 | 1,063 |
Manipulate data before returning observable | <p>I am pretty new with Angular 2 and the concept of Observables. However what i am trying to achieve should be fairly simple for experienced gurus :)</p>
<p>So:
I have a component in which i have <code>subscribed</code> the observable which is coming from a service. For testing purposes, i have been using data Arrays... | 0 | 1,377 |
WPF MVVM Button Control Binding in DataTemplate | <p>I've seen other questions that deal with this, but never any explicit code describing the fix. I can't get a button inside of my ItemTemplate to bind to ANY command anywhere. Very frustrating. I am a complete MVVM newbie, btw.</p>
<p>Here's my Window XAML.</p>
<pre><code><Window x:Class="RET.CMS.Printing.App.Ma... | 0 | 3,718 |
PHP/Java bridge problem | <p>I am using tomcat 6 on windows. Here is the code I am testing. </p>
<p></p>
<pre><code>import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.StringReader;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
/**
* Create and run THREA... | 0 | 1,909 |
RxSwift, how do I chain different observables | <p>I am still a beginner in Reactive programming, and RxSwift in general.
I want to chain two different operation. In my case I simply want to download a zip file from a web server, and then unzip it locally.
I also want, at the same time to show the progress of the downloaded files.
So I started creating the first obs... | 0 | 1,117 |
Can't create Database Link to remote DB in Oracle-DB | <p>We have a CRM system in our company, which uses an <strong>Oracle 11g database</strong>. It is developed by a third party vendor.</p>
<p>We do not have access to the server which runs the CRM system. But nevertheless, we have working DBA login data available to us (SYS user). It consists of:</p>
<ul>
<li>server IP... | 0 | 1,142 |
Windows + virtualenv + pip + NumPy (problems when installing NumPy) | <p>On Windows, I normally just use the binary installer, but I would like to install <a href="http://en.wikipedia.org/wiki/NumPy" rel="noreferrer">NumPy</a> only in a virtualenv this time, so I created a virtual env:</p>
<pre><code>virtualenv --no-site-packages --distribute summary_python
cd summary_python/Scripts
act... | 0 | 4,362 |
Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity; java.lang.NullPointerException | <p>Im creating Triggers and Action Application for my Final Year Project,</p>
<p>I return a child Activity result to intermediate activity and ther add some data to that activity and send it again to main activity, </p>
<p>I did for both Trigger sub module and Action sub module, both like same coding....</p>
<p>trig... | 0 | 1,166 |
C++ triangle rasterization | <p>I'm trying to fix this triangle rasterizer, but cannot make it work correctly. For some reason it only draws half of the triangles.</p>
<pre><code>void DrawTriangle(Point2D p0, Point2D p1, Point2D p2)
{
Point2D Top, Middle, Bottom;
bool MiddleIsLeft;
if (p0.y < p1.y) // case: 1, 2... | 0 | 2,106 |
How to name a volume using a docker-compose.yml file? | <p>I'm new to Docker and I'm trying to find out how to set the name of the created data volume. Currently the directory is automatically named as a long hash under /var/libs/docker which is far from user friendly.</p>
<p>I'm attempting to set up a development environment for MODX as shown here:
<a href="https://github... | 0 | 1,501 |
Error : IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents | <p>Below are my dependencies</p>
<pre><code>implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
</code></pre>
<p>My layout.xml</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<... | 0 | 3,471 |
Entity Framework - Already Defined | <p>I have a problem with an EDMX file which I've never encountered before. Seemingly randomly when the site is running or I'm debugging, the EF will bomb out and complain that everything is re-defined. I have to restart the app pool and re-attach the debugger every time, then start again from where I left off, after wh... | 0 | 1,525 |
Zend Framework 2 segment route required segment | <p>I am trying to make a route (or two) that will let me invoke two different actions with the below URL formats.</p>
<pre><code>mydomain.com/profile
mydomain.com/profile/1234/something
</code></pre>
<p>For the second format, the <code>1234</code> should be a required integer value, while <code>something</code> shoul... | 0 | 1,091 |
Java : DataInputStream replacement for endianness | <p>Below is my code that replaces the DataInputStream to wrap an InputStream, but provides extra methods to read little endian data types in addition to the normal methods that read big endian types. Feel free to use it if you'd like.</p>
<p>I have a few reservations as follows. Notice the methods that do not change f... | 0 | 2,574 |
Unable to cast object of type System.Web.UI.WebControls.GridView in ASP.NET | <p>I wrote a method that deletes rows from my an asp.net Gridview when the delete button is clicked and another method for when the edit button is clicked.
Both Edit and Delete buttons are part of the built in gridview controls.</p>
<p>However when I press these buttons (edit/delete)and exception is thrown.
<strong>Un... | 0 | 1,108 |
Installing Python's new regex module not working | <p>I am trying to install an <a href="https://pypi.python.org/pypi/regex" rel="nofollow noreferrer">alternative regular expression module</a> to replace re but am having difficulty installing the module. I have already visited this <a href="https://stackoverflow.com/questions/17437564/install-new-regex-module-with-setu... | 0 | 3,471 |
SSL IOExceptionjavax.net.ssl.SSLKeyException: RSA premaster secret error | <p>We have a proprietary software to run the load testing. When I try to run the tool, I am getting the following exception in my logs. I am running out of ideas how to resolve it. I seen most of the answers and they got it working uninstalling and installing the java and setting the classpath in the command line while... | 0 | 1,835 |
Apache CXF: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint | <p>first of all, I know that there are already some questions on SO about this topic but none of them solved my problem (or I am too stupid to understand them, that's a possibility as well).</p>
<p>So, I have a WSDL. From the WSDL I've generated a Java client using Eclipse CXF plugin. Now I'm doing this:</p>
<pre><co... | 0 | 1,220 |
Cannot create instance of viewmodel after using Hilt in Android | <p>Here is my <code>AllFilesListViewModel</code> class.</p>
<pre><code>class AllFilesListViewModel @ViewModelInject constructor(
private val pdfItemRepository: PdfItemRepository):ViewModel() {
}
</code></pre>
<p>Here is <code>PdfItemRepository</code> class.</p>
<pre><code>@Singleton
class PdfItemRepository @Inj... | 0 | 2,291 |
New .NET feature bundle and minification {version} wildcard doesn't work with directories? | <p>I have the following pice of code which runs perfectly:</p>
<pre><code>bundles.Add
(
new ScriptBundle("~/bundles/scripts")
.Include
(
"~/Scripts/jquery-{version}.js"
,"~/Scripts/jquery-ui-{version}.js"
,"~/Scripts/jquery.unobtrusive*"
,"~/Scripts/jquery.validate*"
... | 0 | 1,144 |
How to run a function after Stage.show()? | <p>I'm struggling with a problem where one chunk of code runs before it's initialized.</p>
<pre><code>@FXML
public void Start(int pesel) throws IOException {
klientPesel = pesel;
root = FXMLLoader.load(getClass().getClassLoader().getResource("klientScene.fxml"));
Main.mainStage.setTitle("Agen... | 0 | 2,047 |
wait command wont wait for child process to finish c cpp c++ | <p>I am trying to write a c++ program that creates a child process, runs a command and pipes the output back to the input of a command the parent is running.</p>
<p>I have the parent execute the wait(NULL) or wait((void*)pid) command but it does not wait.</p>
<p>here is the code:</p>
<pre><code>#include <string.h... | 0 | 1,441 |
MongoDb $addFields and $match | <p>In my mongodb query, I use $addFields to add ID field which concatenated of other three fields. My problem is that I get no result if I $match that new added field with value that I want to query. For other fields, they work just fine. </p>
<p><a href="https://i.stack.imgur.com/Hh1Lu.jpg" rel="noreferrer"> orde... | 0 | 1,094 |
How do I play a live HTTP audio stream in MediaPlayer on Android? | <p>I want to play a live HTTP stream in my Android app, so I installed the Windows Media Encoder 9 on another PC on the same LAN, and used it to create a live HTTP audio stream.</p>
<p>The live HTTP stream is okay: I tested it, and it can be played by Windows Media Player or VLC on a PC, and can be played by VLC for A... | 0 | 1,927 |
How to Fix: "google.protobuf.message.DecodeError: Error parsing message" when creating tensorflow text summary | <p>I am trying to run a script to get a text summary out of a tensorflow .pb model such as this:</p>
<pre><code> OPS counts:
Squeeze : 1
Softmax : 1
BiasAdd : 1
Placeholder : 1
AvgPool : 1
Reshape : 2
ConcatV2 : 9
MaxPool : 13
Sub : 57
Rsqrt : 57
Relu : 57
Conv2D : 58... | 0 | 1,373 |
How to add SockJS into Angular 2 project? | <p>I use angular-cli to generate a new project. Now I want to add socketJs to the project, but keep getting errors in browser console:</p>
<pre><code>GET http://localhost:4200/url-parse 404 (Not Found)
GET http://localhost:4200/inherits 404 (Not Found)
Unhandled Promise rejection: Error: XHR error (404 Not Found) load... | 0 | 1,473 |
Upload File using RestClient as multipart/form-data in c# | <p>I am trying to upload files from the c# class using <strong>restClient</strong> (RestSharp) request.
I am creating Method.POST method and add one Audio file to this request As multipart/form-data. </p>
<p>Server throws an exception when I execute the request.</p>
<p>Exception : </p>
<pre><code> System.ArgumentNul... | 0 | 1,025 |
How to build a Docker image on a specific architecture with Docker Hub? | <p>I have these automated builds on Docker Hub:</p>
<p><a href="https://i.stack.imgur.com/Fg2vl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Fg2vl.png" alt="docker hub automated builds"></a></p>
<p>And for reference, here are both Dockerfiles:</p>
<ul>
<li><a href="https://github.com/rfgamaral/docker-gp... | 0 | 3,447 |
Abstract class : invalid abstract return type for member function ‘virtual...’ | <p>In my program I have such class hierarchy:</p>
<pre><code>#include <iostream>
#include <cmath>
#include <sstream>
using namespace std;
class aa;
class bb;
class root
{
public:
virtual ~root() {}
virtual root add(const aa& a) const=0;
virtual root add(const bb& a) const=0;
};
... | 0 | 2,389 |
INVALID_STATE_ERR: DOM Exception 11 | <p>I'm developing a simple auxiliary class to send requests using XmlHttpRequest (code below). But I cant make it work. At google chrome, for example, I get the error <code>INVALID_STATE_ERR: DOM Exception 11</code> and at the other browsers I get a status == 0.</p>
<pre><code>//@method XRequest: Object constructor. A... | 0 | 1,755 |
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured | <p>I am working on a <strong>Spring Boot Batch</strong> example with MongoDB and I have already started the <code>mongod</code> server.</p>
<p>When I launch my application, I am getting the error below.</p>
<p>Any pointers for this issue?</p>
<pre><code>***************************
APPLICATION FAILED TO START
*******... | 0 | 1,787 |
Upload Multiple Files In PHP | <p>I wonder whether someone may be able to help me please.</p>
<p>Using some excellent online tutorials I've put together the code below which allows a user to upload image files to a server folder and the filename and other details to a mySQL database.</p>
<p><strong>PHP Script</strong></p>
<pre><code><?php
//de... | 0 | 3,342 |
Uncaught TypeError: fs.readFileSync is not a function | <p>I am trying to get webpack and <a href="https://github.com/mapbox/mapbox-gl-js/blob/master/webpack.config.example.js" rel="noreferrer">mapbox-gl</a> work together within Meteor system. I have look everywhere about the error mentioned above but none works. Here is my webpack setup </p>
<pre><code>{
"root": "src",
... | 0 | 3,683 |
Confused about android clickable, focusable true-false and their work | <p>I have created a grid view follow this link</p>
<p><a href="https://stackoverflow.com/questions/20129337/android-gridview-with-custom-baseadapter-get-clicked-view-at-position">Android - Gridview with Custom BaseAdapter, get clicked View at position</a></p>
<p>It works fine. But I am confused at these two line in c... | 0 | 1,459 |
Return a partial view and append it to a div in index.cshtml view Mvc4 | <p>I am trying to do something like, i have an index view which has some tags on each on one when click i want to return a partial view and append it to the div in main index.cshtml view
my code i below</p>
<p><strong>Index.cshtml</strong></p>
<pre><code>@model OyeAPI.Models.User
@{
object user = Session["userI... | 0 | 2,441 |
Docker-compose command doesn't override Dockerfile CMD | <p><a href="https://docs.docker.com/compose/compose-file/#command" rel="noreferrer">Docker-compose reference</a> says:</p>
<blockquote>
<p>command</p>
<p>Override the default command.</p>
</blockquote>
<p><strong>My Dockerfile</strong></p>
<pre><code>FROM adoptopenjdk/maven-openjdk8
RUN mkdir /config
COPY /src/main/r... | 0 | 1,262 |
Simple CSV to XML Conversion - Python | <p>I am looking for a way to automate the conversion of CSV to XML. </p>
<p>Here is an example of a CSV file, containing a list of movies:</p>
<p><a href="https://i.stack.imgur.com/Htvuy.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Htvuy.jpg" alt="Movies Csv"></a></p>
<p>Here is the file in XML format:<... | 0 | 1,192 |
The state information is invalid for this page and might be corrupted. (Only in IE) | <p>Can anybody help me out with this exception. I have tried couple of fixes but nothing worked. I am getting this exception only in IE(7, 8 and 9). </p>
<p>When i load the page first time, it brings up a dropdown. where i select a specific vendor and it makes a page post back and returns the required information. If ... | 0 | 1,607 |
Configuring Spring + Hibernate JPA Transaction Manager through JTA | <p>I previously had this config for Hibernate using RESOURCE-LOCAL transaction type:</p>
<p>persistence.xml:</p>
<pre><code><persistence-unit name="myPU" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
</persistence-unit>
</code></pre>
<p>a... | 0 | 1,424 |
How to decode SAML Response and get the attribute values sent by Idp in PHP | <p>I am implementing SAML Single Sign-On and using idp initiated method for login request. After login it redirect users on the login url defined on the request with the base64 encoded SAML Response.</p>
<p>Now, I have extract to this response, validate it and get the attribute value sent by the Idp like email address... | 0 | 1,719 |
How to use maven plugin tomcat7:run with multiple contexts (WARs)? | <p>I've been using <code>mvn tomcat7-maven-plugin:run -am -pl :foo</code> successfully to run just a single project at a time in <a href="http://tomcat.apache.org/maven-plugin-2/run-mojo-features.html" rel="noreferrer">Tomcat like is shown here</a>. Now I'd like to have multiple modules run under the same port but diff... | 0 | 1,634 |
Spring Boot + Spring Security + Spring OAuth2 + Google Sign in | <p>I have setup a small project to implement OAuth2 Login with Google+ API, using Spring Boot (1.5.2), Spring Security and Spring Security OAuth2.</p>
<p>You can find source in: <a href="https://github.com/ccoloradoc/OAuth2Sample" rel="noreferrer">https://github.com/ccoloradoc/OAuth2Sample</a></p>
<p>I am able to aut... | 0 | 3,384 |
Tkinter: grid or pack inside a grid? | <p>I am building a GUI for a software and want to achieve this:</p>
<pre><code>######################################
# | some title #
# menu upper |----------------------#
# | #
# | CANVAS #
# menu lower | #
# ... | 0 | 1,299 |
Kotlin Execution failed for task ':app:kaptDebugKotlin' | <p>Unsolvable problem when I try to start my app. I'm using Room database and databinding.
I've located the problem to originate from my database class but cannot seem to find a solution for the problem</p>
<pre><code>@Database(entities = [FietsItem::class, Merk::class], version = 5, exportSchema = false)
abstract clas... | 0 | 9,373 |
JAXB: How to marshal objects in lists? | <p>Perhaps a stupid question: I have a <code>List</code> of type <code><Data></code> which I want to marshal into a XML file. This is my class <code>Database</code> containing an <code>ArrayList</code>...</p>
<pre class="lang-java prettyprint-override"><code>@XmlRootElement
public class Database
{
List<Da... | 0 | 1,973 |
No job jar file set. User classes may not be found in Hadoop | <p>I am trying to run a MR wordcount job.but i am getting No job jar file set set.i am posting the stacktrace can anyone help me?</p>
<pre><code>14/01/27 16:52:26 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
14/01/27 16:52:26 WARN mapred.Jo... | 0 | 1,372 |
Spring Security Java Config | <p>I'm trying to use JavaConfig instead of XML configuration for Spring Security.
I would like to use <code>@PreAuthorization</code> for declaring access rights.</p>
<p>My Spring Security Config looks like this:</p>
<pre><code>@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity( prePostEnabled = true )
publ... | 0 | 3,106 |
How to handle slow network connection in Java/Android | <p>I have an app that uses many, many calls to a MySQL database; it does this inside an <code>AsyncTask</code>. Below is a sample of what one may look like.</p>
<p>My main question is this; sometimes, the host (Godaddy, ugh) decides to stall a connection and my <code>progressDialog</code> loads, and loads, and loads ... | 0 | 6,143 |
Cannot declare a variable of static type and Cannot create an instance of the static class | <p>First apologize for my duplicate question for short time..</p>
<p>again i have problem on use class in other place and my errors is:</p>
<pre><code>Error 1 Cannot declare a variable of static type 'umEdition.Program'
Error 2 Cannot create an instance of the static class 'umEdition.Program'
</code></pre>
<p... | 0 | 2,432 |
Receiving Data from NSInputStream in Swift | <p>I try to send and receive data with NSOutputStream and NSInputStream in Swift. The sending of data is working well, but i have some questions about the receiving.</p>
<p>I found a solution with handling the NSStreamEvent, which i have tried.</p>
<p>First of all my function for initializing the connection:</p>
<pr... | 0 | 1,713 |
HTML5 Canvas Performance and Optimization Tips, Tricks and Coding Best Practices | <h1>DO YOU KNOW SOME MORE BEST PRACTICES FOR CANVAS??</h1>
<h2>Please add to this thread what you know, have learned, or have read online any and all Canvas best practices, tips/tricks for performance</h2>
<p>With Canvas being still very new to internet, and no signs of it ever getting old that I can see in the future,... | 0 | 2,536 |
Min undequeued buffer count exceeded | <p>I am using a SurfaceTexture to get preview frames in the following way.</p>
<p>First, I set a preview texture:</p>
<pre><code>camera.setPreviewTexture(new SurfaceTexture(0));
</code></pre>
<p>Then, just before starting the preview and then each time <code>onPreviewFrame</code> is called, I set the callback buffer... | 0 | 1,100 |
Style attribute attr/colorSecondary not found | <p>I can't build my project. It shows me <code>attr/colorSecondary</code> not found error.</p>
<p>These are my styles and manifest files:</p>
<blockquote>
<p>Android studio version: 3.0 canary 9</p>
<p>compileSdkVersion 25</p>
<p>buildToolsVersion '25.0.3'</p>
<p>minSdkVersion 17</p>
</blockquote>
<... | 0 | 2,646 |
Unmarshalling Error: unexpected element (uri:url, local:"objectname"). Expected elements are <{}objectname> | <p>I'm using jaxb2-marshaller to generate classes to communicate with a webservice. Java-classes are generated with use of some wsdl files.</p>
<p>Everything is okay now, but when I'm trying to use some of the generated classes, i got this unmarshalling error, altough I use the generated ObjectFactory classes.</p>
<p... | 0 | 4,426 |
Result of expression '$.cookie' [undefined] is not a function | <p>Hi all in my mobile application to pass variable in between various pages without ajax I am using cookie. I am setting cookie like :</p>
<pre><code> $.cookie("userName", userName, { path: '/' });
</code></pre>
<p>in js file and in in another html file I am accessing it as:</p>
<pre><code>$.cookie('userName');
</... | 0 | 1,060 |
Authorization header is invalid -- one and only one ' ' (space) required - Amazon S3 | <p>Trying to <code>precompile</code> my assets in Rails app and <code>sync</code> with <code>Amazon S3 Storage</code>:</p>
<p>with this mesage: </p>
<p>Any feedback appreciated: </p>
<pre><code>Expected(200) <=> Actual(400 Bad Request)
response => #<Excon::Response:0x00000007c45a98 @data={:body=>"<... | 0 | 1,107 |
Get indices of elements that are greater than a threshold in 2D numpy array | <p>I have a 2D numpy array:</p>
<pre><code>x = [[ 1.92043482e-04 0.00000000e+00 0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00 2.41005634e-03 0.00000000e+00
7.19330120e-04 0.00000000e+00 0.00000000e+00 1.42886875e-04
0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000... | 0 | 1,085 |
Android studio error: An error occurred while trying to compute required packages | <p>I'm trying to install the latest Android Studio on a MacBook pro 2015</p>
<p>Unfortunately I get this error:</p>
<blockquote>
<p>An error occurred while trying to compute required packages.</p>
</blockquote>
<p>Here a screenshot of the error:</p>
<p><a href="https://i.stack.imgur.com/4zG3C.png" rel="noreferrer... | 0 | 1,740 |
Error in pig while loading data | <p>I am using ubuntu 12.02 32bit and have installed <strong>hadoop2.2.0</strong> and <strong>pig 0.12</strong> successfully. Hadoop runs properly on my system.</p>
<p>However, whenever I run this command :</p>
<pre><code>data = load 'atoz.csv' using PigStorage(',') as (aa1:int, bb1:int, cc1:int, dd1:chararray); ... | 0 | 3,363 |
Controller method not found - laravel 4 | <p>I have this message whine trying to run any controller</p>
<blockquote>
<p>Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException</p>
<p>Controller method not found.</p>
</blockquote>
<p>I have this Code in my Route file</p>
<pre><code>Route::controller("/","HomeController");
Route... | 0 | 2,565 |
Webfonts or Locally loaded fonts? | <p>Ever since the troubles brought on by using <em>Cufon</em> I ventured away from using external font resources, but as of late, I have been looking for alternate methods of loading fonts to see if there's a better way; better methods have a way of just appearing out of the blue.</p>
<p>There are a lot of new methods... | 0 | 1,965 |
chat UDP client/server program | <p>Hi there I'm trying to create a client/server chat program.
i have three clients and one server, when a client sends some string to the server the server will send this string to the other clients.
I have created the part where the client sends data to the server but I don't know how to send received data from a cli... | 0 | 1,212 |
Android TableLayout With Different Column's Width In A Row | <p>I am trying to do my first complex GUI, but now i can't to solve this problem.</p>
<p><img src="https://i.stack.imgur.com/XpOGc.png" alt="enter image description here"></p>
<p>The first column of the first two rows only needs to contain the label, while the second column of the first two rows must occupy the remai... | 0 | 1,431 |
IBM MQ8.0 - AMQ9503 Channel negotiation failed | <p>I have problem connecting to IBM MQ8.0 from Java client when SSL enabled at client channel(SVRCONN). When SSL is disabled(SSLAUTH to OPTIONAL) at channel, the flow is working fine.</p>
<p>Client is java with JRE1.7. MQ server version is IBM MQ8.0</p>
<p>Created self-signed certificates and exchanged properly as pe... | 0 | 1,206 |
Bypassing the Spring security filter chain | <p>I created a custom Spring security filter chain and I want to exclude all url beginning with "/health".</p>
<p>here is my filter configuration:</p>
<pre><code>@Override
public void configure(WebSecurity web) throws Exception {
web
.ignoring()
.antMatchers("/health");
}
@Override
protec... | 0 | 1,718 |
How do I create an alpha blended panel? | <p>I'm trying to display a truly alpha blended TPanel in Delphi XE2. I've found quite a few attempts online, but none of them work correctly.</p>
<p>What I'm trying to achieve is a 'semi modal' form. A form that is displayed over the top of other controls with a faded background in a similar manner to that seen in web... | 0 | 2,930 |
Println needs a message | <p>i am trying the following application but when i run it, i get an exception "println needs a megssage" .can anyone help. following are the classes.</p>
<p><strong>Receiver class</strong></p>
<pre><code>package com.sms;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.conte... | 0 | 3,622 |
Random High CPU Usage | <p>I have noticed that Visual Studio Code randomly has a really high CPU usage. Generally, this seems to be related to the window where I have a SQL server project. Below is the output from <code>code --status</code> when this recently happened. Any insights into what might be going on here?</p>
<pre><code>code --s... | 0 | 1,832 |
google maps api multiple markers info window only showing last element | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/11106671/google-maps-api-multiple-markers-with-infowindows">Google Maps API Multiple Markers with Infowindows</a> </p>
</blockquote>
<p>I am creating a Google Maps for a school project. Being a JavaScript newb,... | 0 | 2,195 |
How to make div hide and show as like popup window? | <p>I am new to jQuery. I am trying to create a search box functionality in my project. I have created a div which contains names of cities, and I want it to be displayed on the click event of a button. I am able to hide and show that div using <code>slideToggle()</code> method of jQuery on the click event of a button.
... | 0 | 5,907 |
Tomcat 6 configuration inside Eclipse | <p>I am having trouble configuring my <code>Eclipse EE</code> to run Tomcat 6 (my company has not migrated to Tomcat 7 yet). I was trying to follow <a href="http://www.coreservlets.com/Apache-Tomcat-Tutorial/eclipse.html" rel="nofollow noreferrer">these instructions</a>. I went into the servers tab in the bottom pane... | 0 | 1,029 |
Deploy python app to Heroku "Slug Size too large" | <p>I'm trying to deploy a Streamlit app written in python to Heroku. My whole directory is 4.73 MB, where 4.68 MB is my ML model. My <code>requirements.txt</code> looks like this:</p>
<pre><code>absl-py==0.9.0
altair==4.0.1
astor==0.8.1
attrs==19.3.0
backcall==0.1.0
base58==2.0.0
bleach==3.1.3
blinker==1.4
boto3==1.12... | 0 | 1,328 |
Show Download progress inside activity using DownloadManager | <p>I'm trying to reproduce the same progress that DownloadManager shows in Notification bar inside my app, but my progress never is published. I'm trying to update it using runOnUiThread(), but for some reason it's not been updated.</p>
<p>my download:</p>
<pre><code>String urlDownload = "https://dl.dropbox.com/s/ex4... | 0 | 1,285 |
Pause/Resume a Simple Libgdx Game for android | <p>Presently I'm trying to implement simple game using libgdx for Android Platform. I have implemented the game but don't know how to pause and resume game based on user input.Kindly suggest idea as well as some practical code to implement the same.I am using simple game code demonstrated in libgdx library. Thank you.<... | 0 | 1,764 |
K8s Ingress rule for multiple paths in same backend service | <p>I am trying to setup ingress load balancer.
Basically, I have a single backend service with multiple paths.</p>
<p>Let's say my backend NodePort service name is hello-app. The pod associated with this service exposes multiple paths like /foo and /bar. Below is the example</p>
<p>NodePort service and associated deplo... | 0 | 1,101 |
XSLT Ignore duplicate elements | <p>I have just started to learn XSLT and am having trouble ignoring duplicated elements.</p>
<p>I have been searching through Stack Overflow and have seen people ask similar questions. I tried a small example to see where I was going wrong on my file, and was able to ignore duplicated elements. However the problem for... | 0 | 1,862 |
How to remove duplicate character from a string in java? | <p>In my program, the user enters a string, and it first finds the largest mode of characters in the string. Next, my program is supposed to remove all duplicates of a character in a string, (user input: aabc, program prints: abc) which I'm not entirely certain on how to do. I can get it to remove duplicates from some ... | 0 | 1,135 |
Multiple listviews in one layout android | <p>I want to populate two listviews in one activity. For that i placed two listviews in one layout. My problem is that both listviews are populated but only one listview is visible. Now when i make one layout INVISIBLE, it will display another listview.</p>
<p>Here i am posting my xml file. Is there any problem in my ... | 0 | 4,129 |
Testing for bitwise Enum values | <p>I haven't really used bitwise enums before, and I just want to make sure my testing is correct. I am most interested in testing for the values None and All. We receive data from a webservice that utilises this enum to categorise certain pieces of the data. Given that, I am assuming that nether None nor All would eve... | 0 | 1,093 |
How can I access the Kubernetes service through ClusterIP | <p>I am trying to create Kubernetes cluster using three VMs(Master – 10.x.x.4, Node1 – 10.x.x.150, Node2 – 10.x.x.160).</p>
<p>I was able to create the guestbook application successfully following this link: <a href="http://kubernetes.io/v1.0/examples/guestbook/" rel="noreferrer">http://kubernetes.io/v1.0/examples/g... | 0 | 1,182 |
systemd: start service at boot time after network is really up (for WoL purpose) | <p>I have a computer at work which I sometimes wakeup from home in order to access it but when boots and gets another IP address from our DHCP server, how can I access it?</p>
<p>The situation and my “workflow” is as follows:</p>
<ul>
<li>From my home PC I connect to the office's VPN</li>
<li>ssh to a dedicated serve... | 0 | 1,199 |
SwiftUI call function on variable change | <p>I am trying to convert a view of my watchOS App to Swift UI.
I wanted to port the volume control that can be found in watchKit to SwiftUI with custom controls. In the image below you can see the current state of the view. </p>
<p>The volume control changes the progress of the ring according to current state <code>... | 0 | 1,310 |
Apache2 is not working | <p><strong>I use Linux Mint. When I try to restart apache displays next message.</strong> Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. Here the next error tex that displays systemctl status `apache2.service </... | 0 | 3,949 |
Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource' .factory.NoSuchBeanDefinitionException: | <p>This is the bean with this id defined in my spring-servlet.xml file</p>
<pre><code><bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
p:driverClassName="${jdbc.driverClassName}"
p:url="${jdbc.databaseurl}" p:username="${jdbc.username}"
p:p... | 0 | 2,902 |
Python subprocess.Popen erroring with OSError: [Errno 12] Cannot allocate memory after period of time | <p><strong>Note</strong>: This question has been re-asked with a summary of all debugging attempts <a href="https://stackoverflow.com/questions/1367373/python-subprocess-popen-oserror-errno-12-cannot-allocate-memory">here</a>.</p>
<hr>
<p>I have a Python script that is running as a background process executing every ... | 0 | 1,629 |
MATLAB: Plotting/Saving X-Y views of mesh function in subplots | <p>As the title says, I'm trying to save the 2-variable slices of a mesh function (as a .jpg, for example) as a subplot. I want to do this using a .m file because I have many plots to generate. I have figured out how to plot the views on their own figures, but I cannot get them to plot properly as subplots within a fig... | 0 | 1,387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.