This is some scary stuff. China seems to be such a loose canon when it comes to Taiwan. Good writeup on Wikipedia on the laws around unification.
I drink a lot of tea, a couple cups a day at work. A cup to get me going in the morning, then the flavored, non-cafinated ones after that as a drink. I’m always on the look out for a good tea. Enter Mighty Leaf, sold at Whole Foods among other places. It’s great tea, plus it’s the best bag packaged tea I’ve seen yet — the whole leaf tea is sealed in little silk pouches that are stiched shut. It’s also a local Nor Cal company, to boot.
Of me and Omar working after a meeting. And yes, I acutally do work at times in the hallway like that.
On September 11, 2001 I took snapshots of a bunch of web pages as the days events unfolded and put them online. I just tried to hit it today and the site’s been broken since I reorged it a few months ago. And it’s back up.
I use the Windows Picture and Scanner Wizard whenever I’m taking pictures off of my digital camera, so all of my pictures are stored in neat little albums. When I wanted to put these online, I couldn’t find a good ASP.NET that I could just point at this directory structure and make it work. Thus, a long time ago, I wrote PictureViewer. It’s a small little ASP.NET application that does thumbnailing, caching, pagination, image-prefetching and the like. I’m making my picture viewer available under the zlib license to whoever wants to consume it.
Setting it up should be super simple.
- Download and unpack the zip on your IIS web server and edit the web.config file.
- There are a couple of key configs. ImageDirectory points to your picture collection. ThumbDirectory points to where you want the thumbnails cached. I suggest making a directory for thumbnails in your ImageDirectory. It’s smart enough not to show the thumbnail folder in the album view if it’s in your ImageDirectory.
- Add script mappings in IIS for .jpg, .gif and .avi to point to ASP.NET (see this image for an example)
- Ensure that IIS had read access to your image directory and write access to the thumbs directory
That’s about it. Let me know if you end up using it or have any feedback.
Download PictureViewer v1.0.
Often times when writing apps, I hate writing framework code to support persisting objects and structures to disk. So, I wrote a quick and dirty little library that allows you to persist and restore any object from disk. It’s made available in open-source form under the zlib license written in C#. There are three commands, Put, Get and Delete. Put takes an arbitrary object and saves it, Get retrieves all objects of the type given to it and Delete deletes and instance of an object.
// create a persistance manager
PersistManager mgr = new PersistManager();
// create a few classes I want to save
ExampleClass example1 = new ExampleClass();
ExampleClass example2 = new ExampleClass();
example2.Firstname = “Otherfname”;
example2.Lastname = “otherlastname”;
// save them down
// get them back
object saved = mgr.Get(typeof(ExampleClass));
foreach(ExampleClass o in saved)
Download SimplePersist v1.0.
On my way home from the gym last night Derek gave me a call saying he had a spare ticket to a concert at the Warfield. Not really knowing who was playing (some guy named Gavin de Graw and Michelle Branch’s new band) I was down and showed up around 9. As I walked in I noticed a huge amount of pubescent teens and wondered what, exactly, this concert was about and as crossed in to the venue I saw a poster declaring: “One Tree Hill Tour.” D’oh! In any case, the concert wasn’t bad. The show wasn’t bad, the Michelle Branch band was good and soulful and Gavin de Graw was a great vocalist. Afterwards, Derek and I went to Anu and had a drink while shooting the breeze. Anyway, being able to do things like this is why I love living in the city.
Just finished watching Farewel, My Concubine. Quite an interesting movie (although a bit long) about two friends in the Bejing Opera, from childhood to adult hood and the various dramas therein. One aspect of the movie that I found the most facinating, and what must be a genere in China, is the effects of the Cultural Revolution and communism on China. One of my favorite Chinese movies is To Live, which also starred You Ge and Li Gong. It’s a fantastic drama, also spanning some 40 or 50 years of a man and his family through the social upheaval of China. It’s directed by Yimou Zhang, who is of more recent fame for directing Hero and House of Flying Daggers, both of which I have yet to see.
From Generate, a table lamp.