<?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:blogger='http://schemas.google.com/blogger/2008' 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-8964159169030549918</id><updated>2026-01-12T06:03:53.091-08:00</updated><category term="Tech"/><category term="China"/><category term="Travel"/><category term="Python"/><category term="Java"/><category term="Think"/><category term="ASP .NET"/><category term="Google Maps"/><category term="Hangzhou"/><category term="Notepad++"/><category term="Visual Studio"/><category term="Windows Vista"/><category term="Algorithms"/><category term="Beijing"/><category term="Blogger"/><category term="Command Prompt"/><category term="Excel"/><category term="Hong Kong"/><category term="JavaFX"/><category term="MS SQL"/><category term="MySQL"/><category term="Nanjing"/><category term="Outlook"/><category term="Project Euler"/><category term="Shanghai"/><category term="Suzhou"/><category term="VBA"/><category term="Windows"/><title type='text'>Tech Travel Think</title><subtitle type='html'>On info technology, gadgets, travel and thinking written from a learner&#39;s perspective.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-4778555410529939810</id><published>2011-01-19T01:43:00.000-08:00</published><updated>2011-01-19T07:24:25.198-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Outlook"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><category scheme="http://www.blogger.com/atom/ns#" term="VBA"/><title type='text'>VBA Mail Merge RTF Email using Excel and Outlook</title><content type='html'>This article describes a solution on how to use Excel to send rich text format emails that are customized for their recipients. &amp;nbsp;Some of us may find it difficult to use VBA for Outlook to format rich text in the body of an email. &amp;nbsp;The approach taken here bypasses this difficulty by creating a draft rich text format email template using Outlook&#39;s user interface instead of creating it&amp;nbsp;programmatically.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s start with an Excel spreadsheet which looks like the following figure. &amp;nbsp;There are three fields which will be used to customize each email. &amp;nbsp;Of course, the most important field is the email address itself which will be used to determine the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZS3mXMtlRNhgh5Tvd0upmzOhyTRH4hAM31S2qCyWsxgkUATnD2Ks28uCIPJdIGEXH0_P_b5ueFGc05Q_finfIrn64xYNdeBbbJ5775kP_vdKMO9TRqa5Gc4hYnqO6hf9ul-ClOReovZV7/s1600/excel.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;121&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZS3mXMtlRNhgh5Tvd0upmzOhyTRH4hAM31S2qCyWsxgkUATnD2Ks28uCIPJdIGEXH0_P_b5ueFGc05Q_finfIrn64xYNdeBbbJ5775kP_vdKMO9TRqa5Gc4hYnqO6hf9ul-ClOReovZV7/s400/excel.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Next, we suppose that the following email template have been created and saved in the &lt;b&gt;Drafts &lt;/b&gt;folder of Outlook. &amp;nbsp;The &lt;b&gt;Subject:&lt;/b&gt; must be called &quot;Template&quot; because this is the string which the macro will lookfor.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGOqFVD4Ims2OG9_jFnAeEVddWVAcqi9c8zh4DoL8loHjXagEPuFtUexo8dK3jD5pGnf83z4DoPJHHFnWepTw2vtc7JLP2xno2D0SWKDx5eSUVJP4Cm-R0gb-by3QyJ2130-3BpEnFtCwp/s1600/template.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGOqFVD4Ims2OG9_jFnAeEVddWVAcqi9c8zh4DoL8loHjXagEPuFtUexo8dK3jD5pGnf83z4DoPJHHFnWepTw2vtc7JLP2xno2D0SWKDx5eSUVJP4Cm-R0gb-by3QyJ2130-3BpEnFtCwp/s400/template.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Notice the placeholders&amp;nbsp;&lt;b&gt;{name}&lt;/b&gt; and &lt;b&gt;{number}&lt;/b&gt;. &amp;nbsp;These placeholders will be replaced by the actual values drawn from each record in the spreadsheet illustrated earlier.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s the coding part. &amp;nbsp;Let start by defining a macro to load the email template from the &lt;b&gt;Drafts &lt;/b&gt;folder in Outlook. &amp;nbsp;Basically, this macro iterates each item in the &lt;b&gt;Drafts &lt;/b&gt;folder to find the template which is the one with its subject as &quot;Template&quot;. &amp;nbsp;Line 11 is the trick to get the job done. &amp;nbsp;The formatted template is retrieved and is returned from this function hence eliminating the need to code the body of the email programmatically.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: vb; highlight: [10,11]&quot;&gt;Private Function GetRichTextTemplate() As String

    Dim OLF As Outlook.MAPIFolder
    Dim olMailItem As Outlook.MailItem
    
    Set OLF = GetObject(&quot;&quot;, &quot;Outlook.Application&quot;).GetNamespace(&quot;MAPI&quot;).GetDefaultFolder(olFolderDrafts)
    Set oItems = OLF.Items
    
    For Each Mailobject In oItems
        If Mailobject.subject = &quot;Template&quot; Then
            GetRichTextTemplate = Mailobject.HTMLBody
            Exit Function
        End If
    Next
 
End Function
&lt;/pre&gt;&lt;br /&gt;
Next, we need to define the macro &lt;b&gt;SendMailMergeEmail &lt;/b&gt;to generate the customized emails and to send them out. &amp;nbsp;There are a few things this macro do. &amp;nbsp;First, it uses the &lt;b&gt;GetRichTextTemplate &lt;/b&gt;macro to get the template from the &lt;b&gt;Drafts &lt;/b&gt;folder. &amp;nbsp;Then for each record in the spreadsheet, it will retrieve the values and place them into the placeholders. &amp;nbsp;And then, it will put in the subject and the recipient before sending out the email.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: vb&quot;&gt;Public Sub SendMailMergeEmail()
    Dim OLF As Outlook.MAPIFolder
    Dim olMailItem As Outlook.MailItem
    Dim olContact As Outlook.Recipient
    Set OLF = GetObject(&quot;&quot;, &quot;Outlook.Application&quot;).GetNamespace(&quot;MAPI&quot;).GetDefaultFolder(olFolderInbox)
    
    Dim subject As String
    subject = &quot;&lt;adv&gt; Latest Product Update&quot;
    
    Dim body As String
    Dim template As String
    template = GetRichTextTemplate()
    
    Dim cnumber As String
    Dim cname As String
    Dim email As String
    
    Dim row As Integer
    row = 2

    cnumber = Sheets(&quot;Main&quot;).Range(&quot;A&quot; &amp;amp; row)
    cname = Sheets(&quot;Main&quot;).Range(&quot;B&quot; &amp;amp; row)
    email = Sheets(&quot;Main&quot;).Range(&quot;C&quot; &amp;amp; row)
    While cnumber &amp;lt;&amp;gt; &quot;&quot;
        Set olMailItem = OLF.Items.Add
        With olMailItem
            Set olContact = .Recipients.Add(email)
            olContact.Resolve
            
            .subject = subject
            .BodyFormat = olFormatRichText

            body = Replace(template, &quot;{name}&quot;, cname)
            body = Replace(body, &quot;{number}&quot;, cnumber)
            .HTMLBody = body
            
            .Send    
        End With

        row = row + 1
        cnumber = Sheets(&quot;Main&quot;).Range(&quot;A&quot; &amp;amp; row)
        cname = Sheets(&quot;Main&quot;).Range(&quot;B&quot; &amp;amp; row)
        email = Sheets(&quot;Main&quot;).Range(&quot;C&quot; &amp;amp; row)
    Wend
    
    Set olContact = Nothing
    Set olMailItem = Nothing
    Set OLF = Nothing
End Sub
&lt;/adv&gt;&lt;/pre&gt;&lt;br /&gt;
One more thing. &amp;nbsp;For the codes above to run, the reference for &lt;b&gt;Microsoft Outlook 14.0 Object Library&lt;/b&gt; has to be set. &amp;nbsp;If you are not using the latest Office 2010, you could select&lt;b&gt; Microsoft Outlook Object 12.0 Library&lt;/b&gt; for Office 2007.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcwXh6oBIlehgsvbb1U2veXebGckpt7RR-oInWCAh0DJD0R0vvGT3HHMFkrJEJSEA5MW7V7YxcLf_6OrnJdY1NxbSusWZwJo_ZYi9VDVVgcStXwAGiyQmSjErF9dEdUHa5vf5SPLtqvnE/s1600/outlookref.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcwXh6oBIlehgsvbb1U2veXebGckpt7RR-oInWCAh0DJD0R0vvGT3HHMFkrJEJSEA5MW7V7YxcLf_6OrnJdY1NxbSusWZwJo_ZYi9VDVVgcStXwAGiyQmSjErF9dEdUHa5vf5SPLtqvnE/s400/outlookref.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The above dialog box can be accessed from the Excel VBA Window under &lt;b&gt;Tools...References&lt;/b&gt;. &amp;nbsp;After adding the reference, you are now ready to execute&amp;nbsp;the macro &lt;b&gt;SendMailMergeEmail &lt;/b&gt;to send customised rich text emails. &amp;nbsp;Here is a sample of the generated email that was sent.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI8cpybmokUxMO46IzsWVWd1u52rYGPEgnmCqaa9-lVPksjFnKdKw-d0FdxNOnW0lJKzN8KmFcC4lNK0aunyMOYhlT3aXguTODEMhcmPGVnefHN1j-YBsK9JI-IEs77nt7mwkV7vkzB2i-/s1600/email.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;245&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI8cpybmokUxMO46IzsWVWd1u52rYGPEgnmCqaa9-lVPksjFnKdKw-d0FdxNOnW0lJKzN8KmFcC4lNK0aunyMOYhlT3aXguTODEMhcmPGVnefHN1j-YBsK9JI-IEs77nt7mwkV7vkzB2i-/s400/email.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can see that the number, customer name and email have been mail-merged into the template. &amp;nbsp;By the way, you can find all sent emails in the Outlook&#39;s &lt;b&gt;Sent Items&lt;/b&gt; folder. &lt;br /&gt;
&lt;br /&gt;
The codes have been tested using Excel and Outlook 2010. &amp;nbsp;You can download the Excel File here. &amp;nbsp;Hope you have enjoyed this post and find the example useful.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/4778555410529939810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2011/01/mail-merge-rtf-email-using-excel-and.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/4778555410529939810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/4778555410529939810'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2011/01/mail-merge-rtf-email-using-excel-and.html' title='VBA Mail Merge RTF Email using Excel and Outlook'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZS3mXMtlRNhgh5Tvd0upmzOhyTRH4hAM31S2qCyWsxgkUATnD2Ks28uCIPJdIGEXH0_P_b5ueFGc05Q_finfIrn64xYNdeBbbJ5775kP_vdKMO9TRqa5Gc4hYnqO6hf9ul-ClOReovZV7/s72-c/excel.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-141028308330590628</id><published>2011-01-14T22:27:00.000-08:00</published><updated>2011-01-24T19:16:58.024-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Think"/><title type='text'>Ally Bank&#39;s Advertisements</title><content type='html'>The remarkable thing about these advertisements is the use of a kid&#39;s innocence to get a message across powerfully in a revolutionary way.  Watch closely the expressions of these kids.  See their surprise, unbelief, frustration, protest and resentment.  Enjoy.  Remember to poll for your favourite Ally&#39;s advertisement in the right panel on the side bar.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;gallery&quot;&gt;&lt;ul class=&quot;gallery&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=7qb0vquRcys&quot; id=&quot;video1&quot; rel=&quot;prettyPhoto[ally]&quot; title=&quot;Fake Pony&quot;&gt;&lt;img alt=&quot;Pony&quot; height=&quot;60&quot; src=&quot;http://i4.ytimg.com/vi/7qb0vquRcys/default.jpg&quot; width=&quot;60&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=suBGbef5p3g&quot; id=&quot;video2&quot; rel=&quot;prettyPhoto[ally]&quot; title=&quot;Constraint Bike&quot;&gt;&lt;img alt=&quot;Bike&quot; height=&quot;60&quot; src=&quot;http://i4.ytimg.com/vi/suBGbef5p3g/default.jpg&quot; width=&quot;60&quot;/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=nKdIKP1arF0&quot; id=&quot;video3&quot; rel=&quot;prettyPhoto[ally]&quot; title=&quot;Paper Truck&quot;&gt;&lt;img alt=&quot;Truck&quot; height=&quot;60&quot; src=&quot;http://i3.ytimg.com/vi/nKdIKP1arF0/default.jpg&quot; width=&quot;60&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=QgdTymCZowU&quot; id=&quot;video4&quot; rel=&quot;prettyPhoto[ally]&quot; title=&quot;Stolen Eggs&quot;&gt;&lt;img alt=&quot;Egg&quot; height=&quot;60&quot; src=&quot;http://i2.ytimg.com/vi/QgdTymCZowU/default.jpg&quot; width=&quot;60&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=yl67TNDW-0Q&quot; id=&quot;video5&quot; rel=&quot;prettyPhoto[ally]&quot; title=&quot;Ice Cream&quot;&gt;&lt;img alt=&quot;Ice Cream&quot; height=&quot;60&quot; src=&quot;http://i2.ytimg.com/vi/yl67TNDW-0Q/default.jpg&quot; width=&quot;60&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=1caAJ5CfU2g&quot; id=&quot;video6&quot; rel=&quot;prettyPhoto[ally]&quot; title=&quot;Automated Doll&quot;&gt;&lt;img alt=&quot;Doll&quot; height=&quot;60&quot; src=&quot;http://i2.ytimg.com/vi/5w3Ie1XLUis/default.jpg&quot; width=&quot;60&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  $(&quot;a[rel^=&#39;prettyPhoto&#39;]&quot;).prettyPhoto({
     theme: &#39;light_square&#39;
  });
//  $(&quot;ul.gallery&quot;).prettyGallery({
//    itemsPerPage : 7,
//    animationSpeed : &#39;normal&#39;, /* fast/normal/slow */
//    navigation : &#39;both&#39;,       /* top/bottom/both */
//    of_label: &#39; of &#39;,          /* The content in the page &quot;1 of 2&quot; */
//    previous_title_label: &#39;Previous page&#39;, /* The title of the previous link */
//    next_title_label: &#39;Next page&#39;,         /* The title of the next link */
//    previous_label: &#39;Previous&#39;, /* The content of the previous link */
//    next_label: &#39;Next&#39;          /* The content of the next link */
//  });

