I have a long running task that is executing in the background on an ExecutorService thread pool. What are some best practices in terms of this task returning progress or intermediate results? Are there any libraries that provide this functionality?
EDIT: To clarify, I'm talking about reporting progress to other code, not to the user....
I don't know how SSH works and I think that's a simple question. How do I fix that exception:
com.jcraft.jsch.JSchException: UnknownHostKey: mywebsite.com.
RSA key fingerprint is 22:fb:ee:fe:18:cd:aa:9a:9c:78:89:9f:b4:78:75:b4
I know I should verify that key or something, but there is like zero documentation for Jsch. Here is my code...
My application has a custom view which contains other custom views of a different type. The subviews have their own click listeners (which I can't change, as these are in 3rd party libraries). How can I intercept a user's click at the level of my view to do some processing, and then pass the click on to the proper subview?
...
I have two Date objects and I need to get the time difference so I can determine the total hours between them. They happen to be from the same day. The result I would like would have the hours and minutes.
When I use .toString() on my Date object I get this: Fri Dec 18 08:08:10 CST 2009
I've tried the following:
long diff=(this.en...
Hi,
I'm analyzing music mp3 files. What I'm doing is extracting the audio data from the file and computing music similarity.
I've been using javazoom in order to handle mp3 files. By using audioFormat I'm extracting the raw data from the mp3 file:
byte[] audioBytes = new byte[numBytes];
in_format_init = AudioSystem.getAudioInputStream...
In response to a question about examples of Java usages, I bumped across some articles where NASA used Java for ground control in a mission to Mars but I couldn't find out if it has ever been used outside of Earth. Do you know of any such instances?
...
I am a newbie in web development using javascript libraries. But I recently saw a J2EE web application that uses ExtJS extensively (say 90%) for rendering the web pages. The web pages in question are either simple forms or grids (tabular reports). The JSPs are fairly threadbare and simply delegate to the ExtJS framework (using onReady fu...
Hi,
I'm pretty much a beginner at programming and I know only basics of VB, Java, and C++ as well. Lately, I was trying to work on my Java by building some very simple desktop apps but I found swing and layout managers to be very frustrating. I know how to make them work and I've done them before (not saying I'm good at them) but doing ...
Hi geeks,
I want to send a file from my PC to a remote device connected through serial port. So is there any API in java to send file over serial port?
...
Is there a good Java library for taking the legwork out of writing good micro-benchmarks? I'm thinking something which can provide (with a minimum of hassle) provide text (CSV or HTML, take your pick) output of results and maybe graphs summarizing results. Ideally, it should be something that plays nicely with JUnit or equivalent, and ...
I am using the Mibble MIB Parser to extract all simple data types from an MIB file. I've been successful until my attempt to extract comment text.
Take the following module as an example:
invBookList OBJECT-TYPE
SYNTAX INTEGER {
mobydick(1), -- call me ishmael
paradiselost(2), -- aComm...
I'm coding a Java ME app and attempting to globally identify each phone using the app. The first attempt is to load the IMEI per this question. As a fallback ID I'm using the bluetooth address of the device. Is the bluetooth address of a cellphone a globally unique identifier? Is it a MAC address? Some other format?
...
From what I understand, obfuscating a java web application will just make it a little harder to read your application, but reverse engineering is still possible.
My goal is just to make it very difficult to read, and not be able to decompile and run (not sure if that's possible, I guess it will still run just with ugly variable names??...
We've always used the BouncyCastle library, I'm being asked if there are other viable alternatives, either open source or not. Or is the BouncyCastle library already the best one to use?
...
I have an ANT build xml file which includes a path declaration with numerous path elements. I would like to declare a second path that "includes" somehow all the elements from the former path into its own. That would then allow me to just the later path rather than requiring me to include both when paths are required.
Without copying al...
is there a java UI testing tool (web) that converts the DOM into a java object of sort?
So I can do something like:
browser.GoToPage("google").FindButton("search").click();
...
I want to color a Table row depending on whether there is a non-null in its 3rd column.
Heres the code that I wrote : (ignore the braces)
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
JComponent c =(JComponent) super.prepareRenderer(renderer, row, column);
c.setBorder(BorderFactory....
I was wondering what kind of tools people use to make their coding experience more enjoyable or easy. Especially in java.
Also, what kind of tools would be nice?
EDIT: Let's assume we all use some IDE that supports plugins... :-p
...
Hello, I am working on an assignment that asks me to implement an AVL tree. I'm pretty sure I have the rotation methods correct, but I'm having trouble figuring out when to use them.
For example, the explanation in the book says that I should climb up the same path I went down to insert the node/element. However, I can't have any parent...
I want to develop an application in java to capture video from webcam and store it onto a particular location.Can anyone provide me the working code?
What type(usb,ip etc..) of webcam is the best in order to develop the application.
Please help me. how to proceed?
...