title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
maven bad class javax.annotation.PostConstruct
<p>I am trying to build a war project. and on compile it gives me this error: </p> <blockquote> <p>[compiler:compile] Compiling 432 source files to C:\Beta\ECORP5\ECORP5-web\target\classes ------------------------------------------------------------- COMPILATION ERROR : ---------------------------------------...
0
3,128
keep the current tab active with twitter bootstrap after a page reload?
<p>I know this question was asked before and answered in the following post:</p> <p><a href="https://stackoverflow.com/questions/10523433/how-do-i-keep-the-current-tab-active-with-twitter-bootstrap-after-a-page-reload/10524697#10524697">How do I keep the current tab active with twitter bootstrap after a page reload?</...
0
4,436
How to align radio button to center
<p>I want radio buttons in the image below to be <code>center</code> aligned. I have used gravity but it's not working.</p> <p><a href="https://i.stack.imgur.com/r8VsY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/r8VsY.png" alt="enter image description here"></a> I have used this code </p> <pre><code> ...
0
1,904
HTML Dropdown Menu not working
<p>I am working on this website <a href="http://www.aoaluminiumproducts.com.au/" rel="nofollow">http://www.aoaluminiumproducts.com.au/</a>, and i cant seem to get the drop-down working. I would like the "Services" tab to be a drop-down item with the sub nav 1 links etc (I will change the names). </p> <p><strong>HTML/C...
0
3,110
Bootstrap 4 custom list-group collapse caret functioning incorrectly
<p>I have customized a Bootstrap 4 list-group, to include the collapse functionality.</p> <p>I have included a css caret arrow, so the use case should be: 1. initial state is pointing down 2. when clicked points up 3. clicked again points back down to its initial state</p> <p>My issue is is that on the initial click ...
0
1,824
StorageException: An unknown error occurred, please check the HTTP result code and inner exception for server response
<p>I use Firebase Storage to <code>upfile</code>. But it does not work THIS IS MY CODE.</p> <pre><code>FirebaseStorage storage = FirebaseStorage.getInstance(); StorageReference storageRef = storage.getReferenceFromUrl(&quot;gs://the-food-house.appspot.com/&quot;); // Create a reference to &quot;file&quot; StorageRe...
0
1,406
exe file made with pyinstaller being reported as a virus threat by windows defender
<p>I'm trying to create an exe using pyinstaller for a school project but, windows defender seems to report a virus threat and blocks the file. I want to send this exe to some other people but i wouldn't be able to do that unless I fix this. So these are my queries- <strong>Why does the exe file get reported as a virus...
0
2,962
Laravel Multi Auth - Admin Guard
<p>I have two guards in laravel</p> <pre><code>'guards' =&gt; [ 'web' =&gt; [ 'driver' =&gt; 'session', 'provider' =&gt; 'users', ], //Our Admin custom driver 'web_admin' =&gt; [ 'driver' =&gt; 'session', 'provider' =&gt; 'admins', ...
0
2,132
How to display user control within the main window in WPF using MVVM
<p>I have a WPF application and just embarked in learning MVVM pattern.</p> <p>My goal is that in my application the main window has a button. When this button is clicked, another window (or user control) will appear on top of the main window.</p> <p>This is the code of MainWindow.xaml</p> <pre><code>&lt;Window x:Cl...
0
2,033
Customizing JWT response from django-rest-framework-simplejwt
<p>I'm setting up Django to send a JWT Response as opposed to a view. I tried using django-rest-framework-simplejwt.</p> <p>Provided in this framework, there is a function <code>TokenObtainPairView.as_view()</code> that returns a pair of jwt. I need to return the access token with another Json response as opposed to th...
0
1,495
How to prevent @change event when changing v-model value
<p>I'm building an auto-complete menu in Vue.js backed by Firebase (using vue-fire). The aim is to start typing a user's display name and having match records show up in the list of divs below. </p> <p>The template looks like this:</p> <pre><code>&lt;b-form-input id="toUser" type="text" v-model="selectedTo...
0
1,206
Apple Mach-O Linker Errors (20) - Undefined symbols for architecture armv7
<p>I received these errors after I added " -all_load " in the "Other Linker Flags" build setting once I added "libPusher-combined.a" and its header files. I followed the <a href="https://github.com/lukeredpath/libPusher/wiki/Adding-libPusher-to-your-project">instructions</a> exactly up to the part of typing in "-all_lo...
0
1,329
CMake and Clang Tooling linking error (out-of-tree)
<p>I am trying to compile the <a href="http://clang.llvm.org/docs/RAVFrontendAction.html" rel="nofollow noreferrer">RecursiveASTVisitor example of Clang</a> using a CMake file. Building the project goes well, however, linking C++ executable fails with multiple undefined references to LLVM and Clang libraries. I am buil...
0
5,333
Use CSS to keep the top-level navigation hover effect on when the mouse is over the sub-menu
<p>When you mouseover a navigation item, the colour of the link changes to white and background of that link goes black. The hover state does a display:block on a hidden nested . When I move the mouse over to the nested (i.e. the sub menu), the hover state on the top-level nav returns back to the way it was. How do...
0
1,089
How to fix "Forbidden!Configured service account doesn't have access" with Spark on Kubernetes?
<p>I am trying to run the basic example of <a href="https://spark.apache.org/docs/latest/running-on-kubernetes.html#submitting-applications-to-kubernetes" rel="noreferrer">submitting a spark application with a k8s cluster</a>.</p> <p>I created my docker image, using the script from the spark folder : </p> <pre><code>...
0
2,553
How to set height of <nav> in html or css
<p>How can I decrease the size of a <code>&lt;nav&gt;</code> tag in CSS? I cannot seem to figure it out. I have provided all of the code from my project below. My code did have PHP, but I have removed it due to it being unnecessary. Here is a <a href="https://jsfiddle.net/x5h226pp/" rel="nofollow">JSFiddle</a>, if you ...
0
3,357
dynamic c# ValueKind = Object
<p>As i'm trying to access <strong>object values</strong> using <strong>JsonSerializer.Deserialize</strong> using debugger.<br> <a href="https://i.stack.imgur.com/NaMXf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NaMXf.png" alt="enter image description here" /></a></p> <p>Here is my result which i'm havi...
0
1,348
C# Manually stopping an asynchronous for-statement (typewriter effect)
<p>I'm making a retro-style game with <code>C#</code> <code>.NET-Framework</code>, and for dialogue I'm using a for-statement, that prints my text letter by letter (<em>like a typewriter-effect</em>):</p> <p><a href="https://i.stack.imgur.com/4TV3L.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4TV3...
0
1,359
jquery animate doesn't work
<p>Hi I have a simple slider with this codes:</p> <p>HTML Code:</p> <pre><code>&lt;div id="gallery"&gt; &lt;a href="#" id="left-arrow"&gt;..&lt;/a&gt; &lt;a href="#" id="right-arrow"&gt;..&lt;/a&gt; &lt;div id="container"&gt; &lt;div class="item"&gt;...&lt;/div&gt; &lt;div class="item"&gt;...
0
1,095
org.postgresql.util.PSQLException: The connection attempt failed
<p>I am connecting to postgres data base using java web services (<strong>apache axis</strong>) with <strong>JDBC</strong> connections to get the data.But suddenly in most of times i am getting an exception of <code>org.postgresql.util.PSQLException: The connection attempt failed.</code> and some times it is working fi...
0
2,126
How to preload images using Vue.js?
<p>I have a small app using Vue.Js (with webpack). I have a transition section. When the user clicks to a button the content going to change. It's a simple <code>DIV</code> element with an <code>IMG</code> child element. My problem is when the user clicks the button, the next image will be loaded in real-time and it's ...
0
1,031
CancellationException when using ExecutorService
<p>I want to wait two tasks to finish then return the result of them but sometimes I get this error. Why? Where did CancellationException come from?</p> <pre><code>public class ShouldVoteTask extends AbstractWorkerTask&lt;Void, Void, Boolean&gt; { private final int placeID; private final int userID; publ...
0
1,612
How do I enable https support in libcurl?
<p>When I try to <code>$ brew update</code> I'm getting the error:</p> <pre><code>error: Protocol https not supported or disabled in libcurl while accessing https://github.com/mxcl/homebrew/info/refs?service=git-upload-pack </code></pre> <p>However, when I <code>$ curl --version</code>, I see:</p> <pre><code>curl 7....
0
1,108
What's the best name for a non-mutating "add" method on an immutable collection?
<p>Sorry for the waffly title - if I could come up with a concise title, I wouldn't have to ask the question.</p> <p>Suppose I have an immutable list type. It has an operation <code>Foo(x)</code> which returns a new immutable list with the specified argument as an extra element at the end. So to build up a list of str...
0
1,849
How to solve munmap_chunk(): invalid pointer error in C++
<p>I have an application in C++ and OpenCV which tries to use the classification model realized with SVMLight in order to add the weight values which can be use for HOG Calssificator under OpenCV.</p> <p>The problem is that when I run the application, I get this error:</p> <pre><code>./main Converting Model file... 1...
0
7,221
UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON with Jest + Angular
<p>Using the jest-preset-angular to perform the unit test, but got an warning as <code>UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON</code> not sure what causing the error, due to this the application is stuck and not running the other unit test.</p> <pre><code>PASS src/app/pages/r...
0
1,667
Vuex: [vuex] module namespace not found in mapState() | mapGetters(): X/
<p>Following from the Vuex documentation for organising the store modularly (<a href="https://vuex.vuejs.org/guide/modules.html" rel="noreferrer">https://vuex.vuejs.org/guide/modules.html</a>), I have the following in:</p> <p><code>store/index.js</code>:</p> <pre><code>import Vue from "vue"; import Vuex from "vuex"; ...
0
1,265
Why does the keyboard not show in my UITextView?
<p>I have a container class which is a view controller.<br> It holds the UITextView for notes and has another view controller as a subview, called it PDFViewController. That one has an array of view controllers, called them PageViewController's, in it and a UIScrollView so i can swipe through the different view control...
0
1,894
Springboot :BeanDefinitionStoreException: Failed to parse configuration class
<p>I am trying to execute my springboot application by running the jar created with maven and getting below exception which is not getting resolved after so many attempts.Any help or pointers would be appreciated.</p> <p>Thanks in advance.</p> <p>Please find below exception trace.</p> <pre><code> 2016-01-28 11:35:4...
0
10,329
How to get values from json String
<p>I have a json string string from which I want to get the values. It is in key pair form so I want the values for each key.</p> <p>I tried to get the values but I am not getting it.</p> <p>Json String is like :</p> <pre><code>{ "document": { "xmlns:xsi": "http:\/\/www.w3.org\/2001\/XMLSchema-instance",...
0
1,196
How to display jQuery Validation error container only on submit
<p>I am trying to make the <a href="http://docs.jquery.com/Plugins/Validation" rel="nofollow noreferrer">Validation plugin</a> work. It works fine for individual fields, but when I try to include the demo code for the error container that contains all of the errors, I have an issue. The problem is that it shows the con...
0
1,757
eglfs on raspberry2 -- * failed to add service - already in use?
<p>that's is my first post here.</p> <p>I'd like to keep it short...</p> <p><strong>Following problem:</strong></p> <p>i want to run a qt5/qtquickcontrols2 application utilising the eglfs backend on a raspberry-pi 2b, accelerated by vc4, of course. Ideally, it should run in kiosk mode and it definitely needs acceler...
0
2,958
EntityManager cannot use persist to save element to database
<p>I met the problem of persisting element to database using EntityManager. Based on the answers I found, I tried those 4 ways in my DaoJpa to do such thing but still failed. Here I attached the four ways I tried:</p> <p>Code in Controller part:</p> <pre><code> @Transactional SmartProduct smartProduct = new Sm...
0
1,316
Multi series bar chart in .NET Chart control
<p>I'm trying multi series bar chart based on "Name" but it's throwing an error</p> <blockquote> <p>The chart area contains incompatible chart types. For example, bar charts and column charts cannot exist in the same chart area. </p> </blockquote> <p>Here is my code:</p> <pre><code> Chart1.Series["Se...
0
1,400
word search in java 2d array
<p>I am trying to create a simple word search for a class assignment, and I have managed to figure out how to search east (from left to right) and west(right to left). But I am having trouble trying to figure out how to search south (top to bottom).</p> <p>The code that I have works for one file that I read in but the...
0
3,888
Missing files for `magic` library on Windows
<p>I need to get mime type for some files on windows, so i've installed <code>python-magic</code> (on 32-bit python 2.7.3).<br> It depends on unix <code>magic</code> library.<br> Author instructs to get <code>regex2.dll</code>, <code>zlib1.dll</code> and <code>magic1.dll</code> from gnuwin32 project. So i saved the fil...
0
1,025
Angularjs: [$injector:modulerr] Failed to instantiate module ui-router
<p>I'm a relative newbie in Angular and after following the tutorial I now want to build something from scratch on my own. So I'm trying to set up a basic app in which I want to use <a href="https://github.com/angular-ui/ui-router/wiki" rel="nofollow">the $stateProvider</a> (since I read that it is better than the $rou...
0
2,655
sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.NoneType' is not mapped
<p>I have 3 sqlalchemy models setup which are all one to many relationships. The User model contains many Task models and the Task model contains many Subtask models. When I execute the test_script.py I get the error <code>sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.NoneType' is not mapped</code>.</p> <p...
0
1,638
ExtJS grid Panel Paging toolbar not showing required number of records per page
<p>I am new to extJS and I am trying to show 8[a random number] records in a grid panel and am also using paging toolbar to show 4 records per page but it shows 8 records in one page only. </p> <pre><code>var myData = [ ['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'], ['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'...
0
1,189
Makefile - .o: file not recognized: File truncated?
<p>I'm just learning GNU make, but I'm having trouble linking when using .d (dependency) files. Can anyone point me in the right direction with this <strong>error</strong>:</p> <p><code>...../part1.o: file not recognized: File truncated recipe for target 'bin/target/prog' failed</code></p> <p>It's a simple program c...
0
1,348
WindowsError: [Error 183] Cannot create a file when that file already exists
<p>I am using the following script to add a copy right to all the files in the directories and subdirectories for a give directory passed as first argument ,am running the script as follows but running into below error... can anyone provide inputs on ohw to fix it?</p> <p>ERROR:-</p> <pre><code>C:\Dropbox\copyrights&...
0
1,142
How to use random number generator with if statements
<p>so I am making a text-based game, and I want to use a random number generator to say if the random number that it generates is 3, that it will say that a certain monster has appeared. For some reason it is having trouble allowing me to do an if statement for the random number. Here is the code:</p> <pre><code>impor...
0
2,051
Expected undefined to be defined How do i fix it
<p>I am trying to test my Angular with Jasmine but somehow i keep getting this error Expected undefined to be defined and i have followed that angular documentation example i am on mean stack</p> <p>test.js</p> <p>describe('Testing Ecdreport Controllers', function(){ var $scope, controller;</p> <p><div class="sn...
0
1,648
MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core) on Android
<p>I am getting the above error when calling <code>Firebase.initializeApp()</code> in my flutter code. I have followed the documentation here: <a href="https://firebase.flutter.dev/docs" rel="noreferrer">https://firebase.flutter.dev/docs</a></p> <p>Here is my pubspec.yaml</p> <pre><code>dependencies: flutter: sdk...
0
1,357
Delegate must respond to locationManager:didUpdateLocations swift eroor
<p>Hy guys, I'm making an app in swift 3.0 but I ran across a problem pretty soon. I set up necessary functions to ask for permission to use a location but every time I run the app I get the same error...</p> <p>Viewcontroller.h</p> <pre><code>import UIKit import MapKit class ViewController: UIViewController { ...
0
2,775
Configure mysql to work with entity framework 6 code first
<p>I know this questions has been asked in many forms previously, but I was wondering if there was something about my setup that is preventing this from working.</p> <p>I am using visual studio 2010 EF 6, mysql connector 6.8.3, mysql for visual studio 1.1.3.</p> <p>Here are the relevant config file sections I have us...
0
3,601
AttributeError: 'numpy.int64' object has no attribute 'startswith'
<p>I'm getting this error when I try to create a factorplot with seaborn in an ipython notebook.</p> <p>Here's the end of the stack trace:</p> <pre><code>/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.pyc in get_legend_handles_labels(self, legend_handler_map) 4317 ...
0
1,088
how to validate the simple php login form with the mysqli query?
<p>this is my php code</p> <pre><code>&lt;?php $con=mysqli_connect("","","",""); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }\\check connection $username = mysqli_real_escape_string($con, $_POST["username"]); $password=mysqli_real_escape_string($con$_POST["password"]...
0
1,072
How to use ActiveX with ASP.NET
<p>I have created an ActiveX component, but not able to access that ActiveX compoment in ASP.NET. It gives "Microsoft JScript runtime error: Automation server can't create object" error message while creating activeX object using javascript.</p> <p>ActiveX Component Code:</p> <pre><code>using System.Runtime.InteropSe...
0
1,056
java.lang.NoClassDefFoundError: org/apache/log4j/Level - slf4j?
<p>I am trying to deploy my application, but it gives me an error: Failed to instantiate SLF4J LoggerFactory Reported exception:</p> <pre><code>java.lang.NoClassDefFoundError: org/apache/log4j/Level at org.slf4j.impl.StaticLoggerBinder.&lt;init&gt;(StaticLoggerBinder.java:75) at org.slf4j.impl.StaticLoggerBind...
0
1,909
Morse Code Conversion using Java
<p>I'm trying to learn about hashmaps and 2D arrays in Java. We have an assignment due to have a scanner that accepts a string and converts it to morse code. The code we're using is based of a method full of if statements, but I want to learn how I would do something like this using lists, hashmaps, or 2D arrays. ...
0
2,495
Kerberos installation error, error: Setup script exited with error: command 'i686-linux-gnu-gcc' failed with exit status 1
<p>I am trying to install python kerbos library, setup.py fails with following. I have already done sudo apt-get update and sudo apt-get install python-dev(in that order). Here is the complete trackback of the process. </p> <pre><code>vaibhav@vaibhav-UCVN:~/Downloads/requests-kerberos-master$ sudo ./setup.py install r...
0
1,474
Controlling line color and line type in ggplot legend
<p><strong>Background</strong></p> <p>In Germany, there are 16 federal states, ten of which belonged to West Germany, six of which belonged to East Germany. In some respects, for example mortality rates of certain cancers, there are persistent differences between the ten former western states and the six former easter...
0
3,559
Solving a "communications link failure" with JDBC and MySQL
<p>I'm trying to connect to the local MySQL server but I keep getting an error.</p> <p>Here is the code.</p> <pre><code>public class Connect { public static void main(String[] args) { Connection conn = null; try { String userName = "myUsername"; String password = "myPassw...
0
1,746
ObservableCollection not thread-safe even in .NET 4.5?
<p>I am banging my head against the virtual wall for days now. The BindingOperations.EnableSynchronization method seems to work only partial in .NET 4.5.</p> <p>I wrote a test that fails sometimes:</p> <pre><code> object blah = new object(); Application app = Application.Current == null ? new Applicat...
0
1,094
Error creating bean with name 'mongoTemplate' defined in class path resource Mongobee
<p>Using the Mongobee for Data Migration creating and error as <code>Error creating bean with name 'mongoTemplate' defined in class path resource</code></p> <p><strong>Migration configuration</strong></p> <pre><code>@Configuration public class ProductMigration { private final Environment environment; private fi...
0
7,323
How to create a .usdz animation?
<p>You can now convert 3D models to <code>.usdz</code> files (uncompressed zip archive) using Apple's command line tool bundled with Xcode 10 beta.</p> <p>Example code to convert an <code>.obj</code> file to <code>.usdz</code>:</p> <pre><code>xcrun usdz_converter magnifying_glass.obj -g frame magnifying_glass.usdz -...
0
1,396
How to fix "This is probably not a problem with npm. There is likely additional logging output above." error?
<p>I'm trying to create a project using Vue CLI. But I received this error message:</p> <pre><code> throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:26) Emitted 'error' event at: at GetAddrInfoReq...
0
1,516
java.lang.IllegalStateException: endPosTable already set
<p>Trying to build an alexa (amazon:echo) skills set. At the same time, trying to use this experience as a learning testbed for dependency injection through dagger 2. However, building the package using maven-2 cmd:</p> <pre><code>mvn assembly:assembly -DdescriptorId=jar-with-dependencies package'. </code></pre> <p>...
0
1,101
Configure SSL certificates with Hibernate, Spring and JDBC
<p>I'm trying to move from an unencrypted JDBC connection using a username and password to log in to my MySQL database server, to a connection using SSL and certificate-based authentication. I'm using Hibernate with Spring MVC. My WebAppConfig file looks like this:</p> <pre><code>package com.****.PolicyManager.init; ...
0
1,735
Error:Cannot change dependencies of configuration ':app:_debugAnnotationProcessor' after it has been resolved
<blockquote> <p>Gradle Project Refresh Failed</p> </blockquote> <p>After I added <a href="https://github.com/flavioarfaria/KenBurnsView" rel="noreferrer">KenBurnsView</a> Library to <code>build.gradle</code> on app level. When I try to sync the gradle it failed.</p> <p><strong>build.gradle</strong> (app level)</p> ...
0
1,362
Flutter - ListView inside on a TabBarView loses its scroll position
<p>I have a very simple Flutter app with a <strong>TabBarView</strong> with two views (<strong>Tab 1</strong> and <strong>Tab 2</strong>), one of them (<strong>Tab 1</strong>) has a ListView with many simple Text Widgets, the problem with this is that after I scroll down the ListView elements of <strong>Tab 1</strong>,...
0
1,216
Android: calling Java class from C++ Native Activity
<p>Java code:</p> <pre class="lang-java prettyprint-override"><code> package local.ttt; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Typeface; public class Text2Bitmap { static ...
0
1,312
Change ListView background - strange behaviour
<p>I have a problem with changing the background of a view in a ListView.</p> <p><strong>What I need:</strong><br> Change the background image of a row onClick()</p> <p><strong>What actually happens:</strong><br> The background gets changed (selected) after pressing e.g. the first entry. But after scrolling down the ...
0
1,734
How do you create multiple forms on the same page with redux-forms v6?
<p>I have a simple todo app in which my redux store contains an array of 'todos'. My 'Todo' component maps over every 'todo' in the store and renders a 'TodoForm' component that uses redux-forms v6.</p> <p>As it is now, every 'todo' shares the same form name/key, so every time I input something in the 'title' Field, i...
0
2,237
Most optimized way to delete all sessions for a specific user in Django?
<p>I'm running Django 1.3, using Sessions Middleware and Auth Middleware:</p> <pre><code># settings.py SESSION_ENGINE = django.contrib.sessions.backends.db # Persist sessions to DB SESSION_COOKIE_AGE = 1209600 # Cookies last 2 weeks </code></pre> <p>Each time a user logs in from a differe...
0
1,162
Unit testing a Web API controller
<p>I am fairly new to unit testing and I am trying to create a unit test for a Web API contoller that I have created which returns a list of brands.</p> <p>My Web API controller <code>Get()</code> method looks like this:</p> <pre><code>[HttpGet("/api/Brands/Get", Name = "GetBrands")] public async Task&lt;IActionResul...
0
1,077
correct way to include .cpp and .h files in an Arduino sketch
<p>First, the problem:</p> <p>main sketch file:</p> <pre><code>char foo; // required to clean up some other problems #include &lt;Arduino.h&gt; // tried it in desperation, no help #include "a.h" void setup(){ Serial.begin(9600); Serial.println("\nTest begins"); for (int num = -1; num &lt; 1; num++){...
0
1,955
How to set up NAT with Vagrant
<p>I am currently running the most recent version of Vagrant with the VMWare Workstation Provider addin (though I don't think the second part is relevant). I am looking to run webservers for my development work (i.e. NGINX or Rails Server) so that I can access them through an IP (Or DNS Spoofed Domain name) from the ho...
0
1,589
How can I make my class immune to the "auto value = copy of proxy" landmine in C++?
<p>I have a fairly complex maths library I'm working on, and I have discovered a nasty bug when client code uses auto. Halfway through creating a minimal reproductive case to ask a question about it, I realise I can reproduce something similar using the standard library alone. See this simple test case:</p> <pre><code>...
0
1,441
Jackson JSON parser invalid utf-8 start byte
<p>I'm trying to parse the following JSON and I keep getting a <code>JsonParseException</code>:</p> <pre><code>{ &quot;episodes&quot;:{ &quot;description&quot;:&quot;Episode 3 – Oprah's Surprise Patrol from 1\/20\/04\nTake a trip down memory lane and hear all your favorite episodes of The Oprah Winfrey Show fr...
0
1,541
Getting an out of memory error while using Create React App and Plotly.js
<pre><code>&lt;--- Last few GCs ---&gt; [972:000001913A837320] 40900 ms: Mark-sweep 2049.2 (2066.3) -&gt; 2047.3 (2059.3) MB, 2062.9 / 0.1 ms (+ 179.6 ms in 113 steps since start of marking, biggest step 8.9 ms, walltime since start of marking 2512 ms) (average mu = 0.153, current mu = 0.107) [972:000001913A837320...
0
1,253
Total canvas memory use exceeds the maximum limit (Safari 12)
<p>We are working on a <a href="https://affinitymap.epfl.ch" rel="noreferrer">visualization web application</a> which use d3-force to draw a network on a canvas.</p> <p>But now we’ve got a problem with browsers on iOS, where the process crashes after few interactions with the interface. To my recollection, this was not...
0
1,438
Close SessionFactory in Hibernate 4.3
<p>I'm upgrading my Hibernate to the latest version. With my old <code>HibernateUtil.java</code> I had no problems but when upgrading it, the SessionFactory doesn't seem to close anymore. </p> <p>This is my <strong>new</strong> <code>HibernateUtil.java</code> class:</p> <pre><code>import org.hibernate.HibernateExcept...
0
1,913
Can't override the angular material theme with my css properties
<p>I am using <code>Angular 6.0.8</code> with <code>Angular Material theme</code> version 6.4.0</p> <p>Whenever I try to slightly modify the material theme, it never works, as I always find the material theme properties to overwrite my CSS properties as follows:</p> <p><div class="snippet" data-lang="js" data-hide="f...
0
1,154
How to set a dynamic "id" HTML attribute of an angular component?
<p>My problem is related to placing the same component with different parameters on the same page. In this case it is a component containing a chart from a third party Javascript library (<a href="https://d3js.org/" rel="noreferrer" title="D3JS">D3JS</a>) which needs an HTML <code>id</code> attribute to locate and modi...
0
2,235
JerseyTest using GrizzlyWebTestContainerFactory in Jersey 2.13
<p>I am trying to get a JerseyTest running using a <code>org.glassfish.jersey.test.grizzly.GrizzlyWebContainerFactory</code>. I already searched the internet and tried several things for the better part of a day. It seems to be impossible and I would really appreciate any help on how to get this up and running. </p> <...
0
2,489
Why is Postgres not using index on a simple GROUP BY?
<p>I have created a 36M rows table with an index on <code>type</code> column:</p> <pre><code>CREATE TABLE items AS SELECT (random()*36000000)::integer AS id, (random()*10000)::integer AS type, md5(random()::text) AS s FROM generate_series(1,36000000); CREATE INDEX items_type_idx ON items USING btre...
0
1,100
Use Unity API from another Thread or call a function in the main Thread
<p>My problem is I try to use Unity socket to implement something. Each time, when I get a new message I need to update it to the updattext (it is a Unity Text). However, When I do the following code, the void update does not calling every time. </p> <p>The reason for I do not include <code>updatetext.GetComponent&lt;...
0
1,124
How to configure and use jQuery with webpack
<p>I have a very simple project to test run jQuery function with webpack. However I ran into errors at the bundle step. Here are the errors:</p> <pre><code>ERROR in ./~/jQuery/lib/node-jquery.js Module not found: Error: Cannot resolve module 'jsdom' in /home/mypc/IdeaProject/OpenDimSum/frontend/node_modules/jQuery/lib...
0
1,090
xcode: class is not key value coding-compliant
<p>I'm currently working myself through this tutorial: <a href="https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/ConnectTheUIToCode.html#//apple_ref/doc/uid/TP40015214-CH22-SW1" rel="noreferrer">https://developer.apple.com/library/content/referencelibrary/GettingStarted/De...
0
3,132
InvalidOperationException: A circular dependency was detected for the service of type 'Microsoft.AspNetCore.Identity.UserManager
<p>This happens after I customized the asp.net core identity services to support multi-tenancy based on <a href="https://github.com/Avareto/Asp.Net-Core-Identity-Multitenancy/tree/master/AspNetCoreMultitenancy/Models" rel="nofollow noreferrer">This article</a>. I simplified it to suite my needs.</p> <p>Here is my basi...
0
1,147
How to Increase the MaxArrayLength in a WCF web.config - for uploading large files
<p>I have dig all around the net for two days about it, and I can't make my asp.net web site to upload files bigger then 16Kb I'm using fileUploader,wcf, and I have service reference in the client. when I upload file in 30KB size it asked me to increase the MaxArrayLength.</p> <blockquote> <p>The maximum array lengt...
0
1,915
HTML/CSS How to center DIV inside absolute DIV
<p>I have a problem I can't solve. i m trying to center this black box inside red box which has absolute position. I tried making the black box to relative position but i feel like i am missing something. </p> <p><strong>Ultimately, i m trying to make the top header.</strong> </p> <p>here is an image <a href="https:/...
0
1,294
How to get jstree to work properly with ajax loaded content
<p>For a project I am trying to create an ajax-powered treeview control. My ajax scripts are working fine on the back end, but the tree is not being displayed properly. When I hard code the ajax response into my tree container, it is displayed properly:</p> <p><img src="https://i.imgur.com/Yq88GZS.png" alt="correct"><...
0
1,304
React - Cannot read property 'call' of undefined
<p>Everything seems to work with this small app except adding a new note. Button is located on the Board component. </p> <p>i know this problem is usually caused by not binding value of 'this' properly. I'm not sure if that's the issue here or if i'm missing something else. Thanks</p> <p>Demo: <a href="http://jsbin.c...
0
1,419
Spring security3 "You cannot use a spring-security-2.0.xsd schema"
<p>I keep getting...</p> <pre><code> org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: You cannot use a spring-security-2.0.xsd schema with Spring Security 3.0. Please update your schema declarations to the 3.0 schema. Offending resource: ServletContext resource [...
0
5,577
The Completest Cocos2d-x Tutorial & Guide List
<p>I'm developing a game using Cocos2d-x to Android and iPhone. At the beggining, I had a lot of problems to start using this library, so, in this question, I want to collect all basic, medium and expert tutorials because there are a lot of info questions doing the same mistakes. When I <a href="https://stackoverflow.c...
0
3,053
SEHException was unhandled
<p>I have a vs2010 c# solution that was working fine yesterday. </p> <p>When I try and run a debug instance today I keep getting an <code>SEHException</code> was unhandled. </p> <p>This error is being thrown in the <code>InitializeComponent</code> method of the startup form. </p> <p>Any Ideas?</p> <p>Here's the sta...
0
1,160
Adding Boolean Column Value in Ruby on Rails
<p>I am working on a Ruby on Rails project that creates a web blog. I am looking to add a boolean database field called featured to the Post model. This field should be editable via the active admin interface that I have added.</p> <p>I used the following code, but I don't even get another column showing up on the we...
0
1,141
PHP fopen and fwrite throws no error, but the files aren't written to or created. Why?
<p>I am simply trying to pass some information to a PHP script using jquery $.post() and then write that information to a text file. The post is working just fine. No errors are thrown, as far as I know...but the files aren't created and when I put the file there it isn't written to. Am I missing something? Here's ...
0
1,283
TypeError: Cannot read property 'create' of undefined error in express, postgres, sequelize
<p>I'm trying to create a login system with <code>Express</code>, using <code>Postgres</code> and an <code>ORM</code> called <code>Sequelize</code> </p> <p>Here is my code:</p> <p>user.js <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre clas...
0
2,706
ESLint: 'cy' is not defined (Cypress)
<p>I've just started using Cypress with my React Typescript project. I've gotten some simple tests to run:</p> <pre class="lang-js prettyprint-override"><code>describe('settings page', () =&gt; { beforeEach(() =&gt; { cy.visit('http://localhost:3000') }); it('starts in a waiting state, with no settings.', ()...
0
1,437
Adding a column which contains a hyperlink for every row in KendoUI grid control in ASP.NET MVC
<p>Here is my View that contains the KendoUI Grid Control: I want to add a new column that contains a hyperlink before the Date of creation column .</p> <pre><code>@using Kendo.Mvc.UI @model IEnumerable&lt;ExamplekendoDropdown.Models.FacilityGroup&gt; @{ ViewBag.Title = "Grid"; } &lt;table width="700"&gt;...
0
1,337
How to use rootBundle in flutter to load images?
<p>I use image plugin (<strong>image: ^2.0.4</strong>) so I can write something on to the image and later save it new image to device or send via mail. I try to load image using "<strong>new File</strong>" but got error on Flutter. I ask and search and got a hint that I can use rootBundle to load image in Flutter. I di...
0
1,703
Pop up window over Android native incoming call screen like true caller Android app
<p>I am developing a broadcast receiver for incoming calls in Android and on getting incoming calls I want to inflate a pop up over the native incoming call screen.</p> <p>I completed that code. But now the problem is that in the <a href="http://en.wikipedia.org/wiki/Android_version_history#Android_4.2_Jelly_Bean_.28AP...
0
1,883
Javascript pagination
<p>Can someone help me please? I have little knowledge of JS... I tried <a href="https://stackoverflow.com/questions/1523163/jquery-pagination-plugin/1523265#1523265"> this</a> example, that brianpeiris wrote.. It worked nicely, but I need two different pagers in the same page. How can I accomplish this?</p> <p>This c...
0
1,103
Using a child controller from another module
<p>I've defined a module and made it the main module for my app using the ng-app directive. I added two controllers to the main app using angular.module('myApp').controller(). One of those controllers has page wide scope whereas the other controller is a child controller.</p> <p>What I'm now trying to do is include a ...
0
1,724
Catch/Handle MySQL Duplicate Entry Error - with NodeJS, PassportJS, Express, connect-flash, Heroku
<p>I am doing user registration for a node app, starting from <a href="http://scotch.io/tutorials/javascript/easy-node-authentication-setup-and-local" rel="noreferrer">this</a> example, but using a MySQL database instead of MongoDB. Multiple columns in the <strong>users</strong> table have a uniqueness constraint. </p>...
0
1,437
Drag and drop rows within QTableWidget
<p><strong>Goal</strong></p> <p>My goal is to have a <code>QTableWidget</code> in which the user can drag/drop rows internally. That is, the user can drag and drop one entire row, moving it up or down in the table to a different location in between two other rows. The goal is illustrated in this figure:</p> <p><img ...
0
1,231