<?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>BIT Consultants</title> <atom:link href="http://www.bitconsultants.net/feed/" rel="self" type="application/rss+xml" /><link>http://www.bitconsultants.net</link> <description></description> <lastBuildDate>Tue, 28 Feb 2012 04:01:39 +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>Home Sharing Broken in iTunes 10.5.3 (fixed)</title><link>http://www.bitconsultants.net/2012/home-sharing-broken-in-itunes-10-5-3-fixed/</link> <comments>http://www.bitconsultants.net/2012/home-sharing-broken-in-itunes-10-5-3-fixed/#comments</comments> <pubDate>Sat, 28 Jan 2012 02:14:01 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Troubleshooting]]></category> <category><![CDATA[Bugs]]></category> <category><![CDATA[Downloads]]></category> <category><![CDATA[IOS]]></category> <category><![CDATA[iTunes]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Windows 7]]></category> <category><![CDATA[Windows XP]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=509</guid> <description><![CDATA[Fix broken home sharing in the latest iTunes release]]></description> <content:encoded><![CDATA[<p>[WINDOWS ONLY] After I updated to iTunes 10.5.3, I noticed that home sharing did not work at all. I took all of the steps at Apple&#8217;s support article (<a
href="http://support.apple.com/kb/TS2972" rel="nofollow">http://support.apple.com/kb/TS2972</a>) to no avail. Ultimately, I figured out that the problem is with 10.5.3 itself. Here is how to get Home Sharing working again:</p><div
id="gads" style="width: 340px; float: right;"><script type="text/javascript">google_ad_client="pub-4761320180230999";google_ad_slot="4518447987";google_ad_width=336;google_ad_height=280;</script><br
/><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></div><p>Download iTunes 10.5.2 here:<br
/> 32 bit: <a
href="http://www.filehippo.com/download_itunes_32/11232/" rel="nofollow">http://www.filehippo.com/download_itunes_32/11232/</a><br
/> 64 bit: <a
href="http://www.filehippo.com/download_itunes_64/11233/" rel="nofollow">http://www.filehippo.com/download_itunes_64/11233/</a></p><p>Click on &#8220;Start&#8221; or the Windows Orb (depending on which version of Windows you are using) and click Run. If you don&#8217;t see &#8220;Run&#8221;, hold the Window key on your keyboard and press &#8216;r&#8217;. Enter the following text into the run dialog:<br
/> %APPDATA%\Apple Computer</p><p>Highlight all of the folders in the window that opens (Ctrl + a) and copy them (Ctrl + c), create a new folder on your desktop and call it &#8216;Apple Computer&#8217;. This is just a backup in case something goes wrong with the reinstall.</p><p>Once again, go to Start > Run (Window key + r) and type: appwiz.cpl</p><p>Look for iTunes in the list, and uninstall it. Once the uninstall is complete, double-click the iTunes installer you downloaded from File Hippo and follow the prompts. Once the installation completes, open iTunes and login to your Apple account when prompted, ensure that Home Sharing is turned on by clicking on Advanced in the menu (it should say &#8220;Turn off Home Sharing (YOUR ACCOUNT)&#8221; if Home Sharing is turned on).</p><p>That&#8217;s it.</p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;linkname=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2012%2Fhome-sharing-broken-in-itunes-10-5-3-fixed%2F&amp;title=Home%20Sharing%20Broken%20in%20iTunes%2010.5.3%20%28fixed%29" id="wpa2a_2"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2012/home-sharing-broken-in-itunes-10-5-3-fixed/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Fixed: Windows 7 Explorer.exe Server Execution Failed</title><link>http://www.bitconsultants.net/2011/fixed-windows-7-explorer-exe-server-execution-failed/</link> <comments>http://www.bitconsultants.net/2011/fixed-windows-7-explorer-exe-server-execution-failed/#comments</comments> <pubDate>Mon, 07 Feb 2011 22:50:36 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Troubleshooting]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=497</guid> <description><![CDATA[This error message can occur for the following reasons: Your Documents Library is pointed to an external drive which is disconnected The registry entries dictating where your<a
href="http://www.bitconsultants.net/2011/fixed-windows-7-explorer-exe-server-execution-failed/"> Read More...</a>]]></description> <content:encoded><![CDATA[<p>This error message can occur for the following reasons:</p><ol><li>Your Documents Library is pointed to an external drive which is disconnected</li><li>The registry entries dictating where your Shell and User Shell folders has been changed</li></ol><p>If your libraries are pointed to an external drive, plug it in or turn it on to resolve the issue. Otherwise&#8230;</p><p><strong>The easy way:</strong></p><ol><li>Click on Libraries</li><li>Right-click on Documents and select &#8220;Properties&#8221; from the menu</li><li>Click on the Restore Defaults button at the bottom right side of the dialog</li><li>Click OK</li></ol><p><script type="text/javascript">google_ad_client="ca-pub-4761320180230999";google_ad_slot="4518447987";google_ad_width=336;google_ad_height=280;</script><br
/><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br
/> <strong>The hard way</strong></p><ol><li>open the Registry Editor by clicking Start (Windows Orb) &gt; Run (or by pressing the Window&#8217;s and R keys on your keyboard simultaneously).</li><li>Type &#8220;regedit&#8221; and press Enter or click OK.  (confirm UAC if prompted)</li><li>Navigate to the following entry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell  Folders\Personal</li><li>Once you have clicked on &#8220;Shell Folders&#8221; and see My Pictures, My Music, etc.; select File &gt; Export from the menu and save a backup of this registry key to C:\shellfolders.reg</li><li>Change the key named Personal to something like C:\Users\Demo User\Documents (replacing Demo User with your account name) by double-clicking on it. If you are confused about what value should be put into Personal, look at the other entries for Pictures, Music, etc. and make it similar to those.</li><li>Click OK</li><li>Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal</li><li>Backup the key as before by selecting File > Export</li><li>Double-click the Personal key and enter %USERPROFILE%\Documents</li><li>Click OK</li><li>Close the Registry Editor</li><li>Open Libraries and select Documents, all should be working again.</li></li></ol><p>If for some reason this does not work for you, navigate to C:\shellfolders.reg (or wherever you saved the exported key) and double click on the file (authorize UAC) to restore it to it&#8217;s original state.</p><div
style="border: 2px solid #DDDDDD;margin-bottom: 1em;padding: 0.8em;background: none repeat scroll 0 0 #FBE3E4;border-color: #FBC2C4;color: #8A1F11;font-weight:bold;">Warning: modifying your registry can damage your computer, make sure you have your files backed up and that you export anything you modify so that it may be restored. This is advice that may or may not fix your problem, we take no responsibility whatsoever for any damage done to your computer as a result of the instructions contained here</div><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;linkname=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Ffixed-windows-7-explorer-exe-server-execution-failed%2F&amp;title=Fixed%3A%20Windows%207%20Explorer.exe%20Server%20Execution%20Failed" id="wpa2a_6"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2011/fixed-windows-7-explorer-exe-server-execution-failed/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Javascript Querystring Parameters</title><link>http://www.bitconsultants.net/2011/javascript-querystring-parameters/</link> <comments>http://www.bitconsultants.net/2011/javascript-querystring-parameters/#comments</comments> <pubDate>Sat, 29 Jan 2011 22:39:37 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Code Snippets]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Javascript]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=486</guid> <description><![CDATA[Hi all, just wrote up a javascript object to parse url parameters. You can take parameters out of the querystring or the url hash. Usage Script]]></description> <content:encoded><![CDATA[<p>Hi all, just wrote up a javascript object to parse url parameters. You can take parameters out of the querystring or the url hash.</p><p>Usage</p><pre class="brush: jscript; title: Code Example; notranslate">
//assuming <a href="http://www.example.com/index/?foo=bar&#038;baz=baa#test=true" rel="nofollow">http://www.example.com/index/?foo=bar&#038;baz=baa#test=true</a>

url.href;
//returns <a href="http://www.example.com/index/?foo=bar&#038;baz=baa#test=true" rel="nofollow">http://www.example.com/index/?foo=bar&#038;baz=baa#test=true</a>

url.path
//return /index/?foo=bar&amp;baz=baa#test=true

url.get('foo');
//returns 'bar'

url.get('test');
//returns true
</pre><p>Script</p><pre class="brush: jscript; title: Code Example; notranslate">
var url = (function(){
	var _href = location.href;
	var _path = location.pathname;
	var _qs = location.search.replace(/\?/, '');
	var _hash = location.hash.replace(/\#/, '');

	var _parse = function(string){
		var params = string.split('&amp;');
		var holder = [];

		for(var i = 0; i &lt; params.length; i++){
				var temp 	= params[i].split('=');
				var key 	= temp[0];
				var val 		= temp[1];
				holder[key] = val;
		}
		return holder;
	};

	var _qs_params 	= _parse(_qs);
	var _hash_params = _parse(_hash);

	return {
		href:_href,
		path:_path,
		get:function(name){
			var retval = null;
			if(_qs_params[name] !== undefined){
				retval = _qs_params[name];
			} else if(_hash_params[name] !== undefined) {
				retval = _hash_params[name];
			}
			return retval;
		},
		go:function(loc){
			location.href = loc;
		},
		back:function(item){
			if(item !== undefined){
				item = -1;
			}
			history.go(item);
		}
	};
})();
</pre><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;linkname=Javascript%20Querystring%20Parameters" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fjavascript-querystring-parameters%2F&amp;title=Javascript%20Querystring%20Parameters" id="wpa2a_10"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2011/javascript-querystring-parameters/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XAMPP ulimit error on Mac OSX</title><link>http://www.bitconsultants.net/2011/xampp-ulimit-error-on-mac-osx/</link> <comments>http://www.bitconsultants.net/2011/xampp-ulimit-error-on-mac-osx/#comments</comments> <pubDate>Sat, 08 Jan 2011 22:59:39 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Code Snippets]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Troubleshooting]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[OSX]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=372</guid> <description><![CDATA[If you are running XAMPP on Mac and can&#8217;t start apache, you are likely getting an unhelpful error message. If the message is blank, it could be<a
href="http://www.bitconsultants.net/2011/xampp-ulimit-error-on-mac-osx/"> Read More...</a>]]></description> <content:encoded><![CDATA[<p>If you are running XAMPP on Mac and can&#8217;t start apache, you are likely getting an unhelpful error message. If the message is blank, it could be because one of your local websites doesn&#8217;t have a logs folder; it could also be a hostname issue. If you are getting an error regarding ulimit and have tried the other fix on the web (commenting out the three lines related to ulimit in /Applications/XAMPP/xamppfiles/bin/apachectl) then your problem is likely related to hostname binding.</p><p>Check your error log at:</p><pre class="brush: bash; title: Code Example; notranslate">
tail -f /Applications/XAMPP/xamppfiles/logs/error_log
</pre><p>Start apache and see if you get an error regarding nodename or hostname</p><p>In terminal again, run the following command:</p><pre class="brush: bash; title: Code Example; notranslate">
ping $(hostname)
</pre><p>If you get no response, then your hostname is not bound to your IP address, and apache doesn&#8217;t like that. Here is how you fix it:</p><pre class="brush: bash; title: Code Example; notranslate">
echo &quot;127.0.0.1 &quot; $(hostname) | pbcopy
</pre><p>Open your /etc/hosts file and paste your clipboard contents in, restart apache and it should be working fine.</p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;linkname=XAMPP%20ulimit%20error%20on%20Mac%20OSX" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2011%2Fxampp-ulimit-error-on-mac-osx%2F&amp;title=XAMPP%20ulimit%20error%20on%20Mac%20OSX" id="wpa2a_14"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2011/xampp-ulimit-error-on-mac-osx/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Simplified Interface to HTML5 local storage</title><link>http://www.bitconsultants.net/2010/simplified-interface-to-html5-local-storage/</link> <comments>http://www.bitconsultants.net/2010/simplified-interface-to-html5-local-storage/#comments</comments> <pubDate>Wed, 29 Dec 2010 06:00:45 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Code Snippets]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Downloads]]></category> <category><![CDATA[Javascript]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=336</guid> <description><![CDATA[Documentation &#038; Sandbox: http://rmcvey.github.com/jsper Cart example: http://rmcvey.github.com/jsper/cart_example.html I decided it was time to dive into the HTML5 local storage API the other night, knowing that it has<a
href="http://www.bitconsultants.net/2010/simplified-interface-to-html5-local-storage/"> Read More...</a>]]></description> <content:encoded><![CDATA[<p><strong>Documentation &#038; Sandbox:</strong> <a
href="http://rmcvey.github.com/jsper">http://rmcvey.github.com/jsper</a><br
/> <strong>Cart example:</strong> <a
href="http://rmcvey.github.com/jsper/cart_example.html">http://rmcvey.github.com/jsper/cart_example.html</a><br
/> <br
/> I decided it was time to dive into the HTML5 local storage API the other night, knowing that it has a lot of potential. There are a few  problems inherent to using it, the biggest problem being lack of support in older browsers (and to a lesser degree that it is not implemented exactly the same across browsers). The other major problem I have with localStorage is that you can only store strings. I have found a few classes that help with localStorage, but I have problems with them too because:</p><ul><li>they utilize browser plugins like Flash</li><li>are enormously cumbersome to use with too many configuration options,</li><li>and once again, only store strings.</li><li>no unit tests</li><li>buggy</li><li>did I mention they are cumbersome to use and only hold strings????</li></ul><p>So, I have set out to resolve these grievances and have come quite close with jsper.  JSPER is a wrapper class around local storage that provides a more friendly api to localStorage using simple get and set methods:</p><pre class="brush: jscript; title: Code Example; notranslate">
jsper.set('foo', {bar:'baz',boz:{bez:'biz'}});
//jsper.get returns the type of object you gave it; in this case, an object
var my_object = jsper.get('foo');

jsper.set('arr', ['a', 'b', 'c', 'd']);
// returns an array
var my_array = jsper.get('arr');
</pre><p>In addition to automatic serialization/deserialization, there are a number of other useful methods, most of which (non-getters) are chainable, overloaded and accept callbacks. Jstore allows you to inspect the current storage engine, force a different storage engine (including session-lifetime storage).</p><p>Iterating over a collection</p><pre class="brush: jscript; title: Code Example; notranslate">
// set an array in storage
jsper.set('an_array', ['This', 'is', 'pretty', 'cool']);
var message = &quot;&quot;;
// perform iteration, data is the stored value and index is numerical index
jsper.each('an_array', function(data, index){
   message += &quot; &quot;+data;
});
console.log(message);//outputs: &quot;This is pretty cool&quot;
</pre><p>Lots more information @github: <a
href="http://github.com/rmcvey/jsper">http://github.com/rmcvey/jsper</a><br
/> Also, I made it into a jquery plugin if you are into that sort of thing: <a
href="http://plugins.jquery.com/project/jsperdb"></p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;linkname=Simplified%20Interface%20to%20HTML5%20local%20storage" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fsimplified-interface-to-html5-local-storage%2F&amp;title=Simplified%20Interface%20to%20HTML5%20local%20storage" id="wpa2a_18"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2010/simplified-interface-to-html5-local-storage/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Google Analytics for iPhone</title><link>http://www.bitconsultants.net/2010/google-analytics-for-iphone/</link> <comments>http://www.bitconsultants.net/2010/google-analytics-for-iphone/#comments</comments> <pubDate>Mon, 27 Dec 2010 01:51:01 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=309</guid> <description><![CDATA[Nothing fancy here folks, just tired of not being able to change the date range without flash. In the future, I will make this prettier, but for<a
href="http://www.bitconsultants.net/2010/google-analytics-for-iphone/"> Read More...</a>]]></description> <content:encoded><![CDATA[<p>Nothing fancy here folks, just tired of not being able to change the date range without flash. In the future, I will make this prettier, but for now, bookmark <a
href="javascript:javascript:if(location.href.indexOf('google.com/analytics')){regex=/([0-9]{8}\-[0-9]{8})/;location.href=location.href.replace(regex,c=window.prompt('Enter the date range [ex. 20101210-20101215]', location.href.match(regex)[0]));}">Analytics Date Picker</a> in Safari (by dragging that link to your toolbar) and sync with your iphone in itunes. Select that bookmark when you are on the analytics page and want to change your date range.</p><p>Cheers</p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;linkname=Google%20Analytics%20for%20iPhone" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgoogle-analytics-for-iphone%2F&amp;title=Google%20Analytics%20for%20iPhone" id="wpa2a_22"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2010/google-analytics-for-iphone/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Validating Data with Enhanced Declarative Data Integrity Rules</title><link>http://www.bitconsultants.net/2010/validating-data-using-tuples-stored-in-column-comments/</link> <comments>http://www.bitconsultants.net/2010/validating-data-using-tuples-stored-in-column-comments/#comments</comments> <pubDate>Sat, 08 May 2010 05:48:09 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Code Snippets]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[validation]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=255</guid> <description><![CDATA[Visit us at our new Google Code project page: http://code.google.com/p/metadata-validator/ Problem Definition Data validation and integrity assurance are complex subjects that have strong opinions tied to the<a
href="http://www.bitconsultants.net/2010/validating-data-using-tuples-stored-in-column-comments/"> Read More...</a>]]></description> <content:encoded><![CDATA[<p><strong>Visit us at our new Google Code project page: <a
href="http://code.google.com/p/metadata-validator/">http://code.google.com/p/metadata-validator/</a></strong></p><h2>Problem Definition</h2><p>Data validation and integrity assurance are complex subjects that have strong opinions tied to the way they are implemented. Some strongly feel that the database can handle validation using the column&#8217;s attributes (size, data type, etc) and TRIGGERS/STORED PROCEDURES can provide means to enforce complex business rules. This is true, but there are many caveats and arguments against this approach. Should a data source be performing logic? According to <a
href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/triggers.htm#g22503">Oracle&#8217;s website</a>:</p><p
style="padding-left: 30px;">&#8220;<em>Although triggers are useful for customizing a database, use them only when necessary. Excessive use of triggers can result in complex interdependencies, which can be difficult to maintain in a large application</em>&#8220;</p><p>Those in opposition to this approach feel that it is not the job of the database to perform logic, only to store data. So, who is right?<br
/> How should data validation be handled? Triggers or code? Honestly, both is usually the practice. The current implementations of Declarative Data Integrity Rules in the database marketplace give us simple rules to validate against (again: size, data type, nullable, etc) and if we don&#8217;t validate data in our code prior to insertion the database errors out. Though mindless and tedious, it is a straightforward task to code validation prior to executing SQL in your programming language.</p><p>I think that both opinions are correct, but both approaches are inadequate. Logic <strong><em>should </em></strong>be separated from data. However, rules about data stored in your database are really metadata. Why should programmers have to tweak code every time the table changes? Why should DBAs have to worry that programmers validation is insufficient and not have any control over the data integrity? I believe the database should dictate to us, in specific terms, what it is expecting. In addition, programmers and DBAs should be able to work together to formulate the data validation and that is should be in only one place.</p><h2>Current Practice</h2><p>Most of the time, a DBA will create a table with data type, length, unique and referential constraints. These rules are enforced by the database, programmers are handed back an error message which has to be parsed into a friendly error. In some shops, STORED PROCEDURES and TRIGGERS are used to validate data prior to insertion. As we pointed out above, this is not an encouraged practice and makes a data source a logic engine.</p><p>Let&#8217;s say we have a table defined as such:</p><pre class="brush: sql; title: Code Example; notranslate">

id INT(8) NOT NULL,
name VARCHAR(40),
zip_code VARCHAR(10)
</pre><p>Programmers take the constraints defined above (i.e. &#8220;INT&#8221;, &#8220;NOT NULL&#8221;, 40, etc) and write up code validation for each of those columns. If DBAs alter the number of columns or the metadata of any one of the columns, the code needs to be updated accordingly. Conversely, if the programmers don&#8217;t properly validate the raw data in code, we could easily end up with &#8220;NOTAZIP&#8221; in our zip_code field. In this way, the technologies are seemingly blind of each other except for a tin-can phone that can pass simple messages back and forth. This is not a knock against the technology, they were made to be platform independent (in terms of interfacing) and not necessarily to know everything about each other.  This is the price we have to pay for an exceedingly friendly means of storing and retrieving data.</p><h2>Proposed Solution</h2><p>Utilizing dynamic functions, JSON and metadata stored in column comments of my database I was able to validate data against any table with only one validation class (that isn&#8217;t very long!). I have yet to see a column or table comment be anything slightly useful (if anything at all). Up until two days ago, every time I saw the field to insert a comment in phpmyadmin  I would think &#8220;I guess that&#8217;s a nice feature&#8230;&#8221;, and then move on. Then I realized that using (in MySQL) SHOW FULL COLUMN FROM {TABLE}, I can get that comment&#8217;s value back. And using my programming language (PHP), I could do the following:</p><pre class="brush: php; title: Code Example; notranslate">

$data = json_decode($comment);
</pre><p>I now am holding an object created from metadata to do what I will with.</p><p>The initial data I inserted into a column COMMENT was a minified representation of this:</p><pre class="brush: jscript; title: Code Example; notranslate">
'{	&quot;insert_helpers&quot;: {
		&quot;functions&quot;: {
			&quot;func1&quot;:{
				&quot;name&quot;:&quot;strtotime&quot;,
				&quot;params&quot;:{
					&quot;param1&quot;:&quot;+20 years&quot;
				}
			},
			&quot;func2&quot;:{
				&quot;name&quot;:&quot;str_replace&quot;,
				&quot;params&quot;:{
					&quot;param1&quot;:&quot;!!&quot;,
					&quot;param2&quot;:&quot;!&quot;,
					&quot;param3&quot;:&quot;@this&quot;,
				}
			}
		}
	},
	&quot;validators&quot;: {
		&quot;maxlength&quot;:&quot;10&quot;,
		&quot;minlength&quot;:&quot;2&quot;,
		&quot;patterns&quot;:{
			&quot;pattern1&quot;:{
				&quot;pattern&quot;:&quot;[^0-9]&quot;,
				&quot;example&quot;:&quot;This is data without numbers&quot;
			}
		}
	}
}'
</pre><p>This was then validated with code very similar to this:</p><pre class="brush: php; title: Code Example; notranslate">
/**
*
* NOTE: I have not tested this code
* I typed directly it into notepad++ for your reading,
* not for executing, if it works, great!
*
*/
$json 				= json_decode($comment);
$helper_functions 	        = $json-&gt;{'insert_helpers'};
$validators			= $json-&gt;{'validators'};
$errors				= array();

//$row_value = $result['field'];
foreach($helper_functions as $function)
{
	$params = array();
	foreach($function-&gt;{'params'} as $param)
	{
		//insert row value
		if($param == '@this')
		{
			$param = str_replace(&quot;@this&quot;, $row_value, $param);
		}
		array_push($params, $param);
	}
	if(is_callable($function-&gt;{'name'})
	{
		$row_value = call_user_func_array($function-&gt;{'name'}, $params);
	}
}

if(is_object($validators))
{
	if(is_object($validators-&gt;{'minlength'})
	{
		if(sizeof($row_value) &lt; $validators-&gt;{'minlength'})
		{
			array_push($errors, &quot;$row_value is not long enough&quot;);
		}
	}
	if(is_object($validators-&gt;{'maxlength'})
	{
		if(sizeof($row_value) &gt; $validators-&gt;{'maxlength'})
		{
			array_push($errors, &quot;$row_value is too long&quot;);
		}
	}
	if(is_object($validators-&gt;{'patterns'})
	{
		foreach($validators-&gt;{'patterns'} as $pattern)
		{
			if(preg_match(&quot;/$pattern-&gt;{'pattern'}/&quot;, $row_value))
			{
				array_push($errors, &quot;$row_value is not in correct format [example: $pattern-&gt;{'example'}&quot;);
			}
		}
	}
}
</pre><p>If you didn&#8217;t pick it up by reading through the code, these functions couldn&#8217;t care less what table you are dealing with and the same set of code works against any and all columns. In addition, the validation rules (JSON) can be handed to the client side code to perform validation prior to reaching the server. All major databases have a comment column and most modern programming languages allow behavior like the example I posted.</p><p>I will post my php class that facilitates this process soon.</p><p>Anxious to hear people&#8217;s thoughts.</p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;linkname=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fvalidating-data-using-tuples-stored-in-column-comments%2F&amp;title=Validating%20Data%20with%20Enhanced%20Declarative%20Data%20Integrity%20Rules" id="wpa2a_26"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2010/validating-data-using-tuples-stored-in-column-comments/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Geocoding with Google Maps and the Zend Framework</title><link>http://www.bitconsultants.net/2010/geocoding-with-google-maps-and-the-zend-framework/</link> <comments>http://www.bitconsultants.net/2010/geocoding-with-google-maps-and-the-zend-framework/#comments</comments> <pubDate>Sat, 24 Apr 2010 17:51:40 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Code Snippets]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[API]]></category> <category><![CDATA[Geocoding]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[Maps]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Zend Framework]]></category><guid
isPermaLink="false">http://www.bitconsultants.net/?p=231</guid> <description><![CDATA[Download Example Files: Zip RAR Maps are a great way to engage your users and visualize data, but it can be a little tricky to setup. Here<a
href="http://www.bitconsultants.net/2010/geocoding-with-google-maps-and-the-zend-framework/"> Read More...</a>]]></description> <content:encoded><![CDATA[<h3><strong>Download Example Files</strong>:</h3><p> <a
href="http://www.bitconsultants.net/examples/gmap.zip">Zip</a> <a
href="http://www.bitconsultants.net/examples/gmap.rar">RAR</a><br
/><hr
/> Maps are a great way to engage your users and visualize data, but it can be a little tricky to setup. Here I will walk you through the steps needed to get a map up and running.<br
/><script type="text/javascript">google_ad_client="pub-4761320180230999";google_ad_slot="9379654790";google_ad_width=468;google_ad_height=15;</script><br
/><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p><h3>Sign Up</h3><p>Apply for a Google Maps API Key (free) here using your domain without a subdomain or www (this will allow you to use key with or without www and on subdomains): <a
href="http://code.google.com/apis/maps/signup.html" rel="nofollow">http://code.google.com/apis/maps/signup.html</a></p><h3>Configuration</h3><p>Put the API key in your configuration file (application.ini, config.ini, etc.) like this:</p><pre class="brush: php; title: Code Example; notranslate">
[google]
google_map_key =  YOUR_KEY
</pre><h3>Bootstrapping</h3><p><del
datetime="2011-01-08T03:34:24+00:00">In your index.php file, add the following code:</del><br
/> As a concerned user pointed out, that is terrible practice and was a remnant of my first tinkerings with ZF. You should place this code in your Bootstrap.php file:</p><pre class="brush: php; title: Code Example; notranslate">
protected function initGoogle(){
	defined('CONFIG_PATH') or define('CONFIG_PATH', APPLICATION_PATH . '/configs/application.ini');
	Zend_Registry::set('google',  new Zend_Config_Ini(CONFIG_PATH, 'google'));
}
</pre><p>This will add your api key to the registry so that it can be accessed throughout your application.</p><h3>Model</h3><p>In your models directory, create a new class called &#8216;Geocoder.php&#8217;. This will be the file that contains the application logic for retreiving coordinates on a given location.</p><p><strong>models/Geocoder.php</strong></p><pre class="brush: php; title: Code Example; notranslate">

class Geocoder{
    protected $key;

    public function __construct($api_key)
    {
        $this-&gt;key = $api_key;
    }

    public function _getGeocodedLatitudeAndLongitude($address)
    {
        $client = new Zend_Http_Client();
        $client-&gt;setUri($this-&gt;getGeocodingUri());
        $client-&gt;setParameterGet('q', urlencode($address))
               -&gt;setParameterGet('output', 'json')
               -&gt;setParameterGet('sensor', 'false')
               -&gt;setParameterGet('key', $this-&gt;key);

        $result = $client-&gt;request('GET');
        $response = Zend_Json_Decoder::decode($result-&gt;getBody(),
                    Zend_Json::TYPE_OBJECT);
        return $response;
    }

    public function getCoordinates($address)
    {
        $response = $this-&gt;_getGeocodedLatitudeAndLongitude($address);
        if(isset($response-&gt;Placemark[0]-&gt;Point-&gt;coordinates[1])){
             return array(
                'lat' =&gt; $response-&gt;Placemark[0]-&gt;Point-&gt;coordinates[1],
                'lon' =&gt; $response-&gt;Placemark[0]-&gt;Point-&gt;coordinates[0]
            );
        } else {
			return null;
		}
    }

    private function getGeocodingUri()
    {
        return '<a href="http://maps.google.com/maps/geo&#039;" rel="nofollow">http://maps.google.com/maps/geo&#039;</a>;
    }
}
?&gt;
</pre><h3>Usage</h3><p>Alright, that was pretty easy. Now we just have to implement this in our controller. Here is a sample model that uses the Geocoder class to return geotagged User objects.<br
/> <strong>models/User.php</strong></p><pre class="brush: php; title: Code Example; notranslate">
class User extends Zend_Db_Table_Abstract{
	protected $_name = 'users';
	protected $key;
	protected $geocoder;

	public function init()
	{
		$this-&gt;key = Zend_Registry::get('google')-&gt;google_map_key;
		$this-&gt;geocoder = new Geocoder($this-&gt;key);

	}
	public function getUsersAndGeocode()
	{
		$result = $this-&gt;fetchAll();

		$users    = $result-&gt;_toArray();
		foreach($users as $user)
		{
			$address = &quot;{$user['address']} {$user['city']} {$user['state']} {$user['zip']}&quot;;

			$latlon = $this-&gt;geocoder-&gt;getCoordinates($address);
			if($latlon)
			{
				$user['lat'] = $latlon['lat'];
				$user['lon'] = $latlon['lon'];
			}
		}
		return $users;
	}

}
?&gt;
</pre><p>The controller part is a little too easy. We will setup a reference to our user table and create a map action. Within the map action we get all of users and geocode them. We pass that collection to our view. This file should be located here:<br
/> <strong>controllers/UserController.php</strong></p><pre class="brush: php; title: Code Example; notranslate">
class UserController extends Zend_Controller_Action{
	protected $user_table;
	public function init()
	{
		//database connectivity stuff is up to you

		$this-&gt;user_table = new User();
	}
	public function mapAction()
	{
		$this-&gt;view-&gt;api_key = Zend_Registry::get('google')-&gt;google_map_key;
		$users = $this-&gt;user_table-&gt;getUsersAndGeocode();
		$this-&gt;view-&gt;users = $users;
	}
}
?&gt;
</pre><p>And finally, the view. Here we will create our map div, load the Google Maps API (don’t forget to sub out your key in the script src). We are using a custom marker here (personIcon); you can add your own image here by changing the path to your image. I recommend the image be pretty small with a transparent background. Given our current setup, this file would be located at this path:<br
/> <strong>views/scripts/user/map.phtml</strong></p><pre class="brush: php; title: Code Example; notranslate">
&lt;div id=&quot;map&quot;&gt;

&lt;noscript&gt;
&lt;center&gt;
&lt;strong&gt;To view the map feature, you need to have Javascript enabled. If you are unsure about how to turn Javascript support on, please&lt;/p&gt;
&lt;p&gt;read Google's instructions found here: &lt;a href=&quot;<a href="https://www.google.com/support/adsense/bin/answer.py?hl=en&#038;amp;answer=12654&#038;quot" rel="nofollow">https://www.google.com/support/adsense/bin/answer.py?hl=en&#038;amp;answer=12654&#038;quot</a>; target=&quot;_blank&quot;&gt;LINK&lt;/a&gt;&lt;/strong&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;/noscript&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&#038;gt" rel="nofollow">http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&#038;gt</a>;
&lt;script type=&quot;text/javascript&quot; src=&quot;<a href="http://maps.google.com/maps?file=api&#038;amp;amp;v=2&#038;amp;amp;sensor=false&#038;amp;amp;key=&lt;?=$this-&gt;api_key?&gt;&quot;&gt;&lt;/script&#038;gt" rel="nofollow">http://maps.google.com/maps?file=api&#038;amp;amp;v=2&#038;amp;amp;sensor=false&#038;amp;amp;key=&lt;?=$this-&gt;api_key?&gt;&quot;&gt;&lt;/script&#038;gt</a>;

&lt;script type=&quot;text/javascript&quot;&gt;
 //Sorry, I love jquery! If you don't use window.onload = function(){initialize();}
    $(document).ready(function(){
        initialize();
    });
var map;
var personIcon;
function initialize() {
    if(GBrowserIsCompatible){

        map = new google.maps.Map2(document.getElementById(&quot;map&quot;));
        map.setUIToDefault();
        map.setCenter(new google.maps.LatLng('48.858001709', '2.29460000992'), 4);

        personIcon            = new GIcon();

		/**
		* Change this marker to be a small transparent custom image
		*
		*/
        personIcon.image      = '/img/common/custom_marker.png';
        personIcon.shadow     = &quot;<a href="http://www.google.com/mapfiles/shadow50.png&quot;" rel="nofollow">http://www.google.com/mapfiles/shadow50.png&quot;</a>;
        personIcon.iconSize   = new GSize(32,32);
        personIcon.shadowSize = new GSize(37,34);

        personIcon.iconAnchor = new GPoint(9,34);
        personIcon.infoWindowAnchor = new GPoint(9,2);
    }
    addOverlays(map);
}

function personMarker(point, index, dto){
 //set our marker to be the custom icon we created
    markerOptions = {icon:personIcon};
    var marker = new GMarker(point, markerOptions);

/**
 * This is the content in the info bubble
 */
    GEvent.addListener(marker, 'click', function(){
       marker.openInfoWindowHtml(
            '&lt;h3&gt;&lt;a href=&quot;/profile/view/'+dto.user_id+'&quot;&gt;'+dto.user_first+' '+ dto.user_last+'&lt;/a&gt;&lt;/h3&gt;'+
            dto.user_address+' '+dto.user_city+' '+dto.user_state+' '+dto.user_zip
        );

    });
    return marker;
}
/*
* Here is where we loop through our users and create new markers for each

*/
function addOverlays(map){
    &lt;?php
  $geo = $this-&gt;users-&gt;_toArray();
        $size = sizeof($geo);

 ?&gt;
    &lt;? for($i = 0; $i &lt; $size; $i++): ?&gt;
                var latLon = new GLatLng(&lt;?php echo $geo[$i]['lat'];?&gt;, &lt;?php echo $geo[$i]['lon'];?&gt;);

                map.addOverlay(personMarker(latLon, &lt;?=$i?&gt;, &lt;?=Zend_Json::encode($geo[$i])?&gt;));
    &lt;?php endfor; ?&gt;
}
&lt;/script&gt;
</pre><p>Post a comment if you have any questions</p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;linkname=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2010%2Fgeocoding-with-google-maps-and-the-zend-framework%2F&amp;title=Geocoding%20with%20Google%20Maps%20and%20the%20Zend%20Framework" id="wpa2a_30"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2010/geocoding-with-google-maps-and-the-zend-framework/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Fighting Difficult Viruses</title><link>http://www.bitconsultants.net/2009/fighting-difficult-viruses/</link> <comments>http://www.bitconsultants.net/2009/fighting-difficult-viruses/#comments</comments> <pubDate>Tue, 06 Oct 2009 20:18:00 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Malware]]></category> <category><![CDATA[Tips]]></category><guid
isPermaLink="false">http://www.fangledcontraption.com/?p=37</guid> <description><![CDATA[Tips and tricks for hunting down evasive pests.]]></description> <content:encoded><![CDATA[<p>Let&#8217;s face fact, most commercial AV publishers can&#8217;t get everything. They do a good job keeping known viruses off your system by scanning for the existence of certain files (not checking content), certain registry entries or running processes/services. So how do you get rid of a virus that your AV vendor doesn&#8217;t know about? Here are the tactics I use, with a high rate of success. Please not that the order is of no consequence, all of these tasks are fine to be performed atomically.</p><h2>Fix 1: Get the computer to boot:</h2><p
style="padding-left: 30px;">Does the computer boot? If not, what messages (if any) are you getting? If you are getting error messages, Google them; most likely, you are not the first person to experience this problem. Careful where you click, though. Assuming you have eliminated the possibility of hardware failure (and that you have properly backed your important documents up): if the computer doesn&#8217;t boot, you could have a boot sector virus. To get rid of these, load the Windows CD and press &#8216;R&#8217; when prompted to enter the Recovery Console. Type these commands:</p><ul
style="padding-left: 60px;"><li>fixmbr</li><li>bootcfg /list<ul><li>If no entries are listed, type bootcfg /rebuild</li><li>Enter the numerical identifier for your Windows installation (likely the number 1)</li><li>Type Y or Yes to add installation to boot list</li><li>Provide a load identifier (e.g. Windows XP)</li><li>Enter /fastdetect</li></ul></li></ul><h2>Fix 2: Finding the culprits:</h2><p
style="padding-left: 30px;">If it&#8217;s possible, hook the infected hard drive up to a different machine and scan it using <a
title="MalwareBytes" href="http://www.malwarebytes.org" target="_blank">MalwareBytes</a>, removing any infected objects it finds. Now, knowledge of an approximate time the virus was contracted is REALLY helpful here, though not necessary. If you can&#8217;t hook it up to another computer, boot the computer into safe mode (press F8 as the computer is booting) and choose Safe Mode (with Networking).</p><p
style="padding-left: 30px;">Whether you have booted to this hard drive or are viewing it from a different computer, take the following actions:</p><p
style="padding-left: 30px;">Open My Computer &gt; C:.  Go to Tools &gt; Folder Options &gt; View tab &gt; Check &#8220;Show hidden files and folders&#8221;; uncheck &#8220;Hide extensions for known file types&#8221;, &#8220;Hide protected operating system files&#8221; and &#8220;Use simple file sharing&#8221;. &gt; Change to detail view and sort by Date Modified, more than likely, all of the virus files are going to have the same date in this field. Now is the tedious process of looking (and deleting/renaming), be sure you aren&#8217;t deleting important system files by using Google. Here are the important places to look, though they can be anywhere:</p><ul><li>C:\</li><li>C:\WINDOWS\</li><li>C:\Recycler\S-1-{RANDOM}\</li><li>C:\WINDOWS\Tasks</li><li>C:\WINDOWS\system32\</li><li>C:\WINDOWS\system32\drivers\</li><li>C:\Program Files\{ANY RECENT SOFTWARE THAT IS NEW AN YOU DIDN&#8217;T CHOOSE TO INSTALL}</li><li>%TEMP% (Start &gt; Run &gt; %TEMP% &gt; OK)</li><li>%USERPROFILE%\Desktop (look for installer files)</li><li>&#8220;%USERPROFILE%\Local Settings\Temporary Internet Files\&#8221;</li></ul><p
style="padding-left: 30px;">Open Windows Firewall through Start &gt; Control Panel &gt; Windows Firewall, click on the Exceptions tab and check for any programs that you didn&#8217;t specifically authorize, remove the exception if there are unknown entries.</p><h2>Fix 3: Stop the rogue processes from loading at startup</h2><p
style="padding-left: 30px;"><a
title="Autoruns" href="http://live.sysinternals.com/autoruns.exe" target="_blank">Download Autoruns from Sysinternals</a>. Run the program and select the Logon tab. Check for malicious software under the headings listed below, unchecking each malicious item:</p><ul><li> HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</li><li>HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</li><li>C:\Documents and Settings\All Users\Start Menu\Programs\Startup</li><li>C:\Documents and Settings\username\Start Menu\Programs\Startup</li></ul><p
style="padding-left: 30px;">Move to the Services tab and look for items where the Publisher is missing, these items are frequently (not always) suspect. Remove malicious services by unchecking them</p><p
style="padding-left: 30px;">Select the &#8220;Image Hijacks&#8221; tab, the only item that should be present is &#8220;Your Image File Name Here without a path&#8221;. If anything else is present, uncheck it.</p><p
style="padding-left: 30px;">Close Autoruns</p><h2>Cleanup</h2><p
style="padding-left: 30px;">Download <a
title="CCleaner" href="http://www.filehippo.com/download_ccleaner/" target="_blank">CCleaner</a>, install and run it with the default settings to remove all of your temporary files. If you don&#8217;t have a good Firewall and don&#8217;t have money to spend, download <a
href="http://personalfirewall.comodo.com/download_firewall.html" target="_blank">Comodo</a> or <a
href="http://www.zonealarm.com/security/en-us/zonealarm-pc-security-free-firewall.htm" target="_blank">ZoneAlarm</a>. Turn off System Restore by right-clicking My Computer and selecting Properties.  Select the System Restore tab and check the Turn off System Restore checkbox &gt; Select Apply (may take a moment or two). Once it is responding again, uncheck the box and it will create a new restore point (that doesn&#8217;t have the virus files).</p><div
style="border:1px solid #993300; padding:5px; background-color:#FBE3E4;"><h3><span
style="color: #993300;">Disclaimer</span></h3><p><span
style="color: #993300;">I cannot be held liable for you bricking your computer. It is your responsibility to take the necessary precautions when altering system files and folders. I make no guarantee about the fitness of these instructions, their application to your computer system and settings and accept no liability for any system errors, serious or not that result from following these directions. The riskiest items in this posting are:</span></p><ul><li><span
style="color: #993300;">the fixmbr command could cause some problems (warning is given when command is run)</span></li><li><span
style="color: #993300;">Deleting files in the WINDOWS, system32, drivers directories is extremely risky, check files if you are unsure<br
/> </span></li><li><span
style="color: #993300;">Using Autoruns can be risky; if you uncheck important system processes your computer may no longer boot.<br
/> </span></li></ul><p><span
style="color: #993300;">That being said, if you have problems, post in the comments section and I will try to help.</span></div><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;linkname=Fighting%20Difficult%20Viruses" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Ffighting-difficult-viruses%2F&amp;title=Fighting%20Difficult%20Viruses" id="wpa2a_32"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2009/fighting-difficult-viruses/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Deleted File Recovery</title><link>http://www.bitconsultants.net/2009/deleted-file-recovery/</link> <comments>http://www.bitconsultants.net/2009/deleted-file-recovery/#comments</comments> <pubDate>Tue, 06 Oct 2009 18:17:58 +0000</pubDate> <dc:creator>Rob</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Disk Tools]]></category> <category><![CDATA[Downloads]]></category><guid
isPermaLink="false">http://bitconsultants.net/?p=3</guid> <description><![CDATA[We can recover files that you thought were long gone.]]></description> <content:encoded><![CDATA[<p>Browsing the interwebs this morning, I came across a great program that is made by the fine folks who made <a
title="CCLeaner" href="http://www.ccleaner.com/" target="_blank">CCleaner</a> (my favorite disk cleanup program). The program is called <a
title="Recuva" href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.piriform.com%2Frecuva&amp;ei=1ofLSsGbLIqosgOKt4CYAQ&amp;usg=AFQjCNEGa6mVKDuZ6f9XgpNYDpVereCAiw" target="_blank">Recuva</a>, and though it&#8217;s title is a bit uninspiring it has proven to be fairly awesome at file recovery. I put a couple of junk files in my recycle bin and emptied it than waited an hour or two while performing my normal routine. I ran the default scan on C: just to see what deleted files it would recover and was fairly shocked when it found around 2,000 items, some of which I had deleted 6 &#8211; 8 months ago.  The better part, is that it actually recovered the files perfectly.</p><p>Some of the other benefits of this free program are:</p><ul><li>Search by file type</li><li>Search specific drives</li><li>Hidden system files</li><li>Securely overwritten files</li><li>Zero byte files</li><li>It&#8217;s Free!</li></ul><p><a
href="http://www.bitconsultants.net/resources/downloads">View all of our recommended software</a></p><p><a
class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a
class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Technorati Favorites" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a
class="a2a_button_yahoo_mail" href="http://www.addtoany.com/add_to/yahoo_mail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Yahoo Mail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Mail"/></a><a
class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Slashdot" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><a
class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Reddit" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a
class="a2a_button_google_gmail" href="http://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Google Gmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/gmail.png" width="16" height="16" alt="Google Gmail"/></a><a
class="a2a_button_hotmail" href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="Hotmail" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a><a
class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;linkname=Deleted%20File%20Recovery" title="StumbleUpon" rel="nofollow" target="_blank"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bitconsultants.net%2F2009%2Fdeleted-file-recovery%2F&amp;title=Deleted%20File%20Recovery" id="wpa2a_34"><img
src="http://www.bitconsultants.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://www.bitconsultants.net/2009/deleted-file-recovery/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using xcache
Page Caching using xcache
Object Caching 1036/1182 objects using memcached

Served from: www.bitconsultants.net @ 2012-05-20 20:15:10 -->
