May 2011
4 posts
2 shell tricks
1) Empty file of any size (useful for testing things, e.g. uploads of various sizes):
Did some googling a came up with using ‘dd’… it’s long, hard to remember, and a bit hard to read. For example, if you want a junk ~50mb file:
$ dd if=/dev/random of=./fifty.junk bs=1024 count=50000
that says ‘in blocks of 1024 bytes (1kb, the Block Size) read 50,000 blocks from...
Year 292M is the next Y2K
In pursuit of what we can safely use as the infinite future on date comparisons:
scala> val t3 = new Timestamp(Long.MaxValue)
t3: java.sql.Timestamp = 292278994-08-16 23:12:55.807
Yup - that’s year two hundred ninety two million and a lot.
by comparison here’s today.
scala> val t1 = new Timestamp(System.currentTimeMillis)
t1:...
OO fail - isn't that what param types are for?
Potential runtime error of exactly the type the compiler is supposed to catch.
(I know *why* in Java it has to take a Date and can’t specify a Timestamp object, but that’s a language (and potentially library) design error. I wonder how/if I could solve this in Scala….)
from: http://download.oracle.com/javase/6/docs/api/java/sql/Timestamp.html
intcompareTo(Date o) ...
The Matygo Blog: Office v 2.0 (now with tracked... →
farhanpatel:
matygo:
Well it’s been exactly a year since we moved in to the dominion building. It was a wild ride, we built a lot of cool stuff in that office, played a bit of starcraft, all in all had a great time.
You know what they say, all good things…
To make room for our interns who will be joining us…
I’ll be working here for the next 4 months. It should be a very interesting 4...