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 http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/smoothness/jquery-ui.css). 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 youngisrael-stl.org/wordpress, but at bililite.com/blog. 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, bililite.com/blog/
  2. Create a new mySQL database on bililite.com
  3. Copy all of youngisrael-stl.org/wordpress/ into bililite.com/blog/
  4. Edit the wp-config.php file to reflect the new database name/user/password
  5. Backup the youngisrael-stl.org database into an SQL file with phpMyAdmin or some other tool
  6. In a text editor, change all the "http://youngisrael-stl.org/wordpress" to "http://bililite.nfshost.com/blog" 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 "http://youngisrael-stl.org" because I didn't want to change links to the actual site.
  7. Run the edited SQL file on the bililite.com database
  8. In the youngisrael-stl.org/.htaccess , add the line "Redirect permanent /wordpress http://bililite.nfshost.com/blog" to let browsers know I've moved
  9. Actually announce the change on mailing lists of people who actually read the site