Monthly Archives: November 2005

Get Error Message from HRESULT

Need to look up the error string for an HRESULT code? Here’s some code to do so.
#include <comdef.h>
CString GetMsgForHresult(HRESULT hr)
{
CString cs;
CString msg = _com_error(hr).ErrorMessage();
cs.Format(_T(”Error 0x%08x: %s”), hr, msg);
return cs;
}

Do you know me? (Chris Stillson)

Dave is letting me post to meatspace because he’s a standup guy, because I asked him, and because I took that bullet for him when that one drug deal went south….
Anyway, if you know me and want to say hi, I would really love it. I’m living in San Francisco. Still.
You can reach me [...]

PHP Debugging Tip

Page not loading right? Try putting this at the top inside a <?php block…
print_r( $_REQUEST);
I was having a problem where http://meat.net/2005/11/xml-js-freeze/ was coming up blank. Turns out the following regexp is at fault:
RewriteRule ^(.+).xml /index.php?feed=$1 [QSA,L]
I’ve fixed the feed director plugin, you can see my patched version at here.
Troubleshooting tip comes courtesy of [...]

Bill O’Reilly’s Enemies List

I can only hope this is enough to get on it…

microsoft XML DOMDocument and javascript error

I’m encountering a weird error where an embedded copy of IE is failing to load XML properly. Here’s the best approximation I have of what we’re doing:

Target Boycott

I’ve just sent this message to Target customer service, regarding their decision to allow pharmacists to refuse to fill legal Plan B prescriptions:

I’m a frequent shopper at the Evanston Target near my house. Until
and unless your current Plan B stance allowing pharmacists to
basically refuse to carry out their jobs based on one single [...]

Don’t trust John Lott

Tim Lambert explains why not to trust John Lott.

Baseball and SQL

Two great tastes that go great together.
One of the greatest things ever is the Lanham Baseball Database. It’s a database of all baseball statistics since 1871, suitable for random SQL queries. Not quite pitch by pitch, but season by season. Note that retrosheet has made their boxscore database for all games [...]

Math is hard

(from here)