<?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-13937734</id><updated>2012-02-13T22:03:32.135-08:00</updated><category term='yui'/><category term='favelet'/><category term='setup'/><category term='flash'/><category term='Windows Mobile'/><category term='MobileMapper CE'/><category term='javascript'/><category term='SQL'/><category term='bug'/><category term='complain'/><category term='SQL CLR'/><category term='DataGrid'/><category term='ItemRenderer'/><category term='Windows API'/><category term='Interview Questions'/><category term='application'/><category term='Visual Studio 2010'/><category term='library'/><category term='jslint'/><category term='c#'/><category term='troubleshooting'/><category term='ActiveX'/><category term='bookmarklet'/><category term='Flex Builder'/><category term='script'/><category term='resource'/><category term='Flex'/><category term='link'/><category term='.net'/><category term='performance'/><category term='eclipse'/><category term='actionscript'/><category term='Android'/><category term='review'/><category term='rant'/><category term='utility'/><category term='deploy'/><category term='debug'/><category term='embedded'/><category term='xml'/><category term='jQuery'/><category term='ant'/><category term='Flash Builder'/><category term='tool'/><category term='Unit Test'/><category term='silverlight'/><category term='ajax'/><category term='security'/><category term='C/C++'/><category term='modem'/><category term='streaming'/><category term='Windows Services'/><category term='syntax highlighting'/><category term='chart'/><category term='API'/><category term='gui'/><category term='work around'/><category term='visual studio'/><category term='yui compressor'/><category term='blogger'/><category term='Firefox'/><category term='MFC'/><category term='icon'/><category term='optimization'/><category term='ActiveSync'/><category term='design'/><category term='asp.net'/><category term='IE'/><category term='version control'/><category term='RAPI'/><category term='ColdFusion Builder'/><category term='plugins'/><category term='SVN'/><category term='ColdFusion'/><category term='gotcha'/><category term='Windows CE'/><category term='aptana'/><category term='json'/><category term='NUNIT'/><category term='google'/><category term='system administration'/><title type='text'>Tips for software engineer</title><subtitle type='html'>Tips that make life of a software engineer easier. 

