title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Onclick validate form, if valid only submit form | <p>I have an html form that I first wish to validate with jQuery validation library jquery.validate.min.js and <strong>if form is valid</strong>, submit the form to a location.</p>
<p>I have attempted the following:</p>
<pre><code><html>
<head>
<link rel="stylesheet" href="../../common/view... | 0 | 1,597 |
How to get started with testing(jMock) | <p>I'm trying to learn how to write tests. I'm also learning Java, I was told I should learn/use/practice jMock, I've found some articles online that help to certain extend like :</p>
<p><a href="http://www.theserverside.com/news/1365050/Using-JMock-in-Test-Driven-Development" rel="nofollow noreferrer">http://www.thes... | 0 | 1,159 |
How to add UICollectionView Header | <p>I wish to add a label to my UICollectionView programmatically, and have used the viewForSupplementaryElementOfKind and referenceSizeForHeaderInSection to set it up, however for some reason when I setup my views it is still placing it inside the first row of my CollectionView instead of the created header. <a href="h... | 0 | 1,035 |
How to auto-create database, schema and table only if they do not already exist | <p>I want to create a simple webapp that </p>
<ul>
<li>allow remote clients to track some content on a post request</li>
<li>persist all the tracking in a lightweight database</li>
<li>give back all the tracking on a get request</li>
</ul>
<p>About the database, I would like</p>
<ol>
<li>put its location within a pr... | 0 | 4,512 |
Generating a CSR with Python (crypto) | <p>I have a skeleton that -- works, but I'm kind of stuck on the following;</p>
<ol>
<li>I don't see a way with the crypto library to handle SAN (subjectAltName)? Hopefully I'm not wrong on the terminology, but if I have say -- one main hostname test.test.edu and then alternatively would like that host to also be push... | 0 | 1,691 |
JSON decoding: Unexpected token: StartArray | <p>I'm using <a href="http://james.newtonking.com/projects/json-net.aspx" rel="noreferrer">JSON.net</a> to decode a JSON string and I find this error:</p>
<blockquote>
<p>Exception in 'Newtonsoft.Json.JsonReaderException' en
Newtonsoft.Json.dll</p>
<p>Información adicional: Error reading string. Unexpected to... | 0 | 1,425 |
How to JOIN without relational table in Symfony Doctrine with QueryBuilder between 2 entities | <p>I have an Entity Video related with a Entity Category and I need to run this SQL with Doctrine QueryBuilder, with this I can get the most used categories in all videos (1000+):</p>
<pre><code> SELECT c.*
FROM Video v
INNER JOIN video_category vc ON vc.video_id = v.id
INNER JOIN Category c ON vc.categ... | 0 | 1,173 |
Cannot use import statement outside modules | <p>I am using NextJS with typescript, mongo Atlas, mongoose, node and express.</p>
<p>I am getting the following error when I run node pages/server:
I have uploaded my package.json file and have added babel as well</p>
<blockquote>
<p>import express from 'express'; ^^^^^^</p>
<p>SyntaxError: Cannot use import ... | 0 | 1,069 |
Capistrano and GitHub Private Repo – Permission denied (publickey) | <p>I've inherited a Rails project, hosted on Linode. </p>
<p>The previous developer was using a BitBucket repository, along with Capistrano for deployments. </p>
<p>I've since setup a private repository on GitHub, and I'm trying to get the Capistrano recipe to work. I'm having no luck. I continue to get a publickey e... | 0 | 1,189 |
Tomcat SEVERE: A child container failed during start | <pre><code> SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/EasyShiroWeb]]
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
... | 0 | 2,510 |
How to remove the "_embedded" property in Spring HATEOAS | <p>I'm using Spring Boot and HATEOAS to build a REST API and when my API returns a collection, it is wrapped inside a "_embedded" property, like so: </p>
<pre><code>{
"_links":{
"self":{
"href":"http://localhost:8080/technologies"
}
},
"_embedded":{
"technologies":[
{
... | 0 | 1,113 |
Pandas: drop columns with all NaN's | <p>I realize that dropping <code>NaN</code>s from a dataframe is as easy as <code>df.dropna</code> but for some reason that isn't working on mine and I'm not sure why.</p>
<p>Here is my original dataframe:</p>
<pre><code>fish_frame1: 0 1 2 3 4 5 6 7
0 #... | 0 | 1,403 |
Exception in Application start method java.lang.reflect.InvocationTargetException | <p>I am just starting out with JavaFX, and I am trying to build a simple application with a label, text field and button which, when clicked, sets the label's value to that of the text field's. Everything was going well until I connected the controller to the Main file. Here's my code:</p>
<p>Main.java</p>
<pre><code... | 0 | 2,215 |
Render Three.js into a div element | <p>I am using Three.js. Having a html site with two div elements, is it possible to render just in one div element? </p>
<p>HTML Code:</p>
<pre><code><body>
<div id="twocols">
<div id="detailinfo">
<span class="c">Detailinformationen:</span><br/>
... | 0 | 1,213 |
How to use POST , GET for making search-box in Nodejs | <p>I want to post and get the getparameter keyword from form value and use this query</p>
<pre><code>SELECT * from cider.cid_contents
where con_content like \'%'+ keyword +'%\'
order by con_no desc;
</code></pre>
<p>But I don't know how to get the keyword value from post or form method.
There are codes</p>
<p>sear... | 0 | 1,365 |
'dispatch' is not a function when argument to mapToDispatchToProps() in Redux | <p>I am a javascript/redux/react beginner building an small application with redux, react-redux, & react. For some reason when using mapDispatchToProps function in tandem with connect (react-redux binding) I receive a TypeError indicating that dispatch is not a function when I try to execute the resulting prop. Whe... | 0 | 1,500 |
Add xsi:nil="true" for empty elements | <p>I am trying to figure out a way to add xsi:nil="true" for empty elements. I could write a separate xsl on the output to achieve this, but trying to figure out if I could have it written in the current xsl itself.</p>
<p>Current XSL</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xml... | 0 | 5,555 |
HTTP Status 403 - Expected CSRF token not found. Has your session expired? | <p>I'm using spring security 4.0.1. As soon as I login, it displays my dashboard. When I click on something it gives me the following error page: </p>
<blockquote>
<p>HTTP Status 403 - Expected CSRF token not found. Has your session expired?</p>
</blockquote>
<p>I've done some research on it and it says I need to a... | 0 | 10,899 |
Flutter firebase_message plugin setup errors | <p>I wanted to try out cloud messaging in my Flutter application, but I always run into errors, and I have not found a solution yet. I followed the steps stated here: <a href="https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging" rel="noreferrer">firebase_messaging</a> </p>
<p>If I f... | 0 | 2,590 |
Working with Non-UTF-8 codes in Python 3? | <p>This is my first question in StackOverflow. I've been trying to print() an Arabic string. my code is:</p>
<pre><code>s = '''
<b>سُوۡرَةُ الفَاتِحَة</b><br>بِسۡمِ اللهِ الرَّحۡمٰنِ الرَّحِيۡمِ <br></span></font></div><div dir="RTL" align="right"><font id="fon1" clas... | 0 | 1,472 |
valid publishable key set, yet get no valid publishable key set | <p>I am trying to make stripe checkout sample from stripe website works</p>
<p><a href="https://stripe.com/docs/checkout/rails" rel="noreferrer">https://stripe.com/docs/checkout/rails</a></p>
<p>, yet when I try to pay, I receive this <strong>error message</strong>.</p>
<blockquote>
<p>You did not set a valid publ... | 0 | 1,167 |
Android App With TextView in a ScrollView | <p>I am trying to implement a android app. I have problems with TextView in a ScrollView. When I write some text into TextView according to its lenght some rows of the text at the top cannot be seen. I think they are occuluded with other things which resides in the top. Here is my xml file. </p>
<pre><code><?xml ve... | 0 | 1,183 |
Symfony 2 | Form exception when modifying an object that has a file(picture) field | <p>I'm using Symfony2.
I have an entity <b>Post</b> that has a title and a picture field.</p>
<p><b> My problem : </b>Everything is fine when I create a post, I have my picture etc. But when I want to modify it, I have a problem with the "picture" field which is an uploaded file, Symfony wants a file type and it has a... | 0 | 2,464 |
lxml will never finish building on ubuntu | <p>I am running ubuntu 14.04 LTS and python 2.7.5 on a vwmare. </p>
<p>When I run:</p>
<pre><code>sudo pip install lxml
</code></pre>
<p>I get:</p>
<pre><code>Collecting lxml
Using cached lxml-3.4.4.tar.gz
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml
</code></pre>
<p>which... | 0 | 4,808 |
Error while running Hive Action in Oozie | <p>I'm trying to run a hive action through Oozie. My <code>workflow.xml</code> is as follows:</p>
<pre><code><workflow-app name='edu-apollogrp-dfe' xmlns="uri:oozie:workflow:0.1">
<start to="HiveEvent"/>
<action name="HiveEvent">
<hive xmlns="uri:oozie:hive-action:0.2">
... | 0 | 1,270 |
Type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' | <p>I'm developing a flutter application that depends on API REST calls.The Response from the API is a bit complex.
I can see the response from the log when calling my API (e.g : api/products) :
But i have this Error :<br> <br> type 'List< dynamic >' is not a subtype of type 'Map< String, dynamic >'<br><br>
I've s... | 0 | 6,634 |
On the fly clientside image to webp converter...but png's are not transparent | <p>this is a working code to convert jpg or png to <strong>webp</strong></p>
<p>google's new image format that is in average 30-40% smaller than jpg's or png's</p>
<p>1.Open with Chrome</p>
<p>2.Set The quality</p>
<p>3.Drop an image inside the page</p>
<p>4.Wait (depends on the size .. try small images first)</p>... | 0 | 1,324 |
nodejs and express error when uploading file, "cannot read property of undefined" | <p>EDIT: === For clarity, I am looking to upload a file to the server, be it a picture or a bit of .txt ===</p>
<p>I've looked around at other common problems similar to this but have been unable to alleviate my problem.</p>
<p>The purpose is to create file upload functionality. The front end looks like this:</p>
<p... | 0 | 1,046 |
Spring Error LoggingFailureAnalysisReporter after Initialize new project | <p>i made a new project with <a href="https://start.spring.io/" rel="nofollow noreferrer">Spring Initializr</a> and run it after import in the Intellij without any change in the code that generated by the IDE and i get the following error :</p>
<p>restartedMain] o.s.b.d.LoggingFailureAnalysisReporter</p>
<pre><code>***... | 0 | 1,557 |
Android development RecoverySystem.installPackage() cannot write to /cache/recovery/command permission denied | <p>I have been asked to write a small simple app for an Android-based product. The device comes with two Android system images with different features. The app I'm writing is just a proof of concept where when you click on a button, it uses the Recovery System to replace the current OS with one of the images.</p>
<p>T... | 0 | 1,108 |
Sessions won't save in Node.js without req.session.save() | <p>I'm building a website using Node.js, Express, and Redis for session management. For whatever reason, if I have a session variable (<code>isLoggedIn</code> in this example), and I refresh the page, the variable doesn't get saved, however, if I call <code>req.session.save()</code> after setting the variable, it does ... | 0 | 1,284 |
.NET Core 2.2 - "HTTP Error 500.30 - ANCM In-Process Start Failure" | <p>When hosting an ASP.NET Core MVC application on <a href="https://en.wikipedia.org/wiki/Windows_Server_2016" rel="nofollow noreferrer">Windows Server 2016</a> data center running IIS 10, the application fails to load with the message:</p>
<blockquote>
<p>HTTP Error 500.30 - ANCM In-Process Start Failure</p>
</blockqu... | 0 | 1,607 |
How to use Tor with Chrome browser through Selenium | <p>I'm trying to run my selenium driver on Tor. Note that the script already runs with no errors without Tor.</p>
<p>This is what I've done so far:</p>
<p>1) I called the Tor framework</p>
<pre><code>import socks
import socket
from stem.util import term
import stem.process
SOCKS_PORT=7000
socks.setdefaultpr... | 0 | 1,270 |
Error While sending a mail from Email subscription in SSRS | <p>I am getting below error while sending a mail from Email subscription in SSRS. </p>
<p>Below is the Configuration section:</p>
<pre><code><RSEmailDPConfiguration>
<SMTPServer>mysmtpserver addres</SMTPServer>
<SMTPServerPort>
... | 0 | 1,769 |
Removing/Adding constraint programmatically in ConstraintLayout | <p>I want to remove and add constraint programmatically based on some condition. Here are the screenshots:</p>
<p><a href="https://i.stack.imgur.com/IfUS9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IfUS9.png" alt="The button "create ad" has a top constraint"></a></p>
<p>and I want to remove i... | 0 | 1,217 |
Testing api call inside useEffect using react-testing-library | <p>I want to test api call and data returned which should be displayed inside my functional component. I created List component which performs api call. I would like the returned data to be displayed in the component and I use the useState hook for this. Component looks like this:</p>
<pre class="lang-js prettyprint-ov... | 0 | 1,495 |
How to redirect HTTPS requests to HTTP without a certificate (Apache VirtualHosts) and avoid a certificate warning | <blockquote>
<p>I would first like to first say, this is not good practice and we should endevour to have everything on HTTPS 100% of the time but in this case I had a series of awkward requirements on a system that did not hold sensitive information. I was quite ignorant of how HTTPS/TLS worked when asking this ques... | 0 | 1,255 |
Bootstrap 4 change icon in collapse | <p>I use bootstrap 4 alpha 6 version. In my page I have several collapse blocks. I want to change icon when user open/close that block. As I have several of these blocks I used class but it didnt work. Whats wrong I did? P.S. When I use id in JS works fine, but as you see I have several collapse block and dont want to ... | 0 | 1,212 |
Merge Overlapping Intervals | <p>Question : Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals. Let the intervals be represented as pairs of integers for simplicity.
For example, let the given set of intervals be {{1,3}, {2,4}, {5,7}, {6,8} ... | 0 | 1,723 |
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3 bytes) after ini_set | <p>At first, I've already looked at <a href="https://stackoverflow.com/questions/561066/php-fatal-error-allowed-memory-size-of-134217728-bytes-exhausted-codeigniter">this</a>, <a href="https://stackoverflow.com/questions/5061917/ini-setmemory-limit-in-php-5-3-3-is-not-working-at-all">this</a> and <a href="https://stack... | 0 | 1,052 |
CodeIgniter error - Call to a member function on null | <p>I have my form which loads login method of Auth controller class on submit and I have AuthData model which has an authenticate function.
Now when user submits form I get error?</p>
<p>Warning is-</p>
<blockquote>
<p>A PHP Error was encountered<br>
Severity: Notice<br>
Message: Undefined property: Auth::$A... | 0 | 1,380 |
Accessing dictionary value from list of dictionaries | <p>I am using a keyword that returns a list of dictionaries like the one below. If I loop through the dictionaries I can get the values. For example,</p>
<pre><code>${vPools} = list all vpools
: FOR ${Item} IN @{vPools}
\ ${vPoolID} = ${Item["VPoolID"]}
</code></pre>
<p>Is there a way to access a... | 0 | 1,026 |
Sending SMS in Android | <p>I am using the below code to send SMS to an Android mobile. But if I send the <a href="http://en.wikipedia.org/wiki/SMS">SMS</a> to any number it's not being sent. What could be the issue?</p>
<pre><code>package SMSApp.com;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Broad... | 0 | 2,895 |
flutter project not running on ios | <p>Have a previously running app that is no longer running and I have been trying to work this out for weeks. Have got it to a point now where it almost runs but I get the following issues at the last hurdle:</p>
<pre><code>flutter run -v
</code></pre>
<p>This appears to successfully build the app and launch it, th... | 0 | 5,813 |
Jquery set slider value | <p>I have one slider to select time range, from 1 (,2,3,..) day (,weeks,months,..) ago until now. It sets time and date in inputs and it works correctly with this code</p>
<pre><code><div id="inputs" style="margin-top: 10px;">
<div style="margin-top: 0px; margin-bottom: 2px;">
<input type=... | 0 | 2,692 |
PHP upload to MySQL database with download and view file | <p>Does not download correctly: can't open the link. Help appreciated. I am new to PHP and MySQL. I have MySQL set to BLOB for the content and I am not sure how to be clearer, I can see the link(s) for the file with the respective id to the file content $id in the url, but when I click on the link nothing opens up, I ... | 0 | 1,373 |
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 | <p>I am using struts and hibernate. I have a parent and child relation using set in hbm.
In the action I am using <code>session.saveOrUpdate()</code> method to save but while saving it is showing the below error. Can anyone help regardng this with explanation where I made the mistake?</p>
<p>Here is my hbm.file</p>
<... | 0 | 8,657 |
What is the best way to test Controllers and Services with JUnit? | <p>I have this Spring MVC controller:</p>
<pre><code>@Controller
@RequestMapping(value = "/foo")
public class FooController {
@Inject
private FooService fooService;
@RequestMapping(value = "foo/new")
public final String add(final ModelMap model) {
model.addAttribute(fooService.createFoo());
... | 0 | 1,314 |
Compilation error: A net is not a legal lvalue in this context | <p>I am a newbie to Verilog and had a problem while defining a <code>if-else</code> loop. The error message is </p>
<blockquote>
<p>A net is not a legal lvalue in this context" for all assign statements in the given code.</p>
</blockquote>
<pre><code>always @(adbar)
if (adbar==1'b1)
begin
assign Z[0] =... | 0 | 1,227 |
Unable to find CMake in Android Studio | <p>I need to add C/C++ code in my Android program for which I needed LLDB, CMake, and NDK. I found LLDB and NDK in SDK manager, but CMake is missing from there. I tried manually downloading it from the CMake official site and found out that for Android we need SDK customized CMake.</p>
<p><a href="https://i.stack.imgu... | 0 | 2,120 |
Understanding compiler-generated type in dotPeek decompiled code | <p>Hei. I was reading <code>Digi Traffic Accelerator</code>'s decompiled source (I think it is the best way to learn), until I got some non-understandable code! Please take a look:</p>
<pre><code> internal class ProxyFarm
{
private static Random rand = new Random();
private static Regex UserPassAtHostPort =... | 0 | 3,105 |
Nested parcelable object not reading | <p>I'm trying to parcel an object which contains some string/int variables and an object variable. The strings and int's are working, but not the nested object. I understand I would have to it also parcelable, but I'm apparently doing something wrong=. In my nested class, the <code>writeToParcel</code> method gets call... | 0 | 1,209 |
Google Maps InfoWindow Z-Index | <p>Is it possible for an InfoWindow to popup <strong>over</strong> an element which has a higher Z-Index than the google map?</p>
<p>So lets say the google map has a z-index of Zero. The element has a z-index of 100.
Clicking a marker displays an InfoWindow in the same region as the element. How do we get this InfoWi... | 0 | 2,464 |
InnoSetup - Check if visual studio 2010 crt redist is installed, if not then run installer | <p>I currently have this in this part of Inno script</p>
<pre><code>[Run]
Filename: {app}\bin\vcredist_x86.exe; Parameters: "/q:a /c:""VCREDI~3.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""" """; WorkingDir: {app}\bin; StatusMsg: Installing Visual Studio 2010 C++ CRT Libraries...
</code></pre>
<p>It will run vcredis... | 0 | 1,025 |
PlatformException (PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null)) | <p><strong>The line where is going to crash:</strong></p>
<pre><code>GoogleSignInAccount googleUser = await _googleSignIn.signIn();
</code></pre>
<p><strong>What have I tried:</strong></p>
<ol>
<li>I've generated my SH1 key with this command <code>keytool -list -v \
-alias androiddebugkey -keystore ~/.android/debug.... | 0 | 2,083 |
allocating an object of abstract class type error | <p>Hi I'm getting the following error and am really unsure why. </p>
<pre><code>class InteSiVis: public ofBaseApp //{
, public ofxMidiListener{
</code></pre>
<p>This occurs when I make class inresivis inherit from the ofxMidiListener class and I get the following error in the main source file</p>
<p>int main( ){</p... | 0 | 2,089 |
Databinding: using the static resource (assigning programatically?) DataGrid | <p>Perhaps it would be better if I explained why I need to do this.</p>
<p>This is not the true example, but in my working solution, the user will start with a relation group like this:</p>
<p>Apple -> Red
Banana -> Yellow</p>
<p>In the app, in different screens (e.g. Add fruit and add color) they have the power to ... | 0 | 2,082 |
Fixed height for bootstrap pre-scrollable DIV | <p>In my application I have to display bootsatarp grid for database records. Since the number of records count are large enough to view without full page scrolling I wrap my table with bootstrap pre-scrollable div and it gave me the functionality to scroll the table. However all the time DIV size is half of the browser... | 0 | 1,048 |
Angular 5: "No provider for ControlContainer" | <p>I have a little web app with Angular 5 and out of a sudden I am getting this strange error message in my browser console:</p>
<pre><code>ncaught Error: Template parse errors:
No provider for ControlContainer ("
</p>
<form class="container" (ngSubmit)="update()">
[ERROR ->]&l... | 0 | 1,240 |
Trying to add module to project. Plugin with id 'kotlin-android' not found | <p>I am trying to add a epub reader library to a project I have already created. The library I am trying to add to my project as a moduel is the Folio Reader Library (<a href="https://github.com/FolioReader/FolioReader-Android" rel="noreferrer">https://github.com/FolioReader/FolioReader-Android</a>). I have downloaded ... | 0 | 1,933 |
How to configure multiple subdomain with SSL in Apache? | <p>Configuration:</p>
<ul>
<li>Debian</li>
<li>Apache2</li>
<li>Wildcard SSL for: *.example.com</li>
<li>subdomain: a.example.com, b.example.com.</li>
<li>1 dedicated server</li>
<li>Websites are in NodeJS (ProxyPass...)</li>
</ul>
<p>For now, i'm able to get a.example.com to work.
But how i can make a.example.com AN... | 0 | 2,601 |
ES6 Classes for Data Models | <p>I'm trying to use ES6 Classes to construct data models (from a MySQL database) in an API that I'm building. I prefer not using an ORM/ODM library, as this will be a very basic, simple API. But, I'm struggling to get my head around how to define these models.</p>
<p>My data entities are (these are just some simplifi... | 0 | 2,253 |
io.netty.util.IllegalReferenceCountException: refCnt: 0 in Netty | <p>I try to create a proxy and then pass all the trafic other handlers in Netty. I understand I should manage the references to ByteBuf but I cannot understand how to do it. My example and the exception is below. </p>
<p>Initializer:</p>
<pre class="lang-java prettyprint-override"><code>public class HexDumpProxyIniti... | 0 | 2,736 |
patch: Only garbage was found in the patch input | <p>I produced a diff.txt file with the command (executed from ~):</p>
<pre><code>diff -r /full/path/to/directory/A /full/path/to/directory/B > diff.txt
</code></pre>
<p>The generated diff file looks good.</p>
<p>Now I run (always from ~)</p>
<pre><code>patch -p0 <diff.txt
</code></pre>
<p>or I also tried:</p... | 0 | 9,339 |
Bootstrap change the navbar font-size | <p>I have wasted 2 hours, searching for the solution. I want to change the font size of the navbar and change the font-size even in the media queries. I can change the color not the font and sometimes the font changes size in the <code>col-lg</code> but not in the <code>media-queries</code></p>
<hr>
<p><strong>HTML</... | 0 | 1,596 |
Zend Framework 2 - Hydrator strategy for Doctrine relationship not working | <p>As mentioned <a href="https://stackoverflow.com/q/14140447/1331671">here</a> I'm building a custom hydration strategy to handle my related objects in a select box in a form.</p>
<p>My form looks like this:</p>
<pre><code>$builder = new AnnotationBuilder($entityManager);
$form = $builder->createForm(new MyEnt... | 0 | 1,723 |
Android Canvas to Bitmap | <p>I have been searching online on how to turn what is on a canvas into a Bitmap. I have attempted multiple ways to do this like saving the drawing cache to a bitmap, but the end result is the background bitmap flashing on for a moment, then turning into a black screen. The test image is displayed over the background, ... | 0 | 1,203 |
JBWEB000236: Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException: value is null | <p>Hi I am new to <code>JBoss</code> and trying to deploy my web application in <code>JBoss EAP 6</code>. The deployment is successful and while trying to access the application I am getting the below exception. I am using <code>logback</code> and <code>slf4j</code> for logging in my application. Can anyone help me fin... | 0 | 1,397 |
javascript addEventListener not working more than once | <p>I'm trying to do a relatively simple javascript program/page, just 3 sliders RGB to affect the color of a square and circle. </p>
<p>It works GREAT when I have the event listeners 'inline' with the input elements: i.e., <code>onchange="someFunction(x,y)"</code></p>
<p>However, when I move the event listeners to b... | 0 | 2,484 |
How to fix java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 | <p>I am creating an android application that consists of a serial communication.I am getting an error <strong>called java.lang.ArrayIndexOutOfBoundsException: length=1; index=1</strong> please tell me how to fix it</p>
<p>This is my usb driver:</p>
<pre><code>public class UsbDriver {
private final Context mAppli... | 0 | 6,863 |
How to deploy a war file in jboss using maven pom.xml? | <pre class="lang-xml prettyprint-override"><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
... | 0 | 1,667 |
Running Tensorflow in Jupyter Notebook | <p>I am trying to do some deep learning work. For this, I first installed all the packages for deep learning in my Python environment. </p>
<p>Here is what I did. </p>
<p>In Anaconda, I created an environment called <code>tensorflow</code> as follows</p>
<pre><code>conda create -n tensorflow
</code></pre>
<p>Then i... | 0 | 4,683 |
Symfony2 access user and doctrine in a service | <p>I'm running the equivalent of this code in lots and lots of controller actions, basically it grabs the user's username, and if that username is attached to a blog entity it will allow the user to see the blog entity(s):</p>
<pre><code> $em = $this->getDoctrine()->getManager();
$user = $this->get('se... | 0 | 1,121 |
TensorFlow: InternalError: Blas SGEMM launch failed | <p>When I run <code>sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})</code> I get <code>InternalError: Blas SGEMM launch failed</code>. Here is the full error and stack trace:</p>
<pre><code>InternalErrorTraceback (most recent call last)
<ipython-input-9-a3261a02bdce> in <module>()
1 batch... | 0 | 2,399 |
timed out after 30000 ms while waiting for a server that matches WritableServerSelector | <p>I have seen this problem at many forums but none of them resolved my issue. I am trying to insert a sample document to MongoDB DB. Unfortunately, during the insert process <code>colReceived.insert(doc)</code> I got following error:</p>
<blockquote>
<p>SEVERE: Servlet.service() for servlet spring threw exception
... | 0 | 4,493 |
Const declarations require an initialization value | <p>I want to add TypeScript to my project and I got this error while adding a type to the array:</p>
<pre class="lang-none prettyprint-override"><code>SyntaxError:
my/path/of/file:
Const declarations require an initialization value (2:28)
1 | //keycodes of restricted characters for all our amount inputs
2 | ex... | 0 | 1,936 |
dynamic sql error: 'CREATE TRIGGER' must be the first statement in a query batch | <p>As part of some administrative tasks, we have many tables that each need a trigger created. The trigger will set a flag and the date in the Audit database when an object has been modified. For simplicity, I have a table with all the objects that need triggers created.</p>
<p>I am trying to generate some dynamic sql... | 0 | 1,508 |
Can't install PHP Package on CentOS | <p>I am having trouble re-installing PHP via yum on my server hosted by digital ocean.</p>
<p>I had PHP 5.4 installed but wanted 5.6. I added/enabled the remi repo's, ran <code>yum -y remove php*</code> and then tried to re-install php.</p>
<p>When I run <code>yum -y install php</code> I get the following:
</p>
<pre... | 0 | 1,220 |
how to get rid off garbage in array of chars? | <p>I'm writing a C program but I keep having problems with my array of chars. I keep getting garbage when I print it using prinf. here is an example of what I get when I print it:</p>
<p>char at t.symbol is <strong>Aôÿ¿</strong> <br/>
char at tabl[0].symbol is A <br/>
char at tabl[1].symbol is a <br/>
char at tabl[2].... | 0 | 1,078 |
Java, Intellij IDEA problem Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED | <p>I have newly installed</p>
<pre><code>IntelliJ IDEA 2021.2 (Ultimate Edition)
Build #IU-212.4746.92, built on July 27, 2021
Licensed to XXXXXX
Subscription is active until August 15, 2021.
Runtime version: 11.0.11+9-b1504.13 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-80-generic
GC: G1 Young G... | 0 | 2,738 |
After MySQL change to utf8mb4, Error Unknown character set index for field '224' received from server | <p>I've changed our server MySQL database to use utf8mb4 because we need to support emoticon. I have followed the instruction based on <a href="http://mathiasbynens.be/notes/mysql-utf8mb4" rel="noreferrer">How to support full Unicode in MySQL databases</a> article by Mathias Bynens. The only difference is I wasn't chan... | 0 | 1,869 |
Failed to start bean 'eurekaAutoServiceRegistration' | <p>I have the following error starting ApplicationContext in my SpringBoot application:</p>
<pre><code>org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is java.lang.NullPointerException
at org.springframework.context.support.DefaultLifecycl... | 0 | 1,647 |
React Native - How to manage the native back button with Drawer Navigation | <p>I recreated the Drawer Navigation following this code: <a href="https://github.com/mariodev12/react-native-menu-drawer-navigator" rel="nofollow noreferrer">https://github.com/mariodev12/react-native-menu-drawer-navigator</a></p>
<p>Everything works correctly but now I do not know how to handle the native button to ... | 0 | 1,287 |
SSL certificates and Boost asio | <p>Hello I'm trying to download content from webpage that uses https via C++. My very basic client program taken from the Boost asio examples compiles and runs fine, but when I test it eg with Google: www.google.co.uk/?gws_rd=ssl, it gives me the error "handshake: certificate verify failed". </p>
<p>I think this is be... | 0 | 1,551 |
Dreamweaver: background-image set at height: auto will show no content | <p>I've read quite a number of questions here today to hopefully answer my question with no avail, so I hope someone here can help me.</p>
<p>I am trying to evolve my website to a responsive web design, and am having issue with the images.</p>
<p>Issue:</p>
<p>I am trying to load the images from my css labeled as ba... | 0 | 1,799 |
ASP.Net C# Save PDF to directory | <p>I have a webpage that should work as the following:
When a user fills the form's fields and hits submit, a PDF file will be generated for the user (filled with the info the user entered) and that PDF file gets saved in a directory.</p>
<p>What I have is, when the user hits Submit the PDF gets generated for the user... | 0 | 2,018 |
Cannot instantiate class | <p>iam facing a problem i have written a method navback, which i need to use regularily to navigate back. when iam running it is throwing a error.</p>
<p>below is the Code.</p>
<pre><code> package Examples;
import java.util.concurrent.TimeUnit;
//import org.junit.BeforeClass;
import org.testng.annotations.Befor... | 0 | 1,638 |
Artisan migrate could not find driver | <p>I am trying to install Laravel. I have installed <code>Xampp</code>, but when I try to setup my database using <code>php artisan migrate</code>I get the error:</p>
<blockquote>
<p><strong>[Illuminate\Database\QueryException] could not find driver (SQL: select * from information_schema.tables where table_schema ... | 0 | 1,044 |
Issue while reading Excel document (Java code) | <p>I have some Java code which reads the Excel data. On running the Java code, it's showing the following error. Help me resolve the same. Also, I need to know other method of reading <em>.xlsx</em> file.</p>
<p>(A small edit) how I can print rows with their respective columns. For example: </p>
<pre><code>Age
19
20
... | 0 | 1,297 |
HTML/CSS: How to create scrollbar for tr | <p>Can someone tell me how to create a scrollbar for the inner table? The inner table is not displayed within the container. I colored the background of the container yellow. The table itself is blue.</p>
<p>I wanna see a scroll bar within the table.</p>
<p>Source:
<a href="http://nopaste.info/e51385254e.html" rel="n... | 0 | 1,968 |
GWT confirmation dialog box | <p>I'm trying to create a modal confirmation dialog box. I'd like it to work like <code>Window.confirm("")</code>, where I can just call it, and get a boolean response. </p>
<p>My trouble is I'm not sure how to do it. I'm trying to use MVP in my application. Here is the code I have so far:</p>
<pre><code>public cl... | 0 | 1,562 |
Create a empty JSON object from an existing JSON object array | <p>I have a JSON object with two arrays of an object <code>x</code>.</p>
<p>I'm using angularJS and I want to add/edit/delete objects in the JSON (just like the Angular TODO app example on angular.org).</p>
<p>Is there a way to create a new empty (with the structure of <code>x</code> but no values) JSON object of <co... | 0 | 1,187 |
Hibernate : attempted to assign id from null one-to-one property: employee | <p>This is my Database structure, One-to-One mapping in MySQL:</p>
<p><img src="https://i.stack.imgur.com/oodn4.png" alt="DB Schema"></p>
<p>This is my java file:</p>
<pre><code>public class Employee {
private EmployeeDetail empdetail;
private String firstname;
private String lastname;
// getters and setters
}
... | 0 | 2,136 |
This type of error comes:- Cannot find module 'sharp' | <pre><code>Error: Cannot find module 'sharp'
Require stack:
- D:\Marketing\sbj-react\suburban\node_modules\gatsby-plugin-manifest\safe-sharp.js
- D:\Marketing\sbj-react\suburban\node_modules\gatsby-plugin-manifest\gatsby-node.js
- D:\Marketing\sbj-react\suburban\node_modules\gatsby\dist\bootstrap\resolve-module... | 0 | 1,862 |
Why is Numpy with Ryzen Threadripper so much slower than Xeon? | <p>I know that Numpy can use different backends like OpenBLAS or MKL. I have also read that MKL is heavily optimized for Intel, so usually people suggest to use OpenBLAS on AMD, right?</p>
<p>I use the following test code:</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
def testfunc(x):
np.r... | 0 | 1,837 |
UITableView-Swift: Checkmark in UITableViewCell | <p>I'm using Xcode 6.0.1, iOS8 and Swift.
I have to reproduce in my <code>UITableView</code> the same behavior of the <strong>Auto-Lock</strong> option in <strong>Settings->General</strong>. In Objective-C, in the past, I wrote</p>
<pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPat... | 0 | 1,139 |
How to return to the previous page after a submit form with php? | <p>I have a form in html whose "action" attribute calls a contact.php file. The problem is that after I submit the form, the file that is visible is a blank page with the address contact.php and I want to see again the form of the main page.</p>
<pre><code>HTML:
<form id="myForm" action="php-contact/contact.php"
... | 0 | 1,277 |
ERROR in Error during template compile of 'AppModule' | <p>Trying to build an Angular 6 app. I am getting the following error when using <code>--prod</code></p>
<pre><code>ERROR in Error during template compile of 'AppModule'
Expression form not supported in 'reducers'
'reducers' contains the error at app/app.module.ts(48,3).
</code></pre>
<p><strong>app.module.ts</st... | 0 | 1,341 |
Query ElementCollection of Enum by using JPA Criteria API | <p>I'm working of a web application for a car dealer. I have a Car class with a field which contain a set of security enums.</p>
<pre><code>public class Car {
@Id
@GeneratedValue
private Long id;
@NotNull(message = "{year}")
@Min(value = 1950)
@Max(value = 2020)
@Column(nullable = false)
... | 0 | 1,027 |
AngularJS: RangeError: Invalid time value at Date.toISOString (<anonymous>) | <p>In my project, i have to show in the jquery (angular-jquery-datepicker) date picker, the date formatted in the correct way for the user in his/her zone.
I'm able to show in USA and EU format. When the user set those dates i have to save it with the toISOString to the database. However, for the USA no problem at al... | 0 | 1,612 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.