title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How to call a SOAP webservice with a simple String (xml in string format)
<p>I have this string representing a XML: </p> <pre><code>String soapCall="&lt;soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&gt; &lt;soap:Body xmlns:m="http://www.example.org/stock"&gt; &lt;m:addDownloadParams&gt; &lt;m:idApp&gt;"; soapC...
0
2,095
ExpressJS/Typescript - Unabe to Retrieve ZoneAwarePromise value?
<p><strong>UPDATE 1 STARTS</strong></p> <p>Issue is that I am not able to get all the cities and locations in sequence once I draw the FormArray again and this is becuase of the loop only. Anyways, I am new to TS, you might understand much better. Thanks again.</p> <pre><code>import { Component, OnInit, NgZone } from...
0
10,844
How to use QThread correctly in pyqt with moveToThread()?
<p>i read this article <a href="http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/" rel="noreferrer">How To Really, Truly Use QThreads; The Full Explanation</a>, it says instead of subclass qthread, and reimplement run(), one should use moveToThread to push a QObject onto...
0
2,340
What's the correct way to implement AsyncTask? static or non static nested class?
<p>The "Login" from Android examples implemented <code>AsyncTask</code> as a non-static inner class. However, according to Commonsguys, this class should be static and use weak-reference to the outside activity <a href="http://commonsware.com/blog/2010/09/10/asynctask-screen-rotation.html">see this</a>.</p> <p>So what...
0
3,833
Mercurial for Beginners: The Definitive Practical Guide
<p><em>Inspired by <a href="https://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide">Git for beginners: The definitive practical guide</a>.</em></p> <p>This is a compilation of information on using Mercurial for <strong>beginners</strong> for <strong>practical</strong> use.</p> <p>...
0
2,179
ReferenceError: Parse is not defined
<p>I get this error with a Parse.com JS App:</p> <blockquote> <p>ReferenceError: Parse is not defined.</p> </blockquote> <p>I really don't know why. Everything looks good to me. The files are linked correctly; I've checked this a few times. Is it not true, that I have to put my own JS right below Parse and it shoul...
0
1,941
Keycloak Spring boot configuration
<p>I'm trying to configure Spring Boot and Keycloak for SSO. I've created a basic AngularJS application that do some requests to the Spring boot backend. <a href="http://slackspace.de/articles/authentication-with-spring-boot-angularjs-and-keycloak/" rel="nofollow noreferrer">using this</a></p> <p>The Angular app is wo...
0
10,443
How to click a particular button within a window (without using XPOS YPOS)
<p>I have just started using AUTOHOTKEY and its been phenomenal.I have a doubt though. I want to automate the launching of an application and then clicking on a specific button in it.I would like to accomplish this using AHK.</p> <p>Once I launch the applicaton this window appears <a href="https://www.dropbox.com/s/vk...
0
2,093
Binding Path Fill to Button Foreground in ContentPresenter
<p>I have a Button Style with a Template containing a ContentPresenter, in which I am attempting to bind the Fill of a Path to the Foreground of a button:</p> <pre><code>&lt;!-- This is inside the template of a button style --&gt; &lt;ContentPresenter&gt; &lt;ContentPresenter.Resources&gt; &lt;Style TargetType="{x:...
0
1,404
Force release the connection in weblogic 10.3.4
<p>I am getting following error in my managed server console on oracle soa server(11g).</p> <pre><code>-------------------- &lt;Apr 14, 2011 10:51:37 AM SGT&gt; &lt;Warning&gt; &lt;JDBC&gt; &lt;BEA-001153&gt; &lt;Forcibly releasing inactive connection "weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnect...
0
3,076
SonarLint plugin not working in Eclipse Oxygen
<p>I am trying to get SonarLint plugin working in Eclipse but I am not having much luck. More specifically, I don't see any issues detected or highlighted in the "SonarLint On-the-fly" tab when looking at a simple Java class in a Java project.</p> <p>I use the following software.</p> <p><strong>OS</strong>: </p> <p>...
0
1,408
the type org.springframework.data.repository.query.QueryByExampleExecutor cannot be resolved. It is indirectly referenced from required .class files
<p>Good morning, I have a head the end of the week with an error in the project that I'm doing for the study of springboot + angular + jpa.</p> <p>At the time of doing a service management class, I used it according to the tutorial of an extended class of class JpaRepository.</p> <p>But a project error that I can not...
0
1,650
Ant script: Have <exec> tag dump out entire command line
<p>I have an ant build script with a fairly complex <code>&lt;exec&gt;</code> command with lots of <code>&lt;arg&gt;</code> tags that I'm trying to troubleshoot. I was wondering if it is possible to view the entire command line after ant has constructed it; either in the eclipse debugger or maybe by dumping it to a fil...
0
3,815
JtaTransactionManager no rollback after failed commit during "flush"
<p><br/> <strong>Update:</strong> I was testing it with Bitronix TM and it rollbacks perfectly, so the issue is in JBoss TM (arjuna) or in my configuration. <br/></p> <p><strong>Update 2:</strong> It looks like transactions are not global, I've tried different datasources, Bitronix datasource has <em>allowLocalTransac...
0
8,345
Angular 2 Routing with Home Page
<p>I am learning Angular2 Routing and try to display the Welcome Page. My app has three pages</p> <ul> <li>Welcome Page (it's just a blank page with just links to other Routes)</li> <li>Home Page - Some texts and Description</li> <li>Todo List Page - List of ToDos</li> </ul> <p>The problem is that I cannot manage to ...
0
1,235
Cakephp 3.0.3 How do I use the default layout?
<p>I just installed cakephp 3.0.3 with composer and I am running the built in development cake server to view my site. I have only made two changes to the project. After working with the project for a little while, I realized the default.ctp layout is not loading on my pages.</p> <p>The first thing I did was configure...
0
6,100
Get PDF hyperlinks on iOS with Quartz
<p>I've spent all day trying to get hyperlinks metadata from PDFs in my iPad application. The CGPDF* APIs are a true nightmare, and the only piece of information I've found on the net about all this is that I have to look for an "Annots" dictionary, but I just can't find it in my PDFs. </p> <p>I even used the old <a ...
0
1,852
ui-bootstrap-tpls failed to load template
<p>I've inherited an angular project, and it's having problems loading the ui-bootstrap-tpls modules.</p> <p>For each directive it's trying to use from bootstrap, I get something similar to the following:</p> <p>Error: [$compile:tpload] Failed to load template: template/datepicker/popup.html</p> <p>I've read about t...
0
3,116
ConstraintViolationException when trying to persist
<p>I get the following error whenever I try to persist a child objects to a existing father object in JPA:</p> <blockquote> <p>Caused by: javax.validation.ConstraintViolationException: Validation failed for classes [store.entidades.Sucursal] during persist time for groups [javax.validation.groups.Default, ] List o...
0
2,174
jQuery: Clearing Form Inputs
<p>I have tried to different ways to clear a form:</p> <pre><code>&lt;form action="service.php" id="addRunner" name="addRunner" method="post"&gt; First Name: &lt;input type="text" name="txtFirstName" id="txtFirstName" /&gt;&lt;br /&gt; Last Name: &lt;input type="text" name="txtLastName" id="txtLastName" /&gt;&lt;br /...
0
1,583
Trigger "onchange" event
<p>The "onchange" event is triggered only when the USER enters some value. Why isn't possible to fire the event when I change the value automatically via Javascript ? Is there an alternative ?</p> <p><strong>Animation:</strong></p> <p><img src="https://i.stack.imgur.com/vqCom.gif" alt="enter image description here"><...
0
1,132
ASP.NET / C#: DropDownList SelectedIndexChanged event not firing
<p>My selectedindexchanged event is not firing when I select values in my dropdown lists. These dropdown lists are implemented dynamically in the following code. I have tried changing autopostback and enableviewstate settings to no avail. I am using a static panel. Does anyone see how I can cause the selectedindexc...
0
3,006
Accessing Keys from Linux Input Device
<h2>What I am trying to do</h2> <p>So, I have been trying to access keyboard input in Linux. Specifically, I need to be able to access modifier key presses <strong>without</strong> other keys being pressed. Furthermore, I want to be able to do this <strong>without</strong> an X system running.</p> <p>So, in short, my...
0
2,023
how to resolve jsoup error: unable to find valid certification path to requested target
<p>I am trying to parse the html of the following URL:</p> <p><a href="https://www.smuc.ac.kr/mbs/smuc/jsp/board/list.jsp?boardId=6993&amp;id=smuc_040100000000" rel="noreferrer">https://www.smuc.ac.kr/mbs/smuc/jsp/board/list.jsp?boardId=6993&amp;id=smuc_040100000000</a></p> <p>I'm getting the following error:</p> <p...
0
1,341
Block Check-In on Policy Failure
<p>I've created the check-in policy <a href="https://msdn.microsoft.com/en-us/library/bb668980.aspx" rel="nofollow noreferrer">from this MSDN article</a> as an example (code is just copy / pasted).</p> <p>This works fine, it appears when I try and do a check-in, however it appears as an warning. So I can ignore it by...
0
1,483
Jenkins and maven-buildnumber-plugin
<p>I am using <a href="http://mojo.codehaus.org/buildnumber-maven-plugin/" rel="nofollow">maven-buildnumber-plugin</a> version 1.0-beta-4. This works fine on a project checked out of Subversion, but fails in Jenkins.</p> <p>I assume this problem is due to Jenkins somehow removing the <code>.svn</code> folders.</p> <p...
0
1,433
How do I get jqGrid to work using ASP.NET + JSON on the backend?
<p>ok, I'm back. I totally simplified my problem to just three simple fields and I'm still stuck on the same line using the addJSONData method. I've been stuck on this for days and no matter how I rework the ajax call, the json string, blah blah blah...I can NOT get this to work! I can't even get it to work as a funct...
0
2,431
Warning Prop `href` did not match. using react server-side-rendering
<p>I am using <code>react-router-dom</code> and I am guessing that this is causing the problem, but I have no clue where to even start looking or how to fix it. I also am getting errors like <code>Warning: Did not expect server HTML to contain a &lt;nav&gt; in &lt;div&gt;</code>.</p> <p>As I stated, I'm not really sur...
0
1,103
Deleting File and Directory in JUnit
<p>I'm writing a test for a method that creates a file in a directory. Here's what my JUnit test looks like:</p> <pre><code> @Before public void setUp(){ objectUnderTest = new ClassUnderTest(); //assign another directory path for testing using powermock WhiteBox.setInternalState(objectUnderTest, "...
0
1,143
Using Java sessions for login/logout
<p>Having trouble getting session to work in my Java application.</p> <p>My login.jsp page calls this <code>LoginAction</code> page.</p> <pre class="lang-java prettyprint-override"><code>package struts.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax....
0
1,703
This method requires a body instead of a semicolon
<p>Selected lines "&lt;------- These" gives an erroror: This method requires a body instead of a semicolon</p> <p>Both files must work together. How to fix it I need quick help. Does anyone have any idea but i dont?</p> <pre><code>package API.Info; import Mains.MiniEvents; import org.bukkit.configuration.file.FileC...
0
1,602
GdxRuntimeException: Couldn't load file
<p>I am following <a href="http://code.google.com/p/libgdx/wiki/HelloWorld" rel="nofollow">this</a> tutorial on libgdx. What i am trying to do is loading a texture from a copy of badlogic.jpg (copy is called wawa.jpg):</p> <pre><code>public class HelloWorld implements ApplicationListener { SpriteBatch spriteBatch;...
0
1,256
java.lang.ExceptionInInitializerError in the creation of hibernate configuration
<p>I'm working on a Hibernate project and I configured everything.</p> <p>So, I generated the beans and hbm files.</p> <p>Then, I wrote a test class to test the project(I used the <code>Client</code> class)</p> <p>When I executed the code, the following exception was thrown:</p> <pre><code>java.lang.ExceptionInInit...
0
1,952
Checkbox checked or unchecked boolean php mysql
<p>I am trying to make this form with checkboxes get values 1 or 0, sort of a boolean, and UPDATE it on mysql, but I havent found a way yet. Maybe you can help. I'll post the form and the code that receives it. I am sure there might be a conflict of loops, but I tryed everything and couldnt get it working. Tks in advan...
0
1,294
Getting issue while deploying spring boot war on tomcat 7
<p>I am having issue in deploying my code on the tomcat server I have written the below code.</p> <p>My main class:</p> <pre><code>package com.indiamart.search; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.build...
0
3,345
TypeError: Cannot read property 'apply' of undefined for Express framework
<p>app.js</p> <pre><code>var app = express(); app.listen(PORT, () =&gt; console.log(`Listening on ${ PORT }`)); // all environments app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); a...
0
2,592
invalid new-expression of abstract class type error
<p><strong>Homework</strong> <br/> I'm getting this type of error for my Merge Sort function. I think the error has something to do with my <code>merge()</code> method, but I thought I took care of it by using it in <code>MergeSort()</code>. Any help would be appreciated.<br/><br/> Sort.h</p> <pre><code>#ifndef SORT_H...
0
1,180
ERROR 1007 (HY000) at line 1: Can't create database 'mgsv'; database exists
<p>I converted this <a href="https://github.com/qunfengdong/mGSV/" rel="nofollow noreferrer">original</a> project into a docker-compose project <a href="https://github.com/mictadlo/mGSV-docker" rel="nofollow noreferrer">here</a> and followed a their setup <a href="https://github.com/qunfengdong/mGSV/blob/master/INSTALL...
0
6,104
GDB won't load source file
<ol> <li>I'm using <code>arm-linux-gcc</code> to compile a simple C file at host (debian i386) with <code>-g</code>.</li> <li>Then copy the <code>a.out</code> file to the target (arm,uclibc) computer.</li> <li>Run the <code>a.out</code> – it's just ok.</li> <li>Use GDB (target) <code>gdb a.out</code> and list the sourc...
0
3,218
Online shopping cart java
<p>I'm having a hard time figuring out why this code is not adding up at the end in "TOTAL COST".</p> <p>Two classes: </p> <p>ShoppingCartPrinter.java and ItemToPurchase.java</p> <p>The result I keep getting are all 0's in "TOTAL COST". Any help would be greatly appreciated. Thanks.</p> <p>ShoppingCartPrinter.ja...
0
1,272
How to use a RegExp literal as object key?
<p>I would like to use create a object that contains regular expressions as the key value. I tried to use the following syntax:</p> <pre><code>var kv = { /key/g : "value" }; </code></pre> <p>But it fails according <a href="http://www.javascriptlint.com/">JavaScript lint</a>:</p> <pre><code>SyntaxError: invalid p...
0
1,059
AOP : java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
<p>I am new to AOP. I got some problem like this.</p> <pre><code>package org.suman.Aspect; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; @Aspect public class LoginAspect { //@Before("execution(public String getName())") //@B...
0
1,260
How to .Scan() a MySQL TIMESTAMP value into a time.Time variable?
<p>I have this Go code:</p> <pre><code>package main import ( "fmt" "database/sql" _"github.com/go-sql-driver/mysql" "time" ) type User struct { id uint32 name string email string rating uint8 subscription uint8 ...
0
1,554
Under Spring Framework: WARN: WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader)
<p>I have spent all day trying to solve the logging problem I'm having with log4j in a webapp. No matter what I do, I cannot get rid of the following:</p> <pre><code>log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properl...
0
3,947
Huffman Tree Encoding
<p>My Huffman tree which I had asked about earlier has another problem! Here is the code: </p> <pre><code>package huffman; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.ArrayList; import java.util.PriorityQueue; import java.util.Scanner; public class Huffman { public ArrayLis...
0
2,178
Transpose of a sparse matrix in C++
<p>I am very new to C++. Here, I am trying to find out transpose of a sparse matrix. Here is the code:</p> <pre><code>#include&lt;iostream&gt; using namespace std; class transposeM{ int m1[20][20],m2[20][20],i,j,row,column,t; public: void read(){ t=0; cout&lt;&lt;"Enter the number of row: \n"; ...
0
1,702
JTable in JScrollPane
<p>I am adding <code>JTable</code> in a <code>JScrollPane</code> then adding scrollpane to the panel, then adding panel to the frame but it doesn't work here's the code. I want to have scroll bar on table or frame that will make table scrollable so user can see it. I have tried many ways but non worked for me here is...
0
1,158
View layout doesn't refresh on orientation change in android
<p>I'd like my VIEW layout to be adjusted on orientation change.</p> <p>My Manifest is set up with: <code>android:configChanges="keyboardHidden|orientation"</code> on the activity.</p> <p>I have <code>res/layout-land</code>, <code>res/layout-port</code>.</p> <p>I have <code>onConfigurationChanged</code> in my <code>...
0
1,028
How to cast object to type described by Type class?
<p>I have a object:</p> <pre><code>ExampleClass ex = new ExampleClass(); </code></pre> <p>And:</p> <pre><code>Type TargetType </code></pre> <p>I would like to cast ex to type described by TargetType like this:</p> <pre><code>Object o = (TargetType) ex; </code></pre> <p>But when I do this I get:</p> <blockquote>...
0
1,024
How to navigate one page to another page using AngularJs
<p>How to navigate from one page to another page. Assume i have a login page, after entering username and password fileds while click on submit button it needs to validate and if both username and password is correct it needs to go home page. Home page content needs to display. Here i am posting code. In Browser url is...
0
1,350
Out of memory on a 16571536 byte allocation
<p>Basically i'm adding a wallpaper picker for android 4.4.2 lockscreen background and when the image is set and i turn the screen off then back on to view the lockscreen my screen is going black and logcat is giving me an out of memory allocation error. So far i have tried using Bitmap decodeFile(String pathName) and ...
0
3,579
How to Create Dynamic Menu from Database using Menu control in asp.net?
<p>I want to create a menu from Database and show in Menu Control.</p> <p>Code Here in .aspx page:</p> <pre><code> &lt;asp:Menu ID="Menu1" Orientation="horizontal" StaticMenuItemStyle-CssClass="menuItem" DynamicMenuItemStyle-CssClass="menuItem" runat="server"&gt; </code></pre> <p>In .cs P...
0
1,478
docker-compose mysql container denies access to wordpress container
<p>I have a problem with mysql 5.7 container denying access to wordpress container. I'm using docker-compose and I'm running docker on Mac OSX. Docker should be on latest version available.</p> <p>Here's my docker-compose.yml</p> <pre><code>version: '2' services: wordpress: depends_on: - db image: wo...
0
1,170
How to properly copy/clone DOM element and then paste/insert it as HTML element in Angular.js?
<p>So I've got such big webapp that uses Angular.js.<br />Small part of this webapp has sidebar which, currently, displays two div containers: one that shows user profile stats (thumbnail, reputation, messages, some skills .etc) and second which is slider (angular-ui) carousel showing some images.</p> <p>What I want t...
0
1,718
Search data in table using ajax in ASP.net MVC
<p>I want to display data in a table based on the search criteria in a textbox. I have implemented it without using Ajax but do not know how to call controller method using jquery and update table data. Please try to solve my problem. Thanks...</p> <p>Index.cshtml</p> <pre><code>@model IEnumerable&lt;MvcApplication4....
0
1,208
Docker Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Ubuntu
<p>I was playing with docker and mounted my local mysql to a docker container and connected MySql-Workbench so I could view the DB (experimenting) here is the command I ran.</p> <pre><code>docker run -d --name alldb-mysql -v /var/lib/mysql:/var/lib/mysql -e MYSQL_USER=root -e MYSQL_PASSWORD=password -p 3306:3306 mysql...
0
2,281
HTTP/1.1 401 Unauthorized in Response Headers in Load runner for GET Requests
<p>I am new to Load runner , Am facing am issue while play back of the script</p> <p>LR 12.50</p> <p>O.S Windows 7 SP2</p> <p>Protocol is Mobile HTTP/HTML</p> <p>Recording mode is Proxy</p> <p>Let me explain my scenario</p> <p>While executing following function:</p> <pre><code> web_custom_request("authenticate"...
0
1,595
BeanCreationException : Invocation of init method failed
<p>I am trying to implement LDAP configuration for my Spring Project but LDAP Repository is not getting initialized. </p> <p>Error Trace is - </p> <pre><code>xx:xx:xx.116 [localhost-startStop-1] WARN o.s.w.c.s.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt...
0
5,094
Top 1 on Left Join SubQuery
<p>I am trying to take a person and display their current insurance along with their former insurance. I guess one could say that I'm trying to flaten my view of customers or people. I'm running into an issue where I'm getting multiple records back due to multiple records existing within my left join subqueries. I h...
0
1,954
How can I fix Laravel 5.1 - 404 Not Found?
<p>I am trying to use Laravel 5.1 for the first time. I was able to install it and <code>https://sub.example.com/laravel/public/</code> is displaying what is should. However, views I create are giving me a 404 error Page not found.</p> <p>Here is what I have done so far:</p> <p>I created a controller in <code>laravel...
0
1,397
How to make expandable panel layout in android?
<p>I have very complex layout to do in android ?</p> <p>I need two panels the if one expanded the other is extended and otherwise, i would like to make a behavior like slidingdrawer but because i can have in view only button and nothing else i'm in deep trouble.</p> <p><img src="https://i.stack.imgur.com/Vvscs.png" a...
0
3,028
spring-boot datasource profiles w/ application.properties
<p><strong><em>Updated Question based upon feedback:</em></strong></p> <p>I have a spring-boot application that has three databases: H2 for integration testing, and Postgresql for qa &amp; production. Since spring-boot creates a default datasource for you, I don't have anything defined for my integration tests. I t...
0
1,457
How do I scroll in tmux using the mouse?
<p>I'm using tmux 1.8 on Mac OS X 1.9.3 in the Terminal.app with an Apple magic mouse. I'm also using oh-my-zsh.</p> <p>I can't scroll at all with the mouse when tmux is running. It just scrolls the whole terminal window up which goes beyond the output of tmux.</p> <p>I've tried these settings in the tmux.conf file b...
0
1,408
C# Parallel Vs. Threaded code performance
<p>I've been testing the performance of System.Threading.Parallel vs a Threading and I'm surprised to see Parallel taking longer to finish tasks than threading. I'm sure it's due to my limited knowledge of Parallel, which I just started reading up on.</p> <p>I thought i'll share few snippets and if anyone can point ou...
0
1,577
Error: 1265 SQLSTATE: 01000 (WARN_DATA_TRUNCATED)
<p>First of all, sorry if I wrote some nosense, but I don't usually write in English, and it's a little hard to me. Second, I'm a newbie as programmer, so it's probably my question is too easy and obvius (I promise I tried to find the answer before ask here).</p> <p>Well, I want to practice with php and mysql, so I wa...
0
2,503
How to show validation message below each textbox using jQuery?
<p>I am trying to make a login form in which I have email address and password as the textbox. I have done the validation on the email address part so that it should have proper email address and also on the empty check both for email address and password text box.</p> <p>Here is my <a href="https://jsfiddle.net/aoksoh...
0
1,734
Generic Linked List of Objects (Java)
<p>I'm pretty new to Java, with this being my second class (in College) using it. Towards the beginning of the semester, I made a simple class representing Zombies that holds their age, type, and name. Later on, I made a linked list of integers. Now, I need to make a generic linked list that can hold these 'Zombies'. I...
0
4,104
ErrorHandling in Spring Security for @PreAuthorize AccessDeniedException returns 500 rather then 401
<p>Dear all I like to customize the error handling in a Spring 4 Rest application so it should return a HTTP Code 401 rather a Server Error 500 in case the check in @PreAuthorize annotation in my controller fails.</p> <p>I have an own AuthenticationEntryPoint and AuthenticationFailureHandler registered which its comme...
0
3,394
Use of undeclared type in Swift project
<p>I am trying to import <a href="https://github.com/AndrewShmig/Vkontakte-iOS-SDK-LV/tree/master/Project/Vkontakte-iOS-SDK-LV" rel="nofollow noreferrer">this library</a> in my Swift project. I am doing all step by step from <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Buil...
0
2,220
NIO load file in an unit test from src/test/resources
<p><strong>The Problem</strong></p> <p>I'd like to write a data import in java with java7s NIO. The user enters the path of a file as a String and the programm try to open it by using Paths. When it want to read its DosFileAttributes an java.nio.file.NoSuchFileException: file.txt occures.</p> <p><strong>What i've fou...
0
1,432
Array merge on multidimensional array
<p>Either I'm blind or I can't find this problem anywhere here on SO. Yesterday I had a problem with merging arrays, which I could fix with the help of SO. Today I have, again, a problem with merging arrays, but this time it's with multidimensional Arrays.</p> <p>I have an array <code>$usergroup['groups']</code> and a...
0
1,869
Where to put default-servlet-handler in Spring MVC configuration
<p>In my <code>web.xml</code>, the default servlet mapping, i.e. <code>/</code>, is mapped to Spring dispatcher. In my Spring dispatcher configuration, I have <code>DefaultAnnotationHandlerMapping</code>, <code>ControllerClassNameHandlerMapping</code> and <code>AnnotationMethodHandlerAdapter</code> which allows me to m...
0
1,231
Unable to use webpack dynamic import because of static publicPath
<p>I love the ability to dynamically import a chunk using the <code>import</code> command in webpack 3. Unfortunately it seems as if it can only be used if the resources are in a rather static directory configuration on the server.</p> <p>In my environment the html pages generated dynamically in the backend (let's say...
0
1,171
How to filter and map array of documents in MongoDB query?
<p>So I've got these documents in my people collection:</p> <pre><code>{ "_id" : ObjectId("595c0630939a8ae59053a9c3"), "name" : "John Smith", "age" : 37, "location" : "San Francisco, CA", "hobbies" : [ { "name" : "Cooking", ...
0
2,091
syntax error near unexpected token `('
<p>Below is my code, it keeps telling me that line 10 is causing this "syntax error near unexpected token `('" but I cannot figure out why. I am adding to a code that was already written but the part where it says there is an error is not part of what I added. So I'm very confused about why I'm getting this error. A...
0
1,338
.NET Core RuntimeIdentifier vs TargetFramework
<p>Can someone explain the purpose of this two in csproj file (VS2017):</p> <pre><code>&lt;TargetFramework&gt;netstandard1.6&lt;/TargetFramework&gt; &lt;RuntimeIdentifier&gt;win7&lt;/RuntimeIdentifier&gt; </code></pre> <p>I just migrated from VS2015 and now can't publish my web api because it looks I should use only ...
0
1,055
STM32F429 is not receiving the CAN Message
<p>I am using STM32F429 Microcontroller and need to implement CAN Bus Communication between CAN2 and PCAN View.I am able to transmit the message from CAN2 but I am not able to receive any message.I am using TJA1041A CAN transreceiver in the microcontroller.The Problem is that during debugging my CAN bus are properly in...
0
3,029
$httpBackend in AngularJs Jasmine unit test
<p>I'm unable to get my unit test to work properly. I have a $scope array that starts out empty, but should be filled with an $http.get(). In the real environment, there'd be approx 15 or so objects in the array, but for my unit test I just grabbed 2. For the unit test, I have:</p> <pre><code>expect($scope.stuff.lengt...
0
1,033
Can I use ng-model with isolated scope?
<p>I am creating simple ui-datetime directive. It splits javascript Date object into _date, _hours and _minutes parts. _date uses jquery ui datepicker, _hours and _minutes - number inputs.</p> <pre><code>angular.module("ExperimentsModule", []) .directive("uiDatetime", function () { return { restrict: '...
0
1,439
In python, how can I print lines that do NOT contain a certain string, rather than print lines which DO contain a certain string:
<p>I am trying to condense a very large log file, and to do so, I must eliminate every line which contains the string "StatusRequest" and "StatusResponse", while printing the other lines w/o this string. The code I have so far is as follows (to run from the command prompt):</p> <blockquote> <pre><code> if (sys.argv[...
0
1,281
Android Camera Server Died and Camera Error - 100
<p>I'm facing Camera error 100 while testing my android application, I have found some topics on <code>StackOverflow</code> but they were not so helpful. I'm searching for a relevant solution to fix the error.</p> <p>Code that I've written:</p> <pre><code>mrec = new MediaRecorder(); // Works well mCamera = Camera.o...
0
1,047
Vue.js 3 and typescript : Property '$store' does not exist on type 'ComponentPublicInstance
<p>Can't find anything to solve this seemingly obvious issue.</p> <p>Just upgraded from Vue 2 to Vue 3 and Vuex with Typescript.</p> <p>this.$store doesn't seem to be accessible, despite following the Vue 3 instructions.</p> <blockquote> <p>ERROR in src/components/FlashMessages.vue:28:25 TS2339: Property '$store' does ...
0
2,231
Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)
<p>I am upgrading my angular 2 app from beta 9 to RC5 and i get this error in my form template.</p> <p>Here is the full error</p> <pre><code>zone.js:461 Unhandled Promise rejection: Template parse errors: Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) (" ...
0
7,356
How to create a oAuth request using java?
<p>I need to make a connection with <a href="http://developer.viagogo.net/documentation/api-security/oauth-authentication-for-public-services">Viagogo website</a> using oAuth. Referring to their <a href="http://developer.viagogo.net/documentation/api-security/oauth-authentication-for-public-services">documentation</a> ...
0
1,245
changing font color on hovering the mouse over text
<p>I don't know very much about css, but i'm a tid bit stuck. I want to change the color of the font to a light blue on hover. however, i want the default color to be white... how do i do this? what i have right now, has changed the default text to purple.. and underlined :S it does change the font to blue though, on t...
0
1,258
Nginx reverse proxy to private aws s3 bucket bad gateaway
<p>I have created a private bucket on aws and I want to reverse proxy it using nginx. I have used the same server for all the different proxies. this is the configuration file for nginx:</p> <pre><code>user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { work...
0
1,711
Reading in environmental Variable Using Viper Go
<p>I am trying to make Viper read my environment variables, but its not working. Here is my configuration:</p> <pre><code># app.yaml dsn: RESTFUL_APP_DSN jwt_verification_key: RESTFUL_APP_JWT_VERIFICATION_KEY jwt_signing_key: RESTFUL_APP_JWT_SIGNING_KEY jwt_signing_method: "HS256" </code></pre> <p>And my <code>config...
0
1,664
Representing an Abstract Syntax Tree in C
<p>I'm implementing a compiler for a simple toy language in C. I have a working scanner and parser, and a reasonable background on the conceptual function/construction of an AST. My question is related to the specific way to represent an AST in C. I've come across three styles pretty frequently in different texts/re...
0
1,130
UIView Round Corners with Shadow
<p>I am trying to display a UIView with round corners and with a drop shadow. But the problem is that maskToBounds property only works for either of the case. </p> <p>If maskToBounds is YES then round corners show up and when NO then shadow shows up. Here is the implementation but it only displays round corners with n...
0
1,624
zf2 navigation - 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for navigation'
<p>Hy everybody!</p> <p>I am learning zf2, and trying to set up a navigation panel(based on: <a href="https://stackoverflow.com/questions/11397226/zend-framework-2-zend-navigation">Zend Framework 2: Zend_Navigation</a>), but the answer from the computer is still:</p> <p>An error occurred An error occurred during exec...
0
1,350
How to diagnose a KERN_PROTECTION_FAILURE
<p>I am getting an interesting crash that I can never seem to replicate on the simulator:</p> <pre><code>Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00000008 Crashed Thread: 0 Thread 0 Crashed: 0 libobjc.A.dylib 0x3212e86c 0x3212c000 + 10348 1 StockTwits...
0
1,050
OpenCV: how to use createBackgroundSubtractorMOG
<p>I was trying to go through this tutorial på OpenCV.org:</p> <p><a href="http://docs.opencv.org/trunk/doc/tutorials/video/background_subtraction/background_subtraction.html#background-subtraction" rel="noreferrer">http://docs.opencv.org/trunk/doc/tutorials/video/background_subtraction/background_subtraction.html#bac...
0
3,019
rgb to yuv420 algorithm efficiency
<p>I wrote an algorithm to convert a RGB image to a YUV420. I spend a long time trying to make it faster but I haven't find any other way to boost its efficiency, so now I turn to you so you can tell me if this is as good as I get, or if there's another more efficient way to do it (the algorithm is in C++ but C and ass...
0
10,594
How to set custom handler_name metadata for subtitle stream using FFMPEG
<p>I'm currently using <a href="https://www.ffmpeg.org/" rel="noreferrer">FFMPEG</a> to embed subtitles into my MP4 files and I am stumped trying to figure out how to custom set the "handler_name" metadata tag on my subtitle stream so I can control the name that is displayed when selecting the subtitle within a player ...
0
2,551
Cancel async_read due to timeout
<p>I'm trying to write a wrapper synchronous method around <code>async_read</code> to allow non blocking reads on a socket. Following several examples around internet I have developed a solution that seems to be almost right but which is not working.</p> <p>The class declares these relevant attributes and methods:</p>...
0
1,991
How to call rest api on button click in Angular
<p>I have an angular app, at the moment it has some data coming in from a rest api. I want to just call that api on a click function, what would be the correct way to implement this?</p> <p><strong>component.ts</strong></p> <pre><code>import { Component, OnInit } from '@angular/core'; import { ApiService } from '../....
0
1,189
JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException:
<p>I am working on VPN app and follows the code of <a href="https://github.com/vmlinz/strongswan-android" rel="noreferrer">strongswan</a> app. I have used the code of this app and it is loading <code>.so</code> files through JNI and i have copied these files from the strongswan project. It gives this exception for one...
0
10,726
Reclassing an instance in Python
<p>I have a class that is provided to me by an external library. I have created a subclass of this class. I also have an instance of the original class.</p> <p>I now want to turn this instance into an instance of my subclass without changing any properties that the instance already has (except for those that my subcla...
0
1,417
Wampserver icon not going green fully, mysql services not starting up?
<p>I'm running an application on <code>localhost</code>, it's been running successfully for at least a year now, but suddenly today wampserver isn't starting up. Whenever I rightclick on the taskbar icon and "start all services", it gets orange, but never green. Yesterday there was a data loss problem because one of th...
0
4,229
How to force Java FX scene refresh?
<p>I have an Java FX scene with a start button and several rectangles which represent the tiles of a map. I also have drawn a sphere which represents my explorer (it has to explore the map), but I am having difficulties with running the animation.</p> <p>In my OnMouseClicked handler for the start button, I start an al...
0
1,227