Monday, December 21, 2009

Batch Change/Rename File Extensions in Windows

Simple answer, open command prompt, type:

ren *.(current extension name) *.(extension you want)

For example, to change the extension from .jpg to .png:

ren *.jpg *.png

Thursday, December 17, 2009

How to select the first/least/max row per group in SQL

This is an extremely understandable and useful article on common SQL queries (link).

Protovis How To

I've played around with both of Jeff Heer's prior visualization toolkits (Prefuse and Flare). Prefuse, in my opinion, has one of the best designed APIs ever. Jeff is now a professor at Stanford. One of his students, Mike Bostock, worked with Jeff on a (relatively) new toolkit called Protovis, which unlike his previous toolkits, is SVG and Javascript based (perfect for web 3.0!)

I just started experimenting with Protovis yesterday but could not find even a simple example showing how to put together a line chart. Although the Protovis website lists a large number of beautiful visualization examples, most of them were over my head as a beginner (when first looking at the code, it reminded me of The International Obfuscated C Code Contest--you can do a lot in a small amount of code, but that doesn't mean it's gonna be understandable).

The problem was one of documentation--although Protovis has a fairly fleshed out set of docs including a multi-page "quick start" tutorial, I was still searching for some simple examples to work through on my own. The problem was, I didn't realize that the icons on the left side of the docs page were clickable--I thought they were just there for aesthetics!

Now I'm good. Although I'd still love to see some very simple time series visualizations.

SVN/CVS Update Like Command in Mercurial

Took me way too long to find this.

To update your sources, you can use:
$ cd main $ hg pull -u

This will pull other people's changes from the server into your repository. It will also update your working copy to the latest version.

If you have made your own changes in this repository (even in a completely unrelated directory), you will need to merge your changes with other people's changes. This requires running hg merge.