• All Sites

6 answers

Unable to close the command prompt after executing a batch file using java

I am invoking the build.bat file using this rt.exec(new String[]{"cmd.exe","/C","start", "/MIN","build.bat"}); This line opens a command prompt. The build is successful but the window remains open. ...

0 answers

Compare two lists with both exact value match and similar value matchs (Using Java)

I have two very big lists to compare. I compared them using retainAll() method and got the list of common elements. But I want to get the similar matches as well. ArrayList<String> list1 = new ...

0 answers

Why DigestOutputStream cast int to byte?

The DigestOutputStream calculates hash of its content, for example MD5 hash. If we look at its source we'll see: public void write(int b) throws IOException { digest.update((byte)b); ...

1 answer

Why does 'File.exists' return true, even though 'Files.exists' in the NIO 'Files' class returns false

I checked and I don't see a question answering this specifically. I am trying to determine if a file exists in a network folder: // File name is "\\QWERTY\folder\dir\A123456.TXT" Path path = ...

1 answers | 3 mins ago by Saint Hill on Stack Overflow
0 answers

Split file by XML tags

I'm an amateur at Java coding and I'm stuck in an assignment. I've written most of the code except the fundamental part, and I'm drawing a blank on how to go about doing it. I was hoping someone ...

0 answers

Multitenented Parallel Processing

I have a tomcat server with a handful of fairly long-running operations that I feel could be greatly sped up if broken up and processed in parallel. What is the best practice as far as this is ...

3 answers

Replace String with character code in Java

Can't figure out how to replace a string with a character in Java. I wanted a function like this: replace(string, char) but there's not a function like this in Java. String str = ...

3 answers | 3 mins ago by 40-Love on Stack Overflow
0 answers

how to run java files that i have mentioned in my testng xml?

I have a testng.xml file and a build.xml file. I want to know how can we write code in build.xml file which can run all java files that I have mentioned in my testng.xml file?

3 answers

Find number of elements across multiple lists and combine; remove if/else complex?

I have a list of lists: List<List<String>> someList = new List<List<>>(); The maximum size of a list is five strings. It's something like below: someList.get(0).size(); // ...

3 answers | 6 mins ago by Robert on Stack Overflow
2 answers

Jasper Report cannot find the class path

I am new to jasper report. I am using the JasperReport latest version 6.0.3, So I am having the problem to load the report which I created to print the billing. then I got the error message like ...

2 answers | 6 mins ago by thusya on Stack Overflow
0 answers

Local Java Client Cannot Obtain JMS ConnectionFactory from Remote glassfish

This code (In a local java client contacting a remote glassfish) remoteFactory = (ConnectionFactory) remoteCtx.lookup(connectionFactoryName) Throws this exception message Cause: ...

1 answer

Is the extra top space in a stage included in the size of the scene?

If I want a scene to be 500 by 500... does that make the stage 550 by 550 or does it make the scene 450 by 450 and the stage 500 by 500? What is the width and length of the extra title bar space above ...

1 answers | 11 mins ago by Jay Bartgis on Stack Overflow
1 answer

Программное узнавание координат точки в яндекс или гугл картах

Из предыдущего вопроса узнал, что нажимать кнопку программно можно с помщью спец.библиотеки. Вопрос: как мне извлечь координаты места из гугл или яндекс карт, если на вход я загоняю название и наживаю ...

1 answers | 12 mins ago by DenShDen on Stack Overflow на русском
2 answers

Add Items to ListView - Android

This is my first experience with android. I'm trying to add items to my ListView. I use Tabs, and the only way to see that the item was added is to change tab and then come back to the first tab. I ...

0 answers

ASX level 2 data via API

Is anybody aware of Java/C++/Python API's available for ASX stock market depth? I'm currently using IB which is ok but has a number of limitations / issues - the one I care most about is the limit of ...

0 answers

how to use predefined javaFX class style

according to javaFX 8u45 spinner, can be styled in numerous ways via style class, i do know how to do it by code ...

1 answer

Migrating from Spring 3 to Spring 4 - org.springframework.scheduling.quartz.CronTriggerBean

I'm trying to migrate from spring 3.0.5 to spring 4.1.X . [5/28/15 20:10:16:798 EDT] 00000092 ClassPathXmlA W __refresh Exception ...

1 answer

Grouping/linking in a cluster

Im using processing and so far I have a sketch that draws random balls, and draws a line when the connect within a certain radius. for(int i=0;i<=people.size()-1;i++){ Person p = people.get(i); ...

0 answers

How do I set a timeout on a port?

How do I set a timeout on a port? I want the port to timeout, so the program will not keep on extracting info from it. void setup(){ oscp5 = new OscP5(this, 7771); }

1 answer

'Practical' double rounding in Java

So I've read a lot on this, so please know that I get that a number like 0.6 can not be represented absolutely accurately as a Java double - but I do know that there is a version of a double that ...

5 answers

What is the most efficient way to compare two arrays of booleans?

I have an array a of 10 booleans (or equivalently the binary representation of a number < 1024). I want to compare this array to a large set of arrays b[i] of booleans of the same size in the ...

5 answers | 26 mins ago by Tom on Stack Overflow
0 answers

Android don˙t detect rule

Can not figure out for couple of days now how to resolve my flipped picture from front camera on Android 4. I want to rotate them on this way, but for some reason android don`t detect rule for front ...

0 answers

VoltDB Timeout for createConnection

Below is a simple code snippet that shows how to connect to a VoltDB server. ClientConfig clientConfig = new ClientConfig(); Client client = ClientFactory.createClient(clientConfig); String server = ...

1 answer

JTAPI for CUCM Multi Cluster

How to use JTAPI for multi-cluster of CUCM (Cisco Unified Communication Manager)? As my understanding, if there is only one cluster, I should create a JTAPI Provider instance for the cluster, and ...

1 answers | 30 mins ago by Simon Liu on Stack Overflow
1 answer

How to execute external java function by MySQL triggers?

I have a databases in a remote machines. Assume db1 at . I mean this database is not on my local machine but I can connect that by a URL. I want whenever some updates happen on ...

2 answers

AsyncTask data communication with nested Classes

I have a specific scenario and I need your help. I'm trying to build an App in Android that involves network communication. I am using AsyncTask for the http POST requests. I have another class ...

14 answers

Strategic Voting, The Game

One of the most common voting systems for single-winner elections is the plurality voting method. Simply put, the candidate with the most votes wins. Plurality voting, however, is mathematically ...

0 answers

LibGDX - How to combine Clicked() method from two click listeners in LibGDX similar to Android?

I want to combine the following two buttons (button1 & button2) into one clicked() method which is similar to Android using v.getId(). In LibGDX: button1.addListener(new ClickListener(){ ...

0 answers

How do I password protect an HTTP Get Request on my Apache Tomcat server?

I want to send a user some data only if they correctly supply the username and password in the header of their HTTP request. I tried doing this via the HttpServletReqest login() method, but it hasn't ...

2 answers

Connect to HBase running in Docker

I cannot connect to HBase running in Docker on Windows (banno/hbase-standalone image). However, I can connect to locally installed HBase. banno/hbase-standalone image is run using: docker run -d -p ...

15 30 50 per page
1 2 3