<?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>Vance Lucas &#187; General</title>
	<atom:link href="http://www.vancelucas.com/blog/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vancelucas.com</link>
	<description>Web Entrepreneur and Freelance PHP/Javascript Developer</description>
	<lastBuildDate>Thu, 17 Nov 2011 15:30:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Count the Number of Object keys/properties in Node.js</title>
		<link>http://www.vancelucas.com/blog/count-the-number-of-object-keysproperties-in-node-js/</link>
		<comments>http://www.vancelucas.com/blog/count-the-number-of-object-keysproperties-in-node-js/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 17:26:25 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=768</guid>
		<description><![CDATA[When using the excellent formidable library to handle file uploads, I needed to get a count of the number of files unloaded in a multi-part form. Javascript arrays have a .length property that you can use, but objects do not. I instinctively typed: 1 files.length Which returned undefined. So if there is no length property present, an [...]]]></description>
			<content:encoded><![CDATA[<p>When using the excellent <a href="https://github.com/felixge/node-formidable">formidable</a> library to handle file uploads, I needed to get a count of the number of files unloaded in a multi-part form. Javascript arrays have a <code>.length</code> property that you can use, but objects do not. I instinctively typed:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">files.length</pre></td></tr></table></div>

<p>Which returned <code>undefined</code>. So if there is no length property present, an easy way to count the number of keys or properties of an object in ES5-compliant javascript environments like <a href="http://nodejs.org">Node.js</a> is to use the Object prototype directly:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">Object.keys(files).length</pre></td></tr></table></div>

<p>A little more typing, but it is fast, efficient, and most importantly: already built-in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/count-the-number-of-object-keysproperties-in-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Self Employed</title>
		<link>http://www.vancelucas.com/blog/self-employed/</link>
		<comments>http://www.vancelucas.com/blog/self-employed/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 15:55:51 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=714</guid>
		<description><![CDATA[This post comes with a bit of a delay, as it is already three months into the year, but as of January 2011, I have been full time self-employed. I made the difficult decision to voluntarily leave an excellent job with Company52 at the beginning of the year to venture out on my own. Running my [...]]]></description>
			<content:encoded><![CDATA[<p>This post comes with a bit of a delay, as it is already three months into the year, but as of January 2011, I have been<span style="color: #ff0000;"> </span>full time self-employed. I made the difficult decision to voluntarily leave an excellent job with <a href="http://company52.com">Company52</a> at the beginning of the year to venture out on my own. Running <a href="http://actridge.com">my own company</a> with full-time focus has always been one of my dreams, and several side projects I have started and been involved with up until now have built up towards that goal.</p>
<p>There is a lot to consider in a decision like this, and I did not weigh it lightly. Somehow after running through all the options, now still seemed like the best time to take the leap. Here&#8217;s to a bright future in 2011 and beyond.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/self-employed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listing Aliases Inside an Android Keystore File With Keytool</title>
		<link>http://www.vancelucas.com/blog/listing-aliases-inside-an-android-keystore-file-with-keytool/</link>
		<comments>http://www.vancelucas.com/blog/listing-aliases-inside-an-android-keystore-file-with-keytool/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 04:00:56 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android sdk]]></category>
		<category><![CDATA[keystore]]></category>
		<category><![CDATA[keystore alias]]></category>
		<category><![CDATA[keytool]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=664</guid>
		<description><![CDATA[If you lose or forget your Android keystore file alias that is used to build APK files for distribution (like I did when trying to package Autoridge Lite for the Android Market), here is a quick and easy way to see them: Open a Terminal Window, Run This Command: 1 keytool -list -keystore /location/of/your/com.example.keystore Make [...]]]></description>
			<content:encoded><![CDATA[<p>If you lose or forget your Android keystore file alias that is used to build APK files for distribution (like I did when trying to package <a href="http://autoridge.com/mobile">Autoridge Lite</a> for the Android Market), here is a quick and easy way to see them:</p>
<ol>
<li>Open a Terminal Window, Run This Command:<br />
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">keytool <span style="color: #660033;">-list</span> <span style="color: #660033;">-keystore</span> <span style="color: #000000; font-weight: bold;">/</span>location<span style="color: #000000; font-weight: bold;">/</span>of<span style="color: #000000; font-weight: bold;">/</span>your<span style="color: #000000; font-weight: bold;">/</span>com.example.keystore</pre></td></tr></table></div>

<p>Make sure &#8220;keytool&#8221; is either in your PATH, or &#8220;cd&#8221; into the &#8220;tools&#8221; directory where your Android SDK files are.</li>
<li>Enter your keystore password when prompted (you didn&#8217;t forget that too, did you? Did you?)</li>
<li>See results!</li>
</ol>
<p>You should see something like the picture below if you did everything right. The alias is circled in yellow. If you have multiple aliases in your keystore, they will all be listed, one per line.<br />
<span id="more-664"></span><br />
<a href="http://www.vancelucas.com/wp-content/uploads/2010/12/android-keystore-list-aliases.png"><img class="alignnone size-full wp-image-682" title="android-keystore-list-aliases" src="http://www.vancelucas.com/wp-content/uploads/2010/12/android-keystore-list-aliases.png" alt="Google Android List Keystore Aliases" width="777" height="261" /></a></p>
<p>And since you already forgot your keystore alias, I might as well remind you to put your keystore in a safe location so you don&#8217;t lose it. Remember &#8211; if you lose your keystore, you&#8217;re screwed. You won&#8217;t be able to release any updates for the apps you packaged with it. I put mine in my <a href="https://www.dropbox.com/referrals/NTEwNTczODY5">Dropbox</a> for safe keeping. It is synced to three of my personal computers and backed up to an external USB drive in addition to being stored remotely on the Dropbox servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/listing-aliases-inside-an-android-keystore-file-with-keytool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mirror Remote Server With Linux FTP Commands</title>
		<link>http://www.vancelucas.com/blog/mirror-remote-server-with-linux-ftp-commands/</link>
		<comments>http://www.vancelucas.com/blog/mirror-remote-server-with-linux-ftp-commands/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 15:28:10 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[data backup]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=279</guid>
		<description><![CDATA[A client of mine called me last night around 8:00pm a little worried. I had recently setup a hosting account for her on my server, so that she would be able to switch from her current FTP-only solution to a full hosting account with a domain and everything for when she makes a webstie in [...]]]></description>
			<content:encoded><![CDATA[<p>A client of mine called me last night around 8:00pm a little worried. I had recently setup a hosting account for her on my server, so that she would be able to switch from her current FTP-only solution to a full hosting account with a domain and everything for when she makes a webstie in the future (she only needs the FTP to share files for now).  On the phone, she said:</p>
<blockquote><p>The guy who hosts my files just called me.  He got in a disagreement with the guy who manages his servers, and told me to back everything up because it might not be there tomorrow</p></blockquote>
<p>Wow. In a split second, all your data can be gone. <em>The forever kind of gone</em>. The problem was &#8211; and the reason she called me &#8211; was that she had amassed so many files over the years, that it would take days to backup using her internet connection, and she only had hours to get it done.  Okay, relax, I told her &#8211; I&#8217;ve got it taken care of.  I can use linux shell commands to download all the files to my server from yours.  It will be much faster, and the files will go directly to the new server instead of having to be re-uploaded there, saving some very time-consuming steps.</p>
<p>Okay, I thought. I&#8217;ll just login, make a big tarball of all the files and grab that with my server. But her file hosting account did not allow shell access, and probably didn&#8217;t have the extra space for an additional tarball of all the files anyway. So I&#8217;m stuck with the linux ftp commands &#8211; or so I thought.  Turns out, the <em>mget</em> ftp command does not recursively download folders on most servers. So the best function to use on a remote linux server that you can&#8217;t run shell commands on is <em>wget</em>, because <em>wget</em> also supports the FTP protocol. The usage goes like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">wget -r ftp://user:pass@domain.com</pre></td></tr></table></div>

<p>That was going fine, and then the connection was cut-off by the remote server a short way through getting all the files, probably due to some data transfer cap or something. I re-started it, and it cut off again near the same place. So this isn&#8217;t enough either, and I still don&#8217;t want to do it manually. Luckily, there is a wget flag to ignore already existing files &#8211; &#8216;-nc&#8217;. So the whole command to download everything recursively and <em>not re-download files you already have</em> is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">wget -nc -r ftp://user:pass@domain.com</pre></td></tr></table></div>

<p>Remember to back up often. You never know when you might find yourself in a sudden and unexpected data loss situation, <a href="http://blog.wired.com/business/2009/01/magnolia-suffer.html">like Ma.Gnolia did</a> Friday, January 30th. There&#8217;s a good discussion happening on the <a href="http://www.sitepoint.com/blogs/2009/01/31/open-thread-how-to-prevent-data-loss/">SitePoint open thread on data loss</a> that same some good backup ideas and methods, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/mirror-remote-server-with-linux-ftp-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interested in Coworking in Oklahoma?</title>
		<link>http://www.vancelucas.com/blog/interested-in-coworking-in-oklahoma/</link>
		<comments>http://www.vancelucas.com/blog/interested-in-coworking-in-oklahoma/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 17:52:24 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[coworking]]></category>
		<category><![CDATA[okccoco]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=271</guid>
		<description><![CDATA[If you&#8217;re in or around the Oklahoma City area doing freelance work, there&#8217;s some very good news for you.  Derrick Parkhurst along with a few members of the local community are opening OKCCoCo &#8211; Oklahoma City Coworking Collaborative.  What is Coworking? Coworking is essentially a movement to create a working office environment for freelancers and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://okccoco.com"><img class="alignright size-full wp-image-274" title="OKC Coworking Collaborative" src="http://www.vancelucas.com/wp-content/uploads/2009/01/okccoco_logo.png" alt="" width="300" height="185" /></a>If you&#8217;re in or around the Oklahoma City area doing freelance work, there&#8217;s some very good news for you.  Derrick Parkhurst along with a few members of the local community are opening <a href="http://okccoco.com">OKCCoCo</a> &#8211; Oklahoma City Coworking Collaborative.  <a href="http://blog.coworking.info/">What is Coworking?</a> Coworking is essentially a movement to create a working office environment for freelancers and independent workers that they miss out on working from home.  Individuals will be able to rent a desk or private office to work at every month with a bunch or other really cool and smart people instead of working from home or signing a long-term lease for a real office and still being by themselves.  <strong>If you&#8217;re a freelancer or an independent worker that is interested in coworking, you should plan on attending the OPEN HOUSE to view the space on Saturday, January 17th at 2pm. </strong> <a href="http://okccoco.com/">Details and registration are on the OKCCoCo website</a>.</p>
<p>There will be a few additional announcements and activities at the open house, including a speech from Noah Everett, the founder of <a href="http://twitpic.com">TwitPic</a>.  My own startup <a href="http://www.invoicemore.com">InvoiceMore</a> will have a special announcement as well and a bonus for those who sign-up for OKCCoCo with a full or part-time commitment.  Come out if you can, and don&#8217;t forget to register first!  These are exciting times for the Oklahoma technology community!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/interested-in-coworking-in-oklahoma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP array_merge &#8211; Preserving Numeric Keys</title>
		<link>http://www.vancelucas.com/blog/php-array_merge-preserving-numeric-keys/</link>
		<comments>http://www.vancelucas.com/blog/php-array_merge-preserving-numeric-keys/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 18:11:44 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=267</guid>
		<description><![CDATA[This is just a quick post on PHP&#8217;s default behavior of re-indexing numeric keys when using PHP&#8217;s internal array_merge and array_merge_recursive functions, because it&#8217;s a problem I recently ran into, and was unable to find a quick solution to online. Basically, the problem is that if you&#8217;re using numerically-indexed arrays with a set number that [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post on PHP&#8217;s default behavior of re-indexing numeric keys when using PHP&#8217;s internal <a href="http://www.php.net/manual/en/function.array-merge.php">array_merge</a> and <a href="http://www.php.net/manual/en/function.array-merge-recursive.php">array_merge_recursive</a> functions, because it&#8217;s a problem I recently ran into, and was unable to find a quick solution to online.</p>
<p>Basically, the problem is that if you&#8217;re using numerically-indexed arrays with a set number that you don&#8217;t want to change (like an ID or some other unique identifier), you can&#8217;t use array_merge, because it automatically re-indexes all the numeric keys in the array to start with 0 on down in order.  There is no flag or option for the function to NOT do this, but there is another way to achieve the same result using PHP&#8217;s little-documented overridden plus operator &#8216;+&#8217; for appending an array to another array.</p>
<p>So just replace this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$destinationArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$array2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>With this instead:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$destinationArray</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$array1</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$array2</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Both $array1 and $array2 MUST be arrays or a fatal error will be thrown, so you may want to do some type checking or casting before that line of code.  The difference is that instead of merging the arrays together, the second array will simply be appended to the first one with no changes.</p>
<p>Note that the plus operator for arrays &#8216;+&#8217; is only one-dimensional, and is only suitable for simple arrays. If you need a multi-dimensional or complex solution, <a href="http://keithdevens.com/weblog/archive/2003/Mar/30/MergeTwoArrays">Keith Devens has a custom merge function</a> that might work for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/php-array_merge-preserving-numeric-keys/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get the Most From Your Google Analytics Dashboard</title>
		<link>http://www.vancelucas.com/blog/get-the-most-from-your-google-analytics-dashboard/</link>
		<comments>http://www.vancelucas.com/blog/get-the-most-from-your-google-analytics-dashboard/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 18:05:34 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=250</guid>
		<description><![CDATA[I&#8217;m a big fan of Google Analytics.  The service is free, can go on multiple websites using just one account, and displays and processes stats beautifully.  But the one thing that&#8217;s always annoyed me about Google Analytics is the default dashboard setup when you create a new website profile. The dashboard is the place for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.google.com/analytics/"><img class="alignright size-full wp-image-256" title="Google Analytics Logo" src="http://www.vancelucas.com/wp-content/uploads/2008/11/main_logo.gif" alt="" width="182" height="35" /></a>I&#8217;m a big fan of <a href="https://www.google.com/analytics/">Google Analytics</a>.  The service is free, can go on multiple websites using just one account, and displays and processes stats beautifully.  But the one thing that&#8217;s always annoyed me about Google Analytics is the default dashboard setup when you create a new website profile.</p>
<p>The dashboard is the place for the <em>most important</em> things to be.  it should be the single place you can view to and get an overview of all the most important things about your website regarding your visitors without having to drill deeper or go through multiple pages or sub-sections.  But the default dashboard Analytics starts you off with is all wrong, and is almost never the information I really want to see.  Let&#8217;s see how we can fix this.<span id="more-250"></span></p>
<h3>The Default Dashboard</h3>
<div id="attachment_251" class="wp-caption alignnone" style="width: 510px"><a href="http://www.vancelucas.com/wp-content/uploads/2008/11/google-analyics-before.jpg"><img class="size-full wp-image-251" title="Google Analytics Default Dashboard Setup" src="http://www.vancelucas.com/wp-content/uploads/2008/11/google-analyics-before.jpg" alt="Google Analyics Default Dashboard Setup" width="500" height="403" /></a><p class="wp-caption-text">Google Analytics Default Dashboard Setup</p></div>
<p>The first thing to note here is the repetitive information.  The &#8220;Visitors Overview&#8221; widget is the first thing you want to get rid of.  The exact same information is displayed larger above &#8211; no use in repeating the same information twice in the same screen area.  To the right of that is the &#8220;Map Overlay&#8221; widget.  While this information may be neat to see, it&#8217;s not really the real information you need day to day.  That one&#8217;s leaving our dashboard too.  So that leaves the two bottom widgets &#8211; &#8220;Traffic Sources Overview&#8221; and &#8220;Content Overview&#8221;.  These both can stay, but perhaps can be arranged a bit differently.</p>
<h3>The Information You Need</h3>
<p>For most webmasters, there are essentially two important questions: &#8220;<em>How are visitors getting to my website?</em>&#8221; and &#8220;<em>What are visitors doing on my website?</em>&#8220;.  The widgets we select for our dashboard must help us quickly answer those every day questions without having to drill any deeper or take any more of our time.  We also need only the information that isn&#8217;t already present on the dashboard that we can&#8217;t edit.</p>
<h3>A More Useful Dashboard</h3>
<div id="attachment_253" class="wp-caption alignnone" style="width: 510px"><a href="http://www.vancelucas.com/wp-content/uploads/2008/11/google-analyics-after.jpg"><img class="size-full wp-image-253" title="Google Analytics Customized Dashboard" src="http://www.vancelucas.com/wp-content/uploads/2008/11/google-analyics-after.jpg" alt="Google Analytics Customized Dashboard" width="500" height="400" /></a><p class="wp-caption-text">Google Analytics Customized Dashboard</p></div>
<p>With a customized dashboard, we can now have the information we <em>really</em> need on a daily basis that help us answer our every day questions:</p>
<p><strong>How are visitors getting to my website?</strong><br />
I can clearly see here that the dominant source is Google searches, followed by direct type-ins and the typo domain that redirects to the real site.  I can also see the top search keywords that visitors used to reach my website, which is very useful for measuring <a href="http://en.wikipedia.org/wiki/Search_engine_optimization">SEO</a> effectiveness.</p>
<p>Another dashboard widget I like to have to help answer this question is the &#8220;Referring Sites&#8221; widget.  This tells me the actual websites referring visitors to me through links.  This is especially helpful if the site gets mentioned in a blog post or article so you can know about it quickly.</p>
<p>If you run any Google Adwords campaigns, there is also an Adwords section and a dashboard widget for campaign clickthroughs and conversions that may be helpful.</p>
<p><strong>What are visitors doing on my website?<br />
</strong>This question may take a bit more analysis to answer because there are many parts to this.  The &#8220;Content Overview&#8221; widget helps us spot the most popular pages and areas of the website, which helps us solve most of this question.</p>
<p>Taking the analysis further, you may want to <a href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;answer=55515">setup conversion goals</a> and add a dashboard widget to display the number of daily goal conversions.  You can also add widgets for the entrance and exit pages, among many other things.</p>
<h3>Conclusion</h3>
<p>Most of the time for most of my websites, I have only the widgets above shown on the customized dashboard image above.  The great thing about Google Analytics is that it can be customized with any widgets you want to display.  So although the default widgets are not particularly useful on a day to day basis, they can easily be replaced with widgets containing information that is useful.</p>
<p>One more final thing about Google Anlytics is that the date range can be customized as well.  In the screenshots above, stats for the whole month are displayed.  If you have a larger website, you may want to customize the date range to a week or even a single day to get a better understanding of what&#8217;s going on most recently.  The drawback of course, as anyone that uses Google Analytics knows, is that the stats aren&#8217;t live or real-time.  There is a 24-hour delay because all the stats are compiled and processed at the end of each day.  I&#8217;m not going to complain about it because the product is free, but just remember that if you do choose to view a single day, you will have to select the previous day instead of the current one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/get-the-most-from-your-google-analytics-dashboard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IE6 and Multiple Button Submit Elements</title>
		<link>http://www.vancelucas.com/blog/ie6-and-multiple-button-submit-elements/</link>
		<comments>http://www.vancelucas.com/blog/ie6-and-multiple-button-submit-elements/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 22:29:02 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[browser compatibility]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=224</guid>
		<description><![CDATA[I stumbled across yet another weird issue in Internet Explorer 6 today.  This time it has to do with &#60;button type=&#8221;submit&#8221;&#62; elements and how data is sent back to the server. &#60;button type=&#8221;submit&#8221;&#62; vs &#60;input type=&#8221;submit&#8221;&#62; You would think both elements would behave exactly the same, because they&#8217;re both basically the same thing &#8211; the [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled across yet another weird issue in Internet Explorer 6 today.  This time it has to do with &lt;button type=&#8221;submit&#8221;&gt; elements and how data is sent back to the server.</p>
<h3>&lt;button type=&#8221;submit&#8221;&gt; vs &lt;input type=&#8221;submit&#8221;&gt;</h3>
<p>You would think both elements would behave exactly the same, because they&#8217;re both basically the same thing &#8211; the &#8220;submit&#8221; button on HTML forms.  Turns out that in Internet Explorer 6, they don&#8217;t behave the same at all.  Surprise, surprise.  The issue has to do with using multiple submit buttons on a form which can perform different actions:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form action=&quot;somewhere.php&quot; method=&quot;post&quot;&gt;
&lt;p&gt;[Displayed cart contents with editable quantity fields]&lt;/p&gt;
&lt;button type=&quot;submit&quot; name=&quot;update&quot;&gt;Update&lt;/button&gt;
&lt;button type=&quot;submit&quot; name=&quot;checkout&quot;&gt;Checkout &amp;gt;&lt;/button&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p><span id="more-224"></span><br />
The standard behavior of forms is to only pass the submit button field that was clicked by the user.  So if the user updated some quantities and clicked on &#8220;Update&#8221;, only that &lt;button type=&#8221;submit&#8221;&gt; would be posted back to the server, and the &#8220;checkout&#8221; field wouldn&#8217;t even be set.  So the code on the server to check which button was clicked might look something like this on the server:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Which button was clicked?</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'update'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Update cart quantities</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #666666; font-style: italic;">// Save cart and redirect to checkout page</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>What&#8217;s Going On?! @#%$ IE!</h3>
<p>Turns out, IE6 actually passes ALL &lt;button type=&#8221;submit&#8221;&gt; elements back to the server on postback instead of just the active/clicked one.  As a result, the &#8220;update&#8221; element will ALWAYS be set for ie6 users, and the &#8220;else&#8221; condition will NEVER be executed.  They won&#8217;t be able to make it past the cart page, and won&#8217;t be able to buy your products or continue to the next step.</p>
<h3>The Solution</h3>
<p>So the solution here is to change all the &lt;button type=&#8221;submit&#8221;&gt; elements to &lt;input type=&#8221;submit&#8221;&gt; elements instead, because those are actually handled correctly in IE6.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form action=&quot;somewhere.php&quot; method=&quot;post&quot;&gt;
&lt;p&gt;[Displayed cart contents with editable quantity fields]&lt;/p&gt;
&lt;input type=&quot;submit&quot; name=&quot;update&quot; value=&quot;Update&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;checkout&quot; value=&quot;Checkout &amp;gt;&quot; /&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p>So much for the flexibility of being able to use HTML markup inside &lt;button&gt; elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/ie6-and-multiple-button-submit-elements/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>In Oklahoma? Come to The OpenBeta &#8220;Unconference&#8221;</title>
		<link>http://www.vancelucas.com/blog/in-oklahoma-come-to-the-openbeta-unconference/</link>
		<comments>http://www.vancelucas.com/blog/in-oklahoma-come-to-the-openbeta-unconference/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 14:47:49 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[okc]]></category>
		<category><![CDATA[OpenBeta]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=162</guid>
		<description><![CDATA[If you&#8217;re in or around the Oklahoma City, Oklahoma area, you need to schedule some time for the upcoming OpenBeta &#8220;Unconference&#8221;.  From the event website: OpenBeta is an un-conference &#8212; a participant-driven community event aimed at exposing ideas and creating opportunities by connecting smart, passionate and motivated people with different expertises. The event will be [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re in or around the Oklahoma City, Oklahoma area, you need to schedule some time for the upcoming <a href="http://openbeta.extendedbeta.com/">OpenBeta</a> &#8220;Unconference&#8221;.  From the event website:</p>
<blockquote><p>OpenBeta is an <a href="http://en.wikipedia.org/wiki/Unconference">un-conference</a> &#8212; a <strong>participant-driven</strong> community event aimed at exposing ideas and creating opportunities by connecting smart, passionate and motivated people with different expertises.</p></blockquote>
<p>The event will be held on Thursday, October 30, 2008 at the IAO Gallery in downtown Oklahoma City at 7:00pm.  It&#8217;s going to be a night of good fun and networking with like-minded technology-oriented individuals in Oklahoma.  I&#8217;ll be giving a quick 5-minute lightning talk presentation myself on my upcoming <a title="InvoiceMore - Online Billing and Invoicing" href="http://www.invoicemore.com">InvoiceMore</a> project and what makes it different from competing online billing and involving services that already exist.</p>
<p>Please consider attending, and have those networking skills ready!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/in-oklahoma-come-to-the-openbeta-unconference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at TulsaTechFest 2008</title>
		<link>http://www.vancelucas.com/blog/speaking-at-tulsatechfest-2008/</link>
		<comments>http://www.vancelucas.com/blog/speaking-at-tulsatechfest-2008/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 00:17:48 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[tulsatechfest]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=72</guid>
		<description><![CDATA[After anxiously awaiting a response from David Walker, the TulsaTechFest conference Director about an open speaking spot, I just about fell out of my chair today when I finally got the email with a confirmation that I was going to be presenting.  I am very excited about this amazing opportunity, and have already begun putting [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://techfests.com/Tulsa/2008/default.aspx"><img src="http://www.vancelucas.com/wp-content/uploads/2008/09/ttf2008-logo.gif" alt="Tulsa TechFest 2008" title="Tulsa TechFest 2008" width="325" height="120" class="alignright" /></a>After anxiously awaiting a response from <a href="http://www.davidlwalker.com/">David Walker</a>, the <a href="http://tulsatechfest.com">TulsaTechFest</a> conference Director about an open speaking spot, I just about fell out of my chair today when I finally got the email with a confirmation that I was going to be presenting.  I am very excited about this amazing opportunity, and have already begun putting my speech together.  Here the topic info:</p>
<p><strong>Procedural to Object-Oriented: The Benefits of Using Object-Oriented PHP</strong></p>
<blockquote><p><span class="Apple-style-span" style="word-spacing: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: collapse; font-family: arial; color: #000000;">Learn the power of object-oriented programming in PHP5 and the many benefits it offers over the more traditional PHP procedural programming style.  This session will include a light introduction to object-oriented concepts and will provide real-world concrete examples of the benefits it can offer you and the PHP projects you work on.</span></p></blockquote>
<p>I will be speaking on October 9th at 2:30pm, and the presentation will last for roughly 75 minutes (60 minutes to speak, and 15 minutes for Q&amp;A).  That&#8217;s a good chunk of time to fill, but there&#8217;s a lot on this topic that will need to be covered.  If you&#8217;re thinking about getting into object-oriented PHP programing or would like to learn more about it, please attend.  I will try my best to make sure there is at least something that everyone can learn.</p>
<p>You can also <a href="http://techfests.com/Tulsa/2008/Speakers/VanceLucas/default.aspx">view my page on the conference website</a> to read a short biography and get more information on the event.  Hope to see at least a few friendly faces there!</p>
<p>P.S. &#8211; I plan on posting my presentation slides on this website after the event just in case anyone missed anything important or was unable to attend.</p>
<p><strong>UPDATE:</strong> The conference is over, and I have <a href="http://www.vancelucas.com/blog/presentation-slides-from-tulsa-techfest-2008/">posted the powerpoint slides in another post</a> for those that are interested in the presentations I made.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/speaking-at-tulsatechfest-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