&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/141028308330590628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2011/01/ally-banks-advertisements.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/141028308330590628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/141028308330590628'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2011/01/ally-banks-advertisements.html' title='Ally Bank&#39;s Advertisements'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-1036126810716342324</id><published>2011-01-13T19:22:00.000-08:00</published><updated>2011-01-17T17:24:01.848-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><title type='text'>Google Maps in China</title><content type='html'>This is my first post in this blog using Google Maps.  Also to highlight in China, to be more precise in Beijing, there is a offset of 265 meters between the map and satellite views.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;350&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://maps.google.com/maps/ms?hl=en&amp;amp;ie=UTF8&amp;amp;msa=0&amp;amp;msid=208306190286317587307.000499c5bb7b194f75b77&amp;amp;ll=39.909835,116.401563&amp;amp;spn=0.011423,0.018239&amp;amp;z=15&amp;amp;output=embed&quot; width=&quot;425&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
To see the actual difference, click on the Map view and the Satellite view.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/1036126810716342324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2011/01/google-maps-in-china.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1036126810716342324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1036126810716342324'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2011/01/google-maps-in-china.html' title='Google Maps in China'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-1158049599204634956</id><published>2010-12-17T17:17:00.000-08:00</published><updated>2011-01-13T17:18:51.921-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Think"/><title type='text'>Sudoku Game implemented in Java</title><content type='html'>&lt;script src=&quot;http://www.java.com/js/deployJava.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;script&gt;
    var attributes = {codebase:&#39;http://210.23.9.90/StartClass/Sudoku&#39;,
                      code:&#39;SudokuApp.class&#39;,
                      archive:&#39;sudoku.jar&#39;,
                      width:480, height:550} ;
    var parameters = {fontSize:16} ;
    var version = &#39;1.6&#39; ;
    deployJava.runApplet(attributes, parameters, version);
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/1158049599204634956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/12/sudoku-game-implemented-in-java.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1158049599204634956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1158049599204634956'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/12/sudoku-game-implemented-in-java.html' title='Sudoku Game implemented in Java'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-6135494802460382840</id><published>2010-12-02T22:18:00.000-08:00</published><updated>2011-01-15T21:01:22.591-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Notepad++"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Euler"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Think"/><title type='text'>Project Euler, Python and Notepad++</title><content type='html'>I have taken an interest in Project Euler lately.  This project presents a series of challenging mathematical or computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.  &lt;br /&gt;
&lt;br /&gt;
The next thing for me to consider was what is the programming language to use.  I thought of C# initially but soon change my mind because it is too heavy weight.  I decide to use something light weight and dynamic.  With a desire to learn something new, I have made Python to be my choice.&lt;br /&gt;
&lt;br /&gt;
Lately I have also upgraded my Notepad++ to 5.8.5.  After the update, I looked at what are the latest plugins I could add on.  I have found the Python Script plugin.  To my delight, Python  was also installed together with this plugin in my Notepad++ folder.  So I got Python for free.  &lt;br /&gt;
&lt;br /&gt;
Next I have to figure out how to use this plugin.  Actually, this plugin is not for general Python application development, it is more for Notepad++ automation using Python scripting.  First and foremost, the Python Console is very important.  To open the Python Console, click [Plugins], [Python Script] and [Show Console] as illustrated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeH3Sb7eCS1PgT2BY_fK64meq_ejSs-pJEarvJ53OGnDMtJCC-OOUuCF7z5GElmVpEevrN5f3N8T0PZvQswo83WY7fq7xCwcPMUZh3CxZzJlafgjfp9nYDxuwhGFbGB2T-HzFbss6Ozj8T/s1600/PythonScriptShowConsole.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeH3Sb7eCS1PgT2BY_fK64meq_ejSs-pJEarvJ53OGnDMtJCC-OOUuCF7z5GElmVpEevrN5f3N8T0PZvQswo83WY7fq7xCwcPMUZh3CxZzJlafgjfp9nYDxuwhGFbGB2T-HzFbss6Ozj8T/s400/PythonScriptShowConsole.GIF&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;You can see from the above screen shot that it was Python 2.6.5.  There are quite a few methods to run a Python script from the [Run] menu but what I am going to present here is a different method, running the script within the Python Console.&lt;br /&gt;
&lt;br /&gt;
The Python Script plugin for Notepad++ comes with a few objects defined.  One of them is the &lt;b&gt;notepad&lt;/b&gt; object.  The method &lt;b&gt;getCurrentFilename()&lt;/b&gt; returns the full path name of the file being edited.  Hence, we can use the command &lt;b&gt;execfile()&lt;/b&gt; with &lt;b&gt;notepad.getCurrentFilename()&lt;/b&gt; to accomplish what we want.  In summary, enter the following command.&lt;br /&gt;
&lt;pre class=&quot;brush: py&quot;&gt;execfile(notepad.getCurrentFilename())
&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisZGWoiml3aCqxB4rQ7GeQ_E4EeMkAERQi58CWWv4yxqCPrqjtRPrvZzY_ZWxnTzdWA21Fa0puo53coF2-jBJADqVl1nDYmUA_uSh2OAt9RQrIERRxEAERCat8k4Ek95LcantOO8TdhWMG/s1600/PythonScriptRun.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisZGWoiml3aCqxB4rQ7GeQ_E4EeMkAERQi58CWWv4yxqCPrqjtRPrvZzY_ZWxnTzdWA21Fa0puo53coF2-jBJADqVl1nDYmUA_uSh2OAt9RQrIERRxEAERCat8k4Ek95LcantOO8TdhWMG/s400/PythonScriptRun.GIF&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;You only need to key in the command once.  After this, you use the [Up Arrow] key to retrieve the previous command for execution.&lt;br /&gt;
&lt;br /&gt;
The following is three solutions which I have come up for Problem 1.&lt;br /&gt;
&lt;pre class=&quot;brush: py&quot;&gt;# Add all the natural numbers below one thousand that are multiples of 3 or 5.

# imperative paradigm
def methodA():
    sum = 0
    for num in range(1000) :
       if num % 3 == 0 or num % 5 == 0:
          sum += num
    print sum

# pythonistic 
def methodB():
    print sum([x for x in range(1000) if x % 3 == 0 or x % 5 == 0])

# functional paradigm
def methodC():
    print sum(filter(lambda x: x % 3 == 0 or x % 5 == 0, range(1000)))
 
