• All Sites

3 answers

java 1.6 daylight saving

I'm working on a critical application which cares about daylight saving change. I'm trying to compare two java Calendar instances that cross the daylight saving change. My current location is Italy so ...

3 answers | 37 secs ago by landal79 on Stack Overflow
1 answer

Recursive Algorithm for the four color theorem

The problem at hand is to take a map separated into regions as expressed in an adjacency matrix and using four colors, color the map such that no two contiguous regions share the same color. We will ...

0 answers

How to center a button at the buttom of a FrameLayout in a RelativeLayout

This is my xml code: <LinearLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent" ...

0 answers

Dialog getWidth and getHeight return no integers no matter what

I have implemented everything I can find here on StackOverflow. Here is my code: MainActivity: statusDialog.getWindow().setAttributes(lp);; final ...

0 answers

Error when running with Jython

I'm kinda newbie to Jython. I'm trying to execute a python script through a Java program (using Jython). Inside the python script I'm trying to call a method of some external library (called petl). ...

2 answers

Java Button pressing visual style

JButton button = new JButton("Green Button"); button.setBackground(; button.setBorderPainted(false); button.setFocusPainted(false); With above code, Java remove button's hover style. ...

2 answers | 3 mins ago by linksoftwrite on Stack Overflow
0 answers

how to send soap request and get response using java1.4

I have done it like first creating soap requesting using input data and stringbuffer. then using http sending it to soap. below is the code public String sendSoap2Http(String url, String username, ...

0 answers

Gradle + Eclipse + Multiproject: How to not export provided JARs that are dependencies of a dependency?

I have a multiproject project with a core project ace2 that is dependened on; it has dependencies. I cannot seem to get the transitive dependencies to NOT to end up in the other project dataentry2, ...

1 answer

Um pequeno probleminha no Eclipse

Havia, ontem, feito uma pergunta aqui mesmo no site em relação a um problema em meu Eclipse ADT. Agradeço de coração ao felizardo, cujo nome não estou lembrado, por ter me ajudado! O jeito foi ...

1 answers | 10 mins ago by Gabriel on Stack Overflow em Português
3 answers

ClassNotFoundException when running a junit test in eclipse

I am really desperate why this exception can even occurs ? I am running test in class MyTestIT. And what class is not found ? Class which I run... I tried to clean and build it again in eclipse but ...

2 answers

mysql sqlExceptiion Error

I will begin by saying that I googled the problem and found explanation but still can not fix the error...:s I'm getting java.sql.SQLException: Operation not allowed afterResultSetclosed (what I ...

2 answers | 11 mins ago by Pawel B on Stack Overflow
0 answers

How to Find Most Memory Consuming Component from Java Heap Dump

I have Oracle Weblogic 10.3.6 and have a memory problem. I've analyzed heap dump and here is the result: Most time consuming class is: com.certicom.tls.interfaceimpl.CertificateSupport I use ...

5 answers

How can I check if an ArrayList<String> contains any elements from an array of Strings?

Within Android, I'd like to perform an if statement to check whether an ArrayList contains any element from an array of Strings? e.g. Check whether any of the elements from singingGroup are also ...

1 answer

Usage of Spark DataFrame.flatMap in java

I have worked with RDD.flatMap function in java. Now trying my hands on DataFrames. They say: public <R> RDD<R> flatMap(scala.Function1<org.apache.spark.sql.Row, ...

1 answer

Filename as columns - hadoop

I have log files with that contain the date and hour in the file name. Is there a way to extract date & hour from the filename to add extra columns in hive, an example of the file is ...

2 answers

@ManyToOne mapping in Hibernate not working

I have two classes, Invite and Event with a many-to-one mapping: one event has many invites. Here are the relevant snippets of code/SQL with Hibernate annotations: db.Events ...

2 answers | 19 mins ago by gwg on Stack Overflow
7 answers

How to add spaces only between catenated values using java

I have a string that supposed to return a concatenation of multiple strings such as "bob" "bill" "steve". The end result should look like "bob bill steve". How can I add a space without adding one ...

0 answers

rabbitmq procession speed issue

I have a consumer java spring rabbitmq app, when it runs on one node (computer), avg speed is 20 ms/sec, but when I run 2-3 nodes, avg speed is ... 20 ms/sec. Am I correct if say that speed should be ...

0 answers

Spring - keep values of different types in databse

Is it possible to keep parameterized values in database and use them as properties in some more advanced way? I want to include type of value, along with key-value pairs. Is there a Spring mechanism ...

2 answers

how to fetch data from url in mainactivity in android

the code i am using is working very fine for me but the problem is i am not able to fetch that data in main activity public class AsyncTaskParseJson extends AsyncTask<String, String, String> { ...

2 answers | 24 mins ago by Rajdeep Kumar on Stack Overflow
0 answers

Find Jersey Parent Path

I have a Jersey 2.x endpoint that a user can POST to to update a specific property on a parent resource. On success, I would like to return a 303 status and specify the path to the parent resource in ...

1 answer

Saving information for connection (jdbc)

I'm going to connect to database. My information for connection contains in the .xml file. Where should I keep this information? (in a class, in a interface, or once to use and forget).

1 answers | 25 mins ago by Andrew Tobilko on Stack Overflow
2 answers

Samsung Note 3 Cutting Off UI At Bottom & Right of Screen

I've tested on several other devices and my UI looks fine. However on the Samsung Note 3, the UI is getting cut off on the bottom. I have logged the system specs and done the math. I have the screen ...

0 answers

Navigating Walls with Karel the Robot

I'm working with Karel the Robot and I need to find a way to have my robot avoid all of the obstacles and end up on the other side of the first and second walls. I've figured out a more concise method ...

0 answers

change json field name jackson

I want to change the name of the field: public class Track { @JsonProperty("title2") private String title; ...} And I've got the method: @Path("/json/metallica") public class MyRest { @GET ...

2 answers

Java Clean String?

So I'm working with TCP and I got the data from DataInputStream, however when I get the data it has stuff like ^X^@^E^R around it. When it shouldn't do. Is there anyway I can remove this. It would ...

2 answers | 27 mins ago by user3642449 on Stack Overflow
1 answer

Minecraft with OpenJDK 7, I get “the trustAnchors parameter must be non-empty”

Im using Ubuntu 15.04 and OpenJDK 7, trying to run Minecraft. This is what I get. EDIT: Minecraft is working now when I use sudo java -jar Minecraft.jar but doesn't work without super user, how would ...

1 answers | 30 mins ago by ashermaster on Ask Ubuntu
1 answer

Is this database design good? What JPA Entities should I create for this design?

I am trying my hands on JPA. For this I am thinking of using the example of a student admission process as shown in the diagram below. Is this design good ? Any suggestions for improvement are ...

0 answers

Socket exception: socket closed after back button pressing

I'm writing an application which should be working in the background. When I pressed back button on my phone, my socket connection with server is closed and exception occurred. Is there any ...

1 answer

How to delete user installed certificate programmatically?

I had installed a certificate programmatically. I am able to uninstall it manually by going Settings -> Security -> Trusted Credentials -> User -> Choose the certificate and click the ...

15 30 50 per page
1 2 3