<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10601975</id><updated>2012-01-27T11:54:19.778-08:00</updated><category term='acts_as_list'/><category term='stylesheet'/><category term='rails_sql_views'/><category term='applet'/><category term='algorithms'/><category term='chrome extension'/><category term='odbc'/><category term='chrome'/><category term='backgroundrb'/><category term='firefox'/><category term='picasa'/><category term='dsn'/><category term='make'/><category term='ppp'/><category term='passenger'/><category term='css'/><category term='git'/><category term='bookmarklet'/><category term='rails'/><category term='makefile'/><category term='popen'/><category term='emacs lisp'/><category term='javascript ie6'/><category term='combinations'/><category term='mashup'/><category term='mstsc'/><category term='osql'/><category term='mechanize'/><category term='greasemonkey'/><category term='aloha on rails'/><category term='backup'/><category term='compress'/><category term='multiple'/><category term='scripting'/><category term='xml'/><category term='java'/><category term='mysql'/><category term='authentication'/><category term='page monitor'/><category term='bash'/><category term='deque'/><category term='compile'/><category term='flex'/><category term='will_paginate'/><category term='yui compressor'/><category term='send_data'/><category term='sinatra'/><category term='acts_as_taggable_on_steroids'/><category term='ubuntu'/><category term='JavaScript InfoVis Toolkit'/><category term='html select'/><category term='extjs'/><category term='prototype'/><category term='svn'/><category term='ruby'/><category term='google app engine'/><category term='activerecord'/><category term='csrf'/><category term='attachment_fu'/><category term='javascript'/><category term='flex 3'/><category term='SQL Server'/><category term='import'/><category term='fetchmail'/><category term='lucid'/><category term='paperclip'/><category term='Raphael'/><category term='merb'/><category term='curl'/><category term='http'/><category term='gnome'/><category term='discrete mathematics'/><category term='library lookup'/><category term='mysqldump'/><category term='imagemagick'/><category term='rdesktop'/><category term='deploy'/><category term='apache'/><category term='enum'/><category term='charts'/><category term='emacs'/><category term='ajax'/><category term='comcast'/><category term='convert'/><category term='LibXML-Ruby'/><category term='ssh'/><category term='scriptaculous'/><category term='CSV'/><category term='optparse'/><category term='google spreadsheet'/><category term='pagination'/><category term='outlook'/><category term='jquery'/><category term='group_concat'/><category term='tags'/><category term='blogger'/><category term='sql'/><category term='minify'/><category term='upload'/><category term='closure'/><category term='tunnel'/><category term='vpn'/><category term='better_nested_set'/><category term='REXML'/><category term='readability'/><category term='caching'/><category term='capistrano'/><category term='timeout'/><title type='text'>David Burger's Courtesy Flush</title><subtitle type='html'>mostly rails, javascript and other programming related stuff</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>David Burger</name><uri>http://www.blogger.com/profile/12626690169251289055</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10601975.post-7600772142393456151</id><published>2011-08-14T13:24:00.001-07:00</published><updated>2011-08-14T13:26:20.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Use MySQL's Modulo Operator to Update in Batches</title><summary type='text'>Sometimes you need to roll out your nefarious plan slowly and MySQL's modulo operator can help.  Here we do the first of ten batches:

 </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7600772142393456151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2011/08/use-mysqls-modulo-operator-to-update-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7600772142393456151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7600772142393456151'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2011/08/use-mysqls-modulo-operator-to-update-in.html' title='Use MySQL&apos;s Modulo Operator to Update in Batches'/><author><name>David Burger</name><uri>http://www.blogger.com/profile/12626690169251289055</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3512422043886610600</id><published>2011-06-04T13:33:00.000-07:00</published><updated>2011-06-04T13:33:37.422-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><title type='text'>Javascript Binary Heap</title><summary type='text'>Saturday morning javascript exercise - a binary heap in array and tree implementations.  The tree implementation is faster as expected when you shove a lot of data as it as the array implementation must occasionally re-size the backing array.  A demo or visualization would be nice but that takes more time than this Saturday morning allows.  Code:



</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3512422043886610600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2011/06/javascript-binary-heap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3512422043886610600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3512422043886610600'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2011/06/javascript-binary-heap.html' title='Javascript Binary Heap'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8739629827949973243</id><published>2011-05-14T12:04:00.000-07:00</published><updated>2011-05-14T12:04:28.641-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Emacs Batch Edit Example</title><summary type='text'>Say the following function is in your .emacs file and lets you indent your C source code to your liking:



But you don't want to manually open each file into an Emacs buffer to execute this script.  Emacs batch editing to the rescue:



The parameters load up my .emacs file as normal and runs the given eval.  Apply a little command line magic and you should be able to exploit Emacs from the </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8739629827949973243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2011/05/emacs-batch-edit-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8739629827949973243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8739629827949973243'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2011/05/emacs-batch-edit-example.html' title='Emacs Batch Edit Example'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7264184906342904811</id><published>2011-01-17T12:31:00.000-08:00</published><updated>2011-01-17T15:54:20.497-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curl'/><category scheme='http://www.blogger.com/atom/ns#' term='comcast'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='mechanize'/><title type='text'>Monitor Comcast Usage Data</title><summary type='text'>The good folks at Comcast have decided to put a 250GB cap on monthly usage as a direct assault against my beloved Roku.I decided to put a script together to notify me in case I start approaching the monthly limit.  My first thought was that this was a perfect task for mechanize, a Ruby library for interacting with web sites.  I put that aside, however, to make an attempt to script the scraping </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7264184906342904811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2011/01/monitor-comcast-usage-data.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7264184906342904811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7264184906342904811'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2011/01/monitor-comcast-usage-data.html' title='Monitor Comcast Usage Data'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_qc84-TF5d-c/TTTTaVMvvAI/AAAAAAAAEG0/m8zY_EVQeJw/s72-c/duo.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6274441748352417934</id><published>2011-01-15T17:38:00.000-08:00</published><updated>2011-01-15T17:39:20.931-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs lisp'/><title type='text'>Emacs Find File in Project Updated Plus defun toggle-test</title><summary type='text'>I've updated my fork of the Emacs Find File in Project with caching and storage of the file list in a map instead of an alist.  Both of these should improve the performance with the latter possibly being a bit of an overkill for anything but very large projects.I also put together a little function to toggle back and forth between class and test case for Java code per the directory layout we use </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6274441748352417934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2011/01/emacs-find-file-in-project-updated-plus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6274441748352417934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6274441748352417934'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2011/01/emacs-find-file-in-project-updated-plus.html' title='Emacs Find File in Project Updated Plus defun toggle-test'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3464458418505063113</id><published>2010-12-18T14:38:00.000-08:00</published><updated>2010-12-18T15:48:17.883-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome extension'/><title type='text'>pagiborder Chrome Extension Comes Alive!</title><summary type='text'>Please welcome Chrome Extension pagiborder.  It temporarily drops a line on the screen indicating the previous page border position when you paginate with the space bar.I use it - so maybe someone else will find it useful as well.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3464458418505063113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2010/12/pagiborder-chrome-extension-comes-alive.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3464458418505063113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3464458418505063113'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2010/12/pagiborder-chrome-extension-comes-alive.html' title='pagiborder Chrome Extension Comes Alive!'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_qc84-TF5d-c/TQ03fvAa1yI/AAAAAAAAEFg/1d9pRI77_vQ/s72-c/pagiborder.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-657950173594528593</id><published>2010-12-09T09:43:00.000-08:00</published><updated>2010-12-12T16:06:12.423-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs lisp'/><title type='text'>Emacs Find File in Project</title><summary type='text'>Note:  This is already out of date.  I have found, forked, and tweaked a github repo that did most of what I wanted and my version can be found there.  Further tweaks may include caching and other speed increases for large projects.

Increasingly for Java projects I've been relying on IntelliJ IDEA, an amazing IDE.  There are still times, however, when I need the sharp tool capabilities of Emacs.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/657950173594528593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2010/12/emacs-find-file-in-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/657950173594528593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/657950173594528593'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2010/12/emacs-find-file-in-project.html' title='Emacs Find File in Project'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8571455968490714139</id><published>2010-11-28T12:18:00.000-08:00</published><updated>2010-12-10T08:57:40.420-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lucid'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Ubuntu Lucid Tweaks</title><summary type='text'>Command line incantations to configure gnome quickly:

</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8571455968490714139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2010/11/ubuntu-lucid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8571455968490714139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8571455968490714139'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2010/11/ubuntu-lucid.html' title='Ubuntu Lucid Tweaks'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5607738786678679048</id><published>2010-02-01T06:00:00.000-08:00</published><updated>2010-02-01T07:50:42.098-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><title type='text'>jQuery Shell Google Chrome Extension</title><summary type='text'>I've written a handy Google Chrome extension for jQuery developers.  The extension allows you to bring up a console window and run Javascript and jQuery commands against the current web page.  It is great for learning or experimenting with jQuery.  I call the extension the jQuery Shell and it can be found here.  The source code can be found here.  Here is a screen shot for your viewing pleasure:
</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5607738786678679048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2010/02/jquery-shell-google-chrome-extension.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5607738786678679048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5607738786678679048'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2010/02/jquery-shell-google-chrome-extension.html' title='jQuery Shell Google Chrome Extension'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_qc84-TF5d-c/S2PGht7YPGI/AAAAAAAADQI/zgST7DJ5p_o/s72-c/jqshell.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3988819176751265560</id><published>2010-01-31T19:59:00.000-08:00</published><updated>2010-01-31T19:59:55.877-08:00</updated><title type='text'>Truncate all Tables in a MySQL Database Revisited</title><summary type='text'>Since this old post still manages to get a fair number of hits I thought I should fix it up to encourage people to not reveal their MySQL passwords in history logs and process lists by entering it on the command line. The new version uses getopts for parsing command line options. If you pass in "-p", it will prompt you for your database password for each mysql command. If you really want the old </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3988819176751265560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2010/01/truncate-all-tables-in-mysql-database_31.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3988819176751265560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3988819176751265560'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2010/01/truncate-all-tables-in-mysql-database_31.html' title='Truncate all Tables in a MySQL Database Revisited'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5575776347351369960</id><published>2010-01-10T11:52:00.000-08:00</published><updated>2010-01-10T12:04:02.212-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='enum'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java enum and Static Variables</title><summary type='text'>I've been moving back into the world of Java after some time with Ruby...surprisingly (to me anyway) Java enums don't have access to static variables within the enum in the enum constructor.  For example, this will fail to compile with an illegal forward reference when attempting to use the static constant:I haven't found a work around for this that I am comfortable with.  Defining the static </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5575776347351369960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2010/01/java-enum-and-static-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5575776347351369960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5575776347351369960'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2010/01/java-enum-and-static-variables.html' title='Java enum and Static Variables'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1179711812614724634</id><published>2009-07-12T22:25:00.000-07:00</published><updated>2009-07-12T22:25:00.901-07:00</updated><title type='text'>Searching for Wildcard Characters in SQL</title><summary type='text'>Been a while - a quick flush...you may have a need to search for the wildcard characters "_" and "%".  When that happens you need to know how to escape them.  This has slightly different behavior for different database products.  MySQL and SQL Server do work the same way, however, if you stick to using the ESCAPE clause.

</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1179711812614724634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/07/searching-for-wildcard-characters-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1179711812614724634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1179711812614724634'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/07/searching-for-wildcard-characters-in.html' title='Searching for Wildcard Characters in SQL'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3054184447874482840</id><published>2009-07-03T14:00:00.000-07:00</published><updated>2009-07-16T23:04:06.209-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='deque'/><title type='text'>No Peeking in the Javascript Deque</title><summary type='text'>Another (previous) take on the Javascript Deque with more of a Crockford creation style preventing messing with the Deque's internals.  Create one without using new - "var d = deque();", enjoy:

</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3054184447874482840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/07/no-peeking-in-javascript-dequeue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3054184447874482840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3054184447874482840'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/07/no-peeking-in-javascript-dequeue.html' title='No Peeking in the Javascript Deque'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8366863770110756403</id><published>2009-07-01T00:31:00.000-07:00</published><updated>2009-07-16T23:03:48.817-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='deque'/><title type='text'>Javascript Deque</title><summary type='text'>Doubly ended queue code is just a whole lot cleaner if you go with dummy head and tail nodes to avoid special cases.  I put together this Javascript example:



A Javascript array has the methods available (push(), pop(), shift(), unshift()) to be used as a deque but of course being an array you shouldn't be adding and removing from anywhere but the tail end if you need top performance.  The </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8366863770110756403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/07/javascript-dequeue.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8366863770110756403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8366863770110756403'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/07/javascript-dequeue.html' title='Javascript Deque'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5061996278831503859</id><published>2009-06-24T03:00:00.000-07:00</published><updated>2009-12-01T15:57:26.914-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>My Ubuntu 9.04 Setup for Rails Development</title><summary type='text'>The what, why, and how of bringing up an Ubunto 9.04 box for development...I
currently do primarily Ruby on Rails development so that is what you will find
here along with the various tools I use to get the job done.  The steps are
listed below.  You can find a file with the apt-get commands I use
here.
You can also find a file for the gem commands I use here, however, you will have
to install </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5061996278831503859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/06/my-ubuntu-904-setup-for-rails.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5061996278831503859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5061996278831503859'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/06/my-ubuntu-904-setup-for-rails.html' title='My Ubuntu 9.04 Setup for Rails Development'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3400759105366996307</id><published>2009-06-23T03:00:00.000-07:00</published><updated>2009-06-23T03:00:21.838-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript InfoVis Toolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>JavaScript InfoVis Toolkit</title><summary type='text'>The JavaScript InfoVis Toolkit is another example of a library exploiting Canvas technology.  I put together a small demo Rails application that uses the toolkit to provide a dynamic tree view of the Rails application directory structure.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3400759105366996307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/06/javascript-infovis-toolkit.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3400759105366996307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3400759105366996307'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/06/javascript-infovis-toolkit.html' title='JavaScript InfoVis Toolkit'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3438387603635269606</id><published>2009-06-22T03:00:00.000-07:00</published><updated>2009-06-22T07:38:48.132-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='aloha on rails'/><title type='text'>Don't Miss Aloha on Rails!</title><summary type='text'> 

You don't want to miss the Hawaii Ruby On Rails Conference - Waikiki, Oahu, Hawaii - October 5-6 2009. The speaker list is impressive and still growing.  The venue is awesome and is only a short (really short!!!) walk from Waikiki beach.  The economic downturn is making flights to Hawaii very reasonable right now.

This conference is being primarily organized by Seth Ladd, a Honolulu based RoR</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3438387603635269606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/06/dont-miss-aloha-on-rails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3438387603635269606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3438387603635269606'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/06/dont-miss-aloha-on-rails.html' title='Don&apos;t Miss Aloha on Rails!'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_qc84-TF5d-c/Sj1vLRJX2rI/AAAAAAAADFE/iSPMqZuv8Xs/s72-c/bcard_front_small.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3389032735142546522</id><published>2009-06-19T21:07:00.001-07:00</published><updated>2009-06-20T16:54:52.258-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Rails Bug in *_changed?</title><summary type='text'>UPDATE:  The latest rails has fixed this problem but this problem was still present in Rails 2.2.2.

The new dirty methods in Rails show this interesting result:




The above code has position as a nullable integer column.  When parameters come in a post via the parameters hash position comes across as a string.  For 14 you get the Rails goodness and assigning "14" is not seen as a change - but </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3389032735142546522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/06/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3389032735142546522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3389032735142546522'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/06/blog-post.html' title='Rails Bug in *_changed?'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2073070561029081441</id><published>2009-05-27T12:33:00.000-07:00</published><updated>2009-05-27T12:33:06.378-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>Creating a Remote Shared Git Repository</title><summary type='text'>When creating a remote shared Git repository you likely want to do it like this:



The "--shared=group" is important as it will ensure that permissions will be set correctly when working with the repository with multiple users.  When issued in this way the config file will end up looking like this:

</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2073070561029081441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/creating-remote-shared-git-repository.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2073070561029081441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2073070561029081441'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/creating-remote-shared-git-repository.html' title='Creating a Remote Shared Git Repository'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8695891212793876772</id><published>2009-05-26T03:00:00.000-07:00</published><updated>2009-05-26T03:00:01.562-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='acts_as_list'/><title type='text'>Rails ActsAsList - Initializing position Values</title><summary type='text'>Recently I worked on a project that had a model acting as a tree with the children acting as a list within the scope of the child's parent.  The old school ActsAsTree and ActsAsList plugins used in combination, handle this scenario nicely.  There was one problem however - we had a large "tree" to load in where only some of the children were ordered under their parent.  The rest of the children </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8695891212793876772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/rails-actsaslist-initializing-position.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8695891212793876772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8695891212793876772'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/rails-actsaslist-initializing-position.html' title='Rails ActsAsList - Initializing position Values'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1130418825864144677</id><published>2009-05-25T03:00:00.000-07:00</published><updated>2009-05-25T08:30:22.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Quicker Rails Seed Data Loading</title><summary type='text'>The word is that Rails 3.0 will feature a way to load seed data.  This is sure to be a handy and needed feature, however, when loading large amounts of seed data you are probably going to have to abandon ActiveRecord and / or fixture style loading in your db/seeds.rb file in order to get the kind of performance you want.  Recently I set up a way to load seed data for a Rails 2.2.2 project which </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1130418825864144677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/quicker-rails-seed-data-loading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1130418825864144677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1130418825864144677'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/quicker-rails-seed-data-loading.html' title='Quicker Rails Seed Data Loading'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6132022296269692770</id><published>2009-05-12T03:00:00.000-07:00</published><updated>2009-05-12T03:00:03.451-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsn'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='odbc'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>DSN-less ODBC Connections on Linux</title><summary type='text'>On the Rails Wiki Connect To MicrosoftSQLServer From Rails On Linux Box page a database.yml sporting a DSN-less connection is shown like this:



That won't work on my Linux box given the way unixODBC and FreeTDS installed themselves.  Looking at that you might think the quick solution is just to correct the path to the driver file but that won't fix the problem either.  This is where the head </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6132022296269692770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/dsn-less-odbc-connections-on-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6132022296269692770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6132022296269692770'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/dsn-less-odbc-connections-on-linux.html' title='DSN-less ODBC Connections on Linux'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4990685262964743901</id><published>2009-05-11T22:26:00.000-07:00</published><updated>2009-05-12T11:53:47.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><title type='text'>Ugly SQL Pivot Reporting Queries Saved for Posterity</title><summary type='text'>Here are some pivot reporting queries stored for future reference:For SQL help and insight I recommend this book: SQL Cookbook (Cookbooks (O'Reilly))</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4990685262964743901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/ugly-sql-pivot-reporting-queries-saved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4990685262964743901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4990685262964743901'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/ugly-sql-pivot-reporting-queries-saved.html' title='Ugly SQL Pivot Reporting Queries Saved for Posterity'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2315651576030815382</id><published>2009-05-08T03:00:00.000-07:00</published><updated>2009-05-08T03:00:01.087-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmarklet'/><category scheme='http://www.blogger.com/atom/ns#' term='readability'/><title type='text'>Readability Bookmarklet</title><summary type='text'>I like the Readability Bookmarklet a lot.  With one quick click it removes the "noise" from a web page and presents a very readable view.  You should check it out.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2315651576030815382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/readability-bookmarklet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2315651576030815382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2315651576030815382'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/readability-bookmarklet.html' title='Readability Bookmarklet'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5675866301492897947</id><published>2009-05-07T03:00:00.000-07:00</published><updated>2009-05-07T03:00:01.301-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passenger'/><category scheme='http://www.blogger.com/atom/ns#' term='authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Apache + Passenger + HTTP Basic</title><summary type='text'>Say you've thrown together a simple demo application, thrown it out on the web, and now want to make sure that no one messes with the data before that big client looks checks out your demo and signs that big $$ contract.  Being a demo - the quick and dirty way to get this up is to just throw in some HTTP Basic Authentication.  With Apache + Passenger the way to do this is to add a Location </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5675866301492897947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/apache-passenger-http-basic.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5675866301492897947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5675866301492897947'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/apache-passenger-http-basic.html' title='Apache + Passenger + HTTP Basic'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2687772370402114874</id><published>2009-05-06T08:56:00.000-07:00</published><updated>2009-05-06T08:58:14.378-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Chad Fowler's 20 Rails Development No-No's</title><summary type='text'>Chad Fowler, who will be keynoting at the Aloha on Rails RailsConf, recently released a list a 20 Rails Development No-No's on his blog.  It is a decent list to review to help make yourself aware of various Rails "code smells."  Throwing in my 2 cents, for number 10, Code in the Wrong Place, I would like to mention controllers that load the flash with HTML.  If you are putting any HTML in your </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2687772370402114874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/chad-fowlers-20-rails-development-no.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2687772370402114874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2687772370402114874'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/chad-fowlers-20-rails-development-no.html' title='Chad Fowler&apos;s 20 Rails Development No-No&apos;s'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4930959767983528990</id><published>2009-05-06T01:57:00.000-07:00</published><updated>2009-05-06T01:59:52.937-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ppp'/><category scheme='http://www.blogger.com/atom/ns#' term='fetchmail'/><category scheme='http://www.blogger.com/atom/ns#' term='vpn'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>VPN fix after Ubuntu Update - LCP terminated by peer</title><summary type='text'>I use a VPN connection to my corporate email system to pull in emails and send them over to a gmail account with fetchmail.  After upgrading to Ubuntu 9.04 (actually I think it was the upgrade to 8.10, but I went from 8.04 -&gt; 8.10 -&gt; 9.04 on the same day) the setup came crashing down - the VPN would no longer connect and thus and I was no longer able to get any emails.  It turns out that the </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4930959767983528990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/vpn-fix-after-ubuntu-update-lcp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4930959767983528990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4930959767983528990'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/vpn-fix-after-ubuntu-update-lcp.html' title='VPN fix after Ubuntu Update - LCP terminated by peer'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4521409571256857732</id><published>2009-05-05T09:39:00.000-07:00</published><updated>2009-05-05T09:39:28.791-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Some Core Javascript Functions</title><summary type='text'>I recently worked on two different projects that involved a fair amount of Javascript centering around using the Google Maps API.  In doing so I began to factor out some of the components to be reusable in a general Google Maps project.  While I usually use the excellent Prototype Javascript library I didn't want to leak Prototype code into these reusable components.  This led me to using these </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4521409571256857732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/05/some-core-javascript-functions.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4521409571256857732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4521409571256857732'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/05/some-core-javascript-functions.html' title='Some Core Javascript Functions'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8987669480603709010</id><published>2009-04-13T10:03:00.000-07:00</published><updated>2009-04-13T10:13:59.090-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript Puzzler</title><summary type='text'>Invoking an anonymous JavaScript function is a handy technique for avoiding namespace collisions in JavaScript code.  The following two code snippets show the definition of a top level function followed by the invocation of an anonymous function.  One of them, however, has a (easily fixed) problem (at least on Firefox 3.0.8).  Can you spot what it is?  Try figuring it out without running the code</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8987669480603709010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/04/javascript-puzzler.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8987669480603709010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8987669480603709010'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/04/javascript-puzzler.html' title='Javascript Puzzler'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2172759292967656942</id><published>2009-04-10T14:06:00.000-07:00</published><updated>2009-04-10T14:07:03.022-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>I Canz haz Ur Nullz at Bottom?</title><summary type='text'>SQL Server when doing ORDER BY will put rows with null values in the sort column at the top - of course a simple adjustment to your ORDER BY can fix that:



Aloha on Rails is coming!  I'll blog a bit more about this in the future but this should be a great conference with great sessions and Waikiki Beach just across the street!</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2172759292967656942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/04/i-canz-haz-ur-nullz-at-bottom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2172759292967656942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2172759292967656942'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/04/i-canz-haz-ur-nullz-at-bottom.html' title='I Canz haz Ur Nullz at Bottom?'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3843836979858981674</id><published>2009-04-07T01:00:00.000-07:00</published><updated>2009-04-07T01:00:00.541-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Rails - Read More, Code Less, do Peer Reviews</title><summary type='text'>For some previous projects I rolled some simple code for generating a random string - used to generate a password reset token for example:Now I've found that this type of functionality has been in Rails for some time - now as ActiveSupport::SecureRandom and previously as Rails::SecretKeyGenerator.Ok so that is simple code and probably isn't a problem but the lesson here is: read more, code less, </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3843836979858981674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/04/rails-read-more-code-less-do-peer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3843836979858981674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3843836979858981674'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/04/rails-read-more-code-less-do-peer.html' title='Rails - Read More, Code Less, do Peer Reviews'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1294785200521077012</id><published>2009-04-06T01:00:00.000-07:00</published><updated>2009-04-06T01:00:00.316-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Rails ActiveRecord Order by a Function</title><summary type='text'>Of course you can pass functions in the order clause through ActiveRecord finders:In the above case a Foo has fiscal_year and fiscal_month columns unfortunately stored as VARCHAR(255) containing, for example "2008" and "7".  While the sorting will work that query will be able to leverage an index on these columns only if the database used can create indices that include functions.  I'm not sure </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1294785200521077012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/04/rails-activerecord-order-by-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1294785200521077012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1294785200521077012'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/04/rails-activerecord-order-by-function.html' title='Rails ActiveRecord Order by a Function'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3361829126441821134</id><published>2009-04-05T10:37:00.000-07:00</published><updated>2009-04-05T10:38:35.405-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='passenger'/><title type='text'>Upgrading Phusion Passenger for Rails 2.3.2</title><summary type='text'>Quick flush - when using RubyGems to manage your Phusion Passenger installation don't forget that as you install updated gems you also need to compile the corresponding Apache module and make changes to your Apache conf file.  This is done with the "passenger-install-apache2-module" - follow the instructions.  This will help to eliminate head scratching when Rails 2.3.2 begins to complain about </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3361829126441821134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/04/upgrading-phusion-passenger-for-rails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3361829126441821134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3361829126441821134'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/04/upgrading-phusion-passenger-for-rails.html' title='Upgrading Phusion Passenger for Rails 2.3.2'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8687240188919156944</id><published>2009-03-30T22:24:00.000-07:00</published><updated>2009-03-31T01:11:50.483-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='caching'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='group_concat'/><title type='text'>Rails Caching and MySQL GROUP_CONCAT</title><summary type='text'>A recent caching solution that we came up with involved using the hash of the concatenated "children" ids of another resource to identify when the identical and previously stored children payload could be delivered instead of constructing the payload from scratch (which is kind of expensive).  Our current solution uses action caching and a custom ActionController::Caching::Fragments::FileStore.  </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8687240188919156944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/03/mysql-groupconcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8687240188919156944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8687240188919156944'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/03/mysql-groupconcat.html' title='Rails Caching and MySQL GROUP_CONCAT'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3856818631497159479</id><published>2009-03-28T18:13:00.000-07:00</published><updated>2009-03-31T01:12:27.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='google spreadsheet'/><category scheme='http://www.blogger.com/atom/ns#' term='mashup'/><title type='text'>Display Google Docs Spreadsheet Data on Your Website</title><summary type='text'>The Google Spreadsheet API makes it pretty painless to display spreadsheet data on your own web pages using only client side technologies.  You might use this, for example, to display your terrible stock investments on one of your web pages to remind you why you have to go to work everyday.The first thing you need to do is to make a Google Doc Spreadsheet.  The second thing you need to do is to "</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3856818631497159479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/03/display-google-docs-spreadsheet-data-on.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3856818631497159479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3856818631497159479'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/03/display-google-docs-spreadsheet-data-on.html' title='Display Google Docs Spreadsheet Data on Your Website'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5839228254006712212</id><published>2009-02-19T22:30:00.000-08:00</published><updated>2009-02-19T22:31:14.347-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL - Last Index Of lastIndexOf</title><summary type='text'>Quick flush - lastIndexOf in two varieties of SQL plus using the technique to cut off the last segment in a materialized path:</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5839228254006712212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/sql-last-index-of-lastindexof.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5839228254006712212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5839228254006712212'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/sql-last-index-of-lastindexof.html' title='SQL - Last Index Of lastIndexOf'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7052157351294763134</id><published>2009-02-16T21:44:00.001-08:00</published><updated>2009-03-31T01:13:31.352-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='library lookup'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='greasemonkey'/><title type='text'>Greasemonkey Hawaii State Library Lookup</title><summary type='text'>John Udell wrote a Greasemonkey script called LibraryLookup several years ago that I modified to work with the University Of Hawaii's library system.  LibraryLookup works in the background when you visit pages on Amazon.com and puts up an indicator if your local library has the book you are browsing.Later, I attempted to get this script to work with the Hawaii State Public Library System (HSPLS).</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7052157351294763134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/greasemonkey-hawaii-state-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7052157351294763134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7052157351294763134'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/greasemonkey-hawaii-state-library.html' title='Greasemonkey Hawaii State Library Lookup'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_qc84-TF5d-c/SZpW-Fl5o_I/AAAAAAAAC0Y/0IrWSN5sF9E/s72-c/lincoln.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4939834459808181439</id><published>2009-02-14T08:18:00.000-08:00</published><updated>2009-05-27T12:34:21.104-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='import'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Convert a Repository from Subversion to Git</title><summary type='text'>(Most of this I learned from a blog post by Paul Dowman.  This is my personal reminder of how to do this with possibly a couple extra nuggets of information thrown in.)

This article assumes you want to preserve the entirety of the commit history.  If you do not want to do that, then you can initialize a new git repository from an old subversion repository in many fewer steps - but I won't be </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4939834459808181439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/convert-repository-from-subversion-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4939834459808181439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4939834459808181439'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/convert-repository-from-subversion-to.html' title='Convert a Repository from Subversion to Git'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2275022547598120231</id><published>2009-02-11T20:16:00.000-08:00</published><updated>2009-03-31T01:13:01.753-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='multiple'/><category scheme='http://www.blogger.com/atom/ns#' term='html select'/><title type='text'>Javascript HTML Select Again</title><summary type='text'>Just a short follow up to yesterday's post with set value and get value functions that will work with both single and multiple select HTML elements.  The code expects that you will correctly pass a single value / array value when calling against the select element:Probably only the set part of this code is of interest to you if you are using Prototype as prototype will give you the correct result</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2275022547598120231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/javascript-html-select-again.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2275022547598120231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2275022547598120231'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/javascript-html-select-again.html' title='Javascript HTML Select Again'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4487132538337664677</id><published>2009-02-10T22:13:00.001-08:00</published><updated>2009-03-31T01:14:50.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='html select'/><title type='text'>Javascript HTML Select - Multiple Select</title><summary type='text'>Simple Javascript code to set multiple selections in an HTML Select element - The first step is that the select must be set up to allow multiple selections, that is it must have the attribute multiple="multiple".  Second, we need some supporting code to find the position of a value in an array - if you are using Prototype or limiting your usage to newer browsers you may not have to roll your own </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4487132538337664677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/javascript-html-select-multiple-select.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4487132538337664677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4487132538337664677'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/javascript-html-select-multiple-select.html' title='Javascript HTML Select - Multiple Select'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5303401802614529184</id><published>2009-02-03T00:56:00.000-08:00</published><updated>2009-03-31T01:11:05.348-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='mechanize'/><title type='text'>Backup Blogger Blog with Ruby Mechanize Script</title><summary type='text'>After writing up a cURL script to download a backup of my Blogger blog in my previous post I started wondering what the best way to do this in Ruby would be.  I looked at some Ruby HTTP clients and narrowed my choices down to two: Mechanize and HTTPClient.  Both of these tools look pretty good but Mechanize seemed to offer a very simple interface to scripting a web interaction like this while </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5303401802614529184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/backup-blogger-blog-with-ruby-mechanize.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5303401802614529184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5303401802614529184'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/backup-blogger-blog-with-ruby-mechanize.html' title='Backup Blogger Blog with Ruby Mechanize Script'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6627939657921832791</id><published>2009-02-01T22:06:00.001-08:00</published><updated>2009-03-31T01:13:57.726-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curl'/><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><title type='text'>Backup Blogger Blog with cURL Script</title><summary type='text'>I read Dave Winer's Where's Your Data? post today which was in response to a blog post by Craig Burton title The State of Blogging Sucks.  These articles refer to the problems that may arise when someone else is hosting your data.  The problem could be a massive data loss (see Ma.gnolia), a company going out of business (apparently a Userland product?), or just data lock in.With that in mind I </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6627939657921832791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/02/backup-blogger-blog-with-curl-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6627939657921832791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6627939657921832791'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/02/backup-blogger-blog-with-curl-script.html' title='Backup Blogger Blog with cURL Script'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2243727860600778193</id><published>2009-01-31T16:55:00.000-08:00</published><updated>2009-01-31T17:41:14.902-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript ie6'/><title type='text'>Mouse Event Don't fire in IE6 for Absolutely Positioned DIVs with no "Content"</title><summary type='text'>While experimenting with some Google Maps stuff I learned that mouse events won't fire under IE6 for a div that is absolutely positioned and has no "content."  Googling turned up this.  As the page says for events to fire in IE6 the div needs to have either some content or a background color.  This becomes a problem in Google Maps when you want to make your own overlay and you want to catch </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2243727860600778193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/01/mouse-event-dont-fire-in-ie6-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2243727860600778193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2243727860600778193'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/01/mouse-event-dont-fire-in-ie6-for.html' title='Mouse Event Don&apos;t fire in IE6 for Absolutely Positioned DIVs with no &quot;Content&quot;'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_qc84-TF5d-c/SYT1d-Jy3CI/AAAAAAAACz0/bptG32K-ZYY/s72-c/transparent.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5752372526966021956</id><published>2009-01-09T08:48:00.000-08:00</published><updated>2009-01-09T09:08:05.457-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Rails Select Filters that Map to In Queries</title><summary type='text'>Example of a Rails select box that performs filtering and is backed by an IN query.  First a constant is defined in the controller.  It is an array of arrays where the "first" is the text to display in the select and the "last" is an array of the values the first represents.



Then we render that in our page with typical code:



Back in the controller, when the form is submitted, the following </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5752372526966021956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/01/rails-select-filters-that-map-to-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5752372526966021956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5752372526966021956'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/01/rails-select-filters-that-map-to-in.html' title='Rails Select Filters that Map to In Queries'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4030661535321021577</id><published>2009-01-07T13:29:00.000-08:00</published><updated>2009-01-07T13:45:15.642-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Apache Tip: Encourage Browsers to Open Documents in the Native Application</title><summary type='text'>Jakob Nielsen says that you shouldn't open "non-web documents" within the browser window.  Some of our users had the same complaint and were asking for us to prevent pdf, doc, and other file formats from opening inline within the browser window.

The way to get this to happen is to add a "Content-disposition" header with the value of "Attachment".  Of course if you are using Rails send_file or </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4030661535321021577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2009/01/apache-tip-encourage-browsers-to-open.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4030661535321021577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4030661535321021577'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2009/01/apache-tip-encourage-browsers-to-open.html' title='Apache Tip: Encourage Browsers to Open Documents in the Native Application'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5232511799505127429</id><published>2008-12-29T18:52:00.000-08:00</published><updated>2009-01-02T14:29:21.989-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='prototype'/><title type='text'>Javascript Event Bubbling with Prototype</title><summary type='text'>Update: After I wrote this post I remembered that change events don't bubble in IE6 for select elements and thus likely don't bubble for check boxes either.  After an investigation I found out that no - they don't bubble.  So this code won't work correctly for IE 6 which still commands a 20% + share of the market.  Please STOP IE6 NOW...and on with the post.Bubbling is a good thing...and no I'm </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5232511799505127429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/12/javascript-event-bubbling-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5232511799505127429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5232511799505127429'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/12/javascript-event-bubbling-with.html' title='Javascript Event Bubbling with Prototype'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2138735620766327626</id><published>2008-12-22T21:45:00.000-08:00</published><updated>2008-12-22T22:21:28.643-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='extjs'/><title type='text'>Send HTML to Javascript Functions from Rails Partials</title><summary type='text'>Many Javascript libraries, such as ExtJS, allow you to pass HTML to functions.  A good example of this is the Ext.Msg.alert call which accepts a a title and a message where the message string can have HTML markup in it to form the content of the alert popup.  When this message is a large block of HTML, for example a large disclaimer that you have to stick up in the face of your customer, it </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2138735620766327626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/12/send-html-to-javascript-functions-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2138735620766327626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2138735620766327626'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/12/send-html-to-javascript-functions-from.html' title='Send HTML to Javascript Functions from Rails Partials'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3896909994668145727</id><published>2008-12-13T18:02:00.000-08:00</published><updated>2008-12-13T20:08:53.781-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='CSV'/><category scheme='http://www.blogger.com/atom/ns#' term='optparse'/><title type='text'>Fix Broken Delimiter Separated Values Files</title><summary type='text'>We get broken delimiter separated values files that are not properly quoted.  Actually they don't use any type of quoting and expect the delimiter (a pipe character) to not appear in the output.  Invariably these files end up having a handful or rows with fields with carriage returns in them.  These rows end up getting dropped during later processing.  Below is a simple script to fix such files.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3896909994668145727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/12/fix-broken-delimiter-separated-values.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3896909994668145727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3896909994668145727'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/12/fix-broken-delimiter-separated-values.html' title='Fix Broken Delimiter Separated Values Files'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2143700578610262688</id><published>2008-11-23T12:42:00.000-08:00</published><updated>2008-11-23T13:08:02.166-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='sinatra'/><category scheme='http://www.blogger.com/atom/ns#' term='passenger'/><title type='text'>Sinatra is Kind of Cool - Passenger Tips</title><summary type='text'>Sinatra is another very cool Ruby web framework that packs quite a punch in what is currently only 1,576 LOC.  It has pretty decent routing, filters, layouts, and more.  If you are building something that functions primarily as a web service it would definitely be an option worth checking out.Sinatra is Rack compatible and thus deploying behind Phusion Passenger works well.  Unfortunately, the </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2143700578610262688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/11/sinatra-is-kind-of-cool-some-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2143700578610262688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2143700578610262688'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/11/sinatra-is-kind-of-cool-some-tips.html' title='Sinatra is Kind of Cool - Passenger Tips'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3817990351046337169</id><published>2008-11-15T23:26:00.000-08:00</published><updated>2008-11-23T14:48:41.903-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>Merb Javascript Delete link_to with Prototype.js</title><summary type='text'>I got on the elevator to go home from work the other day and this other guy in the elevator says to me "Those look like comfortable shoes."  Huh?  Did I just step in the world of Forest Gump?  What is that all about?Currently there is quite a pissing match going on in the world of Rails with fronts against Zed Shaw and Merb - see here and here.  I hope all this energy can be channeled to </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3817990351046337169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/11/merb-javascript-delete-linkto-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3817990351046337169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3817990351046337169'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/11/merb-javascript-delete-linkto-with.html' title='Merb Javascript Delete link_to with Prototype.js'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4703166899415378161</id><published>2008-11-11T19:11:00.000-08:00</published><updated>2008-11-23T14:46:57.667-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='page monitor'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Ruby Page Monitor</title><summary type='text'>Here is a script I use to monitor pages for changes that don't supply feeds.  It features the ability to check only a subset of the page using regular expression filters.  You feed it a YAML file of the pages you want to monitor and optionally the email address you wish to send the results to (if you are running it as a cron job).  The links file might originally look something like this:I say "</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4703166899415378161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/11/ruby-page-monitor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4703166899415378161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4703166899415378161'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/11/ruby-page-monitor.html' title='Ruby Page Monitor'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1720003766881526033</id><published>2008-10-28T00:19:00.000-07:00</published><updated>2008-11-23T14:45:14.438-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='paperclip'/><category scheme='http://www.blogger.com/atom/ns#' term='attachment_fu'/><title type='text'>attachment_fu with Optional Attachment...again</title><summary type='text'>I wrote about this previously...attachment_fu is not mean to be used to provide a file attachment as an optional attribute of a model with other attributes.  If you want to combine a model with its own attributes and an attachment have a look at Paperclip.  attachment_fu is a great plugin but the attachment is supposed to live in its own model.So why am I writing about this again?  Well, recently</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1720003766881526033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/10/attachmentfu-with-optional.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1720003766881526033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1720003766881526033'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/10/attachmentfu-with-optional.html' title='attachment_fu with Optional Attachment...again'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5347747935358530089</id><published>2008-10-05T16:30:00.000-07:00</published><updated>2008-11-23T14:43:25.379-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='picasa'/><category scheme='http://www.blogger.com/atom/ns#' term='upload'/><title type='text'>Picasa Web Album Command Line Upload</title><summary type='text'>I wrote this code some time ago before Picasa Web Albums had a good uploading solution for Linux users.  This code uses the the Google Data APIs.  While there is a better upload solution for Linux now (Picasa for Linux) some of you, like me, might prefer a command line driven upload method.  This allows you to upload a batch of photos by issuing a command like this:So, for example, you might </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5347747935358530089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/10/picasa-web-album-command-line-upload.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5347747935358530089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5347747935358530089'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/10/picasa-web-album-command-line-upload.html' title='Picasa Web Album Command Line Upload'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7813069408313445732</id><published>2008-10-01T20:16:00.000-07:00</published><updated>2008-11-15T18:30:04.018-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='charts'/><category scheme='http://www.blogger.com/atom/ns#' term='Raphael'/><title type='text'>Raphael Bakes a Nice Pie</title><summary type='text'>Raphaël is a very cool Javascript library that provides an abstraction over the the vector graphics capabilities built into today's browsers.  I cooked up a little example that demonstrates the usage of Raphael to make a pie chart component:



This example seems to work well on all modern browsers and will even work on IE back to at least version 6.  It uses SVG on most browsers and VML on the </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7813069408313445732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/10/raphael-bakes-nice-pie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7813069408313445732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7813069408313445732'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/10/raphael-bakes-nice-pie.html' title='Raphael Bakes a Nice Pie'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_qc84-TF5d-c/SOQ-lVeE9oI/AAAAAAAACbU/RtyHPfoRzEg/s72-Rc/raphael-pie.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7231751114925569247</id><published>2008-09-27T03:24:00.000-07:00</published><updated>2008-11-23T14:40:39.900-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='extjs'/><title type='text'>Ext JS Custom TreeNodeUI</title><summary type='text'>I wrote this some time ago and then noticed that Blogger blasted the indentation in the code snippets so I'm only posting it now.Hey, this should be a good dump - I needed an Ext JS tree with a custom TreeNodeUI.  In addition to the usual text, I wanted each TreeNode to feature a select box that would allow a selection (and Ajax saving of the selection) to be made for each node.  While the Ext JS</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7231751114925569247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/09/ext-js-custom-treenodeui.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7231751114925569247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7231751114925569247'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/09/ext-js-custom-treenodeui.html' title='Ext JS Custom TreeNodeUI'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5652159286747713441</id><published>2008-09-24T19:39:00.000-07:00</published><updated>2008-11-23T14:37:39.543-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='osql'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Attach and Detach SQL Server Databases from the Command Line with osql</title><summary type='text'>I'm usually working with MySQL but I also work on a project that uses SQL Server for a back end.  Lately I've been writing a script that massages some data from a CSV dump from another system into our system.  This led to a rather, rinse, repeat cycle of switching to SQL Server in VMWare, detaching the existing database, copying a fresh copy of the database into place, and re-attaching the data </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5652159286747713441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/09/attach-and-detach-sql-server-databases.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5652159286747713441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5652159286747713441'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/09/attach-and-detach-sql-server-databases.html' title='Attach and Detach SQL Server Databases from the Command Line with osql'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1559170259628213174</id><published>2008-09-21T12:01:00.000-07:00</published><updated>2008-11-23T14:33:38.407-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='combinations'/><category scheme='http://www.blogger.com/atom/ns#' term='discrete mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='prototype'/><title type='text'>Generating Combinations in Ruby and Javascript</title><summary type='text'>Hey, time to dust off your discrete math text! (The one I used is  Discrete Mathematics and Its Applications by Kenneth H. Rosen).  The number of combinations of r items that can be selected from n items is given by the formula = n!/r!(n - r)! (note to self, render this with MathML).  The following three code blocks show how to return those combinations in Ruby, Javascript, and Javascript with </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1559170259628213174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/09/generating-combinations-in-ruby-and_21.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1559170259628213174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1559170259628213174'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/09/generating-combinations-in-ruby-and_21.html' title='Generating Combinations in Ruby and Javascript'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1394333376981575507</id><published>2008-09-13T19:11:00.000-07:00</published><updated>2008-11-23T14:26:27.916-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>method_missing in Javascript</title><summary type='text'>method_missing in Javascript?  Well not yet -- but you might be surprised to learn that some Javascript implementations already feature this functionality.  For example, it appears that Mozilla based browsers have had __noSuchMethod__ since at least Javascript version 1.5.  Also, it looks like this feature is quite possible to become a standard feature of Javascript in the future although not </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1394333376981575507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/09/methodmissing-in-javascript.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1394333376981575507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1394333376981575507'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/09/methodmissing-in-javascript.html' title='method_missing in Javascript'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2337142385337059384</id><published>2008-09-11T01:02:00.000-07:00</published><updated>2008-11-23T14:22:13.892-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='stylesheet'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Javascript - Change your Stylesheet not your Style</title><summary type='text'>Most Javascript code that interacts with the CSS of a document does it by interacting with the individual elements on the page.  For example, a Prototype script to change the background color of a specific element on the page might look like this:While this works well, in some cases you may be wanting to apply the same style to 100s of elements.  Recently I ran into this problem when coding a </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2337142385337059384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/09/change-your-stylesheet-not-your-style.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2337142385337059384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2337142385337059384'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/09/change-your-stylesheet-not-your-style.html' title='Javascript - Change your Stylesheet not your Style'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3000584261668448268</id><published>2008-09-09T00:43:00.000-07:00</published><updated>2008-09-11T00:51:18.990-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='scriptaculous'/><category scheme='http://www.blogger.com/atom/ns#' term='prototype'/><title type='text'>Flickr Photo Demo the new Hello World of Web Client Frameworks</title><summary type='text'>Hello WorldIt looks like the "Flickr Photo Demo" might become the "hello world" of web client frameworks.  First the 280 North team released the Cappuccino framework and published their Flickr Photo Demo.  Then the broken digits blog released a version written with the help of jQuery.I've been wanting to improve my Prototype and Scriptaculous skills so I took the broken digits example and </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3000584261668448268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/09/flickr-photo-demo-new-hello-world-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3000584261668448268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3000584261668448268'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/09/flickr-photo-demo-new-hello-world-of.html' title='Flickr Photo Demo the new Hello World of Web Client Frameworks'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7030670489688343455</id><published>2008-08-10T01:15:00.000-07:00</published><updated>2008-11-23T14:09:21.697-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='REXML'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='LibXML-Ruby'/><title type='text'>Converting from REXML to LibXML-Ruby</title><summary type='text'>With the recent resurrection of LibXML-Ruby I decided to investigate converting one of our more XML processing heavy applications from REXML to LibXML-Ruby.  LibXML-Ruby is touted to be much faster than REXML, and, I found this to be the case.  In the process I kept track of some of the differences between the two that should help you if you decide to do the same.  Here are some of the command </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7030670489688343455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/08/converting-from-rexml-to-libxml-ruby.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7030670489688343455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7030670489688343455'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/08/converting-from-rexml-to-libxml-ruby.html' title='Converting from REXML to LibXML-Ruby'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8113300549557449393</id><published>2008-07-26T18:37:00.000-07:00</published><updated>2008-07-26T18:57:59.748-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='applet'/><title type='text'>Applets are Dead?  Here's my Crapplet!</title><summary type='text'>Applets are dead.I decided to put together a little demo that shows the basic building blocks of using applet technology to build a RIA.  I call my applet Crapplet.  It builds a little GUI, does javascript to applet communications and vice versa, and fetches remote data from the server.  The applet can be found here.  A directory holding the source complete with a little build script can be found</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8113300549557449393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/07/applets-are-dead-heres-my-crapplet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8113300549557449393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8113300549557449393'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/07/applets-are-dead-heres-my-crapplet.html' title='Applets are Dead?  Here&apos;s my Crapplet!'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5932909995074339262</id><published>2008-07-19T21:56:00.000-07:00</published><updated>2009-06-13T23:44:15.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='flex 3'/><category scheme='http://www.blogger.com/atom/ns#' term='compile'/><title type='text'>Compile Flex 3 SDK from the Command Line</title><summary type='text'>Here is a guide to setting up a Flex 3 project so that you can compile it from the command line:

download and set up the Flex 3 SDK, make sure the bin/ directory is on your path
make a directory for your project
in your projects directory make src/ and bin/ directories
copy the flex-config.xml from the flex SDK's frameworks directory into the root of your project
edit the flex-config.xml in your</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5932909995074339262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/07/compile-flex-3-sdk-from-command-line.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5932909995074339262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5932909995074339262'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/07/compile-flex-3-sdk-from-command-line.html' title='Compile Flex 3 SDK from the Command Line'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4450797968552130763</id><published>2008-07-19T09:42:00.000-07:00</published><updated>2008-11-23T14:06:44.961-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='outlook'/><category scheme='http://www.blogger.com/atom/ns#' term='greasemonkey'/><title type='text'>Firefox Greasemonkey Outlook Web Access Extension Part III</title><summary type='text'>Other posts on OWAX: [ Part I | Part II ]I have reverse engineered the way Microsoft Outlook Web Access uses Ajax to mark records read / unread under Internet Exploder and have added similar functionality to my Firefox Greasemonkey Outlook Web Access Extensions.The code, also shown below, can be downloaded here.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4450797968552130763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/07/firefox-greasemonkey-outlook-web-access_19.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4450797968552130763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4450797968552130763'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/07/firefox-greasemonkey-outlook-web-access_19.html' title='Firefox Greasemonkey Outlook Web Access Extension Part III'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2608689399112961292</id><published>2008-07-03T14:04:00.000-07:00</published><updated>2008-11-23T14:02:19.202-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='outlook'/><category scheme='http://www.blogger.com/atom/ns#' term='greasemonkey'/><title type='text'>Firefox Greasemonkey Outlook Web Access Extension Part II</title><summary type='text'>Other posts on OWAX: [ Part I | Part III ]Small addition to my Greasemonkey Outlook Web Access Extension -- now the enter key submits the search on the find names form.Code shown below and as a download here.</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2608689399112961292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/07/firefox-greasemonkey-outlook-web-access.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2608689399112961292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2608689399112961292'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/07/firefox-greasemonkey-outlook-web-access.html' title='Firefox Greasemonkey Outlook Web Access Extension Part II'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6141325346904800379</id><published>2008-06-28T15:59:00.000-07:00</published><updated>2008-11-23T14:00:44.011-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Analyzing Rails Log Files for Slow Actions</title><summary type='text'>There are plenty of packages for analyzing rails log files.  These are helpful when you want to find bottlenecks in your application.  A very easy to use one is rawk.rb discussed in Railscast #97.  These tools are great as they help you to spend your efforts on the most costly areas of your code.However, if you want to do a really quick, but less precise analysis of your code you can resort to </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6141325346904800379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/06/analyzing-rails-log-files-for-slow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6141325346904800379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6141325346904800379'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/06/analyzing-rails-log-files-for-slow.html' title='Analyzing Rails Log Files for Slow Actions'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7393964342759867283</id><published>2008-06-14T11:36:00.000-07:00</published><updated>2008-11-23T13:58:41.519-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='timeout'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>ActiveRecord Change SQL Server Query Timeout</title><summary type='text'>Recently I had a rake task that was timing out while moving some data from a fact table into another data table.  This task has to be run only when we get a new batch of data, do some ETL work, and then dump the data into the production database tables.  I found out how to change the SQL Server query timeout on the Backyard Bamboo blog.  Since I just wanted to turn off the timeout for the current</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7393964342759867283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/06/activerecord-change-sql-server-query.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7393964342759867283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7393964342759867283'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/06/activerecord-change-sql-server-query.html' title='ActiveRecord Change SQL Server Query Timeout'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8496778691302921855</id><published>2008-06-11T11:16:00.000-07:00</published><updated>2008-11-23T13:57:27.543-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='closure'/><title type='text'>Javascript Closure</title><summary type='text'>I think most people writing a lot of javascript eventually run into a misunderstanding about closures.  Take a look at the code below.  The code dynamically creates three buttons that show an alert box when clicked upon.  What do you think will happen when you click each button?The problem is that the animal variable used in the button's onclick event is changed in the loop and thus the event </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8496778691302921855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/06/javascript-closure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8496778691302921855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8496778691302921855'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/06/javascript-closure.html' title='Javascript Closure'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5682312064150524789</id><published>2008-05-30T12:19:00.000-07:00</published><updated>2008-11-23T13:45:52.091-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='rails_sql_views'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL Server information_schema.views Length Limitation and rails_sql_views</title><summary type='text'>Recently I was running into a problem with a plugin called rails_sql_views (part of the Active Warehouse project).  This is a great plugin created by some friends of mine that helps you manage views in a rails project.  The plugin manages the proper creation of the view in the schema.rb file.  For the SQL Server adapter the code to produce view comes from a query that looks like this:The problem </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5682312064150524789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/05/sql-server-informationschemaviews.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5682312064150524789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5682312064150524789'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/05/sql-server-informationschemaviews.html' title='SQL Server information_schema.views Length Limitation and rails_sql_views'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3301960130910634840</id><published>2008-05-24T15:56:00.000-07:00</published><updated>2008-11-11T19:39:35.533-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='paperclip'/><category scheme='http://www.blogger.com/atom/ns#' term='attachment_fu'/><title type='text'>attachment_fu with Optional Attachment</title><summary type='text'>Note: attachment_fu has changed a bit, see the update to this post here.attachment_fu is the most popular plugin for providing file upload to a Rails application.  One thing you need to be aware of with attachment_fu is that it is meant to be used by making a model just for the attachment that will be the child relationship in a has_many or has_one.  An example would be a User model that has such</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3301960130910634840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/05/attachmentfu-with-optional-attachment.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3301960130910634840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3301960130910634840'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/05/attachmentfu-with-optional-attachment.html' title='attachment_fu with Optional Attachment'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5744064925811702181</id><published>2008-05-10T20:01:00.000-07:00</published><updated>2008-11-23T13:42:58.311-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Ruby Singleton Methods Handy for Quick and Dirty Debugging</title><summary type='text'>In a previous post I talked about needing to dump ActiveRecord models in favor of record sets when producing large reports from a Rails application.  While this works well, the record set returned when doing a select_all is an array of hashes.  And, being a hash, if you misspell the column name and type, for example:nil will be returned and you will be none the wiser.  Rubies singleton methods </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5744064925811702181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/05/ruby-singleton-methods-handy-for-quick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5744064925811702181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5744064925811702181'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/05/ruby-singleton-methods-handy-for-quick.html' title='Ruby Singleton Methods Handy for Quick and Dirty Debugging'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3475102537565780223</id><published>2008-05-10T19:40:00.000-07:00</published><updated>2008-11-23T13:44:02.540-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mstsc'/><category scheme='http://www.blogger.com/atom/ns#' term='rdesktop'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='tunnel'/><title type='text'>Tunnel Behind a Firewall to Connect with rdesktop (or mstsc)</title><summary type='text'>Ok, ok, so we really have a couple of Windows computer at work that are being used to serve up Rails applications.  They are firewalled so they don't accept rdesktop connections over their public IP.  We do, however, have a trusty Linux box running an ssh server that has access to these Windows boxes via our internal network.  This makes it possible to work from home, restarting mongrels and such</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3475102537565780223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/05/tunnel-behind-firewall-to-connect-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3475102537565780223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3475102537565780223'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/05/tunnel-behind-firewall-to-connect-with.html' title='Tunnel Behind a Firewall to Connect with rdesktop (or mstsc)'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4111769241324381188</id><published>2008-05-07T18:30:00.000-07:00</published><updated>2008-11-23T13:41:45.422-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tags'/><category scheme='http://www.blogger.com/atom/ns#' term='will_paginate'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='pagination'/><category scheme='http://www.blogger.com/atom/ns#' term='acts_as_taggable_on_steroids'/><title type='text'>will_paginate with acts_as_taggable_on_steroids</title><summary type='text'>How to paginate when searching tags with the combination of will_paginate and acts_as_taggable_on_steroids.  Here is the paginate call:Here, conditions_for_doohickies represents a function that produces the proper conditions from the supplied params.  This can, of course, be done as an AND or an OR.  If you want to return doohickies that have any of the tags (OR) you would do it like this:And, if</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4111769241324381188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/05/willpaginate-with-actsastaggableonstero.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4111769241324381188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4111769241324381188'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/05/willpaginate-with-actsastaggableonstero.html' title='will_paginate with acts_as_taggable_on_steroids'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8226589160905612905</id><published>2008-04-19T21:08:00.000-07:00</published><updated>2008-11-23T13:39:21.558-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='imagemagick'/><category scheme='http://www.blogger.com/atom/ns#' term='convert'/><title type='text'>ImageMagick Bulk Image convert Fun</title><summary type='text'>ImageMagick can do an amazing number of command line manipulation functions.  ImageMagick's convert command, for example, can convert an image from one format to another and do a bunch of transformations along the way.  Recently I needed to convert a whole bunch of SVG files deeply nested in a directory structure into transparent PNGs.  convert, combined with a little bash magick, makes this a </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8226589160905612905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/04/imagemagick-bulk-image-convert-fun.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8226589160905612905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8226589160905612905'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/04/imagemagick-bulk-image-convert-fun.html' title='ImageMagick Bulk Image convert Fun'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6304457926371228887</id><published>2008-04-19T10:53:00.000-07:00</published><updated>2008-11-23T13:39:59.624-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='better_nested_set'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>Massage Rails better_nested_set full_set into a hierarchy - XML</title><summary type='text'>In a previous post I showed how to convert a betternestedset full_set into a JSON hierarchy that you might feed to a javascript or flash component.  Another thing you might want to do is to massage the data into an XML hierarchy to feed a ... javascript or flash component.  Now you could use similar code to the previous example and build the XML document up with REXML or another XML library and </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6304457926371228887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/04/massage-rails-betternestedset-fullset.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6304457926371228887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6304457926371228887'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/04/massage-rails-betternestedset-fullset.html' title='Massage Rails better_nested_set full_set into a hierarchy - XML'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6973164867553004918</id><published>2008-04-18T18:56:00.000-07:00</published><updated>2008-11-23T13:38:28.153-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='backgroundrb'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>backgroundrb Rails Notes</title><summary type='text'>Just some things to watch out for when using backgroundrb with Rails:1. Starting backgroundrb like this:Does not mean that your application will be running in production mode.  In other words, production here refers to the section in your backgroundrb.yml that will be used and will not, for example, cause rails to start with production database settings.  For that to occur, your backgroundrb.yml </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6973164867553004918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/04/backgroundrb-rails-notes.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6973164867553004918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6973164867553004918'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/04/backgroundrb-rails-notes.html' title='backgroundrb Rails Notes'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2776801946789153676</id><published>2008-04-12T20:45:00.000-07:00</published><updated>2008-11-23T13:35:43.923-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='makefile'/><category scheme='http://www.blogger.com/atom/ns#' term='google app engine'/><category scheme='http://www.blogger.com/atom/ns#' term='make'/><title type='text'>Download Your Code from Google App Engine</title><summary type='text'>I've been toying around with Google App Engine a little.  One feature (among several) that is missing right now is the ability to download your source code after deploying it.  (Sure, sure, ..., you should really have your code in a source control system.)  While it is likely that Google will give us the ability to download our code in the coming days, I've written a small Makefile that you can </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2776801946789153676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/04/download-your-code-from-google-app.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2776801946789153676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2776801946789153676'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/04/download-your-code-from-google-app.html' title='Download Your Code from Google App Engine'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-4593903254146560990</id><published>2008-03-21T13:19:00.001-07:00</published><updated>2008-11-23T13:32:26.232-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysqldump'/><title type='text'>Transfering mysql Data using mysqldump</title><summary type='text'>In the last post I showed a script for truncating all the tables in a mysql database.  In this post I will now show some command line techniques for loading the truncated database with data from another database.  For this task you can use the myqldump command.  For example to dump all the data from a database to a text file you can use a command like this:Executing this command with prompt the </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/4593903254146560990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/03/transfering-mysql-data-using-mysqldump.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4593903254146560990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/4593903254146560990'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/03/transfering-mysql-data-using-mysqldump.html' title='Transfering mysql Data using mysqldump'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8783426826710244270</id><published>2008-03-21T10:14:00.000-07:00</published><updated>2010-01-31T20:05:28.916-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Truncate all Tables in a MySQL Database</title><summary type='text'>UPDATE: I've written a new post with an updated script that encourages safer password handling.  You should go there instead.Here is a handy script to truncate all the tables in a MySQL database.  I use this sometimes to wipe out an entire database before loading in some production data to replicate a customer problem:This script isn't perfect -- it should really prompt the user for his password </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8783426826710244270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/truncate-all-tables-in-mysql-database.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8783426826710244270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8783426826710244270'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/truncate-all-tables-in-mysql-database.html' title='Truncate all Tables in a MySQL Database'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-1429716807474030527</id><published>2008-02-28T13:06:00.000-08:00</published><updated>2008-11-23T13:30:33.827-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='better_nested_set'/><title type='text'>Rails Polymorphic better_nested_set</title><summary type='text'>better_nested_set is a great Rails plugin for representing hierarchical data.  Recently I worked on a problem where a message board feature needed to be created that could not only have multiple message trees but also needed to have multiple message trees referring to different model types.  Instead of splitting these up into multiple tables, one for each model type, the acts_as_nested_set :scope</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/1429716807474030527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/rails-polymorphic-betternestedset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1429716807474030527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/1429716807474030527'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/rails-polymorphic-betternestedset.html' title='Rails Polymorphic better_nested_set'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-6326667519470496953</id><published>2008-02-21T09:21:00.000-08:00</published><updated>2008-11-23T13:29:27.085-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='better_nested_set'/><title type='text'>Massage Rails better_nested_set full_set into a hierarchy - JSON</title><summary type='text'>better_nested_set is a great Rails plugin for working with certain types of hierarchical data.  The typical example where better_nested_set is used is for a threaded message board.  better_nested_set will allow you to pull in a message and all its descendants with a single full_set call.  The data that is returned includes a level field that allows you to indent the messages to indicate the </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/6326667519470496953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/massage-rails-betternestedset-fullset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6326667519470496953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/6326667519470496953'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/massage-rails-betternestedset-fullset.html' title='Massage Rails better_nested_set full_set into a hierarchy - JSON'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3226593405917621002</id><published>2008-02-14T15:25:00.000-08:00</published><updated>2008-11-23T13:28:03.239-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><title type='text'>Rails Reporting, Raw SQL, and ActiveRecord</title><summary type='text'>Most of the time when you dump some data out using Rails you are only dumping out a page of data at a time into an XHTML representaton.  This is often done with some kind of pagination and it all works pretty well and speed doesn't become an issue.  When doing reporting, however, you may be providing a much larger number of records to the user in the form of an Excel document or CSV file that the</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3226593405917621002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/rails-reporting-raw-sql-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3226593405917621002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3226593405917621002'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/rails-reporting-raw-sql-and.html' title='Rails Reporting, Raw SQL, and ActiveRecord'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-8630434247031632100</id><published>2008-02-10T10:13:00.000-08:00</published><updated>2008-11-23T13:27:06.750-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='capistrano'/><title type='text'>Capistrano for Web Site Deployment -- Non Rails</title><summary type='text'>Capistrano is an amazing tool for deploying Rails applications - and like they say when you have a hammer everything looks like a nail...so when I was tasked with developing a way to deploy a simple marketing web site for my company I looked first to Capistrano.  I wanted to make it so that non-developers could get set up correctly and then do a "cap deploy" to deploy the current state of the web</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/8630434247031632100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/capistrano-for-web-site-deployment-non.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8630434247031632100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/8630434247031632100'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/capistrano-for-web-site-deployment-non.html' title='Capistrano for Web Site Deployment -- Non Rails'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-7525927661530717225</id><published>2008-02-09T20:00:00.000-08:00</published><updated>2008-11-23T13:25:30.270-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='send_data'/><category scheme='http://www.blogger.com/atom/ns#' term='popen'/><title type='text'>Rails Send Data Through a Pipe with IO.popen</title><summary type='text'>While having trouble getting Unix zip to play nice with Ruby's Tempfile I found that it was much easier to just avoid a temp file altogether by using a pipe create with IO.popen.  Example code below shows how you might zip up a directory and send it back to the user from a controller:</summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/7525927661530717225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/rails-send-data-through-pipe-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7525927661530717225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/7525927661530717225'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/rails-send-data-through-pipe-with.html' title='Rails Send Data Through a Pipe with IO.popen'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-5536761096152776408</id><published>2008-02-03T09:24:00.000-08:00</published><updated>2008-11-23T13:23:57.857-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='minify'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='compress'/><category scheme='http://www.blogger.com/atom/ns#' term='yui compressor'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Minify Rails Javascript and CSS with YUI Compressor</title><summary type='text'>Here is a simple rake task to minify your javascript and css in a rails application using the YUI Compressor.  You will need to have java set up correctly on the system and have the YUI Compressor jar in the lib directory of your Rails application to run this code.You could drop this in lib/tasks/minify.rake and run it when deploying to production.  If deploying with Capistrano, you might put it </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/5536761096152776408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/02/minify-rails-javascript-and-css-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5536761096152776408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/5536761096152776408'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/02/minify-rails-javascript-and-css-with.html' title='Minify Rails Javascript and CSS with YUI Compressor'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-3735525994508644343</id><published>2008-01-28T14:57:00.000-08:00</published><updated>2008-11-23T13:19:56.330-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='csrf'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><title type='text'>Rails Forgery Protection (CSRF) and Ajax</title><summary type='text'>Rails 2.0 has forgery protection against CSRF attacks built in.  If you stick to standard rails helpers you won't need to take any extra steps and the forgery protection will just work - reason being, the helpers will automatically add the appropriate parameters.  For example form helpers will a hidden tag with the name "form_authenticity_token" and a value "big stinking authenticity token."If </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/3735525994508644343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/01/rails-forgery-protection-csrf-and-ajax.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3735525994508644343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/3735525994508644343'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/01/rails-forgery-protection-csrf-and-ajax.html' title='Rails Forgery Protection (CSRF) and Ajax'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10601975.post-2467591621419068970</id><published>2008-01-26T11:47:00.000-08:00</published><updated>2008-11-23T13:14:42.805-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='outlook'/><category scheme='http://www.blogger.com/atom/ns#' term='greasemonkey'/><title type='text'>Firefox Greasemonkey Outlook Web Access Extension Part I</title><summary type='text'>Other posts on OWAX: [ Part II | Part III ]Stuck using Outlook Web Access to access your email via Firefox?  Painful isn't it?  Microsoft has seen fit to make sure many features are not available if you aren't using Internet Exploder.  Take, for example, the case where your mailbox fills up and you need to clean out your trash -- hmmmm, no way to "Select All" so that you can at least delete </summary><link rel='replies' type='application/atom+xml' href='http://david-burger.blogspot.com/feeds/2467591621419068970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://david-burger.blogspot.com/2008/01/firefox-greasmonkey-outlook-web-access.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2467591621419068970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10601975/posts/default/2467591621419068970'/><link rel='alternate' type='text/html' href='http://david-burger.blogspot.com/2008/01/firefox-greasmonkey-outlook-web-access.html' title='Firefox Greasemonkey Outlook Web Access Extension Part I'/><author><name>David Burger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_qc84-TF5d-c/TR5uA-9cUFI/AAAAAAAAEF8/r6HFuPXyiIc/S220/burger.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_qc84-TF5d-c/R5uRuE1x07I/AAAAAAAABys/fAgOTGOVzxc/s72-c/toolbar.png' height='72' width='72'/><thr:total>6</thr:total></entry></feed>
