title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
JPA + Spring: UnexpectedRollbackException when Transaction is REQUIRED, REQUIRES_NEW or NESTED | <p>I'm doing my first project with Spring, JPA, and GlassFish 3.1 and I'm having some troubles. I've been looking for a solution for a week, but I have found nothing.</p>
<p>I have an Entity (called Role), a GeneralReposiroty with general methods to access any entity, a RoleRepository which implements particular metho... | 1 | 3,759 |
How to use ApplicationDbContext in a Class / Separate Thread ASP.Net Core | <p>I am attempting to have a separate thread start a looping process to collect and import data from an api call and insert it into a local db. I attempt to create the database connection the same way I do in my controllers but it keeps giving me various errors.</p>
<p>I have tried multiple ways. For the setup below i... | 1 | 3,095 |
Communication between Chrome-app and a homepage with PostMessage | <p>I need to be able to send postMessage from a Chrome App through a webview to the homepage and back.</p>
<p>I have established PostMessage from the Chrome App to the homepage, and the PostMessage is also catched by the homepage and a new one is send back, but this PostMessage reply is not caught by the Chrome App. <... | 1 | 1,482 |
Model Binding for multipart/form-data (File + JSON) post in ASP.NET Core 1.1 | <p>I'm attempting to build an ASP.NET Core 1.1 Controller method to handle an HTTP Request that looks like the following:</p>
<pre><code>POST https://localhost/api/data/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=--------------------------625450203542273177701444
Host: localhost
Content-Length: 474
--... | 1 | 1,070 |
When primary Kafka Broker dies ISR doesn't expand to maintain replication | <p>I am testing resilience of Kafka (apache; kafka_2.12-1.1.0). What i expect is that ISR of a topic should increase it self (i.e. replicate to available node) when ever a node crashes. I spent 4 days googling for possible solutions, but was of no use.</p>
<p>Have 3 node cluster, and created 3 brokers, 3 zoo keepers ... | 1 | 1,654 |
Best practice for parameter: IEnumerable vs. IList vs. IReadOnlyCollection | <p>I get when one would <strong>return</strong> an <code>IEnumerable</code> from a method—when there's value in deferred execution. And returning a <code>List</code> or <code>IList</code> should pretty much be only when the result is going to be modified, otherwise I'd return an <code>IReadOnlyCollection</code>, so the... | 1 | 1,564 |
ASP.net Ajax Unknown Web method | <p>So, I have done this before and made many many ajax calls
For some reason <strong><em>this</em></strong> one doesn't work =(</p>
<p><strong>What do I need to change to get this one to work?</strong></p>
<p>Previously I had an internal server error 500, but after pasting some working code and renaming methods to s... | 1 | 1,195 |
getUser return null in controller | <p>I have a problem on a project.</p>
<p>I use symfony 2.8, sonata-admin, fosuserbundle, fosrestbundle and lexikjwtauthbundle.</p>
<p>On this route /api/login_check I can easily generate a token with a existing fosuser.</p>
<p><a href="https://i.stack.imgur.com/5EcdZ.jpg" rel="nofollow noreferrer"><img src="https://... | 1 | 7,091 |
Spring for Android. MediaType throws IllegalArgumentException: Invalid token character ';' in token "json;charset=utf-8" | <p>I'm trying to use Spring for Android together with Jackson 2 to create a POJO from a rest call.</p>
<pre><code>// Set the Accept header
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.setAccept(Collections.singletonList(new MediaType("application","vnd.livescore_app.api.v1+json")));
requestHeaders.se... | 1 | 1,202 |
AWS CDK: Cannot find module 'typescript' | <p>Long story short, I have a mono repo that I have been using for almost a year. I had a hard drive failure and had to reinstall my OS. Now, when I try to do anything with the CDK, I get this error every time.</p>
<pre><code>Cannot find module 'typescript'
Require stack:
- /home/jpsimkins/.npm/_npx/16449/lib/node_modu... | 1 | 5,522 |
Why will for-loop with multithreading not have as great performance as with single-thread? | <p>I believed it was better to process simple and heavy works (ex. matrix-calculation) with multi-threading than with single-thread, so I tested the following code : </p>
<pre><code>int main()
{
constexpr int N = 100000;
std::random_device rd;
std::mt19937 mt(rd());
std::uniform_real_distribution<d... | 1 | 3,248 |
Which Ruby XML library would you recommend for a 2.4MB XML file? | <p>I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I try first from a Ruby perspective?</p>
<p>I'm aware of the following (in no pa... | 1 | 1,276 |
How can I make my R Shiny Dashboard fill the entire Page? | <p>I have an R Shiny app that I'm making using <code>shinydashboard</code>, but I'm having a problem getting the UI to fill the browser window.</p>
<p>Here is my ui.R output:</p>
<pre><code>#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.... | 1 | 3,404 |
Error when adding new entity to EF : A referential integrity constraint violation occurred | <p>I'm adding a new entity that is built through an external class and I get this error : <code>A referential integrity constraint violation occurred: A primary key property that is a part of referential integrity constraint cannot be changed when the dependent object is Unchanged unless it is being set to the associa... | 1 | 1,143 |
VNC only displaying the mouse cursor but nothing else | <p>I have a RaspberryPi with Raspbian and <code>x11vnc</code> installed. I can:</p>
<ul>
<li><code>startx &</code></li>
<li><code>x11vnc -usepw -background</code></li>
</ul>
<p>And then connect to the VNC Server using my Mac. However, after some event (it used to work at some point), the VNC Server only displays ... | 1 | 5,490 |
How to pass value from kendo grid to kendo window in MVC | <p>How can I pass the PreEmploymentId of the selected row from the grid to window on button click event of the grid. This may be simple, but I am new and still learning basics.</p>
<p>Script-</p>
<pre><code><script>
$("[data-button-type='auction']")
.click(function(e) {
m... | 1 | 2,480 |
Understanding Basic Python Google API Sample | <p>I mentioned trying to get google java sample code working in one of my previous questions on StackOverflow, but abandoned trying to do that after realizing how deprecated the samples were. Since I dabbled in python a bit about 4 years ago, I decided that I would take a look at the Google Blogger API for Python.</p>
... | 1 | 1,586 |
Celsius to Fahrenheit conversion in CSV file | <p>I want to take a CSV file with Temperatures in celsius and convert it to fahrenheit. </p>
<p>Current attempt:</p>
<pre><code>import pandas as pd
df = pd.read_csv('/temperature_data.csv', )
def f(x):
x = x * 1.8 + 32
return float(x)
df['AirTemperature'] = df.apply(f, axis=1)
</code></pre>
<p>I am able to... | 1 | 1,316 |
Why are all data types returned as strings with sqlite3 fetchAll(PDO:FETCH_ASSOC) with PHP? | <p>I am using</p>
<pre><code>$rows = $statement->fetchAll(PDO::FETCH_ASSOC);
</code></pre>
<p>to get all the rows of my table.</p>
<p>The schema is defined as "id INTEGER PRIMARY KEY, title TEXT, year INTEGER, price REAL"</p>
<p>A row from he results of the fetchAll is</p>
<pre><code>array(4) {
[0]=>
... | 1 | 1,216 |
PyQt QVBoxLayout and missing widgets? | <p>I am trying to set up a window that has a text input & a combo box. At the moment I just want to see the text & the selection displayed under the appropriate widget.</p>
<p>I have used QVBoxLayout() as I will be adding more stuff later & thought it would be a simple way of laying out the window.</p>
<p... | 1 | 1,270 |
npm install npm ERR! gyp verb `which` failed Error: not found: python2 | <p>On Ubuntu 21.10, where Python2.x is actually not installed, I'm facing the following error when executing "npm install" on a large project (the <code>package.json</code> is large but these two lines may be relevant:</p>
<pre><code>...
"devDependencies": {
...
"sass": "^1.... | 1 | 3,019 |
Butter Knife won't inject | <p>I'm trying to use <a href="http://jakewharton.github.io/butterknife/" rel="nofollow noreferrer">Butter Knife</a> at Android Studio these days, yet it fails me with some odd problems. I used to try Butter Knife at eclipse, and it worked fine. I don't know if I configured something wrong at Android Studio.</p>
<p>I f... | 1 | 1,350 |
python sockets can't send multiple messages -- data is referenced before assignment-- | <p>Hi i'm trying to send multiple messages to the tcp server but in my client i got an error that data is referenced before assignment. If i send one message there will be no error but if i try to send more than one it returns the error. </p>
<p>tcp server: </p>
<pre><code>class Connect(object):
def __init__(sel... | 1 | 1,218 |
Java, select text Exactly in JEditorPane | <p>I'm using <code>jEditorPane</code> to act kinda as some editor, the one who asked for this of me, also needed a find replace search... so I wanted to let him select in find and then do replace on need.</p>
<p>so I provide this simple code:</p>
<pre><code>private void jButton5ActionPerformed(java.awt.event.ActionEv... | 1 | 2,411 |
Dynamic TableView Cell Heights Incorrect Until After Scrolling (iOS 8) - full screenshots attached | <p><strong>EDIT</strong></p>
<p><em>Built a new sample project from scratch and the dynamic tableview cell height is working flawlessly. I then tried to replicate by trimming down my project to it's bare minimum and it's STILL broken (first few cells buggy). Attaching full project for both working and not working exam... | 1 | 1,119 |
Strange flow DTMF capture on tcpdump | <p>I captured a tcpdump of a SIP call to debug DTMF problem (repeated digits), but I have some problem interpreting it.</p>
<p>From what I understand, when I parse the captured traffic through wireshark's "VOIP CALL", I should see something like this (for digits 123) :</p>
<p>CAPTURE 1<br>
RTP telephone event DTMF On... | 1 | 1,075 |
Maven: Include file defined in parent POM? | <p>I have set up a parent POM for use by all my projects with standard configuration. I've been playing with the <a href="http://code.google.com/p/maven-java-formatter-plugin/" rel="nofollow" title="maven-java-formatter-plugin">maven-java-formatter-plugin</a> and using my own formatter config file. In the parent POM ... | 1 | 1,769 |
Run Ingress in minikube and its address shows localhost | <p>I'm new to k8s. I deployed an ingress on minikube, and I found out its address to be <code>localhost</code> which it shouldn't be, I guess. For this, I don't know how to continue, for I should edit <code>/etc/hosts/</code> to add dns item, but no I could not.<br />
<a href="https://i.stack.imgur.com/UPwcf.png" rel="... | 1 | 1,207 |
Infinite loop when using fscanf | <p>I wrote this simple program in C, because I'm studying FILES right now at University. I take a txt file with a list of the results of the last race so my program will show the data formatted as I want. Here's my code:</p>
<pre><code>/* Esercizio file Motogp */
#include <stdio.h>
#define SIZE 20
int main ()
{
... | 1 | 1,367 |
TinyMCE Character Count incorrect | <p>I am using TinyMCE on a textarea in my page. I am trying to get the character and word count and the textarea is typed into. I have been trying various versions to make it work correctly, but without success. Here's the latest buggy version:</p>
<pre><code>$().ready(function() {
$('textarea.tinymce').tinymce({
... | 1 | 1,459 |
PUT/DELETE giving 405 error with angular and WebAPI in VS Community 2015 | <p>I am getting 405(Method not found) error in PUT and DELETE requests in my angular and WebAPI. GET and POST are working fine. I have checked all the solutions with this type of error on 'SO' but it didn't worked. I have added required handlers(with PUT/DELETE verbs) in my <em>WebConfig</em>, updated <em>applicationho... | 1 | 1,146 |
Matcaffe on Ubuntu 16.04 | <p>I have been trying to compile Matcaffe in Ubuntu 16.04. I could successfully compile caffe and pycaffe (using gcc 5). However since Ubuntu 16.04 comes with gcc 5, and MATLAB R2016b is compatible with gcc 4.9, I got following warning during compilation (using <em>make matcafee</em>):</p>
<blockquote>
<p>MEX matla... | 1 | 1,099 |
Configuring Tomcat SSO using Kerberos SPNEGO | <p>I am trying to configure SSO in Tomcat 9 (with SDK 8) using Kerberos. My environment is all in Windows Server 2016 VMs:
-</p>
<ul>
<li>server2016.forestgump.internal 192.168.44.130 - Active Directory</li>
<li>windowstomcat.forestgump.internal 192.168.44.135 - Tomcat v9, SDK 8</li>
<li>WIN-MN3G5OM9U4Q.... | 1 | 9,291 |
java.lang.IllegalStateException: This is not a JSON Array | <p>I am having two problems:</p>
<p>1) java.lang.IllegalStateException: This is not a JSON Array</p>
<p>this I am getting when trying to convert List to JSON. Also plz tell me how to handle null array to json. </p>
<p>2) When I run the query on database it is fetching me 5 results. When I debug the OperatorDetailsD... | 1 | 1,296 |
Android Listener pattern vs Callback pattern | <p>When I'm working on networking functions in OkHttp, there are mainly 2 patterns I come across with:</p>
<ol>
<li>Listener pattern</li>
<li>Callback pattern</li>
</ol>
<p><strong>Listener Pattern example:</strong></p>
<pre><code>// Listener class
public interface NetworkListener {
void onFailure(Request reques... | 1 | 1,649 |
Migration from maven to gradle: "gradle build" fails for WAR building task | <p>I am trying to rewrite pom.xml configuration into gradle script. The part concerning dependencies in pom looks like that:</p>
<pre><code><dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artif... | 1 | 9,532 |
Can't remove extra line spacing in JTextPane for html content | <p>I can't squeeze together the lines in a Java <code>JTextPane</code> if I set the content-type to <code>text/html</code>. I would like them as close together as they are when the content-type is <code>text/plain</code>, the default.</p>
<p>The <code>line-height</code>, <code>top-margin</code>, ... CSS properties don... | 1 | 1,763 |
Getting sample failed in Google Kick Start 2020 Round A | <p>I was started testing my skills through google kick start and pick a past problem to see how it work and then I get stuck at a point.</p>
<p>Here is My java code for Google Kick Start Round A 2020 Program: Allocation
I have passed all test cases and test it by my own self but when I submit my code to google kick sta... | 1 | 1,164 |
Validated Textbox in a UserControl | <p>I have created a UserControl - a Labeled <code>TextBox</code> which is working pretty well, except for the validation template. When there's an error the validation control template shows up but it fills the whole space including the Label. I only want it to be as big as the <code>TextBox</code>. How to fix this?</p... | 1 | 1,447 |
How to normalize JSON string type column of pandas dataframe? | <p>I am trying to split a column with an array of a list into multiple columns and create multiple rows. Below is the sample data:</p>
<pre><code>signalid monthyear readings
5135 201901 [{"v":"90","q":1,"t":1546444800000,"g":0}]
5135 201901 [{"v":"50","q":1,"t":1546444900000,"g":0}]
5135 ... | 1 | 1,458 |
Android -urlConnection.getInputStream() fails - InputStream stays null | <p>I'm trying to retrieve JSON data from the Google Directions Server in Android. But getting the inputstream fails and an exception is thrown. I get the error message ,,null" and that the inputstream is null.</p>
<p>What am I doing wrong with the HTTP connection? The URL is working on my browser.</p>
<pre><code> ... | 1 | 2,333 |
Why is AWS Lambda failing to reach the FunctionHandler? | <p>I am:</p>
<ol>
<li>deploying a C# app to Lambda to the first time.</li>
<li>using Mac so can't use the Visual Studio <a href="https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.AWSToolkitforVisualStudio2017" rel="nofollow noreferrer">AWS Toolkit Extension</a>.</li>
<li>using C# .NET core 3.1.</li>... | 1 | 2,573 |
Browser Says Function is not Defined (But it is) | <p>What's wrong with this code? The HTML validates, but the JavaScript still won't work. Says timekey is undefined whenever a button is clicked.</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.o... | 1 | 2,315 |
Apache not using desired ports on workers.properties | <p>We've configured Apache to redirect to an instance of tomcat through a diferent port of the AJP default 8009 . It only works for the default port but it's not working with the one we set (8109) on the worker.properties This is our scenario</p>
<p><strong>worker.properties on /etc/apache2</strong></p>
<pre><code>wo... | 1 | 1,465 |
AWS DocumentDB TLS connection with Java | <p>I am facing problems connecting with my DocumentDB cluster with plain Java over TLS/SSL</p>
<p>The procedure I followed as per the <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/connect.html#w139aac29c11c13b5b9" rel="noreferrer">AWS docs</a> is this:</p>
<p>I downloaded the <code>.pem</code> f... | 1 | 1,503 |
C# LDAP performance | <p>Where I work, we have two modes of authentication:</p>
<ul>
<li>CAS (<a href="http://www.jasig.org/cas" rel="nofollow noreferrer">http://www.jasig.org/cas</a>)</li>
<li>LDAP</li>
</ul>
<p>CAS is the primary method, but it is often unreliable at peak traffic times and so we have been using LDAP as a fallback mode f... | 1 | 1,676 |
laravel toggle button not sending value back to db ajax | <p>I'm using Laravel and ajax for the sending of request to update db. When 'is_active' has value of 1, toggle the checkbox will update the value of 'is_active' in db, but when 'is_active' has value of 1, toggle the checkbox will <strong>NOT</strong> update the value of 'is_active' in db. Besides that, I'm having troub... | 1 | 1,709 |
Spring Security remember-me services | <p>I configured Spring Security with remember-me option.</p>
<pre><code> <security:global-method-security secured-annotations="enabled" />
<security:http pattern="/login.html" security="none"/>
<security:http pattern="/signup.html" security="none"/>
<security:http pattern="/scripts/**" s... | 1 | 2,961 |
Access Denied to SQL Server in Microsoft Azure Web Application | <p>I have a web application that is published to Microsoft Azure. There are two databases, both hosted on a SQL Server in Azure. One database, which handles identity authentication, works just fine and I can login/view pages that don't concern the other database just fine. When I try to perform an action that accesses ... | 1 | 1,658 |
webview height grows indefinitely inside a nestedScrollView | <p>This is my layout. When i load google.com, the webview's height keeps growing indefinitely. The onSizeChange function of the webview keeps getting called and i can see the webview keeps expanding indefinitely. I've tried 22.2.1 and 23.1.0 of the design and appcompat libraries and no effect. </p>
<p>Any solution ? ... | 1 | 1,424 |
$.ajax 200 OK, parseerror, invalid character on Internet Explorer 7,8,9,10 | <p>This chunk of code is working across Chrome, FF but its not working on Internet Explorer!
It is just a simple JSON file call, get data, and display to HTML webpage. Take a look below:</p>
<pre><code>$.ajax({
type: "GET",
url: "shop.json",
cache: false,
data: "... | 1 | 1,719 |
SmartGWT RestDataSource calling an existing REST service | <p>I have a database back-end that I've thoroughly tested with several unit tests. The controller looks like this:</p>
<pre><code>@RequestMapping(value = "/create", method = RequestMethod.POST, produces = "application/json", headers = "content-type=application/json")
public @ResponseBody UserDTO createUser(@RequestBo... | 1 | 4,666 |
How to pass data between components in ReactJS? | <p>I have made 2 components :
1) content (which displays data using fetch() )
2) pagination (total 5 pages 16 objects per page )</p>
<p>I have made 2 state variables called <code>start:0</code> and <code>end:16</code>. Now whenever user clicks on page numbers I want to inject start and end state variables from paginat... | 1 | 2,486 |
Vuetify v-data-table double click event does not work | <p>I'm using a v-data-table.</p>
<p>According to <a href="https://vuetifyjs.com/ja/components/data-tables/" rel="nofollow noreferrer">official library</a>, it has a <code>dblclick:row</code> event.</p>
<p>I tried to use it, but doesn't work.</p>
<p>(click:row event works fine.)</p>
<p>vuetify version is latest <code>vu... | 1 | 2,172 |
(unknown) user is always logged in my centos linux machine | <p>I was going through logged in user in to my system using who command what i found is very surprising a user named unknown is logged in</p>
<p>Result of command who : </p>
<pre><code> myuser pts/1 Aug 6 20:27 (localhost)
(unknown) :0 Aug 5 16:25 (:0)
myuser pts/0 Aug 6 00:48 (loca... | 1 | 2,159 |
The WebSocket transport is not available, you must install a WebSocket server that is compatible with your async mode to enable it | <p>When I development some socket.io service in python environment by using python-socketio and gunicorn, I meet an issue here.</p>
<p>I am using Mac OS X and I am using python 3.7.</p>
<p><strong>Environment setting</strong><br />
<code>$ pip install python-socketio</code><br />
<code>$ pip install gunicorn</code></p>... | 1 | 1,028 |
Format Date inside jQuery datatable | <p>I am using jQuery datatables to display sms statistics on my web app, the datatable is used for ease of paging, search and sorting functionalities which works fine. However ene of the columns on the data table is a date,here is my action method that returns the json object</p>
<pre><code> public ActionResult LoadSt... | 1 | 1,052 |
Plex Plugin for Music Videos - Python | <p>I'm trying to edit a LastFM music plugin for Plex to make it work with music videos. I'm almost there with lots of Googling and a few questions on here, but I am stuck on the fact that the artists seem to group together.</p>
<p>My videos are in the format "Artist - Title.ext" and I have set that as the metadata ti... | 1 | 3,160 |
UdpClient.Receive(...) doesn't receive any data | <p>I have a socket server (written on C++) which receives requests from clients and sends responses back. So, my test client application (C#) is very simple:</p>
<pre><code> try {
UdpClient udpClient = new UdpClient(10241);
// Connect
udpClient.Connect(server_ip_address, 1... | 1 | 1,045 |
C free malloc'd structure members and struct | <p>I have a problem when I run try to free anything within this struct. First the struct definition in the header:</p>
<pre><code> typedef struct{
int* rType;
unsigned long int numCols;
char* rString; //The literal string, NULL delimited
int rsSize; //The size of the string, since NULLS can't be used to find ... | 1 | 3,348 |
How to get the name of a file from a file handle in Windows using C? | <p>I'm trying to retrieve a file name from a given file handle.</p>
<p>I've seen that <a href="http://msdn.microsoft.com/en-us/library/aa364952%28VS.85%29.aspx" rel="nofollow">GetFileInformationByHandle</a> could be useful, but the structure it returns does not contain any file name information (<a href="http://msdn.m... | 1 | 1,907 |
Build sql query with string builder and a lot of parameters | <p>I am building my query using loops</p>
<pre><code>for (var i = 0; i < query.BlackWhiteListFieldMatchProxy.Count; i++)
{
sb.Append($@"(
MatchType = {(int)query.BlackWhiteListFieldMatchProxy[i].MatchType}
AND EntityType = {(int)query.... | 1 | 1,056 |
IdentityServer4 won't return token - 404 not found | <p>I have implemented IdentityServer4 in my project. After I run it and use Postman to send a request for token I get 404 status code for not found, even though URL exists.</p>
<p>I want to use Implicit grant_type so I am sending only client_id using Basic Auth.</p>
<p>Problem can also be related to the format of req... | 1 | 3,560 |
Java Calculator GUI operations | <p>There are 4 classes: <code>Main</code>, <code>GUI</code>, <code>Logic</code> and <code>Calculator</code>. I'm having difficulty making the Calculator class right, the first operation/calculation is giving me the wrong answer but the next one is right. I tried to create another variable (<code>fnum</code> and <code>s... | 1 | 3,376 |
Rolling Correlation Calculation with Pandas or NumPy | <p>I am trying to find an efficient way for the following problem:</p>
<p>Two data frames, each with the following data:<br>
1st one: <code>id, date, value</code> </p>
<p>Sample Data:</p>
<pre><code>id, date, value
f130,200701,0.016196
f130,200702,-0.027798
f130,200703,-0.014868
f130,200704,0.017801
f130,200705,-0.... | 1 | 1,407 |
MailKit, Office 365 and OAUTH2: Problem in authentication of a server side app | <p>I have to build a .Net console application that runs on server side as a batch, and sends email to recipients using Office365 and MailKit.</p>
<p>Our company has recently introduced MultiFactor Authentication; I have already rewrite an interactive app that let user to send email using MailKit and MFA, but I am not a... | 1 | 1,589 |
WCF Contract In Separate Assembly - How to Use it as an Endpoint Contract? | <p>I've searched and wasted all day trying everything I can think of or find to resolve this issue: I built my first WCF service and thought it would be cool to host it in IIS. It's a long-running service, so that's a no-go. I have since added another project to my solution to host the WCF service with, referenced t... | 1 | 1,616 |
Hibernate one-to-one entity association with shared PK between 3 classes | <p>I want a <strong>unidirectional</strong> one-to-one relationship between objects of 3 java classes: Person to Heart, and Person to Liver. I want the objects to share the same PK i.e. every person has a corresponding heart and liver, where person.person_id = heart.heart_id = liver.liver_id. I do not want to merge the... | 1 | 1,039 |
C++ compilation of rule '//tensorflow/core/kernels:sparse_reduce_op' failed (Exit 1) | <p>I'm trying to build tensorflow from source, it keeps running for several hours then the build fails and I get the following error:
............................................................................................................................................................................................. | 1 | 3,072 |
How can I make a JProgressBar fill up during a certain interval? | <p>Your solution works with the timer JProgressBar fill up during a certain interval however when btn is pressed the timer doesnt start any suggestions I have included the full code ?</p>
<p>Here is the full code:</p>
<pre><code>//Packages
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
impor... | 1 | 2,514 |
passing an array from controller to js in laravel | <p>I'm making a morris line in my index page and I'm trying to pass data to it from my controller
controller:</p>
<pre><code>$chartData= DB::table('transactions')
->select('v_type',DB::raw("MONTH(transaction_created_at)"),DB::raw('sum(v_value)'))
->groupby('v_type',DB::raw("MONTH(transaction_cr... | 1 | 1,345 |
Draw and remove a bitmap icon on canvas | <p>I am developing an app where the user can mark a damage icon on a car. The car here is basically an image and the damage icon is also an image. I am able to draw an image, where the user touches the car, using this code:</p>
<pre><code>public class TestActivity extends Activity {
private Button btn_save, btn_re... | 1 | 1,480 |
Encoding issue with ASIHttpRequest | <p>I have an encoding problem with ASIHttpRequest. When I get an URL, the data is returned perfectly except for a little encoding problem.</p>
<p>This is my code: </p>
<pre><code>- (void)fetchGamesForCategory
{
NSString *url_string = [[NSString alloc] initWithFormat:url_match, theCategory._id];
NSURL *url = ... | 1 | 1,505 |
material-ui menu not close when dialog open | <p>i am using react + material-ui .
i created <code>dialog</code> component in jsx file like this:</p>
<pre><code> export default class CartoviewAbout extends React.Component {
constructor(props) {
super(props);
this.state = {open: false};
}
_handleOpen() {
... | 1 | 1,553 |
List input and output audio devices in Applet | <p>I am running a signed applet that needs to provide the ability for the user to select the input and output audio devices ( similar to what skype provides).</p>
<p>I borrowed the following code from other <a href="https://stackoverflow.com/questions/562273/what-output-and-recording-ports-does-the-java-sound-api-find... | 1 | 1,354 |
how do i show date picker when clicked on textfield | <blockquote>
<p>this is my code</p>
</blockquote>
<pre><code>- @IBOutlet weak var txt1: UITextField!
@IBOutlet weak var txt2: UITextField!
@IBOutlet weak var txt3: UITextField!
@IBOutlet weak var txt4: UITextField!
@IBOutlet weak var txt5: UITextField!
@IBOutlet weak var txt6: UITextField!
@I... | 1 | 1,321 |
asp.net Core View Component executed but markup not rendered | <p>I have an ASP.NET Core 1.1 web application developed with VS.2017 and I decided to put some of the view functionality in a view component (have done others before).</p>
<p>This view component fetches a Dictionary collection of permissions associated to a user ID and displays them in a nice table. When I put it as p... | 1 | 2,182 |
Function.Module._resolveFilename (module.js:547:15) at Function.Module._load | <p>I am getting following error</p>
<blockquote>
<p>Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (C:\Users\u8ser\Desktop\Todo\server.js:25:1) at Module._compile (module.js:652:30) ... | 1 | 1,196 |
bootstrap dynamic pills not working | <p>I am trying to develop an incident management and was creating a page using bootstrap. I have taken the example from <a href="http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_tabs_dynamic&stacked=h" rel="nofollow">bootstrap dynamic tabs</a></p>
<p>The issue is that when I am clicking on the menus it ... | 1 | 1,146 |
Setting timeout on ldap query for spring security | <p>I'm using spring security with LDAP authentication. My security configuration XML file can be <a href="https://github.com/cBioPortal/cbioportal/pull/102/files#diff-1f4c88247875f08f205de1897d72000cR425" rel="nofollow">found here</a>. My problem is that the query times out after some time. How can I set the timeout to... | 1 | 2,479 |
logging out in php ( cookies and sessions ) | <p>i have written login and logout scripts in php.I am able to log in but log out is not working.Someone please point the mistake.i am completely lost.Here's the complete code.</p>
<p>1.the log in php code:</p>
<pre><code> <?php
session_start();
require_once('login/connectvars.php');
$msg = "";
if(!isset($_SE... | 1 | 1,704 |
Spring Boot MockMVC - request scoped bean not autowired properly | <p>I want to have a request scoped bean, fill it with data in a filter and then access the data in a controller. This all works fine when I run my app, but when I try to test it with MockMVC, data is not set in the request scoped bean in my controller.</p>
<p>Here is the code:</p>
<p>pom.xml</p>
<pre><code><?xml ... | 1 | 3,560 |
Memory leak in c3p0 - java.lang.NoClassDefFoundError: com/mchange/v2/resourcepool/BasicResourcePool | <p>Environment:
Server : Jboss 4.2.3.GA</p>
<p>We are using c3p0 0.9.1.2 for connection pooling.</p>
<p>Whenever we <strong>hot-deploy</strong> war files in Jboss AS are encountering the memory leak from c3p0.
It eventually leads to <strong>“java.lang.OutOfMemoryError: PermGen space”</strong> error, we are forced to ... | 1 | 3,373 |
Can't fix error: Cannot find symbol class ActivityMainBindingImpl | <p>I've got following error while trying to build prject with MVVM and data binding. I've searched through everything I could find here on StackOverflow, or common mistakes on the internet, but nothing worked for my case. <br>
The only message I receive is this error. It looks like this in <code>buildOutput</code>:<br>... | 1 | 3,687 |
Cannot find symbol [Compiler error] | <p>I've done this little program which tries to construct triangles and calculates the surface for homework and I tested it in Eclipse but when I try to upload it to our system I get 6 errors, all of the same type:</p>
<blockquote>
<blockquote>
<blockquote>
<p>/test/src/math.test/TestTriangleFunctionPublic... | 1 | 1,309 |
j_security_check with ajax | <p>EDIT: url is culprit I think. In working login.html case I got in log:</p>
<p>FINE: Security checking request POST /SesamaMaven/protected/admin/j_security_check</p>
<p>And in AJAX-version I got:</p>
<p>FINE: Security checking request POST /SesamaMaven/</p>
<p>I configured authentication in Glassfish with JDBCRea... | 1 | 1,364 |
How to call OnEraseBkgnd() to repaint the window in another function? (MFC) | <p>I am trying to call <code>OnEraseBkgnd()</code> to repaint the window in another function.</p>
<p>For example, like the code below:</p>
<pre><code>...
CBitmap Background;
BITMAP bm;
CDC dcMemory;
int width, height;
...
BOOL CSplashDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CDC* dc;
Background.... | 1 | 1,409 |
Could not find builder-3.0.0 in any of the sources (Bundler::GemNotFound) | <p>I've been <a href="http://www.redmine.org/projects/redmine/wiki/RedmineInstall" rel="nofollow">using</a> on my server <a href="http://www.redmine.org" rel="nofollow">Redmine</a> 1.1.x for some time and I'm trying to upgrade it to 2.2.2. I followed the <a href="http://www.redmine.org/projects/redmine/wiki/RedmineUpgr... | 1 | 1,710 |
Changing password using Spring security | <p>I use, </p>
<ul>
<li>Spring Framework 4.0.0 RELEASE (GA)</li>
<li>Spring Security 3.2.0 RELEASE (GA)</li>
<li>Struts 2.3.16</li>
</ul>
<p>in which I use,</p>
<pre><code>org.springframework.security.authentication.dao.DaoAuthenticationProvider
</code></pre>
<p>for authentication. My <code>spring-security.xml</cod... | 1 | 2,637 |
How can I make a switch statement work with an enum? C# Unity | <p><strong>Description</strong></p>
<p>I'm working on a script to fade UI elements in Unity, similar to a selector, where you can select the type of fading, and duration, and image to fade</p>
<p><a href="https://i.stack.imgur.com/fPThW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fPThW.png" alt... | 1 | 1,078 |
JButton and ActionListener producing several exceptions in java.awt, security, and event? | <p>I have four buttons at east, west, north and south, and I'm trying to have the button that is pressed change it's text. In Eclipse it seems problem-less before compiling, but when I do compile and try to press any of the four buttons, it displays many exceptions.</p>
<pre><code>import java.awt.event.*;
import java... | 1 | 2,609 |
Send email to gmail with inline images and MIME::LITE | <p>I need to send an email to gmail with some inline images.</p>
<p>I use perl and MIME:LITE, but Gmail shows my image as Attachment, not inline.</p>
<p>What's the problem?</p>
<p>This is my code,</p>
<pre><code>use MIME::Lite;
my $texto = '<html><body>hola <img src="cid:image" /> adios <... | 1 | 1,153 |
The parameters 'group' for goal org.codehaus.mojo:rpm-maven-plugin:2.1.5:rpm are missing or invalid | <p>When running </p>
<pre><code>mvn clean rpm:rpm
</code></pre>
<p>I get this error : The parameters 'group' for goal org.codehaus.mojo:rpm-maven-plugin:2.1.5:rpm are missing or invalid</p>
<p>My parent pom.xml :</p>
<pre><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001... | 1 | 3,911 |
How to make a input search for list view in android | <p>i need to make a input search for listview in android through the code below, how to write the code and where do i put it.<br>
I'm new in Android Thanks you advanced</p>
<p>all_products.xml</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/re... | 1 | 3,756 |
Layering multiple GlassPane's in a Root Container | <p>Is it possible to add multiple <code>GlassPane</code>s for a single <code>JFrame</code>, or do I have to use the uncomfortable <code>LayeredPane</code> with the <code>Opacity</code> attribute.</p>
<p>I have attached some code that shows what I want to do (provided by @camickr).</p>
<pre><code>import java.awt.*;
im... | 1 | 4,334 |
Initializing boost::asio sockets after constructor | <p>[Update:] The answer for whoever is interested, is simply wrapping the io_service member var in boost::ref (boost::ref(io_service_))</p>
<p>I am experimenting with the udp server example from boost asio libraries, to see if I can initialize the socket somewhere other than in the constructor. The constructor propose... | 1 | 1,951 |
.htaccess mod_rewrite "Request exceeded the limit of 10 internal redirects due to probable configuration error. " | <p>This is my .htaccess:</p>
<pre><code>RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
Options -Indexes
</code></pre>
<p>It is used in a simple framework and the idea is to redirect request like: www.domain.com/subpage to index.php, which will c... | 1 | 1,408 |
Spring JPARepository querying many to many intersection table | <p>I have 3 entity classes as follows (Example taken from <a href="https://hellokoding.com/jpa-many-to-many-extra-columns-relationship-mapping-example-with-spring-boot-maven-and-mysql/" rel="nofollow noreferrer">https://hellokoding.com/jpa-many-to-many-extra-columns-relationship-mapping-example-with-spring-boot-maven-a... | 1 | 1,371 |
Rake db:migrate has conflicting test-unit gem dependencies (1.2.3 required, 2.3.0 installed) | <p>I'm trying to run</p>
<pre><code>rake db:migrate
</code></pre>
<p>However each time I do I get the following errors:</p>
<pre><code>rake aborted!
can't activate test-unit (= 1.2.3), already activated test-unit-2.3.0. Make sure all dependencies are added to Gemfile.
/Users/petenixey/project/Rakefile:12:in `<top... | 1 | 5,778 |
ora 12541: no listener oracle 12c | <p>I have installed Oracle 12c server and client on the same laptop.</p>
<p>Previously it was running, but now I started getting this error <code>ORA-12541: no listener</code>.</p>
<p>My listener service is up and running, and I can connect through SQL Developer, but I get that error when I try to connect through SQL... | 1 | 1,103 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.