Archive for June, 2009

See the updated version.

I needed a date/time picker and spend a couple of hours making a simple one:

Obviously, I didn't spend a couple of hours putting this together. I wrote it quickly, then spend the hours getting it to work even remotely correctly in Internet Explorer.

Continue reading ‘Don’t Reinvent the Wheel’ »

Updated 2012-12-26 with a much better algorithm for detecting stylesheet loading.

So let's say I want to create elements that match a jQuery UI theme (in my case, I was using a <canvas> element and wanted to copy colors). I could try to parse the CSS file directly, but that runs afoul of the same-origin security problem (I use Google's CDN to get the jQuery UI stylesheets, as in I could go through the document stylesheets to find the relevant styles, but there's an easier way; just create an element with the desired classes and query that:

var background = $('<div class="ui-state-default">').css('background-color');
Continue reading ‘Copying jQuery UI styles and Detecting CSS Loading’ »

Just added a new widget to the sidebar: the AVH Amazon Wishlist. It randomly picks items from my Amazon wishlist. Anyone reading this can feel free to buy me something, though I don't expect that (except from Stanley; you know who you are). I think it's more interesting as an indicator of the sorts of things that interest me. It's mostly all there: judaica, programming, woodworking, cooking gadgets. Interestingly, virtually no medical books. All my medical references are online or on my PDA (uptodate, epocrates, Riley Kidometer, Pediatrics, Contemporary Pediatrics). The actual books I've used in years are the picture books (Hurwitz's Clinical Pediatric Dermatology, Smith's Recognizable Patterns of Human Malformation). Almost by definition, texts are obsolete by the time they reach the editor, let only when they are published. The doctors I know still have impressive bookcases filled with medical textbooks, but they're the ones they bought in medical school and haven't opened since.

Speaking of which, there's a new edition of Hurwitz out. Hint!

I decided that this blog is mine, rather than Young Israel's, so I wanted to move it to a domain that I personally own. Thus, it is no longer at, but at Moving the blog intact was non-trivial, so I'm recording how I did it, based on mydigitallife's instructions:

  1. Create the new folder,
  2. Create a new mySQL database on
  3. Copy all of into
  4. Edit the wp-config.php file to reflect the new database name/user/password
  5. Backup the database into an SQL file with phpMyAdmin or some other tool
  6. In a text editor, change all the "" to "" and "/wordpress" to "/blog". note that there are both absolute and relative URL's in there, and I was changing both the domain and the subdirectory, so I had to do two replacements. I couldn't just change "" because I didn't want to change links to the actual site.
  7. Run the edited SQL file on the database
  8. In the , add the line "Redirect permanent /wordpress" to let browsers know I've moved
  9. Actually announce the change on mailing lists of people who actually read the site