<?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>Geekinator.com</title>
	<atom:link href="http://www.geekinator.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geekinator.com</link>
	<description></description>
	<lastBuildDate>Sat, 29 Oct 2011 14:49:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Forward 2 Google Voice Numbers to the same cell phone</title>
		<link>http://www.geekinator.com/2011/10/29/forward-2-google-voice-numbers-to-the-same-cell-phone/</link>
		<comments>http://www.geekinator.com/2011/10/29/forward-2-google-voice-numbers-to-the-same-cell-phone/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 14:24:27 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Phones]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[cell phone]]></category>
		<category><![CDATA[google voice]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[landline]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=215</guid>
		<description><![CDATA[I don&#8217;t know about you, but since Google Voice was released, I&#8217;ve wanted to have multiple Google Voice numbers that I could forward to my cell phone. While technically you&#8217;re not supposed to be able to do this, there is a trick to doing just that. One account one, go into your settings and add [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but since Google Voice was released, I&#8217;ve wanted to have multiple Google Voice numbers that I could forward to my cell phone. While technically you&#8217;re not supposed to be able to do this, there is a trick to doing just that.</p>
<p>One account one, go into your settings and add your cell number to the list of phones, and select a phone type. For mine, I selected Work. Next, logout and then login to your second google voice account. Now, go to the settings and add your cell number to the list of phones, and select a different phone type than you did for account one. For mine, I chose Home (you could choose Cell too, I believe and it should still work).</p>
<p>If everything worked, you should now be able to receive calls from both Google Voice numbers on the same cell phone (or landline, I suppose, but who uses those anymore lol).</p>
<p>I wanted to set this up because I signed up for a local Google Voice number where my mom lives, so she can call me all she wants from her local only landline and I would receive those calls on my cell phone across the country; I also want to have a local Google Voice number that I can give to people and receive those calls on my cell phone as well. I&#8217;m sure glad it&#8217;s possible, because it makes things so much easier.</p>
<p>If you have no idea what Google Voice is, or just want more information about it, you can find more information and sign up for your own free Google Voice number by going to <a href="http://www.google.com/voice" title="Google Voice" target="_blank">http://www.google.com/voice</a></p>
<p>You can download the FREE Google Voice iPhone app by going to <a href="http://itunes.apple.com/us/app/google-voice/id318698524?mt=8" title="Download the FREE Google Voice iPhone App" target="_blank">http://itunes.apple.com/us/app/google-voice/id318698524?mt=8</a>. You can also download the FREE Google Voice app on the Android Market.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/10/29/forward-2-google-voice-numbers-to-the-same-cell-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Realistic physics apply to sniping in Battlefield 3!</title>
		<link>http://www.geekinator.com/2011/10/25/realistic-physics-apply-to-sniping-in-battlefield-3/</link>
		<comments>http://www.geekinator.com/2011/10/25/realistic-physics-apply-to-sniping-in-battlefield-3/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 21:20:17 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[battlefield]]></category>
		<category><![CDATA[battlefield 3]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[pc gaming]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[sniping]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=209</guid>
		<description><![CDATA[I was a little worried that even though Battlefield 3 has pretty realistic physics, that sniping would still be point and shoot. I&#8217;m really happy to announce that real physics apply to sniping in Battlefield 3! During the live Battlefield 3 video hosted on IGN.com yesterday, I asked a question via twitter regarding whether bullet [...]]]></description>
			<content:encoded><![CDATA[<p>I was a little worried that even though Battlefield 3 has pretty realistic physics, that sniping would still be point and shoot. I&#8217;m really happy to announce that real physics apply to sniping in Battlefield 3! During the live Battlefield 3 video hosted on IGN.com yesterday, I asked a question via twitter regarding whether bullet drop and windage would be a factor when sniping in the game. I left the room for a minute during the broadcast, only to come back and hear the last part of the answer to either my question or a similar question from someone else (I hope it was mine!, but I can&#8217;t confirm at this time since the video replay seems to be down), and the answer is yes&#8230;they do apply in the game!</p>
<p>I&#8217;m excited about this, because it makes long distance shooting much more of a challenge, and seeing as how some of the maps are massive in scale, it will make for some pretty fun sniping moments. I&#8217;m ready to spread some lead, how about you guys?!? See you on the Battlefield!</p>
<p>Want to know more about the Battlefield 3 game? Check out the official website at <a href="http://www.battlefield.com/battlefield3" title="Battlefield 3 official website" target="_blank">http://www.battlefield.com/battlefield3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/10/25/realistic-physics-apply-to-sniping-in-battlefield-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A field not saving in CakePHP? Try clearing the cache :)</title>
		<link>http://www.geekinator.com/2011/10/24/a-field-not-saving-in-cakephp-try-clearing-the-cache/</link>
		<comments>http://www.geekinator.com/2011/10/24/a-field-not-saving-in-cakephp-try-clearing-the-cache/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 23:03:46 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[field]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=195</guid>
		<description><![CDATA[I thought I&#8217;d pass a little tip along for those of you who use the CakePHP framework, and maybe don&#8217;t know all the ins and outs yet (I am definitely one of those people, but I&#8217;m getting there). Every once in a while, I&#8217;ll get stuck on something that just won&#8217;t save to the database, [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d pass a little tip along for those of you who use the CakePHP framework, and maybe don&#8217;t know all the ins and outs yet (I am definitely one of those people, but I&#8217;m getting there). Every once in a while, I&#8217;ll get stuck on something that just won&#8217;t save to the database, and all of a sudden it will dawn on me that I haven&#8217;t cleared the model cache (the cached model files are located in /app/tmp/cache/models/).</p>
<p>If you have loaded any models on your site, and then make changes to those models at a later time, you will need to clear the model cache for the particular model before Cake will be able to see the new database changes. </p>
<p>I just remembered that, as I&#8217;ve been yelling at the screen for the past hour, trying to figure out why a simple integer field would not save to the database&#8230;well, if I had my brain plugged in, I would have remembered I renamed the field in the database after I had already loaded the particular model on my site&#8230;duh!!!</p>
<p>Anyway, this tip always saves the day, whenever I can remember what the problem is <img src='http://www.geekinator.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I hope it helps anyone else out there in the same boat.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/10/24/a-field-not-saving-in-cakephp-try-clearing-the-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate Multiple Models at same time when using CakePHP Wizard component</title>
		<link>http://www.geekinator.com/2011/10/24/validate-multiple-models-at-same-time-when-using-cakephp-wizard-component/</link>
		<comments>http://www.geekinator.com/2011/10/24/validate-multiple-models-at-same-time-when-using-cakephp-wizard-component/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:25:13 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[wizard]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=175</guid>
		<description><![CDATA[I really like the CakePHP Wizard component, written by Jared Hoyt and can be found at http://bakery.cakephp.org/articles/jaredhoyt/2010/09/10/wizard-component-1-2-tutorial#page-2. It&#8217;s great for creating multi page web forms in CakePHP, but I did run across a little problem (I&#8217;m sure it&#8217;s not a glitch with the component, but just a problem I&#8217;m having with my situation). The problem [...]]]></description>
			<content:encoded><![CDATA[<p>I really like the CakePHP Wizard component, written by Jared Hoyt and can be found at<br />
<a href="http://bakery.cakephp.org/articles/jaredhoyt/2010/09/10/wizard-component-1-2-tutorial#page-2" target="_blank">http://bakery.cakephp.org/articles/jaredhoyt/2010/09/10/wizard-component-1-2-tutorial#page-2</a>.<br />
It&#8217;s great for creating multi page web forms in CakePHP, but I did run across a little problem (I&#8217;m sure it&#8217;s not a glitch with the component, but just a problem I&#8217;m having with my situation). The problem I ran across is when a single page in the form contains fields from multiple models, validation errors are not shown for every model, but only one at a time. </p>
<p>For example, if page 1 of the form (or any page for that matter) contains fields for the Person model AND the Address model, and the &#8220;Person&#8221; fields come before the &#8220;Address&#8221; fields, when the form is submitted, all of the validation rules must pass on the Person model before the validation is run on the Address model. The problem with this, is the only validation errors that are shown will be the Person model errors, until those validation rules pass.</p>
<p>Fortunately, I found a very easy fix for this problem at<br />
<a href="http://cobaia.net/2011/01/cakephp-one-form-with-multiple-model-validate-and-form-display-errors/" target="_blank">http://cobaia.net/2011/01/cakephp-one-form-with-multiple-model-validate-and-form-display-errors/</a><br />
It wasn&#8217;t necessarily pertaining to the Wizard component, but it works just the same.</p>
<p>All you need to do, is inside the process methods for each step, before the $this->Model->validates() checks, add this little snippet of code (change the word Model to the name of your particular controller&#8217;s model &#8212; In my case, my form is processed inside a controller called &#8220;Applications&#8221; and it has a model called &#8220;Application&#8221; which I use to store basic information about the submitted form&#8230;I then house various other pieces of data from the form inside associated tables (models)):</p>
<div class="dirtycodenoclick"><code><br />
 if(!empty($this-&gt;data)){<br />
&nbsp;&nbsp; $this-&gt;Model-&gt;saveAll($this-&gt;data, array(&#039;validate&#039; =&gt; &#039;only&#039;));<br />
&nbsp;&nbsp; $this-&gt;set(&#039;errors&#039;, $this-&gt;Model-&gt;validationErrors);<br />
 }else{<br />
&nbsp;&nbsp; $this-&gt;set(&#039;errors&#039;,array());<br />
 }<br />
</code></div>
<p>If you need to see this in context, here is the entire process method for one of my form pages:</p>
<div class="dirtycodenoclick"><code><br />
function _processPage1() {<br />
&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;Application-&gt;set($this-&gt;data);<br />
	 $this-&gt;Application-&gt;Person-&gt;set($this-&gt;data);<br />
	 $this-&gt;Application-&gt;Address-&gt;set($this-&gt;data);</p>
<p>	 if(!empty($this-&gt;data)){<br />
	&nbsp;&nbsp; $this-&gt;Application-&gt;saveAll($this-&gt;data, array(&#039;validate&#039; =&gt; &#039;only&#039;));<br />
	&nbsp;&nbsp; $this-&gt;set(&#039;errors&#039;, $this-&gt;Application-&gt;validationErrors);<br />
	 }else{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;set(&#039;errors&#039;,array());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>	 if($this-&gt;Application-&gt;Person-&gt;validates() &amp;&amp; $this-&gt;Application-&gt;Address-&gt;validates()) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; return false;<br />
&nbsp;&nbsp; }<br />
</code></div>
<p>Of course, I&#8217;ve simplified my process method quite a bit, but it would be a functional method if your controller&#8217;s model was called Application and your form had fields from both a Person model and Address model.</p>
<p>The line that sets the errors variable is optional. I like to display all of the errors at the top of the page, as well as below the invalid field.</p>
<p>I hope that helps others who are having the same issue as I did!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/10/24/validate-multiple-models-at-same-time-when-using-cakephp-wizard-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A couple things missing from iOS 5 on older devices</title>
		<link>http://www.geekinator.com/2011/10/14/a-couple-things-missing-from-ios-5-on-non-iphone-4s-devices/</link>
		<comments>http://www.geekinator.com/2011/10/14/a-couple-things-missing-from-ios-5-on-non-iphone-4s-devices/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 18:10:18 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Phones]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ios 5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone 4s]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/2011/10/14/a-couple-things-missing-from-ios-5-on-non-iphone-4s-devices/</guid>
		<description><![CDATA[I downloaded the new iOS 5 to my iPhone 3GS and my iPad 2 the minute is was released, amd I have to say, so far I&#8217;m loving the new features. However, there are a couple of features missing, that are apparently only available on the new iPhone 4S, that I wish Apple had enabled [...]]]></description>
			<content:encoded><![CDATA[<p>I downloaded the new iOS 5 to my iPhone 3GS and my iPad 2 the minute is was released, amd I have to say, so far I&#8217;m loving the new features.</p>
<p>However, there are a couple of features missing, that are apparently only available on the new iPhone 4S, that I wish Apple had enabled on other iOS 5 devices.</p>
<p>The first missing feature is Voice Control, which is powered by the Siri technology that Apple purchased. I&#8217;ve seen the demos online and I would love to have that functionality on my 3GS, but no luck&#8230;that is a selling point for the new 4S <img src='http://www.geekinator.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</p>
<p>The next missing feature is Geofence Reminders (lets you setup a reminder that will be displayed once you&#8217;re within range of a particular location&#8230;way cool!)&#8230;which is something that could probably easily be enabled on non 4S devices, but those of us that aren&#8217;t using the 4S are out of luck.</p>
<p>I&#8217;m not bitter about the features not being enabled on my devices, because I understand business, but it would sure be cool to have them without upgrading.</p>
<p>With that being said, anyone using an iOS compatible device can now enjoy 200+ new features, FOR FREE! That&#8217;s pretty cool in my book. Yes, I will probably never use most of the new features, but some of them are very handy.</p>
<p>One of the very handy features, is the wireless syncing over Wi-Fi. I don&#8217;t know about you, but I rarely sync my devices, and when I do it usually takes a while. Well, now all I have to do is plug my device in to charge, and as long as I&#8217;m connected to my wireless network, all my data is automatically synced&#8230;without me having to do a thing other than charge my device!</p>
<p>I won&#8217;t go into any other features at this time, because there are tons of posts out there detailing every last one of them, but these couple of things were on my mind.</p>
<p>If you haven&#8217;t yet downloaded iOS 5&#8242; I&#8217;d certainly recommend trying it out. Just remember to backup your data first <img src='http://www.geekinator.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/10/14/a-couple-things-missing-from-ios-5-on-non-iphone-4s-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Populate State List on Country Select in CakePHP using jQuery</title>
		<link>http://www.geekinator.com/2011/03/25/populate-state-list-on-country-select-in-cakephp-using-jquery/</link>
		<comments>http://www.geekinator.com/2011/03/25/populate-state-list-on-country-select-in-cakephp-using-jquery/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 19:28:45 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery cookie]]></category>
		<category><![CDATA[state dropdown list]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=153</guid>
		<description><![CDATA[This has been shown on many sites, but it took the combination of several articles for me to figure this one out&#8230;maybe it&#8217;s just me, dunno. Also, it drove me nuts how the states list would disappear if the page was refreshed. I learned how to handle that as well, using jQuery cookies. By the [...]]]></description>
			<content:encoded><![CDATA[<p>This has been shown on many sites, but it took the combination of several articles for me to figure this one out&#8230;maybe it&#8217;s just me, dunno.</p>
<p>Also, it drove me nuts how the states list would disappear if the page was refreshed. I learned how to handle that as well, using jQuery cookies.</p>
<p>By the way, here&#8217;s the versions of cakephp, jquery and plugins I am using:</p>
<p>CakePHP version 1.3.7<br />
jQuery version 1.5 (I just used the minified version, not that is should matter)<br />
jQuery cookie plugin version 1.0</p>
<p>Not that it matters at all, but for those who may have problems and are wondering what database I&#8217;m running, it&#8217;s MySQL version 5.1.41 (at least that&#8217;s the client I&#8217;m running&#8230;the server number may or may not be different). I am testing this using XAMPP 1.7.3 for Windows in Windows 7.</p>
<p>Here&#8217;s the steps:</p>
<p>***********************<br />
STEP 1<br />
***********************<br />
Add the following to your view file (whatever file contains the form that houses country and state select fields):</p>
<div class="dirtycodenoclick"><code><br />
&lt;?php<br />
echo $this-&gt;Form-&gt;input(&#039;country_id&#039;,array(&#039;id&#039; =&gt; &#039;country_id&#039;,&#039;label&#039; =&gt; &#039;Country&#039;,&#039;error&#039; =&gt; false,&#039;empty&#039; =&gt; false));<br />
<br />echo $this-&gt;Form-&gt;input(&#039;state_id&#039;,array(&#039;id&#039; =&gt; &#039;state&#039;,&#039;label&#039; =&gt; &#039;State/Province&#039;,&#039;error&#039; =&gt; false,&#039;empty&#039; =&gt; &#039;Select Country First&#039;));<br />
?&gt;<br />
</code></div>
<p>***********************<br />
STEP 2<br />
***********************<br />
Create a model file for country and one for state:</p>
<p>&#8212; /app/models/country.php &#8212;</p>
<div class="dirtycodenoclick"><code><br />
&lt;?php<br />
# /app/models/country.php<br />
class Country extends AppModel {<br />
var $name = &#039;Country&#039;;<br />
var $hasMany = array(&#039;NameOfYourControllerModelGoesHere&#039;);<br />
}<br />
?&gt;<br />
</code></div>
<p>&#8212; /app/models/state.php &#8212;</p>
<div class="dirtycodenoclick"><code><br />
&lt;?php<br />
# /app/models/state.php<br />
class State extends AppModel {<br />
var $name = &#039;State&#039;;<br />
var $hasMany = array(&#039;NameOfYourControllerModelGoesHere&#039;);<br />
}<br />
?&gt;<br />
</code></div>
<p>***********************<br />
STEP 3<br />
***********************<br />
Add the following action to your controller.php file (whichever controller file you are using to control the form)</p>
<div class="dirtycodenoclick"><code><br />
function get_states($country_id = null){<br />
$this-&gt;layout = &#039;ajax&#039;;<br />
$this-&gt;set(&#039;states&#039;,$this-&gt;NameOfYourControllerModelGoesHere-&gt;State-&gt;find(&#039;list&#039;,array(&#039;conditions&#039;=&gt;array(&#039;State.country_id&#039; =&gt; $country_id))));<br />
}<br />
</code></div>
<p>***********************<br />
STEP 4<br />
***********************<br />
Create a view file for the action you just created, inside /app/views/NameOfYourControllerGoesHere/get_states.ctp</p>
<p>then, add the following to that file:</p>
<div class="dirtycodenoclick"><code><br />
&lt;?php<br />
# /app/views/NameOfYourControllerGoesHere/get_states.ctp<br />
?&gt;<br />
&lt;option&gt;Select a State/Province&lt;/option&gt;<br />
&lt;?php<br />
foreach($states as $stateId=&gt;$stateName){<br />
echo &#039;<br />
&lt;option value=&quot;&#039;.$stateId.&#039;&quot;&gt;&#039;.$stateName.&#039;&lt;/option&gt;&#039;.&quot;\n&quot;;<br />
}<br />
?&gt;<br />
</code></div>
<p>***********************<br />
STEP 5<br />
***********************<br />
Download the jQuery cookie plugin from</p>
<p>http://plugins.jquery.com/files/jquery.cookie.js.txt</p>
<p>copy the contents of jquery.cookie.js.txt into /app/webroot/js/jquery.cookie.js</p>
<p>***********************<br />
STEP 6<br />
***********************<br />
If you don&#8217;t already have jQuery installed, you can download the latest version by going to www.jquery.com and click the download button (I&#8217;m using version 1.5, but I would imagine this code will still work with future versions)</p>
<p>Once you have both jQuery and jQuery cookie plugin installed, add this to the view file containing your form:</p>
<div class="dirtycodenoclick"><code><br />
&lt;?php<br />
echo $this-&gt;Html-&gt;script(&#039;jquery&#039;, false);<br />
echo $this-&gt;Html-&gt;script(&#039;jquery.cookie&#039;,false);<br />
?&gt;<br />
</code></div>
<p>***********************<br />
STEP 7<br />
***********************<br />
Add the following to either your layout file or to the view file that contains your form:</p>
<div class="dirtycodenoclick"><code><br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
$(document).ready(function() {<br />
if($.cookie(&quot;selectedCountry&quot;) == null){<br />
&nbsp;&nbsp;/* default to United States */<br />
$(&quot;#country_id&quot;).val( 1 ).attr(&#039;selected&#039;,true);<br />
 $(&#039;#state&#039;).load(&#039;NameOfYourControllerGoesHere/get_states/1&#039;);<br />
}else{<br />
&nbsp;&nbsp; $(&quot;#country_id&quot;).val( $.cookie(&quot;selectedCountry&quot;) ).attr(&#039;selected&#039;,true);<br />
&nbsp;&nbsp; $(&#039;#state&#039;).load(&#039;NameOfYourControllerGoesHere/get_states/&#039;+$.cookie(&quot;selectedCountry&quot;));<br />
}<br />
<br /> $(&#039;#country_id&#039;).change(function() {<br />
&nbsp;&nbsp;/* load last selected country using a cookie, in case page was refreshed&#46;..this also makes sure the state dropdown is populated with the last selected country&#039;s states/provinces */<br />
 var country_data = $(this).val();<br />
 $.cookie(&quot;selectedCountry&quot;, country_data);<br />
 var country_select = $.cookie(&quot;selectedCountry&quot;);<br />
<br />&nbsp;&nbsp; $(&#039;#state&#039;).load(&#039;NameOfYourControllerGoesHere/get_states/&#039;+$(this).val());<br />
 });<br />
});<br />
&lt;/script&gt;<br />
</code></div>
<p>Obviosuly, you need to have countries and states inserted into the appropriate tables in your database for this to work. Here&#8217;s the structure I used for my tables:</p>
<p>&#8212; For countries Table &#8212;<br />
id int(11) auto_increment primary_key,<br />
name varchar(50)</p>
<p>&#8212; For states Table &#8212;<br />
id int(11) auto_increment primary_key,<br />
country_id int(11),<br />
name varchar(50)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
If I missed something, please send me a comment and I&#8217;ll be happy to fix it. If you have any problems, let me know and I&#8217;ll try to help the best I can.</p>
<p>Thanks for reading</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/03/25/populate-state-list-on-country-select-in-cakephp-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save output of print_r to variable instead of displaying it</title>
		<link>http://www.geekinator.com/2011/01/24/save-output-of-print_r-to-variable-instead-of-displaying-it/</link>
		<comments>http://www.geekinator.com/2011/01/24/save-output-of-print_r-to-variable-instead-of-displaying-it/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 23:36:45 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[print_r]]></category>
		<category><![CDATA[variable]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=151</guid>
		<description><![CDATA[I found this on someone else&#8217;s site (at http://www.electrictoolbox.com/return-information-from-php-print-r/) and thought I&#8217;d share it here as well. Something I&#8217;ve been wondering about for years and never really figured out how to do, was how to save the output of the print_r command to a variable, instead of actually displaying the contents to the screen. As [...]]]></description>
			<content:encoded><![CDATA[<p>I found this on someone else&#8217;s site (at <a href="http://www.electrictoolbox.com/return-information-from-php-print-r/" target="_blank">http://www.electrictoolbox.com/return-information-from-php-print-r/</a>) and thought I&#8217;d share it here as well.</p>
<p>Something I&#8217;ve been wondering about for years and never really figured out how to do, was how to save the output of the print_r command to a variable, instead of actually displaying the contents to the screen.</p>
<p>As it turns out, it&#8217;s extremely easy to do. You simply need to set the output of print_r to a variable, and then add a 2nd parameter to the print_r function, of true. For instance: $my_var = print_r($my_array,true);</p>
<p>Then, instead of actually displaying the contents of the array, your nicely formatted array output is saved to the variable $my_var, to be used however you wish.</p>
<p>In my case, I was wanting to save the output to a text file, for a project I&#8217;m working on, and then use the data inside the array later on in the project&#8230;instead of dealing with the data right away.</p>
<p>Works great, and thanks to the original author for sharing that useful info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2011/01/24/save-output-of-print_r-to-variable-instead-of-displaying-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Look for promo codes first!</title>
		<link>http://www.geekinator.com/2010/12/08/look-for-promo-codes-first/</link>
		<comments>http://www.geekinator.com/2010/12/08/look-for-promo-codes-first/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 01:48:52 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Websites]]></category>
		<category><![CDATA[promo code]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=146</guid>
		<description><![CDATA[Here&#8217;s a quick tip on how to possibly save some money next time you&#8217;re doing some online shopping. Before you checkout and pay for your purchase, spend a few minutes and do a quick search online to see if there are any coupons or promotional (promo) codes available for the particular website you&#8217;re shopping on. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick tip on how to possibly save some money next time you&#8217;re doing some online shopping.</p>
<p>Before you checkout and pay for your purchase, spend a few minutes and do a quick search online to see if there are any coupons or promotional (promo) codes available for the particular website you&#8217;re shopping on.</p>
<p>You&#8217;d be surprised at how many codes are out there that can save you 10% or 20% on your order. Sometimes you have to dig a little to find the coupon that will work for the items you&#8217;re purchasing (some promo codes will only apply to certain products), but it&#8217;s definitely worth your time.</p>
<p>Another thing you can do to save a little money (and sometimes a lot of money!) is instead of heading to the manufacturer&#8217;s website to buy their product, do a search online to find other resellers that may be offering the product at discounted prices. For example, I just ordered an <a href="http://www.amazon.com/gp/product/B001FVPU9O/ref=oss_product" target="_blank">OtterBox Defender Case for an iPhone 3GS</a> from Amazon.com for a measly $16.16, including shipping. The same exact case, direct from the OtterBox website costs $49.95! I saved $33.79 just by spending 30 seconds to search google for resellers.</p>
<p>If this information even helps one person out, I&#8217;ve done my job! You&#8217;d be surprised how many people don&#8217;t think to try finding a discount, either because they&#8217;re lazy (we&#8217;ve all been there I&#8217;m sure) or they simply didn&#8217;t know they could.</p>
<p>Now you know&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2010/12/08/look-for-promo-codes-first/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solar Water Heater &#8211; Heat (or Cool) your house for $3 per month</title>
		<link>http://www.geekinator.com/2010/12/03/solar-water-heater-heat-or-cool-your-house-for-3-dollars-per-month/</link>
		<comments>http://www.geekinator.com/2010/12/03/solar-water-heater-heat-or-cool-your-house-for-3-dollars-per-month/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 04:13:07 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Environment]]></category>
		<category><![CDATA[Home Projects]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[solar water heater]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=131</guid>
		<description><![CDATA[My dad has been a mechanical engineer his entire life, and while I am mostly a complete opposite from him in the way I think I am in awe of most of the things he comes up with. His latest project has been heating (or cooling) his entire house, using nothing but 1,300 gallons of [...]]]></description>
			<content:encoded><![CDATA[<p>My dad has been a mechanical engineer his entire life, and while I am mostly a complete opposite from him in the way I think I am in awe of most of the things he comes up with. His latest project has been heating (or cooling) his entire house, using nothing but 1,300 gallons of water, 4 solar water panels, a commercial grade water pump, and 3 computer fans. It sounds a bit strange at first, but once you understand how it works, it&#8217;s genius. While he didn&#8217;t come up with the idea (obviously, the solar water panels have existed for a long time), how he built it and the fact he did it all himself is really neat.</p>
<p>He has been running a large part of his house on solar electric for a few years now, and a couple of years ago he heard about solar water heating. At first, I thought he was talking about a water heater, like you use to heat your shower water, but I was entirely wrong. What he was talking about was using special solar panels, that instead using the sun to generate an electrical current, use the sun to heat black sheets of metal inside the panel, which in turn heat your water. The other end of the equation is storing enough water, so the heat doesn&#8217;t dissipate too quickly. </p>
<p>To do this, he bought 5 260 gallon plastic water tanks from a local distributor, connected them all together, and placed them along side his house. He then built a heat box around the tanks, using insulation to keep the heat inside the box as long as possible. Next, he connected the solar heat panels to the tank closest to the panels using a insulated hose, which he then ran underground to the tank, to provide additional insulation as well as keep it out of the way. Connected between the solar heat panels and the water tanks is a commercial grade water pump, which continuously circulates water between the panels and the tanks. Interestingly enough, the pump costs very little money to run, even though it&#8217;s running all the time. Due to the amount of water being stored (1,300 gallons), the water stays nice and warm throughout the day, while the sun is out anyway, and cools down throughout the night. You may then ask how does the heat get into his house? He cut 3 holes in the wall that the water tanks are on, and installed 1 small computer fan in each of the holes, which he controls via a toggle switch inside the house. The only thing he continually pays for is the electricity to power the fans, which then pump the warm air into his house during the winter. While the tank temperature can reach 128 degrees or so during the day, the temperature inside his house is usually in the mid 70&#8242;s, so now, even if the temperature outside is 28 degrees, his house can be a nice 72 degrees. It costs around $3 per month total to heat his house. He can also power the fans and water pump using his solar panels, so it would be no cost to run.</p>
<p>Today, he decided to add something to the tanks, to keep the heat in longer. It turns out, it&#8217;s easy to do that using lead to line the tops of the tanks. So, we set out to buy as much lead as we could. We finally found 800 pounds of all kinds of small pieces of lead, which work great for packing together. So, the next step in this project is placing a bunch of lead on top of the tanks, which will heat the lead up, and the idea is the heat will dissipate from the lead much slower than directly from the tanks, keeping the heat in the tanks longer.</p>
<p>The same setup can also cool his house during the summer. All he does then, is disconnect the solar panels from the water tanks, and the cool water inside the tanks (which cool down even more throughout the night), provide cool air to pump into his house.</p>
<p>While all of the solar heat panels and the water tanks cost around $2,500 for used equipment, he&#8217;s already saved enough money to pay for the project by not paying heating or gas bills. It&#8217;s already paying for itself, that&#8217;s what so awesome.</p>
<p>I&#8217;m not an engineer by any means, so if this article is confusing or you&#8217;d like some more information, please feel free to contact me (<a href="http://www.geekinator.com/email-me/">click here</a>) and I&#8217;ll pass it onto my dad. He&#8217;d love to share his ideas. Obviously, I didn&#8217;t provide any technical details, but my hopes are to strike an interest any anyone who might be thinking of taking on such a project, or didn&#8217;t even know this existed, and would love to save a lot of money on heating and/or cooling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2010/12/03/solar-water-heater-heat-or-cool-your-house-for-3-dollars-per-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Captcha I&#8217;ve Seen Yet!</title>
		<link>http://www.geekinator.com/2010/08/30/best-captcha-ive-seen-yet/</link>
		<comments>http://www.geekinator.com/2010/08/30/best-captcha-ive-seen-yet/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 21:06:18 +0000</pubDate>
		<dc:creator>geekinator</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[sexy captcha]]></category>

		<guid isPermaLink="false">http://www.geekinator.com/?p=112</guid>
		<description><![CDATA[I&#8217;m pretty sure I&#8217;m speaking for everyone when I say captcha is usually really annoying and frustrating on most sites. I consider myself to be pretty intelligent and savvy but I have a terrible time trying to figure out what they&#8217;re saying most of the time, unless it&#8217;s a simple math problem or there&#8217;s no [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pretty sure I&#8217;m speaking for everyone when I say <a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank">captcha</a> is usually really annoying and frustrating on most sites. I consider myself to be pretty intelligent and savvy but I have a terrible time trying to figure out what they&#8217;re saying most of the time, unless it&#8217;s a simple math problem or there&#8217;s no noise added to the captcha image.</p>
<p>While the simple math problems or basic logic questions work, they still make you type something in, and I&#8217;m a big fan of &#8220;the less steps it involves, the better&#8221;. I&#8217;ve been trying to find something that not only keeps most of the spam bots from filling out my forms but is super easy for visitors to use so that it won&#8217;t scare them away.</p>
<p>Well, I found such a solution a couple of days ago, called SexyCaptcha. You can download it and try it out for yourself at <a href="http://blog.lukeblackamore.com/2009/10/sexy-captcha-new-drag-and-drop-captcha.html" target="_blank">http://blog.lukeblackamore.com/2009/10/sexy-captcha-new-drag-and-drop-captcha.html</a>. What it does is display four simple shapes, and an outline of one of those shapes. All the user has to do is click or drag the appropriate shape into the shape outline, and voila&#8230;the captcha is passed!<br />
<a href="http://www.geekinator.com/wp-content/uploads/2010/08/sexy-captcha.png"><img src="http://www.geekinator.com/wp-content/uploads/2010/08/sexy-captcha.png" alt="sexy captcha" title="sexy-captcha" width="437" height="116" class="alignnone size-full wp-image-116" /></a></p>
<p>How simple and creative is that?!? The only downside that I see is if you want to display it any smaller than 433 pixels wide, you&#8217;re going to have to shrink the images and mess with the css but it&#8217;s not that big a deal. I think I&#8217;ll be using this on my future projects for sure, until I find something better and/or easier, and I don&#8217;t see that happening anytime soon!</p>
<p>It took me a while to adapt it to my <a href="http://cakephp.org" target="_blank">cakephp</a> projects (only because I was missing some typos&#8230;typical lol), but was able to do so and it works perfectly. If you&#8217;re looking for a super easy captcha that still performs the same security as one someone has to type in, then give SexyCaptcha a try. I don&#8217;t think you&#8217;ll be disappointed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekinator.com/2010/08/30/best-captcha-ive-seen-yet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

