<?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>thydzik&#039;s technology blog</title>
	<atom:link href="http://thydzik.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thydzik.com</link>
	<description>thydzik&#039;s projects and general random helpful information</description>
	<lastBuildDate>Fri, 06 Aug 2010 05:41:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>eventquery.vbs &#8211; ERROR: Unable to execute the query for the&#8230;</title>
		<link>http://thydzik.com/eventquery-vbs-error-unable-to-execute-the-query-for-the/</link>
		<comments>http://thydzik.com/eventquery-vbs-error-unable-to-execute-the-query-for-the/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 05:41:47 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[VBA/VBS]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[event viewer]]></category>
		<category><![CDATA[eventquery]]></category>
		<category><![CDATA[VBS]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=540</guid>
		<description><![CDATA[If you received this error when trying to execute eventquery.vbs the cause is an overflow of events past 32,767 (the maximum capacity of a VB6 Integer). There is a very simple fix for this which is to change the data type from an Integer to a Long (which has a maximum capacity of 2,147,483,647). In [...]]]></description>
			<content:encoded><![CDATA[<p>If you received this error when trying to execute eventquery.vbs the cause is an overflow of events past 32,767 (the maximum capacity of a VB6 Integer). There is a very simple fix for this which is to change the data type from an Integer to a Long (which has a maximum capacity of 2,147,483,647).</p>
<p>In eventquery.vbs, scroll down to line 1700 and 1703 and change both CInt to CLng.<br />
Before;</p>
<pre class="brush: vb; first-line: 1700; highlight: [1700,1703];">
        If CInt(objLogs.Item(arrKeyName(intLoopCount))) &gt; 0 Then
            strFilterLog = arrKeyName(intLoopCount)
            intRecordRangeFrom = 0
            intRecordRangeTo = CInt(objLogs.Item(arrKeyName(intLoopCount)))
</pre>
<p>After;</p>
<pre class="brush: vb; first-line: 1700; highlight: [1700,1703];">
        If CLng(objLogs.Item(arrKeyName(intLoopCount))) &gt; 0 Then
            strFilterLog = arrKeyName(intLoopCount)
            intRecordRangeFrom = 0
            intRecordRangeTo = CLng(objLogs.Item(arrKeyName(intLoopCount)))
</pre>
<p>Or download the already updated <a href="http://thydzik.com/downloads/eventquerynew.vbs">eventquery.vbs</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/eventquery-vbs-error-unable-to-execute-the-query-for-the/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of Foundation Fieldbus Unit Enumerations</title>
		<link>http://thydzik.com/list-of-foundation-fieldbus-unit-enumerations/</link>
		<comments>http://thydzik.com/list-of-foundation-fieldbus-unit-enumerations/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 18:36:43 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Foundation Fieldbus]]></category>
		<category><![CDATA[enumerations]]></category>
		<category><![CDATA[FF]]></category>
		<category><![CDATA[Fieldbus]]></category>
		<category><![CDATA[Foundation]]></category>
		<category><![CDATA[units]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=522</guid>
		<description><![CDATA[Here&#8217;s a current list of Foundation Fieldbus unit enumerations extracted from the freely available DD files. foundation-fieldbus-list-of-unit-enumerations.txt]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a current list of Foundation Fieldbus unit enumerations extracted from the freely available DD files.</p>
<p><a href="http://thydzik.com/downloads/foundation-fieldbus-list-of-unit-enumerations.txt">foundation-fieldbus-list-of-unit-enumerations.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/list-of-foundation-fieldbus-unit-enumerations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>thydzikGoogleMap v1.5 – an inline Google map plugin for WordPress</title>
		<link>http://thydzik.com/thydzikgooglemap-v1-5-%e2%80%93-an-inline-google-map-plugin-for-wordpress/</link>
		<comments>http://thydzik.com/thydzikgooglemap-v1-5-%e2%80%93-an-inline-google-map-plugin-for-wordpress/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 05:03:09 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[thydzikGoogleMap]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[thydzik Google Map]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=511</guid>
		<description><![CDATA[Recently updated and confirmed still working with WordPress 3.0. The following examples use the included example.xml file. &#60;markers&#62; &#60;!-- Marker Z has no html to show nonclickability--&#62; &#60;marker lat=&#34;-31.9554&#34; lng=&#34;115.85859&#34; icon=&#34;Z&#34; color=&#34;c89bff&#34;/&#62; &#60;marker lat=&#34;-32.053128&#34; lng=&#34;115.745869&#34; html=&#34;Fremantle&#34; icon=&#34;1&#34; color=&#34;6b98ff&#34;/&#62; &#60;!-- Standard marker with html--&#62; &#60;marker lat=&#34;-32.036036&#34; lng=&#34;115.92724&#34; html=&#34;Lynwood&#38;lt;br&#38;gt;Residence of the author&#34; color=&#34;ffed5c&#34;/&#62; &#60;marker lat=&#34;-31.963013&#34; lng=&#34;115.836239&#34; html=&#34;Kings [...]]]></description>
			<content:encoded><![CDATA[<p>Recently updated and confirmed still working with WordPress 3.0.</p>
<p>The following examples use the included <em>example.xml</em> file.</p>
<pre class="brush: xml;">
&lt;markers&gt;
&lt;!-- Marker Z has no html to show nonclickability--&gt;
&lt;marker lat=&quot;-31.9554&quot; lng=&quot;115.85859&quot;  icon=&quot;Z&quot; color=&quot;c89bff&quot;/&gt;
&lt;marker lat=&quot;-32.053128&quot; lng=&quot;115.745869&quot; html=&quot;Fremantle&quot;  icon=&quot;1&quot; color=&quot;6b98ff&quot;/&gt;
&lt;!-- Standard marker with html--&gt;
&lt;marker lat=&quot;-32.036036&quot; lng=&quot;115.92724&quot; html=&quot;Lynwood&amp;lt;br&amp;gt;Residence of the author&quot; color=&quot;ffed5c&quot;/&gt;
&lt;marker lat=&quot;-31.963013&quot; lng=&quot;115.836239&quot; html=&quot;Kings Park&quot; icon=&quot;KP&quot; color=&quot;97ec7d&quot;/&gt;
&lt;!-- Character marker with html that includes link--&gt;
&lt;marker lat=&quot;-31.956659&quot; lng=&quot;115.869906&quot; html=&quot;&amp;lt;a href=&amp;quot;http://perthmint.com.au&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Perth Mint&amp;lt;/a&amp;gt;&quot; icon=&quot;$&quot; color=&quot;ffffff&quot;/&gt;
&lt;line colour=&quot;#0000FF&quot; width=&quot;2&quot; opacity=&quot;0.75&quot;&gt;
	&lt;point lat=&quot;-32.027579&quot; lng=&quot;115.751266&quot; /&gt;
	&lt;point lat=&quot;-31.987404&quot; lng=&quot;115.769463&quot; /&gt;
	&lt;point lat=&quot;-31.957697&quot; lng=&quot;115.852203&quot; /&gt;
	&lt;point lat=&quot;-31.963814&quot; lng=&quot;115.879326&quot; /&gt;
	&lt;point lat=&quot;-32.026415&quot; lng=&quot;115.942154&quot; /&gt;
&lt;/line&gt;
&lt;/markers&gt;
</pre>
<ul>
<li>Marker Z &#8211; no HTML, nonclickable.</li>
<li>Marker 1 &#8211; standard maker with some text.</li>
<li>Marker Default &#8211; no icon defaults to standard Google Maps marker.</li>
<li>Marker $ &#8211; some symbols can even be displayed on a marker and links in the HTML.</li>
<li>Marker KP &#8211; up to two characters can be displayed.</li>
</ul>
<p>The syntax is as follows;</p>
<pre>thydzikGoogleMap(example.xml, width, height, zoom, maptype)</pre>
<p>where;</p>
<ul>
<li>example.xml is your xml file, and example xml file is included with  thdyzikGoogleMap in the plugin directory.</li>
<li>width is the optional width parameter, if left out the default width  defined in the thydzikGoogleMap options will be used.</li>
<li>height is the optional height parameter, if left out the default  height defined in the thydzikGoogleMap options will be used.</li>
<li>zoom is the optional zoom level from 0 to 17 (0 being the furthest  away), if left out zoom will be calculated automatically to fit all  points.</li>
<li>maptype is the optional map type parameters, which can be (Normal,  G_NORMAL_MAP, N), (SATELLITE, G_SATELLITE_MAP, S), (HYBRID,  G_HYBRID_MAP, H), (PHYSICAL, G_PHYSICAL_MAP, P, TERRAIN or T) if left  out Normal is defined.</li>
</ul>
<p><strong>Normal</strong>, <strong>G_NORMAL_MAP</strong>, <strong>N</strong> or left out; i.e. <strong>thydzikGoogleMap(example.xml)</strong>, thydzikGoogleMap will produce a default styled map;</p>
<!--thydzikgooglemap--><div id="map128348438169279900" style="width:0px; height:0px"></div><script type="text/javascript">	if (window.location.href.indexOf("http://thydzik.com") === 0) {		makeMap("map128348438169279900","http://thydzik.com/wp-content/plugins/thydzik-google-map/xml-proxy.php?url=6f1282e0a17000e535f04b82e98c8f112b314c8e2ccc725584c8816df43947f8a194a4923a8add4d69326c8d1b54b36f256b9acf5a4d2aa7b651d64ef85bddda28bda522d225b66046905ce8e14b2ecc7fa24e5e640e95450b4d4f1030996b34","460px", "345px","http://thydzik.com/wp-content/plugins/thydzik-google-map/","http://thydzik.com/wp-content/plugins/thydzik-google-map/",-1,"Normal",1);	}</script><!--/thydzikgooglemap-->
<p><strong>SATELLITE</strong>, <strong>G_SATELLITE_MAP</strong>, <strong>S</strong>; i.e. <strong>thydzikgooglemap(example.xml, 4, S)</strong>, thydzikGoogleMap will produce a satellite styled map. Note I have included a zoom of 4, and used the abreviation &#8216;S&#8217;;</p>
<!--thydzikgooglemap--><div id="map128348438169829600" style="width:0px; height:0px"></div><script type="text/javascript">	if (window.location.href.indexOf("http://thydzik.com") === 0) {		makeMap("map128348438169829600","http://thydzik.com/wp-content/plugins/thydzik-google-map/xml-proxy.php?url=6f1282e0a17000e535f04b82e98c8f112b314c8e2ccc725584c8816df43947f8a194a4923a8add4d69326c8d1b54b36f256b9acf5a4d2aa7b651d64ef85bddda28bda522d225b66046905ce8e14b2ecc7fa24e5e640e95450b4d4f1030996b34","460px", "345px","http://thydzik.com/wp-content/plugins/thydzik-google-map/","http://thydzik.com/wp-content/plugins/thydzik-google-map/",4,"S",1);	}</script><!--/thydzikgooglemap-->
<p><strong>HYBRID</strong>, <strong>G_HYBRID_MAP</strong>, <strong>H</strong>; i.e. <strong>tHyDzIkGoOgLeMaP(example.xml,hYbRiD,450,225)</strong>, thydzikGoolgeMap will produce a hybrid styled map. Note I have included a width and height, and proved that capitalisation is not of concern;</p>
<!--thydzikgooglemap--><div id="map128348438170878400" style="width:0px; height:0px"></div><script type="text/javascript">	if (window.location.href.indexOf("http://thydzik.com") === 0) {		makeMap("map128348438170878400","http://thydzik.com/wp-content/plugins/thydzik-google-map/xml-proxy.php?url=6f1282e0a17000e535f04b82e98c8f112b314c8e2ccc725584c8816df43947f8a194a4923a8add4d69326c8d1b54b36f256b9acf5a4d2aa7b651d64ef85bddda28bda522d225b66046905ce8e14b2ecc7fa24e5e640e95450b4d4f1030996b34","450px", "225px","http://thydzik.com/wp-content/plugins/thydzik-google-map/","http://thydzik.com/wp-content/plugins/thydzik-google-map/",-1,"HYBRID",1);	}</script><!--/thydzikgooglemap-->
<p><strong>PHYSICAL</strong>, <strong>G_PHYSICAL_MAP</strong>, <strong>P</strong>, <strong>TERRAIN</strong> or <strong>T</strong>; i.e <strong>thydzikGoogleMap(example.xml,TERRAIN)</strong>, thydzikGoogleMap will produce a terrain styled map;</p>
<!--thydzikgooglemap--><div id="map128348438171368400" style="width:0px; height:0px"></div><script type="text/javascript">	if (window.location.href.indexOf("http://thydzik.com") === 0) {		makeMap("map128348438171368400","http://thydzik.com/wp-content/plugins/thydzik-google-map/xml-proxy.php?url=6f1282e0a17000e535f04b82e98c8f112b314c8e2ccc725584c8816df43947f8a194a4923a8add4d69326c8d1b54b36f256b9acf5a4d2aa7b651d64ef85bddda28bda522d225b66046905ce8e14b2ecc7fa24e5e640e95450b4d4f1030996b34","460px", "345px","http://thydzik.com/wp-content/plugins/thydzik-google-map/","http://thydzik.com/wp-content/plugins/thydzik-google-map/",-1,"TERRAIN",1);	}</script><!--/thydzikgooglemap-->
<p><strong>Reading XML from different folder</strong><br />
The XML can be in any location, as long as the whole path is specified i.e. thydzikgooglemap(<a href="thydzikgooglemap(http://thydzik.com/geocaching/karratha-mar08/karratha-mar08.xml)">http://thydzik.com/geocaching/karratha-mar08/karratha-mar08.xml</a>). Yes, even links in the marker text are preserved.</p>
<!--thydzikgooglemap--><div id="map128348438171988200" style="width:0px; height:0px"></div><script type="text/javascript">	if (window.location.href.indexOf("http://thydzik.com") === 0) {		makeMap("map128348438171988200","http://thydzik.com/wp-content/plugins/thydzik-google-map/xml-proxy.php?url=7532b84b12b1c490222fe76dbb3231a599b0d21776e5edcf3adf87664df665c22e432da6815914d0a81bde59b2ecb4d08f7b87b79ec5d1c2382e66126795038a","460px", "345px","http://thydzik.com/geocaching/karratha-mar08/","http://thydzik.com/wp-content/plugins/thydzik-google-map/",-1,"Normal",1);	}</script><!--/thydzikgooglemap-->
<p>Reading XML from different domain<br />
The XML can even be on a different domain, as long as the whole path is specified. i.e. thydzikgooglemap(<a href="http://sonyaandtravis.com/maps/clare-melbourne08.xml">http://sonyaandtravis.com/maps/clare-melbourne08.xml</a>).</p>
<!--thydzikgooglemap--><div id="map128348438172375700" style="width:0px; height:0px"></div><script type="text/javascript">	if (window.location.href.indexOf("http://thydzik.com") === 0) {		makeMap("map128348438172375700","http://thydzik.com/wp-content/plugins/thydzik-google-map/xml-proxy.php?url=9060fe9cb50ea7aa7081c1e30a6aa7e42db586555e80e09cfd4640c177fee0de612761bde5fa9b4c080e02f089e1cfbbb3bbc368f50cf72fe7764391cbbab129","460px", "345px","http://sonyaandtravis.com/maps/","http://thydzik.com/wp-content/plugins/thydzik-google-map/",-1,"Normal",1);	}</script><!--/thydzikgooglemap-->
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/thydzikgooglemap-v1-5-%e2%80%93-an-inline-google-map-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to Unlock Garmin maps</title>
		<link>http://thydzik.com/how-to-unlock-garmin-maps/</link>
		<comments>http://thydzik.com/how-to-unlock-garmin-maps/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 04:38:05 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[FID]]></category>
		<category><![CDATA[Garmin]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[MapSource]]></category>
		<category><![CDATA[Unlock]]></category>
		<category><![CDATA[UnlockWizard MapID]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=508</guid>
		<description><![CDATA[For information only, How to Unlock Garmin maps. First get your hands on the desired Garmin City Navigator Downloadable Update for your country/city (MapSource A). In the compressed file should be the folders IMG, support and Windows plus a readme.txt. You will need a version of Garmin MapSource 6.13.1 or older which does NOT support [...]]]></description>
			<content:encoded><![CDATA[<p>For information only, How to Unlock Garmin maps.</p>
<p>First get your hands on the desired Garmin City Navigator Downloadable Update for your country/city (MapSource A).<br />
In the compressed file should be the folders IMG, support and Windows plus a readme.txt.</p>
<p>You will need a version of Garmin MapSource 6.13.1 or older which does NOT support Unlocking via the internet (MapSource B).<br />
This can be found in older version of the downloaded map update files (perhaps a 2007/2008 version).</p>
<p>Run the CN.msi installation file to install the old version of MapSource (B).</p>
<p>Run MapSource (B) and the UnlockWizard.</p>
<p>Now get your hands on Garmin Unlock Generator V1.5,<br />
Enter your 10 digit Unit ID, and select map product <custom mapset>, enter the FID (MapID) of the newest Downloadable Update (the one you want to Unlock).<br />
Click generate, copy the 25 digit map unlock code and paste this into the UnlockWizard.</p>
<p>At this stage you will have the older version of MapSource (B) with some old map.</p>
<p>Run the CNMENT2010Update_ENU.msi file in IMG folder (MapSource A).</p>
<p>Run MapSource (A). That&#8217;s it. The map should now be Unlocked.</p>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/how-to-unlock-garmin-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>thydzik&#8217;s WordPress Tool &#8211; a WordPress error and link extractor</title>
		<link>http://software.thydzik.com/thydziks-wordpress-tool-a-wordpress-error-and-link-extractor/</link>
		<comments>http://software.thydzik.com/thydziks-wordpress-tool-a-wordpress-error-and-link-extractor/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 18:15:40 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[thydzik's WordPress Tool]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=501</guid>
		<description><![CDATA[Here is a simple tool that might be useful to others, it does two main things; Parses your post&#8217;s content as XML and spits out any possible errors, and Extracts all external links, which can be exported as an Excel Tab delimited file. Post&#8217;s content errors Each post&#8217;s content is wrapped with XML dummy tags [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple tool that might be useful to others, it does two main things;</p>
<ol>
<li>Parses your post&#8217;s content as XML and spits out any possible errors, and</li>
<li>Extracts all external links, which can be exported as an Excel Tab delimited file.</li>
</ol>
<p><strong>Post&#8217;s content errors</strong></p>
<p>Each post&#8217;s content is wrapped with XML dummy tags and then passed with Microsoft’s XML parser. A feature of this parser is to check the XML structure when reading and output any errors. The WordPress Tool simply displays this raw output for each post. I have found it does do a good job of &#8216;typo&#8217; errors, but depending on the content it may be erroneous, especially if you have code snippets and such.</p>
<p><strong>Post&#8217;s external links</strong></p>
<p>This was the main reason for designing this tool, I needed to extract all the links and confirm they met my &#8216;lowercase word hyphen word&#8217; standard. You can export the links as a Tab delimited file, simply open it up in Excel.</p>
<p><strong>How to use</strong></p>
<ol>
<li>Download a WordPress eXtended RSS export of your blog. Go to Tools -&gt; Export of your Admin page.</li>
<li>Run thydzik&#8217;s WordPress Tool.</li>
<li>Click &#8216;Select File&#8217; and browse to the downloaded xml file.</li>
<li>A report of links will automatically be generated, click the Errors radio button to see the error report.</li>
<li>On either the Links or Errors option, click Export to export to a tab delimited file for Excel (note post content is not included in the file).</li>
</ol>
<p><strong>Screenshots</strong></p>
<p><a title="thydzik\'s WordPress Tool - Post content error example" rel="thumbnail" href="http://thydzik.com/images/thydziks-wordpress-tool-errors-screenshot.png"><img src="http://thydzik.com/images/thydziks-wordpress-tool-errors-screenshot-th.png" alt="thydzik's WordPress Tool - Post content error example" /></a></p>
<p><a title="thydzik\'s WordPress Tool - Post content links example" rel="thumbnail" href="http://thydzik.com/images/thydziks-wordpress-tool-links-screenshot.png"><img src="http://thydzik.com/images/thydziks-wordpress-tool-links-screenshot-th.png" alt="thydzik's WordPress Tool - Post content links example" /></a></p>
<p><strong>Download</strong></p>
<p><a href="http://thydzik.com/downloads/thydziks-wordpress-tool-v1.exe">Download thydzik&#8217;s WordPress Tool</a></p>
]]></content:encoded>
			<wfw:commentRss>http://software.thydzik.com/thydziks-wordpress-tool-a-wordpress-error-and-link-extractor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8 Suits &#8211; eight suited playing cards</title>
		<link>http://thydzik.com/8-suits-eight-suited-playing-cards/</link>
		<comments>http://thydzik.com/8-suits-eight-suited-playing-cards/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 17:39:23 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[8 Suits]]></category>
		<category><![CDATA[clover]]></category>
		<category><![CDATA[crescent]]></category>
		<category><![CDATA[poker]]></category>
		<category><![CDATA[Probability]]></category>
		<category><![CDATA[Star]]></category>
		<category><![CDATA[tear]]></category>
		<category><![CDATA[The Fat Pack]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=491</guid>
		<description><![CDATA[8 Suits, as you guessed is a deck of playing cards with an additional 4 suits, the clover, tear, crescent and star for a total of 104 cards plus a number of jokers. Priced at $12 USD per deck plus $5 per postage ($13 per postage internationally), it is a little steeper than The Fat [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://8suits.com/">8 Suits</a>, as you guessed is a deck of playing cards with an additional 4 suits, the clover, tear, crescent and star for a total of 104 cards plus a number of jokers.</p>
<p>Priced at $12 USD per deck plus $5 per postage ($13 per postage internationally), it is a little steeper than <a href="http://www.fatpackcards.co.uk/">The Fat Pack</a>, at roughly $16 USD including international postage. Unfortunately, I discovered the former after ordering the 8 Suits.</p>
<p><a title="8 Suits - 8 suited playing cards" rel="thumbnail" href="http://thydzik.com/images/8-suits-playing-cards-pack.jpg"><img src="http://thydzik.com/images/8-suits-playing-cards-pack-th.jpg" alt="8 Suits - 8 suited playing cards" /></a><br />
<a title="8 Suits - new suits clover, tear, crescent and star" rel="thumbnail" href="http://thydzik.com/images/8-suits-playing-cards-clover-tear-crescent-star.jpg"><img src="http://thydzik.com/images/8-suits-playing-cards-clover-tear-crescent-star-th.jpg" alt="8 Suits - new suits clover, tear, crescent and star" /></a><br />
<a title="8 Suits - height of deck" rel="thumbnail" href="http://thydzik.com/images/8-suits-playiing-cards-deck-height.jpg"><img src="http://thydzik.com/images/8-suits-playiing-cards-deck-height-th.jpg" alt="8 Suits - height of deck" /></a></p>
<p>The following show how 8 suits affect the probability of standard poker hands;</p>
<pre>Poker Hand         No of Combinations        Probability
--------------------------------------------------------
Royal Flush                         8       0.0000000870
Straight Flush                     72       0.0000007829
Five of a Kind                    728       0.0000079163
Flush                          10,216       0.0001110887
Four of a kind                 87,360       0.0009499522
Full House                    244,608       0.0026598662
Straight                      327,600       0.0035623208
Three of a Kind             3,075,072       0.0334383181
Two Pair                    5,381,376       0.0585170567
Pair                       41,000,960       0.4458442418
No Pair                    41,834,520       0.4549083692

Total                      91,962,520       1.000000000</pre>
<p>To view the <a href="http://thydzik.com/poker-hands-probability-calculator-for-any-number-of-suits-and-ranks-denominations/">probabilities for any other numbers of suits</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/8-suits-eight-suited-playing-cards/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Poker hands probability calculator for any number of suits and ranks (denominations)</title>
		<link>http://thydzik.com/poker-hands-probability-calculator-for-any-number-of-suits-and-ranks-denominations/</link>
		<comments>http://thydzik.com/poker-hands-probability-calculator-for-any-number-of-suits-and-ranks-denominations/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 16:09:12 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[any]]></category>
		<category><![CDATA[calculator]]></category>
		<category><![CDATA[equations]]></category>
		<category><![CDATA[poker]]></category>
		<category><![CDATA[Probability]]></category>
		<category><![CDATA[ranks]]></category>
		<category><![CDATA[suits]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=480</guid>
		<description><![CDATA[After purchasing a 5 suited deck of cards and an 8 suited deck of cards, I decided to work out how the numbers of suits affect the probabilities of each poker hand. Further, the following can calculate combinations and probabilities for any number of suits and any number of ranks (number of denominations). You will [...]]]></description>
			<content:encoded><![CDATA[<p>After purchasing a <a href="http://thydzik.com/5-dimension-a-5-suit-playing-cards/">5 suited deck of cards</a> and an <a href="http://thydzik.com/8-suits-eight-suited-playing-cards/">8 suited deck of cards</a>, I decided to work out how the numbers of suits affect the probabilities of each poker hand.</p>
<p>Further, the following can calculate combinations and probabilities for any number of suits and any number of ranks (number of denominations).</p>
<p><iFrame frameborder="0" src="http://thydzik.com/downloads/poker-probabilities.php" width="450" height="1000"></iFrame></p>
<p>You will notice;</p>
<ul>
<li>at 5 suits a Flush overtakes a Full House,</li>
<li>at 6 suits a Flush overtakes a Four of a Kind, and</li>
<li>at 13 suits a Flush overtakes a Five of a Kind.</li>
</ul>
<p>If you don&#8217;t believe the numbers, you are more than welcome to add them up and email me.</p>
<p>(thanks to <a href="http://www.codecogs.com/">CodeCogs</a> for there <a href="http://www.codecogs.com/latex/install.php">LaTeX Engine</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/poker-hands-probability-calculator-for-any-number-of-suits-and-ranks-denominations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP Factorial and Combination functions</title>
		<link>http://thydzik.com/php-factorial-and-combination-functions/</link>
		<comments>http://thydzik.com/php-factorial-and-combination-functions/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 07:02:48 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[combination]]></category>
		<category><![CDATA[factorial]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Probability]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=477</guid>
		<description><![CDATA[A quick post on two functions for PHP that provide factorial and combination support. function factorial($n) { if ($n &#60;= 1) { return 1; } else { return factorial($n - 1) * $n; } } function combinations($n, $k) { //note this defualts to 0 if $n &#60; $k if ($n &#60; $k) { return 0; [...]]]></description>
			<content:encoded><![CDATA[<p>A quick post on two functions for PHP that provide <a href="http://en.wikipedia.org/wiki/Factorial">factorial</a> and <a href="http://en.wikipedia.org/wiki/Combination">combination</a> support.</p>
<pre class="brush: php;">
function factorial($n) {
	if ($n &lt;= 1) {
		return 1;
	} else {
		return factorial($n - 1) * $n;
	}
}

function combinations($n, $k) {
	//note this defualts to 0 if $n &lt; $k
	if ($n &lt; $k) {
		return 0;
	} else {
		return factorial($n)/(factorial($k)*factorial(($n - $k)));
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/php-factorial-and-combination-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complete list of Foundation Fieldbus devices and search tool</title>
		<link>http://software.thydzik.com/complete-list-of-foundation-fieldbus-devices-and-search-tool/</link>
		<comments>http://software.thydzik.com/complete-list-of-foundation-fieldbus-devices-and-search-tool/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 17:49:10 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[complete]]></category>
		<category><![CDATA[devices]]></category>
		<category><![CDATA[FF]]></category>
		<category><![CDATA[Foundation Fieldbus]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=472</guid>
		<description><![CDATA[Currently it is quite difficult to search for a particular device by either device model, Vendor ID or Model ID on the Fieldbus Foundation website. The following provides a means to easily search this data, via the offline tool &#8216;Foundation Fieldbus device search&#8217;. The tool enables searching via Vendor, Model, Type and even Vendor and [...]]]></description>
			<content:encoded><![CDATA[<p>Currently it is quite difficult to search for a particular device by either device model, Vendor ID or Model ID on the <a href="http://www.fieldbus.org">Fieldbus Foundation</a> website.</p>
<p>The following provides a means to easily search this data, via the offline tool &#8216;Foundation Fieldbus device search&#8217;.</p>
<p>The tool enables searching via Vendor, Model, Type and even Vendor and Model IDs.<br />
<a title="Foundation Fieldbus Device Search tool" rel="thumbnail" href="http://thydzik.com/images/foundation-fieldbus-device-search-screenshot.png"><img src="http://thydzik.com/images/foundation-fieldbus-device-search-screenshot-th.png" alt="Foundation Fieldbus Device Search tool" /></a></p>
<p><a href="http://thydzik.com/downloads/foundation-fieldbus-device-search-v1.exe">Download the Foundation Fieldbus Device Search tool.</a></p>
<p><a href="http://thydzik.com/downloads/foundation-fieldbus-devices-as-of-may-2010.txt">Download the raw text file output.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://software.thydzik.com/complete-list-of-foundation-fieldbus-devices-and-search-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Longest Common Subsequence implemented in VBA (Visual Basic for Applications)</title>
		<link>http://thydzik.com/longest-common-subsequence-implemented-in-vba-visual-basic-for-applications/</link>
		<comments>http://thydzik.com/longest-common-subsequence-implemented-in-vba-visual-basic-for-applications/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 18:22:16 +0000</pubDate>
		<dc:creator>thydzik</dc:creator>
				<category><![CDATA[VBA/VBS]]></category>
		<category><![CDATA[backTrace]]></category>
		<category><![CDATA[LCS]]></category>
		<category><![CDATA[Longest Common Subsequence]]></category>
		<category><![CDATA[TraceBack]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://thydzik.com/?p=461</guid>
		<description><![CDATA[From Wikipedia, The longest common subsequence (LCS) problem is to find the longest subsequence common to all sequences in a set of sequences (often just two). The following is a VBA implementation of this problem. The following functions are included; String functions; longestCommonSubsequence - calculate an LCS array. backTraceUp and backTraceLeft - trace back either [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://en.wikipedia.org/wiki/Longest_common_subsequence_problem">Wikipedia</a>, <em>The longest common subsequence (LCS) problem is to find the longest subsequence common to all sequences in a set of sequences (often just two).</em></p>
<p>The following is a VBA implementation of this problem. The following functions are included;</p>
<p>String functions;</p>
<ul>
<li><strong>longestCommonSubsequence </strong>- calculate an LCS array.</li>
<li><strong>backTraceUp </strong>and <strong>backTraceLeft </strong>- trace back either defaulting up or left respectively, and find the LCS.</li>
<li><strong>getDiff </strong>- returns the difference of the two strings. The succeeding character of =, &#8211; or + indicated if the character was equal, removed or added, respectively.</li>
<li><strong>passGetDiffOutput </strong>- passes the output of getDiff so that =, &#8211; or + are now values in a 2 x n array, with indix 0 being equal, indix 1 being removed and indix 2 being added.</li>
</ul>
<p>Array functions;</p>
<ul>
<li><strong>longestCommonSubsequenceArr </strong>- calculate an LCS array.</li>
<li><strong>backTraceUpArr </strong>- trace back defaulting up and find the LCS.</li>
<li><strong>getDiffArr </strong>- returns the difference of the two arrays as a 2 x n array, with indix 0 being equal, indix 1 being removed and  indix 2 being added.</li>
</ul>
<p>Common functions;</p>
<ul>
<li><strong>max </strong>- standard maximum function.</li>
<li><strong>stringToArray </strong>- convert a string to an array for array functions.</li>
</ul>
<p>Examples;</p>
<ul>
<li><strong>exampleString</strong></li>
<li><strong>exampleArr</strong></li>
</ul>
<p><a href="http://thydzik.com/downloads/longest-common-subsequence.bas">Download the Basic (bas) File</a></p>
<p>Unfortunately, the limitations of VBA makes a dog&#8217;s dinner out of what would be some very concise code or, perhaps that’s just my implementation…</p>
<pre class="brush: vb;">
Option Explicit

Public Function longestCommonSubsequence(ByRef string1 As String, ByRef string2 As String) As Long()
    If string1 = vbNullString Or string2 = vbNullString Then
        Exit Function
    End If

    Dim num() As Long

    'define the array, note rows of zeros get added to front automatically
    ReDim num(Len(string1), Len(string2))

    Dim i As Long, j As Long

    For i = 1 To Len(string1)
        For j = 1 To Len(string2)
            If Mid$(string1, i, 1) = Mid$(string2, j, 1) Then
                num(i, j) = num(i - 1, j - 1) + 1
            Else
                num(i, j) = max(num(i - 1, j), num(i, j - 1))
            End If
        Next j
    Next i

    longestCommonSubsequence = num
End Function

Sub exampleString()

    Dim arr() As Long

    Dim string1 As String
    Dim string2 As String

    string1 = &quot;this is a find the haystack string&quot;
    string2 = &quot;this is a replace the needle string&quot;

    arr = longestCommonSubsequence(string1, string2)

    Dim s As String, t As String
    s = backTraceUp(arr, string1, string2, Len(string1), Len(string2))
    t = backTraceLeft(arr, string1, string2, Len(string1), Len(string2))
    Dim a As String, b As String
    a = getDiff(arr, string1, string2, Len(string1), Len(string2))

    Dim brr() As Long

    brr = passGetDiffOutput(a)
End Sub

Public Function max(ByRef a As Long, ByRef b As Long) As Long
    If a &gt;= b Then
        max = a
    Else
        max = b
    End If
End Function

'back traces c, defaulting in the up direction
Public Function backTraceUp(ByRef c() As Long, ByRef string1 As String, ByRef string2 As String, ByRef i As Long, ByRef j As Long) As String
    If i &lt; 1 Or j &lt; 1 Then
        backTraceUp = vbNullString
    ElseIf Mid$(string1, i, 1) = Mid$(string2, j, 1) Then
        'equal characters, save it and then go up and left
        backTraceUp = backTraceUp(c, string1, string2, i - 1, j - 1) &amp; Mid$(string1, i, 1)
    Else
        'go in the direction of the highest number, defaulting to up
        If (c(i, j - 1) &gt; c(i - 1, j)) Then
            backTraceUp = backTraceUp(c, string1, string2, i, j - 1)
        Else
            backTraceUp = backTraceUp(c, string1, string2, i - 1, j)
        End If
    End If
End Function

'back traces c, defaulting in the left direction
Public Function backTraceLeft(ByRef c() As Long, ByRef string1 As String, ByRef string2 As String, ByRef i As Long, ByRef j As Long) As String
    If i &lt; 1 Or j &lt; 1 Then
        backTraceLeft = vbNullString
    ElseIf Mid$(string1, i, 1) = Mid$(string2, j, 1) Then
        'equal characters, save it and then go up and left
        backTraceLeft = backTraceLeft(c, string1, string2, i - 1, j - 1) &amp; Mid$(string1, i, 1)
    Else
        'go in the direction of the highest number, defaulting to left
        If (c(i, j - 1) &gt;= c(i - 1, j)) Then
            backTraceLeft = backTraceLeft(c, string1, string2, i, j - 1)
        Else
            backTraceLeft = backTraceLeft(c, string1, string2, i - 1, j)
        End If
    End If
End Function

'the following function returns a string with indication to what was deleted or added
'proceding character can be;
' = no change
' - deletion
' + addition
Public Function getDiff(ByRef c() As Long, ByRef stringOld As String, ByRef stringNew As String, ByRef i As Long, ByRef j As Long) As String
    If i &gt; 0 Then
        If j &gt; 0 Then 'both are greater than zero
            'can only do the following comparison when i and j are greater than zero
            If Mid$(stringOld, i, 1) = Mid$(stringNew, j, 1) Then
                getDiff = getDiff(c, stringOld, stringNew, i - 1, j - 1) &amp; Mid$(stringOld, i, 1) &amp; &quot;=&quot;
            Else
                If i = 0 Then
                    getDiff = getDiff(c, stringOld, stringNew, i, j - 1) &amp; Mid$(stringNew, j, 1) &amp; &quot;+&quot;
                ElseIf c(i, j - 1) &gt;= c(i - 1, j) Then
                    getDiff = getDiff(c, stringOld, stringNew, i, j - 1) &amp; Mid$(stringNew, j, 1) &amp; &quot;+&quot;
                ElseIf j = 0 Then
                    getDiff = getDiff(c, stringOld, stringNew, i - 1, j) &amp; Mid$(stringOld, i, 1) &amp; &quot;-&quot;
                ElseIf c(i, j - 1) &lt; c(i - 1, j) Then
                    getDiff = getDiff(c, stringOld, stringNew, i - 1, j) &amp; Mid$(stringOld, i, 1) &amp; &quot;-&quot;
                Else
                    getDiff = vbNullString
                End If
            End If
        Else 'i is is greater than zero
                If j = 0 Then
                    getDiff = getDiff(c, stringOld, stringNew, i - 1, j) &amp; Mid$(stringOld, i, 1) &amp; &quot;-&quot;
                ElseIf c(i, j - 1) &lt; c(i - 1, j) Then
                    getDiff = getDiff(c, stringOld, stringNew, i - 1, j) &amp; Mid$(stringOld, i, 1) &amp; &quot;-&quot;
                Else
                    getDiff = vbNullString
                End If
        End If
    Else
        If j &gt; 0 Then 'j is  greater than zero
                If i = 0 Then
                    getDiff = getDiff(c, stringOld, stringNew, i, j - 1) &amp; Mid$(stringNew, j, 1) &amp; &quot;+&quot;
                ElseIf c(i, j - 1) &gt;= c(i - 1, j) Then
                    getDiff = getDiff(c, stringOld, stringNew, i, j - 1) &amp; Mid$(stringNew, j, 1) &amp; &quot;+&quot;
                Else
                    getDiff = vbNullString
                End If
        Else 'none are greater than zero
                getDiff = vbNullString
        End If
    End If
End Function

'this function returns the location of the string difference
Public Function passGetDiffOutput(ByRef outputStr As String) As Long()
    Dim i As Long
    i = 1

    Dim typeChr As String

    Dim oldi As Long
    Dim newi As Long
    oldi = 0
    newi = 0

    Dim toFrom() As Long
    Dim toFromCount As Long
    toFromCount = -1

    Dim typeChrPrev As String
    typeChrPrev = vbNullString

    Do While i &lt; Len(outputStr)
        typeChr = Mid$(outputStr, i + 1, 1)
        Select Case typeChr
            Case &quot;=&quot;
                If typeChr &lt;&gt; typeChrPrev Then

                    'check if it is comming from a deletion
                    If typeChrPrev = &quot;-&quot; Then
                        toFrom(2, toFromCount) = oldi
                    End If

                    'check if it is comming from a addition
                    If typeChrPrev = &quot;+&quot; Then
                        toFrom(2, toFromCount) = newi
                    End If
                End If

                oldi = oldi + 1 'update old index
                newi = newi + 1 'update new index
            Case &quot;-&quot;
                'check if it is comming from a addition
                If typeChrPrev = &quot;+&quot; Then
                    toFrom(2, toFromCount) = newi
                End If

                oldi = oldi + 1 'update old index
                If typeChr &lt;&gt; typeChrPrev Then
                    toFromCount = toFromCount + 1
                    ReDim Preserve toFrom(2, toFromCount)
                    'let old be -1
                    toFrom(0, toFromCount) = -1
                    toFrom(1, toFromCount) = oldi
                End If
            Case &quot;+&quot;
                'check if it is comming from a deletion
                If typeChrPrev = &quot;-&quot; Then
                    toFrom(2, toFromCount) = oldi
                End If

                newi = newi + 1 'update new index
                If typeChr &lt;&gt; typeChrPrev Then
                    toFromCount = toFromCount + 1
                    ReDim Preserve toFrom(2, toFromCount)
                    'let new be 1
                    toFrom(0, toFromCount) = 1
                    toFrom(1, toFromCount) = newi
                End If
        End Select

        i = i + 2
        typeChrPrev = typeChr
    Loop

    'check if it ended on a deletion or adition
    If typeChrPrev = &quot;-&quot; Then
        toFrom(2, toFromCount) = oldi
    End If

    If typeChrPrev = &quot;+&quot; Then
        toFrom(2, toFromCount) = newi
    End If

    passGetDiffOutput = toFrom
End Function

'note, arrays must be single dimension
Public Function longestCommonSubsequenceArr(ByRef array1() As String, ByRef array2() As String) As Long()
    On Error Resume Next
    If UBound(array1, 2) &gt; 0 Or UBound(array2, 2) &gt; 0 Then 'multidimensional arrays
        If Error = vbNullString Then
            Exit Function
        End If
    End If

    If UBound(array1) &lt; 0 Or UBound(array2) &lt; 0 Then 'check if arrays are bounded
        If Error &lt;&gt; vbNullString Then
            Exit Function
        End If
    End If

    Dim num() As Long

    'define the array, note rows of zeros get added to front automatically
    ReDim num(UBound(array1) + 1, UBound(array2) + 1)

    Dim i As Long, j As Long

    'note, arrays must always start at indice zero.
    For i = 0 To UBound(array1)
        For j = 0 To UBound(array2)
            If array1(i) = array2(j) Then
                num(i + 1, j + 1) = num(i, j) + 1
            Else
                num(i + 1, j + 1) = max(num(i, j + 1), num(i + 1, j))
            End If
        Next j
    Next i

    longestCommonSubsequenceArr = num
End Function

Public Function stringToArray(ByRef str As String) As String()
    Dim i As Long
    Dim arr() As String
    ReDim arr(Len(str) - 1)
    For i = 1 To Len(str)
        arr(i - 1) = Mid$(str, i, 1)
    Next i
    stringToArray = arr
End Function

Sub exampleArr()

    Dim string1 As String
    Dim string2 As String

    string1 = &quot;this is a find the haystack string&quot;
    string2 = &quot;this is a replace the needle string&quot;

    Dim a1() As String
    Dim a2() As String

    a1 = stringToArray(string1)
    a2 = stringToArray(string2)

    Dim c() As Long

    c = longestCommonSubsequenceArr(a1, a2)

    Dim str() As String

    str = backTraceUpArr(c, a1, a2, UBound(a1), UBound(a2))

    Dim dif() As String
    dif = getDiffArr(c, a1, a2, UBound(a1), UBound(a2))

End Sub

'back traces c, defaulting in the up direction
Public Function backTraceUpArr(ByRef c() As Long, ByRef array1() As String, ByRef array2() As String, ByRef i As Long, ByRef j As Long) As String()
    Dim arr() As String
    If i &lt; 0 Or j &lt; 0 Then
        backTraceUpArr = arr
    ElseIf array1(i) = array2(j) Then
        'equal characters, save it and then go up and left
        arr = backTraceUpArr(c, array1, array2, i - 1, j - 1)
        'check the bounding of arr
        Dim bound As Long
        On Error Resume Next
        bound = UBound(arr)
        If Error &lt;&gt; vbNullString Then
            ReDim arr(0)
            arr(0) = array1(i)
        Else 'no error
            ReDim Preserve arr(bound + 1)
            arr(bound + 1) = array1(i)
        End If
        backTraceUpArr = arr
    Else
        'go in the direction of the highest number, defaulting to up
        If (c(i + 1, j) &gt; c(i, j + 1)) Then
            backTraceUpArr = backTraceUpArr(c, array1, array2, i, j - 1)
        Else
            backTraceUpArr = backTraceUpArr(c, array1, array2, i - 1, j)
        End If
    End If
End Function

'returns a 2xn array, where
'indice 0 are equal
'indice 1 are deletions
'indice 2 are additions
Public Function getDiffArr(ByRef c() As Long, ByRef arrayOld() As String, ByRef arrayNew() As String, ByRef i As Long, ByRef j As Long) As String()
    Dim arr() As String
    Dim bound As Long
    On Error Resume Next
    If i &gt;= 0 Then
        If j &gt;= 0 Then 'both are greater or equal to zero
            'can only do the following comparison when i and j are greater or equal than zero
            If arrayOld(i) = arrayNew(j) Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i - 1, j - 1)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(0, 0) = arrayOld(i)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(0, bound + 1) = arrayOld(i)
                    End If
                    getDiffArr = arr
            Else
                If i = 0 Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i, j - 1)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(2, 0) = arrayNew(j)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(2, bound + 1) = arrayNew(j)
                    End If
                    getDiffArr = arr
                ElseIf c(i + 1, j - 1 + 1) &gt;= c(i - 1 + 1, j + 1) Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i, j - 1)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(2, 0) = arrayNew(j)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(2, bound + 1) = arrayNew(j)
                    End If
                    getDiffArr = arr
                ElseIf j = 0 Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i - 1, j)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(1, 0) = arrayOld(i)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(1, bound + 1) = arrayOld(i)
                    End If
                    getDiffArr = arr
                ElseIf c(i + 1, j - 1 + 1) &lt; c(i - 1 + 1, j + 1) Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i - 1, j)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(1, 0) = arrayOld(i)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(1, bound + 1) = arrayOld(i)
                    End If
                    getDiffArr = arr
                Else
                    getDiffArr = arr
                End If
            End If
        Else 'i is is greater or equal to zero
                If j = 0 Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i - 1, j)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(1, 0) = arrayOld(i)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(1, bound + 1) = arrayOld(i)
                    End If
                    getDiffArr = arr
                ElseIf c(i + 1, j - 1 + 1) &lt; c(i - 1 + 1, j + 1) Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i - 1, j)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(1, 0) = arrayOld(i)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(1, bound + 1) = arrayOld(i)
                    End If
                    getDiffArr = arr
                Else
                    getDiffArr = arr
                End If
        End If
    Else
        If j &gt;= 0 Then 'j is  greater than zero
                If i = 0 Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i - 1, j)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(2, 0) = arrayNew(j)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(2, bound + 1) = arrayNew(j)
                    End If
                    getDiffArr = arr
                ElseIf c(i + 1, j - 1 + 1) &gt;= c(i - 1 + 1, j + 1) Then
                    arr = getDiffArr(c, arrayOld, arrayNew, i, j - 1)
                    bound = UBound(arr, 2) 'check the bounding of arr
                    If Error &lt;&gt; vbNullString Then
                        Err.Clear
                        ReDim arr(2, 0)
                        arr(2, 0) = arrayNew(j)
                    Else 'no error
                        ReDim Preserve arr(2, bound + 1)
                        arr(2, bound + 1) = arrayNew(j)
                    End If
                    getDiffArr = arr
                Else
                    getDiffArr = arr
                End If
        Else 'none are greater than zero
                getDiffArr = arr
        End If
    End If
End Function
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thydzik.com/longest-common-subsequence-implemented-in-vba-visual-basic-for-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->