<?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>dingobytes &#187; Development</title>
	<atom:link href="http://www.dingobytes.com/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dingobytes.com</link>
	<description>what your nephew can't make you</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:24:10 +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>Avoid SQL Divide by zero errors</title>
		<link>http://www.dingobytes.com/tutorial/avoid-sql-divide-by-zero-errors</link>
		<comments>http://www.dingobytes.com/tutorial/avoid-sql-divide-by-zero-errors#comments</comments>
		<pubDate>Fri, 30 Sep 2011 19:35:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[divide by zero]]></category>
		<category><![CDATA[IsNull]]></category>
		<category><![CDATA[NullIf]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=377</guid>
		<description><![CDATA[I have been writing queries of one type or another for several years and for the last year and a half I have been trying to learn MSSQL. Although most of the syntax is like every other SQL language, the differences are enough to make me struggle. One particular item that has always flustered me [...]]]></description>
			<content:encoded><![CDATA[<p>I have been writing queries of one type or another for several years and for the last year and a half I have been trying to learn MSSQL. Although most of the syntax is like every other SQL language, the differences are enough to make me struggle.</p>
<p><a title="divide by zero" href="http://knowyourmeme.com/memes/divide-by-zero#.Trw1OlY72iY"><img class="alignleft" title="Divide By Zero" src="http://i270.photobucket.com/albums/jj105/callatov/Divided_by_zero.jpg" alt="divide by zero" width="450" height="360" /></a>One particular item that has always flustered me in the realm of report generating is the dreaded &#8220;divide by zero&#8221; error. I have been using ColdFusion for handling this through a method I call isZero(value, return_if_zero_value) where I pass it a value and a value I want returned if value is zero. This has never really been a good solution as the divide value is often something it should not be (should be zero).</p>
<p>I was frustrated with my inability to resolve this correctly and decided to spend some time trying to solve this.</p>
<p>I know that my select statement below will fail when t1.IMPRESSIONS == 0</p>
<pre class="brush: sql; title: ; notranslate">SELECT (CONVERT(DECIMAL(10,5), t1.CLICKS) / CONVERT(DECIMAL(10,5), t1.IMPRESSIONS)) * 100 AS CLICK_RATE</pre>
<p>I scoured through the SQL documentation and after about 20-30 minutes, I had one of those &#8216;Eureka!&#8217; moments. What if I could use IsNULL() method in SQL? If I could return null for a value, then maybe I could use IsNULL() to return zero when the divisor is zero. The only way I could do this is to return a null value when the divisor is zero, then correct? Enter the NULLIf() method.</p>
<pre class="brush: sql; title: ; notranslate">IsNULL( DIVIDEND / NULLIf(DIVISOR, 0), 0)</pre>
<p>I thought I just created something ground breaking, but in fact another few google searches and I found that this is really the most common way for most experienced developers to write out the SQL. Here is the end result of the SELECT statement.</p>
<pre class="brush: sql; title: ; notranslate">SELECT (IsNULL(CONVERT(DECIMAL(10,5), t1.CLICKS) / NULLIf(CONVERT(DECIMAL(10,5), t1.IMPRESSIONS), 0), 0)
* 100 AS CLICK_RATE</pre>
<p>I hope that this will help someone in the future. I know I could have used it about a year ago.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/tutorial/avoid-sql-divide-by-zero-errors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plus Points</title>
		<link>http://www.dingobytes.com/jquery/wordpress-plus-points</link>
		<comments>http://www.dingobytes.com/jquery/wordpress-plus-points#comments</comments>
		<pubDate>Tue, 11 Jan 2011 05:15:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=321</guid>
		<description><![CDATA[As the New Year begins, many a person creates a New Years Resolution that he or she sincerely intends to follow through on. Unfortunately for many these resolutions will never become a realization. This year my wife and I have both resolved to return to our healthy dietary and exercise plan of 2009 in hopes [...]]]></description>
			<content:encoded><![CDATA[<p>As the New Year begins, many a person creates a New Years Resolution that he or she sincerely intends to follow through on. Unfortunately for many these resolutions will never become a realization.</p>
<p>This year my wife and I have both resolved to return to our healthy dietary and exercise plan of 2009 in hopes to lose weight and feel great. We both use the Weight Watchers&reg; plan. This plan was easy to use and there were a lot of tools we could use to track our meals.</p>
<p>Of great use to us was a body planner that my wife purchased for both of us. The planner allowed us to log meals, activities and exercise. Using this in conjunction with the Weight Watchers&reg; tools (calculators and slide charts), we were able to log our meals and activities with an easy way of monitoring if we were &#8216;taking in&#8217; more then we were &#8216;working off&#8217;.</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-8997834926895804";
/* Dingobytes Banner */
google_ad_slot = "5058465999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>November of 2011 Weight Watchers changed their calculations and if we want to both follow the new plan we need to purchase new tools. Me being the curmudgeony ole miser that I am, I didn&#8217;t really feel it was necessary to purchase all new tools for both of us, so I decided to let my wife spend the money and I would do something even better. Create a new WordPress plug-in.</p>
<p>So here it is folks. WordPress Plus Points. This plug-in will allow you to log your meals and let you know how many Plus Points you use in relationship to your targeted daily plus points.</p>
<p>In order for this plan to be successful, you still need to go to your Weight Watchers&reg; meetings and use your  Weight Watchers&reg; tools. This is just something to assist you in logging your food in a WordPress medium that you might be more familiar with.</p>
<p>You can download the WordPress Plus Points plug-in from the WordPress repository by searching for WordPress Plus Points.</p>
<p>http://wordpress.org/extend/plugins/wp-pluspoints/</p>
<p>Plus Points Setup:<br />
httpvh://www.youtube.com/watch?v=lDkt_kaqU0o</p>
<p>Plus Points short-code use:<br />
httpvh://www.youtube.com/watch?v=SmcFFV4RXLc</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/jquery/wordpress-plus-points/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Subversion install for Eclipse Helios 3.6</title>
		<link>http://www.dingobytes.com/tutorial/subversion-install-for-eclipse-helios-3-6</link>
		<comments>http://www.dingobytes.com/tutorial/subversion-install-for-eclipse-helios-3-6#comments</comments>
		<pubDate>Wed, 22 Dec 2010 18:26:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[3.6]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Helios]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[Subversive]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=280</guid>
		<description><![CDATA[So I recently upgraded from Galileo to Helios and although I tried to use the upgrade instructions online, I had to many dependency issues and had to do a fresh install. I decided to start from scratch and removed the eclipse folder, deleted all cached and preference data and wiped out the workspace/.metadata. I downloaded [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_284" class="wp-caption alignleft" style="width: 249px"><a href="http://www.dingobytes.com/wp-content/uploads/2010/12/SVN-Connector-Error.png"><img src="http://www.dingobytes.com/wp-content/uploads/2010/12/SVN-Connector-Error-239x300.png" alt="SVN Connector Error" title="SVN Connector Error" width="239" height="300" class="size-medium wp-image-284" /></a><p class="wp-caption-text">SVN Connector Error</p></div>So I recently upgraded from Galileo to Helios and although I tried to use the upgrade instructions online, I had to many dependency issues and had to do a fresh install.</p>
<p>I decided to start from scratch and removed the eclipse folder, deleted all cached and preference data and wiped out the workspace/.metadata.</p>
<p>I downloaded the Eclipse IDE for Java Developers (because the Classic version does not have the new Eclipse Marketplace) and started to reinstall some of the most useful plugins.</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-8997834926895804";
/* Dingobytes Banner */
google_ad_slot = "5058465999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>This is when I ran into the issue with the Subversive Connector. I went to Help > Install New Software and pulled up the &#8216;Helios &#8211; http://download.eclpse.org/releases/helios&#8217;. I opened up the Collaboration tree and scrolled down and chose the &#8216;Subversive SVN Team Provider&#8217; and installed it. After the install you will get a prompt to install the connector (your choice of SVNKit or JavaHL) with the Subversive Connector Discovery window. I chose the connectors I wanted, but when I tried to install, I got an error. The error &#8216;Cannot complete installation &#8211; Problems occurred while performing installation: Operation details&#8217;<div id="attachment_282" class="wp-caption alignright" style="width: 310px"><a href="http://www.dingobytes.com/wp-content/uploads/2010/12/Install-Window.png"><img src="http://www.dingobytes.com/wp-content/uploads/2010/12/Install-Window-300x260.png" alt="Install Window" title="Install Window" width="300" height="260" class="size-medium wp-image-282" /></a><p class="wp-caption-text">Install Window</p></div></p>
<p>I viewed the error log and was able to find there was a missing dependency. After searching the web using Google, I was able to find a solution.</p>
<p>In order to resolve this you need to enable a subversive repository. Go to Help > Install New Software and then click the &#8220;Available Software Sites&#8221; link. In the window, you will get a list of available software. Scrolldown the list and look for http://download.eclipse.org/technology/subversive/0.7/update-site/. Select it and then click the &#8216;Enable&#8217; button and the click &#8216;OK&#8217;.<div id="attachment_283" class="wp-caption alignright" style="width: 310px"><a href="http://www.dingobytes.com/wp-content/uploads/2010/12/Subversive-Update-Site.png"><img src="http://www.dingobytes.com/wp-content/uploads/2010/12/Subversive-Update-Site-300x188.png" alt="Subversive Update Site" title="Subversive Update Site" width="300" height="188" class="size-medium wp-image-283" /></a><p class="wp-caption-text">Subversive Update Site</p></div></p>
<p>Back on the install window, click into the &#8216;Work with:&#8217; field and either type in or select the http://download.eclipse.org/technology/subversive/0.7/update-site/. Here you will find a list of options for install. I unchecked any &#8216;Optional&#8217; choices and then installed (Next > Next > &#8216;I Accept&#8230;&#8217; > Finish).</p>
<p><div id="attachment_281" class="wp-caption alignleft" style="width: 246px"><a href="http://www.dingobytes.com/wp-content/uploads/2010/12/Clean-Connector-Install.png"><img src="http://www.dingobytes.com/wp-content/uploads/2010/12/Clean-Connector-Install-236x300.png" alt="Clean Connector Install" title="Clean Connector Install" width="236" height="300" class="size-medium wp-image-281" /></a><p class="wp-caption-text">Clean Connector Install</p></div>After the Eclipse IDE installs, choose &#8216;Restart Now&#8217;. For me the Subversive Connector Discovery window came right back up. If it doesn&#8217;t for you, try to create a new SVN Project. I chose my Subversive SVN connectors and clicked &#8216;Finish&#8217; and presto the installation continues without error.</p>
<p>I hope this is helpful to anyone with a fresh install.</p>
<p>Now </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/tutorial/subversion-install-for-eclipse-helios-3-6/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Disable submit with multiple forms present</title>
		<link>http://www.dingobytes.com/jquery/disable-submit-with-multiple-forms-present</link>
		<comments>http://www.dingobytes.com/jquery/disable-submit-with-multiple-forms-present#comments</comments>
		<pubDate>Mon, 02 Aug 2010 19:05:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[disabled]]></category>
		<category><![CDATA[multiple forms]]></category>
		<category><![CDATA[submit]]></category>
		<category><![CDATA[submit button]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=131</guid>
		<description><![CDATA[A few minutes later I find myself scrambling through Google searches and trying different bits of code, none of which was working for me. The task was only suppose to last a few minutes and now I find myself having spent a few hours trying to figure this out. Time for a lunch break.]]></description>
			<content:encoded><![CDATA[<p>I recently ran across a situation in which I needed to disable a submit button after it was clicked to avoid duplicate submits of the form. This in itself seemed a pretty simple task to do with jQuery.</p>
<p>I soon learned that the task would be more difficult then I had anticipated. I started the task by using something similar to this.</p>
<p>
<pre class="brush: jscript; title: ; notranslate">jQuery(document).ready( function() {&lt;br /&gt;
    jQuery('form').submit(function(){&lt;br /&gt;
        // On submit disable its submit button&lt;br /&gt;
        jQuery('input:submit', this).attr('disabled', 'disabled');&lt;br /&gt;
    });&lt;br /&gt;
});</pre>
</p>
<p>I tested and thought all would be good, only it was not. After some double checking of my spelling, I decided to just output the value of the &#8216;input:submit&#8217;. I was surprised to see that it was returning &#8216;undefined&#8217; as the value.</p>
<p>A few minutes later I find myself scrambling through Google searches and trying different bits of code, none of which was working for me. The task was only suppose to last a few minutes and now I find myself having spent a few hours trying to figure this out. Time for a lunch break.</p>
<p>While on break I decided, how about just figure this out on your own instead of trying to hack someone other developers code. Off to jQuery documentation I went and the first thing I was reminded of was that .each() returns an index. Assuming all of my forms have some type of element with type=submit, I can use this.</p>
<p>The first step was to loop through each form element on page load:</p>
<pre class="brush: jscript; title: ; notranslate">jQuery('form').each(function(formIndex) {});</pre>
</p>
<p>Now inside of that each loop, lets add some logic:</p>
<pre class="brush: jscript; title: ; notranslate">jQuery(this).submit(function() {&lt;br /&gt;
    jQuery('input:submit').eq(formIndex).attr('disabled', 'disabled');&lt;br /&gt;
});</pre>
</p>
<p>This did the trick. I was now able to disable just the one form. Now if I was using this on AJAX script I would just add a return false. Here is the entire code, assuming we are making this an AJAX call.</p>
<p>
<pre class="brush: jscript; title: ; notranslate">jQuery(document).ready(function() {&lt;br /&gt;
	//Disable all form submit button on click?&lt;br /&gt;
	jQuery('form').each(function(formIndex) {&lt;br /&gt;
		jQuery(this).submit(function() {&lt;br /&gt;
			jQuery('input:submit').eq(formIndex).attr('disabled', 'disabled');&lt;br /&gt;
			return false;&lt;br /&gt;
		});&lt;br /&gt;
	});&lt;br /&gt;
});</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/jquery/disable-submit-with-multiple-forms-present/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing text in multiple files</title>
		<link>http://www.dingobytes.com/tutorial/replacing-text-in-multiple-files</link>
		<comments>http://www.dingobytes.com/tutorial/replacing-text-in-multiple-files#comments</comments>
		<pubDate>Wed, 12 May 2010 16:02:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[multiple files]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=120</guid>
		<description><![CDATA[Unfortunately during testing I have had some typo's and the generated report stored in the directory structure did not display as intended. The changes needed really didn't warrant processing the script again and adding more useless entries into the database, so I decided to change the script and then update the html in the report.]]></description>
			<content:encoded><![CDATA[<p>Recently I took a new job and it involves a lot of report generating. This has been a great fit for me and I have enjoyed the short time here in St Paul, MN.</p>
<p>The process for the current project is to pull a *.csv file from an email account, parse it into a database query/queries, generate html code and then store the html in a directory structure while also storing the report information in the database.</p>
<p><span id="more-120"></span></p>
<p>Unfortunately during testing I have had some typo&#8217;s and the generated report stored in the directory structure did not display as intended. The changes needed really didn&#8217;t warrant processing the script again and adding more useless entries into the database, so I decided to change the script and then update the html in the report.</p>
<p>Having over 100 reports generated, I needed a simple script to do this. I had done this with bash before, but I thought there had to be an easier way then looping through a for statement, saving the changes to a new file and then moving the new file to replace the old.</p>
<p>In comes Perl. Looking through some posts, I found that you can edit text in the file with Perl. The command goes something like this:</p>
<pre class="brush: perl; title: ; notranslate">perl -pi -w -e 's/search/replace/g;' *.html</pre>
<p>Here is a further explanation of what is going on. </p>
<p>-p assume loop (like -n) but print line also, like sed<br />
-i edit <> files in place (makes backup if extension supplied)<br />
-w enable many useful warnings (RECOMMENDED)<br />
-e execute the follwing line of code</p>
<p>The code referred to after the -e is just a search and replace regular expression. </p>
<p>The &#8216;s/&#8217; means to search and start your regular expression to search for. </p>
<p>You then enter your expression that you want to search for. You need to make sure you escape out special characters with the back-slash [\]. The forward slash is used to separate what you are searching for and what you want to replace. The replace section is an expression as well and you need to treat special characters the same way.</p>
<p>Finally you have the last forward slash indicates the end of your replace expression and the &#8216;g&#8217; indicates global.</p>
<p>Here is an example of how I would change the directory used for images from &#8216;/image/&#8217; to &#8216;images/&#8217; for all the files in a directory with the extension of .html.</p>
<pre class="brush: plain; title: ; notranslate">perl -pi -w -e 's/\/image\//images\//g;' *.html</pre>
<p>That is how you do it. If you have to go through multiple directories, you could use a bash or perl command to loop through those directories. Hope it didn&#8217;t confuse you too much.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/tutorial/replacing-text-in-multiple-files/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing applications with KISS</title>
		<link>http://www.dingobytes.com/development/developing-applications-with-kiss</link>
		<comments>http://www.dingobytes.com/development/developing-applications-with-kiss#comments</comments>
		<pubDate>Tue, 11 Aug 2009 01:53:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[KISS]]></category>

		<guid isPermaLink="false">http://www.dingobytes.com/?p=68</guid>
		<description><![CDATA[When it comes to developing new applications for the web, it doesn&#8217;t take long for plans to spiral out of control. The development track usually starts off simple, but somewhere between initial planning and final release there is this thing we here like to call &#8220;Feature Creep&#8221;. What might start off as a simple idea [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to developing new applications for the web, it doesn&#8217;t take long for plans to spiral out of control. The development track usually starts off simple, but somewhere between initial planning and final release there is this thing we here like to call &#8220;Feature Creep&#8221;.</p>
<div class="wp-caption alignleft" style="width: 372px"><a href="http://stuffthathappens.com/blog/"><img title="Our Application" src="http://www.talkingtext.com/wordpress_en/wp-content/uploads/2008/04/googleproduct.jpg" alt="our application vs. good application" width="362" height="700" /></a><p class="wp-caption-text">our application vs. good application</p></div>
<p>What might start off as a simple idea is turned into a three headed monster as more people add their input. The longer it takes the application to be completed, the more features are added to it until the next thing you know, the application has forms, polls, feedback, email to a friend, embed, etc all added to this small 300 x 300 pixel box.<span id="more-68"></span>There are some steps that can make your product more user friendly and have a clean finished product. So just how do you make such a product? Well here are just a few ideas we have that might help you create a useful end product.</p>
<ol>
<li>Step one is one you have heard before, we are sure. When you create the product follow the KISS (Keep It Simple Stupid) philosophy during the planning stages. Keeping the product simple helps speed the development, keeps the product focused on its core purpose and gives a good base foundation for the future of the product.</li>
<li> Make the product scalable. When ever possible, try to think about how this product can be built to allow it to grow. Keep in mind server, database, and client side concerns that might affect the product when it becomes an world wide sensation. If you can design a product that is scalable, it has the chance to have a much longer product life as well.</li>
<li>Stick to the original plan. If the project was well thought out, it should be flexible and grow as the product grows. If during the development, there are new ideas, don&#8217;t change the development path to include those. If the ideas are important they can be included in future versions of the product.</li>
<li> Use technology wisely. AJAX is useful, but it doesn&#8217;t mean the entire site has to be created using JavaScript. Some web users may be using applications that do not have JavaScript and would be left out of the experience. The product should gracefully degrade when necessary. Use client side and server side validation.</li>
</ol>
<p>The end user has an important role with the products development. Let users know you want their constructive criticism of the product (and not just that it sucks). Have them be specific as to what they like and do not like about the product. It doesn&#8217;t mean every idea is a great idea, but listening can help you develop a better product.</p>
<p>So keeping your product simple, scalable and relevant can do more then just save you time, but also make your product more useful to the end user.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dingobytes.com/development/developing-applications-with-kiss/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/

Served from: www.dingobytes.com @ 2012-02-05 21:28:19 -->
