<?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>Nick Bartlett</title>
	<atom:link href="http://nickbartlett.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://nickbartlett.com/wordpress</link>
	<description>PHP Developer in Minnesota</description>
	<lastBuildDate>Sat, 04 Feb 2012 23:19:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Magento cannot log into admin locally</title>
		<link>http://nickbartlett.com/wordpress/magento-cannot-log-into-admin-locally/</link>
		<comments>http://nickbartlett.com/wordpress/magento-cannot-log-into-admin-locally/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 23:19:39 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=910</guid>
		<description><![CDATA[I manually installed an existing live site locally on my computer and was unable to log into the admin backend. when I would click the login button, I wouldn&#8217;t get ...]]></description>
			<content:encoded><![CDATA[<p>I manually installed an existing live site locally on my computer and was unable to log into the admin backend.  when I would click the login button, I wouldn&#8217;t get an &#8220;invalid login&#8221; message or anything b/c it was correct.  The URL would change to admin/index/index/key/xxxx and would just display the login form again. </p>
<p>I worked at it for hours and tried all the code changes in the Session object to no avail.  I finally installed a fresh copy of magento locally and used their installer and I was able to log in.  I noticed it was using the file system for sessions while the other existing site was using the database because it was being load balanced.  I changed it to use the filesystem and that fixed the problem!  Hope this will save somebody the many hours I spent on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/magento-cannot-log-into-admin-locally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio Magento Building Workspace Error</title>
		<link>http://nickbartlett.com/wordpress/zend-studio-magento-building-workspace-error/</link>
		<comments>http://nickbartlett.com/wordpress/zend-studio-magento-building-workspace-error/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 22:15:45 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Zend Studio]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=907</guid>
		<description><![CDATA[I encountered a very large project involving Magento and added it as a project to my zend studio. Zend studio would frequently hang with an error related to building workspace. ...]]></description>
			<content:encoded><![CDATA[<p>I encountered a very large project involving Magento and added it as a project to my zend studio.  Zend studio would frequently hang with an error related to building workspace.  As I suspected, the problem was related to running out of memory as this project is huge.  I increased the memory available to Zend Studio with the below solution.   </p>
<p>In the Zend Studio interface it is possible to monitor how much Java heap space is used by the application. To do so, enable the option Show heap status in the Zend Studio Preferences by going to  Window | Preferences | General (in MacOS X go to Zend Studio | Preferences | General). The heap status now appears in the application&#8217;s status bar. If you see that you quickly run out of memory (for example during a project build) you should consider increasing the default Java heap size. This can be done in the file ZendStudio.ini located in the Zend Studio installation path. Search for the –Xms and –Xmx parameters:</p>
<p>    Xms &#8211; The initial amount of memory to allocate for Java heap space.<br />
    Xmx &#8211; The maximal amount of memory that is allowed to be used for Java heap space.</p>
<p>These values can be increased, but be aware that you are limited by the physical RAM of the system. Even for very complicated projects 512M Xms and 1024M Xmx should be enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/zend-studio-magento-building-workspace-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TortoiseGit Setup Tutorial With GitHub</title>
		<link>http://nickbartlett.com/wordpress/tortoisegit-setup-tutorial-with-github/</link>
		<comments>http://nickbartlett.com/wordpress/tortoisegit-setup-tutorial-with-github/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 16:43:04 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=903</guid>
		<description><![CDATA[I&#8217;ve been using TortoiseSVN for years and thought installing and using TortoiseGit would be just as easy, but it wasn&#8217;t. The TortoiseGit website&#8217;s documentation and setup tutorial was very poor. ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using TortoiseSVN for years and thought installing and using TortoiseGit would be just as easy, but it wasn&#8217;t.  The TortoiseGit website&#8217;s documentation and setup tutorial was very poor.  I found this website as the best resource for getting TortoiseGit installed on your computer and working with your first repository on GitHub <a href="http://www.sparkfun.com/tutorials/165">http://www.sparkfun.com/tutorials/165</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/tortoisegit-setup-tutorial-with-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using recaptcha with Zend_Form</title>
		<link>http://nickbartlett.com/wordpress/using-recaptcha-with-zend_form/</link>
		<comments>http://nickbartlett.com/wordpress/using-recaptcha-with-zend_form/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 19:31:38 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=899</guid>
		<description><![CDATA[I was pleasantly surprised at how simple it was to integrate a good captcha solution with Zend_Form. Your form doesn&#8217;t have to extended a special object or anything; you just ...]]></description>
			<content:encoded><![CDATA[<p>I was pleasantly surprised at how simple it was to integrate a good captcha solution with Zend_Form.  Your form doesn&#8217;t have to extended a special object or anything; you just need to add a &#8220;captcha&#8221; element like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'captcha'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'captcha'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Please Type:'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'required'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'captcha'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'pubkey'</span> <span style="color: #339933;">=&gt;</span> RECAPTCHA_PUBLIC_KEY<span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'privkey'</span> <span style="color: #339933;">=&gt;</span> RECAPTCHA_PRIVATE_KEY<span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'captcha'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'reCaptcha'</span>
	<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Be sure to change or set the defined variables for public and private keys provided to you with your recaptcha account.  You don&#8217;t have to do anything to validate if the user entered the correct letters in your controller as Zend has already taken care of that part for you.  As long as you&#8217;re using Zend&#8217;s isValid() method like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isValid</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$request</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPost</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: #009900;">&#123;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/using-recaptcha-with-zend_form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows 7 command line switch drives</title>
		<link>http://nickbartlett.com/wordpress/windows-7-command-line-switch-drives/</link>
		<comments>http://nickbartlett.com/wordpress/windows-7-command-line-switch-drives/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 17:38:22 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=897</guid>
		<description><![CDATA[In command prompt we can switch from one drive to another drive by just typing the drive letter name suffixed with the character ‘:’ For example if you are working ...]]></description>
			<content:encoded><![CDATA[<p>In command prompt we can switch from one drive to another drive by just typing the drive letter name suffixed with the character ‘:’</p>
<p>For example if you are working in C: drive and if you want to switch to E: drive just type ‘E:’ at command prompt and press ‘Enter‘.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/windows-7-command-line-switch-drives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to import a delimited file with mysql</title>
		<link>http://nickbartlett.com/wordpress/how-to-import-a-delimited-file-with-mysql/</link>
		<comments>http://nickbartlett.com/wordpress/how-to-import-a-delimited-file-with-mysql/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 14:02:54 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=893</guid>
		<description><![CDATA[Using Mac OS X on the command line, log into mysql and select your database. Then run the following for a tab delimited file located on your desktop: load data ...]]></description>
			<content:encoded><![CDATA[<p>Using Mac OS X on the command line, log into mysql and select your database.  Then run the following for a tab delimited file located on your desktop:</p>
<p>load data LOCAL infile &#8216;/Users/YOURNAME/Desktop/standards.txt&#8217; into table TABLE_NAME fields terminated by &#8220;\t&#8221; lines terminated by &#8220;\r&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/how-to-import-a-delimited-file-with-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloning an array with JavaScript</title>
		<link>http://nickbartlett.com/wordpress/cloning-an-array-with-javascript/</link>
		<comments>http://nickbartlett.com/wordpress/cloning-an-array-with-javascript/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 14:06:44 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=887</guid>
		<description><![CDATA[I had a need to clone an array with JavaScript. There appears to be a number of different ways to do it, including writing your own function. All of these ...]]></description>
			<content:encoded><![CDATA[<p>I had a need to clone an array with JavaScript.  There appears to be a number of different ways to do it, including writing your own function.  All of these solutions below will just create a reference to the original array:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> newArray <span style="color: #339933;">=</span> myArray.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> newArray <span style="color: #339933;">=</span> myArray.<span style="color: #660066;">concat</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> newArray <span style="color: #339933;">=</span> clone<span style="color: #009900;">&#40;</span>myArray<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>A popular answer using jQuery is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> newArray <span style="color: #339933;">=</span> jQuery.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> myArray<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>However, this solution will return an object and you cannot get the length of an object like you can an array.  </p>
<p>To return an array, we change the curly braces to square brackets like so:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> newArray <span style="color: #339933;">=</span> jQuery.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> myArray<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This is the solution that works.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/cloning-an-array-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and Web Development Tutor in Minneapolis Minnesota</title>
		<link>http://nickbartlett.com/wordpress/php-and-web-development-tutor-in-minneapolis-minnesota/</link>
		<comments>http://nickbartlett.com/wordpress/php-and-web-development-tutor-in-minneapolis-minnesota/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 19:10:45 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=881</guid>
		<description><![CDATA[I have a bachelor&#8217;s in Management Information Systems and have been a full time professional web developer since 2004. I have experience leading a team of web developer&#8217;s with a ...]]></description>
			<content:encoded><![CDATA[<p>I have a bachelor&#8217;s in Management Information Systems and have been a full time professional web developer since 2004. I have experience leading a team of web developer&#8217;s with a focus on creating a learning environment. Through my years of web development I&#8217;ve accumulated a variety of related skills including html, css, javascript, xml, seo, php, and sql to name a few.</p>
<p>Previously in my career I built a successful ecommerce business and grew it for over five years, then sold it in 2011. I have first hand knowledge of all areas of running an online business from sourcing a distributor / drop shipper, coding the website, search engine optimization, online marketing and advertising, payment and checkout, and customer retainment.</p>
<p>New to web development? I&#8217;ll show you the basics from first principles. Need help with a programming class? We&#8217;ll work through your assignments, the book problems and exercises and I&#8217;ll fill in all the gaps your professor didn&#8217;t. Want to make the leap from book exercises to making a great looking website following best practices? It&#8217;s a big one, and together we can do it.</p>
<p>I would love to work with you and help you in any way I can, and I look forward to hearing from you!  Please <a href="http://nickbartlett.com/wordpress/contact/">contact me</a> to set something up.  I can do remote tutoring over skype if you&#8217;d like.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/php-and-web-development-tutor-in-minneapolis-minnesota/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use date on google scatter chart</title>
		<link>http://nickbartlett.com/wordpress/how-to-use-date-on-google-scatter-chart/</link>
		<comments>http://nickbartlett.com/wordpress/how-to-use-date-on-google-scatter-chart/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 16:24:23 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[google charts]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=875</guid>
		<description><![CDATA[The google visualization api limits you to using numeric values for both the X and Y axis, but there is a trick you can do with the google image chart ...]]></description>
			<content:encoded><![CDATA[<p>The google visualization api limits you to using numeric values for both the X and Y axis, but there is a trick you can do with the google image chart api to covert the value to a date as below. Use JavaScript&#8217;s Date() object for the conversion.  It would be nice if we could just specify the column as a string like  data.addColumn(&#8216;string&#8217;, &#8216;Date&#8217;), but the chart still will not accept the string.  It will accept a date object though.  The next task is to format the date string, it appears google accounts for with the google.visualization.DateFormat method, but it does not work.  In the end, I had to accept the formatting provided by the chart of &#8220;15 Nov 2011&#8243; as the format for a &#8220;datetime&#8221; column, which looked better than the format displayed for a &#8220;date&#8221; column.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">visualization</span>.<span style="color: #660066;">DataTable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    data.<span style="color: #660066;">addColumn</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'datetime'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Date'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    data.<span style="color: #660066;">addColumn</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'number'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Quantity'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">15</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">12</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">18</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">17</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">19</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">6</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">7</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">18</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">8</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">24</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">9</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">28</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">27</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    data.<span style="color: #660066;">addRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2011</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">11</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">34</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
&nbsp;
&nbsp;
    <span style="color: #006600; font-style: italic;">// Create and draw the visualization.</span>
    <span style="color: #003366; font-weight: bold;">var</span> chart <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">visualization</span>.<span style="color: #660066;">ScatterChart</span><span style="color: #009900;">&#40;</span>
        document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'chart'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    chart.<span style="color: #660066;">draw</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Test'</span><span style="color: #339933;">,</span>
                      width<span style="color: #339933;">:</span> <span style="color: #CC0000;">600</span><span style="color: #339933;">,</span> height<span style="color: #339933;">:</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">,</span>
                      vAxis<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;cr&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                      hAxis<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;time&quot;</span><span style="color: #009900;">&#125;</span>
                      <span style="color: #009900;">&#125;</span>
              <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/how-to-use-date-on-google-scatter-chart/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reset button doesn&#8217;t work on selected=&#8221;selected&#8221; form element</title>
		<link>http://nickbartlett.com/wordpress/reset-button-doesnt-work-on-selectedselected-form-element/</link>
		<comments>http://nickbartlett.com/wordpress/reset-button-doesnt-work-on-selectedselected-form-element/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 15:49:14 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://nickbartlett.com/wordpress/?p=872</guid>
		<description><![CDATA[Using Zend_Form, it generated a select element where the selection option had an attribute of selected=&#8221;selected&#8221; instead of just adding &#8220;selected&#8221; to the element. The form&#8217;s reset button no longer ...]]></description>
			<content:encoded><![CDATA[<p>Using Zend_Form, it generated a select element where the selection option had an attribute of selected=&#8221;selected&#8221; instead of just adding &#8220;selected&#8221; to the element.  The form&#8217;s reset button no longer works on this element.  Because it&#8217;s being generated, I can&#8217;t simply change how the attribute is specified in the element, so I used some JavaScript to reset all the form elements when a reset button is clicked.  If you have multiple forms and multiple reset buttons, then you&#8217;ll need to modify this to point at a specific form&#8217;s elements rather than all on a page.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input:reset&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>click<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	 event<span style="color: #339933;">.</span>preventDefault<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Whitelist of fields to minimize unintended side effects.</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':text, :password, :file, SELECT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'form'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>val<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// De-select any checkboxes, radios and drop-down menus</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':input'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>removeAttr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'checked'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>removeAttr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'selected'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;select&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>find<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'option'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>removeAttr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;selected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://nickbartlett.com/wordpress/reset-button-doesnt-work-on-selectedselected-form-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.526 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-04 18:53:47 -->

