<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Petersen Did It</title>
	
	<link>http://blog.petersendidit.com</link>
	<description>blog of david petersen</description>
	<lastBuildDate>Mon, 01 Feb 2010 14:47:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PetersenDidIt" /><feedburner:info uri="petersendidit" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>jQuery is a’movin</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/poxEd8xgOxM/</link>
		<comments>http://blog.petersendidit.com/post/jquery-is-amovin/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 14:47:01 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[widget factory]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=151</guid>
		<description><![CDATA[Lot&#8217;s has happen in the past month with jQuery.
14 days of jQuery &#8211; We had 14 days of great links videos and info leading up and after the release of jQuery 1.4.
jQuery API &#8211; the jQuery API doc&#8217;s got a much needed overhall and are now running on Wordpress.  Some very slick searching and the [...]]]></description>
			<content:encoded><![CDATA[<p>Lot&#8217;s has happen in the past month with jQuery.</p>
<p><strong><a href="http://jquery14.com/">14 days of jQuery</a></strong> &#8211; We had 14 days of great links videos and info leading up and after the release of jQuery 1.4.</p>
<p><strong><a href="api.jquery.com/">jQuery API</a><span style="font-weight: normal;"> &#8211; the jQuery API doc&#8217;s got a much needed overhall and are now running on Wordpress.  Some very slick searching and the ability to comment on the documentation has brought live back in to the docs.</span></strong></p>
<p><a href="http://jquery.com/"><strong>jQuery 1.4</strong></a> was released in to the wild with tons of bug fixes, lots of speed enhancements and a few nice new features sprinkled on top to make it the prefect candy for all jQuery users to quickly flock to.</p>
<p><strong><a href="forum.jquery.com/">jQuery Forums</a></strong> packed up and moved from Google to Zoho which has produced a spam free forum again for the jQuery community</p>
<p><a href="http://jqueryui.com/"><strong>jQuery UI 1.8 rc1</strong></a> has been released with a final release soon to come, bringing us 2 new widgets, button and autocomplete, along with a lot of bug fixes and improvements including an overhauled widget factory.</p>
<p><a href="http://jqapi.com/"><strong>jQAIP</strong></a> an alternative viewer of the jQuery Doc&#8217;s was released for those who don&#8217;t like the design or workings of api.jquery.com.  Has its own nice search features and keyboard navigation.</p>
<p><strong><a href="http://james.padolsey.com/jquery/#v=1.4&amp;fn=css">jQuery Source Viewer</a></strong> &#8211; a quick and easy way to search through the jQuery source code.  Something that every jQuery developer should start doing after they learn the basics of jQuery.</p>
<p>I am looking forward to updating my projects to jQuery 1.4 and jQuery UI 1.8.  Will be interesting to see what the jQuery community can produce next.</p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/poxEd8xgOxM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/jquery-is-amovin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/jquery-is-amovin/</feedburner:origLink></item>
		<item>
		<title>Event listener add remove add remove . . . .</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/rP-BJaJnEZ0/</link>
		<comments>http://blog.petersendidit.com/post/event-listener-add-remove/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 20:01:32 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=145</guid>
		<description><![CDATA[Something I have seen in many people have problems with on Stack Overflow, jquery&#8217;s google group, and forums is people who are assigning an event listener and then because something happens, normally because the thing is being animated, they kill the event listener and then once the animation is finished they add it back. You [...]]]></description>
			<content:encoded><![CDATA[<p>Something I have seen in many people have problems with on Stack Overflow, jquery&#8217;s google group, and forums is people who are assigning an event listener and then because something happens, normally because the thing is being animated, they kill the event listener and then once the animation is finished they add it back. You end up mucking with the element far more then you really need to.</p>
<p>Example of what I am seeing:</p>
<pre class="brush: javascript">
var doclick = function(){
    $(this).animate({&#039;left&#039;:200},function(){
        $(this).bind(&#039;click&#039;,doclick);
    }).unbind(&#039;click&#039;);
};
$(&#039;li&#039;).bind(&#039;click&#039;,doclick);
</pre>
<p>You have duplicated code and will get very messy very quickly as more functionality gets added.</p>
<p>It would be much better to check if the thing is animated and if so just exit:</p>
<pre class="brush: javascript">
var doclick = function(){
    if ($(this).is(&#039;:animated&#039;)) return false;
    $(this).animate({&#039;left&#039;:200});
};
$(&#039;li&#039;).bind(&#039;click&#039;,doclick);
</pre>
<p>No adding and removing the event listeners just decide if you really care if was clicked.<br />
It doesn&#8217;t event need to be if its animated you can just use a flag to decide:</p>
<pre class="brush: javascript">
var flag = false;
var doclick = function(){
    if (flag) return false;
    $(this).animate({&#039;left&#039;:200});
};
$(&#039;li&#039;).bind(&#039;click&#039;,doclick);
$(&#039;div.stopclicks&#039;).bind(&#039;click&#039;,function(){
    flag = true;
});
</pre>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/rP-BJaJnEZ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/event-listener-add-remove/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/event-listener-add-remove/</feedburner:origLink></item>
		<item>
		<title>Think about your users first before getting out the paint brush</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/rgXGyiMTKhM/</link>
		<comments>http://blog.petersendidit.com/post/think-about-your-users-first-before-getting-out-the-paint-brush/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 19:18:35 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=141</guid>
		<description><![CDATA[I am working on slicing up a pretty large site that a group of 3 designers have been working on.  They are creating psd files for almost every page to define the layout and modules used on each page. After looking over the designs I started seeing things that look very &#8220;pretty&#8221; but make [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on slicing up a pretty large site that a group of 3 designers have been working on.  They are creating psd files for almost every page to define the layout and modules used on each page. After looking over the designs I started seeing things that look very &#8220;pretty&#8221; but make it so the user has to think or do something that is not what they naturally would do.</p>
<p>On the news section of the site the page has a list of the different news articles that have been published.  When you click on an article to read it a &#8220;lightbox&#8221; type popup will open up with the article content. Having the article open up in a lightbox type of popup in the page is new and different but I don&#8217;t know if I would call it bad. It does let make it very quick and easy to get back to the list but it I don&#8217;t know if its that much better then loading new content in the page and then clicking the back button rather then a close button.</p>
<p>If that news article is longer then the defined height of the &#8220;lightbox&#8221; the designers wanted the article to be split up in to pages and to add the slick looking page buttons at the bottom. Wait, you want the user to click a button and have what they are currently reading removed and replaced with the next &#8220;page&#8221; of content, making it so they can&#8217;t look back at the rest of the article.  How many people are just going to decide that the rest of the article isn&#8217;t worth it and just close the &#8220;lightbox&#8221;?</p>
<p>The user is going to get to the bottom of the first &#8220;page&#8221; of the article and spin the mouse wheel a few times, when that doesn&#8217;t work he is going to look for a scroll bar.  After he finds that there isn&#8217;t a scroll bar he is going to re-read that last sentence and make sure he really was right in thinking that there is more content.  Then he is going to finally see those slick looking page buttons and click on the next arrow.</p>
<p>The design makes the user have to think multiple time just to read the content that we are trying so hard to get him to read.  Yes there are times when making a user learn something new makes the usability better, but it has to be worth the users time to spend learning.  When you are trying to get a user to read your content you want it to be as simple and easy for him to do that, not make him think about why he just spend 30 seconds trying to figure out how to get more content.</p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/rgXGyiMTKhM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/think-about-your-users-first-before-getting-out-the-paint-brush/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/think-about-your-users-first-before-getting-out-the-paint-brush/</feedburner:origLink></item>
		<item>
		<title>SSH host name completion on a Mac</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/2LLCn_WmkXg/</link>
		<comments>http://blog.petersendidit.com/post/ssh-host-name-completion-on-a-mac/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 14:27:14 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tab completion]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=138</guid>
		<description><![CDATA[The list of servers I have to ssh in to is continually growing many of them I need to have an ssh tunnel to get to so I fully use the ~/.ssh/config file to help me out.  Now that my .ssh/config file has grown I am starting to forget what name of that one [...]]]></description>
			<content:encoded><![CDATA[<p>The list of servers I have to ssh in to is continually growing many of them I need to have an ssh tunnel to get to so I fully use the ~/.ssh/config file to help me out.  Now that my .ssh/config file has grown I am starting to forget what name of that one server was.  On some unix boxes <a href="http://www.caliban.org/bash/" target="_blank">bash_completion</a> is installed which allows you to type: ssh se[tab] and get: ssh servernamethatisreallylog.com. bash_completion is not installed on the Mac by default.  You can install it with <a href="http://www.macports.org/" target="_blank">macports</a> but I have yet to run in to a real need to install macports yet so I started searching for any other ways to get this working on my Mac.</p>
<p>What I found was a comment on a <a href="http://www.macosxhints.com/article.php?story=20080317085050719" target="_blank">MacOSXHints hint</a>.<br />
All you need to do is throw this in your ~/.bash_profile file.</p>
<pre class="brush: bash">
_complete_ssh_hosts ()
{
        COMPREPLY=()
        cur=&quot;${COMP_WORDS[COMP_CWORD]}&quot;
        comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
                        cut -f 1 -d &#039; &#039; | \
                        sed -e s/,.*//g | \
                        grep -v ^# | \
                        uniq | \
                        grep -v &quot;\[&quot; ;
                if [ -f ~/.ssh/config ]; then
                        cat ~/.ssh/config | \
                                grep &quot;^Host &quot; | \
                                awk &#039;{print $2}&#039;
                fi
                `
        COMPREPLY=( $(compgen -W &quot;${comp_ssh_hosts}&quot; -- $cur))
        return 0
}
complete -F _complete_ssh_hosts ssh
</pre>
<p>This will read in your .ssh/known_hosts file and your .ssh/config file and create a list of host names that you can now tab complete with the ssh command.  Comes in very handy. </p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/2LLCn_WmkXg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/ssh-host-name-completion-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/ssh-host-name-completion-on-a-mac/</feedburner:origLink></item>
		<item>
		<title>Stateful jQuery plugins with jQuery UI’s widget factory</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/X3KguEe7Q04/</link>
		<comments>http://blog.petersendidit.com/post/stateful-jquery-plugins-with-jquery-uis-widget-factory/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 01:31:45 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[stateful]]></category>
		<category><![CDATA[widget factory]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=126</guid>
		<description><![CDATA[There are many different formats for jQuery plugins, many of the formats are not designed for stateful plugins.  What is a stateful plugin? A plugin that keep track of what the state of the plugin is and lets you call methods and change properties even after the plugin as been initialized.  All of jQuery UI&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>There are many different formats for jQuery plugins, many of the formats are not designed for stateful plugins.  What is a stateful plugin? A plugin that keep track of what the state of the plugin is and lets you call methods and change properties even after the plugin as been initialized.  All of <a href="http://jqueryui.com/" target="_blank">jQuery UI</a>&#8217;s plugins are stateful (as of version 1.7.2), part of the jQuery UI core is a &#8220;<a href="http://docs.jquery.com/UI_Developer_Guide#The_widget_factory" target="_blank">Widget Factory</a>&#8221; which makes it very easy to quickly make a stateful plugin.</p>
<p>Below is an example of a plugin created with the <a href="http://jqueryui.pbworks.com/Widget-factory" target="_blank">jQuery UI widget factory</a>.</p>
<pre class="brush: javascript">
$.widget(&#039;namespace.pluginName&#039;, {
	_init: function() {
		// stuff that is called on initialization of the plugin

		//this.options a combination of the defualt options and the ones passed in during the plugin initialization
		if (this.options.foo) {
			//this.element is the element that the plugin was called on
			this.element.fadeOut();
		}
	},
	_privatemethod: function() {
		//private internal function
		//private functions should be named with a leading underscore
		//will only be able to be called from inside the plugin
	},
	publicmethod: function() {
		//this is a public fuction that can be called outside of the plugin

		//calling the private method from inside the public method
		this._privatemethod();
	},
	value: function() {
		//this is a public function that is defined as a getter
		//meaning it returns a value not a jquery object
		return this.options.foo;
	},
	destory: function() {
		$.widget.prototype.apply(this, arguments); // default destroy
		// this is where you would want to undo anything you do on init to reset the page to before the plugin was initialized.
	}

}));

$.extend($.namespace.pluginName, {
	getter: &#039;value&#039;,
	defaults: {
		option1: &#039;bar&#039;,
		foo: true
	}
});
</pre>
<p>With this you can call the following to initialize the plugin</p>
<pre class="brush: javascript">
$(&#039;#myelement&#039;).pluginName();
</pre>
<p>To call the publicmethod function you can now do this after initializing the plugin:</p>
<pre class="brush: javascript">
$(&#039;#myelement&#039;).pluginName();
$(&#039;#myelement&#039;).pluginName(&#039;publicmethod&#039;);
</pre>
<p>This makes it very easy to create a stateful jQuery plugins very quickly. All you need is the core of jQuery UI, but most people already have the whole jQuery UI package on their page.</p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/X3KguEe7Q04" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/stateful-jquery-plugins-with-jquery-uis-widget-factory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/stateful-jquery-plugins-with-jquery-uis-widget-factory/</feedburner:origLink></item>
		<item>
		<title>Work around for Google Gears on Snow Leopard</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/_6qSq2TJlcw/</link>
		<comments>http://blog.petersendidit.com/post/work-around-for-google-gears-on-snow-leopard/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 10:57:33 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[Google Gears]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Safari 4]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=121</guid>
		<description><![CDATA[As I talked about in by previous post, Google Gears is not compatible with Snow Leopard.  Google has been slow to get out a fix for the problem but seems like some others have found a work around and the guys from MailPlane have published how to use it.  It involves downloading the source code, [...]]]></description>
			<content:encoded><![CDATA[<p>As I talked about in by <a href="http://blog.petersendidit.com/post/google-gears-snow-leopard-and-safari-4/">previous post</a>, Google Gears is not compatible with Snow Leopard.  Google has been slow to get out a fix for the problem but seems like some others have found a work around and the guys from <a href="http://mailplaneapp.com/" target="_blank">MailPlane</a> have published how to use it.  It involves downloading the source code, applying a patch and then building a package, or you can just download the package from <a href="http://mailplaneapp.com/" target="_blank">MailPlane</a>, though they have a &#8220;Use at your own risk&#8221; disclaimer on it. You will also have to run Safari in 32bit mode. So if you are dieing to get your Google Gears back, especially in light of the <a href="http://www.google.com/appsstatus#rm=1&amp;di=1&amp;ddo=3&amp;hl=en" target="_blank">gmail outage on September 1st</a>, then try it out.  Let me know if you run in to any problems.</p>
<p><a href="http://mailplaneapp.com/download/google_gears/" target="_blank">http://mailplaneapp.com/download/google_gears/</a></p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/_6qSq2TJlcw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/work-around-for-google-gears-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/work-around-for-google-gears-on-snow-leopard/</feedburner:origLink></item>
		<item>
		<title>Blurry Text on External Monitor with Snow Leopard</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/rrBj-O9QySE/</link>
		<comments>http://blog.petersendidit.com/post/blurry-text-on-external-monitor-with-snow-leopard/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 18:53:29 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[blurry]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[smoothing]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=110</guid>
		<description><![CDATA[One of the problems I have off and on with my MacBook Pro is that every once and a while when I have it plugged in to my Dell 2408WFP monitor the text in Terminal and Coda seem to have blurry text.  Its like the font smoothing that Mac has built in has been turned [...]]]></description>
			<content:encoded><![CDATA[<p>One of the problems I have off and on with my MacBook Pro is that every once and a while when I have it plugged in to my Dell 2408WFP monitor the text in Terminal and <a href="http://www.panic.com/coda/" target="_blank">Coda</a> seem to have blurry text.  Its like the font smoothing that Mac has built in has been turned of just for those applications.  When I installed Snow Leopard this problem was on all the time, nothing I tried seemed to get rid of it.</p>
<p>Looks like I wasn&#8217;t the only one with this problem because the great guys over at <a href="http://www.macosxhints.com/" target="_blank">Mac OS X Hints</a> just posted <a href="http://www.macosxhints.com/article.php?story=20090828224632809" target="_blank">a hint</a> that will fix this problem.  Sounds like there is a bug in Snow Leopard that turns off the font smoothing for some external monitors.  Of course none of the Apple monitors have this problem but if you didn&#8217;t shell out the extra cash for one of their beautiful monitors you might have this problem.  The fix is very simple,  just open up Terminal and then paste in:</p>
<pre class="brush: bash">
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
</pre>
<p>You can try out using 1 or 3 as the value you are setting to have less or more font smoothing. You will need to restart the app you are having problems with and may even need to unplug and replug in your monitor.</p>
<p>if you decide you just want to get rid of the change just open up terminal and paste in:</p>
<pre class="brush: bash">
defaults -currentHost delete -globalDomain AppleFontSmoothing
</pre>
<p>This will remove the key/value pair that you added and you will be back to the default Snow Leopard way of font smoothing.</p>
<p><a href="http://www.macosxhints.com/article.php?story=20090828224632809" target="_blank">MacOSXHints &#8211; Re-enable LCD font smoothing for some monitors</a></p>
<p>EDIT (9/11/2009)<br />
Looks like you can also set the value back to the default value by going in to System Preferences and selecting the &#8220;Automatic Font Smoothing&#8221; checkbox, this is found at the bottom of the &#8220;Appearance&#8221; section.</p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/rrBj-O9QySE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/blurry-text-on-external-monitor-with-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/blurry-text-on-external-monitor-with-snow-leopard/</feedburner:origLink></item>
		<item>
		<title>Google Gears, Snow Leopard and Safari 4</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/230apusfdnw/</link>
		<comments>http://blog.petersendidit.com/post/google-gears-snow-leopard-and-safari-4/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 14:53:34 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[Google Gears]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Safari 4]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=108</guid>
		<description><![CDATA[As like many Mac users, I upgraded to Snow Leopard this past week.  As expected there are a few programs that don&#8217;t work.  One of those is Google Gears in Safari 4.  Google gears seems to still work correctly in Firefox on Snow Leopard but not in Safari.
If you go to http://gears.google.com where you normally [...]]]></description>
			<content:encoded><![CDATA[<p>As like many Mac users, I upgraded to Snow Leopard this past week.  As expected there are a few programs that don&#8217;t work.  One of those is Google Gears in Safari 4.  Google gears seems to still work correctly in Firefox on Snow Leopard but not in Safari.</p>
<p>If you go to <a href="http://gears.google.com" target="_blank">http://gears.google.com</a> where you normally would get a install button you get this message:</p>
<p>&#8220;Your browser is not currently supported.&#8221;</p>
<p>Searching around I found a ticket in the <a href="http://code.google.com/p/gears/" target="_blank">gears code.google.com</a> for the issue.  This morning someone from google updated it with some helpful information.</p>
<blockquote><p>Snow Leopard and Safari 4 introduced some changes which are incompatible with Gears.<br />
Apple made these changes to improve the security of their OS and of Safari.  While we<br />
continue to talk to Apple about the issue there is no workaround for us at this time.</p>
<p>Gears continues to work with Firefox on Mac OS X.</p></blockquote>
<p>You can watch the ticket yourself by staring the conversation.</p>
<p><a href="http://code.google.com/p/gears/issues/detail?id=847#c6" target="_blank">http://code.google.com/p/gears/issues/detail?id=847#c6</a></p>
<p>Follow up post:  <a href="http://blog.petersendidit.com/post/work-around-for-google-gears-on-snow-leopard/">Work around for Google Gears and Snow Leopard</a></p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/230apusfdnw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/google-gears-snow-leopard-and-safari-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/google-gears-snow-leopard-and-safari-4/</feedburner:origLink></item>
		<item>
		<title>Backing up Flickr</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/d-uQX1RjVy4/</link>
		<comments>http://blog.petersendidit.com/post/backing-up-flickr/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 22:26:42 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=92</guid>
		<description><![CDATA[Stories of people loosing every image they have uploaded to flickr have been bouncing around the last few months. It&#8217;s nothing new to the web, company provides a service and has some rules and whenever they feel those rules are violated they take action. Right or wrong, it has not helped the trust in the [...]]]></description>
			<content:encoded><![CDATA[<p>Stories of people loosing every image they have uploaded to <a href="http://flickr.com" target="_blank">flickr</a> have been bouncing around the last few months. It&#8217;s nothing new to the web, company provides a service and has some rules and whenever they feel those rules are violated they take action. Right or wrong, it has not helped the trust in the &#8220;cloud&#8221; at all.  So what can you do? Well <a href="http://hivelogic.com/about"  target="_blank">Dan Benjamin</a> took the <a href="http://www.stdlib.net/~colmmacc/2008/01/21/flickrtouchrpy-keep-your-flickr-album-and-favourites-on-an-ipod-touch-or-iphone/"  target="_blank">FlickrTouchr</a> script which allowed you to download a flickr set to your ipod and modified it to backup your all of your flickr pictures, sets and all.</p>
<p>Check out his article about it here:<br />
<a href="http://hivelogic.com/articles/backing-up-flickr/"  target="_blank">http://hivelogic.com/articles/backing-up-flickr/</a><br />
or you can just grab the latest version of the script from github:<br />
<a href="http://github.com/dan/hivelogic-flickrtouchr/tree/master"  target="_blank">http://github.com/dan/hivelogic-flickrtouchr/tree/master</a></p>
<p>Not something I currently am going to do as I keep a all of my images on a portable external drive which gets backed up weekly to a terabyte network drive and also gets backed up to <a href="https://www.backblaze.com/"  target="_blank">Backblaze</a>.  I only upload to flickr the images I think are worth people spending there time to look at.  The rest go up on my personal photo site hosted by <a href="http://dreamhost.com/"  target="_blank">dreamhost</a>.  </p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/d-uQX1RjVy4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/backing-up-flickr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/backing-up-flickr/</feedburner:origLink></item>
		<item>
		<title>Drag table row to a div with jQuery</title>
		<link>http://feedproxy.google.com/~r/PetersenDidIt/~3/jzNtqG8ICpk/</link>
		<comments>http://blog.petersendidit.com/post/drag-table-row-to-a-div-with-jquery/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 15:48:06 +0000</pubDate>
		<dc:creator>petersendidit</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[dragable]]></category>
		<category><![CDATA[dropable]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://blog.petersendidit.com/?p=83</guid>
		<description><![CDATA[One of projects I am working on has a long list of classes in a catalog.  These classes are listed on the screen in a table which is sortable and filterable.  Users search through these classes trying to find ones that they want to register for, when the find one they can click on the [...]]]></description>
			<content:encoded><![CDATA[<p>One of projects I am working on has a long list of classes in a catalog.  These classes are listed on the screen in a table which is sortable and filterable.  Users search through these classes trying to find ones that they want to register for, when the find one they can click on the &#8220;add to cart&#8221; button in that classes row.  One of the requirements that I was given for this listing was that users should also be able to drag a row to the cart. jQuery UI&#8217;s draggables works very nicely but after doing a quick proof-of-concept test I found that draggables don&#8217;t work on on table rows very well.  I couldn&#8217;t get jQuery UI to drag anything.</p>
<p>If you check out the <a href="http://jqueryui.com/demos/draggable/" target="_blank">documentation</a> you will find a option for a &#8220;helper&#8221;.  This option can either be set to a string (&#8216;clone&#8217; or &#8216;original&#8217;) or you can provide a function which returns the helper object.  So I wrote up some code to create a div with the selected row in a new table.</p>
<pre class="brush: javascript">
helper: function(event){
	return $(&#039;&lt;div class=&quot;drag-cart-item&quot;&gt;&lt;table&gt;&lt;/table&gt;&lt;/div&gt;&#039;)
	.find(&#039;table&#039;).append($(event.target).closest(&#039;tr&#039;).clone()).end();
},
</pre>
<p>Then all you need to do is set up a dropable area that knows how to handle that helper.</p>
<pre class="brush: javascript">
(&#039;#cart&#039;).droppable({
	drop: function(event, ui) {
		var classid = ui.helper.find(&#039;tr&#039;).log().attr(&#039;id&#039;);
		var name = ui.helper.find(&#039;.name&#039;).html();
		$(&#039;#cart .selected&#039;).append(&#039;&lt;li id=&quot;&#039;+classid+&#039;&quot;&gt;&#039;+name+&#039;&lt;/li&gt;&#039;);
	}
});
</pre>
<p><a href="http://www.demo.petersendidit.com/jquery/drag_table_row_to_div/" target="_blank">Check out the working demo</a></p>
<img src="http://feeds.feedburner.com/~r/PetersenDidIt/~4/jzNtqG8ICpk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.petersendidit.com/post/drag-table-row-to-a-div-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.petersendidit.com/post/drag-table-row-to-a-div-with-jquery/</feedburner:origLink></item>
	</channel>
</rss>
