title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Configuring Log4j2 in web application using log4j-web.jar | <p>I am trying to configure log4j2 in my webapplication by following some tutorials. I am working with glassfish 4.1.1 server and servlet version 3.1. I am able to configure the logging feature with the below configuration:</p>
<p>log4j.properties</p>
<pre><code> # Root logger option
log4j.rootLogger=INFO, c... | 0 | 2,632 |
mlogit.data() Error: Assigned data `ids` must be compatible with existing data | <p>I have been working hours on that and I simply cannot find any solution to the problem. Hopefully someone here can help.</p>
<p>I'm trying to create a personal choice matrix for some data with the following structure:</p>
<pre><code># A tibble: 2,152 x 32
age choice canton lr_s dist_svp dist_fdp dist_bdp dis... | 0 | 1,223 |
How to direct different users to different pages after login? | <p>I created a database (following an online tutorial) which directs all users to one login page. I was wondering how can I direct different users to different webpages. For example I want to direct JOHN SMITH (user1) to localhost/pages/johnsmith.html and JANE SMITH (user 2) to localhost/pages/janesmith.html.</p>
<p>C... | 0 | 2,017 |
How to make a dropdown sub-menu expand to the right in Bootstrap 3 | <p>I am using this code and CSS below. As you can see, the dropdown sub-menu expands to the left, which is when I hover my cursor over "More Options". I have changed every "left" keyword on my CSS but it just won't go to the right. How do I expand the dropdown sub-menu to the right, which means if I hover over "More Op... | 0 | 1,396 |
python/pip error on osx | <p>I've recently purchased a new hard drive and installed a clean copy of OS X Mavericks. I installed python using homebrew and i need to create a python virtual environment. But when ever i try to run any command using pip, I get this error. I haven't been able to find a solution online for this problem. Any reference... | 0 | 1,814 |
Sending array of string as a parameter to web service method using JAXRPC | <p>I've got problem sending an array of string as parameter to a web service method, given in a specific wsdl. When am trying to send an array of strings, I get the following error.</p>
<h2>Error:</h2>
<pre><code>AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
fault... | 0 | 2,585 |
Weblogic 12c - Connection was forcibly closed by the remote host | <p>can someone please help me resolve the following exception,</p>
<pre><code><Feb 10, 2015 11:43:47 AM CST> <Error> <HTTP> <BEA-101019> <[ServletContext@1297842065[app:_auto_generated_ear_ module:dmportal path:null spec-version:3.0]] Servlet failed with an IOException.
java.io.IOException:... | 0 | 1,202 |
How to create dynamic routes with react-router-dom? | <p>I learn react and know, how to create static routes, but can't figure out with dynamic ones. Maybe someone can explain, I'll be very grateful. Let there be two components, one for rendering routes, and another as a template of a route. Maybe something wrong in the code, but hope You understand..</p>
<p>Here is the ... | 0 | 1,068 |
What is the fastest way to get the value of π? | <p>I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically, I'm using ways that don't involve using <code>#define</code> constants like <code>M_PI</code>, or hard-coding the number in.</p>
<p>The program below tests the various ways I know of. The inline assembly version is... | 0 | 1,623 |
Set CultureInfo in Asp.net Core to have a . as CurrencyDecimalSeparator instead of , | <p>I'm going mad. I just want the culture used in the entire Asp.net core application to be set to "en-US". But nothing seems to work. Where to I set the culture for the entire application? I'm not interested in client browser cultures and what not. The only thing that seems to change it is changing the language settin... | 0 | 1,576 |
macOS 10.12 brew install openssl issue | <p>Trying to install openssl on homebrew using:</p>
<pre><code>brew install openssl
</code></pre>
<p>Is giving the following error during make:</p>
<pre><code>clang -I. -Iinclude -fPIC -arch x86_64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -... | 0 | 1,053 |
Why do I get Gson builder error when starting a Spring Boot application? | <p>I have downloaded eclipse and installed the spring suit into it.
I have written a JPA based Rest application by following one of the spring.io guides. When I try to run it as spring boot application.
I get the following error.</p>
<pre><code>java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()Lcom/... | 0 | 7,665 |
Exception encountered during context initialization - Incompatible library? | <p>I follow <a href="http://websystique.com/springmvc/spring-4-mvc-and-hibernate4-integration-example-using-annotations/" rel="nofollow">this tutorial</a> but after all I get an error, and I don't understand why!!!</p>
<p>This is my pom.xml</p>
<pre><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xs... | 0 | 7,589 |
MongooseError: Cast to embedded failed for value | <p>I'm creating a mongoose Schema but I'm getting a <code>MongooseError</code>.</p>
<p>This is my Scheme:</p>
<pre><code>let RestaurantSchema = new Schema({
ratings: {
type: [{
id: Number,
value: Number,
_id: false
}],
default: [
{ id: 1, val... | 0 | 1,489 |
<input> tag validation for URL | <p>I am trying to validate an URL using JavaScript, but for some reason it's not working. When someone has not entered any URL, it shows message like:</p>
<blockquote>
<p>Please enter valid URL.(i.e. http://)</p>
</blockquote>
<p>I am trying to fix it, but can't make it working.</p>
<p>Is there any trick in HTML5 ... | 0 | 1,433 |
MySQL Error - Commands out of sync; you can't run this command now | <p>I am using MySQL with PHP, Codeigniter. I had a question which was answered by bluefeet in the post <a href="https://stackoverflow.com/questions/16012098/mysql-show-data-in-pivot-view/16013046#16013046">here</a></p>
<p>I created a stored procedure for the second solution by bluefeet. It works perfect, however, whil... | 0 | 1,276 |
Append Data in existing Excel file using apache poi in java | <p>I am trying to append data in existing excel file .But when i write on it it delete my previous data </p>
<p>File excelRead</p>
<pre><code>package Excel;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.use... | 0 | 2,410 |
NullPointerException On Android.os.Bundle | <p>I have some problem with my code, when I need to transfer some data from one <code>Activity</code> to another one.
First <code>Activity</code> (<code>ViewCashflow</code>) and I want transfer some data from <code>ViewCashflow</code> to second <code>Activity</code> (<code>NewTransaction</code>). Here its working well... | 0 | 11,452 |
How can i change the width/padding of a Flutter DropdownMenuItem in a DropdownButton? | <p>How can we change the width/padding of a Flutter DropdownMenuItem in a Dropdown?</p>
<pre><code>Row(
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
LightText(
text: "Agent",
),
... | 0 | 1,383 |
Disable security for unit tests with spring boot | <p>I'm trying to create a simple spring boot web project with security. I can launch the application fine and the security is working fine. However, I have some components that I want to test without security (or test at all -- I cant get the test working at all).</p>
<p>I get an exception indicating that it can't f... | 0 | 4,055 |
Call to undefined function App\Http\Controllers\categories() in Laravel | <p>Please I need help, I am working on a project in Laravel, I encounter a problem when T tried to use a pivot table in manay-to-many </p>
<p>In my <code>category model</code> <code>Category.php</code>, I have the function below</p>
<pre><code>public function users()
{
return $this->belongsToMany(user::class);... | 0 | 1,210 |
FFT on image with Python | <p>I have a problem with FFT implementation in Python. I have completely strange results.
Ok so, I want to open image, get value of every pixel in RGB, then I need to use fft on it, and convert to image again.</p>
<p>My steps:</p>
<p>1) I'm opening image with PIL library in Python like this</p>
<pre><code>from PIL ... | 0 | 1,275 |
Button position in android | <p>I'm trying to make some "Chat view" with speech bubbles like on the SMS iPhone app.
This is a row I have done in the xml editor :</p>
<p><a href="http://img44.imageshack.us/i/xml.png/" rel="nofollow noreferrer">http://img44.imageshack.us/i/xml.png/</a></p>
<p>But when I launch my application, I get this :<... | 0 | 2,017 |
How to create a dynamic report thorough jrxml? | <p>I am working on <em>jrxml</em> to create dynamic reports. I have parameterized the columns i.e. the <em>jrxml</em> for that report can be used to generate other reports as well. </p>
<p>However, I have not managed to make the fields flexible. That is, if the user selects 4 columns it would work but if 1 or 2 or 3 c... | 0 | 3,249 |
Spring + Hibernate : a different object with the same identifier value was already associated with the session | <p>In my application, which uses Spring and Hibernate, I parse a CSV file and populate the db by calling <code>handleRow()</code> every time a record is read from the CSV file.</p>
<p>My domain model:</p>
<blockquote>
<p>'Family' has many 'SubFamily'</p>
<p>'SubFamily' has many 'Locus' </p>
<p>a 'Locus' b... | 0 | 2,554 |
Error when installing an R package from github: Could not find build tools necessary to build data.table | <p>From within RStudio I'm trying to install the data.table package from github following <a href="https://stackoverflow.com/a/9656182/4945268">these instructions</a>, and the package seems to download without a problem:</p>
<pre><code>> library(devtools)
> dev_mode(on=T)
Dev mode: ON
d> install_github("Rdata... | 0 | 1,166 |
How to use react-bootstrap in typescript project | <p>I am trying to make a nav bar using react-bootstrap I have installed the node-module which is <code>"@types/react-bootstrap": "^0.32.11",</code> and I want to use in my hello.tsx component but it shows compile error Module not found: Error: Can't resolve 'react-bootstrap' in:\Query Express\Portal\src\components' I d... | 0 | 1,387 |
How to Get JSON Array Within JSON Object? | <p>This is my JSON: </p>
<pre><code>{
"data": [
{
"id": 1,
"Name": "Choc Cake",
"Image": "1.jpg",
"Category": "Meal",
"Method": "",
"Ingredients": [
{
"name": "1 Cup Ice"
},
... | 0 | 1,092 |
Will larger batch size make computation time less in machine learning? | <p>I am trying to tune the hyper parameter i.e <strong>batch size</strong> in CNN.I have a computer of corei7,RAM 12GB and i am training a CNN network with CIFAR-10 dataset which can be found in this <a href="http://torch.ch/blog/2015/07/30/cifar.html" rel="nofollow noreferrer">blog</a>.<br><br><em>Now At first what i ... | 0 | 1,267 |
Jersey Tutorials from Basics | <p>I am using Jersey 1.8 and the tutorials that I am referring are quiet old. Nothing works. I am referring to the tutorial given <a href="http://www.vogella.de/articles/REST/article.html" rel="nofollow">here</a> </p>
<p>And get a class not found exception. as per the tutorial I made my Java Class as well as configure... | 0 | 2,339 |
ASP.NET Charting Control - Dynamically Adding and Removing Series of Datapoints | <p>If you're familiar with ASP.NET's Charting controls, the Chart object contains a number of Series objects - which are series of datapoints that can be charted. Each series can be visualized in a different way (bar or point or line) on the same chart.</p>
<p>I have a custom control that I use to create and remove an... | 0 | 1,114 |
Do I have to bind a UDP socket in my client program to receive data? (I always get WSAEINVAL) | <p>I am creating a UDP socket (<code>AF_INET</code>, <code>SOCK_DGRAM</code>, <code>IPPROTO_UDP</code>) via Winsock and trying to <code>recvfrom</code> on this socket, but it always returns -1 and I get WSAEINVAL (10022). Why?</p>
<p>When I <code>bind()</code> the port, that does not happen, but I have read that it is... | 0 | 1,456 |
ICommand in MVVM WPF | <p>I'm having a look at this MVVM stuff and I'm facing a problem.</p>
<p>The situation is pretty simple.</p>
<p>I have the following code in my index.xaml page</p>
<pre><code> <Grid>
<ItemsControl ItemsSource="{Binding}">
<ItemsControl.ItemTemplate>
<DataTemplate>
... | 0 | 1,142 |
Inline-block display of divs with position relative | <p>I have a series of images each with his own overlay. How can I have them aligned like inline-blocks? I tried adding adding <code>display: inline-block;</code>to <code>.image-wrapper</code> but the images are always all positioned in the top left corner of the <code>div.container</code> (Here is a <a href="http://jsf... | 0 | 1,426 |
Can't login to my custom login page in spring boot security | <p>My problem is: when I try to login on my custom login page it redirects me to login page again (it doesn't matter if I put right or wrong credentials). It's also weird that I don't reach my custom UserDetailService in debug, I think it means that spring doesn't even check user's credentials.</p>
<p>I have custom lo... | 0 | 1,278 |
Props in functional component are missing in props validation | <p>Eslint throwing eslint(react/prop-types) error despite already declared propTypes. I'm using <a href="https://github.com/Intellicode/eslint-plugin-react" rel="nofollow noreferrer">eslint-plugin-react</a></p>
<p>I've looked at a couple of other similar problems and as well as the <a href="https://github.com/Intellic... | 0 | 2,784 |
Apache docker container - Invalid command 'RewriteEngine' | <p>I use docker compose. However, when I run "docker-compose up", I came across an error : /var/www/html/.htaccess: Invalid command 'RewriteEngine'.</p>
<p>Can you tell me where I fails ??</p>
<p>Project architecture :</p>
<pre><code>project-name /
/ docker-compose.yml
/ Dockerfile
... | 0 | 1,033 |
how to make a textview invisible | <p>this is my first android app so plese bear with me, and also, if you suggest a answer, alternative method of completeing a task, please specify how and also in detail...</p>
<p>Here is my problem, after doing some research, and trying it out, my app FC when I have the following line (specified by *)</p>
<pre><code... | 0 | 2,873 |
Response already commited - java.lang.IllegalStateException: UT010019 | <p>I am working on a web application with jsp and servlets. </p>
<p>My Servlet name is <code>ServletBulkCrdProm</code> and I redirect to jsp page in the method <code>doBulkCrdSelect()</code> which is called by Servlet's <code>doPost()</code> method.</p>
<p>In my servlet, I forward the request to a jsp page like this.... | 0 | 1,200 |
Fatal error: Call to undefined function finfo_open() in php | <p>I am new to php, i have created code for upload images to sql database and retrieve the image using php.</p>
<p>Here is my code:</p>
<pre><code><html>
<head><title>File Insert</title></head>
<body>
<h3>Please Choose a File and click Submit</h3>
<form enctype="mul... | 0 | 2,176 |
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener when using MyFaces with WASCE/Geronimo | <p>I am trying to create a simple JSF web application using MyFaces v 2.1 with WebSphere Application Server Community Edition v3.0.0.1 and Eclipse Juno but when I try to run the application the following error is returned</p>
<pre><code> java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
org.a... | 0 | 2,152 |
Why is processing a sorted array faster than processing an unsorted array? | <p>Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data (<em>before</em> the timed region) miraculously makes the loop almost six times faster.</p>
<pre class="lang-cpp prettyprint-override"><code>#include <algorithm>
#include <ctime>
#include <ios... | 0 | 1,360 |
Can't resolve symbol android.support.v4.util.Pools in react-native-gesture-handler | <p>I am working on react-native project.</p>
<p>After I update my modules by running 'npm install',</p>
<p>I cannot find class 'Pools' which located in 'android.support.v4.util' in 'react-native-gesture-handler'.</p>
<ol>
<li>Why Is this error occur?</li>
<li>How can I fix this?</li>
</ol>
<p>1.error (In case run "... | 0 | 3,610 |
ASP.NET VB Page_Load Only Once or Alternative | <p>I'm a little stuck on what to do! I have a special form that allows my customers to request a quote for a specific product (defined by PID in url) The form is loaded inside a modal dialogue and within that a Iframe. The Iframe's src value is set from the onclick event of ahref on the product pages eg;</p>
<pre><cod... | 0 | 11,587 |
Uncaught exception in promise when when trying to use nested components | <p>I am getting this exception when trying to use nested components:</p>
<pre><code>EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot set property 'endSourceSpan' of null
XCEPTION: Error: Uncaught (in promise): TypeError: Cannot set property 'endSourceSpan' of nullBrowserDomAdapter.logError @ angular2.dev.js:... | 0 | 3,010 |
MVC4: On validation error, change the textbox color to red | <p>I have a form which has some text boxes, and when the textbox doesn't contain valid value I get the error message but the textbox color doesn't change to red.</p>
<p>This is what I have</p>
<p><strong>Model</strong></p>
<pre><code>public class AddCompany
{
public int Id { get; set; }
[Required(ErrorMessa... | 0 | 1,512 |
OpenGL Rendering in a secondary thread | <p>I'm writing a 3D model viewer application as a hobby project, and also as a test platform to try out different rendering techniques. I'm using SDL to handle window management and events, and OpenGL for the 3D rendering. The first iteration of my program was single-threaded, and ran well enough. However, I noticed t... | 0 | 1,148 |
RecyclerView inside CoordinatorLayout,AppBarLayout Scrolling issue | <p>I have this xml code in fragment:</p>
<pre><code><CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="mat... | 0 | 1,275 |
How do I link glibc's implementation of iconv? | <p>The GNU C library provides an implementation of iconv - how do I use it?</p>
<p>Simple program:</p>
<pre><code>#include <iconv.h>
int main( int argc, char **argv ) {
iconv_t cd = iconv_open( "UTF-8", "ISO-8859-1" );
iconv_close( cd );
return 0;
}
</code></pre>
<p>Compile and link:</... | 0 | 2,835 |
How to use or annotate a dummy field in a JPA entity bean which is not supposed to be persisted in database | <p>I have this code for login validation using a Struts2 action class which calls an EJB for LDAP validation and then if (LDAP credentials) validated, querying the user database to get the rest of the user information using the JPA entity bean which also acts like a POJO. Unlike the username, userid and other user info... | 0 | 1,420 |
Critical dependency: the request of a dependency is an expression -- react-universal-component | <p><strong>Warning:</strong></p>
<pre><code>[HMR] bundle has 2 warnings
client.js:189 ./node_modules/babel-plugin-universal-import/universalImport.js 33:18-37
Critical dependency: the request of a dependency is an expression
@ ./src/routes/index.js
@ ./src/app-root.js
@ multi babel-runtime/regenerator webpack-hot-mi... | 0 | 3,055 |
Jersey REST The ResourceConfig instance does not contain any root resource classes | <p>Although this is one ancient question, I still can not find the answer to make this work.
Please correct if you find any of my statement is not correct.</p>
<p>I have a Java Face app and use REST for the Web Services. I don't think Face has anything to do with my problem at all.
The web.xml is:</p>
<pre><code><... | 0 | 1,523 |
How to fillstyle with Images in canvas html5 | <p>I am using this spin wheel </p>
<p><a href="http://tpstatic.com/_sotc/sites/default/files/1010/source/roulettewheel.html" rel="nofollow noreferrer">http://tpstatic.com/_sotc/sites/default/files/1010/source/roulettewheel.html</a></p>
<p>I want to change the background color to background images. I don't have a clue... | 0 | 1,694 |
FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE | <p>I'm making an app which can write to firebase database on button click.
The app is working on emulator but it's not working on my physical device.
The app was working fine last week but today started giving error.
Here's the main activity code:</p>
<pre><code>public class MainActivity extends AppCompatActivity {
... | 0 | 1,657 |
How can I build my C extensions with MinGW-w64 in Python? | <p>So I have a few Python C extensions I have previously built for and used in 32 bit Python running in Win7. I have now however switched to 64 bit Python, and I am having issues building the C extension with MinGW-w64.</p>
<p>I made the changes to distutils as per <a href="http://bugs.python.org/issue11723">this post... | 0 | 1,301 |
Modules are installed using pip on OSX but not found when importing | <p>I successfully install different modules using pip and they are shown in the </p>
<pre><code>pip list
</code></pre>
<p>such as:</p>
<pre><code>beautifulsoup4 (4.4.1)
requests (2.10.0)
Scrapy (1.1.0)
</code></pre>
<h3>From Terminal</h3>
<p>However, whenever I try to import it</p>
<p><code>import beautifulsoup4<... | 0 | 1,189 |
reading a .bmp file in c++ | <p>I'm trying to load a bmp file for reusing it in opengl.
I've found some code via google on how to load a bmp file.
I took this code and put in a class Bitmap in my project.
The class is far away from being finished but already the reading of the file headers goes wrong. After reading the bytes for INFOHEADER and FIL... | 0 | 1,337 |
LernaJS Typescript cannot find module | <p>I'm trying to use LernaJS with typescript and I have some problems. When I try to run my package-1 which has package-2 as dependency I get the error:</p>
<pre>
module.js:549
throw err;
^
Error: Cannot find module 'package-2'
at Function.Module._resolveFilename (module.js:547:15)
... | 0 | 1,307 |
Why do my Twitter Bootstrap form fields overflow their well using fluid container? | <p>UPDATE: Demo of problem here: <a href="http://jsfiddle.net/fdB5Q/embedded/result/" rel="nofollow noreferrer">http://jsfiddle.net/fdB5Q/embedded/result/</a></p>
<p>From about 767px to 998px, the form fields are wider than the containing well.</p>
<p>Smaller than 767px and the entire form area shifts to a new line. ... | 0 | 1,048 |
How to set Container height fit to screen | <p><strong>Note</strong>: <em>This widget is child of another Column</em></p>
<p><br>
I need to use ListView.builder inside Column but to use it inside Column i need to wrap it with Container not only that i need to set the height,<br>here i used MediaQuery.of(context).size.height and it works,<Br> but with one iss... | 0 | 2,369 |
installing mongodb in a docker container | <p>I am trying to create a docker image for mongodb. I am followed the installation instructions from the official mongodb installation to the letter without success. I have tried every single blog and installation instruction out there but without any success. Any help will be greatly appreciated. </p>
<p>My dockerfi... | 0 | 3,069 |
Excel VBA: Move items from one array to another array | <p>I'm trying to speed up an application that is designed to assign human resources to locations, using listboxes that are bound to ranges. That works quite well - the ugly part is moving items from one data range to one or more ranges using find, copy & paste.</p>
<p>I could gain great speed by using a function t... | 0 | 2,141 |
How to solve java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0? | <p>I've been spending the last hours trying to solve the stack trace below. With major research on here SO and also through Google, I understand the exception can mean several things:</p>
<ul>
<li><p>the program can't find the requested images with the provided path;</p></li>
<li><p>the images are being rendered <stro... | 0 | 1,117 |
Can't install jdk on Fedora with yum nor with rpm | <p>Help! I can't figure out how to install a jdk!</p>
<pre><code>[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk"
Loaded plugins:... | 0 | 1,839 |
javax.net.ssl.SSLPeerUnverifiedException: No peer certificate while trying to connect using https with .bks keystore | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/5594189/javax-net-ssl-sslexception-not-trusted-server-certificate">javax.net.ssl.SSLException: Not trusted server certificate</a> </p>
</blockquote>
<p>I am trying to connect to server using "https" scheme with... | 0 | 2,111 |
How to implement real time data for a web page | <p>(This is intended as a Q/A style question, intended to be a go-to resource for people that ask similar questions. A lot of people seem to stumble on the best way of doing this because they don't know all the options. Many of the answers will be ASP.NET specific, but AJAX and other techniques do have equivalents in o... | 0 | 2,797 |
How to get child view from RecyclerView? | <p>I am trying to get child view by position. I could get view when one item is clicked: </p>
<pre><code>rvSellRecords.addOnItemTouchListener(new RecyclerItemClickListener(getActivity(), new RecyclerItemClickListener.OnItemClickListener() {
@Override
public void onItemClick(View view, int position) ... | 0 | 1,331 |
What are the common causes for high CPU usage? | <p><strong>Background:</strong></p>
<p>In my application written in C++, I have created 3 threads:</p>
<ul>
<li>AnalysisThread (or Producer) : it reads an input file, parses it, and generates patterns, and enqueue them into <code>std::queue</code><sup>1</sup>.</li>
<li>PatternIdRequestThread (or Consumer) : it deque ... | 0 | 1,094 |
How to deal with "[Errno 122] Disk quota exceeded" problem when creating new environment by anaconda? | <p>I am trying to create a new environment for Python through Anaconda. But the error keeps coming out saying :</p>
<pre><code>Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<... | 0 | 2,087 |
Modal dialog with fixed header and footer and scrollable content | <p>I'm trying to create a modal dialog that has an fixed header and footer and that the content (in this case list of users) inside the modal dialog is scrollable...</p>
<p>My best attempt so far gave me the result on the image:</p>
<p><a href="https://i.stack.imgur.com/cJzqe.jpg" rel="noreferrer"><img src="https://i... | 0 | 1,378 |
C# - Cannot create an instance of the abstract class or interface | <p>I am getting the error <code>Cannot create an instance of the abstract class or interface</code> in a C# tutorial.</p>
<p>It is failing on this line: <code>result = new Account(nameText, addressText, balance);</code></p>
<p>Here is my class:</p>
<pre><code>public abstract class Account : IAccount
{
//--------... | 0 | 1,100 |
Easy interview question got harder: given numbers 1..100, find the missing number(s) given exactly k are missing | <p>I had an interesting job interview experience a while back. The question started really easy:</p>
<blockquote>
<p><strong>Q1</strong>: We have a bag containing numbers <code>1</code>, <code>2</code>, <code>3</code>, …, <code>100</code>. Each number appears exactly once, so there are 100 numbers. Now one number is ra... | 0 | 1,222 |
Didn't find class "android.support.v7.widget.RecyclerView | <p>I'm getting this exception when running: </p>
<p>android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v7.widget.RecyclerView<br>
<strong>Caused by: java.lang.ClassNotFoundException:
Didn't find class "android.support.v7.widget.RecyclerView" on path: /data/app/my.package.... | 0 | 2,792 |
Cannot build react-native project from Android-Studio | <p>I can run my react-native project. It works fine. I have tested by running using react-native. But when I'm trying to run it with Android studio I get the following error.</p>
<pre><code>*FAILURE: Build failed with an exception.
* Where:
Script 'D:\EmployeeApp\EmployeeMobileAppGit\employeemobile-app\node_modules\@r... | 0 | 3,864 |
org.hibernate.exception.ConstraintViolationException: could not insert | <p>When I try to add into <code>TDEPOFAZLA</code> table, I get the following error: </p>
<blockquote>
<p>org.springframework.dao.DataIntegrityViolationException: could not insert: [tr.gov.tcmb.pgmtems.model.DepoFazla]; SQL [insert into PGMTEMS.TDEPOFAZLA (ID, FAZLABULUNDURMAORANI, GRUP) values (default, ?, ?)]; cons... | 0 | 1,755 |
mySQL MATCH across multiple tables | <p>I have a set of 4 tables that I want to search across. Each has a full text index. Can a query make use of every index?</p>
<pre><code>CREATE TABLE `categories` (
`id` int(5) unsigned NOT NULL auto_increment,
`display_order` int(5) unsigned default NULL,
`name` varchar(64) default NULL,
`last_modified` time... | 0 | 2,393 |
log4j2 config file is not being recognized | <p>I'm trying to get log4j2 setup in my Geb framework. For the life of me I can't figure out how to put this together. I have a log4j2.xml (not log4j.xml) file setup with the logger "Selenium". In DefaultPage I try to get the Logger with the name Selenium from the config file <code>LogManager.getLogger("Selenium")</... | 0 | 1,031 |
Django forms: how to dynamically create ModelChoiceField labels | <p>I would like to create dynamic labels for a forms.ModelChoiceField and I'm wondering how to do that. I have the following form class:</p>
<pre><code>class ProfileForm(forms.ModelForm):
def __init__(self, data=None, ..., language_code='en', family_name_label='Family name', horoscope_label='Horoscope type', *arg... | 0 | 1,304 |
Using AsyncTask to load images into a custom adapter | <p>Although there are many tutorials out there, I've found it really difficult to implement an AsyncTask to load images from URI's (obtained from a content provider) into a custom adapter.</p>
<p>I get the basic gist, which is to have a class containing an AsyncTask, do the bitmap creation in the 'doInBackground', and... | 0 | 1,431 |
Calculating angles between line segments (Python) with math.atan2 | <p>I am working on a spatial analysis problem and part of this workflow is to calculate the angle between connected line segments.</p>
<p>Each line segment is composed of only two points, and each point has a pair of XY coordinates (Cartesian). Here is the image from GeoGebra. <strong>I am always interested in getting... | 0 | 1,663 |
Hook ZwTerminateProcess in x64 Driver (Without SSDT) | <p>I found and read this question but I didn't found my answer <a href="https://stackoverflow.com/questions/11597888/ssdt-hooking-alternative-in-x64-systems"><strong>SSDT hooking alternative in x64 systems</strong></a></p>
<p>I want to protect my application against termination by other programs. In the 32Bit version o... | 0 | 1,222 |
AngularJS: lazy loading controllers and content | <p>In this simplified scenario, I have two files: index.htm, lazy.htm.</p>
<p>index.htm:</p>
<pre><code>var myApp = angular.module('myApp', []);
myApp.controller('embed',function($scope){
$scope.embed = 'Embedded Controller';
});
<div ng-controller="embed">{{embed}}</div>
<div... | 0 | 1,032 |
Unknown Entity namespace alias in symfony2 | <p>Hey I have two bundles in my symfony2 project. one is Bundle and the other one is PatentBundle. </p>
<p>My app/config/route.yml file is </p>
<pre><code>MunichInnovationGroupPatentBundle:
resource: "@MunichInnovationGroupPatentBundle/Controller/"
type: annotation
prefix: /
defaults: { _controller: "MunichInn... | 0 | 2,445 |
PHP: Illegal string-offset | <p>My <a href="http://www.github.com/audith/Persephone" rel="nofollow">open-source project</a> was working just fine, until I started to work on it after 6 month of break. Updated to latest XAMPP, and start getting tons of weird errors, one of which is as:</p>
<p>I have Input class, with a caller method as:</p>
<pre>... | 0 | 1,238 |
How to copy a file in C/C++ with libssh and SFTP | <p>I want to copy a file from a client to a remote server, but I don't understand how to do it with the libssh library SFTP API.</p>
<p>The situation is that: The SSH session is open and the SFTP session is open too, I can create a file and write in it from the client to the server with the integrated function of libs... | 0 | 1,089 |
Setting Icon for PyInstaller Application | <p>I have been all over Google, Reddit, StackOverflow, PyInstaller docs, I can't figure this out.</p>
<p>I'm trying to set my icon for my application, but it will not work. The icon is applied to the main exe, however, the icon does not show in the taskbar when it is open for Windows.</p>
<p>The icon is being include... | 0 | 1,162 |
RPM build errors:Bad exit status from /var/tmp/rpm-tmp.32XJLX (%install) | <p>Im trying to create a simple rpm package on centos 6.5.. But i cannot finish it as its giving me errors.. I have already followed these two threads.. <a href="https://stackoverflow.com/questions/21595748/bad-exit-status-from-var-tmp-rpm-tmp-b1dgat-build">Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)</a> and ... | 0 | 1,724 |
Correct way for parsing JSON objects containing arrays in Java Servlets (with Gson for example) | <p>I know this is a topic much talked about, but I still wasn't able to find a correct and clear answer to my specific problem.</p>
<p>I've got a JSON that looks like this:</p>
<pre><code>var myData = { "gameID" : gameID,
"nrOfPlayers" : 2,
"playerUIDs" : [123, 124]
};
</c... | 0 | 1,221 |
warning:Multiple versions of scala libraries detected? | <p>My project is maven+intellij.
And I develop in windows system.
firstly I use the lastest scala libray version 2.12.2.For getting the class SQLContext and so on,I have to import spark jar:
<a href="https://i.stack.imgur.com/bn0hG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bn0hG.png" alt="enter image de... | 0 | 5,988 |
Why I am getting "Not Implemented Error: Database objects do not implement truth value testing or bool()." while running makemigration cmd in django | <p>I am trying to connect Django with MongoDB using Djongo. I have changed the Database parameter but I am getting this error <em>Not Implemented Error: Database objects do not implement truth value testing or bool().</em> when I am running makemigration command.</p>
<p>Please can anybody explain why I am getting this ... | 0 | 2,337 |
How to make GET requests to other Feign clients inside of a POST request? | <p>I have a REST API endpoint that makes use of several Feign clients to perform validation and processing. The endpoint in question accepts a POST request, but the Feign clients used for validation accept GET requests. When I make a POST request to my API endpoint I get the error below from the Feign clients that requ... | 0 | 4,565 |
How to create and update a file in a Github repository with PHP and Github API? | <p>I am trying to build PHP functions to create and update files within a Github repository, using PHP through the Github API. </p>
<p><em>The PHP files are being run from a standard shared hosting account. Therefore using frameworks that depend on installing Composer or other libraries is not an option for me. So for... | 0 | 1,264 |
Parsing nested XML with ElementTree | <p>I have the following XML format, and I want to pull out the values for name, region, and status using python's xml.etree.ElementTree module.</p>
<p>However, my attempt to get this information has been unsuccessful so far.</p>
<pre><code><feed>
<entry>
<id>uuid:asdfadsfasdf123123</i... | 0 | 1,062 |
NotificationChannel issue in Android O | <p>I am getting a toast saying "Developer warning for package com.google.android.apps.messaging" when sending an MMS using Android Messages ver 2.3.063.</p>
<p>In logs</p>
<pre><code>08-12 16:57:52.368 7661 7682 W Notification: Use of stream types is deprecated for operations other than volume control
08-12 16:57:5... | 0 | 1,055 |
Struts2: How to pass a values from one action to another action. Or from one JSP to another JSP. Without using session | <p>Hi I am building a project using Struts2. However during the development I am facing many issues. The biggest issue is Session management in Struts2. There is very limited information related to this.</p>
<p>I have hunt for the solution to my problem but got only limited information that does not satisfy my needs.<... | 0 | 2,390 |
PHP Sort Array By SubArray Value | <p>I have the following array structure:</p>
<pre><code>Array
(
[0] => Array
(
[configuration_id] => 10
[id] => 1
[optionNumber] => 3
[optionActive] => 1
[lastUpdated] ... | 0 | 1,379 |
tarfile compressionerror bz2 module is not available | <p>I'm trying to install twisted
pip install <a href="https://pypi.python.org/packages/18/85/eb7af503356e933061bf1220033c3a85bad0dbc5035dfd9a97f1e900dfcb/Twisted-16.2.0.tar.bz2#md5=8b35a88d5f1a4bfd762a008968fddabf" rel="nofollow">https://pypi.python.org/packages/18/85/eb7af503356e933061bf1220033c3a85bad0dbc5035dfd... | 0 | 1,579 |
Howto publish private projects to Sinopia (npm adduser for private registry fails) | <p>Ok so I finally managed to get a private npm registry using Sinopia. <strong>But I cannot publish anything to it.</strong></p>
<blockquote>
<p>TL;DR: Sinopia does not support <em>npm adduser</em>, but has its own user
management. Also npm needs a valid user created before <em>npm publish</em>
through <em>npm ... | 0 | 1,088 |
Best way solving optimization with multiple variables in Matlab? | <p>I am trying to compute numerically the solutions for a system of many equations and variables (100+). I tried so far three things: </p>
<ol>
<li>I now that the vector of p(i) (which contains most of the endogenous variables) is decreasing. Thus I gave simply some starting points, and then was increasing(decreasing)... | 0 | 1,373 |
maven-resources-plugin error using copy-resources goal: 'resources', 'outputDirectory' missing or invalid | <p>I'm trying to use the maven-resources-plugin to do some filtering using the copy-resources goal, and ran into the following error: </p>
<pre><code>Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:copy-resources (default-cli) on project bar: The parameters 'resources', 'outputDirectory' for... | 0 | 1,181 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.