Scott Hiett

Greenhorn
+ Follow
since Jun 05, 2001
Merit badge: grant badges
For More
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 Scott Hiett

Got a weird case here. If I write the code with an extra step and variable, it works, but won't otherwise. Basically, I am reading binary code out of a file, and the longs are listed backwards(correct term escapes me right now).
For example, in the file 11 15 80 80 should be read as 80 80 15 11. so I have the following code
The bytes in question are in a byte array (vHeader) and improvements is the long that will hold the complete value.

This produces the correct output -
improvements = 801511
improvements = 80801511
whereas

produces the incorrect output:
improvements = 801511
improvements = ffffffff80801511
what is the difference?
thanks,
Scott
[ March 08, 2002: Message edited by: Scott Hiett ]
22 years ago
So this is a bit silly , but I am in a bet with a co-worker to get some code down to as few lines as possible.
Basically, this method is a simple one to return the string text for a drop down of minutes.
Here is what I have it at now:

I think I have him beat already, as I don't know if he even knows about the "variable = (condition) ? res1 : res2", but I really want to rub it in. What is stopping me at this point is getting that for loop into one line with the other two.
Any ideas?
Edited the HTML out of the first line.
[This message has been edited by Scott Hiett (edited July 06, 2001).]

[This message has been edited by Jim Yingst (edited July 09, 2001).]
22 years ago
The output from the following code:
passing 9/28/2002 5:00 PM CST
getTheDate = 09/23/2002 10:00 AM CDT
22 years ago
Just cuz I am nit picky, I found that using the default sort just goes by alphanumeric while sorting.
I need something to take these values from the DB and sort them. But because they were strings, they came back ordered alphanumerically (ie 1,10,11,2,20,3,3000,4...etc).
So I wrote a little NumericComparator to pass into the sort method. Whaddya think?

So a call with (in my case) a Vector(vic) of strings is
22 years ago
According to the link that was posted, as part of the settlement:
"Sun executives also said that even though Microsoft can't build Java into future versions of its Internet Explorer browser, it would not hurt the spread of client-side Java in the industry, citing a boom in Java on multiple devices such as PDAs and cell phones."
So, if this ends up hurting the .java world, Sun did it to themselves. I don't know what I would do. I just can't see myself doing C# and .net junk.
22 years ago