title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Using Spring, mapping to root in web.xml, static resources aren't found
<p>What I'm trying to do is map requests to the servlet root (correct terminology?). I'm at the point where URLs are mapped to correct view but all the static content - css, javascript, images - that is part of the page cannot be found.</p> <p>So in my web.xml my servlet tag looks like this</p> <pre><code>&lt;servle...
0
1,143
C# System.NullReferenceException {"Object reference not set to an instance of an object."}
<p>I cannot figure out why I am getting this error. I am setting an instance to the object I am trying to create. Any help would be really appreciated. I will post my form code and then the class code below that. The application runs fine, it just gives me that null reference error when I click on <code>btnAdd</code>...
0
1,306
Centos 7 phpmyadmin 403 Forbidden
<p>I get an permission error when i try to run localhost/phpmyadmin on Centos 7:</p> <pre><code>Forbidden You don't have permission to access /phpmyadmin on this server. </code></pre> <p>I have searched and did everything.</p> <p>my /etc/httpd/conf.d/phpmyadmin.conf file is:</p> <pre><code>&lt;Directory "/usr/shar...
0
1,260
How to read simple text file from Google Cloud Storage using Spark-Scala local Program
<p>As given in the below blog,</p> <p><a href="https://cloud.google.com/blog/big-data/2016/06/google-cloud-dataproc-the-fast-easy-and-safe-way-to-try-spark-20-preview" rel="noreferrer">https://cloud.google.com/blog/big-data/2016/06/google-cloud-dataproc-the-fast-easy-and-safe-way-to-try-spark-20-preview</a></p> <p>I ...
0
2,057
How to Store Rows from CSV File into Python and Print Data with HTML
<p>Basically my problem is this: I have a CSV excel file with info on Southpark characters and I and I have an HTML template and what I have to do is take the data by rows (stored in lists) for each character and using the HTML template given implement that data to create 5 seperate HTML pages with the characters last ...
0
1,440
How does similar_text work?
<p>I just found the similar_text function and was playing around with it, but the percentage output always suprises me. See the examples below. </p> <p>I tried to find information on the algorithm used as mentioned on <a href="http://php.net/manual/en/function.similar-text.php">php: <code>similar_text()</code><sup><em...
0
1,925
WCF Service Library with NetTcpBinding
<p>I'm having a tough time with NetTcpBinding.</p> <p>When I run my WCFservice,I get this:</p> <pre><code>System.InvalidOperationException: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]. at System.ServiceModel.Servi...
0
1,412
BCP/ Bulk Insert Fails (tab delimited file)
<p>I have been trying to import data (tab delimited) into SQL server. The source data is exported from IBM Cognos. Data can be downloaded from: <a href="https://dl.dropboxusercontent.com/u/60516851/DIM_Assessment.zip" rel="nofollow">sample data</a></p> <p>I have tried BCP / Bulk Insert, but it did not help. The origin...
0
1,139
MySql and Entity Framework Code First
<p>I have a problem with MySql and Entity Framework Code First.</p> <p>My Connection String at the web.config.xml</p> <pre><code>&lt;add name="EntityContext" connectionString="Server=127.0.0.1; port=8080 Database=simple_crud; Uid=root; Pwd=;" providerName="MySql.Data.MySqlClient" /&gt; </code></pre> <p>My Context:</...
0
1,950
Display HTML form, based on selection of Radio Button
<p>I am trying to arrange my radio buttons, so that they will display separate forms, based on which button is selected</p> <p>I already got it working.</p> <p>The problem is : the forms are displayed "<strong>one after another</strong>". </p> <p>Meaning : instead of the second form displaying in place of the fir...
0
2,733
How to implement a soft-margin SVM model using Matlab's quadprog?
<p>Suppose we are given a training dataset <code>{yᵢ, xᵢ}</code>, for <code>i = 1, ..., n</code>, where <code>yᵢ</code> can either be <code>-1</code> or <code>1</code> and <code>xᵢ</code> can be e.g. a 2D or 3D point. </p> <p>In general, when the input points are <em>linearly separable</em>, the SVM model can be defin...
0
1,223
Select Component's inputProps (Material UI)
<p>Following <a href="https://stackoverflow.com/questions/57055690/material-ui-form-inputs-classname-property">this question</a>, I would like to replace the TextField (to input the age) component to use a Select component since I notice both have the inputProps property.</p> <p>Original app:</p> <pre><code>function ...
0
1,065
Injecting Log4J loggers with Spring
<p>I have a spring 2.5 webapp with the following web.xml</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4....
0
2,207
Apple Push Notification Limits
<p>I'm developing an iOS application that uses push notifications, I have implemented the app and the server side and it works great if I send just one or two notifications. The problem comes when I need to send the same notification to all of my users, the notifications only get to the first users of the loop. I'm in ...
0
1,273
Android Studio ERROR: Executing external native build for ndkBuild when trying to run Gstreamer tutorial
<p>I am trying to run the gstreamer android tutorial-5 in Android Sudio 3.5 (<a href="https://gitlab.freedesktop.org/gstreamer/gst-docs/tree/master/examples/tutorials/android)(https://gitlab.com/eduardoprado/gstreamer-tutorial5)" rel="noreferrer">https://gitlab.freedesktop.org/gstreamer/gst-docs/tree/master/examples/tu...
0
2,051
java.lang.IllegalStateException: Activity has been destroyed
<p>I know that there are several similar questions.</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //... getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, new LoginFragment()).comm...
0
1,202
How to convert hex to string or text in php
<p>I want to encrypt a message to string(text) format but I don't know the function which can convert Hex to String: </p> <p>here is my page : </p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;&lt;/title&gt; &lt...
0
1,090
EF Core: Update-Database command not creating user tables
<p>Following <a href="https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/new-db" rel="nofollow noreferrer">this tutorial</a> I created an <code>ASP.NET Core 1.1.1 - Code first</code> app on <code>VS2017 ver 15.3.3</code>. The only difference between the tutorial and my app is that I chose <code>Individual ...
0
5,159
Can't install Pillow in Windows
<p>The installation process asks for zlib and I even setup &amp; cloned it from Github. I'm new to all of this.</p> <p>Error message:</p> <pre><code>C:\Users\GThell\Pillow&gt;pip install -e . Obtaining file:///C:/Users/GThell/Pillow Requirement already satisfied: olefile in c:\users\gthell\appdata\local\programs\pyth...
0
1,522
Ajax add to cart is not adding products to the cart
<p>*<em>Ajax add to cart is not updating the product to the shopping cart upon onclick action checkout/continue in the popup and then it redirects to the URL <a href="http://hostip.com/checkout/cart/" rel="nofollow">http://hostip.com/checkout/cart/</a> *</em></p> <p><em>I had used this JavaScript</em></p> <pre><code>...
0
8,777
Create rtsp stream based on opencv images in python
<p>My goal is to read frames from an rtsp server, do some opencv manipulation, and write the manipulated frames to a new rtsp server.</p> <p>I tried the following based on <a href="https://stackoverflow.com/questions/45544877/write-in-gstreamer-pipeline-from-opencv-in-python/45780731#45780731">Write in Gstreamer pipeli...
0
1,724
C# Security Exception
<p>When running this program I keep receiving the error: An unhandled exception of type 'System.Security.SecurityException' occured Additional Information: ECall methods must be packaged into a system module.</p> <pre><code> class Program{ public static void Main() { Brekel_ProBody2_TCP_St...
0
1,456
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
<p>To provide some background - I've just downloaded a Git Repo from GitHub, for a friends app and I am attempting to launch it from my Mac ('rails s'). However, I am being hit with the following error // see below // when running 'bundle install'. It seems as if the 'pg' (postgreSQL) gem is having some sort of obscure...
0
1,403
Updating a MySql database using PHP via an onClick javascript function
<p>I am creating a web game for learning new words aimed at children.</p> <p>I have a set of four links each displaying a specific word retrieved from my database and a clue, I need to check that the word which has been selected matches the correct word for that clue.</p> <p>I know that I need to use javascript becau...
0
1,057
Write form data to MySQL without page refresh
<p>I'm trying to create a page where when a button is clicked a form displays. Then I want the user to input information into that form and click a submit button. I want this information to be submitted to a MySQL database without refreshing/leaving this page.</p> <p>I've searched the internet and it seems like I have...
0
1,149
How to get a client IP address from an SQL Server database
<p>Suppose I have three machines. One is server and the other two are clients. An SQL database has been installed on the server and an SQL&nbsp;Server client is installed on the other two machines. So people can connect to the SQL&nbsp;Server server database from their client machine.</p> <p>Now I want, whenever anybo...
0
1,743
Animate a div when scrolling page
<p>i want to annimate 3 divs when the user scroll down the page, i followed many ttorials, it didn't work any suggestions how to do it, because the divs haz a defined css classes this is the divs . i wante them to fade up or down or any cool anniation how to acomplish this . please .</p> <pre><code> &lt;section &gt...
0
1,453
sqldumper error leads to C drive getting full
<p>I've installed Microsoft SQL Server 2019 following <a href="https://www.youtube.com/watch?v=Aff9jwSPRTU&amp;list=LLfbVoI77Ues8vJH7egp6q5Q&amp;index=3&amp;t=0s" rel="nofollow noreferrer">this guide</a>. At 10:30 it was advised to change the User database directory, the User log directory and the backup directory from...
0
1,692
Android support library 23.4.0: android.support.v7.widget.TintContextWrapper cannot be cast to Activity
<p>So I updated to the latest support libraries, and got a crash I am not able to fix. My build.gradle now has these dependencies:</p> <pre><code>dependencies { compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:gridlayout-v7:23.4.0' compile 'com.android.support:support-v4:23.4....
0
1,557
Deal with a drop_table migration for nonexistent table on heroku
<p>I created a 'campaigns' table in my postgres db in my local env. I never committed the changes and thus never pushed that to production on heroku.</p> <p>When I changed my mind about needing that table, I foolishly deleted the migration manually (I know now never to do this). However, since the migration already ...
0
2,294
Android In App Billing: Purchase keeps getting -1005 response user cancelled
<p>This is my first time working with In App Billing in android. My goal is to create purchasable item somewhat like pro version unlock for the app.</p> <p>My problem is that it keeps giving me these errors.</p> <p><a href="https://i.stack.imgur.com/iPJuj.png"><img src="https://i.stack.imgur.com/iPJuj.png" alt="enter...
0
4,949
Tomcat: Can't start tomcat after installing it on Ubuntu: "Job for tomcat.service failed because the control process exited with error code."
<p>I followed the steps <a href="https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04" rel="noreferrer">https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04</a> to install <a href="http://apache.cs.utah.edu/tomcat/tomcat-8/v8.5.24/bin...
0
1,699
App is building but failing to load - System.Web.Mvc missing file or assembly?
<p>I did a "Get Latest" recently on an MVC Project in TFS, and now when I try to run it, the result every time is the yellow screen of failure, stating:</p> <pre><code>Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The sys...
0
6,945
Fetching input box value on submit button click
<p>I am working on a game using <code>ImpactJS</code> engine and I have created a basic form for my game which contains input box and a submit button. I am able to retrieve values from the input box but what I want is that when the player clicks on submit whatever value is there in the input box gets fetched and I shou...
0
1,779
NoClassDefFoundError: UnsupportedFileFormatException while working with excel sheet using java
<p>I'm writing a Java program which reads from a .xlsx file and give the output in .csv format. This is my code:</p> <pre><code>import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; impo...
0
2,852
Failed copying input tensor from CPU to GPU in order to run GatherVe: Dst tensor is not initialized. [Op:GatherV2]
<pre><code> from random import sample index=sample(range(0, len(result)), len(result)//5*4) description_train=[child[0] for i, child in enumerate(result) if i in index] ipc_train=[child[1] for i, child in enumerate(result) if i in index] description_test=[child[0] for i, child in enumerate(result) if...
0
1,076
Error: Could not find or load main class
<p>I am having trouble compiling and running my Java code, intended to allow me to interface Java with a shared object for Vensim, a simulation modeling package.</p> <p>The following code compiles without error:</p> <pre><code>javac -d . -cp ./apache-log4j-1.2.16/log4j-1.2.16.jar:./vensim.jar SpatialModel.java Ve...
0
1,606
x-editable popover not shown completely
<p>I am using <a href="http://vitalets.github.io/x-editable/" rel="noreferrer">x-editable</a> js. My x-editable popover is not shown completely. </p> <p><img src="https://i.stack.imgur.com/55qNZ.png" alt="enter image description here"></p> <p>I think problem in z-index, I tried it on hyperlink but no luck. </p> <pre...
0
1,788
System.Threading.ThreadAbortException: Thread was being aborted
<p>i am getting this error while executing the procedure. This problem occurs only at production not in the testing and developer systems. Also this problem does not occur all the time. When this error arises all users using this database through application are getting hanged that means all the users connections to th...
0
1,238
How to implement ASP.NET identity: CREATE DATABASE permission denied in database 'master'
<p>First of all, I already checked here: <a href="https://stackoverflow.com/questions/18297052/asp-net-identity-how-to-set-target-db">ASP.Net Identity how to set target DB?</a></p> <p>I'm now getting this error</p> <blockquote> <p>CREATE DATABASE permission denied in database 'master'.</p> </blockquote> <p>On this...
0
5,298
turn on off GPS android
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/1051649/how-to-programmatically-enable-gps-in-android-cupcake">How to programmatically enable GPS in Android Cupcake</a> </p> </blockquote> <p>I'm currently writing an app in Android that works with the GPS. At...
0
1,116
Error in assignment of member in read-only object
<p>I am working on worm_sim simulater , ubuntu, gcc, codeblocks IDE</p> <p>traffic_source.h file</p> <pre><code>class Traffic_source : public Buffer_owner, public Connector, public Addressee{ private: static unsigned int id_base; unsigned int id; unsigned int packet_size; unsigned int flit_size; d...
0
1,996
How to calculate number of rows in a column of Excel document using Java
<p>I have a java code which fetches data from excel document. <strong>I want to calculate the number of columns and total number of rows(in a particular column)</strong>. How can I achieve this? Java code and desired o/p is provided below</p> <p>(edit): what modification I should make to get the desired o/p for e.g. I...
0
1,363
Invalid path with ui:include
<p>i am using <strong>JSF 2.1.4</strong> and <strong>facelets</strong> and everything was working fine, but suddenly without any changes in my template i keep getting the error:</p> <pre><code>javax.faces.view.facelets.TagAttributeException: /pages/template/commonLayout.xhtml @35,59 &lt;ui:include src="/pages/template...
0
4,718
ProGuard doesn't obfuscate JAR with dependencies
<p>I have a project with the <code>pom.xml</code> file given below. When I issue the command <code>mvn clean compile assembly:single install</code> I want Maven to generate a JAR, which contains</p> <ul> <li>all the dependencies and</li> <li>obfuscated version of my code.</li> </ul> <p>It doesn't work - my code is no...
0
4,990
Amazon S3 - 405 Method Not allowed using POST (Although I allowed POST on the bucket)
<p>I am facing a problem that my graph (Using AJAX - POST - PHP) is not appearing on Amazon </p> <p><a href="http://cdpmotest.s3-website.eu-central-1.amazonaws.com/" rel="noreferrer">http://cdpmotest.s3-website.eu-central-1.amazonaws.com/</a></p> <p>its says (Wrong Method 405 Error)</p> <p>This is my CORS Config :</...
0
1,219
AttributeError: module 'tensorflow.python.keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'
<p>When I import keras, the error above pops up even though it was working fine yesterday.</p> <p>How do I resolve this error?</p> <p>I am working on windows 10 my keras version is: 2.2.4 my tensorflow version is: 2.2.0rc2</p> <p>complete error traceback is seen below as such:</p> <pre><code>Traceback (most recent ...
0
1,135
Implementing logging in a Java application
<p><strong>Disclaimer:</strong> I apologize that this question is so long. I have added code as I have explored suggestions made here and done additional research since asking my original question.</p> <p>I am working on an open source project in Java and want to implement logging in my application to facilitate bug t...
0
2,526
CompileError: WebAssembly.compile()
<p>I am trying to execute basic C code of calculating factorial in WebAssembly and when I am loading WASM file in Google Chrome ( 57.0.2987.98) I am getting </p> <blockquote> <p>CompileError: WebAssembly.compile():<br> Wasm decoding failedResult = expected magic word 00 61 73 6d,<br> found 30 30 36 31 @+0`</p> <...
0
1,358
How to download a file from http using C?
<p>I spent the last days trying to figure out how to download a file from an URL. This is my first challenge with socket and I'm using it to have an understanding of protocols so I would like to do it without cURL libraries and only in C language!! I searched a lot....now I'm able to printf the source code of a page bu...
0
2,233
Toolbar and TabLayout is not visible on Android 4.4 devices
<p>I was trying to implement Toolbar and TabLayout using google design library by referring to [<a href="http://blog.grafixartist.com/material-design-tabs-with-android-design-support-library/]" rel="nofollow noreferrer">http://blog.grafixartist.com/material-design-tabs-with-android-design-support-library/]</a> [blog]. ...
0
1,657
Why does this simple Java Swing program freeze?
<p>Below is a simple Java Swing program that consists of two files:</p> <ul> <li><em>Game.java</em></li> <li><em>GraphicalUserInterface.java</em></li> </ul> <p>The graphical user interface displays a "New Game" button, followed by three other buttons numbered 1 to 3.</p> <p>If the user clicks on one of the numbered ...
0
1,466
drop down menu 3 level (horizontal followed by 2 verticals)
<p>I have a menu bar. The menu bar is horizontal. The sub menu is then extended vertically upon hovering. The items in this sub menu includes Manage subjects, Manual Crawl, Crawl Interval and Archive List. When the mouse is hover to Manage subjects, it should prompt another dropdown list at the right side of it to prod...
0
1,772
how to retransform a class at runtime
<p>I am tring modify class which already loaded in a jvm. The solution which I found is:</p> <ul> <li>1st Attach an agent to a jvm specified by pid. (e.g. 8191)(Codes: AttachTest)</li> <li>2nd Find the class which you want modified from those that have already been loaded in the jvm(e.g. 8191).</li> <li>3rd Add transf...
0
4,175
Android: Changing image contrast and brightness upon scrolling seekbar
<p>I would like to set the contrast and brightness of a imageview. Referring from <a href="https://stackoverflow.com/questions/12891520/how-to-programmatically-change-contrast-of-a-bitmap-in-android">How to programmatically change contrast of a bitmap in android?</a>, which should be the most fastest and efficient way ...
0
1,587
cannot implicitly convert type System.Collections.Generic.List<char>
<p>I am trying to create a list of customer names that is fetched from a Json call but I get an error:</p> <blockquote> <p>cannot implicitly convert type <code>System.Collections.Generic.List&lt;char&gt;</code> to <code>System.Collections.Generic.List&lt;string&gt;</code></p> </blockquote> <p>I am using these 2 c...
0
2,209
EF-Core: Table "name" already exists - when trying to update database
<p>ASP Core 3.1 - API. I'm using the latest version of Entity Framework Core.</p> <p>I have created a table <code>ToDoItem</code> and a <code>ToDoItemContext</code>. After creating the initial migration, and running <code>update-database</code>. I now have that table in my database. I now added a new model called: <cod...
0
2,762
Unable to deploy CXF3.x JAX-RS service in Weblogic 12c (12.2.1)
<p>After upgrading a JAX-RS service built with CXF3.x from weblogic 12.1.3 to 12.2.1 I am facing the following weird issue</p> <pre><code>&lt;03-ago-2017, 3:22:38,789 PM CEST&gt; &lt;Error&gt; &lt;HTTP&gt; &lt;BEA-101216&gt; &lt;Servlet: &quot;JAX-RS/Jersey#1&quot; failed to preload on startup in Web application: &quot...
0
6,157
getChildView not being called
<p>I am making a menu which includes a custom ExpandableListView adapter. Despite trying to match my code as close to the API examples and any other examples I've seen online (including multiple closely related SO questions), I still can't get it working.</p> <p>I know the adapter is being used because the group view ...
0
5,335
Wait on the Database Engine recovery handle failed. Check the SQL server error log for potential causes
<p>I m using SQL Server 2012 Developer Edition. Even I tried SQL Server 2012 Express and Enterprise edition but all gave same error. I browsed msdn blog as well as few post on stackoverflow.</p> <p>But nothing helped me out from this!</p> <p><img src="https://i.stack.imgur.com/Zuc4C.jpg" alt="Error Details" /></p> <p><...
0
6,860
How to write and send a command to Brother QL serie label printer?
<p>I'm now trying to write a simple program in C# that sends command to the printer to print a plain text but don't know how to. There are 2 main problems that I'm facing now:</p> <p><em>1. How to communicate with the printer?</em></p> <p>After doing some google search but not getting a satisfying result I went to Brot...
0
1,479
Implementing Normal Mapping using OpenGL/GLSL
<p>I'm learning GLSL and trying to implement some lighting and mapping tricks. I'm working with ShaderDesigner tool. After coding normal mapping I recognized that my model illumination looks not real. Here is my code and some pictures. If it possible tell me what is my problem.</p> <p><strong>Vertex Shader</strong></p>...
0
1,250
How to enable secured-annotations with Java based configuration?
<p>I want to use <code>@Secured</code> annotations for my controller actions. Since I have java based configuration I need to know how I can set the </p> <pre><code>&lt;security:global-method-security secured-annotations="enabled" /&gt; </code></pre> <p>option without the xml file.</p> <p><strong>Upate 1:</strong></...
0
2,192
pandas merge on index not working
<p>I have two dataframes (Series actually) generated by a groupby operation:</p> <p><code>bw</code></p> <pre><code>l1 Consumer Discretionary 0.118718 Consumer Staples 0.089850 Energy 0.109988 Financials 0.159418 Health Care 0.115060 ...
0
1,095
force glassfish 4 to use jackson 2.3
<p>I wrote an maven application which should run on Glassfish 4.</p> <p>The Standard ApplicationConfig looks like this:</p> <pre><code>@javax.ws.rs.ApplicationPath("resources") public class ApplicationConfig extends Application { @Override public Set&lt;Class&lt;?&gt;&gt; getClasses() { Set&lt;Class&...
0
4,306
"proxy_pass" cannot have URI part in location given by regular expression
<p>I've developed a URL shortening web application. </p> <p>It consists of two separate docker containers: one containing the backend REST api and another containing the frontend static website. </p> <p>These two containers are linked to an nginx container. The configuration for this nginx container is below:</p> <p...
0
1,209
android listView with tab fragments
<p>I have created a page which has two tabs and in both the tabs i want to add a list which has name and an image in each row. so i have done the coding for listview with images separately but i am confused about how to add that listview in the tab fragment page. Can anyone help me for this. Below is my code for the sa...
0
4,475
Eclipse GDB MacOSX Mavericks
<p>I have had terrible problems making an Application Debug using Eclipse C/C++ project with XCode 5.0 and I have finally made it. I have finally been able to successfully debug my application and that's why I decided to make this little tutorial hoping to save time to others.</p> <p>When trying to debug and applicati...
0
1,144
Start an activity from a fragment
<p>I have 2 fragments with on both fragments a button. When I press the button I'd like to start a new Activity. But I can't get it to work.</p> <p>The error I'm getting: <strong>ERROR here: Type mismatch: cannot convert from mFragmentFavorite to Fragment</strong></p> <p>What am I doing wrong?</p> <p><strong><em>MyF...
0
1,846
java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'user' available as request attribute
<p>I started learning Spring these days,Iam getting below exception: Iam just tring to navigate from login page (will do insert opeartion in db later using DAOs) to some index.jsp page</p> <pre><code>exception org.apache.jasper.JasperException: An exception occurred processing JSP page /login.jsp at line 11 8: &lt;/...
0
3,542
The navigation property 'SenderId' is not a declared property on type 'Conversation'
<p>When I try to do Update-Database, I get this error: </p> <blockquote> <p>The navigation property 'SenderId' is not a declared property on type 'Conversation'. Verify that it has not been explicitly excluded from the model and that it is a valid navigation property.</p> </blockquote> <p><strong>Edit</strong></p> ...
0
1,464
Matplotlib scatter color by categorical factors
<p>I have a basic scatter where the x and y are float. But I want to change the color of the marker based on a third categorical variable. The categorical variable is in a string form. This seems to cause an issue. </p> <p>To use the iris dataset- here is the code I think I would use:</p> <pre><code>#Scatter of Petal...
0
1,293
Multiple modal components with Vue
<p>I am having trouble implementing dynamic modal component in Vue.</p> <p>A common approach I follow to display a set of data fetched from the db is I dump each of the rows in an HTML table element by iterating over each of the row of the db result. Something like this: <a href="https://i.stack.imgur.com/t0hdY.png" r...
0
1,110
Array to string conversion in laravel 5.4 , controllers
<p>I'm getting array to conversion error while inserting multiple data , code which i mentioned below please take a look and somebody help me</p> <p>Controller.php</p> <pre><code> if(!empty($value)) { foreach ($value as $v) { ...
0
1,132
How to set Storyboard.SetTargetProperty in Code behind?
<p>I am trying to convert XAML Storyboard to code behind Storyboard. But I get an exception </p> <pre><code>Cannot resolve all property references in the property path '(UIElement.RenderTransform).(myTransformGroup.Children)[1].(TranslateTransform.Y)'. Verify that applicable objects support the properties. </cod...
0
1,545
How to solve Fatal error: Index out of range in Swift IOS
<p>I have a problem with a code is a RSS reader app for IOS. I have an error Thread 1: Fatal error: Index out of range.</p> <p>I wrote on which line the error is. By the way, this error does happen with all the RSS link I put for example with sky news RSS URL it works well but with some site (like the one I put now) i...
0
2,041
Vanilla JS remove class from all other elements besides 'active' class
<p>I'm trying to build a dropdown menu with Vanilla JavaScript and I can't figure out the best way to add a class of active to the clicked dropdown menu, and then at the same time remove all other active classes from the sibling elements. </p> <p>so far this is what I have as far as JS:</p> <pre><code>var _dropdowns ...
0
2,186
What is the structure of Stripe PHP API method response?
<p>I am working on a Stripe integration and I am baffled by the actual responses I get from the PHP API. I started out believing that the API reference was accurate and that the response would be a JSON string as shown for each method. I quickly discovered significant differences. Most often, the id field is missing fr...
0
1,826
log4j log only messages from specific class in file
<p>In a external file I would like to log the output of my com.foo.test class to a specific file but whats happening is its appending the console log as well as file log. Below is my xml configuration,</p> <pre><code>&lt;appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender"&gt; &lt;err...
0
1,046
How to install aws-cfn-bootstrap/cfn-init package in Redhat using CloudFormation?
<p>I am trying to launch a instance with CloudFormation Template. Instance was started but the UserData section was not executed completely because <code>cfn-init/aws-cfn-bootstrap</code> package was not installed in Redhat 7 AMI. I tried installing <code>aws-cfn-bootstrap</code> package manually but could not install ...
0
1,939
Android - Error - IllegalArgumentException: Window type can not be changed after the window is added
<p>I am debugging an android app (which was unfortunately written by someone else). The app has a splash activity which lasts for 1 second and then the transitions to a landing page activity using an intent. The app was running fine until I noticed that the targetSDKVersion was not set in the manifest file. I set it to...
0
1,827
How to successfully implement og:image for the LinkedIn
<p><strong>THE PROBLEM:</strong></p> <ul> <li>I am trying, without much success, to implement open graph image on site: <a href="http://www.guarenty-group.com/cz/" rel="noreferrer">http://www.guarenty-group.com/cz/</a></li> <li>The homepage is completeply bypassing the og:image tag, where internal pages are reading al...
0
1,451
cvc-complex-type.3.2.2: Attribute xsi:schemaLocation is not allowed to appear in <people> in Java DOM
<p>I am attempting to validate my XML using XSD in Java by using DOM validator.<br> Although, manually, I know that the document is indeed valid, DOM validator shouts back at me and says: </p> <pre><code>cvc-complex-type.3.2.2: Attribute &lt;xsi:schemaLocation&gt; is not allowed to appear in the element &lt;people&gt...
0
1,626
Use JPA Spring boot with SQL Server
<p>I want to use JPA in Spring boot with SQL Server by STS This is my table: </p> <p><img src="https://i.stack.imgur.com/Iovsc.png" alt="enter image description here"></p> <p>MAVEN</p> <pre><code>&lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.hynnet&lt;/groupId&gt; &lt;artifactId&gt;sqljdbc-...
0
1,797
why do I get preg_replace() error when submitting a post form in Laravel?
<p>I have built a simple application laravel 4. I have scaffolding setup for adding posts which seems to be working fine. I have setup Stapler and image uploading package. When I setup to use single image uploads its pretty good and it works a charm. I recently looked at the docs <a href="https://github.com/CodeSleeve/...
0
1,963
expo start command not running
<p>Using expo to work on my react native projects using <code>expo start</code> always worked before. Now it doesn't work, so I reinstalled <code>node.js</code>. I installed <code>expo</code> using <code>npm install -g expo-cli</code> but <code>expo start</code> gave me: </p> <p><code>'expo' is not recognized as an in...
0
1,399
XSLT Decimal formatting based on input XML
<p>I have a situation where my XSLT files should display prices alongwith decimals conditionally, depending on whether the input XML contains decimals or not. So, I can receive XML files with two types of values - XML will contain all prices formatted with decimals upto two places (I call this one "Decimal-XML") or the...
0
1,927
Using ffmpeg to capture frames from webcam and audio from micro and saving to file
<p>For the past few weeks I've been struggling with the ffmpeg API since I can not find a clear documentation and I also find it hard to search as all the solutions I find online involve not the c API but the ffmpeg.c command line program. I am creating a program which needs to capture video from a webcam and audio, sh...
0
3,107
how to fix TypeError: Cannot read property 'authenticate' of undefined passportjs
<p>im working on a node passport login authentication but im stack on this error which makes it hard for me to run my node server</p> <p>/home/emil/Documents/myapp/app/routes.js:14 app.post('/login', passport.authenticate('local-login', { ^ TypeError: Cannot read property 'authentica...
0
1,906
change Content-type to "application/json" POST method, RESTful API
<p>I am new at AngularJS and I needed your help.</p> <p>All I need just need is to POST my json to the API and recieve the proper response.</p> <p>Here's my JSON where i don't know where to code this.</p> <p><strong>JSON</strong></p> <pre><code>{ &quot;userId&quot; :&quot;testAgent2&quot;, &quot;token&quo...
0
1,045
p:dataTable selections are lost after paginating a LazyDataModel
<p>My problem is that after I've selected a few items on the 1st page, if I paginate to another page and come back, my initial selections are not shown. I've tried to implement the <code>SelectableDataModel</code> as well as using the <code>rowKey</code> attribute but the problem persists.</p> <p>This is my test bean:...
0
1,734
AttributeError: 'Sequential' object has no attribute 'predict_proba'
<p>predict_proba returns the error in the neural network</p> <p>i saw the example on this link <a href="https://machinelearningmastery.com/how-to-make-classification-and-regression-predictions-for-deep-learning-models-in-keras/" rel="nofollow noreferrer">https://machinelearningmastery.com/how-to-make-classification-and...
0
1,072
Jenkins integration for dotnet test
<p>I'm running a unit test of a dotnet core library using dotnet test. I run the test on my Jenkins slave like this.</p> <pre><code>dotnet test test/Turbine.Domain.UnitTest -xml mstest-reports/Turbine.Domain.UnitTest.xml </code></pre> <p>The test report looks like this.</p> <pre><code>&lt;?xml version="1.0" encoding...
0
1,351
C++ changing variable inside while loop
<p>I'm new to C++, and trying to go through [Project Euler][1]. I got all the way to [Problem 4][2] (impressive I know) and am having trouble with what I think is the scope of my variables inside a while loop. If you don't know, the problem asks you to find the highest palindrome product of two three digit integers. I ...
0
1,423
Vagrant up causes guest additions to reinstall each time, why?
<p>Ive had to move onto a new laptop running windows 10, so I have installed the latest Virtual box (6) and vagrant (2.2.6). I pulled down my project and ran a vagrant up to build the box and deploy all my work, but there was an issue with guest additions. The box is Centos 7, so after first launch, I carried out a yum...
0
1,401
aws: EMR cluster fails "ERROR UserData: Error encountered while try to get user data" on submitting spark job
<p>Successfully started aws EMR cluster, but any submission fails with:</p> <pre><code>19/07/30 08:37:42 ERROR UserData: Error encountered while try to get user data java.io.IOException: File '/var/aws/emr/userData.json' cannot be read at com.amazon.ws.emr.hadoop.fs.shaded.org.apache.commons.io.FileUtils.openInput...
0
1,831
Deserialize JSON to Array or List with HTTPClient .ReadAsAsync using .NET 4.0 Task pattern
<p>I'm trying to deserialize the JSON returned from <code>http://api.usa.gov/jobs/search.json?query=nursing+jobs</code> using the .NET 4.0 Task pattern. It returns this JSON ('Load JSON data' @ <code>http://jsonviewer.stack.hu/</code>).</p> <pre><code>[ { "id": "usajobs:353400300", "position_title": "Nurse"...
0
1,512
MySQL server start issues on Mavericks
<p>I am having difficulty using MySQL on my MacBook, I am trying to start my server using <code>sudo mysqld_safe</code> and this results in the following output:</p> <pre><code>140131 00:03:02 mysqld_safe Logging to '/usr/local/var/mysql/david-mbp.err'. 140131 00:03:02 mysqld_safe Starting mysqld daemon with databases...
0
2,481
How to compare one character from a string with another string
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java">How do I compare strings in Java?</a> </p> </blockquote> <p>I'm fairly new to Java and to practice I'm trying to create a hexadecimal to decimal number converter since I...
0
1,307
Error on gradle task ':app:compileDebugJavaWithJavac'
<p>I am working with Android Studio 3.1 Canary 6 and I am getting this error when I build my project. I search this error and many users get this with different reasons, but I did not find something similar to my problem.</p> <p>In my searches I understand this error is caused by errors in our code, like syntax errors...
0
7,271