Derek Baker

Ranch Hand
+ Follow
since May 23, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Derek Baker

Hello All,

I'm trying (desperately) to find information on either implementations of or consultants who can advise us about the CDC and the Personal Profile.

You can't turn around without finding information on CLDC and MIDP and phone development, but we're looking to develop the software for a medical instrument that would have a little more horsepower and resources than a phone or PDA, and I've only found a few implementations that support CDC and PP (Esmertec JBed and IBM's J9).

Is there anything else out there that I'm just missing? Implementations, consultants, or any other resources? Any help would be very much appreciated.

Thanks,
Derek Baker
16 years ago
I don't think you can fix the length, but you can convert it to a number, do your operation, then convert it back. To convert it back goes something like this:


I don't have the API in from of me, so that may not be precisely right, but if you look at the java.text.DecimalFormat class API, you should be able to get the rest of it.

Derek
[ September 24, 2004: Message edited by: Derek Baker ]
17 years ago
I can't even compile that, much less get the message you expect to print out. I believe it won't compile because the first class is defined within the same method that you call new first(). I think solving that problem comes first. I can get it to compile and print the message if I move the declaration for the "first" class outside of the declaration of the tst class. Like so:
17 years ago
It's not a book (although it may be available as one) but I find this to be a good resource:

http://java.sun.com/docs/books/tutorial/collections/index.html

Derek
17 years ago
It prints to standard out (actually standard error, I think) because that is the parent of the logger you have defined. You can turn off logging to the parent by calling

or you can set the formatter on the parent logger by calling

This will set the formatter for the first handler on the parent, but unless you've actually added others, I believe there will always only be one.

Hope that helps.

Derek
17 years ago
I realize there is some benefit to constructing long Strings by using a StringBuffer object and then calling toString(), rather than repeatedly concatenating String objects.

I'm wondering though, if there is some rule about how many Strings are being concatenated that makes it easier to decide if I should use the StringBuffer method. If I'm just concatenating two strings, is it still beneficial to go through a StringBuffer first? If not two, then what is the limit? And does the number of characters have anything to do with it?

Derek
17 years ago
Thank you! That article was just what I needed.

Derek
17 years ago
Hi,

I'm trying to open a .zip file (using a ZipInputStream) and read it line by line. I've tried to create a BufferedReader by passing the ZipInputStream through an InputStreamReader, but readLine() returns nothing but null. Any input or thoughts anyone might have would be greatly appreciated.

Derek
17 years ago
I think it's as simple as adding a newline character to the end of the printed string in the C function.

Derek
17 years ago
Thank you both.
Bert, are you serious about that .0001% thing? That's making me feel pretty good right now (and almost forget my bronchitis!).
I'm looking forward to your book for the web component developer exam.
Thanks again.
Derek
18 years ago
That particular exception is generally an indication that something is listening on that port, and given that the page comes up, I'd guess it's Tomcat already running. It may start on its own after installing. I'd run the command to stop it (can't remember what that is off the top of my head) and then start it again, or check to see if it's running already by looking at the Windows services, or checking for the process using ps -ef if you're on some unix variant.
Derek
Passed SCJP 1.4 on Saturday morning with a score of 91%. I'm pretty happy about the score, but I'd sure like to know what I missed.
My preparation method was:
Read the Sierra / Bates book twice, then once more very closely while taking notes.
Took about 12 of Dan Chisholm's mock exams and studied whatever I got wrong.
Took Marcus Green's mock exams.
Spent a lot of time poking around JavaRanch.
I wish that I had:
Gone over my notes more carefully and even typed them up.
Spent more time on the checklist things at the end of the Sierra / Bates chapters.
Read the entire Java Language Specification instead of 75 pages.
Spent more time on threads, particularly wait(), notify(), and notifyAll().
So thanks to everyone, especially Dan Chisholm for what seems like it was a monumental effort to compile all those questions and organize them like that. I think the Web Component Developer exam is next.
Derek
18 years ago
Could someone please explain to me (or provide some reference to something that can) how to convert negative decimal numbers to binary and negative binary numbers to decimal? If they're positive, I'm fine, but I'm having some trouble with negatives.
Thanks.
Derek
I'd love to see those as well. If you could email to:
that would be great.
Thanks,
Derek
[ April 27, 2004: Message edited by: Derek Baker ]