Well, not exactly. Some posts are open questions that I haven't found an answer ... yet</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default?start-index=101&amp;max-results=100'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>110</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13937734.post-7149185455573008505</id><published>2012-02-13T22:03:00.000-08:00</published><updated>2012-02-13T22:03:32.181-08:00</updated><title type='text'>file 'lib' not found</title><content type='html'>When installing Ruby on Rails using command: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gem install rails&lt;/span&gt;&lt;br /&gt;Got this error message:&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; file 'lib' not found&lt;/span&gt;&lt;br /&gt;Seems like it's fixed by running &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gem instal rdoc&lt;/span&gt; followed by &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gem install rails&lt;/span&gt; again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7149185455573008505?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7149185455573008505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7149185455573008505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7149185455573008505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7149185455573008505'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2012/02/file-lib-not-found.html' title='file &apos;lib&apos; not found'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1678821042472443491</id><published>2012-01-17T16:36:00.000-08:00</published><updated>2012-01-17T16:36:29.372-08:00</updated><title type='text'>Cross Site XMLHttpRequest</title><content type='html'>&lt;ul&gt;&lt;li&gt;IE8 and above:&lt;ul&gt;&lt;li&gt; use XDomainRequest instead&lt;/li&gt;&lt;li&gt;Can only cross from HTTP to HTTP or HTTPS to HTTPS (i.e. if web page is served from HTTP, then cannot cross-site access HTTPS. Or web page served over SSL cannot cross site access HTTP content. Will get "Access Denied" error.)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Cross site request server must send this response header:&amp;nbsp; &lt;span class=" " title="Access-Control-Allow-Origin"&gt;Access-Control-Allow-Orig &lt;/span&gt;&lt;code class="focusRow subFocusRow " role="listitem"&gt;*&lt;/code&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/13937734-1678821042472443491?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1678821042472443491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1678821042472443491' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1678821042472443491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1678821042472443491'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2012/01/cross-site-xmlhttprequest.html' title='Cross Site XMLHttpRequest'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6622381138977535051</id><published>2011-12-02T10:40:00.001-08:00</published><updated>2011-12-02T11:43:05.835-08:00</updated><title type='text'>Useful Sysinternals Utilities</title><content type='html'>As a software engineer (not system administrator), I found the following tools from Sysinternal to be useful.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Autoruns: mainly used to turn off unnecessary executables during boot and login to speed up system boot performance&lt;/li&gt;&lt;li&gt;Portmon: used to monitor serial port traffic (similar to wireshark for network traffic)&lt;/li&gt;&lt;li&gt;Process Explorer: used mainly to find file locks, so that I know which process to kill to be able to free up the lock.&lt;/li&gt;&lt;li&gt;Process Monitor&lt;/li&gt;&lt;li&gt;PsExec: remote execute console application. Examples:&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-left: 40px;"&gt;&lt;li&gt;psexec \\vm-001 ipconfig /all&lt;/li&gt;&lt;li&gt;psexec \\vm-001 cmd&lt;/li&gt;&lt;li&gt;This command copies the program test.exe to the remote system and executes it interactively: psexec \\vm-001 -c test.exe &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;PsKill: kill local or remote processes. Mainly used in server software for house keeping (for example: kill stuck Office Automation process)&lt;/li&gt;&lt;li&gt;PsService&lt;/li&gt;&lt;li&gt;ZoomIt: usefuly for presentation. Zoom in screen, draw lines on the screen.&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/13937734-6622381138977535051?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6622381138977535051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6622381138977535051' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6622381138977535051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6622381138977535051'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/12/useful-sysinternals-utilities.html' title='Useful Sysinternals Utilities'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2249160998352046294</id><published>2011-10-28T17:20:00.000-07:00</published><updated>2011-10-28T17:20:31.344-07:00</updated><title type='text'>Disable Touchpad on Dell Laptop</title><content type='html'>&lt;b&gt;Problem&lt;/b&gt;&lt;br /&gt;Ever frustrated with Touchpad being overly sensitive?&lt;br /&gt;&lt;br /&gt;I frequently got random mouse movements and clicks while using Laptop's keyboard. They are caused by the Touchpad being overly sensitive. It is especially a problem when I am using remote desktop working on another computer. I guess the Touchpad sensitivity settings does not work on remote desktop client?&lt;br /&gt;&lt;br /&gt;And this is a major frustration, because when I finish typing a line of code, they frequently show up on the wrong line, and did not show up anywhere at all, because the random mouse clicks has took their focus away.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Research&lt;/b&gt;&lt;br /&gt;Today, finally it struck me that I should disable this thing. And turns out the latest DELL tool has some nice options available. For one thing, I can permanently enable/disable "Pointing Stick", "Pointing Stick Buttons", "Touchpad", and "Touchpad Buttons". But, there is also a very nice feature called: "Disable Touchpad/Point Stick when external USB mouse is present". This is really a very user friendly feature that I never thought of searching for before.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;I put a check next to the option:&amp;nbsp;&amp;nbsp;&lt;b&gt;"Disable Touchpad/Point Stick when external USB mouse is present"&lt;/b&gt;, and got a wireless mouse. Problem solved. Happily typing code again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2249160998352046294?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2249160998352046294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2249160998352046294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2249160998352046294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2249160998352046294'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/10/disable-touchpad-on-dell-laptop.html' title='Disable Touchpad on Dell Laptop'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5557112832147901667</id><published>2011-10-14T11:23:00.000-07:00</published><updated>2011-10-14T11:23:09.793-07:00</updated><title type='text'>Google Code Search will be shutdown January 15, 2012</title><content type='html'>&lt;a href="http://techcrunch.com/2011/10/14/google-axes-more-services-jaiku-code-search-more/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29"&gt;http://techcrunch.com/2011/10/14/google-axes-more-services-jaiku-code-search-more/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29&lt;/a&gt;&lt;br /&gt;It was a very useful tool for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5557112832147901667?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5557112832147901667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5557112832147901667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5557112832147901667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5557112832147901667'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/10/google-code-search-will-be-shutdown.html' title='Google Code Search will be shutdown January 15, 2012'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6004961542879520462</id><published>2011-10-10T23:45:00.000-07:00</published><updated>2011-10-10T23:45:41.668-07:00</updated><title type='text'>Portable Mouse with a Hook or Loop</title><content type='html'>&lt;b&gt;Goal&lt;/b&gt;: to allow portable mouse to be even more portable&lt;br /&gt;&lt;br /&gt;Going to meeting with a laptop, a pen and notebook (made with paper) and a mouse can be a handful (not to mention when you have a cup of coffee). What if we have a hook or ring on the mouse so that it can dangle on a finger (or belt?).&lt;br /&gt;&lt;b&gt;&amp;nbsp; &lt;/b&gt;&lt;br /&gt;&lt;b&gt;Potential Solutions&lt;/b&gt;&lt;br /&gt;- retractable ring&lt;br /&gt;- foldable ring&lt;br /&gt;- hook&lt;br /&gt;&lt;br /&gt;Need to pay attention of location of ring or hook so that they don't interfere with normal mouse use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-6004961542879520462?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6004961542879520462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6004961542879520462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6004961542879520462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6004961542879520462'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/10/portable-mouse-with-hook-or-loop.html' title='Portable Mouse with a Hook or Loop'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-8816356646558656039</id><published>2011-09-03T00:07:00.000-07:00</published><updated>2011-09-03T00:10:39.045-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Builder'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion Builder'/><title type='text'>Adobe Flash Builder 4 and Coldfusion Builder crash during startup</title><content type='html'>&lt;span style="font-size: large;"&gt;&lt;b&gt;Symptom&lt;/b&gt;&lt;/span&gt;: all of sudden, my Flash Builder 4 and Coldfusion Builder can not be started. They will crash during start. They are running on Eclipse 3.4.2, and 3.5.2 respectively.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Diagnostic&lt;/b&gt;&lt;/span&gt;: Coldfusion builder simply show me an error dialog without any useful information. It just generically states something like: Visual C++ request application to exit in abnormal way.&lt;br /&gt;Of course, I tried to reset Eclipse and clear it's workspace to no avail.&lt;br /&gt;However, luckily, Flash Builder 4 throws an exception. And I got a chance to start Visual Studio 2010 debugger session on it. Once in Visual Studio debugger, I saw exception type "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;bad_day_of_month&lt;/span&gt;" from boost library. Then I turn to "Stack Trace" tab, and saw callstack: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Kernel32-&amp;gt;atmlib.dll-&amp;gt;UpdateNotifications.dll&lt;/span&gt;. A little Google on this end turned up a thread talking about similar problem from other Adobe users. So, I read the thread, it starts to mention how the "UpdateNotification" library will look at Windows Scheduled Tasks for Adobe updater. Then it occurs to me what might be, and later proven to actually be the root cause.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Cause&lt;/b&gt;&lt;/span&gt;: A few days earlier, in an effort to speed up my computer, I ran "AutoRuns" utility from "System Internals", and disabled a bunch of "Scheduled Tasks". Among them was a task named "AdobeAAMUpdater-1.0......".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Fix&lt;/b&gt;&lt;/span&gt;: using "AutoRuns" utilities, I turned the "AdobeAAMUpdater-1.0....." scheduled task back on. Then Flash Builder 4 and Coldfusion Builder are all back to normal. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-8816356646558656039?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/8816356646558656039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=8816356646558656039' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8816356646558656039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8816356646558656039'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/09/adobe-flash-builder-4-and-coldfusion.html' title='Adobe Flash Builder 4 and Coldfusion Builder crash during startup'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-526911343088520754</id><published>2011-08-08T13:20:00.000-07:00</published><updated>2011-08-08T13:20:12.846-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Maintenance Plan Failed</title><content type='html'>&lt;b&gt;Environment&lt;/b&gt;: SQL 2005&lt;br /&gt;&lt;b&gt;Symptom&lt;/b&gt;: Scheduled SQL maintenance plan to do partial backup failed. Got two message logged in SQL Server log:&lt;br /&gt;Error: 3041, Severity: 16, State: 1&lt;br /&gt;BACKUP failed to complete the command BACKUP DATABASE master WITH DIFFERENTIAL. Check the backup application log for detailed messages.&lt;br /&gt;&lt;b&gt;Cause&lt;/b&gt;: Master database does not support partial backup. So, if the task is for "Differential" backup, "master" database should not be included.&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;: Open the plan details, in the "Database(s)" section make sure database that needs to be backup are explicitly selected, instead of having "All databases" checked.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-526911343088520754?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/526911343088520754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=526911343088520754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/526911343088520754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/526911343088520754'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/08/sql-maintenance-plan-failed.html' title='SQL Maintenance Plan Failed'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7458678047767518970</id><published>2011-08-01T17:23:00.000-07:00</published><updated>2011-08-01T17:23:48.399-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion'/><title type='text'>Coldfusion Webservice Input Name Changed to in0</title><content type='html'>&lt;b&gt;Symptom&lt;/b&gt;: Coldfusion webservices sometimes complain about input parameter "In0"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Environment&lt;/b&gt;: Coldfusion 9 on Windows&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;: Login to Coldfuion 9 Administrator portal, Go to Server Settings &amp;gt; Caching, click on "Clear Template Cache Now" and "Clear Component Cache Now". This seems to trigger to re-compile of webservices WSDL thus fixed the problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;However&lt;/b&gt;: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;I don't know what is the root cause of this problem. Google turn-up some similar complains, but could not find any official answers on this&lt;/li&gt;&lt;li&gt;The solution which required human interaction does not help in production environment&lt;/li&gt;&lt;li&gt;The solution does not solve the problem permanently, sooner or later I'll hit the same error, and has to go back to the server and clear cache again &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/13937734-7458678047767518970?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7458678047767518970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7458678047767518970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7458678047767518970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7458678047767518970'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/08/coldfusion-webservice-input-name.html' title='Coldfusion Webservice Input Name Changed to in0'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-9117536130551520155</id><published>2011-05-11T14:36:00.000-07:00</published><updated>2011-05-13T13:30:30.379-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion'/><title type='text'>CFQUERYPARAM: LIST and SEPARATOR attributes</title><content type='html'>Adobe online document only listed these two attributes without much explanation. I found the following link with very thorough explanation of the effects and usage of these two attributes:&lt;br /&gt;&lt;a href="http://www.pukkared.com/2011/01/using-cfqueryparam-list-attribute-when-using-in-operator/"&gt;http://www.pukkared.com/2011/01/using-cfqueryparam-list-attribute-when-using-in-operator/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-9117536130551520155?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/9117536130551520155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=9117536130551520155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9117536130551520155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9117536130551520155'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/05/cfqueryparam-list-and-separator.html' title='CFQUERYPARAM: LIST and SEPARATOR attributes'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-8791100478754811466</id><published>2011-05-03T12:49:00.000-07:00</published><updated>2011-05-03T12:49:02.131-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='NUNIT'/><title type='text'>NUnit Integration With Visual Studio 2010</title><content type='html'>I just discovered the perfect tool for NUnit integration: &lt;a href="http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099"&gt;Visual Nunit 2010&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are the pros:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Open source, Apache License&lt;/li&gt;&lt;li&gt;GUI: I personally like it better than the official Nunit GUI&lt;/li&gt;&lt;li&gt;Visual Studio Integration: of course, this is the #1 reason I try it out, and I'm completely satisfied&lt;/li&gt;&lt;li&gt;Load config file without problem (Nunit project does not load config files correctly)&lt;/li&gt;&lt;li&gt;Debug: attach to Nunit or Nunit-agent is no longer needed, simply set breakpoints and click the red&amp;nbsp; arrow to start debug session&lt;/li&gt;&lt;li&gt;Easy drilldown of test cases&lt;/li&gt;&lt;li&gt;One click to execute any individual test cases&lt;/li&gt;&lt;/ul&gt;Cons? None so far.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-8791100478754811466?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/8791100478754811466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=8791100478754811466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8791100478754811466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8791100478754811466'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/05/nunit-integration-with-visual-studio.html' title='NUnit Integration With Visual Studio 2010'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-756070951700539431</id><published>2011-04-21T18:58:00.000-07:00</published><updated>2011-04-22T10:45:08.323-07:00</updated><title type='text'>Server Side Office Automation using ColdFusion</title><content type='html'>Tips after fighting to get robust Office Automation using ColdFusion 9.&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;br /&gt;COM: Microsoft Component Object Model.&lt;br /&gt;Automation: the process of launching another application and controlling it programmatically through a public interface.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Environment&lt;/b&gt;&lt;br /&gt;ColdFusion 9&lt;br /&gt;Office 2007 SP2&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tips&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pay attention to Office version (down to minor rev numbers), I encountered several major differences&amp;nbsp; between Office 2007, and Office 2007 SP2 (no to mention the differences between 2003 and 2007)&lt;/li&gt;&lt;li&gt;Server setup&lt;/li&gt;&lt;ul&gt;&lt;li&gt;CF service account must be interactive&lt;/li&gt;&lt;li&gt;Office installation need to select option to install all features locally&lt;/li&gt;&lt;li&gt;After Office installation, need to login as service account, and start Office applications and click through license agreement, registration, ...&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Open Office applications with Visible=false may have negative impact on it's behavior (At least for Powerpoint, I found some layout options are not functioning correctly if application is started in invisible mode. Specifically, I was trying to set text box property: "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Shrink text on overflow&lt;/span&gt;", by setting &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AutoSize=2 (msoAutoSizeTextToFitShape)&lt;/span&gt;, it won't work unless Powerpoint application is created in visible mode.)&lt;/li&gt;&lt;li&gt;Before even start ColdFusion code, I usually test my script using VBS, then translate to CFScript, however, CFScript have some minor difference from VBS:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;VBScript can use array notation or foreach on some collections, but CFScript&amp;nbsp; usually has to access the 'items' accessor&lt;/li&gt;&lt;li&gt;Explicit type conversion may be necessary in some COM function calls, use "JavaCast". In my case, I got this &lt;b&gt;error message&lt;/b&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;blockquote&gt;An exception occurred when executing a COM method.&amp;nbsp; &lt;br /&gt;The cause of this exception was that: AutomationException: 0x80048240 - Item 1 not found in the Designs collection. in 'Microsoft Office PowerPoint 2007'.&amp;nbsp; &lt;/blockquote&gt;&lt;b&gt;Code&lt;/b&gt; causing the problem: objPresentation.Designs.Item(1)&lt;br /&gt;&lt;b&gt;Reason&lt;/b&gt;: ColdFusion is not type safe. COM definition for this input parameter is &lt;b&gt;variant&lt;/b&gt; type. Seems like ColdFusion trying to send it over in string format "1" instead of numeric value 1.&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;: objPresentation.Designs.Item(&lt;b&gt;JavaCast("int", 1)&lt;/b&gt;) &lt;br /&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;VBScript can use enumerates just by name, CF does not have that luxury, you have to find out the numeric values for each of the enumerations, please see my other post for list of some numeric values:&amp;nbsp;&lt;a href="http://developertips.blogspot.com/2011/03/some-enum-values-for-office-com-object.html"&gt;Some Enum Values for Office COM Object&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;To find out numeric values, I used Visual Studio to add reference to Office library, then I can easily navigate or search for enums&lt;/li&gt;&lt;li&gt;One way to implementation robust automation:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Main CFC&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Create a worker thread to do automation task&lt;/li&gt;&lt;li&gt;Wait for the thread with timeout&lt;/li&gt;&lt;li&gt;After wait is finished, if it's timeout, will kill automation application, kill thread, and cleanup, else we have successfully done!&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Automation thread&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Global lock on Office Application name (avoid concurrency issue)&lt;/li&gt;&lt;li&gt;Create automation object&lt;/li&gt;&lt;li&gt;&amp;lt;&amp;lt;do you thing&lt;do things="" your=""&gt;&amp;gt;&lt;/do&gt;&amp;gt;&lt;/li&gt;&lt;li&gt;quit automation object&lt;/li&gt;&lt;li&gt;ReleaseCOMObject &lt;/li&gt;&lt;li&gt;cleanup&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;To cleanup, I use "pskill" to kill office processes, so that a single failed call won't block all future automation attempts &lt;/li&gt;&lt;li&gt;Code segment to create automation object&lt;/li&gt;&lt;/ul&gt;&lt;script src="https://gist.github.com/935826.js?file=gistfile1.cfm"&gt;&lt;/script&gt;&lt;br /&gt;&lt;b&gt;Server Side Office Automation Problems&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Office applications are not designed for server environment&lt;/li&gt;&lt;li&gt;Concurrency (Office applications are non-reentrant, STA based automation, use global shared resources)&lt;/li&gt;&lt;li&gt;Scalability &lt;/li&gt;&lt;li&gt;Security&lt;/li&gt;&lt;li&gt;May lock up on launch or any point during execution if there are  modal dialog popup (typically you will see license agreement, error  messages, “install on first use”, … dialogs)&lt;/li&gt;&lt;li&gt;License considerations: each client must have licensed copies of Office&lt;/li&gt;&lt;li&gt;Officially discouraged by Microsoft &lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;“Microsoft does not recommend or support server-side Automation of Office”  &lt;/blockquote&gt;&lt;b&gt;Alternatives&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;CFSpreadsheet&lt;/li&gt;&lt;li&gt;HTML/XML based format for word and excel&lt;/li&gt;&lt;li&gt;OOXML (Open XML file format)&lt;/li&gt;&lt;li&gt;Excel Services (Since Sharepoint Server 2007)&lt;/li&gt;&lt;li&gt;Word Automation Services (Since Sharepoint Server 2010)&lt;/li&gt;&lt;li&gt;Server libraries: Apach POI, Microsoft Open XML SDK&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Reason to Stick with Automation Approach&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;After the above "Problems" section, the biggest incentives to use automation are&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Need to invoke Excel macro or solution package on server side&lt;/li&gt;&lt;li&gt;You already have some fancy VBS code that can do what you wanted through Office automation&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;Adobe. 2011. ColdFusion Developer’s Guide. Last Accessed April 19, 2011. &lt;a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Part_4_CF_DevGuide_1.html"&gt;http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Part_4_CF_DevGuide_1.html&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Forta, Ben and et al. 2005. Advanced Macromedia ColdFusion MX 7 Application Development, Chapter 26 Extending ColdFusion with COM. Macromedia Press. &lt;a href="http://www.forta.com/books/0321292693/0321292693_chapter26.pdf"&gt;http://www.forta.com/books/0321292693/0321292693_chapter26.pdf&lt;/a&gt;&lt;br /&gt;Microsoft. 2011. KB 257757: Considerations for server-side Automation of Office. Last Accessed April 19, 2011. &lt;a href="http://support.microsoft.com/kb/257757"&gt;http://support.microsoft.com/kb/257757&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-756070951700539431?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/756070951700539431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=756070951700539431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/756070951700539431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/756070951700539431'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/04/server-side-office-automation-using.html' title='Server Side Office Automation using ColdFusion'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6984159054703785626</id><published>2011-03-25T10:46:00.000-07:00</published><updated>2011-03-28T18:15:29.529-07:00</updated><title type='text'>Some Enum Values for Office COM Object</title><content type='html'>Actual integer values for several Office 2007 (12.0) COM Enums&lt;br /&gt;&lt;h2&gt;Microsoft Office Core&lt;/h2&gt;&lt;br /&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: rgb(43, 145,175);"&gt;MsoAutoSize&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;msoAutoSizeMixed&lt;/td&gt;&lt;td&gt;-2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;msoAutoSizeNone&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;msoAutoSizeShapeToFitText&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;msoAutoSizeTextToFitShape&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;Word&lt;/h2&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;WdSaveFormat&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;wdFormatDocument97&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatDocument&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatTemplate97&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatTemplate&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatText&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatTextLineBreaks&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatDOSText&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatDOSTextLineBreaks&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatRTF&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatUnicodeText&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatEncodedText&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatHTML&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatWebArchive&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatFilteredHTML&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatXML&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatXMLDocument&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatXMLDocumentMacroEnabled&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatXMLTemplate&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatXMLTemplateMacroEnabled&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatDocumentDefault&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatPDF&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatXPS&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatFlatXML&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatFlatXMLMacroEnabled&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatFlatXMLTemplate&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatFlatXMLTemplateMacroEnabled&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdFormatOpenDocumentText&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;WdExportFormat&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;wdExportFormatPDF&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdExportFormatXPS&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;WdAlertLevel&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;wdAlertsMessageBox&lt;/td&gt;&lt;td&gt;-2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdAlertsAll&lt;/td&gt;&lt;td&gt;-1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wdAlertsNone&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;PowerPoint&lt;/h2&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PpSaveAsFileType&lt;/span&gt;&lt;/pre&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPresentation&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPowerPoint7&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPowerPoint4&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPowerPoint3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsTemplate&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsRTF&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsShow&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsAddIn&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPowerPoint4FarEast&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsDefault&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsHTML&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsHTMLv3&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsHTMLDual&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsMetaFile&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsGIF&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsJPG&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPNG&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsBMP&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsWebArchive&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsTIF&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPresForReview&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsEMF&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLPresentation&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLPresentationMacroEnabled&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLTemplate&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLTemplateMacroEnabled&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLShow&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLShowMacroEnabled&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLAddin&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenXMLTheme&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsPDF&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsXPS&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsXMLPresentation&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsOpenDocumentPresentation&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppSaveAsExternalConverter&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PpAlertLevel&lt;/span&gt;&lt;/pre&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ppAlertsNone&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppAlertsAll&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PpAutoSize&lt;/span&gt;&lt;/pre&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ppAutoSizeMixed&lt;/td&gt;&lt;td&gt;-2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppAutoSizeNone&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppAutoSizeShapeToFitText&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PpSlideLayout&lt;/span&gt;&lt;/pre&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ppLayoutMixed&lt;/td&gt;&lt;td&gt;-2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTitle&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutText&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTwoColumnText&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTable&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTextAndChart&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutChartAndText&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutOrgchart&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutChart&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTextAndClipart&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutClipartAndText&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTitleOnly&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutBlank&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTextAndObject&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutObjectAndText&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutLargeObject&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutObject&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTextAndMediaClip&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutMediaClipAndText&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutObjectOverText&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTextOverObject&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTextAndTwoObjects&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTwoObjectsAndText&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTwoObjectsOverText&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutFourObjects&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutVerticalText&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutClipArtAndVerticalText&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutVerticalTitleAndText&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutVerticalTitleAndTextOverChart&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTwoObjects&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutObjectAndTwoObjects&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutTwoObjectsAndObject&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutCustom&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutSectionHeader&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutComparison&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutContentWithCaption&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppLayoutPictureWithCaption&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;pre  style="font-family:consolas;"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PpTextStyleType&lt;/span&gt;&lt;/pre&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ppDefaultStyle&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppTitleStyle&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppBodyStyle&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-6984159054703785626?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6984159054703785626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6984159054703785626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6984159054703785626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6984159054703785626'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2011/03/some-enum-values-for-office-com-object.html' title='Some Enum Values for Office COM Object'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7049888877784392615</id><published>2010-12-17T12:58:00.000-08:00</published><updated>2010-12-17T13:14:02.195-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion'/><title type='text'>Instead of CFDUMP</title><content type='html'>Ways to inspect CFC returns in browser without using CFDUMP.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Using Chrome JSONView extension&lt;/b&gt;:&lt;br /&gt;&lt;div&gt;&lt;div&gt;Prerequisite:&lt;/div&gt;&lt;div&gt;&lt;div&gt;    Install &lt;a href="http://www.google.com/chrome"&gt;Google Chrome&lt;/a&gt;&lt;/div&gt;&lt;div&gt;    Install &lt;a href="https://chrome.google.com/extensions/detail/chklaanhfefbnpoihckbnefhakgolnmc"&gt;JSONView for chrome&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now just add to request URL: "&amp;amp;returnFormat=JSON". The CFC return will be shown in nice hierarchical which can be interactively expanded or collapsed.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. In IE and FireFox using ServiceCapture&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Prerequisite: buy and install ServiceCapture.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Still in request URL, add: "&amp;amp;returnFormat=JSON". In ServiceCapture, Response &gt; JSON will show the data structure in expandable tree structure.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7049888877784392615?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7049888877784392615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7049888877784392615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7049888877784392615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7049888877784392615'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/12/instead-of-cfdump.html' title='Instead of CFDUMP'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3401490918954357593</id><published>2010-12-01T15:46:00.000-08:00</published><updated>2010-12-01T16:07:02.206-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion Builder'/><title type='text'>Coldfusion Builder Keyboard Shortcuts</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_C148T9ItPYw/TPbhk__8V5I/AAAAAAAAH4M/82qlWgHZw10/s1600/shot.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 191px;" src="http://4.bp.blogspot.com/_C148T9ItPYw/TPbhk__8V5I/AAAAAAAAH4M/82qlWgHZw10/s400/shot.PNG" alt="" id="BLOGGER_PHOTO_ID_5545868016924514194" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3401490918954357593?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3401490918954357593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3401490918954357593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3401490918954357593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3401490918954357593'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/12/coldfusion-builder-keyboard-shortcuts.html' title='Coldfusion Builder Keyboard Shortcuts'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_C148T9ItPYw/TPbhk__8V5I/AAAAAAAAH4M/82qlWgHZw10/s72-c/shot.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3093995501140817347</id><published>2010-11-19T11:35:00.000-08:00</published><updated>2010-11-19T23:15:13.225-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Interview Questions</title><content type='html'>Here is a collection of Microsoft SQL Server interview questions.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Basic Concepts&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Filtered index&lt;/li&gt;&lt;li&gt;Common Table Expression&lt;/li&gt;&lt;li&gt;Derived tables&lt;/li&gt;&lt;li&gt;Fill factor&lt;/li&gt;&lt;li&gt;Clustered Index&lt;/li&gt;&lt;li&gt;Heap table&lt;/li&gt;&lt;li&gt;OLTP vs. OLAP&lt;/li&gt;&lt;li&gt;Star schema&lt;/li&gt;&lt;li&gt;What are the differences between SQL developer, standard and enterprise editions&lt;/li&gt;&lt;li&gt;local vs. global temporary table&lt;/li&gt;&lt;li&gt;sparse columns&lt;/li&gt;&lt;li&gt;Functions: STUFF, PATINDEX, RANK, NTILE&lt;/li&gt;&lt;li&gt;SCOPE_IDENTITY vs. @@IDENTITY&lt;br /&gt;&lt;/li&gt;&lt;li&gt;XML support&lt;/li&gt;&lt;li&gt;Geo-spatial data support&lt;/li&gt;&lt;li&gt;CLR integration&lt;/li&gt;&lt;li&gt;Replication&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Breadth&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;NoSQL&lt;/li&gt;&lt;li&gt;Column based RDBMS&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Best Practices&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;What are the performance best practices&lt;/li&gt;&lt;li&gt;What are the security best practices&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Coding Skills&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How to select top N records without using TOP&lt;/li&gt;&lt;li&gt;Write a stored procedure to check out one job with columns: JobID, Status (new, checked out, done), priority&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a stored procedure to atomically insert records into the following tables with error handling&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Table A&lt;br /&gt;---------&lt;br /&gt;ID&lt;br /&gt;Name&lt;br /&gt;&lt;br /&gt;Table B&lt;br /&gt;---------&lt;br /&gt;ID &lt;br /&gt;Name&lt;br /&gt;&lt;br /&gt;Table A_B&lt;br /&gt;---------&lt;br /&gt;ID_A&lt;br /&gt;ID_B&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3093995501140817347?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3093995501140817347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3093995501140817347' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3093995501140817347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3093995501140817347'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/11/sql-interview-questions.html' title='SQL Interview Questions'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3041361924900091636</id><published>2010-10-27T18:01:00.000-07:00</published><updated>2010-10-27T18:05:08.792-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex: set cursor shape to hand</title><content type='html'>&lt;script src="http://gist.github.com/650374.js"&gt; &lt;/script&gt;&lt;br /&gt;The catch is to remember to also set "buttonMode" to true.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3041361924900091636?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3041361924900091636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3041361924900091636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3041361924900091636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3041361924900091636'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/10/flex-set-cursor-shape-to-hand.html' title='Flex: set cursor shape to hand'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2453740952824720260</id><published>2010-09-07T10:54:00.000-07:00</published><updated>2010-09-07T11:10:33.506-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Laptop Performance vs. Network Drive</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Symptom&lt;/span&gt;: When working from home using a company laptop, ever notice that the corporate laptop appears to be much slower on your home network? Well, I have had this problem for a while. After a closer look, I found whenever I switch to Windows Explorer or trying to open a file, it will take almost a minute for it to showup.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Root Cause&lt;/span&gt;: In my case, I found out the root cause is actually a bunch of network drives that are causing this performance problem.&lt;br /&gt;There are 4 network mapped drives on my laptop which access various resources on intranet. Some are setup by IT so that they will be mapped whenever you boot you computer on company intranet. However, at home, connection to intranet is slow or non-existent. Whenever you make Windows Explorer visible or showing a File dialog, Windows explorer will try to map all of them one by one. That is, the more network drives you have, the longer you have to wait until Windows decide to give up on reconnecting these network drives.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution&lt;/span&gt;: I end up created a VB script to batch start/stop the mapping. At home with limit access to internet, I will run the scripts to stop all the mapped drives. At work, I will run the script to start the mapping.&lt;br /&gt;&lt;br /&gt;The vb script to stop network drive:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Set objNetwork = CreateObject("WScript.Network")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;On Error Resume Next&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;objNetwork.RemoveNetworkDrive "X:", "True"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;objNetwork.RemoveNetworkDrive "Y:", "True"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;objNetwork.RemoveNetworkDrive "Z:", "True"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To start network drive:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Set objNetwork = CreateObject("WScript.Network")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;On Error Resume Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;objNetwork.MapNetworkDrive "X:" , "[your URI]"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;objNetwork.MapNetworkDrive "Y:" , "[your URI]"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;objNetwork.MapNetworkDrive "Z:" , "[your URI]"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2453740952824720260?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2453740952824720260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2453740952824720260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2453740952824720260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2453740952824720260'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/09/laptop-performance-vs-network-drive.html' title='Laptop Performance vs. Network Drive'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2001328994727196898</id><published>2010-09-03T12:02:00.000-07:00</published><updated>2010-09-09T14:07:05.815-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='icon'/><category scheme='http://www.blogger.com/atom/ns#' term='resource'/><title type='text'>What's in a RIA Software Engineer's Tool Chest</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Major Power Tools&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Microsoft Visual Studio&lt;/li&gt;&lt;li&gt;Adobe Flex Builder, Flash Builder&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Adobe Coldfusion Builder&lt;/li&gt;&lt;li&gt;SQL Server Management Studio&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Browsers&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;IE&lt;br /&gt;&lt;/li&gt;&lt;li&gt;FireFox&lt;/li&gt;&lt;li&gt;Google Chrome&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Eclipse Plugins&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://subclipse.tigris.org/"&gt;Subclipse&lt;/a&gt;: SVN client&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/flexformatter/"&gt;Flex Formatter&lt;/a&gt;: auto indent and format Flex code&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://aptana.com/"&gt;Aptana&lt;/a&gt;: excellen JS, HTML, CSS editors&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cfeclipse.org/"&gt;CFEclipse&lt;/a&gt;: Coldfusion editor&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Firefox Plugins&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Firebug&lt;/li&gt;&lt;li&gt;Html Validator&lt;/li&gt;&lt;li&gt;Screengrab: take screenshots of browser content (including Flash)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;YSlow&lt;/li&gt;&lt;li&gt;Web Developer&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Free or really affordable utilities&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://datadictionary.codeplex.com/"&gt;Data Dictionary Creator&lt;/a&gt;: manage and generate data dictionary&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.kevinlangdon.com/serviceCapture/"&gt;Service Capture&lt;/a&gt;: capture HTTP traffic in/out of local computer, with built-in parser of Flash Remoting content&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/a&gt;: capture HTTP traffic, well known in .NET community&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jsonviewer.codeplex.com/"&gt;JSON Viewer&lt;/a&gt;: all you can ask for to navigate, search, format JSON data string&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.realvnc.com/"&gt;VNC&lt;/a&gt;: remote desktop&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Tortois SVN, CVS, GIT: version control with Windows Explorer integration&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/devnet/flex/tourdeflex/"&gt;Tour De Flex&lt;/a&gt;: Air application showcasing Flex controls and sample code&lt;/li&gt;&lt;li&gt;Skype: IM, talk, video conference, share desktop, ...&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Google Desktop: search code, design document with ease&lt;br /&gt;&lt;/li&gt;&lt;li&gt;GIMP: free replacement for Photoshop&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Sysinternals: a group of Windows Utilities now owned by Microsoft. Here are a few of my favorites:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Process Explorer: advance task manager, mostly used to search for locked resources&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Port Mon: serial port traffic analyzer&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Autoruns: manage autorun programs that can start through various mechanisms&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;a href="http://www.dependencywalker.com/"&gt;Depends&lt;/a&gt;: Dependency Walker&lt;/li&gt;&lt;li&gt;&lt;a href="http://winmerge.org/"&gt;WinMerge&lt;/a&gt;: graphical diff, can be easily integrated with Tortoise clients&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Online Resources in Browser Bookmarks&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Google Code Search: search open source code&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Google Analytics: keep tab on web site usage&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Stackoverflow: ask questions, search for answers, and answer some questions. Occasionally get job offers due to your answers here&lt;br /&gt;&lt;/li&gt;&lt;li&gt;EETimes: resource on embedded, semiconductor development&lt;/li&gt;&lt;li&gt;TechCrunch&lt;br /&gt;&lt;/li&gt;&lt;li&gt;DZONE: daily digest of tech blogs similar to TechCrunch&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ScottGu's Blog: MSFT VP of several .NET products&lt;br /&gt;&lt;/li&gt;&lt;li&gt;MIX: Video, PPT of past conference&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PDC: Video, PPT of past conference&lt;br /&gt;&lt;/li&gt;&lt;li&gt;GOOGLE IO: Video of past conference&lt;br /&gt;&lt;/li&gt;&lt;li&gt;BeanStalk: online SVN server&lt;/li&gt;&lt;li&gt;Github: onlien GIT server&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Gist: code snippet management&lt;br /&gt;&lt;/li&gt;&lt;li&gt;CFLib.org: Coldfusion library&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Open Source Software&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;FlexLib: Flex controls&lt;br /&gt;&lt;/li&gt;&lt;li&gt;AS3Core: Actionscript 3 utilities&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PureMVC: MVC framework, popular in Flex community&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Cairngorm: official MVC framework in Flex community&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Report.NET: .NET PDF library&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ZedGraph: .NET chart library&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SQLite: light-weight database, popular in embedded community&lt;br /&gt;&lt;/li&gt;&lt;li&gt;NUnit: .NET unit testing framework&lt;/li&gt;&lt;li&gt;FlexUnit: Flex unit testing framework&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Icons&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Java Look and Feel Graphics Repository: official JAVA icon set&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Visual Studio Image Library: came with Visual Studio Installation&lt;/li&gt;&lt;li&gt;Web Application Icons from WebAppers.com&lt;/li&gt;&lt;li&gt;famfamfam.com&lt;br /&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/13937734-2001328994727196898?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2001328994727196898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2001328994727196898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2001328994727196898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2001328994727196898'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/09/whats-in-ria-software-engineers-tool.html' title='What&apos;s in a RIA Software Engineer&apos;s Tool Chest'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-419979686773481012</id><published>2010-09-02T10:22:00.000-07:00</published><updated>2010-09-02T10:31:33.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex Builder'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Flex Builder - TODO, FIXME in "Tasks" view</title><content type='html'>Here is a plugin that adds support for TODO comments in "Tasks" view.&lt;br /&gt;&lt;a href="http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757"&gt;http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It was created for Flex Builder 2 in 2006, but I tested, it also works for Flex Builder 3.&lt;br /&gt;&lt;br /&gt;Here is link to the request on Adobe's JIRA: &lt;a href="https://bugs.adobe.com/jira/browse/FB-17231"&gt;FlexBuilder should parse //TODO comments into the normal Task panel &lt;/a&gt;. I have voted for this issue.&lt;br /&gt;&lt;br /&gt;However, Dirk obviously did a good job in his plugin, such that Adobe decided to defer and closed the issue!?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-419979686773481012?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/419979686773481012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=419979686773481012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/419979686773481012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/419979686773481012'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/09/flex-builder-todo-fixme-in-tasks-view.html' title='Flex Builder - TODO, FIXME in &quot;Tasks&quot; view'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-8129472508657127395</id><published>2010-08-26T22:45:00.000-07:00</published><updated>2010-08-26T22:46:37.035-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Install APK to Android Emulator</title><content type='html'>Command line:&lt;br /&gt;$Android SDK\Tools\adb .apk&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-8129472508657127395?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/8129472508657127395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=8129472508657127395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8129472508657127395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8129472508657127395'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/08/install-apk-to-android-emulator.html' title='Install APK to Android Emulator'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3847278371406385354</id><published>2010-08-25T22:57:00.000-07:00</published><updated>2010-08-25T23:03:54.847-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Import Android Samples into Eclipse</title><content type='html'>I am trying to open Android samples in Eclipse (with ADT installed). At  first, it seems to be a tedious task, trying to import every single  project. Then, I found out that ADT already has a shortcut for importing  samples. Just go &lt;span style="font-family: courier new;"&gt;File &gt; New Android Project&lt;/span&gt;. In the "&lt;span style="font-family: courier new;"&gt;New Adroid Project&lt;/span&gt;" dialog, select the &lt;span style="font-family: courier new;"&gt;Build Target&lt;/span&gt;, then check "&lt;span style="font-family: courier new;"&gt;Create project from existing sample&lt;/span&gt;". Now, in the dropdown below select the project you want to import. It is much simpler than I thought.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_C148T9ItPYw/THYC2M4mAuI/AAAAAAAAH2s/hsqqaEQux-o/s1600/Android_Sample.JPG"&gt;&lt;img style="cursor: pointer; width: 294px; height: 400px;" src="http://3.bp.blogspot.com/_C148T9ItPYw/THYC2M4mAuI/AAAAAAAAH2s/hsqqaEQux-o/s400/Android_Sample.JPG" alt="" id="BLOGGER_PHOTO_ID_5509594324329169634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, of course, it would be even better, if the sample projects have Eclipse project in them. That will save me even more time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3847278371406385354?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3847278371406385354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3847278371406385354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3847278371406385354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3847278371406385354'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/08/import-android-samples-into-eclipse.html' title='Import Android Samples into Eclipse'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_C148T9ItPYw/THYC2M4mAuI/AAAAAAAAH2s/hsqqaEQux-o/s72-c/Android_Sample.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1838073117071676269</id><published>2010-08-18T12:07:00.000-07:00</published><updated>2010-08-18T12:25:16.778-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL CLR'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Scripts for CLR Assemblies</title><content type='html'>Here are SQL Scripts for CLR assemblies on Microsoft SQL Server.&lt;br /&gt;&lt;br /&gt;Assumptions: assembly's name: "SQLCLR.dll".In the dll, you have an aggregate function: "ConcateAll" which concatenate all string. The dll is in database server's c:\temp directory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;To enable CLR on SQL Server:&lt;/span&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/535823.js"&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;To clean up (remove the CLR function and assembly from database)&lt;/span&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/535846.js"&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;To upload assembly to SQL Server&lt;/span&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/535858.js"&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Create aggregate function based on CLR assembly&lt;/span&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/535862.js"&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Grant execution permission to user&lt;/span&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/535869.js"&gt; &lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1838073117071676269?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1838073117071676269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1838073117071676269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1838073117071676269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1838073117071676269'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/08/sql-scripts-for-clr-assemblies.html' title='SQL Scripts for CLR Assemblies'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4602303138516080358</id><published>2010-07-26T10:14:00.000-07:00</published><updated>2010-07-26T10:23:12.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>MS SQL Column Alias</title><content type='html'>T-SQL used in Microsoft SQL Server seem to have very limited support for column alias. If you have a complex calculated column that you want to re-use in GROUP, SELECT or another expression, it will be desirable to use alias to reference the same definition everywhere so that we can have a clear and easier to understand SQL statement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is an article that is very helpful in this matter: &lt;a href="http://www.devx.com/dbzone/Article/41095/1954"&gt;Avoid Transact-SQL's Column Alias Limitations&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Key points:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;MS SQL only allow alias in SELECT and ORDER BY&lt;/li&gt;&lt;li&gt;Use sub-query, can help in some cases to re-use column alias&lt;br /&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/13937734-4602303138516080358?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4602303138516080358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4602303138516080358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4602303138516080358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4602303138516080358'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/07/ms-sql-column-alias.html' title='MS SQL Column Alias'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5449342699631537932</id><published>2010-07-15T13:12:00.000-07:00</published><updated>2010-07-15T13:19:10.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion'/><title type='text'>Coldfusion web services call return error: java.lang.NullPointerException</title><content type='html'>Turns out Coldfusion web services return data may contain pointer, and the receiving side will try to interpret that pointer. Once we commented out the offending data (a 2D array) in return, the error is gone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5449342699631537932?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5449342699631537932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5449342699631537932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5449342699631537932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5449342699631537932'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/07/coldfusion-web-services-call-return.html' title='Coldfusion web services call return error: java.lang.NullPointerException'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2462905065931455972</id><published>2010-07-14T09:43:00.000-07:00</published><updated>2010-07-14T09:49:55.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>DELL Quickset for Latitude E-Family</title><content type='html'>Just got a new Dell Latitude E6510 laptop. However, cannot find the familiar Dell Quickset on it.&lt;br /&gt;&lt;br /&gt;After a couple of days' casual research, I finally found the answer: Dell Control Point is the new Quickset for Latitude E-Family.&lt;br /&gt;&lt;br /&gt;As a side note, I like E6510.&lt;br /&gt;Pros:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Fast&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Bright screen&lt;/li&gt;&lt;li&gt;Nice keyboard: backlight, good touch&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Multi-touch, allow pinch zoom, rotations, and other gesture&lt;/li&gt;&lt;li&gt;... more&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Cons: none so far.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2462905065931455972?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2462905065931455972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2462905065931455972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2462905065931455972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2462905065931455972'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/07/dell-quickset-for-latitude-e-family.html' title='DELL Quickset for Latitude E-Family'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1287328821368030220</id><published>2010-07-07T23:01:00.000-07:00</published><updated>2010-07-07T23:23:31.693-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax highlighting'/><title type='text'>Syntax Highlighting on Blogger - Gist</title><content type='html'>Here is another way to paste code into blogger with nice syntax highlighting.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to &lt;a href="http://gist.github.com/"&gt;http://gist.github.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Past the code you want to post&lt;/li&gt;&lt;li&gt;Copy the embed tag&lt;/li&gt;&lt;li&gt;Go back to blogger, and select "Edit Html"&lt;/li&gt;&lt;li&gt;Paste the embed tag into your post&lt;/li&gt;&lt;/ol&gt;Below is the example source code using this tag: &amp;lt;script src="http://gist.github.com/467670.js?file=gistfile1.sql"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/467670.js?file=gistfile1.sql"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;A potential drawback of this approach might be the stability of github as a company. In a downturn, it may shut down with very short notice.&lt;br /&gt;&lt;br /&gt;Compare to using SyntaxHighlighter, personally, I think this approach is way better:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;No setup required (in a &lt;a href="http://developertips.blogspot.com/2007/08/syntaxhighlighter-on-blogger.html"&gt;previous post&lt;/a&gt; I documented how to setup syntaxhighlighter for blogger, it took me half an hour to setup everything correctly. Now with gist, there is zero setup required );&lt;/li&gt;&lt;li&gt;Faster to create code snippet in a post;&lt;/li&gt;&lt;li&gt;Supports more languages;&lt;/li&gt;&lt;li&gt;No need to worry about pasting XML, HTML, or other special characters;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;To paste script like below used to require replacing '&amp;lt;' with &amp;amp;lt; and '&amp;gt;' with &amp;amp;gt; manually. Now is simply copy paste without any manual changes: &lt;script src="http://gist.github.com/467695.js?file=Test"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1287328821368030220?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1287328821368030220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1287328821368030220' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1287328821368030220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1287328821368030220'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/07/syntax-highlighting-on-blogger-gist.html' title='Syntax Highlighting on Blogger - Gist'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-699437867557349352</id><published>2010-07-07T11:20:00.000-07:00</published><updated>2010-08-20T10:24:28.443-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex Builder Error 1046: "Type was not found or was not a compile-time constant"</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt;&lt;br /&gt;While editing a big .as file in Flex Builder 3, the compile is broken suddenly. Got this error:&lt;br /&gt;&lt;blockquote&gt;1046: Type was not found or was not a compile-time constant: ?????.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cause:&lt;/span&gt;&lt;br /&gt;Seems like Flex editor tend to wrongly remove import statement at the top of .as file without user consent.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Disable Flex Builder feature:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Windown &gt; Preferences &gt; Flex &gt; Editors &gt; ActionScript Code, uncheck "Remove unused imports when organizing"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-699437867557349352?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/699437867557349352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=699437867557349352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/699437867557349352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/699437867557349352'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/07/problem-while-editing-big.html' title='Flex Builder Error 1046: &quot;Type was not found or was not a compile-time constant&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7158798172979786542</id><published>2010-06-29T10:59:00.000-07:00</published><updated>2010-07-06T10:51:42.704-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='setup'/><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion Builder'/><title type='text'>ColdFusion Builder Error: "Unhandled event loop execution"</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Environment:&lt;/span&gt; Eclipse 3.5, ColdFusion Builder Plugin, Aptana&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Whenever I open a Coldfusion file, will see error "Unhandled event loop exception." followed by a dialog: "An error has occured. See error log for more details. CFMOutlinePage_0".&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Cause:&lt;/span&gt;&lt;br /&gt;Turns out CF Builder is using Aptana which conflict with the lastest Aptana.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Disable Aptana:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Disable Aptana: Windows -&gt; Preferences -&gt; General -&gt; Startup and Shutdown, uncheck all Aptana plugins;&lt;/li&gt;&lt;li&gt;Disable Aptana Update: Windows -&gt; Preferences -&gt; Install/Update -&gt; Available Software Sites, disabled all Aptana sites;&lt;/li&gt;&lt;li&gt;Restart Eclipse using the "-clean" command line, and the problem seems to be fixed now.&lt;/li&gt;&lt;/ul&gt;Another riskier solution is to uninstall Aptana Studio from Eclipse.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Copy current Eclipse directory for backup;&lt;/li&gt;&lt;li&gt;Help &gt; About Eclipse &gt; Installation Details &gt; Installed Software &gt; Aptana Studio &gt; Uninstall&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;More Info:&lt;/span&gt;&lt;br /&gt;---------------Detailed Error Log-------------------------&lt;br /&gt;eclipse.buildId=&lt;br /&gt;java.version=1.6.0_20&lt;br /&gt;java.vendor=Sun Microsystems Inc.&lt;br /&gt;BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US&lt;br /&gt;Framework arguments:  -product org.eclipse.epp.package.jee.product&lt;br /&gt;Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -clean&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Error&lt;br /&gt;Tue Jun 29 10:45:04 PDT 2010&lt;br /&gt;Unhandled event loop exception&lt;br /&gt;&lt;br /&gt;org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoSuchFieldError: EditorUpdaterThread_0)&lt;br /&gt;at org.eclipse.swt.SWT.error(SWT.java:3884)&lt;br /&gt;at org.eclipse.swt.SWT.error(SWT.java:3799)&lt;br /&gt;at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)&lt;br /&gt;at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)&lt;br /&gt;at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)&lt;br /&gt;at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)&lt;br /&gt;at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)&lt;br /&gt;at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)&lt;br /&gt;at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)&lt;br /&gt;at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)&lt;br /&gt;at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)&lt;br /&gt;at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)&lt;br /&gt;at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)&lt;br /&gt;at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)&lt;br /&gt;at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)&lt;br /&gt;at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)&lt;br /&gt;at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)&lt;br /&gt;at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)&lt;br /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)&lt;br /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)&lt;br /&gt;at java.lang.reflect.Method.invoke(Unknown Source)&lt;br /&gt;at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)&lt;br /&gt;at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)&lt;br /&gt;at org.eclipse.equinox.launcher.Main.run(Main.java:1311)&lt;br /&gt;Caused by: java.lang.NoSuchFieldError: EditorUpdaterThread_0&lt;br /&gt;at com.adobe.ide.editor.cfml.EditorUpdaterThread.createDelayedRefreshJob(EditorUpdaterThread.java:340)&lt;br /&gt;at com.adobe.ide.editor.cfml.EditorUpdaterThread.access$1(EditorUpdaterThread.java:338)&lt;br /&gt;at com.adobe.ide.editor.cfml.EditorUpdaterThread$1.run(EditorUpdaterThread.java:265)&lt;br /&gt;at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)&lt;br /&gt;at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)&lt;br /&gt;... 22 more&lt;br /&gt;&lt;br /&gt;-------------Screenshot of the error dialog--------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_C148T9ItPYw/TCo1nJYgM7I/AAAAAAAAHVQ/KwhuzPeYCB4/s1600/errdlg.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 148px;" src="http://1.bp.blogspot.com/_C148T9ItPYw/TCo1nJYgM7I/AAAAAAAAHVQ/KwhuzPeYCB4/s320/errdlg.JPG" alt="" id="BLOGGER_PHOTO_ID_5488258042554233778" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7158798172979786542?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7158798172979786542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7158798172979786542' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7158798172979786542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7158798172979786542'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/06/coldfusion-builder-error-unhandled.html' title='ColdFusion Builder Error: &quot;Unhandled event loop execution&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_C148T9ItPYw/TCo1nJYgM7I/AAAAAAAAHVQ/KwhuzPeYCB4/s72-c/errdlg.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2152109074816194112</id><published>2010-06-24T12:54:00.000-07:00</published><updated>2010-06-24T13:49:56.473-07:00</updated><title type='text'>Visaul Studio Strong Name Error - Importing key file "X.pfx" was canceled</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Getting a new computer, so I installed fresh Visual Studio 2010, and checked out source code from SVN. Then I got the following errors:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cannot import the following key file: X.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_F...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Importing key file "X.pfx" was canceled&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Run this command line:&lt;br /&gt;         sn -i X.pfx VS_KEY_F...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2152109074816194112?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2152109074816194112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2152109074816194112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2152109074816194112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2152109074816194112'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/06/visaul-studio-strong-name-error.html' title='Visaul Studio Strong Name Error - Importing key file &quot;X.pfx&quot; was canceled'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1092268326870342879</id><published>2010-06-23T10:16:00.001-07:00</published><updated>2010-06-23T10:44:41.755-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex Compiler Error - Could not resolve * to a component implementation</title><content type='html'>While extending MX control ComboBox, I am trying to alter it's property.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;mx:dropdownfactory&amp;gt;&lt;br /&gt;     &amp;lt;mx:component&amp;gt;&lt;br /&gt;      &amp;lt;mx:tree change=&amp;quot;outerDocument.updateLabel()&amp;quot; height=&amp;quot;200&amp;quot; allowmultipleselection=&amp;quot;{outerDocument.allowMultipleSelection}&amp;quot; showroot=&amp;quot;{outerDocument.showRoot}&amp;quot; showdatatips=&amp;quot;true&amp;quot; datatipfield=&amp;quot;{outerDocument.labelField}&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;/mx:tree&amp;gt;&lt;br /&gt;&amp;lt;/mx:component&amp;gt;&lt;br /&gt;&amp;lt;/mx:dropdownfactory&amp;gt;&lt;/pre&gt;&lt;br /&gt;I got the compiler error as stated in the tile. Turns out I should refer to the property using my custom control's own name space. So the code should be like this:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;local:dropdownfactory&amp;gt;&lt;br /&gt;     &amp;lt;mx:component&amp;gt;&lt;br /&gt;      &amp;lt;mx:tree change=&amp;quot;outerDocument.updateLabel()&amp;quot; height=&amp;quot;200&amp;quot; allowmultipleselection=&amp;quot;{outerDocument.allowMultipleSelection}&amp;quot; showroot=&amp;quot;{outerDocument.showRoot}&amp;quot; showdatatips=&amp;quot;true&amp;quot; datatipfield=&amp;quot;{outerDocument.labelField}&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;/mx:tree&amp;gt;&lt;br /&gt;&amp;lt;/mx:component&amp;gt;&lt;br /&gt;&amp;lt;/local:dropdownfactory&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1092268326870342879?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1092268326870342879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1092268326870342879' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1092268326870342879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1092268326870342879'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/06/flex-compiler-error-could-not-resolve.html' title='Flex Compiler Error - Could not resolve * to a component implementation'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3058084485857697542</id><published>2010-06-23T09:34:00.000-07:00</published><updated>2010-06-23T10:16:14.398-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><title type='text'>SQL 2005 on Windows XP SP3 - MSXML6 Error</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem: &lt;/span&gt;&lt;br /&gt;With a fresh Windows XP SP3, I cannot install SQL 2005. The error message in log file is:&lt;br /&gt;&lt;blockquote&gt;Property(S): SupportedOSMessage = Installation of this product failed because it is not supported on this operating system. For information on supported configurations, see the product documentation.&lt;br /&gt;Property(S): ShortCutText = MSXML 6 Service Pack 2 (KB973686)&lt;br /&gt;Property(S): DialogTitle = MSXML 6 Service Pack 2 (KB973686) Setup&lt;br /&gt;Property(S): ProductName = MSXML 6 Service Pack 2 (KB973686)&lt;br /&gt;Property(S): ShortName = MSXML 6 Service Pack 2 (KB973686)&lt;br /&gt;Property(S): WrongPackage = This MSXML6 Service Pack 2 (KB973686) package is not supported on the current processor type.&lt;br /&gt;Property(S): DialogPatchTitle = MSXML 6 Service Pack 2 (KB973686) Patch&lt;br /&gt;Property(S): SystemFolder = C:\WINDOWS\system32\&lt;br /&gt;&lt;/blockquote&gt;...&lt;br /&gt;&lt;blockquote&gt;MSI (s) (04:A8) [09:38:47:725]: Product: MSXML 6 Service Pack 2 (KB973686) -- Configuration failed.&lt;br /&gt;&lt;br /&gt;MSI (s) (04:A8) [09:38:47:725]: Windows Installer reconfigured the product. Product Name: MSXML 6 Service Pack 2 (KB973686). Product Version: 6.20.2003.0. Product Language: 1033. Reconfiguration success or error status: 1603.&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Luckily, I am not the first one who saw this problem. This problem seems to be around for a while now. There is a nice Microsoft KB article for this exact problem, and the solution is to use "Windows Installer CleanUp utility" to remove existing MSXML then install SQL 2005.&lt;br /&gt;&lt;br /&gt;And, IT WORKS!!&lt;br /&gt;&lt;br /&gt;Reference: MSKB 968749 &lt;a href="http://support.microsoft.com/kb/968749"&gt;http://support.microsoft.com/kb/968749&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3058084485857697542?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3058084485857697542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3058084485857697542' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3058084485857697542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3058084485857697542'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/06/sql-2005-on-windows-xp-sp3-msxml6-error.html' title='SQL 2005 on Windows XP SP3 - MSXML6 Error'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4846840991143554066</id><published>2010-06-08T14:47:00.000-07:00</published><updated>2010-06-08T15:23:47.387-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>TSQL: Fixed Width Number Formatting</title><content type='html'>&lt;pre name="code" class="sql"&gt;&lt;br /&gt;RIGHT('00000' + CAST(myNumber AS VARCHAR), 5)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4846840991143554066?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4846840991143554066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4846840991143554066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4846840991143554066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4846840991143554066'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/06/tsql-fixed-width-number-formatting.html' title='TSQL: Fixed Width Number Formatting'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-102191010616126750</id><published>2010-06-07T16:47:00.000-07:00</published><updated>2010-06-07T17:03:53.846-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><title type='text'>MSDN Library is Gone in Visual Studio 2010</title><content type='html'>I consider this another major setback in Visual Studio 2010.&lt;br /&gt;&lt;br /&gt;Visual Studio 2010 come with a help system that is the worst since Visual Studio 2002.&lt;br /&gt;&lt;br /&gt;Pros:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;web-based, can be views in IE, as well as FireFox;&lt;/li&gt;&lt;li&gt;Encourage the use of better search engines like Google?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Cons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;No auto-complete search box;&lt;/li&gt;&lt;li&gt;Search result is worse than Google;&lt;/li&gt;&lt;li&gt;Left pane only has three fixed positions, cannot be resized or hidder;&lt;/li&gt;&lt;/ul&gt;To compensate the lack of auto-complete, I have stopped using my local help system and starting to use Google as my MSDN document explorer which did an excellent job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-102191010616126750?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/102191010616126750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=102191010616126750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/102191010616126750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/102191010616126750'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/06/msdn-library-is-gone-in-visual-studio.html' title='MSDN Library is Gone in Visual Studio 2010'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3107446702997279305</id><published>2010-05-10T11:34:00.000-07:00</published><updated>2010-05-10T11:50:37.300-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='complain'/><category scheme='http://www.blogger.com/atom/ns#' term='gui'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Lost Touch with Users</title><content type='html'>Recently, Google made some major changes without giving user an option to use the old style.&lt;br /&gt;&lt;br /&gt;I do not like their changes, mainly the bar on the left. It is duplicate of the bar on the top which I'm fine with.&lt;br /&gt;&lt;br /&gt;Now, with the bar on the left, waste huge amount of space beneath it, I am forced to constantly scroll my browser horizontally to see the full content.&lt;br /&gt;&lt;br /&gt;I'd rather to see ads fill that space. Then I know this is a decision driven by commercial interest.&lt;br /&gt;&lt;br /&gt;Now, with those seemingly useless links which is neither good for me nor Google, I am completely puzzled.&lt;br /&gt;&lt;br /&gt;How can I turn this sidebar off? Try a "GOOGLE SEARCH".&lt;br /&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/S-hVKXJ6rhI/AAAAAAAAHUU/Sk0gYJ7g4nk/s1600/google.JPG"&gt;&lt;img style="cursor: pointer; width: 218px; height: 320px;" src="http://2.bp.blogspot.com/_C148T9ItPYw/S-hVKXJ6rhI/AAAAAAAAHUU/Sk0gYJ7g4nk/s320/google.JPG" alt="" id="BLOGGER_PHOTO_ID_5469715383944130066" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3107446702997279305?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3107446702997279305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3107446702997279305' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3107446702997279305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3107446702997279305'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/05/google-lost-touch-with-users.html' title='Google Lost Touch with Users'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/S-hVKXJ6rhI/AAAAAAAAHUU/Sk0gYJ7g4nk/s72-c/google.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5433267907970423601</id><published>2010-05-06T23:04:00.000-07:00</published><updated>2010-06-23T10:44:53.293-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataGrid'/><category scheme='http://www.blogger.com/atom/ns#' term='ItemRenderer'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Dynamically Hide Cells in Flex DataGrid</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Goal:&lt;/span&gt; Control visibility of controls in Flex DataGrid&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt;&lt;br /&gt;Control of cells' visibility in Flex DataGrid turns out to be pretty tricky. If you simply use inline item renderer and bind it's visibility attribute to a data provider, it won't work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why:&lt;/span&gt;&lt;br /&gt;Fortunately, Flex is open source. So, we can dig a little deeper into why it does not work.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Look at SDK 3.2.0: DataGridBase.as, line 1073 will show that Flex SDK will actually set the renderer to visible after set "data" property of the control.&lt;/li&gt;&lt;li&gt;Also, the SDK may decide to hide the cell when it sees fit in various situations;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;So, it is not desirable to control visibility directly. You are fighting with the SDK.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution(s):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Solution 1:&lt;/span&gt; Use a container as item renderer, and embed your control inside the container.&lt;br /&gt;Pros: Quick and easy to implement. An added benefit is that you can control cell layout;&lt;br /&gt;Cons: As all the Flex text book will stress: using too many containers is very &lt;span style="font-weight: bold;"&gt;BAD&lt;/span&gt; for performance! How bad? A 20X20 DataGrid may take at least 5 seconds to render!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Solution 2:&lt;/span&gt; Create custom control based on the control you want to use in the cell. And manage a new "forceHide" attribute, which will cooperate with the original "visible" attribute to decide a control's visibility. Please see the sample code below. Some details are missing, but you get the idea.&lt;br /&gt;&lt;pre name="code" class="js"&gt;&lt;br /&gt;...&lt;br /&gt;protected var _forceHide:Boolean = false;&lt;br /&gt;/**&lt;br /&gt;* visible by set method&lt;br /&gt;*/        &lt;br /&gt;protected var _setVisible:Boolean = false;&lt;br /&gt;/**&lt;br /&gt;* If set, this control will not be visible. It will overwrite visible property.&lt;br /&gt;* DataGrid tend to manipulate visible directly, we can only use&lt;br /&gt;* this extra field to force hide control even if DataGrid decides&lt;br /&gt;* that it can be shown.&lt;br /&gt;*/&lt;br /&gt;public function set forceHide(value:Boolean):void {&lt;br /&gt;    _forceHide = value;                          &lt;br /&gt;    setVisible(_setVisible);&lt;br /&gt;    invalidateProperties();&lt;br /&gt;}&lt;br /&gt;override public function setVisible(value:Boolean, noEvent:Boolean=false):void {&lt;br /&gt;    //save desired settings&lt;br /&gt;    _setVisible = value;&lt;br /&gt;    //forceHide can mask out change request&lt;br /&gt;    super.setVisible((!_forceHide) &amp;&amp; value, noEvent);&lt;br /&gt;}&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Other Thoughts:&lt;/span&gt;&lt;br /&gt;How about "CallLater"? It turns out to be a bad idea. As stated before, Flex SDK may want to hide some controls. If your "CallLater" set a control's visible to true, when Flex SDK think it is invisible, you may see some ghost controls hanging around.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5433267907970423601?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5433267907970423601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5433267907970423601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5433267907970423601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5433267907970423601'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/05/dynamically-hide-cells-in-flex-datagrid.html' title='Dynamically Hide Cells in Flex DataGrid'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4572711451226627018</id><published>2010-04-29T11:53:00.001-07:00</published><updated>2010-04-29T12:32:36.983-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion'/><title type='text'>Coldfusion Query of Queries (QoQ) Support</title><content type='html'>QoQ is convenient, but also poorly documented. I cannot find any official Adobe documentation with details about its features and limitations. It's features changes from version to version, usually only expanding (which is a good thing). There are also many bugs, and weird restrictions.&lt;br /&gt;&lt;br /&gt;I guess Ben Forta's books rarely touched this topic for a reason.&lt;br /&gt;&lt;br /&gt;So generally, I can only test what can be done by trial and error, and frequently find out that although it works on my computer, but will fail in another CF host due to difference in CF server version.&lt;br /&gt;&lt;br /&gt;A summary of what can and cannot be done in CF QoQ (aka In Memory  Query).&lt;br /&gt;1. Data size: recommended 5,000 - 50,000 rows, subject to computer memory size;&lt;br /&gt;2. join: inner join of two tables using WHERE clause&lt;br /&gt;            Can:      &lt;br /&gt;                        join two tables&lt;br /&gt;                        inner join through a WHERE clause&lt;br /&gt;                        cross join&lt;br /&gt;            Cannot:&lt;br /&gt;                        use these clauses: LEFT JOIN, RIGHT JOIN, OUTER JOIN&lt;br /&gt;                        join more than two tables&lt;br /&gt;3. union: supported, but can be difficult to use due to strict type matching requirements;&lt;br /&gt;4. dot notation: allow access to query in a structure through dot notation;&lt;br /&gt;5. conditional operators: IS, IS (NOT) NULL, &gt;, &gt;=, &lt;&gt;, !=, &lt;, &lt;=, ==, BETWEEN, IN, LIKE&lt;br /&gt;6. case sensitivity: it is case sensitive&lt;br /&gt;7. other supported T-SQL keywords: GROUP, ORDER, DISTINCT, AVG, COUNT,&lt;br /&gt;&lt;br /&gt;Beyond QoQ:&lt;br /&gt;1. features from CFQuery tag: maxRows (equivalent to TOP), blockFactor&lt;br /&gt;2. features from CFOutput, CFLoop: startRow, maxRows (combined equivalent to LIMIT)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4572711451226627018?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4572711451226627018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4572711451226627018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4572711451226627018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4572711451226627018'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/04/coldfusion-query-of-queries-qoq-support.html' title='Coldfusion Query of Queries (QoQ) Support'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3507383007754072674</id><published>2010-04-22T11:52:00.001-07:00</published><updated>2010-04-22T12:05:07.767-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><category scheme='http://www.blogger.com/atom/ns#' term='version control'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='SVN'/><title type='text'>Windows XP "System Restore" and Subversion</title><content type='html'>Subversion users be aware: Windows XP "System Restore" will rollback your SVN working folder!&lt;br /&gt;&lt;br /&gt;Just learned it the hardway. I did a system restore on my Windows XP box, and all of sudden all the projects are broken. It turned out that all my SVN working folders are rolled back too.&lt;br /&gt;&lt;br /&gt;Solutions?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Checkout "Head" from SVN repo again. Lucky for me, I do check-in frequently, and this solution works for me just fine;&lt;/li&gt;&lt;li&gt;Start "System Restore", and this time select "Undo my last restoration";&lt;br /&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/13937734-3507383007754072674?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3507383007754072674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3507383007754072674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3507383007754072674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3507383007754072674'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/04/windows-xp-system-restore-and.html' title='Windows XP &quot;System Restore&quot; and Subversion'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6151861689905576633</id><published>2010-04-19T10:18:00.000-07:00</published><updated>2010-04-19T10:43:15.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='version control'/><category scheme='http://www.blogger.com/atom/ns#' term='setup'/><category scheme='http://www.blogger.com/atom/ns#' term='SVN'/><title type='text'>Subversion (SVN) Client for Windows Quick Start</title><content type='html'>This is a brief guide to SVN client usage on Windows using Tortoise SVN client.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Recommended Software&lt;/span&gt;:&lt;ol&gt;&lt;li&gt;Install Tortoise SVN client from this web site: &lt;cite&gt;&lt;b&gt;tortoisesvn&lt;/b&gt;.tigris.org&lt;/cite&gt;&lt;/li&gt;&lt;li&gt;Install winmerge from &lt;cite&gt;&lt;b&gt;winmerge&lt;/b&gt;.org &lt;/cite&gt;for merging  code&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Check out&lt;/span&gt;:To check out a project from SVN server for the first time: start Windows Explorer, right click in the folder you want to save the checkout code, and select "SVN Checkout".&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/S8ySehbVQpI/AAAAAAAAHS4/Qb3UScWonsQ/s1600/checkoutmenu.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 244px; height: 320px;" src="http://2.bp.blogspot.com/_C148T9ItPYw/S8ySehbVQpI/AAAAAAAAHS4/Qb3UScWonsQ/s320/checkoutmenu.JPG" alt="" id="BLOGGER_PHOTO_ID_5461901501160309394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/S8ySeO6_HDI/AAAAAAAAHSw/VSalIpIuLV4/s1600/checkoutdialog.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 268px;" src="http://2.bp.blogspot.com/_C148T9ItPYw/S8ySeO6_HDI/AAAAAAAAHSw/VSalIpIuLV4/s320/checkoutdialog.JPG" alt="" id="BLOGGER_PHOTO_ID_5461901496192801842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Check in procedures&lt;/span&gt;:&lt;br /&gt;Check-in usually have three steps in the following order:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;add new file to server;&lt;/li&gt;&lt;li&gt;check for new updates from server and merge if necessary;&lt;/li&gt;&lt;li&gt;commit the changes back to the server;&lt;/li&gt;&lt;/ol&gt;Minimum requirement for the checked in code is that they can compile without errors.&lt;br /&gt;&lt;br /&gt;More detailed checkin steps:&lt;br /&gt;1.    In windows explorer, right click the checkout root folder, and select “SVN Add”;&lt;br /&gt;2.    If new files are listed in the following dialog:&lt;br /&gt;    a.    check the files that you want to send to SVN;&lt;br /&gt;    b.    uncheck the files that you do not want to send to SVN, and add them to the ignore list;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/S8ySdgy1gAI/AAAAAAAAHSo/ClOSxZNklz0/s1600/adddialog.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 201px;" src="http://2.bp.blogspot.com/_C148T9ItPYw/S8ySdgy1gAI/AAAAAAAAHSo/ClOSxZNklz0/s320/adddialog.JPG" alt="" id="BLOGGER_PHOTO_ID_5461901483810586626" border="0" /&gt;&lt;/a&gt;3.    Right click the root folder again, and select “SVN Update”&lt;br /&gt;4.    If there are changes or merge during update step, double check that the code can still compile;&lt;br /&gt;5.    Right click the root folder, and select “SVN Commit”, and type a proper comment about what are fixed, or the new features in this checkin;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-6151861689905576633?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6151861689905576633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6151861689905576633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6151861689905576633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6151861689905576633'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/04/subversion-svn-client-for-windows-quick.html' title='Subversion (SVN) Client for Windows Quick Start'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/S8ySehbVQpI/AAAAAAAAHS4/Qb3UScWonsQ/s72-c/checkoutmenu.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-769667887520855290</id><published>2010-04-12T16:26:00.001-07:00</published><updated>2010-04-12T16:29:48.344-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><title type='text'>Visaul Studio 2010 First Impression</title><content type='html'>It is officially released today. Tried a little bit and did not like it at all.&lt;br /&gt;&lt;br /&gt;#1 problem: sluggish GUI response! No kidding. I thought Eclipse is slow, now I see something slower. No wonder it's release date was postponed to fix performance problem.&lt;br /&gt;&lt;br /&gt;Of course, there is also problem finding my way around the IDE. Cannot seem to find a way to generate create script for my database project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-769667887520855290?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/769667887520855290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=769667887520855290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/769667887520855290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/769667887520855290'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/04/visaul-studio-2010-first-impression.html' title='Visaul Studio 2010 First Impression'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4637458079577632505</id><published>2010-03-26T16:20:00.001-07:00</published><updated>2010-03-26T17:00:38.363-07:00</updated><title type='text'>Lean Software Development</title><content type='html'>Some study notes while reading about Lean Software Development:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Adapted from Lean Manufacturing, Toyota Production System;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Originated in the boot "Lean Software Development" by Mary Poppendieck and Tom Poppendieck&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Principles:&lt;br /&gt;         &lt;ul&gt;&lt;li&gt;Eliminate waste&lt;br /&gt;                 &lt;ul&gt;&lt;li&gt;Extra features&lt;br /&gt;                 &lt;/li&gt;&lt;li&gt;Economies of scale: focusing on high utilization is almost guaranteed to lower it&lt;br /&gt;                 &lt;/li&gt;&lt;li&gt;Cross boundaries&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;Amplify leaning&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;Decide as late as possible&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;Deliver as fast as possible&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;Empower the team&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;Build integrity in&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;See the whole&lt;br /&gt; &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Two pillars&lt;br /&gt;         &lt;ul&gt;&lt;li&gt;Continuous improvement&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;Respect for people&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;The responsibility lies, not with black belt specialist, but with the leadership hierachy that runs the operation and they are teachers and coaches;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;The essence of (the Toyota system) is that each individual employee is given the opportunity to find problems in his own way of working, to solve them and to make improvements;&lt;/li&gt;&lt;li&gt;Challenge everything, dissatisfied with status quo&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Kanban&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Kaizen&lt;br /&gt;         &lt;ul&gt;&lt;li&gt;spread knowledge&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;small, relentless&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;retrospectives&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;5 whys&lt;br /&gt;         &lt;/li&gt;&lt;li&gt;eyes for waste&lt;br /&gt;     &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Share rather than enforce practices&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Good References:&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;             &lt;a href="http://en.wikipedia.org/wiki/Lean_software_development"&gt;http://en.wikipedia.org/wiki/Lean_software_development&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;             Lean Primer: &lt;a href="http://www.leanprimer.com/downloads/lean_primer.pdf"&gt;http://www.leanprimer.com/downloads/lean_primer.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.poppendieck.com/"&gt;http://www.poppendieck.com/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4637458079577632505?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4637458079577632505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4637458079577632505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4637458079577632505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4637458079577632505'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/03/lean-software-development.html' title='Lean Software Development'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4068648469087992114</id><published>2010-01-29T15:27:00.000-08:00</published><updated>2010-01-29T15:31:31.327-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flex Builder'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex Builder Error: "Unable to export SWC oem"</title><content type='html'>Solution: Right click on project, select Properties &gt; Flex Library Build Path &gt; Assets. Uncheck the root node and check it again, then compile project. The error is gone.&lt;br /&gt;&lt;br /&gt;I found the solution here: &lt;a href="http://flexdevtips.blogspot.com/2009/06/unable-to-export-swc-oem.html"&gt;http://flexdevtips.blogspot.com/2009/06/unable-to-export-swc-oem.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4068648469087992114?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4068648469087992114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4068648469087992114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4068648469087992114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4068648469087992114'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/01/flex-builder-error-unable-to-export-swc.html' title='Flex Builder Error: &quot;Unable to export SWC oem&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3677918644445606704</id><published>2010-01-15T00:10:00.000-08:00</published><updated>2010-03-26T16:11:50.454-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Performance Optimization for Embedded Systems</title><content type='html'>Some key points:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Load code and data as much as possible into internal memory (L1 cache);&lt;/li&gt;&lt;li&gt;Use compiler or linker options to optimize for code size can sometimes give better performance than optimize for performance (GreenHills has a very nice tool to help find the optimum compromise between optimize for speed and size). Major points for manipulation:&lt;ul&gt;&lt;li&gt;Optimize for speed&lt;/li&gt;&lt;li&gt;Optimize for size&lt;/li&gt;&lt;li&gt;Remove unused functions&lt;/li&gt;&lt;li&gt;Remove debug information&lt;/li&gt;&lt;li&gt;Enable code cache&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Carefully tune the use of code cache and data cache. Performance difference between fine tuned layout and the default can be 10 time or more;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Use integer, fixed point over float over double. If floating point computation is necessary, but double is not needed, then remember that all the constants &lt;span style="font-weight: bold;"&gt;MUST&lt;/span&gt; explicitly declared as floating precision, otherwise there may be a lot of double computation and float to double conversions. For example, instead of &lt;span style="font-family:courier new;"&gt;x=2.0;&lt;/span&gt; should use &lt;span style="font-family:courier new;"&gt;x=2.0f;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Bit shift is faster than add (usually), add is faster than multiply (usually), multiply is faster than divide. So the following tricks usually are helpful:&lt;ul&gt;&lt;li&gt;Use left shift and right shift instead of multi and div by 2, 4, 8, 16, 32, ... (integer only);&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Use add instead of multi 2, 3;&lt;/li&gt;&lt;li&gt;If a number is used as divider many times, pre-calculate it's inverse, and use multiply for the calculations;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Blackfin (DSP architecture specific): assign data to A/B bank properly to enable parallel data retrieval;&lt;/li&gt;&lt;li&gt;Profiler is your friend: use profiler to find the biggest consumer and focus on them;&lt;/li&gt;&lt;li&gt;In C++ world: avoid deep hierarchy, because those practices take precious memory space which in turn have grave impact on performance;&lt;/li&gt;&lt;li&gt;Be careful when you use C runtime. Call to "printf" can easily add 1k memory footprint;&lt;br /&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/13937734-3677918644445606704?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3677918644445606704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3677918644445606704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3677918644445606704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3677918644445606704'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/01/performance-optimization-for-embedded.html' title='Performance Optimization for Embedded Systems'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4016997714578818162</id><published>2010-01-14T23:55:00.000-08:00</published><updated>2010-01-15T00:06:39.659-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ColdFusion'/><title type='text'>"var scope" for CFC Function Variables</title><content type='html'>Why is it good practice to always "var-scope" every CFC function variable?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Make it clear that the variables are only visible within the function;&lt;/li&gt;&lt;li&gt;Using "var-scope" actually can help improve performance. I tried the test &lt;a href="http://www.webapper.com/blog/index.php/2007/02/09/the-real-reason-you-need-to-varscope-your-local-cfc-function-variables/" title="The REAL reason you need to var-scope your local CFC function variables"&gt;here&lt;/a&gt;, and am personally convinced that "var-scope" has significant positive impact on performance;&lt;/li&gt;&lt;li&gt;If you "var-scope" every CFC function local variables, then it will be obvious when you have typo in your code. Because you can use tool like "&lt;a href="http://www.schierberl.com/varScoper/"&gt;varScoper&lt;/a&gt;" to scan your file, if there are complains, you either forget to "var-scope" a variable, or you've got a typo that "varScoper" just helped you to catch;&lt;br /&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/13937734-4016997714578818162?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4016997714578818162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4016997714578818162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4016997714578818162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4016997714578818162'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2010/01/var-scope-for-cfc-function-variables.html' title='&quot;var scope&quot; for CFC Function Variables'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3735734510572149829</id><published>2009-12-14T10:26:00.000-08:00</published><updated>2009-12-14T10:29:15.254-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>Start ASP.NET Development Web Server in Command Line</title><content type='html'>start "ASP.NET Development Server" /B c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE /port:[port#] /path:[file path] /vpath:[/virtual parth/]&lt;br /&gt;&lt;br /&gt;Starting debug server this way will allow debugging web project without even starting Visual Studio 2005.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3735734510572149829?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3735734510572149829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3735734510572149829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3735734510572149829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3735734510572149829'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/12/start-aspnet-development-web-server-in.html' title='Start ASP.NET Development Web Server in Command Line'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-8421869964266666770</id><published>2009-12-04T11:05:00.000-08:00</published><updated>2009-12-04T11:16:16.893-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>VC++ Redistributing</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Symptom:&lt;/span&gt; I keep bumping into this issue. Once in a while my VC++ application does not even start on the targe computer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cause:&lt;/span&gt; The root cause is that the target computer does not have the VC++ library to support the applications. I works with server products, so I usually just install VC++ library once and expect all my future updates can be done by xcopy only. However, because I turned on auto-update on my development computer, my Visual Studio 2005 keep changing the library it is linked against. So once in a while xcopy deployment is broken.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fix:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sometimes it can be fixed by simply running Windows Update &lt;/li&gt;&lt;li&gt;Run VC++ Redistributable Package on the target computer. It is located here: %PROGDIR%\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper\Packages\&lt;/li&gt;&lt;li&gt;More options here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms235316%28VS.80%29.aspx"&gt;Choosing a Deployment Method&lt;/a&gt;&lt;br /&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/13937734-8421869964266666770?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/8421869964266666770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=8421869964266666770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8421869964266666770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8421869964266666770'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/12/vc-redistributing.html' title='VC++ Redistributing'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6605238822180316351</id><published>2009-11-16T22:27:00.000-08:00</published><updated>2009-11-16T22:29:51.505-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>GridView: get selected rows</title><content type='html'>Below is sample C# code to get selected rows in GridView.&lt;br /&gt;&lt;pre name="code" class="cs"&gt;&lt;br /&gt;        protected int[] GetSelectedRows()&lt;br /&gt;        {&lt;br /&gt;            List&lt;int&gt; rowIDs = new List&lt;int&gt;();&lt;br /&gt;            foreach (GridViewRow row in GridView.Rows)&lt;br /&gt;            {&lt;br /&gt;                CheckBox cb = ((CheckBox)row.FindControl("chkRow"));&lt;br /&gt;                if (cb.Checked)&lt;br /&gt;                {&lt;br /&gt;                    string IDString = GridView.DataKeys[row.RowIndex].Value.ToString();&lt;br /&gt;                    rowIDs.Add(Int32.Parse(IDString));&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return rowIDs.ToArray();&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-6605238822180316351?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6605238822180316351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6605238822180316351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6605238822180316351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6605238822180316351'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/11/gridview-get-selected-rows.html' title='GridView: get selected rows'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5674188192708107747</id><published>2009-11-16T22:15:00.000-08:00</published><updated>2009-11-16T22:20:45.261-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>"SelectAll" CheckBox in GridView using jQuery</title><content type='html'>Here is a way to do it:&lt;br /&gt;&lt;br /&gt;&lt;pre  name="code" class="js"&gt;&lt;br /&gt;/**&lt;br /&gt; * Register logic for "select all" check box and the group of check boxes &lt;br /&gt; * for each data row.&lt;br /&gt; * &lt;br /&gt; * @param {Object} chkAllSelector     jQuery selector to find the "select all" check box&lt;br /&gt; * @param {Object} chkItemSelector    jQuery selector to find the check boxes for all the rows&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;function registerSelectAll(chkAllSelector, chkItemSelector) {&lt;br /&gt;    //"select all" checkbox&lt;br /&gt;    var checkAllBox = $(chkAllSelector);&lt;br /&gt;    //checkbox for each row&lt;br /&gt;    var checkItems = $(chkItemSelector);       &lt;br /&gt;    &lt;br /&gt;    //check/uncheck all rows if "select all" is clicked&lt;br /&gt; checkAllBox.bind("click", function(){&lt;br /&gt;            checkItems.each(function(){&lt;br /&gt;                this.checked = checkAllBox[0].checked;&lt;br /&gt;                })&lt;br /&gt;        });&lt;br /&gt;        &lt;br /&gt;    //uncheck "select all" if some rows are unchecked&lt;br /&gt; checkItems.bind("click", function(){&lt;br /&gt;            if(this.checked === false) {&lt;br /&gt;             checkAllBox[0].checked = false;                    &lt;br /&gt;            }&lt;br /&gt;     });                     &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To use it:&lt;br /&gt;&lt;pre   name="code" class="js"&gt;&lt;br /&gt;registerSelectAll(".chkAllHeader input", ".chkItem input");&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5674188192708107747?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5674188192708107747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5674188192708107747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5674188192708107747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5674188192708107747'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/11/selectall-checkbox-in-gridview-using.html' title='&quot;SelectAll&quot; CheckBox in GridView using jQuery'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5726572598150283158</id><published>2009-11-09T11:39:00.000-08:00</published><updated>2009-11-09T11:45:29.956-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><title type='text'>"An unexpected error occurred." accessing Network Connection's properties</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Cause: &lt;/span&gt;seems like it suddenly happens after a recent Windows Update. I cannot ping or "remote desktop" to the computer. Trying to access network connection give me this error: "An unexpected error occurred."&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution&lt;/span&gt;:&lt;br /&gt;This seems to fix the problem:&lt;br /&gt;command line:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    regsvr32 netshell.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    regsvr32 ole32.dll&lt;/span&gt;&lt;br /&gt;reboot&lt;br /&gt;&lt;br /&gt;Then I can access the properties page, and I disable/re-enabled firewall. Everything coming back to normal.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;P.S.&lt;/span&gt;&lt;br /&gt;Keep my fingers crossed. Waiting for more surprised from next automatic Windows Update.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5726572598150283158?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5726572598150283158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5726572598150283158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5726572598150283158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5726572598150283158'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/11/unexpected-error-occurred-accessing.html' title='&quot;An unexpected error occurred.&quot; accessing Network Connection&apos;s properties'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3781785581968374664</id><published>2009-10-14T14:44:00.000-07:00</published><updated>2009-10-14T22:01:46.243-07:00</updated><title type='text'>3D Visualization on iPhone - Got to see it to believe it</title><content type='html'>Ziosoft showcased this amazing 3D visualization on iPhone. It is fast and smooth with very high image resolution. With dual touch, seem like it is very easy to control zoom, move cutoff plane, rotate and move object, and select depth of rendering.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=sDVAosnh1j4&amp;amp;feature=channel_page"&gt;http://www.youtube.com/watch?v=sDVAosnh1j4&amp;amp;feature=channel_page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From their description and the look, it is obvious that there is web server doing the rendering behind. iPhone seem to provide the dual touch and navigation. Still the the speed is impressive. Either the iPhone has very high speed internet access, or there is some very efficient decompress and rendering algorithms running on it so that data transfer rate is not too high.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3781785581968374664?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3781785581968374664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3781785581968374664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3781785581968374664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3781785581968374664'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/10/3d-visualization-on-iphone-got-to-see.html' title='3D Visualization on iPhone - Got to see it to believe it'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1894390470174830483</id><published>2009-08-10T15:57:00.000-07:00</published><updated>2009-08-10T15:59:08.507-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><title type='text'>Server Explorer Missing</title><content type='html'>Symptom: Visual Studio 2005 Server Explorer is missing.&lt;br /&gt;Reason: A while back, Visual Studio failed to load the server explorer at starup time, and showed a dialog to disable it. I guess I accidentally clicked "yes".&lt;br /&gt;&lt;br /&gt;Solution: run this command in Visual Studio 2005 command line environment:&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: courier new;"&gt;                  devenv /resetskippkgs&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1894390470174830483?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1894390470174830483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1894390470174830483' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1894390470174830483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1894390470174830483'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/08/server-explorer-missing.html' title='Server Explorer Missing'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7175157527809359615</id><published>2009-06-30T17:37:00.000-07:00</published><updated>2009-06-30T17:46:53.813-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Refeactor! for C++ -- Review</title><content type='html'>Tried &lt;a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/RefactorCPP/"&gt;Refactor!&lt;/a&gt; for C++ (free version 9.1.5 published June 29, 2009). Visual Studio 2005&lt;br /&gt;&lt;br /&gt;Summary of my experience:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pros:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Free;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The idea is very attractive: refactor C++ code with right click and no modal dialogs;&lt;/li&gt;&lt;li&gt;Rename class names seem to work fine;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Cons:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Does not work most of the times. Usually global search and replace did a better job in renaming things;&lt;/li&gt;&lt;li&gt;Affects VS grammar highlight. After installation, code grey out by "&lt;span style="font-family: courier new;"&gt;ifdef&lt;/span&gt;"s are totally messed up. Unistall the softwate, Visual Studio went back to correct grey out;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Recommended?  &lt;/span&gt;No. I uninstalled the software after a few days.&lt;br /&gt;&lt;br /&gt;Still looking for a decent C++ refactoring tool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7175157527809359615?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7175157527809359615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7175157527809359615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7175157527809359615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7175157527809359615'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2009/06/refeactor-for-c-review.html' title='Refeactor! for C++ -- Review'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-936009080939586298</id><published>2008-12-29T17:44:00.000-08:00</published><updated>2008-12-29T17:55:27.962-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='modem'/><title type='text'>Modem Error: NO CARRIER</title><content type='html'>What to check when you get "NO CARRIER" (numeric code: 3) error from Modem:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Verify Modem is connected to phone line properly;&lt;/li&gt;&lt;li&gt;Verify the phone number you are dialing works properly by calling this number using your phone, and verify that you hear: first ring tone, then the negotiation tone (yes, you should be able to hear the chirping sound over a regular phone);&lt;/li&gt;&lt;/ul&gt;If you can hear the negotiation tone, but frequently get "NO CARRIER" error, here is a solution:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;Set modem register S7 to a longer timeout value. 50 is the default, you can set it to 120 (ATS7=120). Sometimes, you can set this timeout value through MODEM configuration GUI, you can find something like: "Cancel the call if not connected within __ seconds". &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-936009080939586298?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/936009080939586298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=936009080939586298' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/936009080939586298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/936009080939586298'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/12/modem-error-no-carrier.html' title='Modem Error: NO CARRIER'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2298841313293984533</id><published>2008-11-07T14:19:00.000-08:00</published><updated>2008-11-07T14:31:45.394-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='setup'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Firefox keep crashing -- a solution</title><content type='html'>Every couple of days, I will see my Firefox using 99% of CPU and crash.&lt;br /&gt;&lt;br /&gt;I am a web developer. My Firefox has all sorts of add-ons: Abduction, Firebug, Html Validator, ScapBook, Screen grab!, Web Developer, YSlow. So, I do not need YSlow to know why my Firefox is slow and tend to crash.&lt;br /&gt;&lt;br /&gt;I have an idea: how about start two instances of Firefox, one with all the add-ons and the other one clean. I will use the clean one for normal web browsing, and the fully loaded one with development. And, guess what, there is already someone who has done this and posted a blog about it: &lt;a href="http://bdn.backbase.com/blog/dave/firefox-run-a-regular-and-development-profile-at-the-same-time"&gt;Firefox: Run a Regular and Development Profile at the Same Time&lt;/a&gt;. I used the solution, and it works perfectly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2298841313293984533?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2298841313293984533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2298841313293984533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2298841313293984533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2298841313293984533'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/11/firefox-keep-crashing-solution.html' title='Firefox keep crashing -- a solution'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1784410309463628681</id><published>2008-09-26T21:14:00.000-07:00</published><updated>2008-09-26T21:33:33.132-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><title type='text'>Blue Screen Trying to Install Windows XP SP3</title><content type='html'>During last few months, I have been through a couple of Windows XP SP3 installation. They are mostly eventless. One of the worst was a computer that hung after reboot, but after a forced power recycle that system seem to be fine.&lt;br /&gt;&lt;br /&gt;Just when I am about to conclude that Windows XP SP3 update is pretty good, I got the famous Blue Screen of Death.&lt;br /&gt;&lt;br /&gt;While trying to install Windows XP SP3 on my computer, I got an "&lt;span style="font-family:courier new;"&gt;Access is denied&lt;/span&gt;" error message. So that was not too scary, I typed the error message along with keyword "Windows XP SP3" in Google and found an &lt;a href="http://support.microsoft.com/kb/949377"&gt;MSKB 949377&lt;/a&gt; which provided a solution to this exact problem.&lt;br /&gt;&lt;br /&gt;Now, following KB 949377, I downloaded full Windows XP SP3 package and &lt;span style="font-family:courier new;"&gt;subinacl.exe&lt;/span&gt;, and created &lt;span style="font-family:courier new;"&gt;Reset.CMD&lt;/span&gt;. But, I tried it 3 times, everytime I ran &lt;span style="font-family:courier new;"&gt;Reset.CMD&lt;/span&gt;, it gave me Blue Screen of Death with error message about registry access. So, I did another Google search with keywords: "&lt;span style="font-family:courier new;"&gt;windows xp sp3 access denied subinacl registry blue screen&lt;/span&gt;". Now "&lt;span style="font-family:courier new;"&gt;I'm feeling lucky&lt;/span&gt;". The first hit provides a solution that works perfectly for me.  Here is link to Jason's blog post that solved my problem: &lt;a href="http://www.mrfloppysa.com/wordpress/?p=13"&gt;http://www.mrfloppysa.com/wordpress/?p=13&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The trick is to remove the &lt;span style="font-family:courier new;"&gt;HKLM &lt;/span&gt;line in &lt;span style="font-family:courier new;"&gt;RESET.CMD&lt;/span&gt;. The new RESET.CMD file would be like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cd /d "%ProgramFiles%\Windows Resource Kits\Tools"&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;REM &lt;/span&gt;&lt;/span&gt;subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f&lt;/span&gt;&lt;br /&gt;subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f&lt;br /&gt;subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f&lt;br /&gt;subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f&lt;br /&gt;subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f&lt;br /&gt;secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1784410309463628681?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1784410309463628681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1784410309463628681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1784410309463628681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1784410309463628681'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/09/blue-screen-trying-to-install-windows.html' title='Blue Screen Trying to Install Windows XP SP3'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2023873846138506638</id><published>2008-08-21T16:42:00.001-07:00</published><updated>2008-08-21T16:52:37.784-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Services'/><title type='text'>How to Delete Broken Windows Service</title><content type='html'>As a developer who writes Windows Services, I sometimes get services registered with the source code and executables long gone (because I no longer work on that project). When it finally came the time to cleanup. I found it difficult to remove them from the registry without the original executables.&lt;br /&gt;&lt;br /&gt;After a bit of Google, however, I found a useful tool: &lt;span style="font-family: courier new;"&gt;sc.exe&lt;/span&gt; (Service Controller Tool) come with Windows Resource Kit. This command line tool make deleting service very easy, just run:&lt;br /&gt;&lt;div style="text-align: center; font-family: courier new;"&gt;sc.exe delete [service name]&lt;/div&gt;&lt;br /&gt;Notice: the service name for the command line is not the same as "Name" you see in the list (this is usually the "Display Name"). You need to double click the service to open the properties page. And there you will find "Service Name".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2023873846138506638?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2023873846138506638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2023873846138506638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2023873846138506638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2023873846138506638'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/08/how-to-delete-broken-windows-service.html' title='How to Delete Broken Windows Service'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1596735014635328207</id><published>2008-07-24T16:05:00.000-07:00</published><updated>2008-07-24T16:26:53.248-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>C++/CLI Gotchas</title><content type='html'>C++/CLI is a hybrid monster. I am very green in the world of C++/CLI. Below are a few very stupid problems I have met.&lt;br /&gt;&lt;br /&gt;Example 1: If you are writing unsafe code in C++/CLI with mixed managed code and unmanaged code, it proved to be more dangerous than plain old C++. Here are a few examples of using System::String together with char (C native data type). Without thorough understanding of the new .NET String class will create code that compiles perfectly but return unexpected results to you in run time.&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;String^ str = "";&lt;br /&gt;char ch = 'a';&lt;br /&gt;str += ch; //result: str="97", instead of "a", because it called ch.ToString()&lt;br /&gt;str = gcnew String(&amp;ch); //result: str="a@#!$%", because &amp;ch is considered to be a string&lt;br /&gt;str = gcnew String(&amp;ch, 0, 1); //result: str="a" as expected.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Example 2: Visual Studio 2005 Debugger is a liar&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;int i;&lt;br /&gt;i=1000;&lt;br /&gt;... //all the code in between so that you forgot what is defined&lt;br /&gt;for(int i=0; i &lt; 3; i++)&lt;br /&gt;{&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;int k = i++; //if you set a break here, Visual Studio Debugger will tell you i=4??!&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I agree that the code above is stupid which is an artifact from trying to correct old VC++ code. But Debugger giving a wrong answer wouldn't help!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1596735014635328207?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1596735014635328207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1596735014635328207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1596735014635328207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1596735014635328207'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/07/ccli-gotchas.html' title='C++/CLI Gotchas'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4475677793444315156</id><published>2008-07-07T16:17:00.000-07:00</published><updated>2008-07-07T16:40:06.184-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>C++/CLI Warning C4945</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Reason&lt;/span&gt;: This warning was generated because I referenced multiple C# projects in the C++/CLI project, and they all have "copy local" set to true.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt; Change reference to the C# projects, set all "copy local ..." properties to false.&lt;br /&gt;&lt;br /&gt;A hotfix is available, which does not seem to be in SP1 as of 7/7/2008. So this fix probably will never be publicly available. This proves again C++/CLI is not on the top of TODO list for Visual Studio team.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reference&lt;/span&gt;:&lt;br /&gt;Microsoft KB 922271: &lt;a href="http://support.microsoft.com/kb/922271"&gt;http://support.microsoft.com/kb/922271&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4475677793444315156?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4475677793444315156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4475677793444315156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4475677793444315156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4475677793444315156'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/07/ccli-warning-c4945.html' title='C++/CLI Warning C4945'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2650445770139124833</id><published>2008-05-07T20:39:00.000-07:00</published><updated>2008-05-07T22:25:39.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='MFC'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Convert VC++6 to VC++7 -- (2)</title><content type='html'>Below is a laundry list of the problems and solutions.&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Compiler Error:&lt;/span&gt; &lt;code&gt;fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution: &lt;/span&gt;change include from &lt;code&gt;fsream.h&lt;/code&gt; to &lt;code&gt;fstream&lt;/code&gt;, and add &lt;code&gt;using namespace std;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related problems:&lt;/span&gt; &lt;code&gt;ios::nocreate&lt;/code&gt; and &lt;code&gt;ios::noreplace&lt;/code&gt; are deprecated. &lt;code&gt;ios::nocreate &lt;/code&gt;is replace by &lt;code&gt;ios::in&lt;/code&gt;&lt;br /&gt;&lt;hr /&gt;&lt;code&gt;CFile::ReadHuge()&lt;/code&gt; and &lt;code&gt;CFile::WriteHuge()&lt;/code&gt; are obsolete. Use &lt;code&gt;CFile::Read()&lt;/code&gt; and &lt;code&gt;CFile::Write()&lt;/code&gt; instead.&lt;br /&gt;&lt;hr /&gt;Replace &lt;code&gt;&amp;amp;afxChNil&lt;/code&gt; by empty string "".&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Compiler Error:&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;error C2059: syntax error : '&lt;'   &lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;error C2143: syntax error : missing ';' before '&lt;' &lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;error C2182: 'ConstructElements' : illegal use of type 'void' &lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;error C2988: unrecognizable template declaration/definition &lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt; &lt;code&gt;ConstructElements&lt;/code&gt; and &lt;code&gt;DestructElements&lt;/code&gt; are deprecated. Remove definition of these functions. Ref: &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;318734"&gt;Microsoft KB 318734&lt;/a&gt;&lt;br /&gt;&lt;hr /&gt;&lt;code&gt;WINVER&lt;/code&gt; default changed to 0x0501 (Windows XP). If your program still want to support Windows 2000, the the following line must be included in the project:&lt;br /&gt;&lt;code&gt;#define WINVER 0x0400&lt;/code&gt;&lt;br /&gt;&lt;hr /&gt;&lt;code&gt;CPropetySheetEx&lt;/code&gt;, &lt;code&gt;CPropertyPageEx&lt;/code&gt; are deprecated, they are included back to &lt;code&gt;CPropertySheet&lt;/code&gt; and &lt;code&gt;CPropertyPage&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;code&gt;CString s(45)&lt;/code&gt; no longer compiles. Because &lt;code&gt;CString&lt;/code&gt; is changed to template based function with more constructors. This definition has ambiguous overloaded constructors. Change to &lt;code&gt;CString s((TCHAR)45)&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;VC++7.1 has stricter type requirements. For example, conversion from &lt;code&gt;HANDLE&lt;/code&gt; to &lt;code&gt;int&lt;/code&gt; and &lt;code&gt;uint&lt;/code&gt; is not allowed.&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Compiler Error:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;error C2668: 'sqrt' : ambiguous call to overloaded function&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;sqrt&lt;/code&gt;, &lt;code&gt;fabs&lt;/code&gt;, &lt;code&gt;log&lt;/code&gt; and other CRT math functions support both &lt;code&gt;double&lt;/code&gt; and &lt;code&gt;float&lt;/code&gt; type now. An integer input to these functions will cause the error above.&lt;br /&gt;Example:&lt;br /&gt;&lt;pre&gt;int i = 10;&lt;br /&gt;float f = sqrt(i); //error C2688&lt;br /&gt;float f = sqrt((float)i); //compiles ok&lt;/pre&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Compiler Error:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;error C2440: 'static_cast' : cannot convert from 'void (__thiscall XXXXXXXX::* )(void)' to 'void (__thiscall XXXXXX::* )(NMHDR *,LRESULT *)'&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Function signature of event handler &lt;code&gt;OnKillfocus&lt;/code&gt; was changed from &lt;code&gt;void Func(void)&lt;/code&gt; to &lt;code&gt;void Func(NMHDR*, LRESULT*)&lt;/code&gt;.&lt;br /&gt;&lt;hr /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2650445770139124833?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2650445770139124833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2650445770139124833' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2650445770139124833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2650445770139124833'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/05/convert-vc6-to-vc7-2.html' title='Convert VC++6 to VC++7 -- (2)'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-9156465923741966484</id><published>2008-05-01T00:34:00.000-07:00</published><updated>2008-05-01T01:05:10.879-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='MFC'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Convert VC++6 to VC++7 -- (1)</title><content type='html'>VC++6 is a pretty solid product, which can still produce decent software in Windows XP. But Microsoft has decided to stop support for VC6 for about 2 years now. With the arrival of VS2008 and Windows Vista, it might finally be the time to convert those old projects that you still want to keep alive into a newer platform. &lt;br /&gt;&lt;br /&gt;To start the conversion is really easy, just open the .dsp file in Visual Studio 2003. It will convert the project for you automatically, and generate the .vcproj and .sln files. If you are lucky, the next step is press F7 to build the solution and press F5 to run it, and you are done. Unfortunately, 90% of us will need to change the code to make it even compile. VC++6 is less standard compliant than VC++7 and there are some other breaking changes in VC++7.&lt;br /&gt;&lt;br /&gt;This series will report problems I've seen when I convert a VC++6 project to VC++7 and some tips to help smooth the process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Tip 1&lt;/span&gt;: for a project that is still actively maintained, during the conversion care must be taken so that changes do not break the software under VC++6. Use this to allow the code changes exists peacefully in VC++6:&lt;br /&gt;&lt;pre name="code" class="cpp"&gt;&lt;br /&gt;#if _MSC_VER &gt;=1500&lt;br /&gt;    //this is VC++9.0 or above&lt;br /&gt;#elif _MSC_VER &gt;= 1400&lt;br /&gt;    // this is VC++8.0&lt;br /&gt;#elif _MSC_VER &gt;= 1310&lt;br /&gt;    // this is VC++7.1&lt;br /&gt;#elif _MSC_VER &gt; 1300&lt;br /&gt;    // this is VC++7.0&lt;br /&gt;#else&lt;br /&gt;    //assume VC++6&lt;br /&gt;#endif &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-9156465923741966484?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/9156465923741966484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=9156465923741966484' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9156465923741966484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9156465923741966484'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/05/convert-vc6-to-vc7-1.html' title='Convert VC++6 to VC++7 -- (1)'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4529216613964588751</id><published>2008-03-24T15:11:00.000-07:00</published><updated>2008-03-24T15:22:23.017-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveSync'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Mobile'/><title type='text'>ActiveSync Remote Display for Windows Mobile 5.0 Devices</title><content type='html'>&lt;h3&gt;The Problem&lt;/h3&gt;&lt;br /&gt;"ActiveSync Remote Display" (ARD) version 2.03 does not support Windows Mobile 5.0. If a Windows Mobile 5.0 device is connected to a PC through ActiveSync, when you start the program, you will see a dialog with title: "Remote Display for Windows CE" and error message: "The OS or CPU of this device is unknown to this application". After you click OK,it will show another error dialog and a blank screen.&lt;br /&gt;        &lt;br /&gt;&lt;h3&gt;Work Around&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;To Enable ActiveSync Remote Display&lt;/h4&gt;&lt;br /&gt;Go to directory: &lt;code&gt;C:\Program Files\Windows Mobile Developer Power Toys\ActiveSync_Remote_Display\devices\wce400\armv4&lt;/code&gt;&lt;br /&gt;Copy the two files to the Windows directory on the mobile device.&lt;br /&gt;&lt;h4&gt;To Use the ActiveSync Remote Display&lt;/h4&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Start the ARD program;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You will see the same error dialog as before, click "OK";&lt;/li&gt;&lt;br /&gt;&lt;li&gt;There will no longer be the second error dialog and you will see the screen shown on the PC or laptop;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;After you are done, click on the ARD icon on the &lt;b&gt;Mobile Device&lt;/b&gt; and select exit (if you simply close the remote display on the PC end, the ARD will still be running on the mobile device);&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/13937734-4529216613964588751?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4529216613964588751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4529216613964588751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4529216613964588751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4529216613964588751'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/03/activesync-remote-display-for-windows.html' title='ActiveSync Remote Display for Windows Mobile 5.0 Devices'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7414605491200300164</id><published>2008-02-13T20:54:00.000-08:00</published><updated>2008-03-28T16:48:30.650-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='streaming'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Embed Silverlight Streaming in Blogger</title><content type='html'>I tried to post a video hosted on Microsoft Silverlight Streaming service in &lt;a href="http://developertips.blogspot.com/2008/02/microsoft-silverlight-streaming-service.html"&gt;the previous post&lt;/a&gt;. This post will show you how to embed Silverlight in a Blogger post.&lt;br /&gt;&lt;br /&gt;1. Source code to embed the video in Blogger post. &lt;em&gt;Notice&lt;/em&gt;, since Blogger tend to insert &amp;lt;br/&amp;gt; for new lines, the Javascript segment has to be on a single line:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://agappdom.net/h/silverlight.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;function CreateSilverlight() { Silverlight.createHostedObjectEx( { source:"streaming:/[account ID]/MovieTest", parentElement:Wrapper_MovieTest}); } &amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;div id="Wrapper_MovieTest" style="width: 640px; height: 480px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;var Wrapper_MovieTest = document.getElementById("Wrapper_MovieTest"); CreateSilverlight(); &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2. manifest.xml (required for Microsoft Silverlight Streaming upload)&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;SilverlightApp&amp;gt;&lt;br /&gt;&amp;lt;source&amp;gt;Movie.xaml&amp;lt;/source&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.1&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;width&amp;gt;100%&amp;lt;/width&amp;gt;&lt;br /&gt;&amp;lt;height&amp;gt;100%&amp;lt;/height&amp;gt;&lt;br /&gt;&amp;lt;enableHtmlAccess&amp;gt;true&amp;lt;/enableHtmlAccess&amp;gt;&lt;br /&gt;&amp;lt;jsOrder&amp;gt;&lt;br /&gt;  &amp;lt;js&amp;gt;Movie.xaml.js&amp;lt;/js&amp;gt;&lt;br /&gt;&amp;lt;/jsOrder&amp;gt;&lt;br /&gt;&amp;lt;/SilverlightApp&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;3.Movie.xaml (stage layout)&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;Canvas x:Name="movieCanvas"&lt;br /&gt;      xmlns="http://schemas.microsoft.com/client/2007"&lt;br /&gt;      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;      Width="640" Height="480" Background="White" MouseEnter ="mouseEnter"&lt;br /&gt;      MouseLeave ="mouseLeave"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;MediaElement x:Name="movie" Source="Lake.wmv"/&amp;gt;&lt;br /&gt;&amp;lt;Canvas MouseLeftButtonDown="moviePlay"&lt;br /&gt;  Canvas.Left="10" Canvas.Top="365"&amp;gt;&lt;br /&gt;  &amp;lt;TextBlock Canvas.Left="5" Canvas.Top="5" Visibility="Collapsed" x:Name="playButton" Foreground="White"&amp;gt;Play&amp;lt;/TextBlock&amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;br /&gt;&amp;lt;Canvas MouseLeftButtonDown="moviePause"&lt;br /&gt;  Canvas.Left="70" Canvas.Top="365"&amp;gt;&lt;br /&gt;  &amp;lt;TextBlock Canvas.Left="5" Canvas.Top="5" Visibility="Collapsed" x:Name="pauseButton" Foreground="White"&amp;gt;Pause&amp;lt;/TextBlock&amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;br /&gt;&amp;lt;Canvas MouseLeftButtonDown="movieStop"&lt;br /&gt;  Canvas.Left="130" Canvas.Top="365"&amp;gt;&lt;br /&gt;  &amp;lt;TextBlock Canvas.Left="5" Canvas.Top="5" Visibility="Collapsed" x:Name="stopButton" Foreground="White"&amp;gt;Stop&amp;lt;/TextBlock&amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;4. Movie.xaml.js (event handler, logic)&lt;br /&gt;&lt;pre name="code" class="js"&gt;&lt;br /&gt;function movieStop(sender, args) {&lt;br /&gt;  sender.findName("movie").stop();&lt;br /&gt;}&lt;br /&gt;function moviePause(sender, args) {&lt;br /&gt;  sender.findName("movie").pause();&lt;br /&gt;}&lt;br /&gt;function moviePlay(sender, args) {&lt;br /&gt;  sender.findName("movie").play();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function mouseEnter(sender, args) {&lt;br /&gt;  setControlVisibility(sender, "Visible");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function mouseLeave(sender, args) {&lt;br /&gt;  setControlVisibility(sender, "Collapsed");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function setControlVisibility(sender, visibility) {&lt;br /&gt;  sender.findName("playButton").visibility = visibility;&lt;br /&gt;  sender.findName("stopButton").visibility = visibility;&lt;br /&gt;  sender.findName("pauseButton").visibility = visibility;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Files 2-4 and the movie are added to a zip file and uploaded to the Microsoft Silverlight Streaming host.&lt;br /&gt;&lt;p&gt;&lt;b&gt;P.S.&lt;/b&gt; &lt;br /&gt;You might also be interested in the following previous posts:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;If you like how the code snippets are formatted on this page, you might want to read my other post: &lt;a href="http://developertips.blogspot.com/2007/08/syntaxhighlighter-on-blogger.html"&gt;Using SyntaxHighlighter on BLOGGER&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://developertips.blogspot.com/2007/12/embedding-chart-in-web-pages-made-easy.html"&gt;Embedding Chart in Web Pages Made Easy&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7414605491200300164?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7414605491200300164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7414605491200300164' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7414605491200300164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7414605491200300164'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/02/silverlight-streaming-source.html' title='Embed Silverlight Streaming in Blogger'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7854698514499022668</id><published>2008-02-12T23:37:00.000-08:00</published><updated>2008-02-13T00:13:01.083-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='streaming'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Microsoft Silverlight Streaming Service Test</title><content type='html'>This is a test of &lt;a href="http://silverlight.live.com/"&gt;Microsoft Silverlight Streaming&lt;/a&gt; -- a free service that provides 4GB online space for Silverlight application hosting. You will need Silverlight 1.1 or higher to see the content. Move mouse over the video to see the movie controls. Resources for this implementation: a video file from Windows Vista, &lt;a href="http://silverlight.net/GetStarted/"&gt;Silverlight 1.1 SDK&lt;/a&gt;, &lt;a href="http://www.microsoft.com/express/"&gt;Visual Studio Express&lt;/a&gt; (Visual Web Developer 2008 Express Edition), and a &lt;a href="http://silverlight.live.com/"&gt;Microsoft Silverlight Streaming&lt;/a&gt; account.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://agappdom.net/h/silverlight.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;function CreateSilverlight() { Silverlight.createHostedObjectEx( { source:"streaming:/52057/MovieTest", parentElement:Wrapper_MovieTest}); } &lt;/script&gt;&lt;br /&gt;&lt;div id="Wrapper_MovieTest" style="width: 640px; height: 480px;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var Wrapper_MovieTest = document.getElementById("Wrapper_MovieTest"); CreateSilverlight(); &lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7854698514499022668?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7854698514499022668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7854698514499022668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7854698514499022668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7854698514499022668'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2008/02/microsoft-silverlight-streaming-service.html' title='Microsoft Silverlight Streaming Service Test'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4364505909389187472</id><published>2007-12-10T16:27:00.000-08:00</published><updated>2007-12-10T16:35:10.188-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='complain'/><title type='text'>"Newer Version" of GMail does not like Firefox</title><content type='html'>It is hard to believe, but our old faithful Google is producing a newer version which is badder than the older version.&lt;br /&gt;&lt;br /&gt;I am generally happy with Firefox. But after the "newer" version of GMail is out, I am forced to use IE more, because Firefox will crash on GMail before I can do anything. These are frequent places of crash:&lt;br /&gt;&lt;br /&gt;- send a new email;&lt;br /&gt;- browse trash or spam folder;&lt;br /&gt;- close a tab with GMail;&lt;br /&gt;&lt;br /&gt;After switch to the "older" version of GMail, the crash problem goes away immediately. Hopefully the next "newer" version of GMail will be a better one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4364505909389187472?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4364505909389187472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4364505909389187472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4364505909389187472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4364505909389187472'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/12/newer-version-of-gmail-does-not-like.html' title='&quot;Newer Version&quot; of GMail does not like Firefox'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1242091098680240585</id><published>2007-12-07T11:00:00.001-08:00</published><updated>2007-12-07T12:13:36.139-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='yui'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Embedding Chart in Web Pages Made Easy</title><content type='html'>This week, embedding charts in your web page (either dynamic or static) is made extremely easy by the release of two new tools by Yahoo and Google. Both released free tools to help create chart online.&lt;br /&gt;&lt;br /&gt;I am not sure if this is competition between Yahoo and Google or just coincidence. The two tools are released within the same week (this week):&lt;br /&gt;&lt;a href="http://developer.yahoo.com/yui/"&gt;YUI&lt;/a&gt; 2.4.0 released on 12/04/2007&lt;br /&gt;&lt;a href="http://code.google.com/apis/chart/"&gt;Google Chart API&lt;/a&gt; released on 12/06/2007&lt;br /&gt;&lt;br /&gt;The two tools actually complement each other.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Google Chart API:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Nothing can describe it better than the following text on their web site:&lt;br /&gt;&lt;blockquote&gt;The Google Chart API lets you dynamically generate charts. To see the Chart API in action, open up a browser window and copy the following URL into it: &lt;p&gt;&lt;code&gt;http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=s:hW&amp;amp;chs=250x100&amp;amp;chl=Hello|World&lt;/code&gt;&lt;/p&gt; Press the Enter or Return key ...&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Pros:&lt;/span&gt;&lt;br /&gt;- absolutely the simplest and the easiest chart tool I have ever seen;&lt;br /&gt;- there is no CPU overhead on your web server and client's computer;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cons:&lt;/span&gt;&lt;br /&gt;- may have problem serving chart over SSL (at least IE will complain about secure and non-secure content on the same page);&lt;br /&gt;- chart is static, no user interaction;&lt;br /&gt;- very limited control over chart's look and feel;&lt;br /&gt;- can only show limited data range;&lt;br /&gt;- can only show limited number of data points;&lt;br /&gt;- your data has to be sent to a Google server, it may be a security concert;&lt;br /&gt;&lt;br /&gt;Below is a sample chart serve by Google Chart API. It is the real thing! Served dynamically from Google's server farms! It takes me only 20 seconds to embed it into this blog.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://chart.apis.google.com/chart?chs=200x125&amp;amp;chd=s:helloWorld&amp;amp;cht=lc&amp;amp;chxt=x,y&amp;amp;chxl=0:%7CMar%7CApr%7CMay%7CJune%7CJuly%7C1:%7C%7C50+Kb"&gt;&lt;img style="cursor: pointer; width: 183px; height: 114px;" src="http://chart.apis.google.com/chart?chs=200x125&amp;amp;chd=s:helloWorld&amp;amp;cht=lc&amp;amp;chxt=x,y&amp;amp;chxl=0:%7CMar%7CApr%7CMay%7CJune%7CJuly%7C1:%7C%7C50+Kb" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Yahoo! User Interface Library (YUI):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;YUI implementation is based on a Flash component. You will need to write JavaScript to control the data and look&amp;amp;feel on the Flash chart.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pros:&lt;/span&gt;&lt;br /&gt;- Rich user interaction (there is potential to allow user zoom, pan, or edit charts);&lt;br /&gt;- More control over look and feel;&lt;br /&gt;- Can show more data;&lt;br /&gt;- Can be hosted on your own server (no worry about Google being BIG BROTHER or going BANKRUPT);&lt;br /&gt;- Less Internet traffic is required (only need to download data, not PNG or any other image files);&lt;br /&gt;- Can serve live data (again, only data download is needed, we can afford to update the chart frequently);&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cons:&lt;/span&gt;&lt;br /&gt;- substantial JavaScipt programming and HTML editing is required;&lt;br /&gt;- end user need to have Flash Player 9.0.45 or higher (not many people have that as on December 2007);&lt;br /&gt;- end user's computer must have some spare CPU power, especially when multiple charts are embedded on the web page;&lt;br /&gt;&lt;br /&gt;As an obvious proof of the difficulty to start using YUI, I am not willing to try to embed a sample chart here in my blog! :-(&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;The Verdict:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;If you want a simple chart embedded on a static page or your blog, use Google Chart API.&lt;br /&gt;If you have total control of your web server, and want to create powerful dynamic charts, use YUI 2.4.0's experimental chart component.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Last Words:&lt;/span&gt;&lt;br /&gt;Of course, if you have enough server side CPU power and deep programming knowledge, server side chart rendering always give you ultimate control over the look and feel of your charts. On this end, you have these great open source libraries to help you: &lt;a href="http://zedgraph.org/"&gt;ZedGrap &lt;/a&gt;(C#), &lt;a href="http://www.jfree.org/jfreechart/"&gt;JFreeChart &lt;/a&gt;(Java), &lt;a href="http://developer.yahoo.com/flash/"&gt;ASTRA &lt;/a&gt;(Flash).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1242091098680240585?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1242091098680240585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1242091098680240585' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1242091098680240585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1242091098680240585'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/12/embedding-chart-in-web-pages-made-easy.html' title='Embedding Chart in Web Pages Made Easy'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5301918057061076902</id><published>2007-11-08T12:13:00.000-08:00</published><updated>2008-02-01T11:26:38.537-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IE'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='MFC'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Error Installing ActiveX in IE</title><content type='html'>If an ActiveX component fails to install in IE, to find out the source of the problem, you just need to select IE menu: &lt;span style="font-family:courier new;"&gt;Tools &gt; Internet Options&lt;/span&gt;, click "&lt;span style="font-family:courier new;"&gt;Settings&lt;/span&gt;" button in the "&lt;span style="font-family:courier new;"&gt;Browsing history&lt;/span&gt;" group, then click the "&lt;span style="font-family:courier new;"&gt;View files&lt;/span&gt;" button. There should be a file named like this: "&lt;span style="font-family:courier new;"&gt;?CodeDownloadErrorLog!name={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}&lt;/span&gt;". This is the error log that contains a bit more information to help find the source of installation failure. The above description is based on IE 7, you should be able to find similar options in other IE versions.&lt;br /&gt;&lt;br /&gt;In my specific case, the error log looks like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;*** Code Download Log entry (07 Nov 2007 @ 10:01:26) ***&lt;br /&gt;Code Download Error: (hr = 800c0300) Unknown Error!!&lt;br /&gt;Operation failed. Detailed Information:&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;LOG: Item mfc42.dll being processed.&lt;br /&gt;ERR: INF Processing:  Failed (800c0300) processing: mfc42.dll&lt;br /&gt;. Cannot get primary/default language!LOG: URL Download Complete: hrStatus:0, hrOSB:800c0300, hrResponseHdr:0, URL:(*****.CAB)&lt;br /&gt;LOG: Reporting Code Download Completion: (hr:800c0300 (FAILED), CLASSID: e45975a1..., szCODE:(*****.cab), MainType:(null), MainExt:(null))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Below is the related section in the .inf file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; [mfc42.dll]&lt;br /&gt; FileVersion=6,2,4131,0&lt;br /&gt; file=http://[Web Server]/libraries.cab&lt;br /&gt; RegisterServer=no&lt;br /&gt; DestDir=11&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After I commented out the "FileVersion" parameter, the ActiveX component is installed  successfully.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; [mfc42.dll]&lt;br /&gt; ;FileVersion=6,2,4131,0&lt;br /&gt; file=http://[Web Server]/libraries.cab&lt;br /&gt; RegisterServer=no&lt;br /&gt; DestDir=11&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Since the problem only happens on Windows 2000 computers, and my development environment in Windows XP Pro. I suspect that the MFC42 library provided by me may not be compatible with Win2000. Or the MFC42 is already in use by Win2000, and Win2000 have difficulty upgrading to the newer version provided by me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5301918057061076902?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5301918057061076902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5301918057061076902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5301918057061076902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5301918057061076902'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/11/error-installing-activex-in-ie.html' title='Error Installing ActiveX in IE'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-727698893162683910</id><published>2007-11-07T11:40:00.000-08:00</published><updated>2008-12-09T11:39:22.889-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows API'/><title type='text'>Reboot Remote Computer</title><content type='html'>"Remote Desktop" makes it easy to manage Windows computers remotely.&lt;br /&gt;&lt;br /&gt;But, if you want to reboot the remote computer, you will be frustrated. Because there is no "Shut Down" button on the start menu. The trick is to click on the "Windows Security" menu which will bring up the "Windows Security" dialog which gives you the options to "Shut Down..." computer. You can also use the shortcut: Ctrl+Del+End to access the "Windows Security" dialog.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/RzIWU9yS7lI/AAAAAAAAA8E/VyFGM_NuXLw/s1600-h/sec.JPG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_C148T9ItPYw/RzIWU9yS7lI/AAAAAAAAA8E/VyFGM_NuXLw/s400/sec.JPG" alt="" id="BLOGGER_PHOTO_ID_5130187474967129682" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-727698893162683910?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/727698893162683910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=727698893162683910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/727698893162683910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/727698893162683910'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/11/reboot-remote-computer.html' title='Reboot Remote Computer'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/RzIWU9yS7lI/AAAAAAAAA8E/VyFGM_NuXLw/s72-c/sec.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-8044340608665548085</id><published>2007-11-02T13:11:00.000-07:00</published><updated>2007-11-02T13:25:27.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='aptana'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><title type='text'>Aptana Out of Beta: 1.0 Released</title><content type='html'>Just noticed that Aptana has been out of beta. In the 2.0 era when everything stays "BETA" forever, this is a rare achievement.&lt;br /&gt;&lt;br /&gt;In version 1.0, an open-source &lt;span style="font-weight: bold;"&gt;Community&lt;/span&gt; edition and a commercial &lt;span style="font-weight: bold;"&gt;Professional &lt;/span&gt;edition are available at the same time. The professional edition definitely deserves the nominal price it asked for. But as its name suggests, only professionals really have an urge for that edition. The free Community edition has enough features for 90 percent of its potential users.&lt;br /&gt;&lt;br /&gt;My main IDE is still Visual Studio 2005. But the Javascript editor in Aptana is the best I ever seen. Its auto-complete is way better than even the latest Visual Studio 2008 Beta2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-8044340608665548085?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/8044340608665548085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=8044340608665548085' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8044340608665548085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/8044340608665548085'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/11/aptana-out-of-beta-10-released.html' title='Aptana Out of Beta: 1.0 Released'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6146001391702104696</id><published>2007-10-18T16:44:00.000-07:00</published><updated>2007-10-18T16:59:58.221-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='jslint'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><title type='text'>JSLint with ANT</title><content type='html'>&lt;a href="http://code.google.com/p/jslint4java/"&gt;jslint4java&lt;/a&gt;: &lt;blockquote&gt;&lt;span style="font-weight: bold;font-family:verdana;font-size:180%;"  &gt;"&lt;/span&gt;This is a java wrapper around the fabulous tool by Douglas Crockford, jslint. It provides a simple interface for detecting potential problems in JavaScript code.&lt;span style="font-weight: bold;font-family:verdana;font-size:180%;"  &gt;"&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;With this tool, batch scan JavaScript files with JSLint is a piece of cake. Here is a sample ANT target:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;target name="jslint.src.js" depends="init"&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;scan javascript files using jslint&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;apply executable="java" parallel="false" failonerror="false"&amp;gt;&lt;br /&gt;  &amp;lt;arg value="-jar" /&amp;gt;&lt;br /&gt;  &amp;lt;arg file="${tools.dir}/${jslint}" /&amp;gt;&lt;br /&gt;  &amp;lt;arg value="--bitwise" /&amp;gt;&lt;br /&gt;  &amp;lt;arg value="--browser" /&amp;gt;&lt;br /&gt;  &amp;lt;arg value="--undef" /&amp;gt;&lt;br /&gt;  &amp;lt;arg value="--widget" /&amp;gt;&lt;br /&gt;  &amp;lt;srcfile /&amp;gt;&lt;br /&gt;  &amp;lt;sort xmlns:rcmp="antlib:org.apache.tools.ant.types.resources.comparators"&amp;gt;&lt;br /&gt;    &amp;lt;rcmp:name /&amp;gt;&lt;br /&gt;    &amp;lt;fileset dir="${web.js.dir}"&amp;gt;&lt;br /&gt;      &amp;lt;include name="**/*.js" /&amp;gt;&lt;br /&gt;      &amp;lt;exclude name="**/YUI/**" /&amp;gt;&lt;br /&gt;      &amp;lt;exclude name="**/*-min.js" /&amp;gt;&lt;br /&gt;      &amp;lt;exclude name="**/*-debug.js" /&amp;gt;&lt;br /&gt;    &amp;lt;/fileset&amp;gt;&lt;br /&gt;  &amp;lt;/sort&amp;gt;&lt;br /&gt;&amp;lt;/apply&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For ease of future reference, JSLint output can be redirected to a text file:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ANT jslint.src.js &gt; jslintreport.txt&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-6146001391702104696?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6146001391702104696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6146001391702104696' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6146001391702104696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6146001391702104696'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/10/jslint-with-ant.html' title='JSLint with ANT'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2285447963824529759</id><published>2007-10-18T16:16:00.000-07:00</published><updated>2008-05-30T13:40:04.347-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><category scheme='http://www.blogger.com/atom/ns#' term='yui compressor'/><title type='text'>YUI Compressor in ANT</title><content type='html'>Here is a sample ANT target to batch minify all JavaScript files using &lt;a href="http://developer.yahoo.com/yui/compressor/"&gt;YUI Compressor&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;target name="js.minify" depends="init"&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;minify js files&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;apply executable="java" parallel="false" failonerror="true"&amp;gt;&lt;br /&gt;&amp;lt;arg value="-jar" /&amp;gt;&lt;br /&gt;&amp;lt;arg file="${tools.dir}/${yuicompressor}" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="--nomunge" /&amp;gt;&lt;br /&gt;&amp;lt;!-- line break set at 20 characters, so that we can get many line breaks, this&lt;br /&gt;   is good for debugging in IE--&amp;gt;&lt;br /&gt;&amp;lt;arg value="--line-break" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="20" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="--preserve-strings" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="--preserve-semi" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="--charset" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="ISO-8859-1" /&amp;gt;&lt;br /&gt;&amp;lt;arg value="-o" /&amp;gt;&lt;br /&gt;&amp;lt;targetfile /&amp;gt;&lt;br /&gt;&amp;lt;srcfile /&amp;gt;&lt;br /&gt;&amp;lt;!-- files are processed in alpha-order so that we can know the progress,&lt;br /&gt;   and easily identify the file that is failed.--&amp;gt;&lt;br /&gt;&amp;lt;sort xmlns:rcmp="antlib:org.apache.tools.ant.types.resources.comparators"&amp;gt;&lt;br /&gt; &amp;lt;rcmp:name /&amp;gt;&lt;br /&gt; &amp;lt;fileset dir="${src.dir}"&amp;gt;&lt;br /&gt;  &amp;lt;include name="**/*.js" /&amp;gt;&lt;br /&gt;  &amp;lt;exclude name="**/YUI/**" /&amp;gt;&lt;br /&gt;  &amp;lt;!-- avoid cycling --&amp;gt;&lt;br /&gt;  &amp;lt;exclude name="**/*-min.js" /&amp;gt;&lt;br /&gt; &amp;lt;/fileset&amp;gt;&lt;br /&gt;&amp;lt;/sort&amp;gt;&lt;br /&gt;&amp;lt;!-- define output file name --&amp;gt;&lt;br /&gt;&amp;lt;mapper type="glob" from="*.js" to="*-min.js" /&amp;gt;&lt;br /&gt;&amp;lt;/apply&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;About &lt;a href="http://developer.yahoo.com/yui/compressor/"&gt;YUI Compressor&lt;/a&gt;:&lt;/span&gt; it is a tool to minimize JavaScript and CSS files. I have used it for more 6 months on a public web site without any problem.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;About &lt;a href="http://ant.apache.org/index.html"&gt;ANT&lt;/a&gt;: &lt;/span&gt;I have been using &lt;a href="http://ant.apache.org/index.html"&gt;APACHE ANT&lt;/a&gt; for 7 years, since 2001. To me, an ANT build file structure is more intuitive and scalable than MAKE files.  &lt;blockquote&gt;Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This is the post that gets me started on this direction:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.julienlecomte.net/blog/2007/09/11/building-web-applications-with-apache-ant/"&gt;Building Web Applications With Apache Ant&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2285447963824529759?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2285447963824529759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2285447963824529759' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2285447963824529759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2285447963824529759'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/10/yuicompressor-in-ant.html' title='YUI Compressor in ANT'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-9220363005091296741</id><published>2007-09-28T16:08:00.000-07:00</published><updated>2008-12-09T11:39:23.091-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><title type='text'>Open Source File in Visual Studio 2005 with Auto-Complete</title><content type='html'>Just discovered this convenient feature of Visual Studio. It is not well publicized by Microsoft, but I believe it is one of those hidden gems of VS2005.&lt;br /&gt;&lt;br /&gt;If you type "&lt;span style="font-family: courier new;"&gt;&gt;open&lt;/span&gt;" followed with the file name in the "&lt;span style="font-weight: bold;"&gt;Command Windows&lt;/span&gt;" or "&lt;span style="font-weight: bold;"&gt;Find/Command Box&lt;/span&gt;", Visual Studio will search the whole solution and try to auto-complete the file name for you (see screenshot below).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/Rv2KGyCndiI/AAAAAAAAAyU/j-wDdWbd96U/s1600-h/vs2005cw.JPG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_C148T9ItPYw/Rv2KGyCndiI/AAAAAAAAAyU/j-wDdWbd96U/s400/vs2005cw.JPG" alt="" id="BLOGGER_PHOTO_ID_5115396600879347234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are 2 other approaches to open a source file in VS2005: 1. use the open file dialog; 2. expand the solution tree and double click on the file of interest.&lt;br /&gt;&lt;br /&gt;This feature is very useful when you have solution with many projects. If you can remember the file's name, this feature allow you to open a file in under 10 seconds. With the other 2 approaches, you will have to browse up and down the project trees to find the file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-9220363005091296741?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/9220363005091296741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=9220363005091296741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9220363005091296741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9220363005091296741'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/09/open-source-file-in-visual-studio-2005.html' title='Open Source File in Visual Studio 2005 with Auto-Complete'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/Rv2KGyCndiI/AAAAAAAAAyU/j-wDdWbd96U/s72-c/vs2005cw.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-373525500428541864</id><published>2007-09-28T14:36:00.000-07:00</published><updated>2008-12-09T11:39:23.343-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><title type='text'>100,000 + 100 = 65635? Excel 2007 bug</title><content type='html'>100,000 + 100 = 65635?&lt;br /&gt;&lt;div&gt;&lt;br /&gt;The math is not right, but apprently Microsoft Excel 2007 wants you to believe that. See the screenshot below:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_C148T9ItPYw/Rv11KSCndhI/AAAAAAAAAyM/zwk4UgGVViU/s1600-h/excelbug.JPG"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_C148T9ItPYw/Rv11KSCndhI/AAAAAAAAAyM/zwk4UgGVViU/s400/excelbug.JPG" alt="" id="BLOGGER_PHOTO_ID_5115373571264706066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ok, this is a recently published bug: when you ask Excel to multiply 77.1 by 850, it will show you 100,000, although it knows the correct answer. It messes up when formatting the answer on the screen. In cell A1, I actually have formular: "=77.1*850". :-)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-373525500428541864?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/373525500428541864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=373525500428541864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/373525500428541864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/373525500428541864'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/09/100000-100-65635-excel-2007-bug.html' title='100,000 + 100 = 65635? Excel 2007 bug'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_C148T9ItPYw/Rv11KSCndhI/AAAAAAAAAyM/zwk4UgGVViU/s72-c/excelbug.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7035008167128227425</id><published>2007-08-31T10:35:00.000-07:00</published><updated>2007-08-31T11:05:36.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='yui'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><title type='text'>YUI widget "Dialog" now depends on "Button Control"</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Environment: &lt;/span&gt;YUI 2.3, IE 7.0&lt;br /&gt;&lt;br /&gt;This is another problem I discovered during update from YUI 0.12 to YUI 2.3. As always, when updating library, there are many surprises that you have to run into.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt; Error message: "&lt;span style="font-family:courier new;"&gt;Error: Function expected&lt;/span&gt;" appears when I call the "&lt;span style="font-family:courier new;"&gt;render&lt;/span&gt;" method of YUI "&lt;span style="font-family:courier new;"&gt;Dialog&lt;/span&gt;" control a second time on the web page. Turn out the offending line is here: &lt;span style="font-weight: bold;font-family:courier new;" &gt;container.js, line: 6373&lt;/span&gt;,&lt;br /&gt;&lt;blockquote  style="font-family:courier new;"&gt;if (oButton instanceof &lt;span style="font-weight: bold;"&gt;YAHOO.widget.Button&lt;/span&gt;) {&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why: &lt;/span&gt;The new "&lt;span style="font-family:courier new;"&gt;Dialog&lt;/span&gt;" implementation depends on the "&lt;span style="font-family:courier new;"&gt;Button&lt;/span&gt;" control now. Due to the above offending line, the dependency is &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;not&lt;/span&gt; "optional" as stated in the documentation even if you don't use the new button control. If you don't include "&lt;span style="font-family:courier new;"&gt;button.js&lt;/span&gt;", you program will break at the above point.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fix: &lt;/span&gt;If you are willing to change the source code, we can change the offending line to something like this:&lt;br /&gt;&lt;blockquote  style="font-family:courier new;"&gt;if (&lt;span style="font-weight: bold;"&gt;YAHOO.widget.Button &amp;&amp;amp; &lt;/span&gt;oButton instanceof &lt;span style="font-weight: bold;"&gt;YAHOO.widget.Button&lt;/span&gt;) {&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;BUT&lt;/span&gt;, I am 80% sure, at another line, or in another control, I may run into the same problem again.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So&lt;/span&gt;, the best bet is to include "Button.js" to my web page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7035008167128227425?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7035008167128227425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7035008167128227425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7035008167128227425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7035008167128227425'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/08/yui-widget-dialog-now-depends-on-button.html' title='YUI widget &quot;Dialog&quot; now depends on &quot;Button Control&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-840073751548522233</id><published>2007-08-24T17:05:00.000-07:00</published><updated>2007-08-24T23:31:45.277-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>ASTRA -- Open Source ActionScript 3.0 Library From Yahoo</title><content type='html'>Here is a first look of &lt;span style="font-weight: bold;"&gt;ASTRA:&lt;/span&gt; ActionScript Toolkit for Rich Applications.&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;ASTRA, the ActionScript Toolkit for Rich Applications, is Yahoo!’s collection of Flash and Flex components, libraries, toolkits and advanced applications. These libraries are open-source and available under the BSD license.&lt;/blockquote&gt;&lt;div style="text-align: right;"&gt;Quote from &lt;a href="http://developer.yahoo.com/flash/"&gt;http://developer.yahoo.com/flash/&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The "&lt;span style="font-weight: bold;"&gt;Flash Componet Library&lt;/span&gt;" is the library that really draws my interest. I only looked at this library. I guess, however, the "&lt;span style="font-weight: bold;"&gt;Web APIs Library&lt;/span&gt;" is the one YAHOO really want people getting attached too. :-)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The download is a complete package that starts to be useful within seconds&lt;/span&gt;&lt;br /&gt;The download (9.6 MB) contains complete documentation, source code with detailed comments, examples, and binaries that can be installed into Flash CS3 directly. If you are only interested in using the components, you only need to double click the file "astra.mxp", the components will automatically installed and you can start to use it in Flash CS3. You will find the new components under "yahoo" folder. (Notice: if double click "astra.mxp" does not lead you to anything, please check you have installed "&lt;span style="font-weight: bold;"&gt;Adobe Extension Manager&lt;/span&gt;", a separate installation that can be downloaded here: &lt;a href="http://www.adobe.com/exchange/em_download/"&gt;http://www.adobe.com/exchange/em_download/&lt;/a&gt;. It is not installed when you first install Flash CS3.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Small Footprint&lt;/span&gt;&lt;br /&gt;All the .swf files in example directory are no more than 50 KB (even chart samples).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Excellent learning tool&lt;/span&gt;&lt;br /&gt;If you have reservation on using "Beta" libraries in your product, there may still be reason to have a look at this library. It's source code is fully commented, and neatly organized. This make it a great tool for beginners who are learning to use ActionScript 3.0 and trying to understand object-oriented programming.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problems&lt;/span&gt;&lt;br /&gt;As I said, being a "&lt;span style="font-weight: bold;"&gt;beta&lt;/span&gt;" library,  we should expect a lot of bugs. After about 10 minutes playing with chart. I already found a few things worth mentioning. The Flash I created is here: &lt;a href="http://huguogang.googlepages.com/testAstra.html"&gt;http://huguogang.googlepages.com/testAstra.html&lt;/a&gt;&lt;br /&gt;1. Rotated chart cannot be shown properly (although preview on the design surface seems to be ok);&lt;br /&gt;2. Error handling of chart data is weak. It do not show any error message if "dataProvider" has string values. I also managed to make X axis shift to the right by 1 unit, which I don't know why it happens;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-840073751548522233?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/840073751548522233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=840073751548522233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/840073751548522233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/840073751548522233'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/08/astra-open-source-actionscript-30.html' title='ASTRA -- Open Source ActionScript 3.0 Library From Yahoo'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-215869832356259035</id><published>2007-08-23T14:04:00.001-07:00</published><updated>2008-06-30T22:22:58.880-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='yui'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>Error: "YAHOO.util.CustomEvent is not a constructor"</title><content type='html'>&lt;span style="font-weight: bold;"&gt;The Problem:&lt;/span&gt; This error message ("YAHOO.util.CustomEvent is not a constructor") appears after I update my YUI library from 0.12 to the latest release (2.3). There was no such error before the update.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Why:&lt;/span&gt; The new Container in YUI implementation fires CutomEvent at various stage, thus is dependent on the event utility. In my old web pages, the .js files happened to be included in the wrong orders (container.js was included before event.js) and caused this error message.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Fix:&lt;/span&gt; include "event.js" before "container.js". Better yet, try the new YUILoader utility which claims to be able to load the correct libraries automatically.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Lesson: &lt;/span&gt;Whenever you see an error like "[XYZ] is not a contructor", try to check for typo then file dependence.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Link: &lt;/span&gt;Also see this thread on YUI discussion group:&lt;br /&gt;&lt;a href="http://tech.groups.yahoo.com/group/ydn-javascript/messages/16266?threaded=1&amp;amp;m=e&amp;amp;var=1&amp;amp;tidx=1"&gt;http://tech.groups.yahoo.com/group/ydn-javascript/messages/16266?threaded=1&amp;amp;m=e&amp;amp;var=1&amp;amp;tidx=1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-215869832356259035?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/215869832356259035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=215869832356259035' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/215869832356259035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/215869832356259035'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/08/error-yahooutilcustomevent-is-not.html' title='Error: &quot;YAHOO.util.CustomEvent is not a constructor&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1755276155915330875</id><published>2007-08-09T15:23:00.000-07:00</published><updated>2010-07-07T23:25:56.252-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax highlighting'/><title type='text'>Using SyntaxHighlighter on BLOGGER</title><content type='html'>&lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;SyntaxHighlighter&lt;/a&gt; is a &lt;blockquote&gt;Free syntax highlighter written in JavaScript&lt;/blockquote&gt; It can insert colored code snippets on a web page using client-side javascript only. It is ideal tool for users of &lt;a href="http://www.blogger.com/"&gt;BLOGGER &lt;/a&gt;because we do not have server side resource to parse and highlight the code. And we are lazy, we do not want to write a lot of CSS to just post a code snippet. :-).&lt;br /&gt;&lt;br /&gt;However it takes a little twisting to make it work properly.&lt;br /&gt;&lt;br /&gt;Below are the steps to setup:&lt;br /&gt;1. Download and find a place to host the library files for &lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;SyntaxHighlighter&lt;/a&gt;. A free choice is, of course, &lt;a href="http://pages.google.com/"&gt;Google Page Creator&lt;/a&gt;;&lt;br /&gt;2. Login to BLOGGER, go to: "Settings &amp;gt; Template &amp;gt; Edit HTML", make the following changes (credit goes to &lt;a href="http://yehhou.blogspot.com/2007/06/blogger-dpsyntaxhighlighter.html"&gt;yehyeh's blog&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="js"&gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;!-- end outer-wrapper --&amp;gt;&lt;br /&gt;&amp;lt;link href='http://[YOUR HOST]/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shCore.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushCpp.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushCSharp.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushCss.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushJava.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushJScript.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushSql.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://[YOUR HOST]/shBrushXml.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script class='javascript'&amp;gt;&lt;br /&gt;//&amp;lt;![CDATA[&lt;br /&gt; function FindTagsByName(container, name, Tag)&lt;br /&gt; {&lt;br /&gt;     var elements = document.getElementsByTagName(Tag);&lt;br /&gt;     for (var i = 0; i &amp;lt; elements.length; i++)&lt;br /&gt;     {&lt;br /&gt;         if (elements[i].getAttribute("name") == name)&lt;br /&gt;         {&lt;br /&gt;             container.push(elements[i]);&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt; var elements = [];&lt;br /&gt; FindTagsByName(elements, "code", "pre");&lt;br /&gt; FindTagsByName(elements, "code", "textarea");&lt;br /&gt;&lt;br /&gt;for(var i=0; i &amp;lt; elements.length; i++) {&lt;br /&gt;if(elements[i].nodeName.toUpperCase() == "TEXTAREA") {&lt;br /&gt;var childNode = elements[i].childNodes[0];&lt;br /&gt;var newNode = document.createTextNode(childNode.nodeValue.replace(/&amp;lt;br\s*\/?&amp;gt;/gi,'\n'));&lt;br /&gt;elements[i].replaceChild(newNode, childNode);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;else if(elements[i].nodeName.toUpperCase() == "PRE") {&lt;br /&gt;brs = elements[i].getElementsByTagName("br");&lt;br /&gt;for(var j = 0, brLength = brs.length; j &amp;lt; brLength; j++) {&lt;br /&gt; var newNode = document.createTextNode("\n");&lt;br /&gt; elements[i].replaceChild(newNode, brs[0]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;//clipboard does not work well, no line breaks&lt;br /&gt;// dp.SyntaxHighlighter.ClipboardSwf =&lt;br /&gt;//"http://[YOUR HOST]/clipboard.swf";&lt;br /&gt;dp.SyntaxHighlighter.HighlightAll("code");&lt;br /&gt;//]]&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;3. Now you can post code snippet on BLOGGER using either "pre" or "textarea" tag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Notice:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The solution above is found here: &lt;a href="http://yehhou.blogspot.com/2007/06/blogger-dpsyntaxhighlighter.html"&gt;http://yehhou.blogspot.com/2007/06/blogger-dpsyntaxhighlighter.html&lt;/a&gt;. That blog was written in Chinese. I made some minor changes and posted here. The reason for the Javascript code to remove &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt; tags is because BLOGGER has a setting to automatically add &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt;  where there is line break. It is very convenient feature for blog posters, but somehow syntax highlighter will display the &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt;  tag in plain text;&lt;/li&gt;&lt;li&gt;Clipboard for the SyntaxHighlither does not work well here. It tends to give you the text without line breaks, so I commented out the Javascript that setup the clipboard function;&lt;/li&gt;&lt;li&gt;When posting HTML code, remember to replace &lt;code&gt;&amp;lt;&lt;/code&gt; with &lt;code&gt;&amp;amp;lt;&lt;/code&gt;, and replace &lt;code&gt;&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;amp;gt;&lt;/code&gt;;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Next:&lt;/span&gt;&lt;br /&gt;Now you've got beautiful code in your blog, next step might be some nice charts for your blog. You will find a way to embed a chart with one line HTML code here: &lt;a href="http://developertips.blogspot.com/2007/12/embedding-chart-in-web-pages-made-easy.html"&gt;Embedding Chart in Web Pages Made Easy&lt;/a&gt;&lt;br /&gt;And, here is a post to show you how to Embed Silverlight video on Blogger:&lt;a href="http://developertips.blogspot.com/2008/02/silverlight-streaming-source.html"&gt;Embed Silverlight Streaming in Blogger&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Update 11/11/2008&lt;/span&gt;&lt;br /&gt;There are a few questions and comments regarding script hosting. &lt;a href="http://www.blogger.com/profile/09513191836442960182" rel="nofollow"&gt;.NET Dev&lt;/a&gt; posted an interesting idea here:&lt;br /&gt;&lt;a href="http://urenjoy.blogspot.com/2008/10/publish-source-code-in-blogger.html" rel="nofollow"&gt;http://urenjoy.blogspot.com/2008/10/publish-source-code-in-blogger.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically, he setup the links directly to the trunk location of SyntaxHighlighter project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Update 07/07/2010&lt;/span&gt;&lt;br /&gt;I found using gist.github.com is way easier to paste syntax highlighted code in blogger. Here is my post showing you how to use it:&lt;br /&gt;&lt;h3 class="post-title entry-title"&gt;&lt;a href="http://developertips.blogspot.com/2010/07/syntax-highlighting-on-blogger-gist.html"&gt;Syntax  Highlighting on Blogger - Gist&lt;/a&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1755276155915330875?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1755276155915330875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1755276155915330875' title='47 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1755276155915330875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1755276155915330875'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/08/syntaxhighlighter-on-blogger.html' title='Using SyntaxHighlighter on BLOGGER'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>47</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-4411175751873297460</id><published>2007-08-07T15:02:00.000-07:00</published><updated>2007-08-07T15:18:53.612-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='resource'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Free Screen Capture Tools for Windows</title><content type='html'>Here are two free screen capture tools that work decently well for small tasks:&lt;br /&gt;&lt;br /&gt;1. &lt;span style="font-weight: bold; font-style: italic;"&gt;CamStudio 2.0&lt;/span&gt;: Open Source software that comes with Visual Studio solution, and Win32 installation package. It works very well. Can capture to .AVI, and has a tool to convert AVI file to .SWF file and a HTML template to embed the Flash file. The captured file size is big. 40 seconds capture generated 20MByte AVI file and 1.5MByte SWF file.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Links:&lt;/span&gt;&lt;br /&gt;SourceForge Host: &lt;a href="http://sourceforge.net/projects/camstudio/"&gt;http://sourceforge.net/projects/camstudio/&lt;/a&gt;&lt;a href="http://www.camstudio.org/" target="_blank"&gt;&lt;br /&gt;CamStudio - Free Streaming Video Desktop Recording Software&lt;/a&gt;: read the "Issues" section on this page. You will need to manually edit the generated HTML template in order for it to play in Firefox or Netscape.&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight: bold; font-style: italic;"&gt;Windows Media Encoder&lt;/span&gt;: Free Microsoft tool for video capture and editing. Capture result is WMV file format. File size is very small. But I recommend to use at least medium quality option which will generate a 500 KByte WMV file for 40 seconds capture.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Links:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx"&gt;http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My environment: Windows XP Professional, Dual Monitor&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-4411175751873297460?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/4411175751873297460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=4411175751873297460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4411175751873297460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/4411175751873297460'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/08/free-screen-capture-tools-for-windows.html' title='Free Screen Capture Tools for Windows'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-715881835117032121</id><published>2007-07-19T16:53:00.000-07:00</published><updated>2007-07-19T17:13:55.185-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><title type='text'>Javascript "Empty Statement"</title><content type='html'>Spot anything wrong in the Javascript below?&lt;br /&gt;&lt;pre&gt;var a=[];&lt;br /&gt;//initialize array&lt;br /&gt;for(int i = 0; i &amp;lt; 10; i++);&lt;br /&gt;{&lt;br /&gt;  a[i] = 100;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Values in array &lt;code&gt;a&lt;/code&gt; will be:&lt;br /&gt;&lt;pre&gt;[undefined, undefined, 100]&lt;/pre&gt;&lt;br /&gt;The semicolon at the end of the &lt;code&gt;for&lt;/code&gt; loop forms an "&lt;span style="font-weight: bold;"&gt;Empty Statement&lt;/span&gt;". So &lt;code&gt;a[i]=100;&lt;/code&gt; is actually outside of the &lt;code&gt;for&lt;/code&gt; loop!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-715881835117032121?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/715881835117032121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=715881835117032121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/715881835117032121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/715881835117032121'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/javascript-empty-statement.html' title='Javascript &quot;Empty Statement&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-7691575267621990879</id><published>2007-07-18T10:05:00.000-07:00</published><updated>2007-07-18T10:43:11.118-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MobileMapper CE'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows CE'/><title type='text'>Reload Magellan MobileMapper CE OS Firmware</title><content type='html'>&lt;h4&gt;Where to download MobileMapper CE OS Firmware Image&lt;/h4&gt;&lt;br /&gt;Some Magellan official documentations have this out-dated information about location of MobileMapper CE OS firmware download location: &lt;blockquote style="font-style: italic; font-family: courier new;"&gt;"The current version of MobileMapper CE Operating System (OS) firmware can be downloaded from ftp.magellangps.com in the /Mobile Mapping/MM CE/Firmware/OS Firmware/ folder."&lt;/blockquote&gt; This turned out to be out-dated information. The above directory does not exist on the FTP server. After some digging, I found the OS firmware in this zip file: &lt;a href="ftp://ftp.magellangps.com/Mobile%20Mapping/MM%20CE/Firmware/MMCE_Receiver_FW.zip"&gt;ftp://ftp.magellangps.com/Mobile%20Mapping/MM%20CE/Firmware/MMCE_Receiver_FW.zip&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Notice:&lt;/span&gt; the above FTP location is accurate as 7/18/2007, may be changed by Magellan.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;What Happened&lt;/h4&gt;&lt;br /&gt;I saw low battery warning on the device. Naturally, I select &lt;span style="font-family:courier new;"&gt;"Full Shut Down"&lt;/span&gt; to allow the system do a proper backup. This turned out to be a mistake. Apparently, battery was out before the device can fully shut-down, and the OS firmware image is corrupted. After this, upon each reboot, I am asked to calibrate stylus, then there are 2 dialogs:&lt;br /&gt;Dialog 1: dialog title: &lt;span style="font-family: courier new;"&gt;"Warning"&lt;/span&gt;, Text: &lt;span style="font-family: courier new;"&gt;"This is a Rescue Image! The&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Main Image failed to start. Press "Cancel" to Retry Main Image. Press&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;"OK" to continue with Rescue Image."&lt;/span&gt;&lt;br /&gt;After I press "&lt;span style="font-family: courier new;"&gt;OK&lt;/span&gt;" which is the only button on the dialog, I am lead to&lt;br /&gt;the second dialog:&lt;br /&gt;Dialog 2: dialog title &lt;span style="font-family: courier new;"&gt;"OS Loader"&lt;/span&gt;, Text: &lt;span style="font-family: courier new;"&gt;"Please choose a new image&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;file. The image file cannot be in the MyDevice directory."&lt;/span&gt;&lt;br /&gt;After I press &lt;span style="font-family: courier new;"&gt;"OK"&lt;/span&gt;, an &lt;span style="font-family: courier new;"&gt;"Open File"&lt;/span&gt; dialog appears with option to load a&lt;br /&gt;file type: &lt;span style="font-family: courier new;"&gt;Image Files (*.nbx).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Following the instruction in "Getting Started Guide", page 61 "Updating MobileMapper CE OS Firmware", I was able to load the OS image I downloaded from Magellan. The system seems to be back to proper working order afterwards.&lt;br /&gt;&lt;h4&gt;Lesson Learned&lt;/h4&gt;&lt;br /&gt;When you have low battery warning, rather than to risk corrupt the OS firmware image, it is probably better to wait for the battery to die out or, if possible, recharge the battery immediately.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-7691575267621990879?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/7691575267621990879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=7691575267621990879' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7691575267621990879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/7691575267621990879'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/reload-magellan-mobilemapper-ce-os.html' title='Reload Magellan MobileMapper CE OS Firmware'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-800254259733984043</id><published>2007-07-13T15:44:00.000-07:00</published><updated>2007-07-13T15:56:08.672-07:00</updated><title type='text'>Invoke CTRL-ALT-DELETE on Remote Desktop</title><content type='html'>When you are connected to other Windows computer using &lt;span style="font-weight: bold;"&gt;Remote Desktop Connection&lt;/span&gt;, the combination &lt;code style="font-weight: bold;"&gt;CTRL-ALT-DELETE&lt;/code&gt; will invoke the local computer's logon screen or task manager. Use &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;code&gt;CTRL-ALT-END&lt;/code&gt;&lt;/span&gt; to invoke it on the remote computer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-800254259733984043?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/800254259733984043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=800254259733984043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/800254259733984043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/800254259733984043'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/invoke-ctrl-alt-delete-on-remote.html' title='Invoke CTRL-ALT-DELETE on Remote Desktop'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5729558009953607260</id><published>2007-07-12T15:58:00.000-07:00</published><updated>2007-07-12T17:32:15.072-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Delay Load DLL and __HrLoadAllImportsForDll</title><content type='html'>Here are a few tips for delay loaded DLLs based on my experience with Visual Studio 2003 (Visual C++ 7.1)&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Delay load can be easily setup using the Visual Studio IDE by the following steps:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Open project property page: &lt;code&gt;Linker &gt; Input&lt;/code&gt;&lt;/li&gt;&lt;li&gt;In &lt;code&gt;Additional Dependencies&lt;/code&gt;, add library: &lt;code&gt;delayimp.lib&lt;/code&gt;;&lt;/li&gt;&lt;li&gt;In &lt;code&gt;Delay Loaded DLLs&lt;/code&gt;, add all the DLLs you want to delay load.&lt;br /&gt;&lt;em style="font-weight: bold;"&gt;TIP #1&lt;/em&gt;: if you have more than one DLLs, the file names &lt;span style="font-weight: bold;"&gt;must&lt;/span&gt; be separated by ";", e.g.: &lt;span style="font-size:180%;"&gt;&lt;code style="font-weight: bold;"&gt;rapi.dll&lt;span style="color: rgb(255, 0, 0);"&gt;;&lt;/span&gt;ceutil.dll&lt;/code&gt;&lt;/span&gt;. If you forget this, and try something like: &lt;code&gt;rapi.dll ceutil.dll&lt;/code&gt;, then the linker will treat the whole string as the file name of a single file and fail to find a file with that name. There will be a subtle warning during build: &lt;code&gt;LINK : warning LNK4199: /DELAYLOAD:rapi.dll ceutil.dll ignored; no imports found from rapi.dll ceutil.dll&lt;/code&gt;, which most likely will be ignored.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Detect if the delay loaded DLLs exists on the host computer:&lt;br /&gt;The whole purpose of delay loaded DLLs is to allow our program to be more flexible. It can be loaded on computers that do not have certain DLLs, and it can choose to use those DLLs when they are present. So, there is always a need to know if we can load the delay loaded DLLs on the host computer. &lt;code&gt;__HrLoadAllImportsForDll&lt;/code&gt; is the recommended function by MSDN documentation to do the job.&lt;br /&gt;&lt;em style="font-weight: bold;"&gt;TIP #2&lt;/em&gt;:Do not use &lt;code&gt;__HrLoadAllImportsForDll&lt;/code&gt; because it use &lt;code&gt;memcmp&lt;/code&gt; to compare DLL file names byte by byte which is too strict. File names in Windows system is not case sensitive, so the file names can be the same even if  &lt;code&gt;memcmp&lt;/code&gt; fails. This function will return &lt;code&gt;module not found&lt;/code&gt; error code even when the DLL files are installed on host computer. I end up lift the implementation from &lt;code&gt;delayhlp.cpp&lt;/code&gt;, and replace &lt;code&gt;memcmp&lt;/code&gt; with &lt;code&gt;_tcsicoll&lt;/code&gt; which is case insensitive.&lt;br /&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/13937734-5729558009953607260?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5729558009953607260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5729558009953607260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5729558009953607260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5729558009953607260'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/delay-load-dll-and-hrloadallimportsford.html' title='Delay Load DLL and __HrLoadAllImportsForDll'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-6991485311081487939</id><published>2007-07-06T16:41:00.000-07:00</published><updated>2008-12-09T11:39:23.651-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='resource'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Regular Expression Designer</title><content type='html'>Writing regular expression is always tough for me, not to mention trying to read regular expressions written by other programmers. I found this excellent &lt;span style="font-weight: bold;"&gt;FREE&lt;/span&gt; tool: &lt;a href="http://www.radsoftware.com.au/regexdesigner/"&gt;Regular Expression Designer&lt;/a&gt; provided by &lt;a href="radsoftware.com.au"&gt;radsoftware.com.au&lt;/a&gt; a Sydney based company.&lt;br /&gt;&lt;br /&gt;As you can see from the screen-shot below, it makes it very easy to experiment and visually inspect output of regular expression applied against various text input. You can try MATCH, SEARCH or REPLACE with one click. Match results are displayed in a tree format, so that you can instantly see all the matches and captured groups. An online help of regular expression language elements is provided as a quick reference.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/Ro7VdRHUTgI/AAAAAAAAAR0/R7mJTghRUzU/s1600-h/regex_designer.JPG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_C148T9ItPYw/Ro7VdRHUTgI/AAAAAAAAAR0/R7mJTghRUzU/s400/regex_designer.JPG" alt="" id="BLOGGER_PHOTO_ID_5084235728134884866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This application only runs on Windows computer with .NET Framework 1.1 or 2.0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-6991485311081487939?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/6991485311081487939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=6991485311081487939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6991485311081487939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/6991485311081487939'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/regular-expression-designer.html' title='Regular Expression Designer'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/Ro7VdRHUTgI/AAAAAAAAAR0/R7mJTghRUzU/s72-c/regex_designer.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1092270023110867572</id><published>2007-07-05T11:45:00.000-07:00</published><updated>2007-07-05T12:53:58.217-07:00</updated><title type='text'>Boost.Regex with MFC/ATL in Visual Studio 2003 or Above</title><content type='html'>&lt;style type="text/css"&gt;&lt;!-- .syntax0 { color: #000000; } .syntax1 { color: #cc0000; } .syntax2 { color: #ff8400; } .syntax3 { color: #6600cc; } .syntax4 { color: #cc6600; } .syntax5 { color: #ff0000; } .syntax6 { color: #9966ff; } .syntax7 { background: #ffffcc; color: #ff0066; } .syntax8 { color: #006699; font-weight: bold; } .syntax9 { color: #009966; font-weight: bold; } .syntax10 { color: #0099ff; font-weight: bold; } .syntax11 { color: #66ccff; font-weight: bold; } .syntax12 { color: #02b902; } .syntax13 { color: #ff00cc; } .syntax14 { color: #cc00cc; } .syntax15 { color: #9900cc; } .syntax16 { color: #6600cc; } .syntax17 { color: #0000ff; } .syntax18 { color: #000000; font-weight: bold; } .gutter { background: #dbdbdb; color: #000000; } .gutterH { background: #dbdbdb; color: #990066; } --&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;Searching, parsing, and validating text input is always a big part of contemporary programming. Regular expression is a powerful tool that is available to C#, Java, Perl, ... Unfortunately, it does not come with C++ or MFC library. One of the best regular expression library in C++ is Boost.Regex, which is accepted as part of C++ standard library in the next release of C++ standard. Boost.Regex library provides direct support for MFC/ATL string types, so that integration with MFC/ATL project is very straightforward. However, integrating BOOST library into Visual Studio 6.0 or older is very hard, due to their lack of standard C++ support.&lt;br /&gt;&lt;br /&gt;To use Boost.Regex in a MFC/ATL project in Visual Studio 2003 or above is very easy. Just follow these steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download installation package created by &lt;a href="http://boost-consulting.com/"&gt;Boost Consulting&lt;/a&gt;, following the links: &lt;span style="font-weight: bold; font-style: italic;"&gt;Products &gt; Free Downloads&lt;/span&gt;, you will find installer for latest BOOST library distribution. Just run the installer, it will automatically download the selected BOOST library source code from a and pre-compiled binaries from a mirror site;&lt;/li&gt;&lt;li&gt;Setup VC++ include and library directories for BOOST libraries, detailed instructions can be found here: &lt;a href="http://www.boost.org/more/getting_started/windows.html"&gt;BOOST--Getting Started on Windows&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;If you are like me, getting very comfortable using MFC/ATL string types like &lt;code&gt;CString, CStringW, TCHAR, _T, ...&lt;/code&gt; Please notice BOOST libraries normally only support standard string type. Please read this before you start to write code: &lt;a href="http://www.boost.org/libs/regex/doc/mfc_strings.html"&gt;Boost.Regex--Working with MFC/ATL String Types&lt;/a&gt;. Boost.Regex does provide a set of overloaded functions that use MFC/ATL types, you will need to include a header file: &amp;lt;boost\regex\mfc.hpp&amp;gt; which defines all the overloaded Boost.Regex APIs as shown in the document;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;A sample code:&lt;br /&gt;&lt;pre&gt;&lt;span class="gutter"&gt;   1:&lt;/span&gt;&lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;boost&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;regular&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;expression&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;library&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   2:&lt;/span&gt;&lt;span class="syntax9"&gt;#&lt;/span&gt;&lt;span class="syntax17"&gt;include&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;&amp;lt;boost/regex.hpp&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   3:&lt;/span&gt;&lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;support&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;for&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;MFC&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;string&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;types&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;in&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;boost&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;Regular&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;Expression&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;library&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   4:&lt;/span&gt;&lt;span class="syntax9"&gt;#&lt;/span&gt;&lt;span class="syntax17"&gt;include&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;&amp;lt;boost/regex/mfc.hpp&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;   5:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   6:&lt;/span&gt;&lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;extract&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;string&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;value&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;from&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;XML&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;by&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;given&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;key&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   7:&lt;/span&gt;&lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;Example:&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;given&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;the&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;string&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;below,&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;and&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;key="LogFile"&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   8:&lt;/span&gt;&lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;&amp;lt;add&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;key="LogFile"&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;value="c:\temp\error.txt"&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   9:&lt;/span&gt;&lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;return&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;will&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;be:&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;c:\temp\error.txt&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  10:&lt;/span&gt;CString &lt;span class="syntax6"&gt;GetXMLValue&lt;/span&gt;(LPCTSTR xmlContent, LPCTSTR key)&lt;br /&gt;&lt;span class="gutter"&gt;  11:&lt;/span&gt;&lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  12:&lt;/span&gt;    CString strRegEx;&lt;br /&gt;&lt;span class="gutter"&gt;  13:&lt;/span&gt;    strRegEx.&lt;span class="syntax6"&gt;Format&lt;/span&gt;(&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax13"&gt;&amp;lt;add\\s+key\\s*=\\s*\"%s\"\\s+value\\s*=\\s*\"([^\"]*)\"\\s*/&amp;gt;&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;, key);&lt;br /&gt;&lt;span class="gutter"&gt;  14:&lt;/span&gt;    tregex &lt;span class="syntax6"&gt;re&lt;/span&gt;(strRegEx);&lt;br /&gt;&lt;span class="gutterH"&gt;  15:&lt;/span&gt;    tmatch matches;&lt;br /&gt;&lt;span class="gutter"&gt;  16:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  17:&lt;/span&gt;    &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;we&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;are&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;expecting&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;no&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;more&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;than&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;1&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;match&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;in&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;the&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;file&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  18:&lt;/span&gt;    &lt;span class="syntax8"&gt;if&lt;/span&gt;(&lt;span class="syntax6"&gt;regex_search&lt;/span&gt;(xmlContent, matches, re))&lt;br /&gt;&lt;span class="gutter"&gt;  19:&lt;/span&gt;    &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  20:&lt;/span&gt;        &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;extract&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;the&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;value&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;from&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;sub-expression&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  21:&lt;/span&gt;        &lt;span class="syntax8"&gt;return&lt;/span&gt; &lt;span class="syntax6"&gt;CString&lt;/span&gt;(matches[&lt;span class="syntax5"&gt;1&lt;/span&gt;].first, matches[&lt;span class="syntax5"&gt;1&lt;/span&gt;].&lt;span class="syntax6"&gt;length&lt;/span&gt;());&lt;br /&gt;&lt;span class="gutter"&gt;  22:&lt;/span&gt;    &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  23:&lt;/span&gt;    &lt;span class="syntax8"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  24:&lt;/span&gt;    &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  25:&lt;/span&gt;        &lt;span class="syntax8"&gt;return&lt;/span&gt; &lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;span class="gutter"&gt;  26:&lt;/span&gt;    &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  27:&lt;/span&gt;&lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Static link to Boost.Regex library for the above sample code, adds about 80K to the compiled binary output.&lt;br /&gt;Official documentation of Boost.Regex library: &lt;a href="http://www.boost.org/libs/regex/doc/index.html"&gt;http://www.boost.org/libs/regex/doc/index.htm&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1092270023110867572?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1092270023110867572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1092270023110867572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1092270023110867572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1092270023110867572'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/boostregex-with-mfcatl-in-visual-studio.html' title='Boost.Regex with MFC/ATL in Visual Studio 2003 or Above'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5244079932878734203</id><published>2007-07-03T14:09:00.000-07:00</published><updated>2007-07-03T14:21:46.289-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RAPI'/><category scheme='http://www.blogger.com/atom/ns#' term='gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows CE'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>CeCopyFile (RAPI) Requires Both Files on Remote Device</title><content type='html'>There is no mention of this restriction in MSDN documentation, but be aware that &lt;code&gt;CeCopyFile&lt;/code&gt; requires both &lt;code&gt;lpExistingFileName&lt;/code&gt; and &lt;code&gt;lpNewFileName&lt;/code&gt; refer to files on remote device. If you want to copy files from PC to remote device or from remote device to PC, you can refer to samples: &lt;code&gt;Pget&lt;/code&gt;, and &lt;code&gt;Pput&lt;/code&gt; provided in &lt;strong&gt;Windows Mobile SDK&lt;/strong&gt; (in Mobile 5.0 SDK, the samples are under: Samples\CPP\Win32\Rapi).&lt;br /&gt;&lt;br /&gt;Definition of CeCopyFile:&lt;br /&gt;&lt;code&gt;BOOL CeCopyFile(&lt;br /&gt; LPCWSTR lpExistingFileName,&lt;br /&gt; LPCWSTR lpNewFileName,&lt;br /&gt; BOOL bFailIfExists&lt;br /&gt;); &lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5244079932878734203?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5244079932878734203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5244079932878734203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5244079932878734203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5244079932878734203'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/cecopyfile-rapi-requires-both-files-on.html' title='CeCopyFile (RAPI) Requires Both Files on Remote Device'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-3176254187940579110</id><published>2007-07-02T14:04:00.000-07:00</published><updated>2007-07-03T14:23:09.554-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>C++ Primer (Recommended Book)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Title:&lt;/span&gt; C++ Primer (I own the 3rd Edition)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Authors:&lt;/span&gt; Stanley B. Lippman, Josée Lajoie&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bottom Line:&lt;/span&gt; A keeper. Highly recommended. With its accurate and complete coverage, concise text and short code samples, this book serves as a good C++ reference book for intermediate or advanced C++ programmers. But definitely not a book for beginners.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Review:&lt;/span&gt;&lt;br /&gt;This is the 1st and the only C++ book I have. The books has been on my shelf for 6 years. I was already familiar with C++ when I bought this book, and I find this book very useful through out the years. It covers EVERY fine details of standard C++, and the information is ACCURATE and CLEAR.&lt;br /&gt;&lt;br /&gt;At first, I spent a few weeks browse through it. I found it has tremendous amount of new information for me -- an self-taught intermediate level C++ programmer.&lt;br /&gt;&lt;br /&gt;But, if you are beginner trying to learn C++ and Object-Oriented programmer, I would recommend you to find another book.For one thing, in many places, there are terms referencing concepts in future chapter that make you having to read the book in two passes to understand it. Then there are too much fine details about C++, and too little practical guides. Even if you manage to read the book, it could easily take you a full year to finish this book and emerge in all the intricacy about C++, then come out not able to write a single program. There is NO full-blown sample program, nor step by step guide to setup development environment.&lt;br /&gt;&lt;br /&gt;Due to its sheer volume and broad coverage, I didn't read the book cover to cover. Instead, I kept this book as a C++ standard reference. Whenever I have doubt, I lookup the index and read the related chapters. The books is written in concise and clear language, and has coverage of many minor details that cannot be easily find elsewhere. Having to juggle between C, C++, C#, Javascript, and SQL, I constantly need to refresh my memory about subtle C++ issues. To be honest, even if I work with C++ every day, I do not think I can master the full-depth of C++ language. C++ is a powerful language that provides many opportunities for programmers to express their ideas. This books is the perfect reference tool for me, it provides all the details about a language feature with enough details (but not too long to read) to remind me of the key points very quickly and precisely.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PS&lt;/span&gt;&lt;br /&gt;If this book is not a keeper that I feel deeply indebted to, I would not have the urge to write about it. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-3176254187940579110?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/3176254187940579110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=3176254187940579110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3176254187940579110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/3176254187940579110'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/07/c-primer-recommended-book.html' title='C++ Primer (Recommended Book)'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2610616248410582940</id><published>2007-03-29T16:50:00.000-07:00</published><updated>2007-03-29T17:30:28.315-07:00</updated><title type='text'>Escape CSV string in XSLT</title><content type='html'>&lt;style type="text/css"&gt;&lt;!-- .syntax0 { color: #000000; } .syntax1 { color: #cc0000; } .syntax2 { color: #ff8400; } .syntax3 { color: #6600cc; } .syntax4 { color: #cc6600; } .syntax5 { color: #ff0000; } .syntax6 { color: #9966ff; } .syntax7 { background: #ffffcc; color: #ff0066; } .syntax8 { color: #006699; font-weight: bold; } .syntax9 { color: #009966; font-weight: bold; } .syntax10 { color: #0099ff; font-weight: bold; } .syntax11 { color: #66ccff; font-weight: bold; } .syntax12 { color: #02b902; } .syntax13 { color: #ff00cc; } .syntax14 { color: #cc00cc; } .syntax15 { color: #9900cc; } .syntax16 { color: #6600cc; } .syntax17 { color: #0000ff; } .syntax18 { color: #000000; font-weight: bold; } .gutter { background: #dbdbdb; color: #000000; } .gutterH { background: #dbdbdb; color: #990066; } --&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;To output CSV format, we will need to escape a field if it has quote, or comma or line feed. To escape a CSV string in XSLT is not a straight forward task. After a little search I found the following solution which passed my test. The code is from a thread I found here: &lt;a href="http://www.cygwin.com/ml/xsl-list/2001-03/msg00794.html"&gt;http://www.cygwin.com/ml/xsl-list/2001-03/msg00794.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="gutter"&gt; 48:&lt;/span&gt;  &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;Sample&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;of&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;calling&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;escape&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;template&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 49:&lt;/span&gt;    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;template&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;match="&lt;/span&gt;&lt;span class="syntax18"&gt;*&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 50:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;call-template&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;display_csv_field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 51:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;with-param&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax10"&gt;myFieldToEscape&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 52:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;call-template&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 53:&lt;/span&gt;    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;template&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 54:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 55:&lt;/span&gt;  &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;Template&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;to&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;escape&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;csv&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 56:&lt;/span&gt;    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;template&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;display_csv_field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 57:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;param&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 58:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 59:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;variable&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;linefeed&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 60:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;span class="syntax15"&gt;&amp;&lt;/span&gt;&lt;span class="syntax15"&gt;#10&lt;/span&gt;&lt;span class="syntax15"&gt;;&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 61:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;variable&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 62:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 63:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;choose&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 64:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 65:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;when&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;test="&lt;/span&gt;&lt;span class="syntax6"&gt;contains&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;field&lt;/span&gt;&lt;span class="syntax18"&gt;,&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax13"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 66:&lt;/span&gt;        &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;Field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;contains&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;a&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quote&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;We&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;must&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;enclose&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;this&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;in&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quotes&lt;/span&gt;&lt;span class="syntax1"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 67:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;and&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;we&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;must&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;escape&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;each&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;of&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quotes&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;in&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;value&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 68:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 69:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;"&lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 70:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 71:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;call-template&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;escape_quotes&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 72:&lt;/span&gt;                    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;with-param&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;string&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 73:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;call-template&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 74:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 75:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;"&lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 76:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;when&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 77:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 78:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;when&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;test="&lt;/span&gt;&lt;span class="syntax6"&gt;contains&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;field&lt;/span&gt;&lt;span class="syntax18"&gt;,&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax13"&gt;,&lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax18"&gt;or&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax6"&gt;contains&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;field&lt;/span&gt;&lt;span class="syntax18"&gt;,&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;linefeed&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 79:&lt;/span&gt;        &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;Field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;contains&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;a&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;comma&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;and&lt;/span&gt;&lt;span class="syntax1"&gt;/&lt;/span&gt;&lt;span class="syntax1"&gt;or&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;a&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;linefeed&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 80:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;We&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;must&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;enclose&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;this&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;in&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quotes&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 81:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 82:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;"&lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 83:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;value-of&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 84:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;"&lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 85:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;when&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 86:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 87:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;otherwise&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 88:&lt;/span&gt;        &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;No&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;need&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;to&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;enclose&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;this&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;in&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quotes&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 89:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 90:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;value-of&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;field&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 91:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;otherwise&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 92:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 93:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;choose&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 94:&lt;/span&gt;    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;template&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt; 95:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 96:&lt;/span&gt;  &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;Helper&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;for&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;escaping&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;CSV&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;field&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 97:&lt;/span&gt;    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;template&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;escape_quotes&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 98:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;param&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;string&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt; 99:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;100:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;value-of&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax6"&gt;substring-before&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;string&lt;/span&gt;&lt;span class="syntax18"&gt;,&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax13"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;101:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;""&lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;text&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;102:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;103:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;variable&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;substring_after_first_quote&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;104:&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax6"&gt;substring-after&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;string&lt;/span&gt;&lt;span class="syntax18"&gt;,&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax13"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;105:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;106:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;choose&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;107:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;108:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;when&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;test="&lt;/span&gt;&lt;span class="syntax6"&gt;not&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax6"&gt;contains&lt;/span&gt;&lt;span class="syntax10"&gt;(&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;substring_after_first_quote&lt;/span&gt;&lt;span class="syntax18"&gt;,&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax13"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="syntax13"&gt;'&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax10"&gt; &lt;/span&gt;&lt;span class="syntax10"&gt;)&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;109:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;value-of&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;substring_after_first_quote&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;110:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;when&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;111:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;112:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;otherwise&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;113:&lt;/span&gt;        &lt;span class="syntax1"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;The&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;substring&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;after&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;first&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quote&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;contains&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;a&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quote&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;114:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;So&lt;/span&gt;&lt;span class="syntax1"&gt;,&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;we&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;call&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;ourself&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;recursively&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;to&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;escape&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quotes&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;115:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;in&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;substring&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;after&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;the&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;first&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;quote&lt;/span&gt;&lt;span class="syntax1"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;116:&lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt; &lt;/span&gt;&lt;span class="syntax1"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;117:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;118:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;call-template&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;escape_quotes&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;119:&lt;/span&gt;                    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;with-param&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;name&lt;/span&gt;&lt;span class="syntax9"&gt;=&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax10"&gt;string&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt; &lt;/span&gt;&lt;span class="syntax9"&gt;select="&lt;/span&gt;&lt;span class="syntax14"&gt;$&lt;/span&gt;&lt;span class="syntax14"&gt;substring_after_first_quote&lt;/span&gt;&lt;span class="syntax9"&gt;"&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;120:&lt;/span&gt;                &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;call-template&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;121:&lt;/span&gt;            &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;otherwise&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;122:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;123:&lt;/span&gt;        &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;choose&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;124:&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;125:&lt;/span&gt;    &lt;span class="syntax9"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax9"&gt;/&lt;/span&gt;&lt;span class="syntax12"&gt;xsl:&lt;/span&gt;&lt;span class="syntax8"&gt;template&lt;/span&gt;&lt;span class="syntax9"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;By the way, remember to set the XSLT's output like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;xsl:output method="text" encoding="iso-8859-1"&amp;gt;&lt;br /&gt;&amp;lt;/xsl:output&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Reference: &lt;a href="http://www.cygwin.com/ml/xsl-list/2001-03/msg00794.html"&gt;http://www.cygwin.com/ml/xsl-list/2001-03/msg00794.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2610616248410582940?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2610616248410582940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2610616248410582940' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2610616248410582940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2610616248410582940'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/03/escape-csv-string-in-xslt.html' title='Escape CSV string in XSLT'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-5926514162525079610</id><published>2007-03-28T17:05:00.000-07:00</published><updated>2007-03-28T17:41:56.684-07:00</updated><title type='text'>Serialization of UTC DateTime from SQL database is still awkward</title><content type='html'>&lt;style type="text/css"&gt;&lt;!-- .syntax0 { color: #000000; } .syntax1 { color: #cc0000; } .syntax2 { color: #ff8400; } .syntax3 { color: #6600cc; } .syntax4 { color: #cc6600; } .syntax5 { color: #ff0000; } .syntax6 { color: #9966ff; } .syntax7 { background: #ffffcc; color: #ff0066; } .syntax8 { color: #006699; font-weight: bold; } .syntax9 { color: #009966; font-weight: bold; } .syntax10 { color: #0099ff; font-weight: bold; } .syntax11 { color: #66ccff; font-weight: bold; } .syntax12 { color: #02b902; } .syntax13 { color: #ff00cc; } .syntax14 { color: #cc00cc; } .syntax15 { color: #9900cc; } .syntax16 { color: #6600cc; } .syntax17 { color: #0000ff; } .syntax18 { color: #000000; font-weight: bold; } .gutter { background: #dbdbdb; color: #000000; } .gutterH { background: #dbdbdb; color: #990066; } --&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;Although treatment of UTC DateTime in .NET 2.0 is significantly improved, handling data selected from SQL database is still awkward.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you try to serialize a DataSet selected freshly from SQL database, value of a DateTime column will look like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;starttime&amp;gt;2006-12-19T15:57:13-08:00&amp;lt;/starttime&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;While, I really want to see something like this:&lt;br /&gt;&lt;code&gt;&amp;lt;starttime&amp;gt;2006-12-19T15:57:13Z&amp;lt;/starttime&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This behavior is to keep compatibility with .NET 1.1. However, trying to change this default behavior is awkward. The best I can find is to change DataSet schema before rows are added (after rows are added, you can only change between "Unspecified" and "UnspecifiedLocal"). Anyway, here are a couple of lines of code that eventually helped me to get the desired output:&lt;br /&gt;&lt;pre&gt;&lt;span class="gutter"&gt;   1:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;summary&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   2:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;fills&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;the&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;dataset&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;using&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;the&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;select&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;command&lt;/span&gt;&lt;span class="syntax3"&gt;.&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   3:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;In&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;this&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;function&lt;/span&gt;&lt;span class="syntax3"&gt;,&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;we&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;assume&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;all&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;DateTime&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;in&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;database&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;is&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;UTC&lt;/span&gt;&lt;span class="syntax3"&gt;,&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;and&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;fixed&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   4:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;types&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;here&lt;/span&gt;&lt;span class="syntax3"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;   5:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;summary&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   6:&lt;/span&gt;        &lt;span class="syntax8"&gt;public&lt;/span&gt; &lt;span class="syntax10"&gt;int&lt;/span&gt; &lt;span class="syntax6"&gt;FillDataSet&lt;/span&gt;(DataSet dataSet)&lt;br /&gt;&lt;span class="gutter"&gt;   7:&lt;/span&gt;        &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   8:&lt;/span&gt;            &lt;span class="syntax10"&gt;int&lt;/span&gt; numRowAffected &lt;span class="syntax18"&gt;=&lt;/span&gt; &lt;span class="syntax5"&gt;0&lt;/span&gt;&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;   9:&lt;/span&gt;            SqlConnection connection&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  10:&lt;/span&gt;            SqlCommand command&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  11:&lt;/span&gt;            &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;code&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;to&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;initiate&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;connection,&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;command&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  12:&lt;/span&gt;          &lt;br /&gt;&lt;span class="gutter"&gt;  13:&lt;/span&gt;            connection&lt;span class="syntax18"&gt;.&lt;/span&gt;&lt;span class="syntax6"&gt;Open&lt;/span&gt;()&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  14:&lt;/span&gt;            SqlDataAdapter sqlDA &lt;span class="syntax18"&gt;=&lt;/span&gt; &lt;span class="syntax8"&gt;new&lt;/span&gt; &lt;span class="syntax6"&gt;SqlDataAdapter&lt;/span&gt;()&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  15:&lt;/span&gt;            sqlDA&lt;span class="syntax18"&gt;.&lt;/span&gt;SelectCommand &lt;span class="syntax18"&gt;=&lt;/span&gt; command&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  16:&lt;/span&gt;            sqlDA&lt;span class="syntax18"&gt;.&lt;/span&gt;MissingSchemaAction &lt;span class="syntax18"&gt;=&lt;/span&gt; MissingSchemaAction&lt;span class="syntax18"&gt;.&lt;/span&gt;AddWithKey&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  17:&lt;/span&gt;          &lt;br /&gt;&lt;span class="gutter"&gt;  18:&lt;/span&gt;            &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;a&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;detour:&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  19:&lt;/span&gt;            &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;it&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;is&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;still&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;awkward&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;to&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;serialize&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;UTC&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;DateTime&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;from&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;database.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  20:&lt;/span&gt;            &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;fix&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;DateTime&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;type,&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;assuming&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;all&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;are&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;saved&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;in&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;UTC&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;time&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  21:&lt;/span&gt;            &lt;span class="syntax2"&gt;//&lt;/span&gt;&lt;span class="syntax2"&gt;we&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;cannot&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;change&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;type&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;after&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;rows&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;are&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;added,&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;span class="syntax2"&gt;so&lt;/span&gt;&lt;span class="syntax2"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  22:&lt;/span&gt;            sqlDA&lt;span class="syntax18"&gt;.&lt;/span&gt;&lt;span class="syntax6"&gt;FillSchema&lt;/span&gt;(dataSet&lt;span class="syntax18"&gt;,&lt;/span&gt; SchemaType&lt;span class="syntax18"&gt;.&lt;/span&gt;Source)&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  23:&lt;/span&gt;            Utilities&lt;span class="syntax18"&gt;.&lt;/span&gt;&lt;span class="syntax6"&gt;SetDateTimeMode&lt;/span&gt;(dataSet&lt;span class="syntax18"&gt;,&lt;/span&gt; DataSetDateTime&lt;span class="syntax18"&gt;.&lt;/span&gt;Utc)&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  24:&lt;/span&gt;          &lt;br /&gt;&lt;span class="gutterH"&gt;  25:&lt;/span&gt;            numRowAffected &lt;span class="syntax18"&gt;=&lt;/span&gt; sqlDA&lt;span class="syntax18"&gt;.&lt;/span&gt;&lt;span class="syntax6"&gt;Fill&lt;/span&gt;(dataSet)&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  26:&lt;/span&gt;            connection&lt;span class="syntax18"&gt;.&lt;/span&gt;&lt;span class="syntax6"&gt;Close&lt;/span&gt;()&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  27:&lt;/span&gt;            &lt;span class="syntax8"&gt;return&lt;/span&gt; numRowAffected&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  28:&lt;/span&gt;        &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  29:&lt;/span&gt;      &lt;br /&gt;&lt;span class="gutterH"&gt;  30:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;summary&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  31:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;Set&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;all&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;the&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;data&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;columns&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;to&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;speicified&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;mode&lt;/span&gt;&lt;span class="syntax3"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  32:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;(&lt;/span&gt;&lt;span class="syntax3"&gt;only&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;Unspecified&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;or&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;UnspecifiedLocal&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;can&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;be&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;set&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;after&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;rows&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;are&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;added&lt;/span&gt;&lt;span class="syntax3"&gt;.&lt;/span&gt;&lt;span class="syntax3"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  33:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;summary&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  34:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;name&lt;/span&gt;&lt;span class="syntax17"&gt;=&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax13"&gt;data&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  35:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;name&lt;/span&gt;&lt;span class="syntax17"&gt;=&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax13"&gt;dtMode&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  36:&lt;/span&gt;        &lt;span class="syntax8"&gt;public&lt;/span&gt; &lt;span class="syntax8"&gt;static&lt;/span&gt; &lt;span class="syntax10"&gt;void&lt;/span&gt; &lt;span class="syntax6"&gt;SetDateTimeMode&lt;/span&gt;(DataSet data&lt;span class="syntax18"&gt;,&lt;/span&gt; DataSetDateTime dtMode)&lt;br /&gt;&lt;span class="gutter"&gt;  37:&lt;/span&gt;        &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  38:&lt;/span&gt;            &lt;span class="syntax8"&gt;foreach&lt;/span&gt; (DataTable dt &lt;span class="syntax8"&gt;in&lt;/span&gt; data&lt;span class="syntax18"&gt;.&lt;/span&gt;Tables)&lt;br /&gt;&lt;span class="gutter"&gt;  39:&lt;/span&gt;            &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  40:&lt;/span&gt;                &lt;span class="syntax6"&gt;SetDateTimeMode&lt;/span&gt;(dt&lt;span class="syntax18"&gt;,&lt;/span&gt; dtMode)&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  41:&lt;/span&gt;            &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  42:&lt;/span&gt;        &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  43:&lt;/span&gt;      &lt;br /&gt;&lt;span class="gutter"&gt;  44:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;summary&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  45:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;Set&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;all&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;the&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;data&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;columns&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;to&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;speicified&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;mode&lt;/span&gt;&lt;span class="syntax3"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  46:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;(&lt;/span&gt;&lt;span class="syntax3"&gt;only&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;Unspecified&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;or&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;UnspecifiedLocal&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;can&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;be&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;set&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;after&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;rows&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;are&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax3"&gt;added&lt;/span&gt;&lt;span class="syntax3"&gt;.&lt;/span&gt;&lt;span class="syntax3"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  47:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;summary&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  48:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;name&lt;/span&gt;&lt;span class="syntax17"&gt;=&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax13"&gt;dt&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  49:&lt;/span&gt;        &lt;span class="syntax3"&gt;///&lt;/span&gt;&lt;span class="syntax3"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt; &lt;/span&gt;&lt;span class="syntax17"&gt;name&lt;/span&gt;&lt;span class="syntax17"&gt;=&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax13"&gt;dtMode&lt;/span&gt;&lt;span class="syntax13"&gt;"&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;lt;&lt;/span&gt;&lt;span class="syntax17"&gt;/&lt;/span&gt;&lt;span class="syntax17"&gt;param&lt;/span&gt;&lt;span class="syntax17"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutterH"&gt;  50:&lt;/span&gt;        &lt;span class="syntax8"&gt;public&lt;/span&gt; &lt;span class="syntax8"&gt;static&lt;/span&gt; &lt;span class="syntax10"&gt;void&lt;/span&gt; &lt;span class="syntax6"&gt;SetDateTimeMode&lt;/span&gt;(DataTable dt&lt;span class="syntax18"&gt;,&lt;/span&gt; DataSetDateTime dtMode)&lt;br /&gt;&lt;span class="gutter"&gt;  51:&lt;/span&gt;        &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  52:&lt;/span&gt;            &lt;span class="syntax8"&gt;foreach&lt;/span&gt; (DataColumn col &lt;span class="syntax8"&gt;in&lt;/span&gt; dt&lt;span class="syntax18"&gt;.&lt;/span&gt;Columns)&lt;br /&gt;&lt;span class="gutter"&gt;  53:&lt;/span&gt;            &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  54:&lt;/span&gt;                &lt;span class="syntax8"&gt;if&lt;/span&gt; (col&lt;span class="syntax18"&gt;.&lt;/span&gt;DataType &lt;span class="syntax18"&gt;=&lt;/span&gt;&lt;span class="syntax18"&gt;=&lt;/span&gt; &lt;span class="syntax8"&gt;typeof&lt;/span&gt;(DateTime))&lt;br /&gt;&lt;span class="gutterH"&gt;  55:&lt;/span&gt;                &lt;span class="syntax18"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  56:&lt;/span&gt;                    col&lt;span class="syntax18"&gt;.&lt;/span&gt;DateTimeMode &lt;span class="syntax18"&gt;=&lt;/span&gt; dtMode&lt;span class="syntax18"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  57:&lt;/span&gt;                &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  58:&lt;/span&gt;            &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="gutter"&gt;  59:&lt;/span&gt;        &lt;span class="syntax18"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This newsgroup thread has help me develop the above strategy: &lt;a href="http://groups.google.com/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/1b40bed78d15289b?tvc=2"&gt;How do I set the DateTimeMode property when filling a DataTable.&lt;/a&gt; It is posted on &lt;a href="http://groups.google.com/group/microsoft.public.dotnet.framework.adonet/topics"&gt;microsoft.public.dotnet.framework.adonet&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-5926514162525079610?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/5926514162525079610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=5926514162525079610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5926514162525079610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/5926514162525079610'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/03/serialization-of-utc-datetime-from-sql.html' title='Serialization of UTC DateTime from SQL database is still awkward'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-9170095097511892514</id><published>2007-03-09T15:40:00.000-08:00</published><updated>2007-03-09T16:08:19.771-08:00</updated><title type='text'>Aptana Perspective Bug</title><content type='html'>I am now officially a fan of &lt;a href="http://www.aptan.org/"&gt;Aptana&lt;/a&gt;. With Visual Studio like auto-complete and helpful compatibility information popup, Aptana proved to be a powerful Javascript editor. I even tried to use Aptana HTML editor to edit Javascript embedded in .aspx files with great success.&lt;br /&gt;&lt;br /&gt;Here is a bug (or maybe I expected too much?) that caught me off-guard when I am trying to customize Eclipse perspective:&lt;br /&gt;&lt;br /&gt;After opening "Aptana" perspective, I selected menu "Window"-&gt;"Save Perspective As", and saved perspective as "My Workspace" so that I can make changes without ruining the original Aptana perspective. Then I noticed that after I restart Eclipse "Code Assist Profiles", "Outline"  and "Actions" no longer work. It took me a while to figure out the root reason is that I am not using THE "Aptana" perspective. After I select back to "Aptana" perspective, everything works again. In my opinion, this is not how perspective supposed to work. I should be able to make a copy of their perspective and add my own customizations.&lt;br /&gt;&lt;br /&gt;I have reported the bug to Aptana: &lt;a href="http://www.aptana.com/trac/ticket/3971"&gt;http://www.aptana.com/trac/ticket/3971&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-9170095097511892514?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/9170095097511892514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=9170095097511892514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9170095097511892514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9170095097511892514'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/03/aptana-perspective-bug.html' title='Aptana Perspective Bug'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-1933334011012668794</id><published>2007-03-08T11:50:00.000-08:00</published><updated>2008-12-09T11:39:24.082-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='favelet'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarklet'/><category scheme='http://www.blogger.com/atom/ns#' term='IE'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>View Generated Source in IE</title><content type='html'>I have "Web Developer" add-on for Firefox installed for a while. I love the "View Generated Source" function. Recently, I discovered an excellent way to add this functionality to IE by &lt;a href="http://en.wikipedia.org/w/index.php?title=Bookmarklet"&gt;Favelet&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/w/index.php?title=Bookmarklet"&gt;Bookmarklet&lt;/a&gt;. This approach is inspired by the reference links below. I tried 2 variations of the Favelet, and end up using the first one.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;javascript:void(window.open("javascript:'&amp;lt;xmp&amp;gt;' +&lt;br /&gt;opener.window.document.documentElement.outerHTML + '&amp;lt;/xmp&amp;gt;'"));&lt;/code&gt;&lt;br /&gt;Good: HTML source is shown in new window.&lt;br /&gt;Bad: Only works for pages served from localhost, due to IE's policy against cross domain access. However, this is not a concern for me, because the main reason I want to see "generated source" is for web development on local computer.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;javascript:document.write("&amp;lt;xmp&amp;gt;"+document.documentElement.innerHTML+&lt;br /&gt;"&amp;lt;/xmp&amp;gt;");&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To make this function easily accessible, I added it to IE bookmark "Link" folder (see screenshot below). Now, I can see the generated source (including generated HTML and Javascript) with just one click on the link named "source".&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/RfBsA89crQI/AAAAAAAAAAs/-LxBmknvwr4/s1600-h/ss.JPG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_C148T9ItPYw/RfBsA89crQI/AAAAAAAAAAs/-LxBmknvwr4/s400/ss.JPG" alt="" id="BLOGGER_PHOTO_ID_5039646746647244034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related Links:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.eggheadcafe.com/tutorials/aspnet/a4a16033-9811-45dc-8c6b-15d093c0c3ea/javascript-debugging-tool.aspx"&gt;http://www.eggheadcafe.com/tutorials/aspnet/a4a16033-9811-45dc-8c6b-15d093c0c3ea/javascript-debugging-tool.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ajaxian.com/archives/ie-tip-cheeky-way-to-see-the-current-state-of-the-page#comment-3928"&gt;http://ajaxian.com/archives/ie-tip-cheeky-way-to-see-the-current-state-of-the-page#comment-3928&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-1933334011012668794?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/1933334011012668794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=1933334011012668794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1933334011012668794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/1933334011012668794'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/03/view-generated-source-in-ie.html' title='View Generated Source in IE'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/RfBsA89crQI/AAAAAAAAAAs/-LxBmknvwr4/s72-c/ss.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-9111251289191985072</id><published>2007-03-05T12:06:00.000-08:00</published><updated>2008-12-09T11:39:24.957-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='json'/><title type='text'>JSON.JS and ASP.NET AJAX Extension</title><content type='html'>&lt;a href="http://www.json.org/js.html"&gt;JSON.JS&lt;/a&gt; was always an important part of my JavaScript library. But, after I start using ASP.NET AJAX extension, I found out that there is a conflict between JSON.JS and AJAX extension.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What is wrong:&lt;/span&gt;&lt;br /&gt;On one web page with both AJAX extension control "Accordion" and JSON.JS. I get these error message during page load:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sys.Res has no properties&lt;/li&gt;&lt;li&gt;Sys.Application  has no properties&lt;/li&gt;&lt;li&gt;Sys.UI.DomEvent  has no properties&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If I edit web.config, change &lt;span style="font-family:courier new;"&gt;debug="true"&lt;/span&gt; to &lt;span style="font-family:courier new;"&gt;debug="false"&lt;/span&gt;, these loading errors disappear. But, I found Accordion's performance is very bad. The whole page is held up for at least 10 seconds after each click.&lt;br /&gt;&lt;br /&gt;Now "Firebug" comes for the rescue. The "profile" tool in Firebug is very easy to use. It only took me 2 minutes to find out the offender. Just switch to "Console" tab, and click on "Profile", then start clicking on the page. After I am done, I click on "Profile" button again to stop profiling and see the report of activities. Not surprisingly, "toJSONString" is number 1 CPU consumer (see screen shot below). So, the conclusion is obvious, JSON.JS cannot live in the same space as AJAX extension.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/Rex-vsiNAJI/AAAAAAAAAAk/TNWNCEXSK4E/s1600-h/firebug_ss.JPG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_C148T9ItPYw/Rex-vsiNAJI/AAAAAAAAAAk/TNWNCEXSK4E/s400/firebug_ss.JPG" alt="" id="BLOGGER_PHOTO_ID_5038541440994312338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Work around:&lt;/span&gt;&lt;br /&gt;Now that AJAX extension does not like JSON.JS, and they DO have an alternative to JSON.JS. A reasonable work around is to stop using JSON.JS, and start use the functions provided in Microsoft AJAX library. So here are the alternatives: &lt;span style="font-family:courier new;"&gt;Sys.Serialization.JavaScriptSerializer.serialize&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Sys.Serialization.JavaScriptSerializer.deserialize&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;By doing this, did I fell into one of Microsoft's secret agenda?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-9111251289191985072?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/9111251289191985072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=9111251289191985072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9111251289191985072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/9111251289191985072'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/03/jsonjs-and-aspnet-ajax-extension.html' title='JSON.JS and ASP.NET AJAX Extension'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/Rex-vsiNAJI/AAAAAAAAAAk/TNWNCEXSK4E/s72-c/firebug_ss.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2586061094572186061</id><published>2007-02-21T17:27:00.000-08:00</published><updated>2008-12-09T11:39:25.404-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='aptana'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>The Best of Both Worlds (Visual Studio + Eclipse)</title><content type='html'>I use Visual Studio 6.0, 2003 and 2005  every day. But when it comes to write Javascript code, Visual Studio left a lot to be desired.&lt;br /&gt;&lt;br /&gt;The emerge of &lt;a href="http://www.aptana.com/"&gt;Aptana&lt;/a&gt; plug-in make me seriously consider install &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; on my development computer. Here is what I do to take advantage of Aptana's superior JS edit functions in my Visual Studio web project.&lt;br /&gt;1. add a simple eclipse project under my web application development folder (this will only add one file to my project: .project);&lt;br /&gt;2. associate "*.aspx" to "Aptana HTML Editor", "*.css" to "Aptana CSS Editor", "*.js" to "Aptana JS Editor";&lt;br /&gt;3. add my JS library to "Code Assistant Profiles";&lt;br /&gt;&lt;br /&gt;From now on, no matter I am writing javascript in a .js file or .aspx file, I can use Eclipse. When I am working on C# code and ASP.NET controls, I go back to VS2005.&lt;br /&gt;&lt;br /&gt;Please look at the screen-shot to see what Aptana can do: code auto-complete with documentation of parameters, tree structured outline of code file, code refactor, code snippets, to name a few. (a side note: also get "Firebug" for JS and CSS debugging in Firefox.)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/Rdz23oM5WFI/AAAAAAAAAAU/mJmoGL1Fl0s/s1600-h/eclipse.JPG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_C148T9ItPYw/Rdz23oM5WFI/AAAAAAAAAAU/mJmoGL1Fl0s/s400/eclipse.JPG" alt="" id="BLOGGER_PHOTO_ID_5034169919038117970" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_C148T9ItPYw/Rdz0loM5WEI/AAAAAAAAAAM/dVJ1P1Txfoo/s1600-h/eclipse.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2586061094572186061?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2586061094572186061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2586061094572186061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2586061094572186061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2586061094572186061'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/02/best-of-both-worlds-visual-studio.html' title='The Best of Both Worlds (Visual Studio + Eclipse)'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_C148T9ItPYw/Rdz23oM5WFI/AAAAAAAAAAU/mJmoGL1Fl0s/s72-c/eclipse.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-2486477073304648868</id><published>2007-01-30T17:23:00.000-08:00</published><updated>2007-01-30T17:40:41.857-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Nightmare</title><content type='html'>I maintain a web site that allows user to self register. I got a call from one user complaining that she got an error message: "User already exists." But, she is pretty sure there is no such user in our system.&lt;br /&gt;&lt;br /&gt;So, I open up SQL Management Studio, try to query the user table. She is right, there is no duplicated user name. I look at the stored procedure, it is very clear that it found a duplicated user name and spit out this error message. What is going on?&lt;br /&gt;&lt;br /&gt;It took me at least 20 minutes to suddenly realize that the stored procedure is wrapped in a big transaction. It is possible, a user with the same name is inserted during the transaction, before the complaining code. But, the insertion is canceled when the transaction is rolled back due to the error. I checked the stored procedure again, and did find something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;BEGIN TRAN&lt;br /&gt;insert user A&lt;br /&gt;...&lt;br /&gt;... do lot of other things&lt;br /&gt;...&lt;br /&gt;if not exists user A&lt;br /&gt;  insert user A&lt;br /&gt;  COMMIT TRAN&lt;br /&gt;else&lt;br /&gt;  @error="User already exists."&lt;br /&gt;  ROLLBACK TRAN&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Lesson learned: transactional database can be a strange beast. What you see may not be what you think it is. Be aware!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-2486477073304648868?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/2486477073304648868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=2486477073304648868' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2486477073304648868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/2486477073304648868'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/01/sql-nightmare.html' title='SQL Nightmare'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-117011016398028652</id><published>2007-01-29T14:22:00.000-08:00</published><updated>2007-01-29T23:33:06.523-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><category scheme='http://www.blogger.com/atom/ns#' term='setup'/><title type='text'>Windows Media Player Automatically Show Full-Screen on Second Monitor</title><content type='html'>I have dual monitor setup on my laptop. If I open Windows Media Player on one monitor, it will automatically show videos on the  other monitor full screen, always on top. I have no option to turn that off. This is annoying because I typically do not want to watch video full-screen. Sometimes, the little ad movie embedded on web pages will suddenly pop-out to my monitor full-screen, and I cannot close it in any way except closing the web page. To make things even worse, one of my monitor is setup to rotate 90 degrees (so that I can see more lines of code on one screen). The full-screen video will show-up on that screen in its original orientation (i.e. I have rotate my monitor back to watch it).&lt;br /&gt;&lt;br /&gt;So, I want to turn off the feature, but cannot find anything in Windows Media options. After some googling, I found out this was a problem ever since people starting to use dual monitor configurations. I finally found a solution by adjusting my video card's settings.&lt;br /&gt;&lt;a href="http://groups.google.com/group/microsoft.public.windowsmedia.player/browse_frm/thread/2c41fd0cfe87b281/1aa491098343db1e?lnk=st&amp;q=windows+media+player+dual+monitor+full+screen&amp;amp;rnum=9#1aa491098343db1e"&gt;http://groups.google.com/group/microsoft.public.windowsmedia.player/browse_frm/thread/2c41fd0cfe87b281/1aa491098343db1e?lnk=st&amp;q=windows+media+player+dual+monitor+full+screen&amp;amp;rnum=9#1aa491098343db1e&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Below is screenshot of the settings on my computer:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5502/1245/1600/889170/NvidiaSettings.jpg"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/x/blogger/5502/1245/320/510916/NvidiaSettings.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-117011016398028652?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/117011016398028652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=117011016398028652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/117011016398028652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/117011016398028652'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/01/windows-media-player-automatically.html' title='Windows Media Player Automatically Show Full-Screen on Second Monitor'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116966489766834307</id><published>2007-01-24T10:44:00.000-08:00</published><updated>2007-03-08T11:51:55.710-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='favelet'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarklet'/><category scheme='http://www.blogger.com/atom/ns#' term='link'/><title type='text'>Bookmarklet (aka Favelet)</title><content type='html'>Only recently did I notice how powerful a bookmark could be. For a nice demo of what you could accomplish, follow this link: &lt;a href="http://slayeroffice.com/tools/modi/v2.0/modi_help.html"&gt;http://slayeroffice.com/tools/modi/v2.0/modi_help.html&lt;/a&gt;. This is definitely NOT what you would expect from adding a link to bookmark. Huge javascript code can be executed on the page you are currently browsing, by clicking on the bookmark.&lt;br /&gt;&lt;br /&gt;There should be some security concerns here. To Microsoft's credit, IE7 did show me a warning dialog when I tried to add the bookmark. Although the warning message is rather vague about what is wrong. There is no warning when I add it to Firefox.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5502/1245/1600/836243/IEWarning.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/x/blogger/5502/1245/320/151051/IEWarning.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-116966489766834307?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116966489766834307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116966489766834307' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116966489766834307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116966489766834307'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/01/bookmarklet-aka-favelet.html' title='Bookmarklet (aka Favelet)'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116957956347852655</id><published>2007-01-23T11:00:00.000-08:00</published><updated>2007-01-23T11:12:48.790-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><title type='text'>ASP.NET AJAX 1.0 released</title><content type='html'>From Atlas to ASP.NET AJAX, this nice development tool is finally released, and it is free. For ASP.NET developers, this is the time to seriously check it out. It is a huge enhancement to ASP.NET in Visual Studio 2005.&lt;br /&gt;&lt;br /&gt;The official web site for this product: &lt;a href="http://ajax.asp.net/default.aspx"&gt;http://ajax.asp.net/default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also check this blog for more behind scene information: &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/01/23/asp-net-ajax-1-0-released.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/01/23/asp-net-ajax-1-0-released.aspx&lt;/a&gt;&lt;br /&gt;(Scott is a Microsoft employee. His blog is one of the few I subscribe to. It has latest news about ASP.NET, IIS, and lots of tutorials.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-116957956347852655?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116957956347852655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116957956347852655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116957956347852655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116957956347852655'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2007/01/aspnet-ajax-10-released.html' title='ASP.NET AJAX 1.0 released'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116743227268926744</id><published>2006-12-29T14:44:00.000-08:00</published><updated>2007-01-29T23:52:00.169-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work around'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Lost in Space</title><content type='html'>While using XmlSerializer in .NET 2.0, I found that spaces in my string values are lost during a round-trip of serialization and de-serialization. Looking at the serialized XML string, I can find that space is preserved during serialization. The XML looks like this:&lt;br /&gt;&lt;pre&gt;&amp;lt;Text&amp;gt; &amp;lt;/Text&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But after de-serialization the string variable &lt;code&gt;Text&lt;/code&gt; only has value &lt;code&gt;string.Empty&lt;/code&gt;. After a little research, I found that using the following code segment to de-serialize can avoid the above problem:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//variable xmlString contains the XML string to be de-serialized.&lt;br /&gt;//varialbe result of type T is to be de-serialized from the string&lt;br /&gt;T result;&lt;br /&gt;XmlSerializer s = new XmlSerializer(typeof(T));&lt;br /&gt;StringReader r = new StringReader(xmlString);&lt;br /&gt;XmlReaderSettings settings = new XmlReaderSettings();&lt;br /&gt;//white space are especially important for string types&lt;br /&gt;//if "IgnoreWhitespace" is true, a string value equal to " "&lt;br /&gt;//may be lost during serialization and deserialization.&lt;br /&gt;//the line below is the key of this posting&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;settings.IgnoreWhitespace = false;&lt;/span&gt;&lt;br /&gt;XmlReader reader = XmlReader.Create(r, settings);&lt;br /&gt;result = (T)s.Deserialize(reader);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For comparison, below is my old de-serialization code that causes lost of space:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//variable xmlString contains the XML string to be de-serialized.&lt;br /&gt;//varialbe result of type T is to be de-serialized from the string&lt;br /&gt;T result;&lt;br /&gt;XmlSerializer s = new XmlSerializer(typeof(T));&lt;br /&gt;StringReader r = new StringReader(xmlString);&lt;br /&gt;result = (T)s.Deserialize(r);&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-116743227268926744?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116743227268926744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116743227268926744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116743227268926744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116743227268926744'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2006/12/lost-in-space.html' title='Lost in Space'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116656587950314149</id><published>2006-12-19T13:56:00.000-08:00</published><updated>2006-12-19T14:04:39.886-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system administration'/><title type='text'>KB909095 Patch for Windows XP hibernate problem</title><content type='html'>Bought a new souped up computer or upgraded your computer recently. Did you notice that hibernate no longer works on your computer?&lt;br /&gt;&lt;br /&gt;That is what happened to my new DELL Precision Laptop. I get a mysterious error message: "Insufficient System Resources Exist to Complete the API." Long story short, if your computer has more than 1 GB memory, Microsoft &lt;a href="http://support.microsoft.com/kb/909095"&gt;KB909095 &lt;/a&gt;is here for the rescue. Install it, the problem goes away instantly. Does not seem to have any side effects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-116656587950314149?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116656587950314149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116656587950314149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116656587950314149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116656587950314149'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2006/12/kb909095-patch-for-windows-xp.html' title='KB909095 Patch for Windows XP hibernate problem'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116502262637454784</id><published>2006-12-01T17:13:00.000-08:00</published><updated>2006-12-01T17:23:46.626-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Bug in YUI 0.12.0 causing "secure and nonsecure items" warning in IE6</title><content type='html'>Just when I am about to have a rest after I happily cleared the "secure and nonsecure" warning in IE7. Today, I test my web application in IE6. I got the "secure and nonsecure" warning again.&lt;br /&gt;&lt;br /&gt;Here come the nightmare again, having to test your application in X different browsers on Y different Operating Systems. You fumble to fix bugs for one specific platform and seeing your fixes screwed up totally in another platform.&lt;br /&gt;&lt;br /&gt;Fortunately, this time, "&lt;a style="font-weight: bold;" href="http://www.google.com"&gt;I'm Feeling Lucky&lt;/a&gt;". I tried keyword "yui secure nonsecure" in google, and found an answer on the first page 3rd item, titled: "&lt;a href="http://www.nabble.com/Bug-in-iframe-shim-code-in-0.12.0-container.js--t2684319.html"&gt;Bug in iframe shim code in 0.12.0 container.js?&lt;/a&gt;". It is only a one line change in container.js. But, I know it could take me a couple of days to narrow down to it. Thanks to Arun, it only took me 10 minutes to fix the problem this time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-116502262637454784?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116502262637454784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116502262637454784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116502262637454784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116502262637454784'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2006/12/bug-in-yui-0120-causing-secure-and.html' title='Bug in YUI 0.12.0 causing &quot;secure and nonsecure items&quot; warning in IE6'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116492980505718876</id><published>2006-11-30T15:36:00.000-08:00</published><updated>2006-11-30T15:37:02.660-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='link'/><category scheme='http://www.blogger.com/atom/ns#' term='resource'/><title type='text'>Loading Indicator in Animated GIF</title><content type='html'>&lt;a href="http://www.ajaxload.info/"&gt;http://www.ajaxload.info/&lt;/a&gt;&lt;br /&gt;This web site provides more than 20 different styles for free (foreground and background colors are configurable).&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Very easy to use. &lt;/li&gt;&lt;li&gt;    Seems like no string attached.&lt;/li&gt;&lt;li&gt;    Nice Graphics&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/13937734-116492980505718876?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116492980505718876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116492980505718876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116492980505718876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116492980505718876'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2006/11/loading-indicator-in-animated-gif.html' title='Loading Indicator in Animated GIF'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13937734.post-116484744560468341</id><published>2006-11-29T16:37:00.000-08:00</published><updated>2006-11-29T16:44:12.510-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>IE7 Warning: "This page contains both secure and nonsecure items."</title><content type='html'>IE 7 come with much enhanced security features and tabbed viewing. But along with the enhancements, we (programmers) also see some new problems to work on. The one I will present below is especially hard, because it is not consistently repeatable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt; serving page through HTTPS, IE7 shows the warning: "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?".&lt;br /&gt;&lt;br /&gt;According to &lt;span style="font-style: italic;"&gt;past &lt;/span&gt;experience, there are 2 main reasons for this warning:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;There are content on the web page from non-secure source. You should remove any link to nonsecure content in order to get rid of this warning;&lt;/li&gt;&lt;li&gt;An "IFrame" does not specify source, or specify "about:blank" as the source. IE consider this as nonsecure. You have to point the IFrame to "Javascript:false" to make IE happy;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;But the one I am facing has a new twist: the warning does not show up consistently. If I refresh the page by pressing "F5", only 2 out of 10 times, I get the warning.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Findings&lt;/span&gt;:&lt;br /&gt;After some painful experiments, I found that the the source of the problem came from my use of YUI panel. I added a background image to the panel like this:&lt;br /&gt;&lt;pre&gt;&amp;lt;div class="bd" style="background-image: url(images/back.gif);"&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;Guess what, this combined with JavaScript in YUI constitutes the new offense for IE7. According to  MSDN Knowledge Base, Article 925014 , using "removeChild()" method to delete a DIV element that references a background image is considered "nonsecure itme". I suppose somewhere in YUI library my DIV is detached and wrapped into something else than attached to the HTML document again.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution&lt;/span&gt;:&lt;br /&gt;There are 2 workarounds recommended in MSDN KB 925014. The second method meets my need very well. I just moved the specification of background image to CSS. This seems to solve the problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;More&lt;/span&gt;:&lt;br /&gt;It still puzzles me, as why this warning only appears 2 out of 10 times. Following "Workaround" in the article did fix the warning permanently.&lt;br /&gt;&lt;br /&gt;Although I finally fixed the problem. I wish IE7 could have provided a little more hint in why it complains about the nonsecure content or the source of the nonsecure content. Better yet, IE7 should give developer's a way to see the rendered HTML content. As far as I know, the only thing I can do is to remove elements on my page one by one, until the warning is gone.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reference&lt;/span&gt;:&lt;br /&gt;MSDN KB 925014 &lt;a href="http://support.microsoft.com/kb/925014"&gt;http://support.microsoft.com/kb/925014&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13937734-116484744560468341?l=developertips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://developertips.blogspot.com/feeds/116484744560468341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13937734&amp;postID=116484744560468341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116484744560468341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13937734/posts/default/116484744560468341'/><link rel='alternate' type='text/html' href='http://developertips.blogspot.com/2006/11/ie7-warning-this-page-contains-both.html' title='IE7 Warning: &quot;This page contains both secure and nonsecure items.&quot;'/><author><name>Guogang Hu</name><uri>http://www.blogger.com/profile/00815620106700755743</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
