<rss version="2.0"><channel><title>Ken's Blog</title><item><title><![CDATA[Microsoft releases Visual Studio 2010]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=7c290a95-817f-47f5-8ed6-8c2e7c31ba50#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[Microsoft launches Visual Studio 2010.  There are a lot of new features including new support for writing code to take advantage of parallel processors.  Microsoft offers a free version of its developer tools at<div><br></div><div><a href="http://www.microsoft.com/express/">http://www.microsoft.com/express/</a>. </div>]]></description></item><item><title><![CDATA[Offsite Backups]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=996d27cf-cbe5-4521-9c53-505770ed185e#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[The news today has pictures of severe flooding in the northeast.  While hopeful that the damage is minimal, it is a reminder to plan for such tragedy.  The pictures show first floors of businesses underwater.  It is easy to think that a disaster will never hit your business but the odds are that at some point one will.  I have developed and maintained IT systems for 20 years and have had to use backups at least a dozen times.  That doesn't sound like a lot over a 20 years career but without those backups, my career wouldn't have been 20 years.<div><br></div><div>It's not enough to just backup your data, you must also think about where and how backups are stored.  A good backup policy should store data periodically offsite.  If flooding were to destroy your computers and your backups are sitting right next to the computer then you have a problem.  But if your backups are 10 miles away in a water and fireproof safe, then you still have to recover from your disaster but you now have the ability to do just that.</div><div><br></div><div>Your backup policy doesn't mean that you create a backup every night to be taken off-site but you should perform a backup on some interval such as weekly or monthly.  The importance of your data to your business and the effort to recreate should determine how often you perform a backup for offsite.</div><div><br></div><div>Faster networks also make it much easier to backup remotely but even with remote backups, it is still  a good idea to have a physical backup offsite in fireproof and waterproof location.</div>]]></description></item><item><title><![CDATA[Profiler added to source control add-in for Access 2007]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=913da34d-115d-4fda-aa56-308e7a55424d#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[The Source Control add-in now has an easy to use code profiler included with it.  The profiler will keep track of the execution time for all subroutines and functions and then generate a report to help you optimize your VBA code.  The add-in is completely free.  Feel free to download it at<div><br></div><div><a href="/scaddin.aspx">http://www.slbdevelopment.com/scaddin.aspx</a></div>]]></description></item><item><title><![CDATA[Access Basic Code to traverse a directory]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=ae9d4ad7-1945-4524-910f-ac8ea057aec6#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[I wrote a quick function that will recursively traverse a file system and store the files in Access database.  For the code to work, you need to create a table with an attachment name fileobj.<div><br></div><div><div><br></div><div>Sub test()</div><div>Dim c As New clsProfile</div><div>c.startFunction "test"</div><div>  traverseDir "C:\Course Technology\"</div><div>c.endFunction</div><div>Set c = Nothing</div><div>End Sub</div><div><br></div><div><br></div><div>Sub traverseDir(sPath As String)</div><div>Dim c As New clsProfile</div><div>c.startFunction "traverseDir"</div><div>  Dim sFile As String</div><div>  Dim db As Database</div><div>  Dim rs As Recordset</div><div>  Dim rsFile As Recordset2</div><div>  Dim filenames() As String</div><div>  Dim fileCount As Integer</div><div>  ReDim filenames(1)</div><div>  Dim i As Integer</div><div>  </div><div>  fileCount = 1</div><div>  Set db = CurrentDb</div><div>  Set rs = db.OpenRecordset("tblFiles")</div><div>  sFile = Dir(sPath & "*.*", vbDirectory)</div><div>  </div><div>  Do While Len(sFile) > 0</div><div>    filenames(fileCount) = sFile</div><div><br></div><div>    sFile = Dir()</div><div>    If sFile <> "" Then</div><div>     fileCount = fileCount + 1</div><div>     ReDim Preserve filenames(fileCount)</div><div>    End If</div><div>  Loop</div><div>  </div><div>  For i = 1 To fileCount</div><div>   sFile = filenames(i)</div><div>   If sFile <> "." And sFile <> ".." And UCase(Right(sFile, 4)) <> ".MDB" Then</div><div>    If (GetAttr(sPath & sFile) And vbDirectory) = vbDirectory Then</div><div>     traverseDir sPath & sFile & "\"</div><div>    Else</div><div>     rs.AddNew</div><div>     rs("FileName") = sFile</div><div>     rs("dir") = sPath</div><div>     Set rsFile = rs.Fields("FileObj").Value</div><div>     rsFile.AddNew</div><div>     rsFile.Fields("filedata").LoadFromFile sPath & sFile</div><div>     </div><div>     rsFile.Update</div><div>     rsFile.Close</div><div>     rs.Update</div><div>    End If</div><div>   End If</div><div>  Next</div><div>  </div><div>  rs.Close</div><div>  c.endFunction</div><div>  Set c = Nothing</div><div>End Sub</div></div>]]></description></item><item><title><![CDATA[New Release of SC Add-In for Access 2007]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=9b6a9c15-6462-4adb-ac85-359eb74bcdf9#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[There is a new release of the source control add-in for Access with 3 bug fixes.  Objects of different type can now have the same name.  Apostrophe can be used in an object name.  Report shows up as a type when viewing source control.  The Readme.txt has been updated.<div><br></div><div><a href="/scaddin.aspx">Get Add-In</a><br></div>]]></description></item><item><title><![CDATA[Free Source Control Add-In for Microsoft Access 2007]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=e277f72e-6d70-4c7c-9b38-e7d73c7e34ff#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<span class="Apple-style-span" style="border-collapse: collapse; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; ">We have been doing some Microsoft Access 2007 development lately and were a little disappointed that source control for Access was either expensive or consists of a home grown solution with subversion.  So below is a simple add-in for Microsoft Access 2007 that supports versioning and simple diff.  The add-in is free to use and the back end database is an Access 2007 database so it can easily be enhanced.<div><br></div><div><img src="/ImageHandler.ashx?UploadedFile=true&image=http://www.slbdevelopment.com:80//App_Data/UserImages/Image/scaddin.png" alt="Source Control for Access 2007" title="Source Control for Access 2007" width="500" height="341" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div><br></div><div><a href="/DownloadHandler.ashx?pg=f2e7baff-5e44-4dc1-96fd-ca457f8cae92&section=57058ea9-87a9-427c-9f9b-43895aa4cf3c&file=scaddin.zip" style="color: rgb(0, 0, 0); ">Download</a></div></span>]]></description></item><item><title><![CDATA[Web Directory]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=bc62409b-043b-4cd5-b4e3-5c962ea20153#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[SLB Development is offering a free web directory to quality sites.  The site can be accessed at<div><br></div><div><a href="http://directory.slbdevelopment.com">http://directory.slbdevelopment.com</a></div><div><br></div><div>Please check out the listed sites or submit your own site.</div>]]></description></item><item><title><![CDATA[Flash Games on Facebook]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=431af554-f13c-470a-be69-e23eb578f1c1#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[I have developed a game platform to support Flash and Silverlight games on Facebook.  You can check it out at<div><br></div><div><a href="http://apps.facebook.com/ctarcade/">http://apps.facebook.com/ctarcade/</a></div>]]></description></item><item><title><![CDATA[New Directory for Lawyers in SC]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=1a01dcf5-1cdf-406c-a2c1-f23ea31652fb#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[I have written a directory for Attorneys specifically geared towards ones practicing in SC.  <div><br></div><div><a href="http://www.sclawyerfinder.com/">http://www.sclawyerfinder.com/</a></div><div><br></div><div>If you are an Attorney and would like to list your firm, please do.  There is no cost.  Inbound links to your website help your search engine ranking and also potentially expose your website's firm to more people seeing it.</div>]]></description></item><item><title><![CDATA[Upcoming SC Best Law Firm Website Contest]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=5c7bb9a0-c89e-41ce-b888-71e2899bba81#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<p>I am preparing one of my client's websites for the <a href="http://www.sclawyersweekly.com/">SC Lawyers Weekly</a> annual Best Law Firm website.  We won last year with <a href="http://www.erisaexperience.com">ERISA Experience</a>.  In previous years, they have won an award with their main <a href="http://www.fosterfoster.com">website</a>.  I have consulted with them and we have some pretty good ideas so that we hopefully win again this year.</p>]]></description></item><item><title><![CDATA[Downloads]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=ad73117e-813d-44ee-b068-5aace8047163#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[Throughout the years I have written a lot of software with various tools that doesn't have any commercial value but could have value to others.  I have decided to start making it available for other people to use on a new download page.<div><br></div><div><a href="/downloads.aspx">http://www.slbdevelopment.com/downloads.aspx</a></div><div><br></div><div><a href="/downloads.aspx"></a>Over the next couple of weeks, I will be adding source code for many different environments. </div>]]></description></item><item><title><![CDATA[Excel Forecast and Moving Average for Microsoft Access]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=6bf28bd0-9853-489b-a03f-d30fe0cfae9d#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[The forecast function from Excel as well as moving average are two important functions that are missing from Microsoft Access.  Recently I developed a small stock market application in Microsoft Access and needed both of these functions.  I am making them available here in case anyone else can benefit from these two functions.<div><br></div><div><br></div><div><p class="MsoNormal">Function xl_forecast(num As Integer, x_values() As Double, 
y_values() As Double) As Double<o:p></o:p></p>
<p class="MsoNormal"><o:p>             Dim x_Avg As Double</o:p></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">            Dim y_Avg As Double<o:p></o:p></p>
<p class="MsoNormal"><o:p>            Dim b As Double</o:p></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">            Dim a As Double<o:p></o:p></p>
<p class="MsoNormal">            Dim i As Integer<o:p></o:p></p>
<p class="MsoNormal"><o:p>            Dim tempTop As Double</o:p></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">            Dim tempBottom As Double<o:p></o:p></p>
<p class="MsoNormal">            <o:p></o:p></p>
<p class="MsoNormal">            For i = 1 To UBound(x_values)<o:p></o:p></p>
<p class="MsoNormal">          <o:p></o:p></p>
<p class="MsoNormal">                x_Avg = x_Avg + x_values(i)<o:p></o:p></p>
<p class="MsoNormal">            Next<o:p></o:p></p>
<p class="MsoNormal">            x_Avg = x_Avg / UBound(x_values)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">           <o:p></o:p></p>
<p class="MsoNormal">            For i = 1 To UBound(y_values)<o:p></o:p></p>
<p class="MsoNormal">                y_Avg = y_Avg + y_values(i)<o:p></o:p></p>
<p class="MsoNormal">            Next<o:p></o:p></p>
<p class="MsoNormal">            y_Avg = y_Avg / UBound(y_values)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">            For i = 1 To UBound(y_values)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">                tempTop = tempTop + (x_values(i) - x_Avg) * 
(y_values(i) - y_Avg)<o:p></o:p></p>
<p class="MsoNormal">                tempBottom = tempBottom + ((x_values(i) - 
x_Avg) * (x_values(i) - x_Avg))<o:p></o:p></p>
<p class="MsoNormal">            Next<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">            b = tempTop / tempBottom<o:p></o:p></p>
<p class="MsoNormal">            a = y_Avg - b * x_Avg<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">            xl_forecast = a + b * num<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">End Function<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Function moving_average(x_values() As Double) As 
Double<o:p></o:p></p>
<p class="MsoNormal">      Dim x_Avg As Double<o:p></o:p></p>
<p class="MsoNormal">      Dim i As Integer<o:p></o:p></p>
<p class="MsoNormal"><o:p>             For i = 1 To UBound(x_values)</o:p></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">                x_Avg = x_Avg + x_values(i)</p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">            Next<o:p></o:p></p>
<p class="MsoNormal"><o:p>     moving_average = x_Avg / UBound(x_values)</o:p></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">End Function<o:p></o:p></p></div>]]></description></item><item><title><![CDATA[If you are using Cookies in PHP, be careful with redirects.]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=1e5da894-6202-486c-a81e-c7cfeca2117e#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[I moved a website that I wrote 3 years ago using PHP4 to a new server using PHP5.  I had tested the code and everything worked great in test but in production the login function kept failing.  The problem was a simple fix but I couldn't get my head around it, because it had worked for several years and was working in test.  The setcookie function was not setting my cookies in production which led me to believe that something was wrong with a setting in the php.ini file.  So after studying the file for about 45 minutes, I still found nothing wrong.  I checked the version of PHP in the test environment and it was the same version.  So I decided to start placing debug messages in the PHP code on the production server and still nothing.  Then I told the script to die or stop running right after setting cookie and lo and behold the cookies were set.<div><br></div><div>So if the cookies were set and the script was stopped, then the code worked fine but if I let the code run then the cookies never got sent back to the browser.  So I started looking at my code and I was doing a redirect after login to another page.  The code had sent a request back to the browser to redirect and load the cookie but the version of PHP I was using did not behave the same.  So I modified the redirect and it worked.</div><div><br></div>]]></description></item><item><title><![CDATA[Facebook working on adding a compiler for PHP]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=60e90b81-36b5-44af-b346-c1977377a3dc#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[PHP is an interpreted language and with a default installation can be slower than other popular web development languages such as Java and C#.  Even so, PHP has become the most popular web development language with some of the largest websites in the world using it including Facebook.  Facebook isn't exactly a small site, understatement of the year.  So any performance gain saves Facebook lots of money. Facebook decided to create their own compiler for PHP to help improve performance or at least that is the rumor.  There are solutions to the problem that Facebook is addressing but if they end up doing it better, we all benefit.<div><br></div><div><a href="http://www.sdtimes.com/blog/post/2010/01/30/Facebook-rewrites-PHP-runtime.aspx">http://www.sdtimes.com/blog/post/2010/01/30/Facebook-rewrites-PHP-runtime.aspx</a></div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; ">But that still doesn't change the fact that PHP can be a tad pokey on the server. Well, when I said this to the Zend folks, their immediate reaction was similar to that of a gestapo officer looking for a spy: "What? Who said that? Tell us their name!"</span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><font class="Apple-style-span" face="Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 17px;"><br></span></font><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; ">Clearly, Zend does not think there is a problem. But Facebook did. Not enough of a problem to support more than one paycheck, but then, considering how many users they have, even a 1 percent performance gain would be a massive help.</span></div></blockquote>]]></description></item><item><title><![CDATA[Convert a Word Document to a Wave File]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=b1370c3a-7f5a-4b47-892b-7754142a2d5b#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<div>The code below is an interesting little code snippet that will take a word document and create an audio file of the contents.  It uses the Microsoft Speech API to convert the text to a wave file.</div><div><br></div><div><br></div><div><p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System.Collections.Generic;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System.Linq;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System.Text;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System.Speech;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> SpeechLib 
;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System.Threading;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
Microsoft.Office.Interop;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">using</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
System.Windows.Forms;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 14pt">namespace</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"> 
ConsoleApplication2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">    
<span style="COLOR: blue">class</span> <span style="COLOR: #2b91af">Program<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">    
{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">        [<span style="COLOR: #2b91af">STAThread</span>] <span style="COLOR: green">// for 
OLE<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">        <span style="COLOR: blue">static</span> <span style="COLOR: blue">void</span> 
Main(<span style="COLOR: blue">string</span>[] args)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">        
{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">           
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: #2b91af">SpVoice</span> sv = <span style="COLOR: blue">new</span> 
<span style="COLOR: #2b91af">SpVoice</span>();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: blue">object</span> file = <span style="COLOR: #a31515">"c:\\temp\\cloud.docx"</span>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: #2b91af">SpeechStreamFileMode</span> SpFileMode = <span style="COLOR: #2b91af">SpeechStreamFileMode</span>.SSFMCreateForWrite;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: #2b91af">SpFileStream</span> SpFileStream = <span style="COLOR: blue">new</span> <span style="COLOR: #2b91af">SpFileStream</span>();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
SpFileStream.Open(<span style="COLOR: #a31515">"c:\\temp\\cloud.wav"</span>, 
SpFileMode, <span style="COLOR: blue">false</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
sv.AudioOutputStream = SpFileStream;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
Microsoft.Office.Interop.Word.<span style="COLOR: #2b91af">ApplicationClass</span> wordApp = <span style="COLOR: blue">new</span> Microsoft.Office.Interop.Word.<span style="COLOR: #2b91af">ApplicationClass</span>();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: blue">object</span> nullobj = System.Reflection.<span style="COLOR: #2b91af">Missing</span>.Value;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
Microsoft.Office.Interop.Word.<span style="COLOR: #2b91af">Document</span> doc = 
wordApp.Documents.Open(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: blue">ref</span> file, <span style="COLOR: blue">ref</span> 
nullobj, <span style="COLOR: blue">ref</span> nullobj,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">                                                  
<span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> 
nullobj,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">                                                  
<span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> 
nullobj,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">                                                  
<span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> 
nullobj, <span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> nullobj, <span style="COLOR: blue">ref</span> 
nullobj, <span style="COLOR: blue">ref</span> nullobj);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
doc.ActiveWindow.Selection.WholeStory();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
doc.ActiveWindow.Selection.Copy();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            <span style="COLOR: #2b91af">String</span> s = <span style="COLOR: #2b91af">Clipboard</span>.GetText() ?? <span style="COLOR: #a31515">""</span>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            doc.Close(<span style="COLOR: blue">ref</span> nullobj,<span style="COLOR: blue">ref</span> 
nullobj,<span style="COLOR: blue">ref</span> nullobj);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            sv.Speak(s, 
<span style="COLOR: #2b91af">SpeechVoiceSpeakFlags</span>.SVSFlagsAsync);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
sv.WaitUntilDone(<span style="COLOR: #2b91af">Timeout</span>.Infinite);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">            
SpFileStream.Close();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">        
}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">    
}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 14pt">}<o:p></o:p></span></p></div>]]></description></item><item><title><![CDATA[Sudoku Algorithm in VB.net]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=8d17dfa3-2fc7-48fd-9238-f51e3556936b#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<span class="Apple-style-span" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 12px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">Sudoku is a number-based  puzzle game. The object is to fill in the remaining numbers on a 9x9 grid in such a way that no number in a row, column or cube is the same. The game has become increasingly popular and games can be found on every computer platform. I noticed that many of the implementations of this game had a limited number of puzzles.  This struck me as strange, why not create a board randomly.  So I decided to create an algorithm that would generate random boards.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">I decided to create a brute force algorithm that tries to randomly create the board and detect whether it fails or not. This is not elegant but it seems to work amazingly well.  If the algorithm fails it starts over from the beginning and does it all again. I was concerned about speed with this approach but surprisingly it finds a board in a split second.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">Here is the code. It should be simple from here to put a GUI on to the front-end and create a Sudoku game.</p><pre id="line9" style="margin-top: 0px; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: 'Courier New', Courier, monospace; font-size: 11px; white-space: pre-wrap; word-wrap: break-word; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); background-color: rgb(221, 221, 221); line-height: 1.5em; ">Module Module1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    Dim a(9, 9) As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    Function checkrow(ByVal iRow As Integer, ByVal icol As Integer) As Boolean<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim i As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        For i = 1 To icol - 1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            If a(iRow, i) = a(iRow, icol) Then<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                Return False<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            End If<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Return True<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    End Function<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    Function checkcol(ByVal iRow As Integer, ByVal icol As Integer) As Boolean<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim i As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        For i = 1 To iRow - 1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            If a(i, icol) = a(iRow, icol) Then<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                Return False<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            End If<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Return True<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    End Function<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    Function checkcube(ByVal irow As Integer, ByVal icol As Integer) As Boolean<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim trow As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim tcol As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim i As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim j As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        If irow < 4 Then trow = 1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        If irow > 3 And irow < 7 Then trow = 4<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        If irow > 6 Then trow = 7<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        If icol < 4 Then tcol = 1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        If icol > 3 And icol < 7 Then tcol = 4<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        If icol > 6 Then tcol = 7<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        For i = trow To trow + 2<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            For j = tcol To tcol + 2<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                If a(i, j) = a(irow, icol) And Not (i = irow And j = icol) Then<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    Return False<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                End If<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Return True<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    End Function<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    Sub initGrid()<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim i As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim j As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        For i = 1 To 9<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            For j = 1 To 9<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                a(i, j) = 0<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    End Sub<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    Sub Main()<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim r As New Random(Second(Now()) * Minute(Now()) * Hour(Now))<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim cRow As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim cCol As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim StartOverRow As Integer<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim sCheckedNumbers As String<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        For cRow = 1 To 9<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            For cCol = 1 To 9<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                startoverrow = 0<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                sCheckedNumbers = " "<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                Do While (startoverrow <= 46) And (Not checkrow(cRow, cCol) Or Not checkcube(cRow, cCol) Or Not checkcol(cRow, cCol) Or a(cRow, cCol) = 0)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    a(cRow, cCol) = r.Next(1, 10)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    If startoverrow >= 45 Then startoverrow = startoverrow + 1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    If InStr(sCheckedNumbers, a(cRow, cCol)) < 1 Then<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                        StartOverRow = StartOverRow + a(cRow, cCol)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                        sCheckedNumbers = sCheckedNumbers & a(cRow, cCol)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    End If<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                Loop<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                If startoverrow > 45 And sCheckedNumbers.Length = 10 Then ' we checked all numbers so we are at a deadend, lets start over<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    cCol = 0<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    cRow = 1<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                    initGrid()<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                End If<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        FileOpen(1, "c:\temp\grid.txt", OpenMode.Output)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Dim s As String<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        For cRow = 1 To 9<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            s = ""<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            For cCol = 1 To 9<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">                s = s & a(cRow, cCol)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">            PrintLine(1, s)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        Next<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">        FileClose(1)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">    End Sub<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">End Module<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "></pre><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; "> </p></span>]]></description></item><item><title><![CDATA[Flash 3D Libraries]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=b629c50e-4a8e-4413-bf90-763b4111d2e5#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<span class="Apple-style-span" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 12px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">This year, 395 million dollars has been invested by Venture Capital funds into web 3D.  How does it affect the small to medium size business owner?  Is 3D important?  It really depends on the type of business.  The immediate payoff with 3D will be with product demonstration and collobaration.  As a small business owner you have to look at your type of business and demographic to determine if 3D is critical to you.  The good thing is that if it is important, development costs for a 3D application are now in reach. </p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">Adobe has released Actionscript 3 and performance is good enough to allow easy web 3d development.  Open source has stepped up to the challenge and there are now 3 popular  and robust 3d engines developed in actionscript3:  Away3d, PaperEngine3d, and Sandy 3d.  I am currently working on a project using Away3d and will post my findings about the Away3d engine after the project is completed. </p></span>]]></description></item><item><title><![CDATA[Virtual Worlds and Business Collaboration]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=dd130b54-58d5-48bf-b2ba-7442c443c423#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<span class="Apple-style-span" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 12px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">The way businesses collaborate is changing all of the time. One of the new technologies on the radar to aid collaboration are virtual worlds. There are many virtual worlds in existence and this year will see many of the larger technology providers entering the arena. Sony is going to finally release @Home on the PS3. Sun is showing off it's open source virtual world to select people and should be rolling it out shortly. IBM has invested a lot of effort in Linden Labs Second Life and even created a private version of the virtual world.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">Second Life is interesting because it has been around for five years, celebrating it's 5th birthday yesterday. Should a small business establish a presence in Second Life? The answer is not at this time. Only a few established businesses have benefited from a marketing stand point. The potential for business collaboration is evident but not realizable with current technology. Second Life is too hard to be of any use to the average business user. It requires a downloadable client that takes a state of the art computer to run. Easier to use alternatives with better features are coming out and unfortunately Second Life at this time is more hype than a tangible product. I think you will see changes in the near future to keep Second Life relevant and if that happens then businesses should look at it again, but at this time it is not worth the effort needed to put in to it.</p></span>]]></description></item><item><title><![CDATA[I have to admit ASP.net is better at caching than PHP]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=853c7077-83a5-4c6d-aa03-a31a51859def#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<span class="Apple-style-span" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 12px; "><div class="blogs-showentrytext" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; "><br>I am a strong believer against the idea that the tool makes the man, especially when it comes to programming languages. I know that many people have an almost religious devotion to certain languages but that has never been me. I usually just use the programming language at hand and as of late that has been PHP. My reason for using PHP is simple, the open source software for PHP is better. There are times when one programming language is better than another language and today I was made aware of a weakness in PHP when compare to ASP.net. ASP.net is easier when it comes to caching.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">I needed to implement caching for a mini-newsreader I created. For performance reasons, caching the content is a necessity. Caching in asp.net is as simple as setting a parameter on a control and literally you are done. PHP turned out to be a little more involved. It wasn't difficult but enough to mention.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">Here is part of the code I had to write today. I would like to acknowledge that I used source code from <a href="http://www.devshed.com/c/a/PHP/Output-Caching-with-PHP/2/" target="_blank" class="link" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; background-color: inherit; color: rgb(56, 58, 56); ">http://www.devshed.com/c/a/PHP/Output-Caching-with-PHP/2/</a> .</p><pre id="line9" style="margin-top: 0px; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: 'Courier New', Courier, monospace; font-size: 11px; white-space: pre-wrap; word-wrap: break-word; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); background-color: rgb(221, 221, 221); line-height: 1.5em; ">// lets check if the file is less than 2 hours old
if ( file_exists( './cache/ticker2.txt' ) && filemtime ( './cache/ticker2.txt' ) >( time() - 7200 )) {
  readfile( './cache/ticker2.txt' );
  exit();
}

ob_start();
// create array of feeds
$aURL = array("http://feeds.feedburner.com/healthplanlaw/Zxzs",
"http://feeds.lexblog.com/WestVirginiaBusinessLitigation?format=xml",
"http://qualifiedpensionconsulting.com/ppablog/feed/",
"http://www.erisaexperience.com/index.php/mnu-cases?format=feed&type=rss",
     );

  echo "";
// loop through the array and keep getting the news feed
        for ($i=0;$i<4;$i++) {
            $xmlParser = xml_parser_create();
            xml_parse_into_struct($xmlParser,file_get_contents($aURL[i]),$res,$ind);
            xml_parser_free($p);

//only care about the first one so pull that value
            $title = $results[$ind[TITLE][1]][value];
            $link = $results[$ind[LINK][1]][value];
            echo "";
        }
  echo "<table width="390" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><tbody style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><tr style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><td double;\"="" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-width: 4px; border-right-width: 4px; border-bottom-width: 4px; border-left-width: 4px; border-style: initial; border-color: initial; "><a target="_blank" href="http://www.slbdevelopment.com/%22%22" .="" $link="" \"="" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; background-color: inherit; color: rgb(56, 58, 56); ">" . $title . "</a></td></tr></tbody></table>";

$writeout = ob_get_contents();
ob_end_flush();
$f = fopen ( './cache/ticker2.txt' , 'w' ) ;
fwrite ( $f , $writeout );
fclose( $f );</pre></div></span>]]></description></item><item><title><![CDATA[Two Great Utilities for DokuWik]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=e19c45ea-7726-4f69-aa40-0a3466604122#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<span class="Apple-style-span" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 12px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">I have had to create Wikis for clients and my own personal projects.  There are many open source software choices, with the most popular being MediaWiki.  MediaWiki is a great piece of software and it is best know for powering Wikipedia.  I like MediaWiki alot and I am very impressed with it.  But I usually use another Wiki for projects, DokuWiki. The reason is simple, it has excellent integration with my two favorite bulletin boards, vBulletin and punBB.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; ">I have been working on a new wiki. Several Word documents are being used for the initial content. Cutting and Pasting from Word to most wikis does not give desired results and can lead to a lot of reformatting and fixing footnotes. Open Office includes an option to convert a file to MediaWiki but the format does not translate well to dokuWiki. So a quick search of the internet turned up two macros, one for Microsoft Word and one for Open Office allowing easy conversion to dokuWiki format. I thought I would go ahead and share the links on this blog.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; "><a target="_blank" href="http://homepages.paradise.net.nz/hillview/OOo/" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; background-color: inherit; color: rgb(56, 58, 56); ">Open Office - DokuWiki Macro</a></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 1em; line-height: 1.4em; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a target="_blank" href="http://www.websdezined.net/wiki/doku.php?id=word2dokuwiki" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; background-color: inherit; color: rgb(56, 58, 56); ">Word2DokuWiki</a></p></span>]]></description></item><item><title><![CDATA[PHP script to download a Flash video from Youtube]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=726fdfc2-2198-4231-85e9-bf1abed65391#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<P>Here is a script I wrote for no other reason than to write it. There are several popular sites that's sole purpose is to allow users to download files from Youtube.  I decided to see if I could quickly write a script to mimic the same functionality. The script has no use for me but you may find it useful.</P>
<P>The code snippet uses <A href="http://sourceforge.net/projects/snoopy/" target=_blank>Snoopy.</A> Snoopy is a class for retrieving web pages.   At the end of the script I just shelled out to wget to retrieve the file.  Wget is included with Linux and MacOS.  Windows users can retrieve it <A href="http://gnuwin32.sourceforge.net/packages/wget.htm" target=_blank>here</A>. </P><PRE><BR><BR><?php<BR>        include "Snoopy.class.php";  // <A class=link href="http://sourceforge.net/projects/snoopy/" target=_blank>http://sourceforge.net/projects/snoopy/</A><BR>        $snoopy = new Snoopy;  // instantiate the object<BR>       // retrieve the URL from Youtube<BR>        $snoopy->fetch("<A class=link href="http://www.youtube.com/watch?v=oHRq80QNnJM%22%29;" target=_blank>http://www.youtube.com/watch?v=oHRq80QNnJM%22%29;</A>  <BR><BR><BR>// Lets pull the parameters from the returned result and build the </PRE><PRE>//URL that retrieves the flash video<BR>        $lposVideoID = strpos($snoopy->results,"\"video_id\":");  <BR>        $sVideoID = substr($snoopy->results,$lposVideoID+13,11);<BR>        $sUrl = "<A class=link href="http://youtube.com/get_video.php?video_id=%22" target=_blank>http://youtube.com/get_video.php?video_id=%22</A> . $sVideoID;<BR>        $sUrl = $sUrl . "&l=";<BR>        $lpos = strpos($snoopy->results,"\"l\":");<BR>        $sl = substr($snoopy->results,$lpos+5,3);<BR>        $sUrl = $sUrl . $sl;<BR>        $lpos = strpos($snoopy->results,"\"sk\":");<BR>        $sl = substr($snoopy->results,$lpos+7,33);<BR><BR>        $sUrl = $sUrl . "&sk=" . $sl;<BR><BR>        $sUrl = $sUrl . "&fmt_map=";<BR><BR>        $lpos = strpos($snoopy->results,"\"t\":");<BR>        $sl = substr($snoopy->results,$lpos+6,32);<BR><BR>        $sUrl = $sUrl . "&t=" . $sl;<BR><BR><BR>        $lpos = strpos($snoopy->results,"\"hl\":");<BR>        $sl = substr($snoopy->results,$lpos+7,2);<BR><BR>        $lpos = strpos($snoopy->results,"\"plid\":");<BR>        $sl = substr($snoopy->results,$lpos+9,27);<BR><BR>        $sUrl = $sUrl . "&hl=" . $sl;<BR><BR>        $lpos = strpos($snoopy->results,"<title>YouTube -");<BR>        $lend = strpos($snoopy->results,"</title>",$lpos);<BR>        $sl = substr($snoopy->results,$lpos+16,$lend - ($lpos+16));<BR>        $titre = $sl;<BR><BR>        $sUrl = $sUrl . "&title=" ;<BR>        $sUrl = $sUrl. $sl ;<BR><BR>        $id = time();<BR>        //  Probably better to use Snoopy here but for variety shell </PRE><PRE>        //out and use the wget command<BR>        echo exec("wget \"" . $sUrl . "\" -O /tmp/" . $id . ".flv"); <BR>?> </PRE>]]></description></item><item><title><![CDATA[Convert a web page to an image using VB.net]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=9b681c51-212e-4d42-ac3e-07794a5f12c2#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<P>I thought I would change pace for this post and write a technical tutorial. I was working on a project today and needed a command line tool that would convert a web page to a JPEG file. There are only a few free utilities floating around and the best one is called <A href="http://iecapt.sourceforge.net/" target=_blank>IECapt.</A> It does a good job of converting a web page to a graphic format but it had a small shortcoming that was causing me problems. IECapt converts a whole web page and I only wanted to convert what you can actually see on the screen. So I looked for other freeware and could not find a free version that was Windows friendly. I then proceeded to look for source code to accomplish this task. I did find some excellent examples written in C#. These examples almost did what I wanted, but I coudln't find anything written in vb.net. So I decided to write the code in vb.net and publish the source code on this blog. I have simplified the code at the expense of efficiency. I believe this makes it easier to understand and the below code still accomplishes the task at hand. Feel free to use the code and hopefully if you are reading this you can use the code. </P>
<P>Here is the source code</P>
<P> </P><PRE id=line9>Imports System.Drawing<BR>Imports System<BR>Imports System.Net<BR>Imports System.IO<BR>Imports System.windows.forms<BR>Imports System.Threading ' we actually don't need this import for this version  <BR><BR>Public Class WebToPicture<BR>  Private bmp As New Bitmap(1024, 768)<BR>  Private timeout As Integer = 5  ' not used in this version<BR>  Private doccomplete As Boolean = False ' set to true when Document is downloaded   <BR>  Private sOut As String  ' holds the name of the JPEG</PRE><PRE> Public Sub getpicture(ByVal url As String)<BR>    private rend As New WebBrowser<BR>    doccomplete = False<BR>    'since this is a console app need to set up the handler <BR></PRE><PRE><BR>    AddHandler rend.DocumentCompleted, AddressOf Me.WebBrowser_DocumentCompleted  </PRE><PRE>    rend.Navigate(url)<BR><BR>    Do While Not doccomplete<BR>               Application.DoEvents()  ' inefficient<BR>    Loop<BR><BR><BR> End Sub</PRE><PRE id=line9><BR> Sub WebBrowser_DocumentCompleted(ByVal sender As Object, _<BR>         ByVal e As WebBrowserDocumentCompletedEventArgs) ' fires when url request done<BR>   private rend As WebBrowser<BR>   private r As New Rectangle(1, 1, 1024, 768)<BR>   rend = sender 'web request is passed as parameter<BR>   rend.ClientSize = New Size(1024, 768)<BR><BR>   rend.DrawToBitmap(bmp, r)<BR>   bmp.Save(sout, System.Drawing.Imaging.ImageFormat.Jpeg)<BR>   rend.Dispose()<BR>   doccomplete = True<BR> End Sub</PRE><PRE id=line9><BR><BR> Public Sub New(ByVal out As String)<BR>   sout = out  ' constructor - lets set the jpeg file name<BR> End Sub<BR><BR><BR>End Class</PRE><PRE id=line9><P> </P><BR>Module MainModule<BR><BR> Sub Main()<BR>    Dim sCmdArray() As String <BR>    Dim sURL As String<BR>    Dim sOut As String<BR>' call from commandline "programname  URL   FILENAME"<BR>    sCmdArray = Split(Command(), " ")<BR>    sURL = sCmdArray(0)<BR>    sOut = sCmdArray(1)<BR>    Dim cWebToPicture As New webtopicture(sOut)  ' instantiate object<BR><BR>    cWebToPicture.getpicture(sURL)  ' call url and save file<BR><BR> End Sub<BR><BR><BR>End Module<BR> </PRE>
<P>I have tried to make the code as simple as possible to make it easy to understand. Please feel free to comment or e-mail with questions. </P>]]></description></item><item><title><![CDATA[Adding the Blog to Technorati]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=c0924374-6d66-4e26-95c8-19cc521b549c#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[There are many tools on the internet to increase exposure to the company. One of these tools is Technorati. In order to post my blog on Technorati, I have to create a special post and this is the special post. Keli is going to post the second part of search optimization over the weekend. <A href="http://technorati.com/claim/38rf6dqkhc" target=_blank rel=me>Technorati Profile</A>]]></description></item><item><title><![CDATA[SEO - Part 1: Search Engine Friendly URL's]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=8aa33858-2e72-4bc9-b8e1-f16504bc7699#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[SEO is an acronym that stands for Search Engine Optimization, and it is very important to a business from a marketing standpoint. If you are a customer of SLB Development, we will work with you from the beginning to successfully design a website that will lead to high rankings in Google. <BR><BR>Within SEO, there are 4 key categories that will maximize your ranking for the search terms that are critical to your business. <BR><BR>1. Search-friendly URL's<BR>2. Keywords<BR>3. Quality Links<BR>4. Content<BR><BR>We will discuss improving rankings based on optimization for Google's search engine. Since Google is the major player in the search arena, optimizing for Google will lead to successful results with other search engines such as Yahoo and Live.com. <BR><BR>The first category we need to focus on is the choice of domain name, which is one of the most important decisions you will make. When setting up this site, I wanted to emphasize my ability to "develop" software and websites, so I included the word "development" in my domain. You can still rank high in Google even without a search engine friendly domain name, but it takes more work. <BR><BR>The following is a URL created to show how SLB Development is using SEO optimization on it's own website:<BR><BR>
<BLOCKQUOTE><A class=link href="http://www.slbdevelopment.com/index.php?page=Web-Hosting" target=_blank>http://www.slbdevelopment.com/index.php?page=Web-Hosting</A> <BR></BLOCKQUOTE><BR>This URL is considered a search engine friendly URL. Notice the words "web hosting" at the end of the link - we did this for no other reason than to help improve our search engine ranking. <BR><BR>The emergence of Content Management Systems, or CMS, for maintaining web sites has made the task of creating search engine friendly URL's easier. We try to steer clients to use either "CMS Made Simple" or Joomla due to the simplicity of creating search engine friendly URL's. <BR><BR>SLB Development is going to work with you to deliver a professional website, but it will be a colloborative process. Creating a website is an investment in time and money and planning up front is crucial.<BR><BR>Now that we have discussed the first optimization step in the process of designing a website for maximum exposure, I will focus my next blog post on the importance of "keywords."]]></description></item><item><title><![CDATA[SLB Development]]></title><link><![CDATA[http://www.slbdevelopment.com:80//Default.aspx?pg=55c1a9c2-b53c-4d36-b7c2-c1cb49909e6c&detail=5c6be623-d417-4800-a84f-99f89680fa5b#bde5f8fa-3092-4229-8e0a-83cbb3f7bace]]></link><description><![CDATA[<DIV class=blogs-showentrytitle>Everyone says the first blog post should be an introduction. I will introduce the company, SLB Development. We are a small business, and therefore understand how important each of our customer's business is to them. Because our business is that important to us.</DIV>
<DIV class=blogs-showentrytext>
<P>My wife Keli and I started this business to deliver professional websites, applications and IT services to small and medium sized companies. Every day the importance of a company's presence on the internet becomes greater. Having a professional website isn't a luxury anymore, it is a necessity. We want SLB Development to be the company that helps small and medium sized companies accomplish their goals. </P>
<P>We hope this first blog post has given you an introduction of SLB Development, a business just like our customers. Keli and I will continue to make entries into this blog when appropriate. We will give technical tips, website promotion tips, updates, and other company information. </P></DIV>]]></description></item></channel></rss>