print &quot;This is Project Euler Problem 1&quot; 
methodA()
methodB()
methodC()
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/6135494802460382840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/12/project-euler-python-and-notepad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/6135494802460382840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/6135494802460382840'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/12/project-euler-python-and-notepad.html' title='Project Euler, Python and Notepad++'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeH3Sb7eCS1PgT2BY_fK64meq_ejSs-pJEarvJ53OGnDMtJCC-OOUuCF7z5GElmVpEevrN5f3N8T0PZvQswo83WY7fq7xCwcPMUZh3CxZzJlafgjfp9nYDxuwhGFbGB2T-HzFbss6Ozj8T/s72-c/PythonScriptShowConsole.GIF" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-8733458924830544865</id><published>2010-10-28T17:21:00.000-07:00</published><updated>2011-01-20T18:14:11.420-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><title type='text'>Bubble, Selection &amp; Insertion Sorts Demonstration</title><content type='html'>&lt;pre class=&quot;brush: java&quot;&gt;// Bubble Sort
for (int outer = a.length - 1; outer &amp;gt; 0; outer--) {
   for (int inner = 0; inner &amp;lt; outer; inner++) {
      if (a[inner] &amp;gt; a[inner + 1]) { 
         int temp = a[inner + 1];
         a[inner + 1] = a[inner];
         a[inner] = temp;
      }
   }
}
&lt;/pre&gt;&lt;pre class=&quot;brush: java&quot;&gt;// Selection Sort
for (int outer = a.length - 1; outer &amp;gt; 0; outer--) {
   int max = outer;
   for (int inner = 0; inner &amp;lt; outer; inner++) {
      if (a[inner] &amp;gt; a[max]) {
         max = inner;
      }
   }
   int temp = a[outer];
   a[outer] = a[max];
   a[max] = temp;
}
&lt;/pre&gt;&lt;pre class=&quot;brush: java&quot;&gt;// Insertion Sort
for (int outer = 1; outer &amp;lt; a.length; outer++) {
   int temp = a[outer];
   int inner = outer;
   while ((inner &amp;gt; 0) &amp;amp;&amp;amp; a[inner - 1] &amp;gt; temp) {
      a[inner] = a[inner - 1];
      inner--;
   }
   a[inner] = temp;
}
&lt;/pre&gt;&lt;script src=&quot;http://www.java.com/js/deployJava.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;script&gt;
    var attributes = {codebase:&#39;http://210.23.9.90/StartClass/SortDemo&#39;,
                      code:&#39;SortDemoApp.class&#39;,
                      archive:&#39;SortDemo.jar&#39;,
                      width:480, height:650} ;
    var parameters = {fontSize:16} ;
    var version = &#39;1.6&#39; ;
    deployJava.runApplet(attributes, parameters, version);
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/8733458924830544865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/10/bubble-selection-insertion-sorts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/8733458924830544865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/8733458924830544865'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/10/bubble-selection-insertion-sorts.html' title='Bubble, Selection &amp; Insertion Sorts Demonstration'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-3086010430730765475</id><published>2010-03-19T20:56:00.000-07:00</published><updated>2011-01-24T17:01:05.735-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Hangzhou"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>A Dive Into Hangzhou - Part 2</title><content type='html'>The original tour plan was DIY.  However, we were enticed by a 1-day package that the travel agency at Friendship Hotel was offering at RMB175 that covered a number of attractions.  Oh well, we convinced ourselves, we&#39;ve been travelling around freestyle for a number of days and are starting to get worn out.  So how about a break and let others take care of the logistics, drive us around and give a running commentary to boot? 8am to 5pm sounded like a very efficient schedule with all transport and admission taken care of -- we were sold on this proposition.&lt;br /&gt;
&lt;br /&gt;
Because of the early start time of the tour, we had a rather rushed breakfast at the revolving restaurant on top of the Friendship Hotel.  Nothing much was lost by way of the West Lake view, though, as it turned out to be an especially misty morning.  &quot;Thick mist over water&quot; is the summary. The hearty and healthy breakfast spread made us happy.  Then it&#39;s off to the day&#39;s adventure in Hangzhou!&lt;br /&gt;
&lt;br /&gt;
First stop of the itinerary was the east shore of West Lake where the tourist boat was waiting to take us to the largest island in the lake.  The jetty is near one of the top scenic/vantage areas around West Lake, called Orioles Singing in the Willows (柳浪聞鶯).  King Qian, a good king to the people and filial son to his mother, reputedly planted the willows and brought in orioles for his mother to enjoy.  Well, they are still there for the world&#39;s enjoyment today.&lt;br /&gt;
&lt;br /&gt;
&lt;ul class=&#39;gallery&#39;&gt;&lt;li&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1270085542.follow-the-leader.jpg&quot; rel=&quot;prettyPhoto&quot; title=&quot;Remembering King Qian towards the Lake&quot;&gt;&lt;br /&gt;
&lt;img src=&quot;http://images.travelpod.com/users/syeec/1.1270085542.follow-the-leader.jpg&quot; width=&quot;60&quot; height=&quot;60&quot; alt=&quot;Follow the Leader&quot;/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;&lt;br /&gt;
The boat quickly brought us to one of the islands on the lake, from which we viewed the famous 3 Pools Mirroring the Moon (三潭印月).  If you have a RMB1 note, you can see this on its back.  The guide said that once a year, at full moon in the 8th month of the lunar calendar, visitors can see 32 &quot;moons&quot; at this spot.  How?  There are 3 stone lantern-like structures rising from the lake.  Each has 5 round windows through which candlelight shines out.  When these lantern-like structures are lit once a year at Mid-Autumn, their windows glow, making 3 x 5 = 15 &quot;moons&quot;.  Their reflection in the lake adds 15 more &quot;moons&quot; to the count.  Finally, the real (full) moon in the sky and its reflection in the lake caps the count at 32!  How fascinating.  Visitors crowd the lake annually to catch this sight.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1270085542.early-birds.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1270085542.early-birds.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Another ferry conveyed our group to the next destination on the east shore -- the Yue Fei Mausoleum.  This is the burial place of the Southern Song dynasty general famed for his loyalty to his country.  The well known Chinese song &quot;Man Jiang Hong&quot; was composed by him in captivity.  Ironically, it was not the enemy who landed him in prison.  Corrupt court officials and emperor Gaozong, whom he served, were responsible for the wicked deed.  He died a prisoner, falsely accused of treason, in his own country.  Centuries later, people still throng his mausoleum in admiration of a dynasty&#39;s hero.  Tour guides still tell the story of national governance gone very wrong.  But visitors are now discouraged from spitting on the iron statues of his betrayers kneeling across his tomb.&lt;br /&gt;
&lt;br /&gt;
The coach took us around some other tourist spots in Hangzhou, with the predictable mix of commerce with strident promotions of Hangzhou silk and West Lake green tea.  It was said that the cheongsams worn by the lady presenters at the Beijing Olympics were Hangzhou silk and Suzhou embroidery.  And Hangzhou West Lake Dragon&#39;s Well green tea is reputedly one of the very highest grade of tea in China.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1270085542.1_west-lake.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1270085542.1_west-lake.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
We ended a long day with dinner at a local restaurant near the lake.  The concept is quite novel.  We pay for food tickets first at a counter near the entrance and use these to make food and beverage purchases from different counters inside the restaurant.  Any remaining food tickets can be exchanged for cash back at the exit.  We tried a local dish, Cat&#39;s Ears.  No, it was not some exotic meat dish.  On the contrary, it was a tame soupy dish with flour bits shaped like tiny cat&#39;s ears (well they were small triangles with a dose of imagination) that actually tasted quite good in the cold weather.&lt;br /&gt;
&lt;br /&gt;
After dinner, it was a short trot to the musical fountain at West Lake -- gracefully choreographed water jets with lights and music earned the awws of appreciation from visitors.  In that relaxed mood, getting sprayed with water was fun for many standing there.&lt;br /&gt;
&lt;br /&gt;
For us, we were happy to see Friendship Hotel towering beyond the edge of the lake where the musical fountain was.  This meant that we were near a warm shower and comfortable bed, all of 20 minutes walk across a few streets.  We could have been faster, but my Reeboks gave up (they were eventually left behind in Shanghai).  The day&#39;s packed schedule was the final straw, I guess.  Along the way back, we saw a handicapped man writing very beautiful calligraphy on the sidewalk in chalk.  Glad he had some donations.  But it is indeed hard for him to earn his keep this way, in the dust of road traffic.  We have seen many sides of Hangzhou today.&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
  $(&quot;a[rel^=&#39;prettyPhoto&#39;]&quot;).prettyPhoto({
    theme: &#39;light_square&#39;
  });
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/3086010430730765475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/dive-into-hangzhou-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3086010430730765475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3086010430730765475'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/dive-into-hangzhou-part-2.html' title='A Dive Into Hangzhou - Part 2'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-290356697107212687</id><published>2010-03-18T05:17:00.000-07:00</published><updated>2011-01-16T20:10:02.995-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Hangzhou"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>A Dive Into Hangzhou</title><content type='html'>Hangzhou of the West Lake fame, we were finally here.  This is also the part of the journey that we especially look forward to because of the nice Friendship Hotel with good online reviews.  It took some effort dragging ourselves from our hotel room once we checked in, but out we go...&lt;br /&gt;
&lt;br /&gt;
We were two hungry and cold people trawling the streets around our hotel for dinner.  We saw some interesting things, like this typical small stall selling hot fried snacks (see pic), which the locals were buying.  Interesting because it was Taiwan snacks sold in Hangzhou.  Too tired to be adventurous, we settled for MacDonalds and were pleasantly surprised that the fish and beef in Hangzhou taste better than that back home.&lt;br /&gt;
&lt;br /&gt;
A must-do, budget permitting, for visitors to Hangzhou is to catch the Impression: West Lake show which literally takes place over the West Lake.  This we faithfully did on our first night, braving the cold.  How thoughtful, the show organisers even rented out down jackets for RMB10 each.  And even allocate the red ones for ladies and black ones for gentlemen.  Coming from Zhang Yimou the critically acclaimed Chinese director (who did the opening and closing ceremonies of the Beijing Olympics 2008), the show is, unsurprisingly, spectacular.  It&#39;s an understatement, I know.  But you just have to be there to see it.  The online clips can&#39;t give the whole experience of sitting open air at the edge of the West Lake, feeling the breeze, watching the light, sound and water play together on a natural stage as the actors do their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1268915551.hangzhou-snacks.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1268915551.hangzhou-snacks.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
What marred the show, through no fault of the show people, was a significant number of tourists who, seized with an inexplicable fear of being left behind by their tour group, started standing up and walking out in the last 5 minutes of the show.  This, of course, blocked the view of the remaining weirdos who actually wanted to finish the show.  This fear of being left behind mentality is quite chronic.  We saw it in commuters at subway stations too.  You know, those who somehow manage to barricade the entire exit for the alighting passengers and believe in different physical laws that if you block people from getting off a crowded train, you can still squeeze yourself into the train?&lt;br /&gt;
&lt;br /&gt;
But back to the main story, we had an enjoyable, albeit freezing, evening at the lake and were very happy to find a cab in those rather remote parts.  Looking forward to tomorrow!</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/290356697107212687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/dive-into-hangzhou.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/290356697107212687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/290356697107212687'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/dive-into-hangzhou.html' title='A Dive Into Hangzhou'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-1470385699746239748</id><published>2010-03-17T05:13:00.000-07:00</published><updated>2011-01-16T20:10:12.790-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Suzhou"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>A Dip Into Suzhou</title><content type='html'>We arrived in Suzhou just past 1pm and have less than 24 hours in the city.&lt;br /&gt;
&lt;br /&gt;
The first direct encounter with Suzhou took place at the railway station, where lots of transport touts, map-sellers and beggars did their thing.  We were glad that the &quot;authorised&quot; taxi queue moved fast and reached the hotel fairly quickly.&lt;br /&gt;
&lt;br /&gt;
The Humble Administrator&#39;s Garden was our main destination this time round, and even the 1 1/2 hours we had before closing time was barely enough for us walk through the expansive grounds properly.  The ticket price included an official guide who took us through the main sections of the garden by way of introduction.  Thankfully, at least we had the guide&#39;s assistance to better appreciate the place, its history, design and interesting tidbits.  A pity about the short time we had -- before coming I&#39;d envisaged sitting around at various vantage points in the garden to contemplate the pictures of nature as its previous owners did.  We&#39;d need about 3 hours to get into that kind of contemplative mood!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1268829137.humble-administrator-s-garden.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1268829137.humble-administrator-s-garden.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Then it was a quick trishaw ride to Guan Qian Jie, the main pedestrian walking street in Suzhou where Starbucks and Haagen Dazs share the street with 100-year old stores.  An evening bonus came in the form of a crepe outlet, from which I got a strawberry and banana crepe.  Somehow, all the people buying crepes were girls!?  After walking quite a while without getting a cab, we were very happy to board the right bus and stop at the right stop a stone&#39;s throw from our hotel.&lt;br /&gt;
&lt;br /&gt;
There, our quick dip into Suzhou, and we&#39;re bussing out tomorrow.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/1470385699746239748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/dip-into-suzhou.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1470385699746239748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1470385699746239748'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/dip-into-suzhou.html' title='A Dip Into Suzhou'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-3821955577005916011</id><published>2010-03-16T05:06:00.000-07:00</published><updated>2011-01-16T20:10:21.663-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Nanjing"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>First Date with Nanjing</title><content type='html'>When we arrived on Sunday night, it was cold and rainy.  By the time we boarded the train to Suzhou on Wednesday, it was a fond farewell to Nanjing.&lt;br /&gt;
&lt;br /&gt;
Since I&#39;ve missed a few days, i&#39;ll be short on words and put in some pix to tell the tale :-)&lt;br /&gt;
&lt;br /&gt;
First cold rainy night, we cabbed it to the Confucius Temple area, which has come a long (touristy) way from being an educational institution imparting Confucian teachings.  The presence of many locals as well as tourist groups led by tour guides with loudhailers at that time of day confirmed that this is a &quot;night&quot; attraction.  Interestingly, the cinema there was showing &quot;Confucius&quot; the movie starring Hong Kong star Chow Yun Fatt.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1268569926.river-by-confucius-temple-area.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1268569926.river-by-confucius-temple-area.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Monday morning was much better weather-wise.  We finally saw the sun and made our way to the Purple Mountain.  This was the last week of the International Plum Blossom Festival 2010.  It&#39;s a breath of fresh air getting to highland away from the polluted city.  However, a guide said that the plum blossom blooms were not as great this year; it rained the first two weeks of the month-long festival.  And I thought the blossoms were wonderful already!  At the Purple Mountain, one should also see the Ming Tomb of the first emperor of that dynasty and its Sacred Way (lined with stone statues of civil and warrior officials and various animals).  This was the pioneer that influenced the layout of later Ming and Qing tombs found outside Beijing.  We spent half a day there and barely visited half the attractions on Purple Mountain; one can imagine why the locals enjoy a leisurely summer day retreat to these environs.&lt;br /&gt;
&lt;br /&gt;
After much exercise on Monday, we sought some muscular reprieve at the Presidential Palace in Nanjing city on Tuesday.  The sunny weather bolstered our spirits after the wet welcome to this ancient capital to six dynasties a few days earlier.  The Presidential Palace is a place for history lovers.  It has been occupied by at least six noteworthy personages in their generation, all the way from Prince Han of the Ming dynasty, through to Sun Yat Sen, through to Chiang Kai Shek.  Sun Yat Sen is held in very high esteem here, seeing as he is the &quot;Father of modern China&quot;.  There was a nice, educational exhibition dedicated to telling his story, with photos, English captions and some artefacts.  There was more to see and savour slowly, but we had to rush through the sprawling grounds towards our next destination of the day.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1268569926.confucius-temple-area.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1268569926.confucius-temple-area.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Next after modern China history was a hark to the more distant past -- Zhonghua Gate of the Ming dynasty.  This is a huge gate set within the southern city walls, the largest of its kind in China.  In fact, during the first Ming emperor&#39;s reign, these city walls were the most extensive in the world.  There are interesting details on the design and function of the gateways, citadels and portcullises.  Were we seriously expecting muscular reprieve with this?  I thought the hike up to the Ming Tomb the day before was the most strenuous on this trip.  But the climb up the ramp to the top of the wall was another workout.  I wonder about the horses who had to carry generals in full armour up the steep incline; they must be very strong animals!</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/3821955577005916011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/first-date-with-nanjing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3821955577005916011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3821955577005916011'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/first-date-with-nanjing.html' title='First Date with Nanjing'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-3379840293328338094</id><published>2010-03-13T04:52:00.000-08:00</published><updated>2011-01-16T20:09:31.749-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Shanghai"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>Something New and Something Old in Shanghai</title><content type='html'>Finally, we are here again.  Not before a red eye flight that merits an endurance medal, but we have finally landed in Shanghai.  And made it through the metro without losing any of the three pieces of luggage despite jostling with commuters out on a Saturday morning.  And reasoned in vain with the hotel reception why we should be charged only what the agent-issued travel voucher said, and not more, for turning up early.  But, we are glad.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe frameborder=&quot;0&quot; height=&quot;350&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://maps.google.com/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=208306190286317587307.000499cdc9e57f6c1b0e5&amp;amp;ll=31.409912,120.322266&amp;amp;spn=3.253174,4.669189&amp;amp;z=7&amp;amp;output=embed&quot; width=&quot;425&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
Amazingly, despite our sleep deprivation and general fatigue on the first day, we managed to sample a taste of the old and new at two unique Shanghai spots.  (Well, not so amazingly, we ended the day with cup noodles in the hotel room because we were too tired and cold!)&lt;br /&gt;
&lt;br /&gt;
The first is a restaurant called the Red House at Central HuaiHai Road, in the heart of the French Concession Red House Restaurant.  Featured in a travel-cum-food programme on Singapore TV recently, my interest was piqued that the writer Eileen Chang and the opera singer Mei Lan Fang were associated with this historical eatery.  It is literally red on the outside, and sits along a what-i-can-imagine-to-be-lovely-leafy-boulevard-once-the-green-returns-and-the-grey-sky-turns-blue.  But today, it is cold and windy, and the bare branches look somewhat forlorn.  The Red House, too, has seen better days.  There seems to be a certain dignity in accepting that it wasn&#39;t what it used to be and bravely adapt as best as it can.  It banks on nostalgia now.  And there is a market for it, so it seems.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1269088363.red-house-restaurant.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1269088363.red-house-restaurant.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
There was a steady stream of patrons flowing in all the time we were there.  Perhaps they liked the service, as we did.  Or the ambience, as we also did.  And of course the food, it beat any Western food we had eaten in Singapore in the same price range.  If we could drift into satisfied slumber there and then, we would (well, almost did) -- but TaiKang Road beckons...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://images.travelpod.com/users/syeec/1.1269088363.1_red-house-restaurant.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://images.travelpod.com/users/syeec/1.1269088363.1_red-house-restaurant.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
There is still a working wet market at TaiKang Road in the French Concession.  Neighbour to a flourishing art district.  There are people buying and selling fresh meat, seasonal vegetables, artsy photographs and curious sculptures in one locality.  The art district itself is a maze of alleys, where converted traditional residential houses showcase artistic talent. Some turns actually lead you to the backdoor to real homes, laundry and all.  It was quite amazing that a cluster of old, weathered houses has been revived into a thriving and throbbing centre of activity.  Tellingly, both locals and tourists descend on this charming spot; friends meet for tea, shop for gifts, shutterbugs point and shoot; tourists get a bite of history and then a drink of beer.  Even getting lost in the labyrinth can be delightful.&lt;br /&gt;
&lt;br /&gt;
But then the wind chill bitterly reminded us how underdressed we wear, and it was time to head back to the hotel for shelter. Did I mention that the camera acted up like a cold car engine?  Hope the weather gets warmer.  Take care!</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/3379840293328338094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/something-new-and-something-old-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3379840293328338094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3379840293328338094'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2010/03/something-new-and-something-old-in.html' title='Something New and Something Old in Shanghai'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-7249136845002336201</id><published>2009-07-13T22:01:00.000-07:00</published><updated>2011-01-16T20:09:19.521-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Beijing"/><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>What is in a Name?</title><content type='html'>It was a spark of inspiration to try my hand at literal translation in Beijing in April 2009.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe frameborder=&quot;0&quot; height=&quot;450&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://maps.google.com/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=208306190286317587307.000499c863bbfe67454e7&amp;amp;ll=39.905391,116.406369&amp;amp;spn=0.014715,0.021458&amp;amp;z=15&amp;amp;output=embed&quot; width=&quot;500&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
We were trying to get from Point A to Point B by foot, seeing as it was the most direct route compared to taking the underground. So there&#39;s this short straight section of road (multiplied by a few times for a few turns) which should bring us happily to dinner at a modern shopping mall. However, as with most things in China, don&#39;t forget the scale of things! 2 centimeters on a map work out to a lot more steps and sweat in a sprawling metropolis like Beijing. Not that we didn&#39;t know, having trod through the Temple of Heaven grounds the day before, but here we are, too far gone to turn back to Point A, but still a long and hungry distance from Point B. But I digress...&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQSb4C-EFk8L-SYhRMAoTln8d9Lh60OGgs6CB27NqqVAys5Yky6Mo9ubpwGqr1Vkhc2N6P7u2WrEpE_HoyajZE5fa5603jTnfMyKhM2iGaDCrFJyGnUjUU2UPg4OlhKQf7vUKNdnCuOM/s1600-h/toilet.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5357867199769042690&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQSb4C-EFk8L-SYhRMAoTln8d9Lh60OGgs6CB27NqqVAys5Yky6Mo9ubpwGqr1Vkhc2N6P7u2WrEpE_HoyajZE5fa5603jTnfMyKhM2iGaDCrFJyGnUjUU2UPg4OlhKQf7vUKNdnCuOM/s320/toilet.JPG&quot; style=&quot;float: center; height: 214px; margin-bottom: 10px; margin-left: 10px; margin-right: 0pt; margin-top: 0pt; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;In the turn of a corner, we were at 正义道. All at once, we were greeted by a pretty promenade under an intricate canopy of almost bare branches. After all, spring has yet time to coax the life and colours out of these graceful trees. We were informed that this was a park. That&#39;s nice, and hey, isn&#39;t that a modern toilet smack in the centre? Solar powered, no less, and in spiffy silver. Strangely enough, without the space age looking toilet, the park would have reminded me of a similar promenade in Boston, MA, reclaimed from marshland.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaoNd7k8lTewYnQrfFVEV1TpHZEXTQPhE8SrTTlPuepaNBGRNq-r-qUxKNTRivB0_fJXZiZad-iQuCXNQTbV4OmbYrMU_ALv7x5g2kT8u5hgyotlVyung2drVvEQmHXc8kr3x1j7GAIi0/s1600-h/embassy.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5357871711067111442&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaoNd7k8lTewYnQrfFVEV1TpHZEXTQPhE8SrTTlPuepaNBGRNq-r-qUxKNTRivB0_fJXZiZad-iQuCXNQTbV4OmbYrMU_ALv7x5g2kT8u5hgyotlVyung2drVvEQmHXc8kr3x1j7GAIi0/s320/embassy.JPG&quot; style=&quot;float: center; height: 240px; margin-bottom: 10px; margin-left: 0pt; margin-right: 10px; margin-top: 0pt; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
That hunch was a hint to the history of the area. The guidebook tells us that this was formerly an embassy strip. Looking at this building, you&#39;d probably expect it to be in some Western country, well, not China in any case. But here it is, next to a futuristic looking public toilet, on 正义道 in Beijing. I realise what an accurate snapshot that was of Beijing now in all its transition and transformation, but that&#39;s not the point of this blog today :-)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8P0gu4wOsRjt3j8fSrUAce64qLBBuBm70D_v8XeSKPyVq_RSYNO-8dazVmLDDU_Nt1eoXwBj-jYAtVraZesO7sJa2yN133D1WoI51lw1bEXKNtxqW1YupoyLqmfVbRSeTgyGnfhzCW0/s1600-h/zither.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5357877883680885922&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8P0gu4wOsRjt3j8fSrUAce64qLBBuBm70D_v8XeSKPyVq_RSYNO-8dazVmLDDU_Nt1eoXwBj-jYAtVraZesO7sJa2yN133D1WoI51lw1bEXKNtxqW1YupoyLqmfVbRSeTgyGnfhzCW0/s320/zither.JPG&quot; style=&quot;float: center; height: 240px; margin-bottom: 10px; margin-left: 0pt; margin-right: 10px; margin-top: 0pt; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
正义道 literally means path of righteousness. Besides sounding a happy resonance of Psalm 23:3, it evoked some irony for an area that housed diplomats of a bygone era, all jostling for a foothold in the Middle Kingdom. Today, the place is a quiet park, a convenient connector between two main roads. Quaint statues dot the promenade. Here a sweeper girl, there a musician. Quite a different flavour from earlier times, but still, no less, 正义道.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIX9QYzQwejBek7NZi6D5IKtFVtKgNVJoy6XM8fNs4AUTZ6gOI475zq7QPJYFt7BazOLnP8sNDxPwaCIAkUQqQScAjNq7VPOTmyy8B4jEj0BcYAf4PPIOF4JB7MxT7qK_snGWknMhWMZo/s1600-h/sweeper.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5357877390301577330&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIX9QYzQwejBek7NZi6D5IKtFVtKgNVJoy6XM8fNs4AUTZ6gOI475zq7QPJYFt7BazOLnP8sNDxPwaCIAkUQqQScAjNq7VPOTmyy8B4jEj0BcYAf4PPIOF4JB7MxT7qK_snGWknMhWMZo/s320/sweeper.JPG&quot; style=&quot;float: center; height: 320px; margin-bottom: 10px; margin-left: 10px; margin-right: 0pt; margin-top: 0pt; width: 227px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I haven&#39;t told you about 望京, the City of Hope yet! The usual tourist wouldn&#39;t detour here, but this is a pleasant northeastern suburb with a sizeable Korean community and modern amenities. My Korean friends have no problems getting ingredients from home here, the City of Hope.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/7249136845002336201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/07/what-is-in-name.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/7249136845002336201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/7249136845002336201'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/07/what-is-in-name.html' title='What is in a Name?'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQSb4C-EFk8L-SYhRMAoTln8d9Lh60OGgs6CB27NqqVAys5Yky6Mo9ubpwGqr1Vkhc2N6P7u2WrEpE_HoyajZE5fa5603jTnfMyKhM2iGaDCrFJyGnUjUU2UPg4OlhKQf7vUKNdnCuOM/s72-c/toilet.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-6955476610882391385</id><published>2009-07-13T04:30:00.000-07:00</published><updated>2011-01-25T04:35:49.502-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="China"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>Beijing Cherry Blossom Festival 2009</title><content type='html'>A little heart wish was fulfilled recently at YuYuanTan Park in Beijing.&lt;br /&gt;
&lt;br /&gt;
To set eyes on transient beauty, lay hold of fleeting spring, feel time brush langorously past as lithe willows sway, enjoy the translucent canopy of paper thin blooms overhead... flitting, flying, falling so perfectly, none out of place.&lt;br /&gt;
&lt;br /&gt;
This is the Cherry Blossom Festival 2009 in Beijing.  Weeks of anticipation turned into overwhelmed sight and a gentle heart&#39;s sigh.&lt;br /&gt;
&lt;br /&gt;
It was on the first Saturday of April 2009 that I became a privileged partaker of these beauteous blooms, a guest ushered into the magical alcove of millions of flowerheads, all singing the same springsong in the breeze.&lt;br /&gt;
&lt;br /&gt;
No matter that hundreds of local denizens were there; on the contrary they added to the authenticity of the experience.  No notion of genteel Japanese hanami here either; it was crowds of all ages, families and friends out in full force, children running, tumbling, crying.  It was a private and public enjoyment all at once.&lt;br /&gt;
&lt;br /&gt;
An outsider like me finds it most strange and a little amusing that ladies donning contemporary garb would wear wreaths of plastic cherry blossoms in their hair, not just in the park but onto the public bus outside.  A singular sighting I dismissed as a lone, high-spirited young lass but wandering deeper and deeper into the garden, more and more such lasses appeared before me, as in a vision!&lt;br /&gt;
&lt;br /&gt;
The girls were real all right. They were in the flush of exuberance, chatting happily with their friends or special someones, colourful crowns bobbing in the sea of heads. Here are some of them&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;gallery&quot;&gt;&lt;ul class=&quot;gallery&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu0pnPRn5gJrKXPgUGxWQjd5bqZ6FoSnIKF2qG-yvBgK_FqWRgk29A22i3v_gkrsQI_2OxFL6iUa2lnn87lmygpd8SJzXykf8zd8NnlUygP7ktGblPqb0MGiMShsH23T3FE1eLISINs4T/s1600/girl3.jpg&quot; rel=&quot;prettyPhoto[girls]&quot;&gt;&lt;img alt=&quot;Girl with Flowers&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu0pnPRn5gJrKXPgUGxWQjd5bqZ6FoSnIKF2qG-yvBgK_FqWRgk29A22i3v_gkrsQI_2OxFL6iUa2lnn87lmygpd8SJzXykf8zd8NnlUygP7ktGblPqb0MGiMShsH23T3FE1eLISINs4T/s1600/girl3.jpg&quot; width=&quot;100&quot;  /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqeX0wxeLJ9AV5GuG6FPhuaQolHGG2-SdHXbyCnoWzbMXecIzUZanHOPuHsMAclbCcT5_lEZWDGOFQllTFj_HWhgevuxGLX78Qky-lRNo6Lj7gQYSHaaFuYAJnKEvaRAKCx8CeMZs2Zn4q/s1600/girl2.jpg&quot; rel=&quot;prettyPhoto[girls]&quot;&gt;&lt;img alt=&quot;Girl with Flowers&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqeX0wxeLJ9AV5GuG6FPhuaQolHGG2-SdHXbyCnoWzbMXecIzUZanHOPuHsMAclbCcT5_lEZWDGOFQllTFj_HWhgevuxGLX78Qky-lRNo6Lj7gQYSHaaFuYAJnKEvaRAKCx8CeMZs2Zn4q/s1600/girl2.jpg&quot; width=&quot;100&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirT04iW_fRlHDnJ48kpIWld8KV_ocFLAac6l9or7Nzxj1F1nnFXoBwj9KOw6E3rvkbSV8PmuVwp8t8z6DnIpRWgTNLqcGSNul4Ja2lpm7duRUsXx5yZsYgEqQB22lQCMs6z7CUgDoQaFx-/s1600/girl1.jpg&quot; rel=&quot;prettyPhoto[girls]&quot;&gt;&lt;img alt=&quot;Girl with Flowers&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirT04iW_fRlHDnJ48kpIWld8KV_ocFLAac6l9or7Nzxj1F1nnFXoBwj9KOw6E3rvkbSV8PmuVwp8t8z6DnIpRWgTNLqcGSNul4Ja2lpm7duRUsXx5yZsYgEqQB22lQCMs6z7CUgDoQaFx-/s1600/girl1.jpg&quot; width=&quot;100&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
Then, there are the stars of the show, the gracious hosts who forebear the multitude of feet on their turf.&lt;br /&gt;
&lt;br /&gt;
We are told that there are 2000 cherry blossom trees of 20 varieties, so this is only&lt;br /&gt;
the slightest sampling of the show...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;gallery&quot;&gt;&lt;ul class=&quot;gallery&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsH8w4j4Hqd5DtyukHsGMTgdIYn57TuYjYhBeVAtjtchEs1IfIPqWdxBTsUMw5A6PnqC9N8_QPPsNaAR0wevbJ2wE6Vj94u-Q5jxQ4azLg-u8hfat7iqE1n9R9QZpD_tvy0KH5kzrW5jMh/&quot; rel=&quot;prettyPhoto[flowers]&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsH8w4j4Hqd5DtyukHsGMTgdIYn57TuYjYhBeVAtjtchEs1IfIPqWdxBTsUMw5A6PnqC9N8_QPPsNaAR0wevbJ2wE6Vj94u-Q5jxQ4azLg-u8hfat7iqE1n9R9QZpD_tvy0KH5kzrW5jMh/&quot; height=&quot;75&quot; alt=&quot;Cherry Blossoms&quot;/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht0CrmoypULe7zPFYequrHGMzVjh6_kzG6iQpx6R9CRMT-cBbqUrp4qLyN6nsvWb_Fc_0nrohEk5FZzC2iqgCF9uSz7QUrDUOnlyWUpIh2rEnHcxBqUHQRRlOdQIXCxaEXBwttLZICpY5i/&quot; rel=&quot;prettyPhoto[flowers]&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht0CrmoypULe7zPFYequrHGMzVjh6_kzG6iQpx6R9CRMT-cBbqUrp4qLyN6nsvWb_Fc_0nrohEk5FZzC2iqgCF9uSz7QUrDUOnlyWUpIh2rEnHcxBqUHQRRlOdQIXCxaEXBwttLZICpY5i/&quot; height=&quot;75&quot;  alt=&quot;Cherry Blossoms&quot;/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2lGZk5k4-cTGH0q91WrsdWm5pYWCLw0SYMQKg97ilfkEexYYJoKjuVXeumF_JoqHHaF5kJs7nGPKovmf-F8z__RP5tq5OLZ43jx-8v-cWzGCk-NvuYAHExF0dfdAHn6PIzGfYLUI1TzMH/s512/P1010245.JPG&quot; rel=&quot;prettyPhoto[flowers]&quot; title=&#39;Ying Chun Hua (literally translated as &quot;welcome-spring flower&quot;)&#39;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2lGZk5k4-cTGH0q91WrsdWm5pYWCLw0SYMQKg97ilfkEexYYJoKjuVXeumF_JoqHHaF5kJs7nGPKovmf-F8z__RP5tq5OLZ43jx-8v-cWzGCk-NvuYAHExF0dfdAHn6PIzGfYLUI1TzMH/s512/P1010245.JPG&quot; height=&quot;75&quot; alt=&quot;Winter Jasmine&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUCk5LHmyO1fUZUX6Yu8jodPFTJWT_K_tbflPMzin-LCsFTsc4v3Hfcs2VXJw-qQieZVrHf4uw5gtBId3TAuWUzmlVeLkKn0kEez5xK26-UcDOW2hyphenhyphenR0W_S7QNCS6fB-VL7G1WJZU4cJ10/&quot; rel=&quot;prettyPhoto[flowers]&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUCk5LHmyO1fUZUX6Yu8jodPFTJWT_K_tbflPMzin-LCsFTsc4v3Hfcs2VXJw-qQieZVrHf4uw5gtBId3TAuWUzmlVeLkKn0kEez5xK26-UcDOW2hyphenhyphenR0W_S7QNCS6fB-VL7G1WJZU4cJ10/&quot; height=&quot;75&quot;  alt=&quot;Cherry Blossoms&quot;/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
This is the handmaiden to the cherry blossoms, called YingChunHua (literally translated as &quot;welcome-spring flower&quot;):&lt;br /&gt;
&lt;br /&gt;
It was a hive of activity in the park: Tiny tots admiring each other all decked out... Enterprising Chinese selling all sorts of artificial flowers to the spring-inebriated crowds... In child-centric China, sweet sellers never go out of business.  Simple pleasures in life... bubbles and bunnies.  More simple pleasures in life... the humble shuttlecock!  That&#39;s the outdoor spirit... spot the &#39;gung ho&#39; baby.&lt;br /&gt;
&lt;br /&gt;
As the sun began to set and activity dropped a notch, it wasn&#39;t clear whether the multitudes were there to gaze at cherry blossoms with single-hearted devotion or to exult in the presence of spring with soaring spirits.  But surely the beauteous blossoms would have no quarrel with the latter.  Cherry blossoms and spring, why, they&#39;re the most natural bedfellows!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYufmG7HXRKPVKUnEAaxi1tiWhu3KV22jqQL20cO5oAOplfO0YgZkUXU6wGKTubuNuNLt6L7qvMCE0HVqmUJGx_oJdHRuGuRvkz-ASZzctT1DNg5KWQh_MmCKrnL-rXZgc7JzA2kPxXQs_/s1600/children1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYufmG7HXRKPVKUnEAaxi1tiWhu3KV22jqQL20cO5oAOplfO0YgZkUXU6wGKTubuNuNLt6L7qvMCE0HVqmUJGx_oJdHRuGuRvkz-ASZzctT1DNg5KWQh_MmCKrnL-rXZgc7JzA2kPxXQs_/s1600/children1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibKPQQT76ILhw2o8OeYNiLrhy0XmdhKgESDXAqML3hhrXNTCDEyUrHiG_Q8pp1kPKuwq5LFCvyTpYAXqG0BdVb-6tfEs8PyNr1ycRBMLbgeLXaQg3DjiF9o0cLr_p8uwPMjrlyB66sTUZ/s1600/children2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibKPQQT76ILhw2o8OeYNiLrhy0XmdhKgESDXAqML3hhrXNTCDEyUrHiG_Q8pp1kPKuwq5LFCvyTpYAXqG0BdVb-6tfEs8PyNr1ycRBMLbgeLXaQg3DjiF9o0cLr_p8uwPMjrlyB66sTUZ/s1600/children2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRZGlY1Vav4-TLudyxp5QNVuoPD_CUi_NJv3VxJNB3_rsC1FMKWauM56kI1ZF5dLnmoZer-A63AYV7NWgThCqufaGIYbApLnHSjGOt43OHzWGLjsxHc4iIsAKjDv6GwssvxiG6Gk3dzjMW/s1600/children3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRZGlY1Vav4-TLudyxp5QNVuoPD_CUi_NJv3VxJNB3_rsC1FMKWauM56kI1ZF5dLnmoZer-A63AYV7NWgThCqufaGIYbApLnHSjGOt43OHzWGLjsxHc4iIsAKjDv6GwssvxiG6Gk3dzjMW/s1600/children3.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvcTNUEcobGEf6YZBnn5DmmaYrvS4fmPHB2kaXifakJx7BdCEBKpiqwfKaiVZHt461pL0pZVXhDUHmCCq9CeyXQTF1gnIVwsY1RlA1-sfFhUojho5suMZipQzQf6MHuHNbETVsDIuz_ylR/s1600/crowd.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvcTNUEcobGEf6YZBnn5DmmaYrvS4fmPHB2kaXifakJx7BdCEBKpiqwfKaiVZHt461pL0pZVXhDUHmCCq9CeyXQTF1gnIVwsY1RlA1-sfFhUojho5suMZipQzQf6MHuHNbETVsDIuz_ylR/s1600/crowd.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIbtlAWd9r4yz7xvsbVN4s61fSOiCvIV4GE5Y6WSTpB-JfG6mztVJm7er05JK9TWmgIWLHvIqwaS5E8uznGcnwKx_i6gXu4UYO0X8_9oliEjAKq3v0KzDqNnGdvUMpQ-KTcaF5_seRET91/s1600/family.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIbtlAWd9r4yz7xvsbVN4s61fSOiCvIV4GE5Y6WSTpB-JfG6mztVJm7er05JK9TWmgIWLHvIqwaS5E8uznGcnwKx_i6gXu4UYO0X8_9oliEjAKq3v0KzDqNnGdvUMpQ-KTcaF5_seRET91/s1600/family.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6BXJJFtoXD4Y02YqKYbJdrsqW88sWjrFYHBpe2sEYk-URupCMffkCT4xw8R9Iqzz42YJS2dW_Yyx2W_Wi3WmmmlhswvrvbnK5VfYa3GCK30lPThMUlbEN_M86t_I4IhqP-VPEvZkWom-/s1600/street1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6BXJJFtoXD4Y02YqKYbJdrsqW88sWjrFYHBpe2sEYk-URupCMffkCT4xw8R9Iqzz42YJS2dW_Yyx2W_Wi3WmmmlhswvrvbnK5VfYa3GCK30lPThMUlbEN_M86t_I4IhqP-VPEvZkWom-/s1600/street1.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicRezBDtrbyge0syHiC3_Dn3lPBlIfgsrlU0n6JV_n_9Lug6FJk5z3uc5vLUfPL8zqssZYJeHygK9fT1bQzN-2jgWF5TST5Dyc_cvy-Boa7mnLoTvhjommvGSY28xWSr5ueEVm-Sw-oWkS/s1600/street2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicRezBDtrbyge0syHiC3_Dn3lPBlIfgsrlU0n6JV_n_9Lug6FJk5z3uc5vLUfPL8zqssZYJeHygK9fT1bQzN-2jgWF5TST5Dyc_cvy-Boa7mnLoTvhjommvGSY28xWSr5ueEVm-Sw-oWkS/s1600/street2.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLYmQMiJ2JXkAuDzfj0NDS1enRfxH1ouJPTPfmjKXx2p7hAcI_cVjwNPOjngTAQGPFDRGAIlvDp4YfLHEBaT10PXdYSBMAwIpDC_BW-TBFrsB7MYAdA4ULHZmsbWfQB831uJHXsu_rgcJ0/s1600/street3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLYmQMiJ2JXkAuDzfj0NDS1enRfxH1ouJPTPfmjKXx2p7hAcI_cVjwNPOjngTAQGPFDRGAIlvDp4YfLHEBaT10PXdYSBMAwIpDC_BW-TBFrsB7MYAdA4ULHZmsbWfQB831uJHXsu_rgcJ0/s1600/street3.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5cMmy0ufONsf_O6XKGv6wP5CANG-b3B8mifKueI4iBtIG_dFSfDwefPicVbvH872qba40V-VZj5LbVdVTx5zwUeVbidSTAHiMKbFCiD8Pp0-nfjEOlq_biwk0OilkIPKfVK_aWQ-qMcka/s1600/tent.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5cMmy0ufONsf_O6XKGv6wP5CANG-b3B8mifKueI4iBtIG_dFSfDwefPicVbvH872qba40V-VZj5LbVdVTx5zwUeVbidSTAHiMKbFCiD8Pp0-nfjEOlq_biwk0OilkIPKfVK_aWQ-qMcka/s1600/tent.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  $(&quot;a[rel^=&#39;prettyPhoto&#39;]&quot;).prettyPhoto({
     theme: &#39;light_square&#39;,
     overlay_gallery: false
  });
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/6955476610882391385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/07/beijing-cherry-blossom-festival-2009.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/6955476610882391385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/6955476610882391385'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/07/beijing-cherry-blossom-festival-2009.html' title='Beijing Cherry Blossom Festival 2009'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu0pnPRn5gJrKXPgUGxWQjd5bqZ6FoSnIKF2qG-yvBgK_FqWRgk29A22i3v_gkrsQI_2OxFL6iUa2lnn87lmygpd8SJzXykf8zd8NnlUygP7ktGblPqb0MGiMShsH23T3FE1eLISINs4T/s72-c/girl3.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-5975280947705533834</id><published>2009-06-11T20:30:00.001-07:00</published><updated>2011-01-13T04:28:42.147-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaFX"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><title type='text'>JavaFX and Google Maps</title><content type='html'>Recently, I have taken a very keen interest in JavaFX.  The declarative nature of the language and its powerful data binding capabilities, coupled with the fact that there are so many existing Java programs will accelerate its adoption very quickly.&lt;br /&gt;
&lt;br /&gt;
My exploration with JavaFX has been very fruitful.  It is really easy to pick up and to be productive with it in a matter of hours.  When I started to learn how Google Maps can be used with JavaFX, I found very little useful information in the Web.  Googling the keywords &quot;&lt;b&gt;&lt;i&gt;JavaFX Google Maps&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt;&quot; was less than satisfactory.  Then, I stumbled upon Google Maps can be used statically without Javascript.  For example, the following map on Eiffel Tower is displayed using a static html link.  Notice the latitude and longitude are specified in the URL.&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter: false;&quot;&gt;http://maps.google.com/staticmap?center=48.8531,2.3691&amp;amp;markers=48.8531,2.3691,rede&amp;amp;zoom=14&amp;amp;size=320x240
&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img alt=&quot;Paris Eiffel Tower&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5350724702499258034&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhch0GWmPijLzUcgK7Fueu5G7MC7nLCUKLC17Y8JdeBMhJRO9s78iblARnoJfIt5RRqbnD_zuqk0QToROddaoi1kAttFkPx4zBKt_mL4xpl4mHfCCEtPoR9KGIwpF8EQ_0Zwdo7RcmYdNeS/s400/eiffel.gif&quot; style=&quot;height: 240px; width: 320px;&quot; /&gt;&lt;/div&gt;It then dawned upon me how easy it is to incorporate Google Maps into JavaFX, all we need are the JavaFX &lt;b&gt;Image&lt;/b&gt; and &lt;b&gt;ImageView&lt;/b&gt; objects.  For instance, the following codes will display the above map in a JavaFX application.&lt;br /&gt;
&lt;pre class=&quot;brush: javafx&quot;&gt;def stage = Stage {
title : &quot;JavaFX Google Maps Demonstration&quot;
scene: Scene {
 width: 500
 height: 400
 content: [
   ImageView {
     image: Image {
       url: &quot;http://maps.google.com/staticmap?center=48.8531,2.3691&amp;amp;markers=48.8531,2.3691,rede&amp;amp;zoom=12&amp;amp;size=320x240&quot;
     }
   }
 ]
}
}
&lt;/pre&gt;Next, I discovered the use of Google Geocoding web service.  Given an address, you can get the latitude and longitude of that address.  For example, to find the latitude and longitude of &lt;b&gt;New York USA&lt;/b&gt;, enter the following url.&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter: false;&quot;&gt;http://maps.google.com/maps/geo?q=NEW+YORK+USA&amp;amp;output=xml
&lt;/pre&gt;The Google Geocoding web service will return the following XML. Notice the latitude and longitude of New York, USA are returned in the coordinates element in line 25.&lt;br /&gt;
&lt;pre class=&quot;brush: xml; highlight: [25];&quot;&gt;&lt;kml xmlns=&quot;http://earth.google.com/kml/2.0&quot;&gt;
  &lt;response&gt;
    &lt;name&gt;NEW YORK USA&lt;/name&gt;
    &lt;status&gt;
      &lt;code&gt;200&lt;/code&gt;
      &lt;request&gt;geocode&lt;/request&gt;
    &lt;/status&gt;
    &lt;placemark id=&quot;p1&quot;&gt;
      &lt;address&gt;New York, NY, USA&lt;/address&gt;&lt;addressdetails accuracy=&quot;4&quot; xmlns=&quot;urn:oasis:names:tc:ciq:xsdschema:xAL:2.0&quot;&gt;
        &lt;country&gt;
          &lt;countrynamecode&gt;US&lt;/countrynamecode&gt;
          &lt;countryname&gt;USA&lt;/countryname&gt;
          &lt;administrativearea&gt;
            &lt;administrativeareaname&gt;NY&lt;/administrativeareaname&gt;
            &lt;locality&gt;
              &lt;localityname&gt;New York&lt;/localityname&gt;
            &lt;/locality&gt;
          &lt;/administrativearea&gt;
        &lt;/country&gt;
      &lt;/addressdetails&gt;
      &lt;extendeddata&gt;
        &lt;latlonbox east=&quot;-73.6997930&quot; north=&quot;40.9174990&quot; south=&quot;40.4773830&quot; west=&quot;-74.2590900&quot;&gt;&lt;/latlonbox&gt;
      &lt;/extendeddata&gt;
      &lt;point&gt;
        &lt;coordinates&gt;-73.9869510,40.7560540,0&lt;/coordinates&gt;
      &lt;/point&gt;
    &lt;/placemark&gt;
  &lt;/response&gt;
