I'm particularly fond of this answer. As it turns out, it's harder than you'd think to figure this out, for reasons explained in this thread: