<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Krues8dr.com</title>
	<atom:link href="http://www.krues8dr.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.krues8dr.com</link>
	<description>Personal website and programming notes of Bill Hunt</description>
	<lastBuildDate>Thu, 25 Feb 2010 20:23:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Scriptaculous / Prototype IE 8 Autocomplete disappearing problem</title>
		<link>http://www.krues8dr.com/2009/10/30/scriptaculous-prototype-ie-8-autocomplete-disappearing-problem/</link>
		<comments>http://www.krues8dr.com/2009/10/30/scriptaculous-prototype-ie-8-autocomplete-disappearing-problem/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 19:29:55 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=68</guid>
		<description><![CDATA[In Internet Explorer 8, it seems that Scriptaculous / Prototype sometimes miscalculate exactly where to place the autocomplete box.  As a result, it will usually not show up at all, since it&#8217;s off the screen.  The trick here is that it&#8217;s calculating a left and top absolute position that are wrong, and then [...]]]></description>
			<content:encoded><![CDATA[<p>In <strong>Internet Explorer 8</strong>, it seems that <strong>Scriptaculous</strong> / <strong>Prototype</strong> sometimes miscalculate exactly where to place the <strong>autocomplete box</strong>.  As a result, it will usually <strong>not show up at all</strong>, since it&#8217;s off the screen.  The trick here is that it&#8217;s calculating a left and top absolute position that are wrong, and then writing them directly to the element as inline styles.  </p>
<p>The solution, though a bit of a hack, is to write styles for the div container that use the <strong>!important rule</strong>, which will override any inline styles.  Here&#8217;s what the fix should look like:</p>
<p><code><br />
#my_auto_complete {<br />
    position: relative !important;<br />
    top: -10px !important;<br />
    left: 0px !important;<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/10/30/scriptaculous-prototype-ie-8-autocomplete-disappearing-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: Spriting Doors</title>
		<link>http://www.krues8dr.com/2009/08/11/css-spriting-doors/</link>
		<comments>http://www.krues8dr.com/2009/08/11/css-spriting-doors/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 13:38:49 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=57</guid>
		<description><![CDATA[When we redesigned hotelicopter, I had to spend a lot of time cutting up images for a bunch of buttons and boxes.  I was using the now-standard Sliding Doors technique, so that we could have flexible boxes.  Today, I realized that I could combine this technique with another A List Apart favorite, image [...]]]></description>
			<content:encoded><![CDATA[<p>When we redesigned <a href="http://hotelicopter.com">hotelicopter</a>, I had to spend a lot of time cutting up images for a bunch of buttons and boxes.  I was using the now-standard <a href="http://www.alistapart.com/articles/slidingdoors/">Sliding Doors</a> technique, so that we could have flexible boxes.  Today, I realized that I could combine this technique with another <a href="http://www.alistapart.com/">A List Apart</a> favorite, <a href="http://www.alistapart.com/articles/sprites">image sprites</a>, so that you can have sliding doors <strong>using only one image</strong>.  <span id="more-57"></span></p>
<p>Effectively, you create your a background image the maximum width that you expect the box to be, as you would do with <strong>sliding doors</strong>.  However, instead of cutting off the left side (or right side, as you prefer), you keep the image intact. Instead, you simply align the image to the left on the outside and the right on the inside, leaving enough padding for the image edges to show through.</p>
<p><img src="http://www.krues8dr.com/wp-content/uploads/2009/08/spritingdoors1.png" alt="spritingdoors1" title="spritingdoors1" width="170" height="71" /></p>
<p><a href="http://www.krues8dr.com/files/spriting_doors/">Here&#8217;s an example of the technique in action.</a><br />
Update: Example now works in FF3, FF3.5, IE7, IE8 and Safari 3 and 4!</p>
<p>The only caveat here is that this won&#8217;t work for images with transparency, and only saves you one download (ostensibly).  This technique could be expanded, however, to have the hover states of the button in the image as well (as in the sprites technique), or for all four pieces of the image, used in <strong>rounded corners</strong> and <strong>custom border</strong> styles.  I wouldn&#8217;t recommend either of those for particularly large boxes, though, as you&#8217;d need a really large image for those, which doesn&#8217;t optimize well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/08/11/css-spriting-doors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony + Doctrine on the command line using the wrong database</title>
		<link>http://www.krues8dr.com/2009/06/16/symfony-doctrine-on-the-command-line-using-the-wrong-database/</link>
		<comments>http://www.krues8dr.com/2009/06/16/symfony-doctrine-on-the-command-line-using-the-wrong-database/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 14:16:34 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=52</guid>
		<description><![CDATA[So, one us pilots was trying to use Doctrine migrations to update a database on one of our servers.  However, Doctrine was sternly refusing to use the correct database, as configured in the database.yml file.  As it turns out, using Symfony from the command line skips the usual route through the /web/yourapplication.php file [...]]]></description>
			<content:encoded><![CDATA[<p>So, one us <a href="http://www.hotelicopter.com/team">pilots</a> was trying to use <strong>Doctrine migrations</strong> to update a database on one of our servers.  However, Doctrine was sternly refusing to use the correct database, as configured in the <strong><code>database.yml</code></strong> file.  As it turns out, using <strong>Symfony</strong> from the command line skips the usual route through the <code>/web/yourapplication.php</code> file (e.g. <code>backend.php</code> or <code>frontend.php</code>).  As a result, the environment is not properly set when reading the <code>database.yml</code> file, and instead the last database connection specified is used.  Lame.  The trick is to specify the environment from the command line, so this file (and the other config files) do what they&#8217;re supposed to:</p>
<p><code><br />
symfony doctrine:migrate --env=staging frontend 119<br />
</code></p>
<p>where &#8220;staging&#8221; is whatever the environment is you want to use (to match the name in the <code>database.yml</code> file).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/06/16/symfony-doctrine-on-the-command-line-using-the-wrong-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony / Doctrine &#8211; update a record using models</title>
		<link>http://www.krues8dr.com/2009/06/09/symfony-doctrine-update-a-record-using-models/</link>
		<comments>http://www.krues8dr.com/2009/06/09/symfony-doctrine-update-a-record-using-models/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 18:20:16 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=50</guid>
		<description><![CDATA[The Doctrine manual is really, really confusing in places.  If you want to do something as simple as updating a record, the examples suggest that you use Doctrine_Query::create().  This doesn&#8217;t make a lot of sense, because we only want to manipulate the model, we shouldn&#8217;t have to even look at a query.  [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.doctrine-project.org/documentation/manual/1_1/en" title="Doctrine ORM">Doctrine manual</a> is really, really confusing in places.  If you want to do something as simple as updating a record, the examples suggest that you use <code>Doctrine_Query::create()</code>.  This doesn&#8217;t make a lot of sense, because we only want to manipulate the model, we shouldn&#8217;t have to even look at a query.<span id="more-50"></span>  Assuming you have the primary id of the record in question, you can do the following to easily modify a record:</p>
<p><code><br />
$myobj = new Doctrine::getTable('MyObj')->find($request->getParameter('my_id'));<br />
$myobj->property = 'New Value';<br />
$myobj->save();<br />
</code></p>
<p>This is really straightforward, but if you don&#8217;t include the <code>find()</code> inline with the <code>getTable()</code> call, you&#8217;ll get an obscure <strong>&#8220;Unknown method saveTableProxy&#8221;</strong> error, which there seems to be no documentation for anywhere on the internet.  It only took a couple of hours of trial and error to get this figured out.  </p>
<p>In general, I&#8217;d still recommend Doctrine as an ORM, but the lack of consistent and clear documentation, with dreadfully obscure object methods, make for a very steep learning curve.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/06/09/symfony-doctrine-update-a-record-using-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP SimpleTest Unit Testing &#8211; Expecting Exceptions and Errors</title>
		<link>http://www.krues8dr.com/2009/06/01/php-simpletest-unit-testing-expecting-exceptions-and-errors/</link>
		<comments>http://www.krues8dr.com/2009/06/01/php-simpletest-unit-testing-expecting-exceptions-and-errors/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 21:12:03 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=46</guid>
		<description><![CDATA[Like a good programmer, I try to be good about unit testing.  And also as a good programmer, I throw errors in my PHP where appropriate.  I just learned today after a bit of digging through the codebase, that SimpleTest can be told to expect an Exception (or error) to be thrown in [...]]]></description>
			<content:encoded><![CDATA[<p>Like a good programmer, I try to be good about unit testing.  And also as a good programmer, I throw errors in my PHP where appropriate.  I just learned today after a bit of digging through the codebase, that <a title="SimpleTest from lastcraft" href="http://www.lastcraft.com/simple_test.php">SimpleTest</a> can be told to expect an Exception (or error) to be thrown in the test. <span id="more-46"></span></p>
<p>When using <code>trigger_error()</code>, you can use the <code>expectError()</code> as follows:<br />
<code><br />
	$this->expectError( $errorMessageToExpect, 'My message about this test case' );<br />
	my_code_that_causes_an_error();<br />
</code></p>
<p>Note that there is an internal <strong>queue of errors</strong> in SimpleTest, so it will expect precisely one error for each call to <code>expectError()</code>.  </p>
<p>If, however, you&#8217;re using <code>throw</code> you use <code>expectException</code> instead:<br />
<code><br />
	$this->expectException( $exceptionclass, 'My message about this test case' );<br />
	my_code_that_throws_an_exception_of_type_exceptionclass();<br />
</code></p>
<p>You can specify the class of exception to expect in the first parameter &#8211; the usual type would be <code>Exception</code>, of course.  If you set the first parameter to <code>false</code>, it defaults to this type.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/06/01/php-simpletest-unit-testing-expecting-exceptions-and-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for Adium Not Working with MSN Messenger Bug</title>
		<link>http://www.krues8dr.com/2009/03/24/fix-for-adium-not-working-with-msn-messenger-bug/</link>
		<comments>http://www.krues8dr.com/2009/03/24/fix-for-adium-not-working-with-msn-messenger-bug/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 19:32:33 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=42</guid>
		<description><![CDATA[For the last few months, I haven&#8217;t been able to use MSN Messenger with Adium.  I&#8217;d log in, but it would just hang endlessly.  Searching the bug reports was frustrating, and didn&#8217;t provide any insights.  Today I found this obscure post which gives the solution.  Apparently M$N changed the default connection [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few months, I haven&#8217;t been able to use <strong>MSN Messenger</strong> with <strong>Adium</strong>.  I&#8217;d log in, but it would just hang endlessly.  Searching the bug reports was frustrating, and didn&#8217;t provide any insights.  Today I found <a title="Bug report for Adium explaining MSN Messenger fix" href="http://trac.adiumx.com/ticket/11574">this obscure post</a> which gives the solution.  Apparently M$N changed the default connection settings without Adium making the change on their end to your account automatically.  To resolve this, open the Preferences panel and Edit the account in question.  Choose the Options tab (I didn&#8217;t even know this existed) and set <strong>Login Server</strong> to <code>messenger.live.com</code>, <strong>Port</strong> to <code>80</code> and turn on (check) the <strong>Connect via HTTP</strong> box.  Once you turn back on your account, everything should be working fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/03/24/fix-for-adium-not-working-with-msn-messenger-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Wordpress Plugin: Unstyle Comment Replies</title>
		<link>http://www.krues8dr.com/2009/03/17/new-wordpress-plugin-unstyle-comment-replies/</link>
		<comments>http://www.krues8dr.com/2009/03/17/new-wordpress-plugin-unstyle-comment-replies/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 22:56:02 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/?p=38</guid>
		<description><![CDATA[I&#8217;ve just created a new Wordpress plugin to unstyle comment replies, which fixes an issues with zebra striping of comments in the newer versions (2.7.x).  You can find out more about it on the plugin page.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just created a new Wordpress plugin to unstyle comment replies, which fixes an issues with zebra striping of comments in the newer versions (2.7.x).  You can find out more about it on the <a href="http://www.krues8dr.com/wordpress-unstyle-comment-replies-plugin/">plugin page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/03/17/new-wordpress-plugin-unstyle-comment-replies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scriptaculous Sortable Create onUpdate Event Not Firing</title>
		<link>http://www.krues8dr.com/2009/02/10/scriptaculous-sortable-create-onupdate-event-not-firing/</link>
		<comments>http://www.krues8dr.com/2009/02/10/scriptaculous-sortable-create-onupdate-event-not-firing/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 02:06:52 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/2009/02/10/scriptaculous-sortable-create-onupdate-event-not-firing/</guid>
		<description><![CDATA[I&#8217;ve been having trouble with a Scriptaculous sortable object that wasn&#8217;t catching the onUpdate function I&#8217;d assigned.  In this case, I was using an UL for the parent with LIs inside. After digging into the code, I discovered that there are several criteria that must be for the actual items that are going to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having trouble with a <strong>Scriptaculous sortable</strong> object that wasn&#8217;t catching the onUpdate function I&#8217;d assigned.  In this case, I was using an <strong>UL</strong> for the parent with <strong>LI</strong>s inside. After digging into the code, I discovered that there are several criteria that must be for the actual items that are going to be sortable, or else the event won&#8217;t fire.  These are:<span id="more-26"></span></p>
<ol>
<li>Each item must have a <strong>unique id</strong>.</li>
<li>The item id <strong>must contain an underscore</strong> (<strong>_</strong>)</li>
<li>The item id <strong>cannot begin with an underscore or a hyphen</strong></li>
</ol>
<p>Using myname_## should work fine, as long as ## is a unique integer in each case.  Technically, it must match the following regular expression:</p>
<p><code>/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/02/10/scriptaculous-sortable-create-onupdate-event-not-firing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Session Dropping Problem with IE 7</title>
		<link>http://www.krues8dr.com/2009/01/26/php-session-dropping-problem-with-ie-7/</link>
		<comments>http://www.krues8dr.com/2009/01/26/php-session-dropping-problem-with-ie-7/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 20:51:12 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Arcana]]></category>
		<category><![CDATA[Browser Bugs]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/2009/01/26/php-session-dropping-problem-with-ie-7/</guid>
		<description><![CDATA[We were just struggling here at work with an insane problem where IE 7 (and ONLY IE 7) was dropping sessions for PHP.   Literally, we would try a trivial test case of creating a session and a new session id (generated with the session_id() function) would appear each time.  Checking the session_save_path [...]]]></description>
			<content:encoded><![CDATA[<p>We were just struggling <a href="http://hotels.vibeagent.com" title="VibeAgent">here at work</a> with an insane problem where IE 7 (and ONLY IE 7) was <strong>dropping sessions for PHP</strong>.   Literally, we would try a trivial test case of creating a session and a new session id (generated with the session_id() function) would appear each time.  Checking the session_save_path showed that new sessions were being created each time.  In the end, we discovered that <strong>IE 7 will not save session cookies if there is an underscore in the domain name</strong>.  (Our development sites frequently have an underscore in the subdomain name &#8211; it&#8217;s amazing that we hadn&#8217;t found this out earlier.) We&#8217;ve replaced the underscore with a hyphen, and everything appears to work correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2009/01/26/php-session-dropping-problem-with-ie-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Photos</title>
		<link>http://www.krues8dr.com/2008/09/08/new-photos/</link>
		<comments>http://www.krues8dr.com/2008/09/08/new-photos/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 22:09:36 +0000</pubDate>
		<dc:creator>Krues8dr</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.krues8dr.com/2008/09/08/new-photos/</guid>
		<description><![CDATA[A handful or two of new photos from my cameraphone are up in the razr section.
]]></description>
			<content:encoded><![CDATA[<p>A handful or two of new photos from my cameraphone are up in the <a href="/media/razr/">razr section</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krues8dr.com/2008/09/08/new-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
