Dave Jones

Ranch Hand
+ Follow
since Feb 20, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dave Jones

Hi
If you have the file name, then you can check the possibilities of the 'File ' class.
17 years ago
Well, reading a bit about BigInteger, I understood that it holds many options and possibilities, more than I need. So I was wondering if there is something in the middle.
If you say there isn't, well, BigInteger- here I come !!!

Thanks guys(and 'gals').
17 years ago
Yup, I know about BigInt, and actually, I think that BigInteger is even better for my use, but isn't this solution a bit"too much" for what I need ?
isn't there something 'smaller' friendlier than this ?
17 years ago
Hi all,
I have a spec in which I'm required to hold a 20 digit number. as you know, long can hold (almost) up to 19 (2^63 -1).

Any suggestions ?

Thanks a lot
Dave
17 years ago
Hello Ranchers!!

I have a few Double members, with setters and getters.
I recently received a request that the getters will return a double with only two digits after the decimal points(decimal digits, that is).
e.g - the number for the number 5.123 the getter will return will return 5.12.
Now, I remembered something called "scaling" , setScale , but I can't find this method in the Double object nor in the API.

I know I can always write a small util, but I always prefer something ready.

Any suggestions??
17 years ago
Hi all
I have two questions, any answer will be great!
I have Java beans which I "turn into WSDL" using xfire binding.

1. How can I add a WSDL version ? I mean, my POJO's change sometimes, fields are added, required fields become optional, etc. So I'dd like to add a version, o whoever uses the WSDL, will know when a new version is out.
how can this be done?

2.The 'minOccure' and 'nillable' attributes are created by default. this is usually ok, but sometimes I wan to change this, how do I do it ?

Thanks
Dave
17 years ago
Hello all
I have some java code (and interface, it's impl class and another POJO or two) and I use it to create an XML schema. Everything is ok until I have a Class containing a List. for some reason, the schema created does not recognize the List and instead creates a schema containg the object of the list (as if the list doesn't exist)
I think this might be solved using an annotation but nothing I try work.
Can anybody help shed some light ??

Thanks,
Dave
17 years ago
Hi,
Svend Rost's reply should help you find the answer, I suggest you think about it and present your answer here, just to be sure that you got it right.
17 years ago
int limit = -1;
String[] cc = aa.split(";", limit);

Or limit should be the length of the reslut(slots) you want.

Read more in the API(look for the split method:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
17 years ago
I agree, it does seem logical
Thanks again Henry
17 years ago
Thenk you Henry !

I already used the CRC32 class, it returns a long and that is good for my uses.
But now, a question has risen:
Why is it called CRC32 if the 'getValue' method returns a long value ??
Common logic says it should be called CRC64. or did I miss something here ?

Thanks again,
Dave
17 years ago
Hello, and thank you for your answer.
I can't just take the firat/last 64 bits since they will probably be identicle althou the files are different (the files are similar but not equal) so I need some kind of CRC.
17 years ago
Hello all y' ranchers !

I have to compare a few files to each other, the best solution is running each file through some kind of a hash algorithm, so the result will be either a hash, or a long or anything that is 16 bit long...
I though of using the CRC32 but it works with 32 bit (as implied by the name...)

Any suggestion will help. I need something simple and reliable.

Thanks a lot.
Dave
17 years ago
Yes, I see.
Thank you, I understand now how this works.
now I can get exactly what I need.
I see that the day(of month) is correct, though the month is "short by one"
I wonder why they started counting the months from zero but the day-of-month from one.
anyway, thank you!
18 years ago
Hi all ranchers !
I have a small problem and I'm sure there is a simple answer out there...
well here goes..
I need to parse the current date into a simple string like this:
(lets take today for example) "061029"
Now, I can't see how I can use Date class without using deprecated methods, so I thought of using Calendar.
Problem is I don't see how I can "initialize" it and get true results.
(when I try getInstance() and then MONTH and others I get wrong results)

Here is a simple testing code I tried:

The printout was:
Month = 2
This is obviously wrong since we are in October which should be 10 not 2.

I anyone can shed some light this way, I'll be grateful
Dave
18 years ago