• All Sites

1 answer

Update: nullPointerException, not sure why. And the repaint() method does not work

I am using SwingWorker and have issues with the code I try to implement inside it. Eclipse tells me that a couple of lines inside the doInTheBackground method are out of reach, even though they are …

1 answers | 34 secs ago by zephos2014 on Stack Overflow
1 answer

Mechanical safe-cracking using Android audio and orientation sensors

I’m writing an app that helps lock-smiths with safe manipulation, mainly by creating the charts they need on the fly. When trying to gain entry to a safe via manipulation, a detailed analysis of the …

4 answers

How to save file using JFileChooser?

I have a method in my application called "Save as" which Saves the image of my application on computer my into a file. I used the JFileChooser to let the users choose their desired location for saving …

0 answers

How to wire a JSON data from file in Spring?

I have a simple Spring App. In that app I have @Repository which should provide access to JSON file with my data. @Repository("jsonStorageUserRepository") public class JsonUserRepository implements …

0 answers

Create Webservice Client Stub jar file at Axis 1.4

wsmport tool has "-clientjar <jarfile>" argument to create artifact jar file Is there similar argument for tool org.apache.axis.wsdl.WSDL2Java at Axis 1.4 ? I mean I can create java files but …

7 answers

how to convert rgb color to int in java

Paint.setColor is expecting an integer. But what I have is a Color object. I don't see a color.getIntValue() in Java? So how do I do that? What I want is something like public Something ...

2 answers

Sending Mail: Authentication Failure

I am trying to send an email from an app and I use the following code: private static final String username = ""; private static final String password = "pass"; private void ...

2 answers | 11 mins ago by Inflane on Stack Overflow
4 answers

Thread safety of the plus operator for Strings, optimizations included

This post says that a += b is the equivalent of a = new StringBuilder() .append(a) .append(b) .toString(); Let's say I have this code: public class MultiThreadingClass extends ...

1 answer

Create ArrayList<HashMap> with different values from Jsoup Elements

I have parsed an HTML using Jsoup and obtained Elements in items1 items2 and items3. I want create an ArrayList> to use later to populate a ListView. The problem is that I can not fill the HashMap …

1 answer

How to use set changes in list when one row deleted

I'm using expandable listView and Expandable ListAdapter. ChlidView show me the titles and child View show me the subTitle . In the "child View" i have a button that delete the the specific row . i …

0 answers

Will I have to publish appcompat v7 with my project?

In my project, I am using the actionbar and libraries which extend from that; this meaning that there is the project 'appcompat v7' auto created. My question is. When I submit my app for publishing, …

3 answers

Java applet won't run under JRE7, no error displayed in console

Under Windows 7, 64-bit, since upgrading to JRE-7 32-bit, under IE9 32-bit or Chrome, I can't run applets such as this one. Inside the Applet rectangle, I see the message "Error. Click for details" …

0 answers

Java EE authentication without authorization

I'm using Tomcat and I would set up the authentication for my project to extend user's rights only, without access restriction. It should be possible to login from any page of site (the login window …

1 answer

Java Refactoring - Scope of Variable

I have to deal with some old legacy code, that unfortunately had the coding style of declaring all the variables at the beginning of a method. The code looks something like this as an example: ...

1 answer

JavaMelody 1.52.0 with Tomcat 8.0.5 - Monitoring Not FOund

This is my setup: Apache Tomcat: 8.0.5 JavaMelody: 1.52.0 - added via Maven dependency <dependency> <groupId>net.bull.javamelody</groupId> ...

1 answer

Writing file: IOException: Stream closed

I'm having trouble figuring out why I'm getting the above error with my code. I create a new instance of both FileWriter and BufferedWriter each time the method is called, yet apparently the stream …

3 answers

CountMatches() equivalent Postgres query

We know the stringutils function CountMatches() - CountMatches - counts the number of occurrences of one String in another. I need an equivalent query in postgresql to count the number of occurence of …

3 answers | 18 mins ago by sri on Stack Overflow
0 answers

cvKMeans2 (javaCV)

estou tentando utilizar o ckMeans2 na JavaCV, porém ele não está compilando... peguei esse código (que era mais simples que encontrei) em C e converti para java, se alguém puder me ajudar.... …

1 answer

Prevent APT from overwriting custom files

My server runs a Java application that requires I replace a few java library files with ones I downloaded on my own. This has to do with JCE security extensions and isn't really relevant to my ...

1 answers | 19 mins ago by Doc on Server Fault
0 answers

Parameterized Java Types (Generics)

Consider this "legacy" code: public interface IPersistentCollection { IPersistentCollection cons(Object o); } Genericized in Java, it could become something like this: public interface ...

4 answers

How to pass input to a web page using a automated script

How to pass input to a php web page using a automated script ,i.e. i just want to know how pass arguments to text fields using a script. like passing input to username and password field of a web page …

4 answers | 20 mins ago by Akashdeep Saluja on Stack Overflow
0 answers

Mockito 1.9: format the expected value (like “actual formatter” in custom ArgumentMatcher)

In Mockito 1.9.5 I'd like to format the actual value when verifying the (in order) call arguments of a method. Mockito provides a overridable describeTo method within ArcgumentMatcher<T>s that …

0 answers

LibGDX. Distance field font transparency

Using this tutorial I am able to create nice and crisp fonts for any resolution. The only problem I can't figure out is how to make them transparent. When I set the shader to the batch, it stops using …

1 answer

Override US_export_policy and local_policy jar for a application

Is it possible to override US_export_policy and local_policy jar through JVM or application arguments?

1 answers | 21 mins ago by Thillakan on Stack Overflow
1 answer

Android Development using Head First

I am making an android app to check whether the string entered by user is palindrome or not.I am using charAt function to extract every character from string.But it shows the error that 'the method …

1 answers | 24 mins ago by Ashish Yadav on Stack Overflow
1 answer

Hacking to make ReflectionFactory work (Repackaging)

I know that GAE is a very restrictive platform; and it restricts access to classes like the sun.reflect.ReflectionFactory However, many library rely on these packages but is not allowed in the GAE …

3 answers

How to configure log4j2's additivity to respect parent's level?

I think this code explains well enough what I'm trying to do package us.benanderson; public class MyClass { private static final Logger LOG = LogManager.getLogger(MyClass.class); ... // ...

3 answers | 26 mins ago by andersonbd1 on Stack Overflow
0 answers

Cannot load configuration class

I am following this tutorial about how to use Spring and based on the provided example, I get the following exception: Exception in thread "main" java.lang.IllegalStateException: Cannot load ...

1 answer

How to use Jsoup to login my university website?

I am trying to come up with a Android app that needs some information on the university inner website. I have been trying to use Jsoup to login the website programmatically. Here is the code I have …

1 answers | 30 mins ago by dorafmon on Stack Overflow
1 answer

how to read encrypted string in Android

I have try to read one String that may be Encoded by some one, But i need to read this String, Actually this String is Gujrati Language, And i hava also use the .ttf file for read this gujarati String …

1 answers | 32 mins ago by testuser on Stack Overflow
15 30 50 per page
1 2 3