<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3489434220975124883</id><updated>2011-12-13T06:35:50.672-05:00</updated><category term='flash'/><category term='SCORM'/><category term='zinc'/><category term='Internet Explorer 8'/><category term='Utilitarian Friday'/><category term='multilingual'/><category term='MS SQL Server'/><category term='CSS'/><category term='sharedobject'/><category term='ActionScript 3'/><category term='ActionScript 2'/><category term='Debugging'/><category term='ASP'/><category term='Internet Explorer'/><category term='privacy'/><category term='Windows'/><category term='T-SQL'/><category term='flash player 8'/><category term='JavaScript'/><category term='database'/><category term='ADO'/><title type='text'>Coding Journey</title><subtitle type='html'>Solutions to challenges from my journey in computer programming.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-3793280090242277532</id><published>2009-10-30T14:18:00.040-04:00</published><updated>2009-10-30T16:05:59.898-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>SQL Server Database Transaction Log Full</title><content type='html'>&lt;h4&gt;Problem&lt;/h4&gt;Your SQL Server database returns an error that your transaction log is full when you try to execute some SQL statements. You check the hard drive free space, and it's full; or perhaps the transaction log has reached its maximum configured size. You check your database's recovery model, and it's set to "Full", even though restoring from a previous night's backup is acceptable recovery in the event of failure.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Solution&lt;/h4&gt;Unless you change the default log file settings or database recovery model, the transaction log is a ticking time bomb that grows until disk space is full, rendering your database unusable. This quick solution makes space immediately available, and the long-term solution automates the clean-up of the transaction log file.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;The quick solution&lt;/h5&gt;The quick solution, after ensuring you have backed up your database as needed, is to execute the following statements in SQL Studio to (1) remove all inactive logs from your database's transaction log, then (2) shrink the log file down to a reasonable size.&lt;ol&gt;&lt;li&gt;Purge all inactive logs from a database:&lt;div class="code"&gt;BACKUP LOG &lt;em&gt;&amp;lt;YourDBName&amp;gt;&lt;/em&gt; WITH TRUNCATE_ONLY&lt;/div&gt;&lt;br /&gt;&lt;i&gt;For example:&lt;/i&gt;&lt;br /&gt;&lt;div class="code"&gt;BACKUP LOG &lt;em&gt;XyzWebsite&lt;/em&gt; WITH TRUNCATE_ONLY&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Shrink the database's log to a certain number of MB:&lt;div class="code"&gt;DBCC SHRINKFILE(&lt;em&gt;&amp;lt;YourDBLogFileName&amp;gt;&lt;/em&gt;, &lt;em&gt;&amp;lt;NumMegabytes&amp;gt;&lt;/em&gt;)&lt;/div&gt;&lt;br /&gt;&lt;i&gt;For example, shrink the log to 100 MB:&lt;/i&gt;&lt;br /&gt;&lt;div class="code"&gt;DBCC SHRINKFILE(&lt;em&gt;XyzWebsite_log&lt;/em&gt;, &lt;em&gt;100&lt;/em&gt;)&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;Do not shrink frequently, as physical fragmentation impacts database processing time; so after doing this, consider the long-term solution to prevent this from happening again. &lt;br /&gt;&lt;br /&gt;&lt;h5&gt;The long-term solution&lt;/h5&gt;The long-term solution to automatically purge inactive logs is to change the database recovery mode from "Full" to "Simple". As long as restoring from a previous night's full database backup is acceptable recovery for you: in SQL Studio, right-click the database, select Properties ► Options, then change &lt;b&gt;Recovery model&lt;/b&gt; to &lt;b&gt;Simple&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;For further reading, see the following MSDN references:&lt;ul&gt;&lt;li&gt;Backup Under the Simple Recovery Model &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms191164.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms191164.aspx&lt;/a&gt;&lt;li&gt;BACKUP (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms186865.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms186865.aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;DBCC SHRINKFILE (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms189493.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms189493.aspx&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-3793280090242277532?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/3793280090242277532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/10/sql-server-database-transaction-log.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/3793280090242277532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/3793280090242277532'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/10/sql-server-database-transaction-log.html' title='SQL Server Database Transaction Log Full'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-5751675080263843469</id><published>2009-10-20T12:09:00.065-04:00</published><updated>2010-06-11T11:56:24.229-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='multilingual'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet Explorer 8'/><title type='text'>Asian languages do not display in IE8/XP</title><content type='html'>&lt;h4&gt;The Problem&lt;/h4&gt;Asian language characters (i.e. Chinese, Korean, Japanese, Thai, Vietnamese) render as rectangles/boxes in Internet Explorer 8 on Windows XP. The glyphs display correctly in IE7 and FireFox.&lt;br /&gt;&lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center; cursor:hand;width: 320px; height: 211px;" src="http://3.bp.blogspot.com/_USTRkF64NJ4/St4B_pmgEWI/AAAAAAAAAHc/Jougji4RgXM/s400/ie8-chinese-rendering-problem.gif" border="0" alt="Chinese characters in IE8 before and after the solution" id="BLOGGER_PHOTO_ID_5394751596647158114" /&gt;&lt;br /&gt;&lt;a href="#ie8-asian-solution"&gt;Click here to jump right to The Solution&lt;/a&gt;, or read on for a brief analysis.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Analysis&lt;/h4&gt;There are two inconvenient client-side workarounds; neither is a real solution. Microsoft states a per-page workaround, but it does not work for me.&lt;br /&gt;&lt;br /&gt;The first client-side workaround is to click the "Compatibility" button to tell IE8 to re-render the page using the IE7 rendering engine. This would require your users to click this button in order to view your site, which is not user-friendly. Also, text in HTML &lt;span class="code"&gt;&amp;lt;select&amp;gt;&lt;/span&gt; boxes is still rendered as boxes.&lt;br /&gt;&lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center; cursor:hand;width: 173px; height: 58px;" src="http://2.bp.blogspot.com/_USTRkF64NJ4/St4CsALFEeI/AAAAAAAAAHk/XIVzVjpP2aM/s400/ie8-compatibility-button.png" border="0" alt="IE8 Compatibility button" id="BLOGGER_PHOTO_ID_5394752358620402146" /&gt;&lt;br /&gt;The second client-side workaround is to right-click the page and select: &lt;br /&gt;&lt;b&gt;Encoding ► More ► &lt;em&gt;&amp;lt;problematic language&amp;gt;&lt;/em&gt;&lt;/b&gt;. The problem with this approach is: the encoding does not "stick"; you must re-select it for each page, and text in &lt;span class="code"&gt;&amp;lt;select&amp;gt;&lt;/span&gt; boxes is still no different.&lt;br /&gt; &lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center; cursor:hand;width: 400px; height: 151px;" src="http://4.bp.blogspot.com/_USTRkF64NJ4/St4DLN4_CCI/AAAAAAAAAHs/k8XVvifzd-8/s400/ie8-encoding-menu.png" border="0" alt="IE8 Encoding context menu" id="BLOGGER_PHOTO_ID_5394752894878550050" /&gt;&lt;br /&gt;Microsoft's &lt;a href="http://www.microsoft.com/windows/internet-explorer/readiness/developers-new.aspx#updateIE7"&gt;IE8 Readiness Toolkit&lt;/a&gt; states a per-page fix: add the following meta tag to tell IE8 to render the page like IE7. However when I add this tag, all characters still look like boxes, so this &lt;em&gt;does not work&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;a name="ie8-asian-solution"&gt;&lt;/a&gt;&lt;/h4&gt;There are two solutions: &lt;ol&gt;&lt;li&gt;Solution 1 requires a web-server change; Asian characters in &lt;span class="code"&gt;&amp;lt;select&amp;gt;&lt;/span&gt; boxes &lt;br /&gt;&lt;b&gt;will not&lt;/b&gt; display correctly.&lt;/li&gt;&lt;li&gt;Solution 2 requires a client-side Windows Control Panel change; all Asian text will display correctly.&lt;/li&gt;&lt;/ol&gt;&lt;h5&gt;Solution 1: Web Server Change&lt;/h5&gt;Add to your web server an HTTP response header which instructs IE8 to render the page using the old IE7 renderer. Note: Asian characters displayed in HTML &lt;span class="code"&gt;&amp;lt;select&amp;gt;&lt;/span&gt; boxes will not render in IE8 nor IE7; &lt;em&gt;if you need that to work, skip to &lt;a href="#ie8-asian-solution2"&gt;Solution 2&lt;/a&gt;.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="code-title"&gt;The HTTP header that fixes IE8 Asian characters in all text except &amp;lt;select&amp;gt; boxes:&lt;/div&gt;&lt;div class="code"&gt;X-UA-Compatible: IE=EmulateIE7&lt;/div&gt;&lt;br /&gt;&lt;h5&gt;&lt;a name="ie8-asian-solution2"&gt;&lt;/a&gt;Solution 2: Windows Control Panel change&lt;/h5&gt;Microsoft has tied Internet Explorer 8 directly into your computer's Regional &amp;amp; Language Support settings. This makes sense, but it's unfortunate for IE since Asian languages work out-of-the box with other web browsers.&lt;br /&gt;&lt;br /&gt;To view Chinese, Korean, Japanese and other East Asian languages in all text on web pages in both IE8 and in IE7, follow this. In Windows XP go to:&lt;br /&gt;&lt;br /&gt;Control Panel ► Regional and Language Options ► Languages&lt;br /&gt;&lt;br /&gt;Check the &lt;b&gt;"Install files for East Asian languages"&lt;/b&gt; option, insert your Windows XP CD-ROM, and restart when it's done:&lt;br /&gt;&lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center; cursor:hand;width: 333px; height: 400px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/St4u6YY_RFI/AAAAAAAAAH8/ZQCFD_I482c/s400/xp-regional-and-language-options-languages-east-asian.png" border="0" alt="Windows XP Regional and Language Options - Install files for East Asian languages" id="BLOGGER_PHOTO_ID_5394800984150983762" /&gt;&lt;br /&gt;编码快乐！ &lt;br /&gt;해피 코딩! &lt;br /&gt;ハッピーコーディング！ &lt;br /&gt;Happy coding!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-5751675080263843469?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/5751675080263843469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/10/asian-languages-do-not-display-in-ie8.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/5751675080263843469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/5751675080263843469'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/10/asian-languages-do-not-display-in-ie8.html' title='Asian languages do not display in IE8/XP'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_USTRkF64NJ4/St4B_pmgEWI/AAAAAAAAAHc/Jougji4RgXM/s72-c/ie8-chinese-rendering-problem.gif' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-6909018178701192925</id><published>2009-08-27T18:09:00.007-04:00</published><updated>2009-08-27T18:30:16.779-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><title type='text'>Screen and Print styles in the same CSS file</title><content type='html'>Until today, I was under the impression that to vary the styles used for HTML displayed on screen vs. printed to paper, one had to create distinct CSS files for screen and print, and use two separate &lt;span class="code"&gt;&amp;lt;link&amp;gt;&lt;/span&gt; tags, a-la:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&amp;lt;link rel="stylesheet" href="styles_screen.css" /&amp;gt;&lt;br /&gt;&amp;lt;link rel="stylesheet" media="print" href="styles_print.css" /&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;However I found out today that you can actually just use one CSS file, and separate your media usage with the special &lt;span class="code"&gt;@media&lt;/span&gt; selector. Simply enclose style definitions by media type, as in this simplified example:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;h1&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-family: Verdana;&lt;br /&gt;}&lt;br /&gt;&lt;em&gt;@media print&lt;br /&gt;{&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;h1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-family: Times;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Nothing revolutionary, but cool to know you can save a separate HTTP file request by combining all your CSS into one file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-6909018178701192925?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/6909018178701192925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/08/screen-and-print-styles-in-same-css.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6909018178701192925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6909018178701192925'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/08/screen-and-print-styles-in-same-css.html' title='Screen and Print styles in the same CSS file'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-1045019396755776632</id><published>2009-08-15T08:50:00.053-04:00</published><updated>2009-08-17T10:56:50.495-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><title type='text'>Debugging the Kitchen Sink</title><content type='html'>&lt;i&gt;In this post, I explain the debugging process, difficulties novice developers have with it, and present a practical non-computer-programming example of applying it to &lt;b&gt;debug a problem with my kitchen sink's faucet&lt;/b&gt;.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Debugging Process&lt;/h4&gt;"Debugging" is a vital skill in the software development world that a is used quite often to solve programming problems, ranging from simple logic mistakes to difficult-to-repeat concurrency race conditions or deadlocks.&lt;br /&gt;&lt;br /&gt;However the process of debugging is an implementation of a generic, logical, and scientific problem-solving process which is applicable well beyond computer programming. That process is simplified as:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Establish an observable problem.&lt;/li&gt;&lt;li&gt;Test to determine all of the specific scenarios where the problem is observed.&lt;/li&gt;&lt;li&gt;Understand the major components involved.&lt;/li&gt;&lt;li&gt;Hypothesize what could be causing the problem.&lt;/li&gt;&lt;li&gt;Locate the problem.&lt;/li&gt;&lt;li&gt;Make changes to resolve the problem.&lt;/li&gt;&lt;li&gt;Test all specific scenarios where the problem happened to confirm the problem is solved.&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Difficulties with the Debugging Process&lt;/h4&gt;I have often observed that novice developers encounter difficulties in applying this process, by halting as soon as actual results are not the same as expected results. When they come asking "What do I do?" my answer, if not "Check the Reference" will always be, "Debug it".&lt;br /&gt;&lt;br /&gt;The difficulty of understanding this process seems to be with &lt;i&gt;Step 5 - Locate the problem&lt;/i&gt;, which rightfully may be a time-consuming process. With a "syntax error", the compiler/interpreter usually tells you exactly where the problem lies, so it is an easy fix. But with a "semantic error", meaning it's a programming or design mistake has caused unintended results, you must gradually narrow down the source of the problem over many iterative tests starting from the general range of what works, and gradually running more specific tests, ending at the actual source of the problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To illustrate the debugging process in a practical non-computer-programming, example -- just this morning I applied it to a household problem that has been nagging me for quite some time.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Application: The Kitchen Sink's Faucet&lt;/h4&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_USTRkF64NJ4/SobkTHnc9zI/AAAAAAAAAHU/-CkB2_OL8H0/s1600-h/kitchen-faucet.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 170px; height: 146px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/SobkTHnc9zI/AAAAAAAAAHU/-CkB2_OL8H0/s400/kitchen-faucet.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5370230622799066930" /&gt;&lt;/a&gt;A few years ago when I moved into my house, I replaced the kitchen sink's faucet, an old two-knob fixed-faucet type, with a new single-handle pull-out model. However when I was finished there was a problem: &lt;b&gt;the cold water pressure was significantly lower than the hot water pressure&lt;/b&gt;. I finally got around to working on this, and applied the same debugging process, as follows.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;h5&gt;Establish an observable problem.&lt;/h5&gt;The problem is that when the handle is pushed all the way to the cold side, the water is very slow, but when all the way to the hot side, the water is very fast.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;h5&gt;Test to determine all of the specific scenarios where the problem is observed.&lt;/h5&gt;In this case, the above is the only observable scenario.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;h5&gt;Understand the major components involved.&lt;/h5&gt;The major components are:&lt;ol&gt;&lt;li&gt;the faucet's output&lt;/li&gt;&lt;li&gt;the faucet's hot and cold water intakes&lt;/li&gt;&lt;li&gt;the 2 tubes connecting the wall outlets to the faucet intakes&lt;/li&gt;&lt;li&gt;the hot and cold wall outlets&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;This diagram illustrates how the components are connected and the direction of water-flow.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_USTRkF64NJ4/SobCI0dG1VI/AAAAAAAAAGk/r7Gtpx0-MH0/s1600-h/diagram-faucet-activity.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 362px; height: 375px;" src="http://2.bp.blogspot.com/_USTRkF64NJ4/SobCI0dG1VI/AAAAAAAAAGk/r7Gtpx0-MH0/s400/diagram-faucet-activity.png" border="0" alt="Activity Model of Faucet Components" id="BLOGGER_PHOTO_ID_5370193062461363538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;h5&gt;Hypothesize what could be causing the problem.&lt;/h5&gt;My two bathroom sinks have no problem with the water pressure from either hot or cold lines. Based on that I will rule out the wall outlets. Also, since the hot water pressure from the faucet output is just fine, I will rule that out. &lt;br /&gt;&lt;br /&gt;That narrows down the range of the problem to one of the two remaining components: &lt;ol&gt;&lt;li&gt;&lt;s&gt;the faucet's output&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;the faucet's hot and cold intakes&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;the 2 tubes connecting the wall outlets to the faucet intakes&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;the hot and cold wall outlets&lt;/s&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;h5&gt;Locate the problem.&lt;/h5&gt;&lt;ol type="A"&gt;&lt;li&gt;First I want to see if the problem exists in &lt;b&gt;the faucet's hot and cold intakes&lt;/b&gt;. I know that hot is fine, but cold is low, so my test was to switch the connections between the intakes and the tubes, causing hot water to come out when the faucet is turned to cold, and vice versa. If the cold water pressure becomes good but hot becomes poor, then the problem exists in the intakes:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_USTRkF64NJ4/SobEZSmbvzI/AAAAAAAAAG0/s6iBhILYyV8/s1600-h/diagram-faucet-intake-test.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 362px; height: 372px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/SobEZSmbvzI/AAAAAAAAAG0/s6iBhILYyV8/s400/diagram-faucet-intake-test.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5370195544454709042" /&gt;&lt;/a&gt;&lt;br /&gt;The results of this test however are that the pressure is unchanged - hot is still good and cold is still poor. So the intakes are not the problem. I scratch that off the list:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;s&gt;the faucet's output&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;the faucet's hot and cold intakes&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;the 2 tubes connecting the wall outlets to the faucet intakes&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;the hot and cold wall outlets&lt;/s&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If my hypothesis is correct, &lt;b&gt;the problem must exist in the tubes&lt;/b&gt;. To test this, I undo the tube switch from the previous test, and now swap the tube connections with the wall outlets. Now, if the cold water pressure becomes good but hot becomes poor, then the problem exists in the tubes:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_USTRkF64NJ4/SobGBvQKHKI/AAAAAAAAAG8/ZYLp1nEIy20/s1600-h/diagram-faucet-tube-test.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 362px; height: 376px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/SobGBvQKHKI/AAAAAAAAAG8/ZYLp1nEIy20/s400/diagram-faucet-tube-test.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5370197338852301986" /&gt;&lt;/a&gt;&lt;br /&gt;The results of this test are that the cold water pressure is now good, but the hot water pressure is poor. &lt;b&gt;Thus, this test proves that the problem exists in the Cold Water Tube.&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;h5&gt;Make changes to resolve the problem.&lt;/h5&gt;Since I cannot get into the cold water tube to find out what is wrong with it, my next step is to replace the defective tube with a new one from the store.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;h5&gt;Test all specific scenarios where the problem happened to confirm the problem is solved.&lt;/h5&gt;Once I buy my new tube, I will install it and test to make sure that the cold water pressure is now the same as the hot water pressure.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;As you can see, the process of debugging can be applied to any problem, computer-programming or otherwise, as long as you have a general understanding of the components involved, how they interact, and if you can follow and logical and scientific thought-process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-1045019396755776632?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/1045019396755776632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/08/debugging-kitchen-sink.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/1045019396755776632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/1045019396755776632'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/08/debugging-kitchen-sink.html' title='Debugging the Kitchen Sink'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_USTRkF64NJ4/SobkTHnc9zI/AAAAAAAAAHU/-CkB2_OL8H0/s72-c/kitchen-faucet.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-134626858591050958</id><published>2009-08-14T09:15:00.000-04:00</published><updated>2009-08-14T10:17:59.402-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><title type='text'>CPU fans running loudly and constantly</title><content type='html'>&lt;h4&gt;The Problem&lt;/h4&gt;For the last few days, I have noticed both of my CPU fans on my Gateway / AMD Phenom Quad Core / Windows Vista machine have been running loudly and constantly, even when I don't have any applications open. My CPU fans are not dusty.&lt;br /&gt;&lt;br /&gt;This seemed to coincide with either a boatload of Windows Updates I installed a few days ago, or my installation of Microsoft Visual Studio 2008 (for my upcoming Mobile Development class) and its subsequent service packs.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;/h4&gt;It turns out the loud CPU fans are directly related to the configured &lt;b&gt;Power Options&lt;/b&gt; in the Windows Control Panel.&lt;br /&gt;&lt;br /&gt;My Power Plan was set to "High Performance". The very instant I changed the this to either &lt;b&gt;"Power saver"&lt;/b&gt; or "Balanced", the CPU fans ceased or became very muted. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_USTRkF64NJ4/SoVhgyHYcaI/AAAAAAAAAF0/Y-V2OE0kCK8/s1600-h/windows-vista-power-options.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 260px;" src="http://3.bp.blogspot.com/_USTRkF64NJ4/SoVhgyHYcaI/AAAAAAAAAF0/Y-V2OE0kCK8/s400/windows-vista-power-options.jpg" border="0" alt="Windows Vista Power Options Control Panel" id="BLOGGER_PHOTO_ID_5369805346545627554" /&gt;&lt;/a&gt;&lt;br /&gt;These settings state that processor performance will be reduced, but for now I will leave this as-is to see if I notice any difference, and who knows, this might show up as savings on the utility bill!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-134626858591050958?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/134626858591050958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/08/cpu-fans-running-loudly-and-constantly.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/134626858591050958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/134626858591050958'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/08/cpu-fans-running-loudly-and-constantly.html' title='CPU fans running loudly and constantly'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_USTRkF64NJ4/SoVhgyHYcaI/AAAAAAAAAF0/Y-V2OE0kCK8/s72-c/windows-vista-power-options.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-6178498158716223340</id><published>2009-08-14T08:37:00.013-04:00</published><updated>2009-08-14T10:43:58.005-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilitarian Friday'/><title type='text'>Utilitarian Friday: "Carbonite" Computer Backup</title><content type='html'>What would you do if one day all of your digital photos, digital music, and digital documents were just -- gone?&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;What are your backup plans?&lt;/h4&gt;One evening a couple years ago, I left my laptop charging directly in the wall outlet. The next morning, it was fried from a power surge. Fortunately I was able to extract the hard drive and retrieve my data from it by using a special laptop-harddrive-to-IDE cable to attach to my desktop PC. It could have been worse. Now I make sure everything important is always plugged into surge protectors.&lt;br /&gt;&lt;br /&gt;A couple years prior to that, my external hard drive that contained my music, pictures, freelance files and other important files, started making whirring and clicking sounds after 5 or 10 minutes of being turned on, before automatically shutting down. Fortunately for me again, I was able to copy files away from it in batches before the shutdown. It could have been worse.&lt;br /&gt;&lt;br /&gt;My most recent backup solution was to copy all of my music and pictures to DVDs that now sit collecting dust on my shelf in the event that they are needed. This is definitely a good plan, but the last time I did that was at least a year ago. Plus, what if there is a fire or burglary? There must be an easier way.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Carbonite&lt;/h4&gt;Enter &lt;a href="http://www.carbonite.com/raf/signup.aspx?RAFUSerUID=1346458"&gt;Carbonite&lt;/a&gt;, a very inexpensive, off-site, automatic, and secure file backup and restore service. It is highly-rated and works on both Windows and Mac platforms.&lt;br /&gt;&lt;h5&gt;Secure&lt;/h5&gt;This is obviously an important factor when giving a third-party access to your private documents. Carbonite states:&lt;blockquote&gt;&lt;i&gt;We encrypt your files twice before backing them up securely offsite, using the same encryption techniques that banks use. Files remain encrypted at our secure data centers, so only you can see them.&lt;/i&gt;&lt;/blockquote&gt;&lt;h5&gt;Automatic&lt;/h5&gt;It knows what to backup and what not to back up. Music, pictures, documents, your desktop, etc. It runs in the background for a few days for one big initial backup. Then once it is done, it automatically backs up only new or changed files. The handy status window available from the System Tray shows you the current progress and the files that are currently backing up:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_USTRkF64NJ4/SoVrEBt6NfI/AAAAAAAAAF8/LkaZNVBfTwM/s1600-h/carbonite-info-center.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 289px;" src="http://2.bp.blogspot.com/_USTRkF64NJ4/SoVrEBt6NfI/AAAAAAAAAF8/LkaZNVBfTwM/s400/carbonite-info-center.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5369815847633827314" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h5&gt;Customizable&lt;/h5&gt;It is very easy to tell Carbonite what files/folders you do and do not want backed up. It integrates with Windows in two ways:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Dots in the bottom left corner of icons.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;No dot means it will not be backed up&lt;/li&gt;&lt;li&gt;A Yellow dot means backup is pending&lt;/li&gt;&lt;li&gt;A Green dot means it has been backed up&lt;/li&gt;&lt;li&gt;A donut means that a folder contains some files that are to-be-backed-up and some that are not to be backed up.&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;The right-click context menu for files and folders contains a new "Carbonite" item that allows you to change the backup options:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Don't back this up&lt;/li&gt;&lt;li&gt;Back this up&lt;/li&gt;&lt;li&gt;Back this up as soon as possible, to bump up a pending backup in the queue&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_USTRkF64NJ4/SoVst3vvxRI/AAAAAAAAAGE/eg68ELJq81E/s1600-h/carbonite-explorer-context-menu.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 137px;" src="http://2.bp.blogspot.com/_USTRkF64NJ4/SoVst3vvxRI/AAAAAAAAAGE/eg68ELJq81E/s400/carbonite-explorer-context-menu.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5369817666023310610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h5&gt;Easy to Restore&lt;/h5&gt;Once your files are backed up, how easy is it to restore? Very. Carbonite shows up in Windows Explorer as if it were another hard drive. Simply browse your Carbonite drive, right-click on the files or folders you want to restore, and you can restore to the same location, restore to another location, or restore previous versions.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_USTRkF64NJ4/SoVwKKcfzII/AAAAAAAAAGM/0YC0VZj3ZC4/s1600-h/carbonite-restore-context-menu.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 381px; height: 215px;" src="http://3.bp.blogspot.com/_USTRkF64NJ4/SoVwKKcfzII/AAAAAAAAAGM/0YC0VZj3ZC4/s400/carbonite-restore-context-menu.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5369821450614066306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h5&gt;15 Day Free Trial&lt;/h5&gt;&lt;b&gt;&lt;a href="http://www.carbonite.com/raf/signup.aspx?RAFUSerUID=1346458"&gt;Download Carbonite here&lt;/a&gt;&lt;/b&gt;. You'll get a free 15 day trial. Then for unlimited backup, it is $55 per year, or even less if you sign up instead of the trial or buy for more than 1 year at at time. Oh and I get 3 months of backup free if you sign up ;)&lt;br /&gt;&lt;br /&gt;To me, the peace of mind of knowing my important files are securely backed up at all times is well worth the price. What are your backup plans?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-6178498158716223340?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/6178498158716223340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/08/utilitarian-friday-carbonite-computer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6178498158716223340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6178498158716223340'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/08/utilitarian-friday-carbonite-computer.html' title='Utilitarian Friday: &quot;Carbonite&quot; Computer Backup'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_USTRkF64NJ4/SoVrEBt6NfI/AAAAAAAAAF8/LkaZNVBfTwM/s72-c/carbonite-info-center.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-2404306827262915086</id><published>2009-08-07T12:48:00.009-04:00</published><updated>2009-08-10T15:33:07.834-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilitarian Friday'/><title type='text'>Utilitarian Friday: "KeePass" Password Safe</title><content type='html'>After several months without many brick-wall coding problems to document, I'd like to start a mini-series called &lt;b&gt;&lt;i&gt;Utilitarian Friday&lt;/i&gt;&lt;/b&gt; to showcase many essential free software utilities that I use every day to increase my productivity. Not only are these useful to coders, but to the power computer-user alike.&lt;br /&gt;&lt;br /&gt;Let's begin with KeePass - the Password Safe!&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;KeePass&lt;/h4&gt;&lt;a href="http://keepass.info/download.html"&gt;KeePass&lt;/a&gt; is an easy, secure way to control your passwords using a flash drive or your local machine.&lt;br /&gt;&lt;br /&gt;If you suffer from any of these conditions, KeePass is for you:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;same-password-for-everything syndrome&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;I-can't-find-the-blasted-post-it-note-itis&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;I-thought-it-was-PA$$W0RD-but-maybe-it-was-P7S$WOR3-disfunction&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;There are 5 key features KeePass delivers for me: security, organization, ease-of-use, password generation, and a good deal (free!).&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;I. Security&lt;/h5&gt;How are stored passwords kept secure?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The software is open-source, so you can ensure for yourself that it's not doing anything fishy.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The master password, required to use your KeePass, is hashed with the very secure SHA-256 algorithm. Both the passwords stored and the utility's database itself are encrypted using the AES and Twofish ciphers -- which are ciphers used by banks. &lt;br /&gt;&lt;br /&gt;According to the makers of KeePass: &lt;blockquote&gt;&lt;b&gt;&lt;i&gt;"Even if you would use all computers in the world to attack one database, decrypting it would take longer than the age of the universe."&lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;When running in memory, passwords are still encrypted.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set KeePass to lock when minimized, and any subsequent access requires entry of your master password.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h5&gt;II. Organization&lt;/h5&gt;Set up a tree of Password Groups, assign little icons to each group, and it is so easy to find your passwords. &lt;br /&gt;&lt;br /&gt;For example my KeePass, below, contains "folder" groups for: personal stuff, my full time job, and my freelance job. Then I organized those into type of passwords such as FTP, RDP, VPN, Live Sites, Dev Sites, etc.&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 364px; height: 400px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/SnxuSLGmtoI/AAAAAAAAAE8/Fs1uEB1kG1c/s400/keepass.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367286114415982210" /&gt;&lt;br /&gt;&lt;br /&gt;While others are struggling to locate passwords by shuffling through physical folders and papers, or thinking back through fading memories, KeePass makes it a no-brainer.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;III. Ease-of-Use&lt;/h5&gt;So once your passwords are stored, how to you use them? There are 3 ways.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;In your web page or application, click on the username text box, then press &lt;b&gt;Ctrl + Alt + A&lt;/b&gt;. KeePass automatically enters your username, password, and submits the form. It can do this because it's aware of the title bar of the active window, using that to find a match in your password database.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;If no exact match is found or if the web site you are using does not have useful or consistant title bar text, press &lt;b&gt;Ctrl + Alt + K&lt;/b&gt; to bring KeePass to focus, browse for your password record, click on it, then press &lt;b&gt;Ctrl + V&lt;/b&gt; and it will auto-type in the window that last had focus - starting from the text box that last had focus.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;If you just need to copy and paste the password itself, in KeePass click on the password record and simply press &lt;b&gt;Ctrl + C&lt;/b&gt; to have the password copied to the clipboard for 10 seconds.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Additionally, KeePass is a tiny application, less than 1MB, that you can easily carry around on your USB flash drive, and keep back-up copies on your home computer and work computer in case you lose or forget your flash drive.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;IV. Password Generation&lt;/h5&gt;The great thing with KeePass is that if there is a password that you do not *need* to commit to your brain's memory, you can use the built-in password generator, to automatically make long, secure passwords for you to use.&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 314px; height: 400px;" src="http://3.bp.blogspot.com/_USTRkF64NJ4/SnxnXQb_5yI/AAAAAAAAAEc/Bl05SI0Xxos/s400/keepass2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367278505165842210" /&gt;&lt;br /&gt;&lt;br /&gt;This especially comes in handy for services that require you to change your password periodically.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;V. A Good Deal&lt;/h5&gt;As with much of the open-source world, this price of this utility is &lt;b&gt;FREE&lt;/b&gt;! Since this is not a remote service, there is no monthly fee or anything of the sort.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Download It Already!&lt;/h5&gt;Get KeePass now from its &lt;a href="http://keepass.info/download.html"&gt;official web site&lt;/a&gt; or from &lt;a href="http://sourceforge.net/projects/keepass/"&gt;its SourceFourge project page&lt;/a&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://keepass.info/download.html"&gt;http://keepass.info&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/keepass/"&gt;http://sourceforge.net/projects/keepass/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Stay tuned to next week's &lt;b&gt;&lt;i&gt;Utilitarian Friday&lt;/i&gt;&lt;/b&gt; for another review of an essential software utility!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-2404306827262915086?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/2404306827262915086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/08/utilitarian-friday-keepass-password.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/2404306827262915086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/2404306827262915086'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/08/utilitarian-friday-keepass-password.html' title='Utilitarian Friday: &quot;KeePass&quot; Password Safe'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_USTRkF64NJ4/SnxuSLGmtoI/AAAAAAAAAE8/Fs1uEB1kG1c/s72-c/keepass.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-6012331039508347522</id><published>2009-04-17T14:44:00.019-04:00</published><updated>2009-08-14T09:16:40.215-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet Explorer'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='SCORM'/><title type='text'>"Permission Denied" Error in ADL SCORM 1.2 Test Suite</title><content type='html'>Yesterday I needed to verify that an older release of my Flash-based e-learning course-shell is indeed &lt;a href="http://www.icslearninggroup.com/whitepapers/what-is-scorm.htm" target="_blank"&gt;SCORM&lt;/a&gt; conformant -- specifically to the old-but-widely-used SCORM 1.2 standard. This conformance test is done using the ADL SCORM 1.2 Test Suite -- a locally-run web application that simulates the run-time environment of a SCORM-compliant Learning Management System.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Problem&lt;/h4&gt;When launching this SCO in the ADL Test Suite in IE7 on Windows XP SP3, a JavaScript error alerts simply &lt;b&gt;"Permission denied"&lt;/b&gt;. This error happens when the SCO first locates the test suite's SCORM 1.2 API, so the conformance test cannot even start.&lt;br /&gt;&lt;br /&gt;Since the test suite is a local web application (using only HTML, JavaScript, and a Java Applet) local web browser security restrictions apply. Because of this, I always copy my test SCOs into a new folder within the Test Suite folder on my C drive to prevent any potential "cross-domain" (cross-local-folder) security issues. But that does not solve this problem.&lt;br /&gt;&lt;br /&gt;I noticed something odd when opening-with Notepad the JS file in my SCO that is responsible for finding the API -- Windows opens a curious confirmation box informing me that the internet can be useful but this file could harm my computer:&lt;br /&gt;&lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;" src="http://3.bp.blogspot.com/_USTRkF64NJ4/Sej7UY4PJYI/AAAAAAAAACY/9vapgLcGwpU/s400/file-from-internet-security-warning.PNG" border="0" alt="'Open File - Security Warning' dialog box with 'While files from the internet are useful, this file type can potentially harm your computer. If you do not trust the source, do not open this software.'" /&gt;&lt;br /&gt;This is strange, because when I create a new JS file then open-with Notepad, no such warning appears.&lt;br /&gt;&lt;br /&gt;It turns out Windows now flags files as "obtained from the internet" or not.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;/h4&gt;This new Windows security restriction is the cause of this "Permission Denied" error message. Internet Explorer now blocks the scripting between &lt;em&gt;downloaded&lt;/em&gt; local files and &lt;em&gt;locally-created&lt;/em&gt; local files, in the same fashion as its blocking of cross-site-scripting.&lt;br /&gt;&lt;br /&gt;The solution is to modify the properties of each individual file in the SCO to remove this "downloaded-from-the-internet" flag. At the very least, do this to the containing HTML file and the JS files it uses. Click the "Unblock" button on the File Properties window:&lt;br /&gt;&lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;" src="http://3.bp.blogspot.com/_USTRkF64NJ4/Sej7eVTP-AI/AAAAAAAAACg/iJ-tkxvztpE/s400/file-properties-blocked.PNG" border="0" alt="File Properties window with 'Unblock' button and 'This file came from another computer and might be blocked to help protect this computer.'" /&gt;&lt;br /&gt;Unfortunately there is no apparent way to "Unblock" in bulk -- you must do it on a file-by-file basis.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;One More Solution&lt;/h5&gt;If you clicked "Unblock" on all of your files but you still get this Permission Denied error, there is one more thing to check -- especially if your SCO's HTML file is published from Flash.&lt;br /&gt;&lt;br /&gt;Flash HTML Publish settings by default throw a special HTML comment-block at the top of the HTML file that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&amp;lt;!-- saved from url=(0013)about:internet --&amp;gt;&lt;/div&gt;&lt;br /&gt;If your SCO contains that comment, IE will behave the same way as the previous case by blocking the scripting between this "saved-from-the-internet" file and the test suite API. Just delete that comment block and you will be good-to-go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-6012331039508347522?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/6012331039508347522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/04/permission-denied-error-in-adl-scorm-12.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6012331039508347522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6012331039508347522'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/04/permission-denied-error-in-adl-scorm-12.html' title='&quot;Permission Denied&quot; Error in ADL SCORM 1.2 Test Suite'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_USTRkF64NJ4/Sej7UY4PJYI/AAAAAAAAACY/9vapgLcGwpU/s72-c/file-from-internet-security-warning.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-3655471612427519108</id><published>2009-04-03T11:06:00.026-04:00</published><updated>2009-08-14T09:16:54.800-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 2'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Escaped Newline not properly rendering from XML</title><content type='html'>When setting a Flash TextField's text to some data that is loaded from an external XML file, I noticed the newline characters defined in my XML file, &lt;span class="code"&gt;"\n"&lt;/span&gt;, were being rendered as the string "\n" rather than an actual line-break.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Problem&lt;/h4&gt;Here is a simplified example of this situation:&lt;br /&gt;&lt;br /&gt;&lt;div class="code-title"&gt;The XML file&lt;/div&gt;&lt;div class="code"&gt;&amp;lt;root test="Line1&lt;em&gt;\n&lt;/em&gt;Line2&lt;em&gt;\n&lt;/em&gt;Line3"&amp;gt;&amp;lt;/root&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="code-title"&gt;The ActionScript&lt;/div&gt;&lt;div class="code"&gt;var xml:XML = new XML();&lt;br /&gt;&lt;br /&gt;xml.load("slash-n.xml"); &lt;br /&gt;&lt;br /&gt;xml.onLoad = function()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var testAttr:String = this.firstChild.attributes.test;&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;trace(testAttr); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//this traces: &lt;em&gt;Line1\nLine2\nLine3&lt;/em&gt;&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;trace("Line1\nLine2\nLine3"); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//this traces: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&lt;em&gt;Line1&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&lt;em&gt;Line2&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&lt;em&gt;Line3&lt;/em&gt;&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;trace(testAttr.indexOf("\\n")); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//this traces: &lt;em&gt;5&lt;/em&gt;&lt;br /&gt;};&lt;/div&gt;&lt;br /&gt;This example illustrates that the first trace, using the externally-loaded string, actually outputs "\n", whereas the second trace renders the newline characters in the string literal as line-breaks.&lt;br /&gt;&lt;br /&gt;The problem here is that the XML class actually escapes slashes it sees by doubling them up, as in &lt;span class="code"&gt;"\\n"&lt;/span&gt;. This behavior is observed in the third trace which shows that &lt;span class="code"&gt;"\\n"&lt;/span&gt; exists in the string.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;/h4&gt;There are two ways to solve this -- a quick way and a better way.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;A Quick Solution - ActionScript Change&lt;/h5&gt;The quick way to solve this, leaving the XML as-is, is to simply replace &lt;span class="code"&gt;"\\n"&lt;/span&gt; with &lt;span class="code"&gt;"\n"&lt;/span&gt; after the XML load:&lt;br /&gt;&lt;br /&gt;&lt;div class="code-title"&gt;ActionScript now replaces "\\n" with "\n"&lt;/div&gt;&lt;div class="code"&gt;var xml:XML = new XML();&lt;br /&gt;&lt;br /&gt;xml.load("slash-n.xml");&lt;br /&gt;&lt;br /&gt;xml.onLoad = function()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var testAttr:String = this.firstChild.attributes.test;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;testAttr = testAttr.split("\\n").join("\n");&lt;/em&gt;&lt;br /&gt; &lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;trace(testAttr); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//this now traces: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Line1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Line2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Line3&lt;/em&gt;&lt;br /&gt;};&lt;/div&gt;&lt;br /&gt;This solves the problem.&lt;br /&gt;&lt;br /&gt;But what if our attribute needs to contain other special characters such as a less-than/greater-than signs or double-quotes? Those must be escaped using the entities &lt;span class="code"&gt;&amp;amp;lt;&lt;/span&gt; &lt;span class="code"&gt;&amp;amp;gt&lt;/span&gt; and &lt;span class="code"&gt;&amp;amp;quot;&lt;/span&gt;, and with a lot of those in the XML, this hinders readability and, if the file is being managed by hand, also hinders writability. A better way would be to use a XML CDATA block instead of an XML attribute.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;A Better Solution - ActionScript and XML Changes&lt;/h5&gt;This solution takes advantage of the CDATA block, whose contents are not parsed during the XML load, thus not requiring us to escape less-than/greater-than signs and double-quotes.&lt;br /&gt;&lt;br /&gt;The ActionScript XML class still doubles-up slashes so we will still need to replace &lt;span class="code"&gt;"\\n"&lt;/span&gt; with &lt;span class="code"&gt;"\n"&lt;/span&gt;, but our XML file will have higher readability and writability.&lt;br /&gt;&lt;br /&gt;&lt;div class="code-title"&gt;Before: XML attribute leads to low readability/writability&lt;/div&gt;&lt;div class="code"&gt;&amp;lt;root test="&amp;amp;quot;Line1&amp;amp;quot;\n&amp;amp;gt;&amp;amp;gt;Line2\n&amp;amp;lt;Line3&amp;amp;gt;"&amp;gt;&amp;lt;/root&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="code-title"&gt;After: XML changed for higher readability/writability&lt;/div&gt;&lt;div class="code"&gt;&amp;lt;root&amp;gt;&lt;em&gt;&amp;lt;![CDATA["&lt;/em&gt;Line1&lt;em&gt;"&lt;/em&gt;\n&lt;em&gt;&amp;gt;&amp;gt;&lt;/em&gt;Line2\n&lt;em&gt;&amp;lt;&lt;/em&gt;Line3&lt;em&gt;&amp;gt;]]&amp;gt;&lt;/em&gt;&amp;lt;/root&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="code-title"&gt;ActionScript refers to CDATA block and replaces "\\n"&lt;/div&gt;&lt;div class="code"&gt;var xml:XML = new XML();&lt;br /&gt;&lt;br /&gt;xml.load("slash-n.xml");&lt;br /&gt;&lt;br /&gt;xml.onLoad = function()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;var testCdataText:String = this.firstChild.firstChild.nodeValue&lt;/em&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;testCdataText = testCdataText.split("\\n").join("\n");&lt;/em&gt;&lt;br /&gt; &lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;trace(testCdataText); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//this traces: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//"Line1"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;gt;&amp;gt;Line2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;lt;Line3&amp;gt;&lt;/em&gt;&lt;br /&gt;};&lt;/div&gt;&lt;br /&gt;This solves the newline problem while also increasing the readability and writability of the XML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-3655471612427519108?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/3655471612427519108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/04/newline-not-properly-escaping-from-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/3655471612427519108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/3655471612427519108'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/04/newline-not-properly-escaping-from-xml.html' title='Escaped Newline not properly rendering from XML'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-6986567354662359939</id><published>2009-02-04T16:23:00.029-05:00</published><updated>2009-08-14T09:17:10.815-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><category scheme='http://www.blogger.com/atom/ns#' term='flash player 8'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 2'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>ExternalInterface vs. JS function returning empty-string</title><content type='html'>&lt;h4&gt;The Problem&lt;/h4&gt;I have a JavaScript function that always returns a string, but in some cases it needs to return an empty-string. I have Flash, using ActionScript 2, call this function using &lt;span class="code"&gt;ExternalInterface.call&lt;/span&gt;, but surprisingly when the return value of the JavaScript function is empty-string, &lt;span class="code"&gt;ExternalInterface.call&lt;/span&gt; returns the 4-character string: &lt;span class="code"&gt;"null"&lt;/span&gt;. If using ActionScript 3, the value &lt;span class="code"&gt;null&lt;/span&gt; is returned instead of the string.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code-title"&gt;JavaScript:&lt;/div&gt;&lt;div class="code"&gt;function test(bln)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (bln ? "some text" : "");&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div class="code-title"&gt;ActionScript:&lt;/div&gt;&lt;div class="code"&gt;import flash.external.*;&lt;br /&gt;&lt;br /&gt;ExternalInterface.call(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"alert",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"'" + ExternalInterface.call("test", true) + "'");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;//alerts: 'some text'&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;ExternalInterface.call(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"alert",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"'" + ExternalInterface.call("test", false) + "'");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;//alerts: 'null'&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;/h4&gt;The workaround is to detect &lt;span class="code"&gt;"null"&lt;/span&gt; or &lt;span class="code"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt; and replace it with empty-string, as in these examples:&lt;br /&gt;&lt;br /&gt;&lt;div class="code-title"&gt;ActionScript 2 workaround&lt;/div&gt;&lt;div class="code"&gt;import flash.external.*;&lt;br /&gt;&lt;br /&gt;var x = ExternalInterface.call("test", false);&lt;br /&gt;&lt;br /&gt;&lt;em&gt;if (x == "null")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x = "";&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;ExternalInterface.call("alert", "'" + x + "'"); &lt;em&gt;//alerts: ''&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="code-title"&gt;ActionScript 3 workaround&lt;/div&gt;&lt;div class="code"&gt;import flash.external.*;&lt;br /&gt;&lt;br /&gt;var x = ExternalInterface.call("test", false);&lt;br /&gt;&lt;br /&gt;&lt;em&gt;if (x == &lt;b&gt;null&lt;/b&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x = "";&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;ExternalInterface.call("alert", "'" + x + "'"); &lt;em&gt;//alerts: ''&lt;/em&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-6986567354662359939?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/6986567354662359939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2009/02/externalinterface-vs-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6986567354662359939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/6986567354662359939'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2009/02/externalinterface-vs-javascript.html' title='ExternalInterface vs. JS function returning empty-string'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-7801260845280504124</id><published>2008-11-20T13:34:00.018-05:00</published><updated>2009-08-14T09:17:41.763-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='ADO'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>ADO Timeouts: Connection vs. Command vs. RecordSet</title><content type='html'>&lt;h4&gt;The Problem&lt;/h4&gt;An interesting bit I learned today is that if you need to extend the time limit for an intensive SQL query or procedure executed using ADO, setting only the &lt;span class="code"&gt;commandTimeout&lt;/span&gt; property of your &lt;span class="code"&gt;ADODB.Connection&lt;/span&gt; instance is not sufficient. You will see that you have extended the connection time limit, but queries will still time out within the default limit of 30 seconds.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code-title"&gt;Using VBScript in ASP 3:&lt;/div&gt;&lt;div class="code"&gt;set con = createObject("ADODB.Connection")&lt;br /&gt;con.open &lt;i&gt;connectionString&lt;/i&gt;&lt;br /&gt;&lt;em&gt;con.commandTimeout = 60&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;set command = createObject("ADODB.Command")&lt;br /&gt;command.activeConnection = con&lt;br /&gt;command.commandType = adCmdText&lt;br /&gt;command.commandText = &lt;i&gt;sql&lt;/i&gt;&lt;br /&gt;command.execute&lt;br /&gt;response.write command.commandTimeout &lt;em&gt;'Actually 30 (the default).&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;/h4&gt;You must also set the &lt;span class="code"&gt;commandTimeout&lt;/span&gt; property on the &lt;span class="code"&gt;ADODB.Command&lt;/span&gt; or &lt;span class="code"&gt;ADODB.Recordset&lt;/span&gt; being used. Otherwise those objects will use the default time limit of 30 seconds because they do not inherit the time limit from the associated &lt;span class="code"&gt;ADODB.Connection&lt;/span&gt; instance.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code-title"&gt;Using VBScript in ASP 3:&lt;/div&gt;&lt;div class="code"&gt;set con = createObject("ADODB.Connection")&lt;br /&gt;con.open &lt;i&gt;connectionString&lt;/i&gt;&lt;br /&gt;con.commandTimeout = 60&lt;br /&gt;&lt;br /&gt;set command = createObject("ADODB.Command")&lt;br /&gt;command.activeConnection = con&lt;br /&gt;command.commandType = adCmdText&lt;br /&gt;command.commandText = &lt;i&gt;sql&lt;/i&gt;&lt;br /&gt;&lt;em&gt;command.commandTimeout = 60&lt;/em&gt;&lt;br /&gt;command.execute&lt;br /&gt;response.write command.commandTimeout &lt;em&gt;'This is now 60 seconds.&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;See &lt;a href="http://support.microsoft.com/kb/195489" target="_blank"&gt;this Microsoft Tech Note&lt;/a&gt; for more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-7801260845280504124?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/7801260845280504124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/11/ado-connection-timeout-command-or.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/7801260845280504124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/7801260845280504124'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/11/ado-connection-timeout-command-or.html' title='ADO Timeouts: Connection vs. Command vs. RecordSet'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-3991316954526240488</id><published>2008-11-14T12:35:00.014-05:00</published><updated>2009-08-09T15:02:40.609-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>AS3 Tween class randomly stops during animation</title><content type='html'>I gave the new AS3 Tween class a whirl to perform some simple animation entirely via ActionScript, rather than sharing the responsibilities between ActionScript and the Timeline.&lt;br /&gt;&lt;br /&gt;It worked great...&lt;em&gt;most of the time&lt;/em&gt;. The rest of the time, the Tweens would randomly decide to stop -- mid-animation -- without throwing any error as to why. "Most of the time" just doesn't cut it.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Problem&lt;/h4&gt;Here is a simplified example of this situation:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;package&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;import flash.display.*;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;import fl.transitions.*;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;import fl.transitions.easing.*;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public class SomeContainer() extends Sprite&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function animate(o:DisplayObject, x2:int, duration:uint)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var tween:Tween = new Tween(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;o,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"x",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Regular.easeOut,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;someDisplayObject.x,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x2),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;duration);&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;When invoking &lt;span class="code"&gt;animate()&lt;/span&gt;, the tween works most of the time, but randomly it stops.&lt;br /&gt;&lt;br /&gt;There is no warning of this problem in the ActionScript 3 reference manual, but &lt;a href="http://www.adobe.com/devnet/flash/quickstart/programming_animations_as3/" target="_blank"&gt;this Adobe Devnet article&lt;/a&gt; contains some fine print that reads:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Note: Consider variable scope when using the Tween class. If a tween is created in a function, it is important that the variable's scope exists beyond the function itself. If a tween is stored to a variable of local scope, ActionScript garbage collection removes the tween as the function completes, which will likely be before the tween has even begun.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;So the problem with this scenario is that the Flash Garbage Collector does not care whether the function-scoped variable is still working asynchronously or not - it destroys objects simply by reference counts and in this case nothing outside of the function references this Tween instance.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Solution&lt;/h4&gt;To fix this, simply scope the Tween instance to a class-level variable (a private attribute) rather than a function-level variable. For example:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;package&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;import flash.display.*;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;import fl.transitions.*;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;import fl.transitions.easing.*;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public class SomeContainer() extends Sprite&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function animate(o:DisplayObject, x2:int, duration:uint)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;tween&lt;/em&gt; = new Tween(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;o,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"x",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Regular.easeOut,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;someDisplayObject.x,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x2),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;duration);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;private var tween:Tween;&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;This way, the garbage collector sees that something outside of the scope of the function still references the Tween instance created within the function, so it does not destroy the instance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-3991316954526240488?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/3991316954526240488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/11/as3-tween-class-randomly-stops-during.html#comment-form' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/3991316954526240488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/3991316954526240488'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/11/as3-tween-class-randomly-stops-during.html' title='AS3 Tween class randomly stops during animation'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-7606606341690729606</id><published>2008-11-05T12:07:00.007-05:00</published><updated>2009-04-17T18:14:01.333-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='zinc'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Installing CS4 - Flash 10!</title><content type='html'>&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 150px; height: 158px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/SRHcS3S-2YI/AAAAAAAAACI/v6PsM2hSW8I/s400/adobe-cs4-cd.jpg" alt="" id="BLOGGER_PHOTO_ID_5265231656012142978" border="0" /&gt;As if it weren't enough of a treat to find out today that Barack Obama was elected as our 44th US President, my day got even better because Adobe CS4 just arrived at the office! I know there's no comparison here, but being given so much in one day is overwhelming!&lt;br /&gt;&lt;br /&gt;I'm looking forward to playing with all of the new features in &lt;a href="http://www.adobe.com/products/flash/"&gt;Flash 10&lt;/a&gt; including the new &lt;span style="font-weight: bold;"&gt;z-axis&lt;/span&gt; for 3d transformations, the &lt;span style="font-weight: bold;"&gt;bones tool&lt;/span&gt; for creating skeleton-based animations, and the &lt;span style="font-weight: bold;"&gt;object motion editor&lt;/span&gt; (ripped from After Effects) to replace somewhat clunky keyframe motion.&lt;br /&gt;&lt;br /&gt;And to turn it up another notch (BAM!) a free &lt;a href="http://www.multidmedia.com/software/zinc/" target="_blank"&gt;Zinc 3.0 upgrade to 3.0.11&lt;/a&gt; was released to include Flash 10 SWF support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-7606606341690729606?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/7606606341690729606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/11/installing-cs4-flash-10.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/7606606341690729606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/7606606341690729606'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/11/installing-cs4-flash-10.html' title='Installing CS4 - Flash 10!'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_USTRkF64NJ4/SRHcS3S-2YI/AAAAAAAAACI/v6PsM2hSW8I/s72-c/adobe-cs4-cd.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-9189902327522424665</id><published>2008-11-04T15:32:00.028-05:00</published><updated>2009-08-10T13:23:53.844-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='T-SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Inter-database Communication is Easy in T-SQL</title><content type='html'>&lt;h4&gt;Problem&lt;/h4&gt;You need to obtain data from one data source to process and store in another. You don't want your server-side-script to use two connection objects and be the slow middle-man between them, as in the diagram on the left.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 410px; height: 218px;" src="http://lh4.ggpht.com/_USTRkF64NJ4/SRDBwY3S0II/AAAAAAAAAFw/oEvWukY37js/interdatabase-sql-diagram.png" border="0" alt="Slow with two SQL Server connections and scripting vs. Optimal with only one connection." /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Solution&lt;/h4&gt;If both data sources are databases on the same MS SQL Server, it's a piece of cake to do optimally with just one connection object and pure T-SQL.&lt;br /&gt;&lt;br /&gt;Just do the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Set up Security&lt;/b&gt; - Add the user of the &lt;span style="font-style: italic;"&gt;destination &lt;/span&gt;database as a user of the &lt;span style="font-style: italic;"&gt;source&lt;/span&gt; database with at least &lt;span class="code"&gt;db_datareader&lt;/span&gt; access.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Prefix foreign tables with Schema&lt;/b&gt; - In your SQL that writes to the destination-database, prefix all tables housed in the source(foreign)-database with their "fully qualified" position in the schema to indicate which database they reside in, as illustrated in the example below.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code-title"&gt;Table &lt;em&gt;tblSource&lt;/em&gt; is from of the &lt;em&gt;ForeignDB&lt;/em&gt; database, but &lt;em&gt;tblDestination&lt;/em&gt; is from the active database.&lt;/div&gt;&lt;div class="code"&gt;insert into tblDestination (colA, colB)&lt;br /&gt;select col1, col2&lt;br /&gt;from &lt;em&gt;[ForeignDB].dbo.&lt;/em&gt;tblSource&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-9189902327522424665?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/9189902327522424665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/11/inter-database-communication-is-easy-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/9189902327522424665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/9189902327522424665'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/11/inter-database-communication-is-easy-in.html' title='Inter-database Communication is Easy in T-SQL'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_USTRkF64NJ4/SRDBwY3S0II/AAAAAAAAAFw/oEvWukY37js/s72-c/interdatabase-sql-diagram.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-7235219056939597659</id><published>2008-10-23T13:11:00.035-04:00</published><updated>2009-08-09T14:59:11.820-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><category scheme='http://www.blogger.com/atom/ns#' term='zinc'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Zinc COMPort Phone Dialer Freezes</title><content type='html'>&lt;h4&gt;Background&lt;/h4&gt;&lt;img style="float:right; margin:0 0 10px 10px; width: 150px; height: 200px;" src="http://1.bp.blogspot.com/_USTRkF64NJ4/SQcozOLHY1I/AAAAAAAAAA4/H_5_cGfP4n0/s320/kiosk-phone-dialer.jpg" alt="A photo of the building directory kiosk and phone handset which uses my application built with Flash and Zinc." /&gt;The same touch-screen kiosk I previously wrote about requires phone dialing capabilities since the purpose it serves is a Building Directory in the lobby of a government office building.&lt;br /&gt;&lt;br /&gt;I used &lt;a href="http://www.multidmedia.com/software/zinc/" target="_blank"&gt;MDM Zinc&lt;/a&gt; because I can retain all source code in Actionscript (Flash), yet utilize the computer's modem to dial phone numbers via the Zinc COMPort API (whose phone numbers are retrieved from an MS SQL database via Zinc's ODBC API).&lt;br /&gt;&lt;br /&gt;At the start of this project while evaluating Zinc as an option, the first thing I did was create a phone dialer prototype using Flash and Zinc to prove it would work. It worked perfectly. But when integrating it into the system at the tail end of the project and adding some robustness to it, I ran into a hitch that caused the Zinc-compiled application to crash.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Problem&lt;/h4&gt;In order to gracefully recover should the modem throw a "No Carrier" or "No Dialtone" error, I wanted to hang-up the line then alert the user of this error. However, when invoking the hang-up immediately when Flash is asynchronously notified, the Zinc-compiled application freezes indefinitely.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code-title"&gt;Part of the constructor of my PhoneDialer AS3 class&lt;/div&gt;&lt;div class="code"&gt;mdm.COMPort.onCOMPortData = function(e:Object)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var data:String = StringUtil.trim(e.data);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.logLine("onCOMPortData() - timeCode: " + &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.timeCode + ", data: " + data + ".");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (data == "NO CARRIER")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hangUp(); &lt;em&gt;//freezes here&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dispatchEvent(new PhoneDialerEvent(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PhoneDialerEvent.NO_CARRIER));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (data == "NO DIALTONE")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hangUp(); &lt;em&gt;//freezes here&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dispatchEvent(new PhoneDialerEvent(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PhoneDialerEvent.NO_DIALTONE));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (data == "OK")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Dial was successful!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dispatchEvent(new PhoneDialerEvent(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PhoneDialerEvent.OK));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;};&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="code-title"&gt;Method in my PhoneDialer class:&lt;/div&gt;&lt;div class="code"&gt;public function hangUp()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!pickedUp)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw new AlreadyHungUpException();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.logLine("Closing COMPort.");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;mdm.COMPort.close(); //actually freezes here&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;pickedUp = false;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Solution&lt;/h4&gt;The solution was to &lt;b&gt;not invoke &lt;span class="code"&gt;mdm.COMPort.close()&lt;/span&gt; within the &lt;span class="code"&gt;onCOMPortData&lt;/span&gt; handler&lt;/b&gt;. Instead, I alert the user of the error which also instructs him/her to click the Cancel button on the Dialing screen. Then the cancel button invokes &lt;span class="code"&gt;hangUp()&lt;/span&gt;, which works without a hitch.&lt;br /&gt;&lt;br /&gt;Also one other item of interest: even though Zinc was designed to support Actionscirpt 3, the first line of code above, &lt;span class="code"&gt;mdm.COMPort.onCOMPortData = fuction(...&lt;/span&gt; triggers a warning when compiling to SWF - &lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;"Warning: 1072: Migration issue: Class is not a dynamic class. Instances cannot have members added to them dynamically."&lt;/span&gt; Since this is just a warning, it does not cause any problems during run-time, but it's interesting that they did not switch to use the standard &lt;span class="code"&gt;addEventListener&lt;/span&gt; method of event-handling that has been implemented as a standard across AS3 components.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;In a perfect world, this error would never happen if the kiosk were always connected to the phone line and the phone line were to always provide a dial tone. But since those are possibilities, the application is now robust because it properly recovers from those scenarios instead of crashes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-7235219056939597659?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/7235219056939597659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/10/zinc-comport-phone-dialer-freezes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/7235219056939597659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/7235219056939597659'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/10/zinc-comport-phone-dialer-freezes.html' title='Zinc COMPort Phone Dialer Freezes'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_USTRkF64NJ4/SQcozOLHY1I/AAAAAAAAAA4/H_5_cGfP4n0/s72-c/kiosk-phone-dialer.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-9015508784818137813</id><published>2008-10-16T20:00:00.026-04:00</published><updated>2009-08-09T14:55:39.763-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharedobject'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='privacy'/><title type='text'>SharedObjects - "Cookies" that Don't Go Away</title><content type='html'>Flash SharedObjects are an easy way to preserve application state on the client-side between sessions.&lt;br /&gt;&lt;br /&gt;I have used them for Flash CD-ROM applications that need to persist data on the user's local machine and for Flash web applications that needed a "cheap local database".&lt;br /&gt;&lt;br /&gt;But Flash SharedObjects pose a serious privacy problem for anyone who may have access to your computer.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Privacy Problem&lt;/h4&gt;The default Flash Player settings give 100KB of local data storage to any SWF from any web site or Flash application.&lt;br /&gt;&lt;br /&gt;One may expect that since Flash Player runs in the context of a web browser, that when you tell your web browser to clear its cache, cookies, or other private data, that it will also remove the Flash Player SharedObject data - at least the ones added via your active web browser.&lt;br /&gt;&lt;br /&gt;Unfortunately, that is not the case - Flash Player keeps all of your SharedObjects until you explicitly remove them.&lt;br /&gt;&lt;br /&gt;See for yourself - on a Windows XP machine browse to this folder (&lt;span style="font-weight: bold;"&gt;Folder #1&lt;/span&gt;):&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;C:\Documents and Settings\&lt;em&gt;&amp;lt;Your Username&amp;gt;&lt;/em&gt;\Application Data\Macromedia\Flash Player\#SharedObjects\&lt;em&gt;&amp;lt;Random Letters and Numbers&amp;gt;&lt;/em&gt;\&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;span style="font-weight: bold;"&gt;You may be surprised to see that folder is filled with the domain-names of every web site you have ever visited that contained a Flash file that persisted some data.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is also another folder that houses more SharedObject data (&lt;span style="font-weight: bold;"&gt;Folder #2&lt;/span&gt;):&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;C:\Documents and Settings\&lt;em&gt;&amp;lt;Your Username&amp;gt;&lt;/em&gt;\Application Data\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So how do you remove these SharedObjects and how do you prevent them from getting there in the first place?&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Solutions&lt;/h4&gt;To &lt;span style="font-weight: bold;"&gt;remove your existing Shared Objects&lt;/span&gt;, follow these steps:&lt;span style="font-size:180%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;Delete existing SharedObjects&lt;br /&gt;&lt;br /&gt;Go to the &lt;a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html"&gt;Website Storage Settings Panel&lt;/a&gt; of the Flash Player Settings Manager (yes, the manager is on a website, not within software). Move the slider down to "None".&lt;br /&gt;&lt;br /&gt;This removes all files from the Folder #1 (above), but for some reason &lt;span style="font-weight: bold;"&gt;does not&lt;/span&gt; remove from the second folder.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Delete Contents of Folder #2&lt;br /&gt;&lt;br /&gt;Since the previous step did not empty Folder #2 (above), you need to manually delete the contents of that folder.&lt;/li&gt;&lt;/ol&gt;To &lt;span style="font-weight: bold;"&gt;prevent future SharedObjects&lt;/span&gt; from being saved on your system in the future, you can do this globally for all web sites using the &lt;a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html"&gt;Global Storage Settings&lt;/a&gt; manager.&lt;span style="font-size:180%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Or set your SharedObject storage settings on a site-by-site basis by doing this:&lt;ol&gt;&lt;li&gt;Right-click on a visible Flash object in a web page.&lt;/li&gt;&lt;li&gt;Click settings.&lt;/li&gt;&lt;li&gt;Click on the tab with the "folder" icon - Local Storage.&lt;/li&gt;&lt;li&gt;Use the slider to change the data limits for that particular web site.&lt;/li&gt;&lt;/ol&gt;&lt;ol&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-9015508784818137813?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/9015508784818137813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/10/privacy-of-flash-sharedobjects-cookies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/9015508784818137813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/9015508784818137813'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/10/privacy-of-flash-sharedobjects-cookies.html' title='SharedObjects - &quot;Cookies&quot; that Don&apos;t Go Away'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-2834061639040998447</id><published>2008-10-15T14:24:00.015-04:00</published><updated>2009-08-09T14:53:52.228-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><category scheme='http://www.blogger.com/atom/ns#' term='zinc'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Zinc Crashes on Select from Database</title><content type='html'>&lt;h4&gt;Background&lt;/h4&gt;I'm using &lt;a href="http://www.multidmedia.com/software/zinc/" target="_blank"&gt;Zinc 3&lt;/a&gt; as a wrapper around a Flash 9 / ActionScript 3 application for a touch-screen kiosk that requires database and comport access.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Problem&lt;/h4&gt;The Zinc application crashes when calling &lt;span class="code"&gt;mdm.Database.ADO.getData()&lt;/span&gt; to obtain the results of a query (either SELECT or stored procedure) executed by &lt;span class="code"&gt;mdm.Database.ADO.select()&lt;/span&gt; IF the query produces an empty result set. I'm connecting to a MS SQL Server 2005 database, but this issue probably happens with any ADO connection.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code"&gt;mdm.Database.ADO.select(sql); &lt;em&gt;//if this results in 0 records...&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;if (mdm.Database.ADO.error())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw("handle error here");&lt;br /&gt;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arr = &lt;em&gt;mdm.Database.ADO.getData(); //crashes here&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Solution&lt;/h4&gt;The undocumented but simple way to prevent the crash is: prior to calling &lt;span  class="code"&gt;getData()&lt;/span&gt;, you must first check ensure that &lt;span  class="code"&gt;getRecordCount()&lt;/span&gt; is not zero.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;&lt;div class="code"&gt;mdm.Database.ADO.select(sql);&lt;br /&gt;&lt;br /&gt;if (mdm.Database.ADO.error())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw("handle error here");&lt;br /&gt;&lt;em&gt;else if (mdm.Database.ADO.getRecordCount() == 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arr = [];&lt;/em&gt;&lt;br /&gt;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arr = mdm.Database.ADO.getData();&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;Ideally Zinc would just return an empty array if no records were found, but since it doesn't, it's nice to know there is an easy fix. I am content with minor problems like this because the benefits Zinc offers - including access to databases and the comport directly from Actionscript - far outweighs the bugs it has.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-2834061639040998447?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/2834061639040998447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/10/zinc-crashes-on-select-from-database.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/2834061639040998447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/2834061639040998447'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/10/zinc-crashes-on-select-from-database.html' title='Zinc Crashes on Select from Database'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489434220975124883.post-1234320323230300989</id><published>2008-10-15T13:43:00.008-04:00</published><updated>2008-10-17T14:04:41.159-04:00</updated><title type='text'>trace("Hello World!");</title><content type='html'>I finally decided to start a blog to record lessons learned from the trials &amp;amp; tribulations along my journey of coding for a living, with the hope that these solutions will save even just one headache for one fellow coder.&lt;br /&gt;&lt;br /&gt;This blog will focus mainly on Flash ActionScript 2 and ActionScript 3 but will cover anything related such as Zinc, JavaScript, SQL, XML, or anything else that causes me grief but results in a helpful solution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;About the Author&lt;/span&gt;&lt;br /&gt;My name is Ricky Blaha. I am a senior programmer for &lt;a href="http://icslearninggroup.com/" target="_blank"&gt;ICS&amp;nbsp;Learning&amp;nbsp;Group&lt;/a&gt; in Severna Park, Maryland, USA, as well as a freelance programmer doing business as &lt;a href="http://interstellarmultimedia.com/" target="_blank"&gt;Interstellar&amp;nbsp;Multimedia&lt;/a&gt; -- both concentrating in the multimedia, web-development, and e-learning arenas.&lt;br /&gt;&lt;br /&gt;Coding professionally since 1999, my journey started with ColdFusion 4.5 with Oracle and XHTML, CSS and JavaScript. It later evolved into ASP3 development with SQL Server, then some PHP with mySQL. Then in 2002 the opportunity arrived to learn and use Flash 5 and Actionscript 1, and ever since, developing CD-ROMs, touch-screen kiosks, e-learning applications, and web applications with Flash have been my major focus and greatest source of enjoyment.&lt;br /&gt;&lt;br /&gt;In 2008 I decided to back up my experience to become an Adobe Certified Flash MX 2004 Developer. In Fall 2009 I will finally complete my BS in Computer Science with a minor in Strategic and Entrepreneurial Management from &lt;a href="http://www.umuc.edu/" target="_blank"&gt;UMUC&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489434220975124883-1234320323230300989?l=codingjourney.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingjourney.blogspot.com/feeds/1234320323230300989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingjourney.blogspot.com/2008/10/hello-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/1234320323230300989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489434220975124883/posts/default/1234320323230300989'/><link rel='alternate' type='text/html' href='http://codingjourney.blogspot.com/2008/10/hello-world.html' title='trace(&quot;Hello World!&quot;);'/><author><name>Ricky</name><uri>http://www.blogger.com/profile/03407677396580545040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_USTRkF64NJ4/Sm3c_Wkty2I/AAAAAAAAAD0/_mypp-zotbs/S220/me-icon.jpg'/></author><thr:total>0</thr:total></entry></feed>
