Changing Locale of a Calendar and the internals of Calendar.setTime()

The Locale can be specified only at creation of a Calendar object, so if you wan't to change it after creation, then you have to do the following ...

SimpleDateFormat

Good to know: the format() function of the SimpleDateFormat class (and probably the DateFormat class as well) renders its date parameter to String in the default timezone available at the moment of the formatter object's creation.

Ismeretlen ismerős :-)

A naplóban láttam, hogy vki a Google RSS-olvasójával követi a blogom bejegyzéseit (egyébként egy T-Mobile-os IP-címről jött az illető). Wink Netán magadra ismertél? Laughing out loud Persze ez csak azért tűnt fel, mert amúgy az enyém (pár ismerősömet nem számítva) nem éppen a legnépszerűbb blogok egyike, szóval elég feltűnő, ha meglátom a Referrer-ben a http://www.google.com/reader/view/ linket. Wink

Integető lány :-)

Ma reggel 8:40 körül az Egressy térnél a Hungária felől kanyarodtam a Nagy Lajosra (a Bosnyák irányába) és a villamosmegállóban egy csinos, fiatal lány kezdett integetni felém. Smile Úgy tűnt, mintha nekem szánta volna az üdvözlést, de annyira meglepett (nem ismertem fel Shock, plusz azért elég kicsi a valószínűsége, hogy valaki egy elhaladó kocsi sofőrjét kiszúrja), hogy csak néztem nagyokat és tovább mentem (meglincseltek volna, ha ott leblokkolom a forgalmat Wink ). Ha netán olvasod eme sorokat: áruld már el honnan ismerjük egymást? Smile

Captchas to allow anonymous comments :-)

I've installed the Captcha and Textimage modules so I can allow anonymous comments and prevent comment spam at the same time. Smile Now you can post comments without registration.

Living a virtual life

Take a look at this quite interesting article by Steven Levy at Newsweek. Is it really going that bad with mankind? Why is a virtual world a "better" alternative (compared to the real world) for so many people? I hope I'll never find out.

Java question regarding doubles :-o

I found something "interesting" (or rather annoying). Shock
If I run the following code:
double a1 = 1.0D, a2 = 0.64D, a3 = a1 + a2, a4 = 1.64D;
System.out.println("a1 = " + a1);
System.out.println("a2 = " + a2);
System.out.println("a3 = " + a3);
System.out.println("a4 = " + a4);
I get the following output:
a1 = 1.0
a2 = 0.64
a3 = 1.6400000000000001
a4 = 1.64

What the hell is happening here? Shock Where comes that 0.0000000000000001 value from in the sum of the two doubles? It occured with Sun JDK 1.5.0 build7.

Casts and mixing primitive types in Java

I've found a nice intro on the topic.

Generating an SSL certificate for Courier IMAP

In Debian a trial SSL certificate is generated at the time of installation of the courier-imap-ssl package. However this certificate is only valid for a limited time and you might want to access your server over SSL for a longer period ... without buying a real certificate.

XMLRPC vulnerability

I just noticed that someone (or "something") tries to crack my site through a well known XMLRPC vulnerability. This a good example why one should always keep her/his Drupal setup up-to-date. Smile

Syndicate content