title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Java to Active Directory LDAP java.net.SocketException: Connection or outbound has closed | <p>Good evening,</p>
<p>I have been facing this error for a couple of days by now, and despite looking for a solution all over the web, I coul'd fix this error.</p>
<pre><code>import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.directory.Attribute;
import ... | 0 | 1,915 |
Java Graphics "Bouncing Ball" Program | <p>This is my first Graphical Java program and what I'm trying to do is re-create a simple classic program where I have multiple balls bouncing in a <code>JFrame</code> window.</p>
<p>So far I have successfully been able to get one ball to bounce around using code inside the <code>run()</code> method. That works for o... | 0 | 2,719 |
Flood fill algorithm | <p>im working in a simple graphical library in C with turbo C++ because im developing a very primitive version of a paint style program, everyting works well but i can´t get the flood fill algorithm to work. Im using the 4 way flood fill algorithm, first i tried with the recursive version but it only work with small ar... | 0 | 1,034 |
mysql service does not start:Address already in use | <p>I'm try to install mysql-5.5.29 source code on ubuntu.
Every time I restart or start the service, it tells me that MySQL Daemon failed to start..</p>
<pre><code>shell>>service mysql.server start
Starting MySQL
... * The server quit without updating PID file (/usr/local/mysql/data/ytl-HP-Pavilion- g4... | 0 | 2,772 |
Unable to add GSI to DynamoDB table using CloudFormation | <p>I have an existing DynamoDB table that is defined as part of a CloudFormation stack. According the the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html" rel="noreferrer">CFN AWS::DynamoDB::Table documentation</a> the GlobalSecondaryIndexes attribute does not r... | 0 | 2,523 |
Call overloaded method from Drools: `unable to resolve method using strict-mode` | <p>I'm newbie with java and drools and I have to build a java RESTful Web Services / rules engine. We already have Genesys Rule Authoring (GRAT) and Genesys Rule Engine (GRE) (version 8.1.2) who run drools version 5.2. We have the need to take the source of GRAT packages and use them in a "lite rule engine" for our d... | 0 | 1,111 |
When upgrading Angular 5 to 6, I get incompatible peer dependency (using ng update @angular/core) | <p>I am trying to update my Angular app from v5 to v6 following <a href="https://update.angular.io/" rel="noreferrer">this guide</a>.</p>
<p>I have ran all these commands successfully:</p>
<pre><code>npm install -g @angular/cli
npm install @angular/cli
ng update @angular/cli
</code></pre>
<p>The problem is that I ge... | 0 | 1,114 |
Google reCAPTCHA with jQuery validation | <p>I am trying to validate google reCAPTCHA with a form if the reCAPTCHA is false it should show a alert and button should goes to false I tried with some code but its not working anyone know? </p>
<p>Here's my code</p>
<pre><code><div class="lets-talk-out"> </div>
<div class="slide-popup-bo... | 0 | 2,346 |
how do i get coordinates of image shown in opencv | <p>Sorry but title doesnt really make sense</p>
<p>i am trying to make an ai that clicks on the ball to make it bounce.
for context heres a picture of the application
<a href="https://i.stack.imgur.com/m5SA2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m5SA2.png" alt="enter image description here... | 0 | 1,255 |
Bootstrap collapse within table/between table rows not working | <p>I have a question regarding the Bootstrap collapse feature. I'm pretty sure that I'm overlooking something quite obvious or easy to fix, but I googled it alot and played with the code, but without success. </p>
<p>I have a "account settings" page, where all account information of a user is shown in a table-like fo... | 0 | 2,513 |
How to use cURL to get jSON data and decode the data? | <p>So I have a link that returns a jSON object, and I need to have it decoded and put into variables in PHP. </p>
<p><strong>URL</strong></p>
<pre><code>api.php?action=getThreads&hash=123fajwersa&node_id=4&order_by=post_date&order=desc&limit=1&grab_content&content_limit=1
</code></pre>
<p... | 0 | 3,035 |
undeclared identifiers? | <p>Keep getting errors with code, its a conversion from old VS to the 2010 version:</p>
<pre><code>#include <string>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <math.h>
using std::string;
#define CROSSOVER_RATE 0.7
#define MUTATION_RATE 0.0... | 0 | 5,351 |
Running Linux commands on Java through JSch | <p>I'm establishing an SSH connection through JSch on Java and everything seemed to be working fine, until I tried to run this .sh file. The shell script's name is <code>repoUpdate.sh</code> and it's very simple:</p>
<pre class="lang-sh prettyprint-override"><code>echo ' ****Repository update****'
echo ' Location: /h... | 0 | 1,044 |
Node.js, Express and Jade - Forms | <p>I'm using Node.js, Express and Jade and I'm trying to figure out how to post, validate & process form data.</p>
<p>In my jade file I create a contact form:</p>
<pre><code>div#contact-area
form(method='post',action='')
label(for='name') Name:
input(type='text',name='name',id='name')
... | 0 | 1,118 |
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener | <p>I am performing CRUD operations on MongoDB using SPRING REST api. But I am getting the following error:</p>
<pre><code>Mar 17, 2015 2:35:40 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found ... | 0 | 4,635 |
C++ std::vector iterators error | <p>First of all <strong>I'm sorry for my bad english</strong>, hope you guys will understand me :) Im writing WinAPI game and my classes behave very strange: all operations with vector
crash my program so Windows says that my .exe stopped working. But when I debug these lines
I get exceptions.</p>
<p>This is how my cl... | 0 | 1,641 |
C# Resize jpg image, convert to byte and save into database using varbinary | <p>I'm trying to resize my jpg image uploaded by using FileUpload control and convert it into byte before saving it to database (SQL Server 2008) as (varbinary(MAX)). What I have done and code show below was that I manage to convert it into byte and save into database as varbinary(MAX). I wish to know how to I resize t... | 0 | 1,210 |
JQuery to create dynamic textboxes on button click | <p>I am new to jQuery. I want to dynamically add two text boxes with labels <code>firstname</code> and <code>lastname</code> on clicking the "Add" button.</p>
<pre><code><table border="0" cellspacing="2">
<tr><td style= "width:200px;" align="right">Name
<td>
... | 0 | 1,296 |
Spring Database Load Test: How to release connections | <p>I was just trying to simplify my Problem in a little Show-Case-Application.<br>
It seems like the Connection doesn't get closed until the Thread finished. <a href="https://github.com/bastiankemmer/Spring-Hibernate-Problem" rel="noreferrer"><strong>Check this out</strong></a> </p>
<p><strong>Dependencies Informatio... | 0 | 3,647 |
NginX fails to pass of POST request body when proxying requests to an Express backend from static bundle | <p>I am running an NginX server hosted on a Digital Ocean Droplet at 'pocket-caravan.com'.</p>
<p>The goal was to build the react bundle which would link to all css/js/images and use nginx to handle serving static content.
The API server is an Express app which is running on some port, and I proxy all requests from t... | 0 | 2,731 |
html.hidden for value not set in asp.net MVC core Razor view | <p>I am working on an asp.net MVc core application. I have a popup with a form element like this:</p>
<pre><code>@using (Html.BeginForm("AddIVR", "ITPVoice", FormMethod.Post, new { role = "form" }))
{
@*@Html.HiddenFor(m =>m.m_newIVR.Account, new { @value= Model.accountID})*@
@Html.Hidden("m.m_ne... | 0 | 1,269 |
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect | <p>I understand that there is duplicate >>> copied from the duplicate >>>As long as your local machine has an SSH server running <<<<< but i cannot comment and cannot as from the question (and im not providing an answer....)</p>
<p>It stated that "As long as your local machine has an SSH server running"... | 0 | 3,575 |
Error: $compile:tpload failed to load template Http status : 404 | <p>I'm getting a 404 status from Chrome when i'm trying to run a local project using angular. I'm not sure where the problem is and i've already tried the suggested answers to similar questions. </p>
<p>This is my directives file:</p>
<pre><code>'use strict';
/**
* @ngdoc directive
* @name stockDogApp.directive:st... | 0 | 1,160 |
How to find or install missing Commands in PowerShell Core (pwsh)? | <p>I am using multiple versions of PowerShell, but only 2 can find all standard commands (or is it <em>commandlets</em>?). </p>
<p>The original install is <em>Windows PowerShell</em> v5.1, but then I also have <a href="https://github.com/PowerShell/PowerShell" rel="nofollow noreferrer">PowerShell <em>Core</em></a> (<c... | 0 | 4,702 |
How To Display Multiple Images At Runtime (Wraping to the next line) | <p>I have a rather strange application where I will get the words/symbols at runtime and wont know them in advance. I need to display them and word wrap the text when it is too wide for the display.</p>
<p>I am a little unsure what layout I should be using for this functionally but any hints would be greatly apprecia... | 0 | 1,358 |
Declaration is incompatible with | <p>I have an issue compiling and running the code on visual studios. It gives me the error code "declaration is incompatible with" so and so. More specifically, when calling on the header in the code in the beginning of each function from the main CPP. I've tried changing the void to int in the header, but it didn't se... | 0 | 1,054 |
Primefaces p:fileupload component problem | <p>I am using Primefaces 2.0.1 but the FileUpload component is not working properly. It uses JQuery uploadify behind the scenes. This is my web.xml</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema... | 0 | 1,453 |
Grid Items aren't beside eachother Material UI | <p>I am using the Grid component in material-ui. I am having trouble having the grid items stack beside each other. Right now they are stacking below each other. I am not sure what is making them stack below each other. I have made it so only on small screens the grid items will stack on top of each other, other wise e... | 0 | 1,116 |
using motion on raspberry pi for webcam streaming issue | <p>I have a USB webcam (unknown make, no markings) thats been detected fine on my Raspberry Pi.</p>
<p>This is the output of lsusb</p>
<pre><code>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Micro... | 0 | 1,701 |
Unable to determine the principal end of the relationship - Multiple added entities may have the same primary key | <p>I'm using Entity Framework 5 Code First and I have the following model for car manufacturers, cars, and trucks:</p>
<pre class="lang-cs prettyprint-override"><code>public class Manufacturer
{
public int Id { get; set; }
public string Name { get; set; }
[ForeignKey("ManufacturerId")]
public virtual ... | 0 | 2,321 |
Angular Material Table Error: Can't bind to 'mdHeaderRowDef' since it isn't a known property of 'md-header-row' | <p>I'm trying to convert a CDK data-table to a Material Design styled data-table (see: <a href="https://material.angular.io/components/table/overview" rel="noreferrer">https://material.angular.io/components/table/overview</a>), but when I change the cdk prefixes to md, I get the following error...</p>
<hr>
<blockquot... | 0 | 1,784 |
Mocking Angular Material Dialog afterClosed() for unit test | <p>I am opening my mat-dialog with the following function:</p>
<pre class="lang-js prettyprint-override"><code>accept() {
let dialogRef = this.dialog.open(AcceptDialogComponent, {
data: {
hasAccepted: false
}
})
dialogRef.afterClosed().subscribe(result => {
console.log(result);
if (result... | 0 | 1,241 |
ValueError: Unknown label type: 'unknown' in sklearn | <p>I am getting this error - "ValueError: Unknown label type: 'unknown'"</p>
<p>I have searched the net but unable to get rid of this error, I am new to python btw :)</p>
<p>My data has 5 rows and 22 columns, Last column is the Label (True,False) </p>
<pre><code>dataset = pandas.read_csv(path) #Dataframe crea... | 0 | 3,096 |
Share condition variable & mutex between processes: does mutex have to locked before? | <p>I need to some little help to understand how to use condition variables in C to resolve an exercise. Here is a little example:</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <string.h>
#include <errno.h>
#include <sys/ty... | 0 | 2,389 |
Dynamically creating an html table with Javascript | <p>I am trying to create a table based on user input (actually two or three tables depending on the user input..) using Javascript, I am very much native to PHP and have already got this working in PHP, however i would like the user to be able to see the table before the query it. I found a script on here that partiall... | 0 | 1,073 |
global recover handler for golang http panic | <p>I want to create global err handler to send it by email.</p>
<pre><code>package main
import (
"github.com/gorilla/mux"
"log"
"net/http"
)
func main() {
rtr := mux.NewRouter()
rtr.HandleFunc("/", withPanic).Methods("GET")
http.Handle("/... | 0 | 1,056 |
How to solve "java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver" at runtime? | <p>There is a problem at runtime with this code which is :</p>
<blockquote>
<pre><code>java.lang.classNotFoundException: oracle:jdbc:driver:OracleDriver
</code></pre>
</blockquote>
<p>but another program of same JDBC driver are run properly but this JDBC driver is found a exception in java applet. So please help me f... | 0 | 1,556 |
Replacing PowerMock's @PrepareForTest programmatically? | <p>I am using PowerMock to mock static methods in junit tests, typically done as follows:</p>
<pre class="lang-java prettyprint-override"><code>@RunWith(PowerMockRunner.class)
@PrepareForTest({Foo.class,Bar.class})
public class SomeUnitTest {
@Before
public void setUpTest() {
setUpFoo();
setUpBar();
}... | 0 | 1,373 |
Maven project dependency "could not find artifact" | <p>I have 2 maven projects. Project A and Project B. Project B is dependent on Project A but not the other way around.</p>
<p>In my project B pom I have this:</p>
<pre><code> <dependency>
<groupId>com</groupId>
<artifactId>ProjectA</artifactId>
<type>po... | 0 | 4,845 |
How to compile glibc 32bit on an x86_64 machine | <p>I'm trying to compile glibc (as a secondary, not a system replacement) 2.6 on an x86_64, and trying to get it to produce 32-bit objects. When I give it a standard configure, it compiles fine, producing the usual 64-bit library objects. Some info:</p>
<blockquote>
<pre><code>$ uname -a
Linux localhost.localdomain 2.6... | 0 | 3,258 |
Failed to initialize client proxy: could not connect to vstest.discoveryengine.x86.exe | <p>Before, I was able to run the unit tests of a particular project under Visual Studio 2013 just fine. This has recently stopped working <em>without major changes to the project</em>, and unfortunately I do not recall when it did last work, nor what changed since. However, any modifications to the project itself were ... | 0 | 1,504 |
ACTIVEMQ- publisher subscriber hello world example | <p>There are two programs: subscriber and publisher...
Subscriber is able to put the message onto the topic and the message is sent successfully.
When I check the activemq server on my browser it shows 1 msg enqueued . But when I run the consumer code, it is not receiving the message</p>
<p>Here is the producer code:<... | 0 | 1,318 |
Node.js HTTP - TypeError: Header name must be a valid HTTP Token | <p>when I'm trying to set the header in the following way ,it's working absolutely fine. </p>
<pre><code>response.setHeader('Content-Type', 'application/json');
</code></pre>
<p>but when I'm trying to add variable instead of exact header name/value in the following way, it's showing error :-(</p>
<pre><code>response... | 0 | 1,374 |
OnLocationChanged callback is never called | <p>I am trying to get the users current location using the <code>LocationManager</code>. I have done a lot of research and can't seem to find anyone with the same problem. The <code>OnLocationChanged</code> callback never seems to be called. Below is my various code and the logcat.</p>
<pre><code>protected LocationL... | 0 | 3,011 |
Euro sign not showing up right in HTML | <p>I have a page on my site with a form for editing event information and Updating it to the database. I have a select box with options for Admission Price, which are all preceded by a euro sign in my HTML code, but are showing up as �1 on the webpage. I have the exact same Admission Price select input on other pages w... | 0 | 1,231 |
org.hibernate.exception.ConstraintViolationException on delete | <p>This is supposed to be basic stuff but i can't figure it out. I've got departament and worker. I can easily delete departament, even if there are workers on it but when i try to delete a worker i get the following error:</p>
<blockquote>
<p>could not execute statement; SQL [n/a]; constraint ["FK_1LBUSQOSYF0O16356... | 0 | 3,510 |
Increasing Java's BigInteger performance | <p>How to increase performance of Java's Big Integer?</p>
<p>For example, this factorial program:</p>
<pre><code>import java.math.*;
class Fac {
public static void main(String[] args) {
BigInteger i = BigInteger.ONE;
for(BigInteger z=BigInteger.valueOf(2);z.compareTo(BigInteger.valueOf(99999)) != 0;) {
... | 0 | 1,381 |
Correct JPA Annotation for PostgreSQL's text type without Hibernate Annotations | <p>I'm developing an application using:</p>
<ul>
<li>Java 1.7</li>
<li>JPA (included in javaee-api 7.0)</li>
<li>Hibernate 4.3.8.Final</li>
<li>PostgreSQL-JDBC 9.4-1200-jdbc41</li>
<li>PostgreSQL 9.3.6</li>
</ul>
<p>And I would like to use the PostgreSQL text datatype for some String attributes. As far as I know, in ... | 0 | 1,524 |
OpenCV / Python : multi-threading for live facial recognition | <p>I'm using OpenCv and Dlib to execute <strong>facial recognition</strong> w/ landmarks, live from the <strong>webcam stream</strong>. The language is <strong>Python</strong>. It works fine on my macbook laptop, but I need it to run from a desktop computer 24/7. The computer is a PC Intel® Core™2 Quad CPU Q6600 @ 2.40... | 0 | 1,653 |
Error: jest-haste-map: Haste module naming collision: | <p>I have created a custom <code>npm module</code> (will use <strong>xxx</strong> instead of its name) and link it manually using <code>npm install</code>.</p>
<p>I tried very hard and searched :</p>
<ul>
<li><a href="https://github.com/facebook/react-native/issues/4968" rel="noreferrer">[Workarounds] Packager unable... | 0 | 1,341 |
no such table found in SQLite | <p>im having a problem trying to establish a database in android, everytime i log in, the log cat says that no such table.</p>
<pre><code>public class DatabaseOnline extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
private static final String DATABASE_NAME = "name";
private static final S... | 0 | 1,890 |
Working with maps in Typescript | <p>I am having a bit of trouble working with maps int Typescript. What I am trying to do is to use a HashMap smilier to that found in Java for example here is my Java object, </p>
<pre><code>public class Payment {
private String id;
private DateTime created;
//when they actually received the payment
p... | 0 | 1,821 |
Hibernate change fetch mode in runtime | <p>I have two tables related together using one-to-many relation :
employee -> department : and relation through department_id in the employee table.</p>
<p>I use hibernate : and my hibernate mapping files are:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hib... | 0 | 1,321 |
using bouncy castle to create public PGP key usable by Thunderbird | <p>I created public and private <code>PGP</code> keys using <a href="http://grepcode.com/file/repo1.maven.org/maven2/org.bouncycastle/bcpg-jdk16/1.45/org/bouncycastle/openpgp/PGPKeyRingGenerator.java" rel="nofollow noreferrer">org.bouncycastle.openpgp.PGPKeyRingGenerator</a>. After making a change suggested by GregS, ... | 0 | 4,859 |
Function to build double y axis graph in ggplot2 | <p>I am testing a function to build a double y axis graph in ggplot2. It works but I can't get some elements from the input graphics. I have built these two graphs with two data frames <code>Base1</code> and <code>Base2</code> (I add the <code>dput()</code> version in the final part):</p>
<pre><code>library(ggplot2)
l... | 0 | 2,103 |
crash on deleteRowsAtIndexPaths | <p>My application crashes when I'm deleting row from table. Here is my sources where the bug is detected and stack trace. Thanx!</p>
<pre><code>//delete row from database
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{... | 0 | 2,332 |
Weak self in closures and consequences example | <p>I have done abit of research on stackoverflow and apple's documentation about ARC and Weak/Unowned self (<a href="https://stackoverflow.com/questions/24320347/shall-we-always-use-unowned-self-inside-closure-in-swift">Shall we always use [unowned self] inside closure in Swift</a>). I get the basic idea about strong r... | 0 | 2,322 |
Styling body text in a href mailto link | <p>I have an hyperlink which has a <code>mailto</code> link and I am specifying the subject and body text in the hyperlink itself. So when the user clicks on the hyperlink, his default email client application will be opened with the To, Subject and body text pre-populated in it.</p>
<p>I want to know how I can apply ... | 0 | 1,499 |
Fix dependency resolution errors in Gradle | <p>When I update the okhttp3 dependence from 3.4.1 to 4.1.0, my project fails to build and throws following errors.</p>
<pre><code>Duplicate class org.intellij.lang.annotations.Identifier found in modules annotations-12.0.jar
(com.intellij:annotations:12.0) and annotations-13.0.jar (org.jetbrains:annotations:13.0... | 0 | 4,352 |
DomPDF does not render table nicely | <p>I am trying to get PDF using DomPDF but I come cross a strange problem. All the data and other things are fine but when it renders in PDF the first line of the table is always out of style. Firstly, I though may be table is going to the next page which cause style out of context but I tried to limit table to one pag... | 0 | 1,554 |
Using Chart.js - Creating Legend for Doughnut Chart | <p>Can someone tell me what's wrong with my code? I've successfully generated a doughnut chart using Chart.js, as well as a legend, but I'd like the corresponding segment of the chart to highlight with a tooltip when I hover over each item in the legend, just like how it does on <a href="http://www.chartjs.org/" rel="n... | 0 | 1,619 |
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? | <p>This the file web.xml in WEB-INF</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.... | 0 | 1,500 |
Calculation of CCITT standard CRC with polynomial x^16 + x^12 + x^5 + 1 in Java | <p>I need help with calculating of CCITT standard CRC with polynomial x^16 + x^12 + x^5 + 1 (0x1081) in Java. I have tried many examples on the internet but every one of them returns other values than the ones in the example.</p>
<p>For example for this array [0xFC] [05] [11] the result needs to be [27] [56].</p>
<p>... | 0 | 1,984 |
Makefile Error : Command Not Found- while creating a shared library | <p>I have 4 .c files <code>hello.c</code>,<code>here.c</code>,<code>bye.c</code> and <code>main.c</code>.
One header file <code>mylib.h</code> </p>
<p>The contents are as follows</p>
<p>hello.c</p>
<pre><code>#include<stdio.h>
void hello()
{
printf("Hello!\n");
}
</code></pre>
<p>here.c </p>
<pre><code>... | 0 | 1,035 |
Tkinter widget opens two windows | <p>I am running Tkinter 3.5 on Win machine and when I run this code, I get two windows . I was expecting just one . BTW, I got the code form the web.It is working fine, except that bothers me the second(in backgorund) window .
Basically is a widget to navigate trough different windows(pages) with buttons .</p>
<pre><c... | 0 | 1,531 |
Key Error from Pandas | <p>I have the following code in python.</p>
<pre><code> d1=pd.read_excel("data1.xlsx",sheetname=0, index_col = "Time", parse_date=True)
d1=d1.sort_index()
for val in d1.columns:
start_his=d1[str(val)]
</code></pre>
<p>The data1.xlsx contains </p>
<pre><code>Time Start High Low End 5
05/12... | 0 | 1,097 |
In Xcode 4 how do I add a remote GitHub repository to an existing local project? | <p>The Git integration in Xcode 4 is very welcome however it seems to be a bit flaky when it comes to dealing with remote repositories.
For clarity I'm using OS X version 10.6.7 and Xcode 4.0.2 (4A2002a). </p>
<p>If I create a new Xcode 4 Project and accept the option to create a local Git repository, all is well. I c... | 0 | 1,260 |
How to update AngularJS model from directive linking function? | <p>What I am trying to achieve is to add extra interface for input fields to be able to increace and decrease numeric value in them by clicking + and - buttons.</p>
<p>(In essence it is what input[type=number] fields have on chrome, but I want this to be cross-broswer compatible and also have full control of presentat... | 0 | 1,406 |
Calling @JSFunction from JavaScript, TypeError: Cannot find default value for object | <p>I'm calling a <code>@JSFunction</code> annotated method of a <code>ScriptableObject</code></p>
<p>The JavaScript file</p>
<pre><code>Target = Packages.com.acme.rhino.Target;
function evaluate() {
var t = Target();
t.addModifier("foobar", 1);
return t;
}
</code></pre>
<p>The Java File</p>
<pre><code>... | 0 | 1,043 |
how I can connect HTML to java to add values in database | <p>I want to enter data in database entered from jsp file and dont know how to connect them. Can any one suggest me to connect both files and to add the data entered in jsp form ?</p>
<p>This is my jsp and java files...</p>
<p><strong>test1.java</strong> </p>
<pre><code>package P1;
import java.sql.*;
class te... | 0 | 2,114 |
iOS7 - receipts not validating at sandbox - error 21002 (java.lang.IllegalArgumentException) | <p>I'm converting an app from iOS6 to iOS7. Before I used the deprecated <code>transactionReceipt</code> method so now I'm trying the recommended methods to retrieve the receipt, and then encode in base 64:</p>
<pre><code>NSData *working = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
// ... | 0 | 1,509 |
Compiler error: "class, interface, or enum expected" | <p>I have been troubleshooting this program for hours, trying several configurations, and have had no luck. It has been written in java, and has 33 errors (lowered from 50 before)</p>
<p>Source Code:</p>
<pre><code>/*This program is named derivativeQuiz.java, stored on a network drive I have permission to edit
The ac... | 0 | 2,197 |
java.io.FileNotFoundException: (Read-only file system) Mac | <p>I have a SpringBoot app in which I am trying to test generation of barcodes but I am getting this error <code>java.io.FileNotFoundException: (Read-only file system) Mac</code>.</p>
<p>Here's the code to accomplish this task:</p>
<p><code>pom.xml</code></p>
<pre class="lang-xml prettyprint-override"><code> ... | 0 | 1,092 |
GetMapping and PostMapping annotations | <p>I have a doubr about this operation. Creating this class controller works:</p>
<pre><code>@Controller
public class StudentController {
@RequestMapping(value = "/student", method = RequestMethod.GET)
public ModelAndView student() {
return new ModelAndView("student", "command", new Student());
}
@RequestMapping(val... | 0 | 3,078 |
VisualVM over Putty SSH-tunnel | <p>I'm trying to profile remote java app, actually it is a gameserver. It works normally on my local machine (windows XP x64 with JDK1.7.0_02 x64), but behaves very wierd on the production server (CentOS with JDK1.7.0_03 i586).</p>
<p>I've done a lot of searching and found out that I should use VisualVM for this task.... | 0 | 1,149 |
Java Scanner.nextLine() not waiting for input | <p>I have several methods that I've used previously to accept user input and return it as a certain data type to the method that calls for it. I have used these methods, or variations of them, in previous projects.</p>
<p>I've adopted the method that I used for string to select the first char given and return that, s... | 0 | 2,411 |
How to open or launch a Fragment from another Activity? | <p>from the adapter of a RecyclerView which is contained in an Activity, i'm trying to launch a fragment when an element of the RecyclerView is pressed, this is my code right now :</p>
<pre><code>@Override
public void onClick(View v) {
Intent intent;
int position = getAdapterPosition();
SharedPreferences... | 0 | 1,097 |
Checking the format of an email address in a contact form | <p>I'm using a simple form with a name, email and comment field to send messages from a webpage. There's a hidden title field as well which should be empty in order for the form to be submitted - spam protection if you like. </p>
<p>The JQuery code I am running the form through before submitting works ok, but is curre... | 0 | 1,132 |
How to use NodePort with kind? | <p>I'm trying to use <a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="noreferrer">NodePort</a> with <a href="https://kind.sigs.k8s.io/" rel="noreferrer">kind</a> but somehow it doesn't want to work.</p>
<p>I've successfully deployed the following cluster:</p>
<pre><code>apiVers... | 0 | 1,397 |
Nesting multiple XSLT templates conditionally | <p>My XML is very flat, and here is an example:</p>
<pre><code><Rows>
<Row>
<ProjectID>1000</ProjectID>
<Phase>Initiation</Phase>
<ID>1</ID>
<Name>Work item 1</Name>
<Master>1</Master>
</Row>
<Row>
<Pro... | 0 | 2,699 |
Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in C:\xampp\htdocs\vgdb\csearch.php on line 67 | <p>I have a search bar on my site. When I click on the search button I am getting the error above. I am not an advanced coder so I do not know how to fix it. I have searched online, there are solutions for this problem but they are not working for me. This is for a project that is due in a few days so I would appreciat... | 0 | 1,721 |
pandas create new column based on values from other columns / apply a function of multiple columns, row-wise | <p>I want to apply my custom function (it uses an if-else ladder) to these six columns (<code>ERI_Hispanic</code>, <code>ERI_AmerInd_AKNatv</code>, <code>ERI_Asian</code>, <code>ERI_Black_Afr.Amer</code>, <code>ERI_HI_PacIsl</code>, <code>ERI_White</code>) in each row of my dataframe.</p>
<p>I've tried different method... | 0 | 1,875 |
Failure to find org.springframework.cloud:spring-cloud-dependencies:pom | <p>I have been trying to set up a spring boot project but am getting an error. I researched and tried various options but no luck so far. Any help would be appreciated.</p>
<p>The pom.xml file:</p>
<pre><code><parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-... | 0 | 3,475 |
MySqlDataReader: DataTable.Fill(reader) throws ConstraintException | <p>I have two tables <code>orders</code> and <code>orderdetails</code></p>
<p>table orders (PK = id, UNIQUE index on orderno)</p>
<pre><code>|id|orderno|
| 1|1000 |
| 2|1001 |
</code></pre>
<p>table orderdetails (PK = id)</p>
<pre><code>|id|orderid|item|qty|
| 1| 1|ABC | 3|
| 2| 1|XYZ | 4|
</code></... | 0 | 1,056 |
connecting to sharepoint oniline using Powershell : Cannot find an appropriate constructor for type Microsoft.SharePoint.Client.ClientContext | <p>Hi I am trying to connect to sharepoint online and publish calender using the data from a SQL Table and I am getting the following exception , please advise.The same code works fine with slight modification on a on prem sharepoint server I have added sharepointonline for the authentication but it is failing with the... | 0 | 1,115 |
npm start errors with ERR! code ENOENT, syscall open | <p>I'm suddently having a problem with "npm start" in my React application. When I trigger it, this is what I receive:</p>
<pre><code>npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /mnt/c/Users/pal/Desktop/dev/myApp/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/mnt/... | 0 | 1,444 |
Adding Seek bar to android video player | <pre><code>import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.MotionEvent;
import... | 0 | 2,870 |
java.lang.NullPointerException at android.support.v7.widget.RecyclerView.onMeasure | <p>I try to use RecyclerView with RecyclerView.Adapter but here is something wrong. I post my code below:</p>
<p>Layout:</p>
<pre><code> <android.support.v7.widget.RecyclerView
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/t... | 0 | 3,160 |
How make simple fast request with "requests" module python? | <p>I am a beginner in python,im just trying to scrape web with module <code>requests</code> and <code>BeautifulSoup</code> This <a href="https://www.jobstreet.co.id/en/job-search/job-vacancy.php?ojs=6" rel="nofollow noreferrer">Website</a> i make request.</p>
<p>and my simple code:</p>
<pre><code>import requests, tim... | 0 | 1,846 |
How to fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 | <p>I'm trying to install odoo on a fresh installation of Linux on a VirtualBox machine. I have entered in the commands found here as is: <a href="http://odoo-development.readthedocs.org/en/latest/install.html" rel="noreferrer">Odoo Development Read the Docs</a>. The following command is what prompts the error: command ... | 0 | 8,342 |
How to develop https site with Spring 3.x? | <p>I am a newbie in Spring based web development.</p>
<p>Our site is Spring based and is currently http based (so quite insecure).
Since, the site is not live yet, we are sending login/password also through a normal JSON request to server and have focussed mostly on JSP, UI design, SQL queries etc.</p>
<p>Now, we wan... | 0 | 1,418 |
Using waitForQualityGate in a Jenkins declarative pipeline | <p>The following SonarQube (6.3) analysis stage in a declarative pipeline in Jenkins 2.50 is failing with this error in the console log: <a href="http://pastebin.com/t2ja23vC" rel="noreferrer">http://pastebin.com/t2ja23vC</a>. More specifically:</p>
<blockquote>
<p>SonarQube installation defined in this job (SonarGa... | 0 | 1,506 |
Laravel : using model factories to generate one-to-many relationships | <p>I have a problem with generating multiple one-to-many relationship for a model using factories in Laravel. The factories seem to only be generating one ClubFixture per Club, when they should be generating 5 ClubFixtures per Club.</p>
<p><strong>Models</strong></p>
<p><strong>Club</strong></p>
<pre><code><?php
... | 0 | 1,175 |
jdbi return autogenerated value on inserts | <p>I am playing with dropwizard and I want to build a REST application that has various foreign-key relations in the entities.</p>
<p>For example given the following 3 tables:</p>
<pre><code>-- table persons
CREATE TABLE PUBLIC.PERSONS(
ID BIGINT DEFAULT NOT NULL AUTOINCREMENT,
FIRST_NAME VARCHAR(255),
LA... | 0 | 1,175 |
Using GSSManager to validate a Kerberos ticket | <p>I have the following code:</p>
<pre><code>public static void main(String args[]){
try {
//String ticket = "Negotiate YIGCBg...==";
//byte[] kerberosTicket = ticket.getBytes();
byte[] kerberosTicket = Base64.decode("YIGCBg...==");
GSSContext context = GSSManager.getInstance().crea... | 0 | 1,318 |
Ignoring SSL validation in Java | <p>I have to call an HTTP service hosted on web server with an invalid SSL certificate. In dev, I'm importing the certificate with <em>keytool</em> but the certificate will be different on each client install, so I can't just bundle it.</p>
<p>Foreword: I <strong>DO</strong> know that skipping SSL validation is really... | 0 | 2,739 |
Align navbar toggle button to the right | <p>I'm having a play around with Bootstrap 4, more specifically the navbar menu. Is there is a way I can make the little navbar toggle button align to the right of the page rather than have it floating to the left next to the logo?</p>
<p><a href="https://i.stack.imgur.com/UfKl2.png" rel="noreferrer"><img src="https:/... | 0 | 1,215 |
No material widget found textfield widgets require a material widget ancestor | <p>Hi I am trying to build a login screen in flutter but I am getting below error when opening it.</p>
<blockquote>
<p>No material widget found textfield widgets require a material widget ancestor</p>
</blockquote>
<pre><code> import 'package:flutter/material.dart';
Widget LoginPage() {
return new Container(
... | 0 | 9,144 |
'dotnet build' command not finding NuGet packages (they exist) | <p>I'm trying to build my .NET Core 2.1 application from the command-line on my Jenkins server.</p>
<p>It builds fine on my local machine (Windows 10, Visual Studio 2017 Enterprise), and if I manually build it on the server Jenkins is running on (manually checkout Git repository and running <code>dotnet build</code>). ... | 0 | 3,563 |
Autofac and ASP .Net MVC 4 Web API | <p>I am using <strong>Autofac</strong> for IoC in my ASP .Net MVC 4 project. Autofac is having some trouble initializing the repository and passing it to the <strong>API Controller</strong>.</p>
<p>I am sure I am missing something in my configuration.</p>
<p>Here is the error I get when I navigate to: <code>https://l... | 0 | 2,566 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.