java

java

  • All Sites

1 answer

Error in connecting to AS400 DB2 server JDBC

I am trying to connect to the AS400 DB2 database using the JDBC in a java program but I am unable to connect as it is giving a SQLException stating No suitable driver found for ...

1 answer

Awt Robot key press delay

I work on a small tool for a game something like hotkey which handle a combination of user key press event and simulate with Awt Robot a couple of key press. The problem is that called method ...

1 answers | 2 mins ago by N. A on Stack Overflow stackoverflow.com
0 answers

PircBot - Iterate a set of commands on every user

What I wish to do, is to get the user list when my bot joins a channel, and for it to create an instance of my custom user class. However, it doesn't seem to work. I am using Pircbot 1.5.0. Here's ...

1 answer

Project Euler 18/67 : Maximum Path using Memoization

Problem statement of PE18 is : By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 ...

3 answers

How to create threads in Java EE environment?

I have a requirement where I have to persist some data in a table and the persisting may take sometime. Basically I want to persist a log. I don't want the execution to wait till the persisting ...

1 answer

Performance issue with javafx application

I am building a desktop app using javafx, I am downloading a file around 500 MB using ftp. I am choosing the download location using DirectoryChooser but after choosing the directory my application ...

1 answers | 5 mins ago by user3649361 on Stack Overflow stackoverflow.com
1 answer

What are valid reorders for Java synchronized?

Many people asked similar questions like this, but none of their answers satisfied me. The only two reordering rules that I am very sure of are as follows: Operations inside the synchronized ...

1 answers | 6 mins ago by user2351818 on Stack Overflow stackoverflow.com
4 answers

Why doesn't [[a-z]*&&[^a]] catch “bc”, but “b”?

Ok, so I have tried to become more familiar with the intersection in regex (&&). On the java.util.Pattern page all the regex are explained and && is only ever used next to a range ...

4 answers | 6 mins ago by Neuron on Stack Overflow stackoverflow.com
0 answers

closed ChainShape in Box2D

I recently began to learn libgdx and I am stuck at a problem with the CainShape of Box2D. My first goal is to simply create a box with a ChainShape. In order to achieve that, I added four Vector2 ...

1 answer

Check if a game of Tic-Tac-Toe has a winner

I've implemented a Tic Tac Toe game with a public method checkWin() to check if the game has a winner. This is my code. public class TicTacToe { int size; int [][] board; public ...

0 answers

Getting question mark instead of hindi character in java servlet

I am passing hindi characters from html page to java servlet with the help of URL. The hindi characters appear correctly in html but gives question mark in servlet. The setCharacterEncoding has been ...

7 answers

Setting up Tomcat 7 on server: “NB: JAVA_HOME should point to a JDK not JRE”… Why?

I'm trying to set up Tomcat 6 on my server instance (Fresh install of Windows Server 2008 R2 Enterprise). I want to make a Java EE service availible via a URL. It works via loc alhost just fine(on ...

7 answers | 14 mins ago by Paul on Stack Overflow stackoverflow.com
0 answers

OpenCV Adaptive Threholding in Java

The javadoc mentions signature of adaptive threshold function as adaptiveThreshold(src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, C) I need to somehow put in values for blockSize ...

3 answers

How do I split a string into an array, but keep multiple digit numbers/words together?

I'm making a simple LISP interpreter in Java and I have been having trouble figuring out how to properly split the user's input so that each character is on separate indexes except for multiple digit ...

3 answers | 15 mins ago by reekah on Stack Overflow stackoverflow.com
2 answers

LibGDX . draw multiline text

I am trying to write a big text using BitmapFont in libGDX . But it shows on one line and the user can see only the first part of the text . How can I make that bitmapFont made new line automatically ...

2 answers | 15 mins ago by Vahe Muradyan on Stack Overflow stackoverflow.com
1 answer

want use com.mcxiaoke.volley in android project

hello i want create a android apk. and need to use from "com.mcxiaoke.volley" and "com.android.support:appcompat" please give me a build app for my app. current build app is : apply plugin: ...

0 answers

How to hook eclipse save on editor close action

I am writing plugin that needs to change edited file before it is saved. I've managed to successfull hook into file > save and file > save all by using IExecutionListener. That does not work when ...

2 answers

File Downloading in Java

I have an mp3 link i want to download from java just for testing. Here is what i code to do that private void saveFile() throws Exception{ System.out.println("Opening InputStream."); ...

2 answers | 18 mins ago by Usman Riaz on Stack Overflow stackoverflow.com
1 answer

Auto-generate Javadoc comments in intelliJ?

Is it possible to auto-generate Javadoc comments for each method in one class in IntelliJ IDEA?

0 answers

Java Program using Linked List

I am making a program in which the program shows some options like insert Book, delete Book etc. The program asks us to enter certain details about a book by Insert method. I have made every method ...

1 answer

pass data between browser and java SE project using websocket

I create a sample project using Java and JavaScript. Java use for create the server part and JavaScript use for client part. To develop javaSE project use jetty version 9.0.5. This my server part ...

1 answer

What does fibaux(n)[0] mean in python?

So i am looking at a code that is a more efficient fibonacci calculator, but i do not understand what return fibaux(n)[0] means. I am trying to convert it to java and I almost have it, but i do not ...

1 answers | 21 mins ago by Bailey on Stack Overflow stackoverflow.com
1 answer

Не обновляется recycleview

Не обновляется данные при вызове метода onRefresh(). Данные остаются такими же какие были при первичном запуске приложения. public class SecondActivity extends Activity implements ...

1 answer

Long delay between Akka actors

I'm consistently seeing very long delays (60+ seconds) between two actors, from the time at which the first actor sends a message for the second, and when the second actor's onReceive method is ...

0 answers

Propagation of transactions in Spring is flaky

I have a Spring/Hibernate app that uses transactional services and I am a bit of confused how do transactions work when using NEW propagation: @Transactional method A() | |-loop for each ...

1 answer

Hibernate in JavaFX - displaying records from selected ID

I'm trying to display all records from selected ID on ListView, but how can I display for example record from selected ID from column 'name' in Hibernate? In MySQL it looks like that and it works ...

1 answers | 24 mins ago by dante on Stack Overflow stackoverflow.com
1 answer

NoClassDefFoundError в maven зависимости

Вопрос, конечно, заезженный, однако ни одно из найденных решений, мне не помогло. Пишу приложение на spring mvc. При запуске на томкате из ide всё хорошо. Мавеном собираю war-файл, разворачиваю на ...

1 answers | 26 mins ago by Sapphiron on Stack Overflow на русском ru.stackoverflow.com
2 answers

Android GoogleAPIClient - NoClassDefFoundError: com/google/android/gms/internal/zzsa

I'm developing an app that uses GoogleAPIClient to (obviously) get the user current location in background. For this task I use IntentService with WakefulBroadcastReceiver (to get the location every ...

1 answer

Design choice in a Java program, what is a good way to extend lists of internal classes?

Looking for general princple design advice, using Java as a reference for simplicity sake. Suppose Programmer 1 has a problem to solve. He solves it by creating a class SolveProblem1 that stores a ...

5 answers

Multiple for loops

Is it possible to combine multiple for loops into one loop in Java? e.g, I have for (i : lista) { //do something } for (j : listb) { //do something } is it possible to combine both in one?

5 answers | 29 mins ago by AJW on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3