<?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>Come on, dude!</title>
	<atom:link href="http://www.comeondude.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.comeondude.com</link>
	<description></description>
	<lastBuildDate>Mon, 08 Feb 2010 22:33:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Usability of Human Interfaces</title>
		<link>http://www.comeondude.com/2010/02/08/usability-of-human-interfaces/</link>
		<comments>http://www.comeondude.com/2010/02/08/usability-of-human-interfaces/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 22:32:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=103</guid>
		<description><![CDATA[View more presentations from Anton Arhipov.]]></description>
			<content:encoded><![CDATA[<div id="__ss_3017612" style="width: 425px; text-align: left;">
<object style="margin: 0px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=usability-100128150727-phpapp02&amp;rel=0&amp;stripped_title=usability-of-human-interfaces" /><param name="allowfullscreen" value="true" /><embed style="margin: 0px;" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=usability-100128150727-phpapp02&amp;rel=0&amp;stripped_title=usability-of-human-interfaces" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration: underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline;" href="http://www.slideshare.net/arhan">Anton Arhipov</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2010/02/08/usability-of-human-interfaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to pass JSON UTF-8 from Smarty template to Open Flash Chart 2</title>
		<link>http://www.comeondude.com/2010/01/27/how-to-pass-json-from-smarty-template-to-open-flash-chart-2/</link>
		<comments>http://www.comeondude.com/2010/01/27/how-to-pass-json-from-smarty-template-to-open-flash-chart-2/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:22:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smarty]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=94</guid>
		<description><![CDATA[Recently I ran into the problem with passing UTF-8 JSON from Smarty to Open Flash Chart 2. By default Smarty is striping slashes from all variables that it passes to the template, and JSON is converting every UTF-8 Character with &#8216;\u&#8217; in the beginning. Of cause Smarty was returning only &#8216;u&#8217;. To force Smarty to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I ran into the problem with passing UTF-8 JSON from <a title="Smarty" href="http://www.smarty.net/" target="_blank">Smarty</a> to <a title="Open Flash Chart 2" href="http://teethgrinder.co.uk/open-flash-chart-2/" target="_blank">Open Flash Chart 2</a>. By default Smarty is striping slashes from all variables that it passes to the template, and JSON is converting every UTF-8 Character with &#8216;\u&#8217; in the beginning. Of cause Smarty was returning only &#8216;u&#8217;.</p>
<p>To force Smarty to pass variables with slashes you can do next:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;chart&quot;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/addslashes"><span style="color: #990000;">addslashes</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chart</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>After that $chart will have correct JSON with correct UTF-8 Characters</p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2010/01/27/how-to-pass-json-from-smarty-template-to-open-flash-chart-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Office Season 4 (Andy asks out Angela)</title>
		<link>http://www.comeondude.com/2009/12/20/the-office-season-4-andy-asks-out-angela/</link>
		<comments>http://www.comeondude.com/2009/12/20/the-office-season-4-andy-asks-out-angela/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 10:17:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[the office]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=32</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/Z5BrzY76Spg" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/Z5BrzY76Spg"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/12/20/the-office-season-4-andy-asks-out-angela/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Come on, McDonalds</title>
		<link>http://www.comeondude.com/2009/11/01/come-on-mcdonalds/</link>
		<comments>http://www.comeondude.com/2009/11/01/come-on-mcdonalds/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 14:08:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Food Related]]></category>
		<category><![CDATA[ketchup]]></category>
		<category><![CDATA[mcdonalds]]></category>
		<category><![CDATA[russia]]></category>
		<category><![CDATA[why pay]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=87</guid>
		<description><![CDATA[Why I have to pay for ketchup in your &#8220;fast food restaurant&#8221; in Russia?]]></description>
			<content:encoded><![CDATA[<p>Why I have to pay for ketchup in your &#8220;fast food restaurant&#8221; in Russia?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/11/01/come-on-mcdonalds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Howto install rails on Ubuntu 8.04 LTS Server</title>
		<link>http://www.comeondude.com/2009/10/02/howto-install-rails-on-ubuntu-8-04-lts-server/</link>
		<comments>http://www.comeondude.com/2009/10/02/howto-install-rails-on-ubuntu-8-04-lts-server/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 11:16:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=82</guid>
		<description><![CDATA[If you have Ubuntu 8.04 LTS Server and you are installing rails from gem, you most propbably will run into the problem when rack will need thin and thin will need rack and this will create infinitive loop. There is a very simple and fast fix for it. All you have to do is update [...]]]></description>
			<content:encoded><![CDATA[<p>If you have Ubuntu 8.04 LTS Server and you are installing rails from gem, you most propbably will run into the problem when rack will need thin and thin will need rack and this will create infinitive loop. There is a very simple and fast fix for it. All you have to do is update RubyGems. Please keep in mind that update will remove all your installed gems and you will have to install it once again.</p>
<p><code class="codecolorer text default"><span class="text">sudo gem update --system</span></code></p>
<p>Then you have to remove old gem file from /usr/bin and link it to newer one.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem.bak<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem1.8 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem</div></td></tr></tbody></table></div>
<p>After that you should be able to install Rails with following command:</p>
<p><code class="codecolorer text default"><span class="text">sudo gem install rails</span></code></p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/10/02/howto-install-rails-on-ubuntu-8-04-lts-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby: how to use specific version of the gem</title>
		<link>http://www.comeondude.com/2009/10/01/ruby-how-to-use-specific-version-of-the-gem/</link>
		<comments>http://www.comeondude.com/2009/10/01/ruby-how-to-use-specific-version-of-the-gem/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 11:15:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[hpricot]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[versioning]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=79</guid>
		<description><![CDATA[Let&#8217;s imagine that you have something like this: 12maksim@enormo-081:~$ sudo gem list&#124;grep hpricot hpricot (0.8.1, 0.6) Now, to use 0.6 version of hpricot in Ruby you must use following: 12gem 'hpricot', '=0.6' require 'hpricot' Happy coding!]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s imagine that you have something like this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">maksim@enormo-081:~$ sudo gem list|grep hpricot<br />
hpricot (0.8.1, 0.6)</div></td></tr></tbody></table></div>
<p>Now, to use 0.6 version of hpricot in Ruby you must use following:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gem <span style="color:#996600;">'hpricot'</span>, <span style="color:#996600;">'=0.6'</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'hpricot'</span></div></td></tr></tbody></table></div>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/10/01/ruby-how-to-use-specific-version-of-the-gem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command to switch Java in Ubuntu</title>
		<link>http://www.comeondude.com/2009/09/29/command-to-switch-java-in-ubuntu/</link>
		<comments>http://www.comeondude.com/2009/09/29/command-to-switch-java-in-ubuntu/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 14:40:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[reminder]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=75</guid>
		<description><![CDATA[maksim@kpoxa:~$ sudo update-alternatives --config java]]></description>
			<content:encoded><![CDATA[<p><code class="codecolorer text default"><span class="text">maksim@kpoxa:~$ sudo update-alternatives --config java</span></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/09/29/command-to-switch-java-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans and wxRuby on Ubuntu Jaunty</title>
		<link>http://www.comeondude.com/2009/09/27/netbeans-and-wxruby-on-ubuntu-jaunty/</link>
		<comments>http://www.comeondude.com/2009/09/27/netbeans-and-wxruby-on-ubuntu-jaunty/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 10:10:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wxruby]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=66</guid>
		<description><![CDATA[I have been playing lately with Ruby because some of my work topics are involve now writing scripts in Ruby. Scripts are generally used for collecting information. I came up with idea to make some cross-platform GUI for co-workers that they can easily access and view collected information by  my Ruby scripts. So I have [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing lately with <a title="Ruby" href="http://www.ruby-lang.org" target="_blank">Ruby</a> because some of my work topics are involve now writing scripts in Ruby. Scripts are generally used for collecting information. I came up with idea to make some cross-platform GUI for co-workers that they can easily access and view collected information by  my Ruby scripts. So I have decided to use<a title="wxRuby" href="http://wxruby.rubyforge.org/" target="_blank"> wxRuby</a> as GUI toolkit.</p>
<p><span id="more-66"></span>First off, we need wxRuby to be installed. This is super easy to install it on your Ubuntu box.</p>
<p><code class="codecolorer bash default"><span class="bash">maksim<span style="color: #000000; font-weight: bold;">@</span>kpoxa:~$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> wxruby</span></code></p>
<p>Please remember that you need to have wxWidgets (libwxbase and libwxgtk2.x as well) to be installed on your PC. To make sure that wxRuby is up and running you can try to run one of the sample that comes with wxRuby gem. Try the following:</p>
<p><code class="codecolorer bash default"><span class="bash">maksim<span style="color: #000000; font-weight: bold;">@</span>kpoxa:~$ ruby <span style="color: #660033;">-rubygems</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>wxruby-2.0.1-x86-linux<span style="color: #000000; font-weight: bold;">/</span>samples<span style="color: #000000; font-weight: bold;">/</span>minimal<span style="color: #000000; font-weight: bold;">/</span>minimal.rb</span></code></p>
<p>If you will see a nice but empty window, that means that wxRuby is working! <img src='http://www.comeondude.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Now, after  this is done and wxRuby is working we need to set up IDE to recognize gem.</p>
<p>I&#8217;m using <a title="Netbeans IDE" href="http://www.netbeans.org" target="_blank">Netbeans</a> as my main IDE for all languages that I use for coding. Go to Tools &gt; Ruby Platforms. Next you have to add one more path to Gem path. In our case it&#8217;s /usr/lib/ruby/gems/1.8 Please see picture below:</p>
<p><img class="size-full wp-image-71 alignnone" title="ruby_netbeans" src="http://www.comeondude.com/wp-content/uploads/2009/09/ruby_netbeans.png" alt="ruby_netbeans" width="594" height="368" /></p>
<p>After this is done, you should be able to run <a href="http://snippets.dzone.com/posts/show/4752" target="_blank">this</a> sample by pressing F6 with no problems!</p>
<p>Only one downside here that seems that there is no autocomplete at the moment.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/09/27/netbeans-and-wxruby-on-ubuntu-jaunty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony sfGuardUser “remember me” fix for those who use Doctrine</title>
		<link>http://www.comeondude.com/2009/08/28/symfony-sfguarduser-%e2%80%9cremember-me%e2%80%9d-fix-for-those-who-use-doctrine/</link>
		<comments>http://www.comeondude.com/2009/08/28/symfony-sfguarduser-%e2%80%9cremember-me%e2%80%9d-fix-for-those-who-use-doctrine/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 19:02:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[Doctrine]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[quick fix]]></category>
		<category><![CDATA[sfGuardUser]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=44</guid>
		<description><![CDATA[I had a feeling that I did something wrong while installing a plugin into Symfony and that&#8217;s why sfGuardUser RememberMe feature did not work for me. After surfing the web I have found one year old Russ Flynn&#8217;s &#8220;Symfony sfGuardUser “remember me” checkbox/cookie does not work&#8221; post. Turns out it&#8217;s not only me. Russ had [...]]]></description>
			<content:encoded><![CDATA[<p>I had a feeling that I did something wrong while installing a plugin into Symfony and that&#8217;s why sfGuardUser RememberMe feature did not work for me. After surfing the web I have found one year old Russ Flynn&#8217;s <a href="http://eatmymonkeydust.com/2008/07/symfony-sfguarduser-remember-me-checkboxcookie-does-not-work/" target="_blank">&#8220;Symfony sfGuardUser “remember me” checkbox/cookie does not work&#8221;</a> post. Turns out it&#8217;s not only me. Russ had very nice solution, but the only downside was that it was written for Propel. I have edited rememberMeFilter.class.php and made it to use Doctrine instead of Propel. Check it out!<br />
<span id="more-44"></span></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> rememberMeFilter <span style="color: #000000; font-weight: bold;">extends</span> sfFilter<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> execute <span style="color: #009900;">&#40;</span><span style="color: #000088;">$filterChain</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// execute this filter only once, and if the user is not already logged in, and has a cookie set</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isFirstCall</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAuthenticated</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCookie</span><span style="color: #009900;">&#40;</span>sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'app_sf_guard_plugin_remember_cookie_name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sfRemember'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// See if a user exists with this cookie in the remember database</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Doctrine implemetation</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> Doctrine_Query<span style="color: #339933;">::</span><span style="color: #004000;">create</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">select</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'r.*, u.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sfGuardRememberKey r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">leftJoin</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'r.sfGuardUser u'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">where</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'r.remember_key = ?'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCookie</span><span style="color: #009900;">&#40;</span>sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'app_sf_guard_plugin_remember_cookie_name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sfRemember'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">andWhere</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'r.ip_address = ?'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getHttpHeader</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'addr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'remote'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchOne</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getReferences</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signIn</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sfGuardUser'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// execute next filter</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$filterChain</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/08/28/symfony-sfguarduser-%e2%80%9cremember-me%e2%80%9d-fix-for-those-who-use-doctrine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.0 now have goto operator</title>
		<link>http://www.comeondude.com/2009/08/24/php-5-3-0-now-have-goto-operator/</link>
		<comments>http://www.comeondude.com/2009/08/24/php-5-3-0-now-have-goto-operator/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 10:33:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Related]]></category>
		<category><![CDATA[goto]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xkcd]]></category>

		<guid isPermaLink="false">http://www.comeondude.com/?p=34</guid>
		<description><![CDATA[What&#8217;s how it will look like: Image courtesy of xkcd.com Nice small &#8220;comeondude&#8221; discussion here]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s how it will look like:</p>
<p style="text-align: center;"><img class="alignnone" title="Image courtesy of xkcd.com" src="http://imgs.xkcd.com/comics/goto.png" alt="" width="740" height="201" /></p>
<p style="text-align: center;">Image courtesy of <a href="http://xkcd.com/292" target="_blank">xkcd.com</a></p>
<p style="text-align: left;">Nice small &#8220;comeondude&#8221; discussion <a href="http://bugs.php.net/bug.php?id=48669" target="_blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.comeondude.com/2009/08/24/php-5-3-0-now-have-goto-operator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