&lt;/kml&gt;&lt;/pre&gt;&lt;br /&gt;
Hence, using static Google Maps and GeoCoding web service, I ventured to develop this demonstration application using the latest JavaFX 1.2.  A screen shot of the application is given here.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0sU3fJG2BX07kcq4dRhyJ3ldC3trm-MfwIi1n3uNLR5xL1hwiYpvoo5RVW31PsuLujJDWT-aPrCFSvamFRpvQix23EH1QDI8Grdmtw2xWOE5pv4z8lehb0fmZlXOLSBR42fsN4tie3yR-/s1600-h/JavaFXGoogleMap.gif&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5346309283759604594&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0sU3fJG2BX07kcq4dRhyJ3ldC3trm-MfwIi1n3uNLR5xL1hwiYpvoo5RVW31PsuLujJDWT-aPrCFSvamFRpvQix23EH1QDI8Grdmtw2xWOE5pv4z8lehb0fmZlXOLSBR42fsN4tie3yR-/s400/JavaFXGoogleMap.gif&quot; style=&quot;cursor: pointer; height: 338px; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This simple application allows the user to enter an address.  If Google recognises it, the map of the address will be shown.  The user can also pan the map by dragging the mouse or zoom in and out of the map using the slider.  The application comprises three files &lt;b&gt;Main.fx&lt;/b&gt;, &lt;b&gt;GMapUtils.fx&lt;/b&gt; and &lt;b&gt;GmapGeoCoding.fx&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Click on the Launch button to try the application.&lt;br /&gt;
&lt;script src=&quot;http://java.com/js/deployJava.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script&gt;
  var url = &quot;http://210.23.9.90/StartClass/JavaFX/JavaFXGoogleMaps.jnlp&quot;;
  deployJava.createWebStartLaunchButton(url, &#39;1.6.0&#39;);
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
The full source codes of these three files are given as follows.&lt;br /&gt;
&lt;pre class=&quot;brush: javafx;&quot;&gt;// Main.fx
package jfxgm;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.Cursor;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;
import javafx.scene.input.MouseEvent;
import javafx.scene.control.TextBox;
import javafx.scene.control.Label;
import javafx.scene.control.Button;
import javafx.scene.control.Slider;

var lng:Number = 103.8476410;
var lat:Number = 1.3717300;
var zoom:Integer = bind javafx.util.Math.round(sZoom.value);

bound function getMapImage(lt, lg, zm):Image {
  var mapurl:String = &quot;http://maps.google.com/staticmap?center={lt},{lg}&amp;amp;markers={lt},{lg},reda&amp;amp;zoom={zm}&amp;amp;size=480x320&quot;;
  var map:Image = Image {
    url: mapurl;
  }
return map;
}

function setLatLng(lt:Number, lg:Number):Void {
  lat = lt;
  lng = lg;
}

var mapview:ImageView = ImageView {
  layoutX:10 layoutY:75;
  image: bind getMapImage(lat, lng, zoom);
  cursor : Cursor.MOVE;
  var anchorx:Number;
  var anchory:Number;
  onMousePressed: function( e: MouseEvent ):Void {
    anchorx = e.x;
    anchory = e.y;
  }
  onMouseReleased: function( e: MouseEvent ):Void {
    var diffx = anchorx - e.x;
    var diffy = anchory - e.y;
    lat = GMapUtils.adjustLatByPixels(lat, diffy, zoom);
    lng = GMapUtils.adjustLngByPixels(lng, diffx, zoom);
  }
}

def lblAddress = Label {
  layoutX:10 layoutY:15;
  text: &quot;Address :&quot;
}

def txtAddress = TextBox {
  layoutX:70 layoutY:10;
  text: &quot;&quot;
  columns: 28
  selectOnFocus: true
}

def lblLat = Label {
layoutX:39 layoutY:45;
text: &quot;Lat :&quot;
}
def txtLatitude = TextBox {
layoutX:70 layoutY:40;
text: bind (lat.toString());
columns: 8
editable: false;
}
def lblLng = Label {
layoutX:175 layoutY:45;
text: &quot;Lng :&quot;
}
def txtLongitude = TextBox {
layoutX:210 layoutY:40;
text: bind (lng.toString());
columns: 8
editable: false;
}

def btnUpdateMap = Button {
layoutX:320 layoutY:10;
text: &quot;Get Latitude and Longitude&quot;
action: function() {
  var addr:String = txtAddress.text;
  GMapGeoCoding.getLatLng(addr, setLatLng);
}
}

def lblLevel = Label {
layoutX:310 layoutY:45;
text: &quot;Level :&quot;
}

def sZoom:Slider = Slider {
layoutX:355 layoutY:45;
min: 1
max: 20
value:15
vertical: false
}

def stage = Stage {
title : &quot;JavaFX Google Maps Demonstration&quot;
scene: Scene {
  width: 500
  height: 400
  content: [
    lblAddress, txtAddress,
    lblLat, txtLatitude,
    lblLng, txtLongitude,
    btnUpdateMap,
    lblLevel,sZoom,
    mapview,
  ]
}
}
&lt;/pre&gt;&lt;pre class=&quot;brush: javafx&quot;&gt;// GMapUtils.fx
package jfxgm;

import javafx.util.Math.*;

def GMAPOFFSET = 268435456;
def RADIUS = GMAPOFFSET / PI;
def GMAPMAXZOOM = 21;

function lng2x(lng):Integer {
  return round(GMAPOFFSET + RADIUS * lng * PI / 180);      
}

function lat2y(lat) {
return round(GMAPOFFSET -
               RADIUS *
               log((1 + sin(lat * PI / 180)) /
               (1 - sin(lat * PI / 180))) / 2);
}

function x2Lng(x:Number):Number {
return ((round(x) - GMAPOFFSET) / RADIUS) * 180/ PI;
}

function y2Lat(y:Number) {
return (PI / 2 - 2 * atan(exp((round(y) - GMAPOFFSET) / RADIUS))) * 180 / PI;
}

public function adjustLngByPixels(lng:Number, delta:Number, zoom:Number):Number {
return x2Lng(lng2x(lng) + (delta * pow(2, (GMAPMAXZOOM - zoom))));
}

public function adjustLatByPixels(lat:Number, delta:Number, zoom:Number):Number {
return y2Lat(lat2y(lat) + (delta * pow(2, (GMAPMAXZOOM - zoom))));
}
&lt;/pre&gt;&lt;pre class=&quot;brush: javafx&quot;&gt;// GMapGeoCoding.fx
package jfxgm;

import javafx.io.http.*;
import javafx.data.pull.PullParser;
import javafx.data.pull.Event;
import javafx.io.http.URLConverter;

public function getLatLng(address:String, setLatLng:function(lat:Number, lng:Number)):Void {
  def getRequest: HttpRequest = HttpRequest {
    var addr = URLConverter{}.encodeString(address);
    location: &quot;http://maps.google.com/maps/geo?q={addr}&amp;amp;output=xml&quot;;
    onInput: function(is: java.io.InputStream) {
    def parser = PullParser {
      documentType: PullParser.XML;
      input: is;
      onEvent: function(event: Event) {
        if (event.type == PullParser.END_ELEMENT) {
          if (event.qname.name == &quot;code&quot; and event.text == &quot;602&quot;) {
            setLatLng(0.0, 0.0);
          }
          else if (event.qname.name == &quot;coordinates&quot;) {
            var pts = event.text.split(&quot;,&quot;);
            setLatLng(java.lang.Float.parseFloat(pts[1]),
                      java.lang.Float.parseFloat(pts[0]));
          }
        }
      }
    }
    parser.parse();
    parser.input.close();
  }
}
getRequest.start();
}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/5975280947705533834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/06/javafx-and-google-maps.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5975280947705533834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5975280947705533834'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/06/javafx-and-google-maps.html' title='JavaFX and Google Maps'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhch0GWmPijLzUcgK7Fueu5G7MC7nLCUKLC17Y8JdeBMhJRO9s78iblARnoJfIt5RRqbnD_zuqk0QToROddaoi1kAttFkPx4zBKt_mL4xpl4mHfCCEtPoR9KGIwpF8EQ_0Zwdo7RcmYdNeS/s72-c/eiffel.gif" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-5664572800832867961</id><published>2009-03-31T04:22:00.000-07:00</published><updated>2011-01-13T04:33:45.473-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Notepad++"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><title type='text'>Java Compile and Run in Notepad++</title><content type='html'>Notepad++ is an excellent text editor.  It supports syntax highlighting of many programming languages besides Java.  Unlike Eclipse and Netbeans, it is light-weight and it can be launched from Windows Explorer easily by right-clicking on the file you wish to edit.&lt;br /&gt;
&lt;br /&gt;
The following steps describe how you can extend the capabilities of Notepad++ to include compiling and executing Java programs from Notepad++ itself.&lt;br /&gt;
&lt;br /&gt;
First, create a file called &lt;span style=&quot;font-weight: bold;&quot;&gt;JavaCompileRun.bat&lt;/span&gt;.  You can do this by right-clicking on your Windows&#39; Desktop and then click &lt;span style=&quot;font-weight: bold;&quot;&gt;New&lt;/span&gt; and &lt;span style=&quot;font-weight: bold;&quot;&gt;Text Document&lt;/span&gt;.  Then, key in &quot;JavaCompileRun.bat&quot; as the new file name.  Right-click on this file and click &lt;span style=&quot;font-weight: bold;&quot;&gt;Edit&lt;/span&gt;.  Put in the following codes and save the file.&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter: false;&quot;&gt;cd /d &quot;%1&quot;
javac %2
if errorlevel 1 goto finish
java %3
:finish
pause
&lt;/pre&gt;Next, copy the file JavaCompileRun.bat to your Notepad++ program folder, usually at &lt;span style=&quot;font-weight: bold;&quot;&gt;C:\Program Files\Notepad++&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Open Notepad++.  Select the &lt;span style=&quot;font-weight: bold;&quot;&gt;Run &lt;/span&gt;menu and click on &lt;span style=&quot;font-weight: bold;&quot;&gt;Run...&lt;/span&gt;.  A dialog box will appears.  Key in the following command.&lt;br /&gt;
&lt;pre class=&#39;brush: plain; gutter: false;&#39;&gt;$(NPP_DIRECTORY)\JavaCompileRun.bat &quot;$(CURRENT_DIRECTORY)&quot; &quot;$(FILE_NAME)&quot; &quot;$(NAME_PART)&quot;
&lt;/pre&gt;After keying in the above command, the dialog box should look something like this...&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJBoMpjjByFvAsNr19z_oeWNwMVJnw4emiZRp1Wi4gBi27WBNHFY157hRjKN_V8lsvL7_2KMgYcaCb7FRTMOEQBKlOFrfLwQCqBQN2cCdI_-AGtT-3Fd92KKiptLo_MC2V3iqxrXk9Sj4/s1600-h/nppprun.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5327780369191615346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJBoMpjjByFvAsNr19z_oeWNwMVJnw4emiZRp1Wi4gBi27WBNHFY157hRjKN_V8lsvL7_2KMgYcaCb7FRTMOEQBKlOFrfLwQCqBQN2cCdI_-AGtT-3Fd92KKiptLo_MC2V3iqxrXk9Sj4/s400/nppprun.jpg&quot; style=&quot;cursor: pointer; display: block; height: 197px; margin: 0px auto 10px; text-align: center; width: 310px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Click on the &lt;span style=&quot;font-weight: bold;&quot;&gt;Save...&lt;/span&gt; button.  In the &lt;span style=&quot;font-weight: bold;&quot;&gt;Name:&lt;/span&gt; text box, key in &quot;Java Compile and Save&quot; as shown in the figure below.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsHMKHIl6stnuetF5hyphenhyphenLaFXufk27_1XYVnDYMCFaE5d7U6rJQ4GTyTXZ5Z6SsJDB0Rpj2fH4dSpyYDPd076EcW02KC5aifr-220nquHFrNcEFkLtGdW3_WzdzQEPkDB6oY9MGzuyae4qYh/s1600-h/npppsave.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5327780373231378962&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsHMKHIl6stnuetF5hyphenhyphenLaFXufk27_1XYVnDYMCFaE5d7U6rJQ4GTyTXZ5Z6SsJDB0Rpj2fH4dSpyYDPd076EcW02KC5aifr-220nquHFrNcEFkLtGdW3_WzdzQEPkDB6oY9MGzuyae4qYh/s400/npppsave.jpg&quot; style=&quot;cursor: pointer; display: block; height: 200px; margin: 0px auto 10px; text-align: center; width: 286px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Click &lt;span style=&quot;font-weight: bold;&quot;&gt;OK&lt;/span&gt; and then click on the &lt;span style=&quot;font-weight: bold;&quot;&gt;Run!&lt;/span&gt; button.  Your Java program should compile and run if there is no error.&lt;br /&gt;
&lt;br /&gt;
Now to compile the current Java program, make sure you have saved the file.  Then, in the &lt;span style=&quot;font-weight: bold;&quot;&gt;Run &lt;/span&gt;menu, click &lt;span style=&quot;font-weight: bold;&quot;&gt;Java Compile and Run&lt;/span&gt; as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoNjZOp8LQj8ad-hIPCxTR-KYf0Ykwb_4o5LOMb3zyHKWD9vGw0vYS2YV7tKWF_f8AhRnkY2EB_t0_q_cbhS0vG_AaMSQL6k8CoTWOpugfH-vY-zduFZRRrB4zhAblpl062WyONyaRKgRP/s1600-h/npppmenu.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5327787660065368210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoNjZOp8LQj8ad-hIPCxTR-KYf0Ykwb_4o5LOMb3zyHKWD9vGw0vYS2YV7tKWF_f8AhRnkY2EB_t0_q_cbhS0vG_AaMSQL6k8CoTWOpugfH-vY-zduFZRRrB4zhAblpl062WyONyaRKgRP/s400/npppmenu.jpg&quot; style=&quot;cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
A Command Prompt window will appear and the results of your Java program will be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqPetrsS5E-yfTiJJv5UjWYmyD2rPrTqss1BP5EjzqsWMkVSsF2CXKFTBKanPOucFsLXPiKgvsVLxuCO-14X0c5mpgAcNhxxJubDEhZ99MYHJ8RYowxZeDVu3Voeu_OcxjK0-fWvD_TugJ/s1600-h/npppjava.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5327789057549889410&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqPetrsS5E-yfTiJJv5UjWYmyD2rPrTqss1BP5EjzqsWMkVSsF2CXKFTBKanPOucFsLXPiKgvsVLxuCO-14X0c5mpgAcNhxxJubDEhZ99MYHJ8RYowxZeDVu3Voeu_OcxjK0-fWvD_TugJ/s400/npppjava.jpg&quot; style=&quot;cursor: pointer; display: block; height: 273px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
There is however one serious limitation with this method.  Only Java programs with default package will compile and run.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/5664572800832867961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/java-compile-and-run-in-notepad.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5664572800832867961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5664572800832867961'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/java-compile-and-run-in-notepad.html' title='Java Compile and Run in Notepad++'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJBoMpjjByFvAsNr19z_oeWNwMVJnw4emiZRp1Wi4gBi27WBNHFY157hRjKN_V8lsvL7_2KMgYcaCb7FRTMOEQBKlOFrfLwQCqBQN2cCdI_-AGtT-3Fd92KKiptLo_MC2V3iqxrXk9Sj4/s72-c/nppprun.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-3936923339716326589</id><published>2009-03-18T04:56:00.000-07:00</published><updated>2011-01-13T04:58:01.125-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP .NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>App_Code Folder in ASP .NET 3.5</title><content type='html'>In Visual Studio Professional 2008, you can still create the &lt;span style=&quot;font-weight: bold;&quot;&gt;App_Code&lt;/span&gt; folder by right-clicking on the Web Project and selecting &lt;span style=&quot;font-weight: bold;&quot;&gt;Add&lt;/span&gt;, then &lt;span style=&quot;font-weight: bold;&quot;&gt;Add Folder&lt;/span&gt;.  Rename the new folder to App_Code.&lt;br /&gt;
&lt;br /&gt;
Contrary to some recommendations on the Web that you should not use the App_Code folder because you cannot place common Web UI codes or classes in this folder, you can do so by setting &lt;span style=&quot;font-weight: bold;&quot;&gt;Build Action&lt;/span&gt; of each class to &lt;span style=&quot;font-weight: bold;&quot;&gt;Compile&lt;/span&gt;. Suppose this step is not done, the classes defined in this folder will not be visible to your other codes.  This explains why people recommended against the use of App_Code folder in VS 2008.&lt;br /&gt;
&lt;br /&gt;
Suppose you have a class called &lt;span style=&quot;font-style: italic;&quot;&gt;WebCommon.cs&lt;/span&gt; in this folder.  All you have to do is to right-click on this file and select &lt;span style=&quot;font-weight: bold;&quot;&gt;Properties&lt;/span&gt;.  A properties window will appear.  Set &lt;span style=&quot;font-weight: bold;&quot;&gt;Build Action&lt;/span&gt; to &lt;span style=&quot;font-weight: bold;&quot;&gt;Compile&lt;/span&gt;.  Viola!  The class can be accessed exactly like what you have seen in VS 2005.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomEmfR1Ieq2EDEdP5LImuaU5QuVj8RWOUUMGhEEgQ-ybfOBBL0arcgUK6SM-OnKBl3HtjixYO597DSZAWJcVkqEFvT0s9DMxQgXsCFpyd2XL_NuskGK1VvY4XPO1CbaXM7C74VJNqs9Hf/s1600-h/Screen06.gif&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5314772902777324946&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomEmfR1Ieq2EDEdP5LImuaU5QuVj8RWOUUMGhEEgQ-ybfOBBL0arcgUK6SM-OnKBl3HtjixYO597DSZAWJcVkqEFvT0s9DMxQgXsCFpyd2XL_NuskGK1VvY4XPO1CbaXM7C74VJNqs9Hf/s400/Screen06.gif&quot; style=&quot;cursor: pointer; display: block; height: 288px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/3936923339716326589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/appcode-folder-in-asp-net-35.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3936923339716326589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/3936923339716326589'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/appcode-folder-in-asp-net-35.html' title='App_Code Folder in ASP .NET 3.5'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomEmfR1Ieq2EDEdP5LImuaU5QuVj8RWOUUMGhEEgQ-ybfOBBL0arcgUK6SM-OnKBl3HtjixYO597DSZAWJcVkqEFvT0s9DMxQgXsCFpyd2XL_NuskGK1VvY4XPO1CbaXM7C74VJNqs9Hf/s72-c/Screen06.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-1354166093713335601</id><published>2009-03-16T17:55:00.000-07:00</published><updated>2011-01-13T17:56:55.221-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP .NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Using IronPython in ASP .NET VS 2008</title><content type='html'>Download &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyId=A5189BCB-EF81-4C12-9733-E294D13A58E6&amp;amp;displaylang=en&quot;&gt;Microsoft ASP.NET Futures (July 2007)&lt;/a&gt; from Microsoft and follow the instructions for installation closely in the download page especially you are installing it on Windows Vista. &lt;br /&gt;
&lt;br /&gt;
The installation should work for Visual Studio 2005, Visual Web Developer 2005 Express Edition, Visual Studio 2008 or Visual Web Developer 2008 Express Edition.  Start up Visual Studio, create a new website.  You should see IronPython in the Language drop down box.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOXRr_Qi4iS6t_lGKDk7ABFotHFZwRwt8Cimey3QOJAoJpXo9vDItZ4hOe31QB24rhOGxHv4ZqGFQikW4M8FwsViJ1Mn-jx0DjlrpG2d3uMguq1B_923_Vm7K_lSNLPQTAcRI5HySVafc/s1600-h/ASP03+Mar.+17+13.39.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5314027498434231138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOXRr_Qi4iS6t_lGKDk7ABFotHFZwRwt8Cimey3QOJAoJpXo9vDItZ4hOe31QB24rhOGxHv4ZqGFQikW4M8FwsViJ1Mn-jx0DjlrpG2d3uMguq1B_923_Vm7K_lSNLPQTAcRI5HySVafc/s400/ASP03+Mar.+17+13.39.jpg&quot; style=&quot;cursor: pointer; display: block; height: 258px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/1354166093713335601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/using-ironpython-in-asp-net-vs-2008.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1354166093713335601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1354166093713335601'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/using-ironpython-in-asp-net-vs-2008.html' title='Using IronPython in ASP .NET VS 2008'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOXRr_Qi4iS6t_lGKDk7ABFotHFZwRwt8Cimey3QOJAoJpXo9vDItZ4hOe31QB24rhOGxHv4ZqGFQikW4M8FwsViJ1Mn-jx0DjlrpG2d3uMguq1B_923_Vm7K_lSNLPQTAcRI5HySVafc/s72-c/ASP03+Mar.+17+13.39.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-1274224108506424913</id><published>2009-03-11T17:48:00.000-07:00</published><updated>2011-01-13T17:53:59.229-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>Storing Passwords in MS SQL</title><content type='html'>In MySQL, storing users&#39; passwords is easily done by the function SHA1.  Assuming a table &lt;b&gt;usertable&lt;/b&gt; exists with two columns &lt;b&gt;userid&lt;/b&gt; and &lt;b&gt;passwrd&lt;/b&gt;.&lt;br /&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;INSERT INTO usertable(userid, passwrd) 
VALUES(&#39;johnlim&#39;, SHA1(&#39;SECRET&#39;));
&lt;/pre&gt;&lt;br /&gt;
To retrieve the user&#39;s record,&lt;br /&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;SELECT * FROM usertable
 WHERE userid = &#39;johnlim&#39;
   AND passwrd = SHA1(&#39;SECRET&#39;);
&lt;/pre&gt;&lt;br /&gt;
Is there an equivalent in MS SQL Server?  Yes!  Recently, MS SQL Server 2005 has nicely built-in support for hashing and the function is called &lt;b&gt;HASHBYTES&lt;/b&gt;.  This function takes in two string parameters.  The first determines the algorithm used to provide the hash. Possible values for the algorithm are MD2, MD4, MD5, SHA and SHA1. The second takes in the value to be hashed.&lt;br /&gt;
&lt;br /&gt;
Hence the equivalent SQL statements for MS SQL are&lt;br /&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;INSERT INTO usertable(userid, passwrd) 
VALUES(&#39;johnlim&#39;, HASHBYTES(&#39;SHA1&#39;, &#39;SECRET&#39;));

SELECT * FROM usertable
 WHERE userid = &#39;johnlim&#39;
   AND passwrd = HASHBYTES(&#39;SHA1&#39;, &#39;SECRET&#39;);
&lt;/pre&gt;&lt;br /&gt;
The only difference is that the passwrd column in MySQL is &lt;b&gt;VARCHAR&lt;/b&gt; while in MS SQL is &lt;b&gt;VARBINARY&lt;/b&gt;.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/1274224108506424913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/storing-passwords-in-ms-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1274224108506424913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1274224108506424913'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/storing-passwords-in-ms-sql.html' title='Storing Passwords in MS SQL'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-4658394005374703056</id><published>2009-03-01T17:43:00.000-08:00</published><updated>2011-01-13T17:45:28.207-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><title type='text'>Changing Template in Blogger</title><content type='html'>I had been a casual blogger until of late when I am seriously exploring how Blogger works.  One of the things which I sought to do was to change the template to something more professional.  I have tried many templates without success.  The cryptic errors reported by Blogger on various occasions were &lt;span style=&quot;font-weight: bold;&quot;&gt;bX-si9ejx&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;bX-aoj9qb&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;bX-hq2u5m&lt;/span&gt; and etc.&lt;br /&gt;
&lt;br /&gt;
Many other bloggers also experienced these problems and the solution commonly suggested was to delete all browser cookies and temporary files, and then upload the template again.  This solution didn&#39;t work for me.  I also tried changing browsers from FireFox to IE to Chrome and even Opera. &lt;br /&gt;
&lt;br /&gt;
After many hours of research and experimentation, I&#39;ve finally understood the problem.  I came to the understanding that the template not only defines the skin and the layout of the blog, it also stores information about the widgets which I&#39;ve created.  The definition for each created widget is stored in this template.  And along with this definition, Blogger also automatically assigns an id with each created widget.  By the way, for the uninitiated, widgets are page elements which make up a blog.  These are your blog archives, labels, feeds, links and etc.  Basically, they are different sections of your blog.&lt;br /&gt;
&lt;br /&gt;
For each template downloaded from popular sites such as &lt;a href=&quot;http://www.ourblogtemplates.com/&quot;&gt;Our BLOGGER Template&lt;/a&gt;, the template also consists of pre-defined widgets .  As mentioned above, each widget is defined by its id.  Most of the time unfortunately, the ids of these widgets clash with your existing widgets.  In another words, they have the same name.  This is where the problem lies!&lt;br /&gt;
&lt;br /&gt;
To overcome this problem, before you upload the template, you should resolve these name conflicts.  Common names of widgets are blog1, feed1, label1, etc.  You probably need to rename all these other names, (such as blog111, feed111 and label111 etc) in order to avoid the problem altogether.&lt;br /&gt;
&lt;br /&gt;
Take for example the &lt;span style=&quot;font-style: italic;&quot;&gt;Professional Template&lt;/span&gt; downloaded from http://www.ourblogtemplates.com/2008/11/blogger-template-professional-template.html.&lt;br /&gt;
These are the lines in the template which should be changed.  You can open this file using WordPad and search for &quot;widget id&quot;.  You need not rename every instance.  Only those instances that have name conflicts with your existing widgets need to be renamed.  But for simplicity, just rename every widget id.&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter: false;&quot;&gt;&amp;lt;b:widget id=&#39;Header1&#39; locked=&#39;true&#39; title=&#39;The Professional Template (Header)&#39; type=&#39;Header&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Blog1&#39; locked=&#39;true&#39; title=&#39;Blog Posts&#39; type=&#39;Blog&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Profile1&#39; locked=&#39;false&#39; title=&#39;About Me&#39; type=&#39;Profile&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Label2&#39; locked=&#39;false&#39; title=&#39;Labels&#39; type=&#39;Label&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Image1&#39; locked=&#39;false&#39; title=&#39;&#39; type=&#39;Image&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text2&#39; locked=&#39;false&#39; title=&#39;About This Blog&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text3&#39; locked=&#39;false&#39; title=&#39;Lorem Ipsum&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text4&#39; locked=&#39;false&#39; title=&#39;Lorem Ipsum&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text5&#39; locked=&#39;false&#39; title=&#39;Lorem&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;LinkList1&#39; locked=&#39;true&#39; title=&#39;Linkbar&#39; type=&#39;LinkList&#39;&amp;gt;
&amp;lt;b:widget id=&#39;LinkList2&#39; locked=&#39;false&#39; title=&#39;Links&#39; type=&#39;LinkList&#39;&amp;gt;
&amp;lt;b:widget id=&#39;BlogArchive1&#39; locked=&#39;false&#39; title=&#39;Blog Archive&#39; type=&#39;BlogArchive&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Feed1&#39; locked=&#39;false&#39; title=&#39;Our Blogger Templates&#39; type=&#39;Feed&#39;&amp;gt;
&lt;/pre&gt;The following lines show the renamed ids.  E.g. Header1 → Header111.&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter:false&quot;&gt;&amp;lt;b:widget id=&#39;Header111&#39; locked=&#39;true&#39; title=&#39;The Professional Template (Header)&#39; type=&#39;Header&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Blog111&#39; locked=&#39;true&#39; title=&#39;Blog Posts&#39; type=&#39;Blog&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Profile111&#39; locked=&#39;false&#39; title=&#39;About Me&#39; type=&#39;Profile&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Label222&#39; locked=&#39;false&#39; title=&#39;Labels&#39; type=&#39;Label&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Image111&#39; locked=&#39;false&#39; title=&#39;&#39; type=&#39;Image&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text222&#39; locked=&#39;false&#39; title=&#39;About This Blog&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text333&#39; locked=&#39;false&#39; title=&#39;Lorem Ipsum&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text444&#39; locked=&#39;false&#39; title=&#39;Lorem Ipsum&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Text555&#39; locked=&#39;false&#39; title=&#39;Lorem&#39; type=&#39;Text&#39;&amp;gt;
&amp;lt;b:widget id=&#39;LinkList111&#39; locked=&#39;true&#39; title=&#39;Linkbar&#39; type=&#39;LinkList&#39;&amp;gt;
&amp;lt;b:widget id=&#39;LinkList222&#39; locked=&#39;false&#39; title=&#39;Links&#39; type=&#39;LinkList&#39;&amp;gt;
&amp;lt;b:widget id=&#39;BlogArchive111&#39; locked=&#39;false&#39; title=&#39;Blog Archive&#39; type=&#39;BlogArchive&#39;&amp;gt;
&amp;lt;b:widget id=&#39;Feed111&#39; locked=&#39;false&#39; title=&#39;Our Blogger Templates&#39; type=&#39;Feed&#39;&amp;gt;
&lt;/pre&gt;Have a productive time changing your blogger templates!</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/4658394005374703056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/changing-template-in-blogger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/4658394005374703056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/4658394005374703056'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/03/changing-template-in-blogger.html' title='Changing Template in Blogger'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-5080461354605378533</id><published>2009-02-28T04:39:00.000-08:00</published><updated>2011-01-18T04:41:51.649-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hong Kong"/><category scheme="http://www.blogger.com/atom/ns#" term="Travel"/><title type='text'>Dim Sum Trolley</title><content type='html'>A warm welcome to our dim sum trolley!&lt;br /&gt;
&lt;br /&gt;
Here we hope to share with you choice pickings from our travels near and far.  It is our humble wish that these bite-sized nuggets tantalize, inspire, delight or stoke a sense of wonder in the reader.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPF9q0QQkTXLRB4-YmMGkAT7DnlJX08TObnY0Gh0gaumy3xLPUZxwBUEhiwPX6t95kBKMBq1hhE-1xrmKGefQ2bOKystkKxfdPjTNgtCEZ8JK1KkTPKVUOelA2UbICHnjSTbE6JiDBQWY/s1600-h/HongKong28.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5309354569190620882&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPF9q0QQkTXLRB4-YmMGkAT7DnlJX08TObnY0Gh0gaumy3xLPUZxwBUEhiwPX6t95kBKMBq1hhE-1xrmKGefQ2bOKystkKxfdPjTNgtCEZ8JK1KkTPKVUOelA2UbICHnjSTbE6JiDBQWY/s320/HongKong28.JPG&quot; style=&quot;cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;A post-script for our non-Chinese visitors who may wonder about &quot;dim sum&quot;, these Chinese words are transliterated as &quot;a little heart&quot; or &quot;touch the heart&quot;.  Dim sum are the favourite snacks of many Chinese, especially Cantonese, coming in all shapes and form, weird and wonderful.  We like the Chinese words used for this array of delicious snacks -- a little heart.  After all, more than food, it&#39;s about heart.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/5080461354605378533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/02/dim-sum-trolley.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5080461354605378533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5080461354605378533'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/02/dim-sum-trolley.html' title='Dim Sum Trolley'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPF9q0QQkTXLRB4-YmMGkAT7DnlJX08TObnY0Gh0gaumy3xLPUZxwBUEhiwPX6t95kBKMBq1hhE-1xrmKGefQ2bOKystkKxfdPjTNgtCEZ8JK1KkTPKVUOelA2UbICHnjSTbE6JiDBQWY/s72-c/HongKong28.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-1446829305494780757</id><published>2009-01-17T17:40:00.000-08:00</published><updated>2011-01-13T17:42:17.477-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Setting Default Folder in Windows Explorer</title><content type='html'>When Windows Explorer is started, the Documents folder of the current user will be selected.  Suppose you want it to select another folder, say the Work folder in D:, can this be done easily?  Yes!&lt;br /&gt;
&lt;br /&gt;
Right click on the Windows Explorer icon and click &lt;b&gt;Properties&lt;/b&gt;.   In the &lt;b&gt;Target &lt;/b&gt;textbox, you will see &quot;%SystemRoot%\explorer.exe&quot;.  Replace this with&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter: false&quot;&gt;%SystemRoot%\explorer.exe /n, /e, /select, D:\Work
&lt;/pre&gt;&lt;br /&gt;
The above tip works for Windows XP, Vista and Seven.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/1446829305494780757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2009/01/setting-default-folder-in-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1446829305494780757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/1446829305494780757'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2009/01/setting-default-folder-in-windows.html' title='Setting Default Folder in Windows Explorer'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-7600318610962926562</id><published>2008-12-05T17:37:00.000-08:00</published><updated>2011-01-13T17:38:37.686-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><title type='text'>Resequencing Photos from more than one Camera</title><content type='html'>This is a python script which I have written to resequence photos taken from two cameras.  The script makes use of the date and time of the photos to sequence the filenames.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: py&quot;&gt;import os, glob, time

fprefix = &quot;Beijing&quot;        # Name to prefix photos
folder  = &quot;D:/Beijing2008&quot; # Folder to look for photos
ext     = &quot;jpg&quot;            # Extension of photos
sno     = 1                # Serial number to start

print &quot;Folder = &quot;, folder
print &#39;-&#39; * 60
date_file_list = []
for file in glob.glob(folder + &quot;/*.&quot; + ext):
  stats = os.stat(file)
  lastmod_date = time.localtime(stats[8])
  date_file_tuple = lastmod_date, file
  date_file_list.append(date_file_tuple)
  #print date_file_list  # test

date_file_list.sort()
#date_file_list.reverse()  # newest mod date now first

import string
print &quot;%-40s %s&quot; % (&quot;filename:&quot;, &quot;last modified:&quot;)
for file in date_file_list:
  folder, file_name = os.path.split(file[1])

  # Rename File
  ext = os.path.splitext(file_name)
  file_name = fprefix + (&quot;%03d&quot; % sno) + string.lower(ext[1])
  sno = sno + 1
  newfile = folder + &quot;/&quot; + file_name

  os.rename(file[1], newfile)

  # convert date tuple to MM/DD/YYYY HH:MM:SS format
  file_date = time.strftime(&quot;%m/%d/%y %H:%M:%S&quot;, file[0])
  print &quot;%-40s %-20s %s&quot; % (folder, file_name, file_date)

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/7600318610962926562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2008/12/resequencing-photos-from-more-than-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/7600318610962926562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/7600318610962926562'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2008/12/resequencing-photos-from-more-than-one.html' title='Resequencing Photos from more than one Camera'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-5245886070138810106</id><published>2008-06-17T17:30:00.000-07:00</published><updated>2011-01-13T17:36:02.645-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows Vista"/><title type='text'>Autoexec with Windows Vista</title><content type='html'>In the days of Windows 98, commands which you wish to execute when the system starts up are placed in the autoexec.bat file. One of the useful things to do is to remove all temporary files in the temp folder. For example, we could issue these commands in the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;autoexec.bat &lt;/span&gt;file.&lt;br /&gt;
&lt;pre class=&quot;brush: plain; gutter: false;&quot;&gt;REM *** inside autoexec.bat ***
cd C:\temp
del *.tmp
&lt;/pre&gt;&lt;br /&gt;
Each time when the system reboots, those files with extension tmp will be removed in the temp folder of C: drive.&lt;br /&gt;
&lt;br /&gt;
How to do this in Windows Vista? The autoexec.bat concept is not used in Vista. However, we can tell Vista to do this by specifying a &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Local Group Policy&lt;/span&gt; on the script to execute during Windows startup. We can do this by using the Local Group Policy Editor.&lt;br /&gt;
&lt;br /&gt;
Open the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Run...&lt;/span&gt; Dialog Box from the Windows Start menu. Key in &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;gpedit.msc&lt;/span&gt;&quot; to start the Local Group Policy Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;148&quot; src=&quot;http://lh5.ggpht.com/frankiechayc/SAgK5vpyL_I/AAAAAAAAACY/KJr_qEm8SsM/image_thumb%5B10%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;274&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
When the Local Group Policy Editor appears, expand on the left pane, &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Local Computer Policy&lt;/span&gt; → &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Computer Configuration&lt;/span&gt; → &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Windows Settings&lt;/span&gt; → &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Scripts (Startup/Shutdown)&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;284&quot; src=&quot;http://lh6.ggpht.com/frankiechayc/SAgK-_pyMBI/AAAAAAAAAEk/8MI8Msh5wrg/image_thumb%5B8%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;404&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
Double click on the right pane, &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Startup&lt;/span&gt;. Click on the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Add &lt;/span&gt;button and specify the script you want Windows to execute during startup. In this case, I placed the delete commands in a script called &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;cleartemp.bat&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;245&quot; src=&quot;http://lh6.ggpht.com/frankiechayc/SAgK-_pyMBI/AAAAAAAAAEk/8MI8Msh5wrg/image_thumb%5B8%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;354&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
Click OK and we are done! Exit the editor. Test out the script by restarting Windows Vista.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/5245886070138810106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2008/06/autoexec-with-windows-vista.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5245886070138810106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5245886070138810106'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2008/06/autoexec-with-windows-vista.html' title='Autoexec with Windows Vista'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/frankiechayc/SAgK5vpyL_I/AAAAAAAAACY/KJr_qEm8SsM/s72-c/image_thumb%5B10%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-6857570670023995146</id><published>2008-05-16T17:28:00.000-07:00</published><updated>2011-01-13T17:29:44.201-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Command Prompt"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Vista"/><title type='text'>Vista and Command Prompt Here</title><content type='html'>Those of us who were using Windows XP and Microsoft PowerToys Command Prompt Here would miss this feature in Windows Vista. You will find that there is no equivalent of such a utility by Microsoft for Vista. This is so because of an obvious reason. Vista has already this feature built-in.&lt;br /&gt;
&lt;br /&gt;
Open up Windows Explorer, hold the [Shift] key down, right-click on any folder on the details pane on the right, you will see &quot;Open Command Window Here&quot; menu item third in the pop-up menu. However, if you do this on the folder pane on the left of the Windows Explorer, this will not work. Disappointed?&lt;br /&gt;
&lt;br /&gt;
Another way is to modify Vista&#39;s registry. Here is how this can be done. Navigate in your Registry to &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell&lt;/span&gt; and create a key called &lt;b&gt;Open Command Prompt Here&lt;/b&gt;. Set the default string to whatever text you want to appear in the right-click menu. Create a new key within your newly created command prompt named &quot;command,&quot; and set the default string to &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;cmd.exe /k pushd %L&lt;/span&gt;. You may need to add %SystemRoot%\system32\ before the cmd.exe if the executable can&#39;t be found.&lt;br /&gt;
&lt;br /&gt;
The changes should take place immediately. Right click a folder in both the right and left panes of your Windows Explorer and your new menu item should appear.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/6857570670023995146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2008/05/vista-and-command-prompt-here.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/6857570670023995146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/6857570670023995146'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2008/05/vista-and-command-prompt-here.html' title='Vista and Command Prompt Here'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964159169030549918.post-5836188086778042016</id><published>2008-04-16T17:25:00.000-07:00</published><updated>2011-01-13T17:27:30.719-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Tech"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Python and .NET</title><content type='html'>I was asked to explore using Python with .NET. Here are three possibilities.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuration A – Plain IronPython&lt;br /&gt;
&lt;/b&gt;This is the most straightforward and plain vanilla installation.&lt;br /&gt;
Download &lt;i&gt;IronPython-1.1.1-Bin.zip&lt;/i&gt; (975KB) from &lt;a href=&quot;http://www.codeplex.com/IronPython&quot;&gt;http://www.codeplex.com/IronPython&lt;/a&gt;.&lt;br /&gt;
Unzip the files into a folder, say C:\IronPython-1.1.1 and set the PATH. Voila!&lt;br /&gt;
Type &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;b&gt;ipy helloworld.py&lt;/b&gt;&lt;/span&gt; or &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;b&gt;ipyw helloworld.py&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuration B – IronPython Studio&lt;/b&gt;&lt;br /&gt;
IronPython Studio is based on the Visual Studio 2008 Shell runtime (royalty free) and can be installed without requiring any version of Visual Studio. It provides the following templates for projects using IronPython.&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5190056424766582706&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCH92pf1DzFlJLL0oZrJGhYcbYBlNHgnZpqLZzlpjioDSAyCDPy9Bea2LWxWuppfxNkvXcm7X2FAKNp7BFrm1t9IvQjOiZDmtzq3jjX3DcLMOeyhtkr2FWhHUQGBVlKx9pvMvnT6Tj0I5d/s320/IronPythonStudio.JPG&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center;&quot; /&gt; Need to first install Visual Studio 2008 Shell (Isolated) (390MB) from &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=aca38719-f449-4937-9bac-45a9f8a73822&amp;amp;displaylang=en&quot;&gt;http://www.microsoft.com/downloads/details.aspx?familyid=aca38719-f449-4937-9bac-45a9f8a73822&amp;amp;displaylang=en&lt;/a&gt;. Make sure you execute the &lt;i&gt;vs_shell_isolated.enu.exe&lt;/i&gt; file in C:\VS 2008 Shell Redist\Isolated Mode. If you missed this step, the Iron Python Studio will not work.&lt;br /&gt;
Download &lt;i&gt;IronPythonStudio.msi&lt;/i&gt; (1127KB) from &lt;a href=&quot;http://www.codeplex.com/IronPythonStudio&quot;&gt;http://www.codeplex.com/IronPythonStudio&lt;/a&gt;. Double click on the above msi file and the installation will start. IronPython is also included in the msi.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuration C – Visual Studio 2008 with IronPython&lt;/b&gt;&lt;br /&gt;
For those who already have VS2008 installed and are working in VS2008 for VB and C# projects, this would be the best configuration. Download Visual Studio 2008 SDK (98MB) from &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b&amp;amp;displaylang=en&quot;&gt;http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b&amp;amp;displaylang=en&lt;/a&gt; and install it on top of Visual Studio 2008. Run VS2008 under “Visual Studio 2008 SDK --&amp;gt; Tools --&amp;gt; Start Visual Studio 2008 Under Experimental Hive”. On top of VB, C#, C++ and all the project types in IronPython Studio, it also allows ASP.NET web applications and services to be developed using IronPython! &lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5190085454450536386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgah8hLNzMOxcArL_ezZEQ8TCyxX378FKzbicJTIi3TaqJxKNEsGgRo2xbN2TXx-mXkyxlMkNyIxfXpf6x2nU8VW-89ThNjdNOzQ0XSv9Yum0wSV7sBLIzvLLklA4QksCykwJB91vQ2P9K-/s320/IronPythonVS2008.JPG&quot; style=&quot;display: block; margin: 0px auto 10px; text-align: center;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
It is difficult to develop GUI Applications without IDE. Since I am a DOTNET guy, I go with Configuration C. Configuration B would be good for those of us who are not using VB and C#. Configuration A in my opinion is not productive, but nonetheless a very convenient way to pick up the basics of Python in .NET.&lt;br /&gt;
&lt;br /&gt;
After some hours of experimentation, there are some serious bugs in IronPython. My colleague reported this problem, create a &lt;b&gt;Button&lt;/b&gt; and define a &lt;i&gt;button_click&lt;/i&gt; event for the button. However, when a new &lt;b&gt;Label&lt;/b&gt; is created, the &lt;i&gt;button_click&lt;/i&gt; function is overwritten. Any change made directly to the codes in the code view will most likely mess up the designer view. The Designer View can also be easily &quot;corrupted&quot; even with incorrect indentation.</content><link rel='replies' type='application/atom+xml' href='http://techtravelthink.blogspot.com/feeds/5836188086778042016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techtravelthink.blogspot.com/2008/04/python-and-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5836188086778042016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964159169030549918/posts/default/5836188086778042016'/><link rel='alternate' type='text/html' href='http://techtravelthink.blogspot.com/2008/04/python-and-net.html' title='Python and .NET'/><author><name>threets</name><uri>http://www.blogger.com/profile/17591907565868231644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC7HGjELW3rJdvcfN9N1c15-nP6-vXK3z5QTXRIjaDZuMaCjwqVZLpaqM75blscmbGir-UGC3UYy7Gyxx8d6fAfLe6FCqSBoLXiD9ehVWKAHVjZ1rbc-Ooq2EUBxDHgo8/s220/RpBear80pix.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCH92pf1DzFlJLL0oZrJGhYcbYBlNHgnZpqLZzlpjioDSAyCDPy9Bea2LWxWuppfxNkvXcm7X2FAKNp7BFrm1t9IvQjOiZDmtzq3jjX3DcLMOeyhtkr2FWhHUQGBVlKx9pvMvnT6Tj0I5d/s72-c/IronPythonStudio.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>