<?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"
	>

<channel>
	<title>Anthony Bush's Blog</title>
	<atom:link href="http://anthonybush.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://anthonybush.com/blog</link>
	<description>Productive Software Engineering</description>
	<pubDate>Sat, 13 Mar 2010 12:32:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Run Time Machine Backups Daily, Not Hourly</title>
		<link>http://anthonybush.com/blog/2010/03/13/run-time-machine-backups-daily-not-hourly/</link>
		<comments>http://anthonybush.com/blog/2010/03/13/run-time-machine-backups-daily-not-hourly/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 12:30:46 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=67</guid>
		<description><![CDATA[I&#8217;m annoyed by the inability to customize Time Machine&#8217;s schedule: I really don&#8217;t want hourly backups while I&#8217;m trying to use my machine.  I also don&#8217;t care for changing the interval as many other posts and tips suggest because that does not guarantee a consistent time-of-day to run.

There&#8217;s an easy solution that does not [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m annoyed by the inability to customize Time Machine&#8217;s schedule: I really don&#8217;t want hourly backups while I&#8217;m trying to use my machine.  I also don&#8217;t care for changing the interval as many other posts and tips suggest because that does not guarantee a consistent time-of-day to run.</p>

<p>There&#8217;s an easy solution that does not require any additional software.  First, turn off Time Machine backups (after you have selected a backup disk).  Then just add your own schedule(s) to cron.  For example, I schedule mine to run every day at 2 AM:</p>

<pre class="txt" style="font-family:monospace;">0 2 * * * /System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper</pre>

<p>If you&#8217;re unfamiliar with how to configure cron, you may wish to have a look at <a href="http://www.macosxhints.com/article.php?story=2001020700163714">Using the &#8216;cron&#8217; scheduler</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2010/03/13/run-time-machine-backups-daily-not-hourly/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Workaround bzr-upload FTP &#8220;Connection reset by peer&#8221; issues</title>
		<link>http://anthonybush.com/blog/2009/03/12/workaround-bzr-upload-ftp-connection-reset-by-peer-issues/</link>
		<comments>http://anthonybush.com/blog/2009/03/12/workaround-bzr-upload-ftp-connection-reset-by-peer-issues/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 06:04:47 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[Version Control]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[bzr]]></category>

		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=62</guid>
		<description><![CDATA[Have problems using the bzr-upload plugin to upload to an FTP server?  I recently had repeated troubles getting a large web site to complete the initial full upload to an FTP server on a not so great connection.  The upload would start fine, make it partial way through, and quit with the error:

bzr: [...]]]></description>
			<content:encoded><![CDATA[<p>Have problems using the <a href="http://bazaar-vcs.org/BazaarUploadForWebDev">bzr-upload</a> <a href="http://bazaar-vcs.org/BzrPlugins">plugin</a> to upload to an FTP server?  I recently had repeated troubles getting a large web site to complete the initial full upload to an FTP server on a not so great connection.  The upload would start fine, make it partial way through, and quit with the error:</p>

<pre class="txt" style="font-family:monospace;">bzr: ERROR: socket.error: (54, 'Connection reset by peer')</pre>

<p><span id="more-62"></span>
Repeating the <code>bzr upload</code> command causes it to start all over only to fail again later on (not on the same file).</p>

<p>The great people on the bzr-upload team pointed out that you can &#8220;upload&#8221; to a directory and copy that directory as a workaround:</p>

<ol>
<li><p>Upload to a directory (to get the revid file that is used to drive incremental uploads)</p>

<pre class="txt" style="font-family:monospace;">bzr upload ../tmp</pre></li>
<li><p>Manually copy the directory using FTP software or other, more reliable means.</p></li>
<li><p>Future uploads can be done incrementally:</p>

<pre class="txt" style="font-family:monospace;">bzr upload --remember ftp://user@ftp_host/destination_dir/</pre></li>
</ol>

<p>This is a good workaround because once it&#8217;s done there should be no problem using bzr-upload&#8217;s incremental upload capability with future changes.  I have never liked FTP synchronization tools because they are slow and don&#8217;t take advantage of the &#8220;ignore&#8221; files already present (e.g. <code>.bzrignore</code>).</p>

<h2>A fix around the corner?</h2>

<p>BZR&#8217;s FTP transport layer and bzr-upload plugin will hopefully become more robust in the future making this workaround unnecessary.  Here&#8217;s a small list of pending issues I would like to see resolved:</p>

<ul>
<li><a href="https://bugs.launchpad.net/bzr-upload/+bug/326302/">No journalling</a></li>
<li><a href="https://bugs.launchpad.net/bzr-upload/+bug/214825">No symlinks</a></li>
<li><a href="https://bugs.launchpad.net/bzr/+bug/127164">FTP transport does not always retry</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2009/03/12/workaround-bzr-upload-ftp-connection-reset-by-peer-issues/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Re: Boost performance with parallel processing</title>
		<link>http://anthonybush.com/blog/2009/01/31/re-boost-performance-with-parallel-processing/</link>
		<comments>http://anthonybush.com/blog/2009/01/31/re-boost-performance-with-parallel-processing/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 06:44:31 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[fork]]></category>

		<category><![CDATA[multithreading]]></category>

		<category><![CDATA[parallel processing]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=60</guid>
		<description><![CDATA[Martin Roest posted an article about parallel processing.  Here&#8217;s a more reusable version of the code, OOP style:

Usage with callback function:

&#60;?php
$pc = new ProcessController(10);
$pc-&#62;process($documents, 'processDocument');
?&#62;

It supports static method callbacks:

$pc-&#62;process($documents, array('DocumentProcessor', 'processDocument'));

And callbacks on an instance of an object:

$pc-&#62;process($documents, array($documentProcessor, 'processDocument'));


Class:

&#60;?php
&#160;
class ProcessController
{
    protected $maxNumChildren = 1;
&#160;
    public function __construct($maxNumChildren [...]]]></description>
			<content:encoded><![CDATA[<p>Martin Roest posted an article about <a href="http://www.ibuildings.com/blog/archives/1539-Boost-performance-with-parallel-processing.html">parallel processing</a>.  Here&#8217;s a more reusable version of the code, OOP style:</p>

<p>Usage with callback function:</p>

<pre class="txt" style="font-family:monospace;">&lt;?php
$pc = new ProcessController(10);
$pc-&gt;process($documents, 'processDocument');
?&gt;</pre>

<p>It supports static method callbacks:</p>

<pre class="txt" style="font-family:monospace;">$pc-&gt;process($documents, array('DocumentProcessor', 'processDocument'));</pre>

<p>And callbacks on an instance of an object:</p>

<pre class="txt" style="font-family:monospace;">$pc-&gt;process($documents, array($documentProcessor, 'processDocument'));</pre>

<p><span id="more-60"></span>
Class:</p>

<pre class="txt" style="font-family:monospace;">&lt;?php
&nbsp;
class ProcessController
{
    protected $maxNumChildren = 1;
&nbsp;
    public function __construct($maxNumChildren = 1)
    {
        $this-&gt;setMaxNumChildren($maxNumChildren);
    }
&nbsp;
    public function getMaxNumChildren()
    {
        return $this-&gt;maxNumChildren;
    }
&nbsp;
    public function setMaxNumChildren($maxNumChildren)
    {
        $this-&gt;maxNumChildren = $maxNumChildren;
    }
&nbsp;
    public function process($iterator, $callback)
    {
        $maxNumChildren = $this-&gt;getMaxNumChildren();
        $children = array();
&nbsp;
        foreach ($iterator as $item)
        {
            $pid = pcntl_fork();
&nbsp;
            if ($pid == -1)
            {
                // unable to fork
                return false;
            }
            else if ($pid)
            {
                // parent process
                $children[] = $pid;
                if (count($children) &gt;= $maxNumChildren)
                {
                    $pid = array_shift($children);
                    pcntl_waitpid($pid, $status);
                }
            }
            else
            {
                // child process
                call_user_func($callback, $item);
                exit(0);
            }
        }
&nbsp;
        // still in parent process, make sure all children are finished
        foreach ($children as $pid)
        {
            pcntl_waitpid($pid, $status);
        }
&nbsp;
        return true;
    }
}
&nbsp;
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2009/01/31/re-boost-performance-with-parallel-processing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Redirect After Post, But Not On Failure</title>
		<link>http://anthonybush.com/blog/2009/01/10/redirect-after-post-but-not-on-failure/</link>
		<comments>http://anthonybush.com/blog/2009/01/10/redirect-after-post-but-not-on-failure/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 14:00:30 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=44</guid>
		<description><![CDATA[Post/Redirect/Get (PRG) is a great practice, but don&#8217;t use it when the post is a failure.  Here are some reasons:


If post failed because of non-validation issue, e.g. if &#8220;try again later&#8221; was the result, then the client only has to refresh the page to submit the post again.
It&#8217;s more efficient (greener) and easier to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Post/Redirect/Get">Post/Redirect/Get</a> (PRG) is a great practice, but don&#8217;t use it when the post is a failure.  Here are some reasons:</p>

<ul>
<li>If post failed because of non-validation issue, e.g. if &#8220;try again later&#8221; was the result, then the client only has to refresh the page to submit the post again.</li>
<li>It&#8217;s more efficient (greener) and easier to develop: if redirecting even on failure, then you must store the post data in the session and pull it back out to refill the form (or require the user to fill out the entire form again).</li>
</ul>

<p>Implementation examples follow:</p>

<p><span id="more-44"></span>
Pseudocode:</p>

<pre class="txt" style="font-family:monospace;">if request is post
    if data is valid
        process data
        redirect and return
load view</pre>

<p>PHP Example:</p>

<pre class="txt" style="font-family:monospace;">&lt;?php
&nbsp;
$errors = array();
$data = array(
    'name' =&gt; '',
    'email' =&gt; '',
    'password' =&gt; '',
    'password_confirmation' =&gt; '',
);
&nbsp;
if (!empty($_POST))
{
    // request is POST
    $data = $_POST + $data;
&nbsp;
    // validate data (some of this could be moved to the model)
&nbsp;
    if (empty($data['name']))
    {
        $errors['name'] = 'Name is required.';
    }
&nbsp;
    if (empty($data['email']))
    {
        $errors['email'] = 'E-mail is required.';
    }
    else if (!Validator::isEmailValid($data['email']))
    {
        $errors['email'] = 'Please enter a valid e-mail address.';
    }
&nbsp;
    if (empty($data['password']))
    {
        $errors['password'] = 'Please enter a password.';
    }
    else if ($data['password'] != $data['password_confirmation'])
    {
        $errors['password'] = 'Passwords do not match.';
    }
&nbsp;
    if (empty($errors))
    {
        // process data
        $account = new Account();
        $account-&gt;setName($data['name']);
        $account-&gt;setEmail($data['email']);
        $account-&gt;setPassword($data['password']);
        $account-&gt;save();
&nbsp;
        // redirect and return
        $this-&gt;redirect('/');
        exit();
    }
}
&nbsp;
// load view
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2009/01/10/redirect-after-post-but-not-on-failure/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using OS X Leopard&#8217;s Spaces Productively</title>
		<link>http://anthonybush.com/blog/2008/10/29/using-os-x-leopards-spaces-productively/</link>
		<comments>http://anthonybush.com/blog/2008/10/29/using-os-x-leopards-spaces-productively/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 03:53:49 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[Mac OS X]]></category>

		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=40</guid>
		<description><![CDATA[Divide workspaces by projects, not applications.

I use web browsers, terminals, finder windows, and code editors for my software engineering projects.

I also use applications that are project independent and should stay out of the way when not needed yet remain easily accessible without having to switch through a bunch of “spaces.” I consider Mail and iTunes [...]]]></description>
			<content:encoded><![CDATA[<h3>Divide workspaces by projects, not applications.</h3>

<p>I use web browsers, terminals, finder windows, and code editors for my software engineering projects.</p>

<p>I also use applications that are project independent and should stay out of the way when not needed yet remain easily accessible without having to switch through a bunch of “spaces.” I consider Mail and iTunes to be such applications. These tend to be applications that only use one window and as a result they are easily managed just by using the Dock and Command-Tab features in Mac OS X.</p>

<p>My setup can be accomplished with two quick steps:</p>

<p><span id="more-40"></span></p>

<ol>
    <li><p>Turn off the “auto swoosh” by running this in Terminal (command line):</p>
<pre><code>defaults write com.apple.Dock workspaces-auto-swoosh -bool NO
killall Dock
</code></pre>
<p>Source: <a href="http://www.macosxhints.com/article.php?story=2008021122525348">Disable Space switching on Command-Tab in 10.5.2</a></p></li>
    <li><p>Configure your Spaces settings so that project independent applications are set to show on every space:</p>

<img src="http://anthonybush.com/blog/wp-content/uploads/2008/10/application-assignment-settings-for-os-x-spaces.png" alt="Application Assignment Settings for OS X Spaces" />

<p>In my case, apps like Safari, Terminal, TextMate, etc. will <strong>not</strong> make an appearance in the “Application Assignments” configuration.</p>

<p>To manage the apps that appear on “Every Space,” just keep them hidden (press Command-H when they are active). When you need one just click its icon in the Dock or Command-Tab to it. When you’re done with it, just hide it again.</p></li>
</ol>

<h3>What about OS X 10.3 Panther and 10.4 Tiger?</h3>

<p>I used to use <a href="http://desktopmanager.berlios.de/">Desktop Manager</a> with good results, but can’t get it to work right on Leopard.</p>

<h3>You might also enjoy reading:</h3>

<ul>
    <li><a href="http://www.dribin.org/dave/blog/archives/2007/11/13/spaces/">The Problem with Spaces</a></li>
    <li><a href="http://www.randsinrepose.com/archives/2003/07/10/nadd.html">Rands In Repose: N.A.D.D</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2008/10/29/using-os-x-leopards-spaces-productively/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Track Download Links Using jQuery and Google Analytics</title>
		<link>http://anthonybush.com/blog/2008/10/22/track-download-links-using-jquery-and-google-analytics/</link>
		<comments>http://anthonybush.com/blog/2008/10/22/track-download-links-using-jquery-and-google-analytics/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 03:10:59 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=37</guid>
		<description><![CDATA[Once you&#8217;ve got Google Analytics working, you can use jQuery to easily track other links on your site, such as download links.


First add the following anywhere after you load jQuery:

&#60;script type=&#34;text/javascript&#34;&#62;
$(document).ready(function() {
    $('.track_link').click(function() {
        pageTracker._trackPageview($(this).attr('href'));
        return true;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Once you&#8217;ve got <a href="http://www.google.com/analytics/">Google Analytics</a> working, you can use <a href="http://jquery.com/">jQuery</a> to easily track other links on your site, such as download links.</p>

<p><span id="more-37"></span>
First add the following anywhere after you load jQuery:</p>

<pre class="txt" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
    $('.track_link').click(function() {
        pageTracker._trackPageview($(this).attr('href'));
        return true;
    });
});
&lt;/script&gt;</pre>

<p>Then just add <code>class="track_link"</code> to any links you wish to track.  For example:</p>

<pre class="txt" style="font-family:monospace;">&lt;a href=&quot;/download/my_file.zip&quot; class=&quot;track_link&quot;&gt;Download my_file.zip&lt;/a&gt;</pre>

<p>Remember to separate CSS class names with spaces if you already have some:</p>

<pre class="txt" style="font-family:monospace;">&lt;a href=&quot;/download/my_file.zip&quot; class=&quot;my_other_css_class track_link&quot;&gt;Download my_file.zip&lt;/a&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2008/10/22/track-download-links-using-jquery-and-google-analytics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Gmail&#8217;s IMAP with Apple&#8217;s Mail.app, iPhone</title>
		<link>http://anthonybush.com/blog/2008/10/13/using-gmails-imap-with-apples-mailapp-iphone/</link>
		<comments>http://anthonybush.com/blog/2008/10/13/using-gmails-imap-with-apples-mailapp-iphone/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 04:50:00 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/2008/10/14/using-gmails-imap-with-apples-mailapp-iphone/</guid>
		<description><![CDATA[I recently purchased an iPhone and decided to switch my PowWeb hosted POP e-mail accounts to Gmail&#8217;s free IMAP offerings.  Doing this enabled me to read, move, and delete messages on either my iPhone or Laptop and not have to do the same thing again on the other device.

One of my requirements for this [...]]]></description>
			<content:encoded><![CDATA[<p>I recently purchased an iPhone and decided to switch my <a href="http://www.powweb.com/join/index.bml?AffID=576583">PowWeb hosted</a> POP e-mail accounts to Gmail&#8217;s free IMAP offerings.  Doing this enabled me to read, move, and delete messages on either my iPhone or Laptop and not have to do the same thing again on the other device.</p>

<p>One of my requirements for this change to succeed was that anyone with my existing e-mail address would <strong>not</strong> have to make any changes.  They&#8217;d still send to the same address, and e-mail from me would still appear to come from the same address.</p>

<p>I outline the steps I took to accomplish this below.</p>

<p><span id="more-28"></span></p>

<h3>Enable IMAP in your Gmail account</h3>

<ol>
<li>Login to your Gmail account.</li>
<li>Go to &#8220;Settings,&#8221; then &#8220;Forwarding and POP/IMAP.&#8221;</li>
<li>Make sure &#8220;Enable IMAP&#8221; is selected.</li>
</ol>

<h3>Disable syncing of the &#8220;Spam&#8221; and &#8220;All Mail&#8221; folders</h3>

<ol>
<li>Login to your Gmail account.</li>
<li>Go to &#8220;Settings,&#8221; then &#8220;Labs.&#8221;</li>
<li>Enable &#8220;Advanced IMAP Controls.&#8221;</li>
<li>Click &#8220;Edit Labels&#8221; in the left navigation (usually green).</li>
<li>Uncheck &#8220;Show in IMAP&#8221; for the folders you don&#8217;t want to sync.  I recommend doing this for all the ones that behave like Apple&#8217;s &#8220;Smart Playlists.&#8221;  That includes: Starred, All Mail, and Spam.  You can always access them through the web interface.</li>
</ol>

<h3>Enable ability to send from any address</h3>

<ol>
<li>Login to your Gmail account.</li>
<li>Go to &#8220;Settings,&#8221; then &#8220;Accounts.&#8221;</li>
<li>Click &#8220;Add another e-mail address&#8221; in the &#8220;Send mail as&#8221; section.</li>
<li>Follow instructions to verify it.</li>
<li>Make it default by clicking &#8220;make default&#8221; on the &#8220;Accounts&#8221; page.</li>
</ol>

<p>Using this feature allows you to continue to send e-mail from a pre-existing e-mail address (e.g. from your own domain).  Just make sure to change your e-mail hosting settings so that any e-mail sent to your &#8220;from&#8221; address is forwarded to your gmail account.  While doing that, you may also want to stop delivery to wherever it&#8217;s currently going so that you don&#8217;t get every e-mail twice.</p>

<h3>Configure your Apple Mail client</h3>

<p>Follow Google&#8217;s guide for this on their <a href="http://mail.google.com/support/bin/answer.py?hl=en&amp;ctx=mail&amp;answer=75726">supported IMAP client list</a> page.</p>

<p>If you&#8217;re using Gmail&#8217;s ability to send from any address, make sure to use that address in your Apple Mail settings (e.g. in step 3 of the <a href="http://mail.google.com/support/bin/answer.py?answer=81379">Apple Mail 3.0 (Leopard) Gmail IMAP guide</a>).</p>

<h3>Configure your iPhone e-mail settings</h3>

<p>Don&#8217;t sync the Apple Mail configuration.  It gets incorrectly converted from a generic IMAP account to a Gmail account on the iPhone.  You&#8217;ll still be able to send/receive e-mail, but it won&#8217;t send from your custom address.</p>

<p>To make sure syncing of the mail account is turned off:</p>

<ol>
<li>Plug your iPhone into your Mac.</li>
<li>Select your iPhone in the iTunes devices list.</li>
<li>Select the &#8220;Info&#8221; tab.</li>
<li>Scroll down to &#8220;Mail Accounts&#8221; and make sure either &#8220;Sync selected Mail accounts&#8221; is unchecked or that the entry for your Gmail account is unchecked.</li>
<li>Click &#8220;Apply&#8221; if you had to make changes.</li>
</ol>

<p>To add your IMAP account to your iPhone:</p>

<ol>
<li>Open the Settings app.</li>
<li>Select &#8220;Mail, Contacts, Calendars,&#8221; then &#8220;Add Account,&#8221; then &#8220;Other.&#8221;</li>
<li>On the first screen use your custom e-mail address for the &#8220;Address&#8221; field.</li>
<li>On the second screen fill in the &#8220;Incoming Mail Server&#8221; and &#8220;Outgoing Mail Server&#8221; sections the same as your computer&#8217;s mail client.</li>
</ol>

<h3>Optional Finishing Steps</h3>

<ul>
<li>Move over any messages from your downloaded POP mail to Gmail&#8217;s IMAP folders.  This could take awhile and eat up lots of space.</li>
<li>Deactivate the account so that Apple Mail hides it and stops trying to check mail at the address.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2008/10/13/using-gmails-imap-with-apples-mailapp-iphone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Renaming or Moving a MySQL Database and User</title>
		<link>http://anthonybush.com/blog/2006/01/24/renaming-mysql-database-and-user/</link>
		<comments>http://anthonybush.com/blog/2006/01/24/renaming-mysql-database-and-user/#comments</comments>
		<pubDate>Wed, 25 Jan 2006 00:08:52 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/?p=14</guid>
		<description><![CDATA[This article covers the renaming the name of a database as well as the user who has privileges on that database. For my example, I am renaming the database from old_db to new_db and also renaming the user old_user to new_user:

Update the mysql database:

shell> mysql -u root -p
mysql> USE mysql;
mysql> UPDATE user SET User='new_user' WHERE [...]]]></description>
			<content:encoded><![CDATA[<p>This article covers the renaming the name of a database as well as the user who has privileges on that database. For my example, I am renaming the database from old_db to new_db and also renaming the user old_user to new_user:</p>

<p>Update the mysql database:</p>

<pre>shell> mysql -u root -p
mysql> USE mysql;
mysql> UPDATE user SET User='new_user' WHERE User='old_user';
mysql> UPDATE db SET Db='new_db',User='new_user' WHERE User='old_user' AND Db='old_db';
mysql> exit</pre>

<p>Find the database location (usually in /usr/local/mysql/data):</p>

<pre>sudo find /usr -name "old_db" -type d</pre>

<p>Stop the MySQL server, move the database, re-start the MySQL server on Mac OS X:</p>

<pre>sudo su -
cd /usr/local/mysql/data
../support-files/mysql.server stop
mv old_db new_db
../support-files/mysql.server start</pre>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2006/01/24/renaming-mysql-database-and-user/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adhering to Section 508</title>
		<link>http://anthonybush.com/blog/2005/10/24/adhering-to-section-508/</link>
		<comments>http://anthonybush.com/blog/2005/10/24/adhering-to-section-508/#comments</comments>
		<pubDate>Mon, 24 Oct 2005 07:36:43 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/2005/10/24/adhering-to-section-508/</guid>
		<description><![CDATA[
As a government entity, it is required by federal law to adhere to Section 508 of the Rehabilitation Act, and meet minimum requirements of the W3C&#8217;s Web Content Accessibility Guidelines.


To meet minimum requirements, the entity must satisfy the &#8220;Priority 1&#8243; Checkpoint (=Conformance Level &#8220;A&#8221;). See:


    Web Content Accessibility Guidelines
    [...]]]></description>
			<content:encoded><![CDATA[<p>
As a government entity, it is <strong>required by federal law</strong> to adhere to <a href="http://www.section508.gov/index.cfm?FuseAction=Content&amp;ID=12#Web">Section 508</a> of the Rehabilitation Act, and meet minimum requirements of the W3C&#8217;s Web Content Accessibility Guidelines.
</p>

<p>To meet minimum requirements, the entity <em>must</em> satisfy the &#8220;Priority 1&#8243; Checkpoint (=Conformance Level &#8220;A&#8221;). See:</p>

<ul>
    <li><a href="http://www.w3.org/TR/WAI-WEBCONTENT/wai-pageauth.html">Web Content Accessibility Guidelines</a></li>
    <li><a href="http://websavvy-access.org/standards/complianceA.php">WAI &#8220;A&#8221; Compliance</a></li>
    <li><a href="http://websavvy-access.org/standards/complianceAA.php">WAI &#8220;AA&#8221; Compliance</a></li>
    </ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2005/10/24/adhering-to-section-508/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript Does Not Validate</title>
		<link>http://anthonybush.com/blog/2005/10/04/javascript-does-not-validate/</link>
		<comments>http://anthonybush.com/blog/2005/10/04/javascript-does-not-validate/#comments</comments>
		<pubDate>Tue, 04 Oct 2005 11:09:23 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
		
		<category><![CDATA[(X)HTML]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://anthonybush.com/blog/2005/10/04/javascript-does-not-validate/</guid>
		<description><![CDATA[Remember to put CDATA tags around the actual JavaScript code if it uses &#60; or &#38;. See Script and Style elements at the W3C. For example, use:



&#60;script type=&#34;text/javascript&#34;&#62;
&#60;![CDATA[
... unescaped script content ...
]]&#62;
&#60;/script&#62;


Actually, the above does not work correctly in Mozilla browers such as Firefox. See Properly Using CSS and JavaScript in XHTML Documents. They recommend [...]]]></description>
			<content:encoded><![CDATA[<p>Remember to put CDATA tags around the actual JavaScript code if it uses &lt; or &amp;. See <a href="http://www.w3.org/TR/xhtml1/#h-4.8">Script and Style elements</a> at the W3C. For example, use:
</p>

<pre>
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;![CDATA[
... unescaped script content ...
]]&gt;
&lt;/script&gt;
</pre>

<p>Actually, the above does not work correctly in Mozilla browers such as Firefox. See <a href="http://developer.mozilla.org/en/docs/Properly_Using_CSS_and_JavaScript_in_XHTML_Documents">Properly Using CSS and JavaScript in XHTML Documents</a>. They recommend putting everything in external files. If that&#8217;s not possible, use a modification of the above code:</p>

<pre>
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[
... unescaped script content ...
//]]&gt;
&lt;/script&gt;
</pre>

<p>Useful Validation Links:</p>

<ul>
    <li><a href="http://www.htmlhelp.com/tools/validator/problems.html">Common HTML Validation Problems</a> by WDG (=Web Design Group)</li>
    </ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonybush.com/blog/2005/10/04/javascript-does-not-validate/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

