A sparse file is a file which does not take more space on disk than needed. Such a file is usually used to store a partition image on disk, for instance with a virtualization solution like Xen.
I was just checking which commands are supporting sparse files. I post hereafter a short overview of what I found out (working on Linux).
dd if=/dev/zero of=foo bs=1 count=1 seek=20G
What gives:
Integer a = 100, b = 100;Integer c = 200, d = 200;System.out.println( (a == b) == (c == d) ); // A
Response: counter intuitively, the program prints ‘false’ out. Integer in Java is a non-native class, where ‘==’ means…
Java quiz of the day (easy): what gives
Object[] a = new Integer[]{};List<Object> b = new ArrayList<Integer>();
Response: we get an exception on the second line:
Type mismatch: cannot convert from…
I have stumbled upon a weirdness regarding the behavior of readLine in Scala (at least with my current basic understanding of the language).
The following snippet is supposed to read three times a line from standard in. But it reads 3 times the…
What gives
Double a = null;Double b = a == null ? a : 1.0;
Response: as strange as it can seem at first look, b is not equal to null after the second statement, but the code produces a NullPointerException.
I had posted that some times ago on Twitter. There is a new version of the excellent GPGMail plug-in for Mail (OS X). Grab it, if you haven’t already.
GPGMail for OS X 10.6.2
Check out my new mix 03.