<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Ookii.org</title>
    <link>http://www.ookii.org</link>
    <dc:language>en</dc:language>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ookii" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Command line argument parser for .Net</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/JsJTZM7llAo/command_line_argument_parser_for_net.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/command_line_argument_parser_for_net.aspx</guid>
      <pubDate>Sun, 06 Sep 2009 08:59:19 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/command_line_argument_parser_for_net.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=150</wfw:commentRss>
      <description>&lt;p&gt;Every developer has at some point in time written code to interpret the command line arguments of their program. Of course, I'm no exception. When I was recently in need of a quick way to parse the arguments for a whole bunch of different scenarios, I decided to go the extra mile and just write a generalised class that would let you easily define what arguments you want and then parses it for you.&lt;/p&gt;&lt;p&gt;I've now made that class available, in the &lt;a href="http://www.ookii.org/software/commandlineparser"&gt;Ookii.CommandLine class library&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It's very easy to use. Just create a class, and the constructor parameters of that class, as well as properties marked with a special attribute, will make up the command line arguments of your application. It can even create help text for the command line usage of your application.&lt;/p&gt;&lt;p&gt;More information, documentation, downloads and samples at the link above.&lt;/p&gt;&lt;p&gt;Yeah, I know there's a lot of similar stuff out there already. Now there's one more. :)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/JsJTZM7llAo" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/command_line_argument_parser_for_net.aspx</feedburner:origLink></item>
    <item>
      <title>Mt. Fuji climbing</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/K5Tgmk9VApY/mt_fuji_climbing.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/mt_fuji_climbing.aspx</guid>
      <pubDate>Sun, 30 Aug 2009 09:11:04 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.ookii.org/post/mt_fuji_climbing.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=149</wfw:commentRss>
      <description>&lt;p&gt;It has been a long time since I posted anything about a trip here, but now it's time I do so. Last weekend, the 22nd and 23rd of August, I along with six friends climbed Mt. Fuji.&lt;/p&gt;&lt;p&gt;We set off on Saturday, leaving Tokyo at 12:40 by bus from Shinjuku, and we arrived at the fifth station of the Kawaguchiko trail (at an altitude of 2305 meters) around 17:00. After spending some time getting used to the thinner air, we started climbing around 18:00. Our schedule had us on the summit some time around 2:00 in the morning, but that was hopelessly optimistic. The climb was very exhausting, and I'm not exactly in the best shape, so it took us somewhat longer. The large number of people caused the occasional &amp;quot;traffic jam&amp;quot; which also caused a lot of delay. It's really unbelievable how crowded that mountain is. It's worse than Shinjuku station.&lt;/p&gt;&lt;p&gt;Our goal was of course to reach the summit before sunrise at 5:00 in the morning, but unfortunately we fell short of that goal by about 300 meters (distance, not altitude). Probably a good thing, in retrospect, since it appeared to be much more cloudy on the actual summit so we probably got a better view from where we were. After sunrise, we continued to the summit. Unfortunately, because many people had paused to watch the sunrise, an enormous queue had formed leading up, so eventually we were at the summit around 6:30. Once there, we took some rest, ate some food (despite the high prices I did buy some noodles, just to have something hot to eat, as it was very cold on the summit). Although thoroughly exhausted, we were all glad we made it.&lt;/p&gt;&lt;p&gt;Here's where things started to go wrong, though. For one thing, we hadn't all made it to the summit at the same time, so we were already separated. I was with only two others when we started our descent, and unfortunately we took the wrong trail back down (the trail down was not supposed to be the same one we took up, but we still took the wrong one). Despite the fact that there's signs every twenty meters or so, none of us noticed it was the wrong trail until we were all the way at the bottom. While we did arrive at a fifth station, it was the wrong fifth station. Of course, the others who went down separately did take the right trail so we couldn't meet with them. And because everybody managed to have dead cell phone batteries at the same time, we couldn't even contact each other to try and sort things out. So we could only go back to Tokyo on our own and hope the others did the same (which of course they did). It all worked out in the end, but it was a pretty stupid feeling when we realised we were at the wrong location after climbing all that way down.&lt;/p&gt;&lt;p&gt;But no matter how grueling the journey (especially the wind and the dust on the way down were very bad), and no matter the mistake with the descent, I'm still glad we did it, and I'm very happy I made it, of course. In fact, I still have trouble believing it. It's the longest single climb I've ever done, and the highest I've ever been (3776 meters at the summit, prior to this the highest I'd been was 3400m in the Sierra Nevada in Spain). The beautiful sunrise (the pictures don't do it justice, really), and the sheer satisfaction of reaching the goal, make it worth it.&lt;/p&gt;&lt;p&gt;Enjoy the pictures!&lt;/p&gt;&lt;p&gt;There are 47 images attached to this post. &lt;a href="http://www.ookii.org/post/mt_fuji_climbing/images/01_kawaguchiko_station.jpg.aspx"&gt;Click here to view them&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/K5Tgmk9VApY" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/personal.aspx">Personal</category>
      <category domain="http://www.ookii.org/category/japan.aspx">Japan</category>
    <feedburner:origLink>http://www.ookii.org/post/mt_fuji_climbing.aspx</feedburner:origLink></item>
    <item>
      <title>Let's Play: Riven</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/H6I47cPQZMY/lets_play_riven.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/lets_play_riven.aspx</guid>
      <pubDate>Sun, 26 Jul 2009 15:44:52 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/lets_play_riven.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=148</wfw:commentRss>
      <description>&lt;p&gt;You may have heard of something called a Let's Play video. These are videos on the Internet (typically YouTube) where someone plays through a game from start to finish, often providing commentary along the way.&lt;/p&gt;&lt;p&gt;I quite enjoy watching these videos. When done well, they can provide some nice added value to the game, and provide an opportunity to catch up on classic games that you never had the chance to play.&lt;/p&gt;&lt;p&gt;For quite some time now, I have harboured the plan to make a Let's Play of my own. Now, I have finally done so. The game I have chosen to play is &lt;a href="http://en.wikipedia.org/wiki/Riven"&gt;Riven: The Sequel to Myst&lt;/a&gt;. This is my favourite game of the Myst series, and perhaps my favourite game of all time. Its level of depth and immersion is unparalleled by anything else I've seen, and because I know a great deal about the world of the Myst games it presented an ideal target for a Let's Play.&lt;/p&gt;&lt;p&gt;The first video of the series is embedded below:&lt;/p&gt;&lt;p&gt;&lt;object type="application/x-shockwave-flash" data="http://www.youtube.com/v/pM02NHqeejo&amp;amp;rel=1" width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/pM02NHqeejo&amp;amp;rel=1" /&gt;&lt;param name="wmode" value="transparent" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=pM02NHqeejo"&gt;Watch the video on YouTube&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Today, I have finally uploaded the final video of the 32-part series. The whole thing was recorded in a single weekend, and uploaded one by one over the period of two weeks.&lt;/p&gt;&lt;p&gt;All of the videos are available in &lt;a href="http://www.youtube.com/view_play_list?p=F2E1040A0551DE99"&gt;this playlist&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/H6I47cPQZMY" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/personal.aspx">Personal</category>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
      <category domain="http://www.ookii.org/category/random_stuff.aspx">Random stuff</category>
    <feedburner:origLink>http://www.ookii.org/post/lets_play_riven.aspx</feedburner:origLink></item>
    <item>
      <title>Windows 7 ISO Verifier</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/limenVPr5tc/windows_7_iso_verifier.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/windows_7_iso_verifier.aspx</guid>
      <pubDate>Mon, 06 Jul 2009 08:50:58 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>2</slash:comments>
      <comments>http://www.ookii.org/post/windows_7_iso_verifier.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=147</wfw:commentRss>
      <description>&lt;p&gt;Windows 7 is about to hit RTM, and many of you might want to verify that the ISO image you downloaded hasn't been tampered with or was damaged as the result of some error in the download process. Of course you can use existing checksum tools and compare the result to published values, but it can be a bit of a hassle.&lt;/p&gt;&lt;p&gt;At the request of &lt;a href="http://www.istartedsomething"&gt;Long Zheng&lt;/a&gt; I created a small application that makes this process easier. Simply drag and drop your ISO file onto the application (or start the application and browse to the ISO file) and it will verify the EXE and tell you which build you have from a list of known builds. It downloads this list from the web automatically, so you don't need to re-download the application after Windows 7 RTM is released.&lt;/p&gt;&lt;p&gt;The Windows 7 ISO Verifier can be downloaded from &lt;a href="http://www.istartedsomething.com/20090706/windows-7-iso-verifier/"&gt;Long's website&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/limenVPr5tc" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/software.aspx">Software</category>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
    <feedburner:origLink>http://www.ookii.org/post/windows_7_iso_verifier.aspx</feedburner:origLink></item>
    <item>
      <title>Priority Queue for .Net</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/F6HKeo0D5cM/priority_queue_for_net.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/priority_queue_for_net.aspx</guid>
      <pubDate>Wed, 29 Apr 2009 06:17:48 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>5</slash:comments>
      <comments>http://www.ookii.org/post/priority_queue_for_net.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=146</wfw:commentRss>
      <description>&lt;p&gt;A &lt;a href="http://www.ookii.org/link.ashx?id=WikipediaPriorityQueue"&gt;priority queue&lt;/a&gt; is a queue data structure where the element with the lowest (or highest) value is always at the front. A common analogy is to think of a queue of people ordered by some criteria such as age or height. Many programming languages include a priority queue in their standard library, including C++ and Java. However, the Microsoft .Net Framework does not include a priority queue, which is why I provide one here.&lt;/p&gt;&lt;p&gt;You might wonder why you can’t just use a sorted list to get the same effect as a priority queue. And the answer is, you can. A sorted list is a perfectly valid way to implement a priority queue. However, with a priority queue we are only interest in the smallest element at any time, and not any of the other elements,  which means it is not necessary to maintain a total order of all the elements. Because of this, we can use an implementation that maintains only a partial order, which can provide better performance.&lt;/p&gt;&lt;p&gt;The most common such implementation is one that uses a &lt;a href="http://www.ookii.org/link.ashx?id=WikipediaBinaryHeap"&gt;binary heap&lt;/a&gt;. A binary heap is a binary tree with the property that any element in the tree is always smaller than both of its children. This guarantees that the smallest element is always on top, although the binary heap does not maintain a total order like a binary search tree. Efficient operations exist to maintain this &lt;em&gt;heap property&lt;/em&gt; when inserting and deleting elements, making the binary heap perform better for priority queues than a sorted list. My PriorityQueue class for .Net uses a binary heap implementation.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; generic class that I provide here is written to conform to the conventions used by .Net’s built-in collection classes in the System.Collections.Generic namespace, particularly the &lt;code&gt;Queue&amp;lt;T&amp;gt;&lt;/code&gt; class. The &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; class implements &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt; and &lt;code&gt;ICollection&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;The three main operations provided are &lt;code&gt;Enqueue&lt;/code&gt;, which adds an item to the queue; &lt;code&gt;Dequeue&lt;/code&gt;, which removes and returns the first element of the queue; and &lt;code&gt;Peek&lt;/code&gt;, which returns the first element without removing it. In this implementation, these operations are O(log &lt;em&gt;n&lt;/em&gt;), O(log &lt;em&gt;n&lt;/em&gt;) and O(1) respectively. A special operation, &lt;code&gt;AdjustFirstItem&lt;/code&gt;, allows you to change the value of the first item and re-evaluate its position in the queue, in less time than it would’ve taken to remove the element and add a new one (note that this is only possible with reference types that are not immutable).&lt;/p&gt;&lt;p&gt;The &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; class provides several constructors, including one that allows you to create a priority queue from an existing list of elements with O(&lt;em&gt;n&lt;/em&gt;) time complexity, faster than individually adding each element to the list with &lt;code&gt;Enqueue&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;You can put any type of element in the priority queue as long as it implements &lt;code&gt;IComparable&amp;lt;T&amp;gt;&lt;/code&gt;, or you provide a custom &lt;code&gt;IComparer&amp;lt;T&amp;gt;&lt;/code&gt; for the type. Note that the &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; class will always put the smallest element at the front. If you want to have the largest element at the front, you can use the included &lt;code&gt;InvertedComparer&amp;lt;T&amp;gt;&lt;/code&gt; class.&lt;/p&gt;&lt;p&gt;A short example of how to use the &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; class is provided below.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="type"&gt;PriorityQueue&lt;/span&gt;&amp;lt;&lt;span class="keyword"&gt;int&lt;/span&gt;&amp;gt; queue = &lt;span class="keyword"&gt;new&lt;/span&gt; &lt;span class="type"&gt;PriorityQueue&lt;/span&gt;&amp;lt;&lt;span class="keyword"&gt;int&lt;/span&gt;&amp;gt;(&lt;span class="keyword"&gt;new&lt;/span&gt;[] { 4, 7, 3, 9, 12 }); &lt;span class="comment"&gt;// create a priority queue with the specified elements.&lt;/span&gt;
&lt;span class="keyword"&gt;int&lt;/span&gt; n = queue.Dequeue(); &lt;span class="comment"&gt;// returns and removes 3; the front element is now 4.&lt;/span&gt;
queue.Enqueue(5); &lt;span class="comment"&gt;// the front element is still 4.&lt;/span&gt;
queue.Enqueue(2); &lt;span class="comment"&gt;// the front element is now 2.&lt;/span&gt;
n = queue.Peek(); &lt;span class="comment"&gt;// returns 2, but does not remove it.&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href="http://www.ookii.org/download.ashx?id=Ookii.Collections.Generic"&gt;Download the &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; class for .Net&lt;/a&gt; (class library, sample application, and source code provided).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.ookii.org/software/ookii.collections.generic/doc/index.aspx"&gt;Read the documentation for the &lt;code&gt;PriorityQueue&amp;lt;T&amp;gt;&lt;/code&gt; class.&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/F6HKeo0D5cM" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/priority_queue_for_net.aspx</feedburner:origLink></item>
    <item>
      <title>New download: Ookii.Dialogs</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/GLpnzCwI2vw/new_download_ookiidialogs.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/new_download_ookiidialogs.aspx</guid>
      <pubDate>Wed, 28 Jan 2009 11:54:11 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>15</slash:comments>
      <comments>http://www.ookii.org/post/new_download_ookiidialogs.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=144</wfw:commentRss>
      <description>&lt;p&gt;I have made available a new download: &lt;a href="http://www.ookii.org/software/dialogs"&gt;Ookii.Dialogs&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Ookii.Dialogs is a class library that provides a number of common dialogs for use in .Net applications. The dialogs provided are the task dialog, progress dialog, credential dialog, input dialog and Vista-style common file dialogs.&lt;/p&gt;&lt;p&gt;The download contains two class libraries, one for Windows Forms and one for Windows Presentation Foundation (WPF). The contents are nearly identical; only the input dialog is not available for WPF. Some utility classes are provided for Windows Forms; these are not available for WPF either.&lt;/p&gt;&lt;p&gt;Most of these dialogs are wrappers around Windows API functionality. The TaskDialog class wraps the task dialog API provided in Windows Vista and later. The ProgressDialog class wraps the IProgressDialog API available since Windows 2000. The CredentialDialog class wraps the CredUI API introduced in Windows XP, and the VistaOpenFileDialog, VistaSaveFileDialog and VistaFolderBrowserDialog classes wrap the IFileDialog API introduced in Windows Vista. Only the InputDialog is not a wrapper; this is a custom dialog that performs the same functionality as the old Visual Basic InputBox function. Visit the link above for more details on each dialog.&lt;/p&gt;&lt;p&gt;Each class has been designed to be not merely a wrapper around their respective native API, but to provide a programming interface that is natural to .Net developers, with full support for the component designer. The complete source code of the class libraries, as well as documentation and a sample application are provided.&lt;/p&gt;&lt;p&gt;The classes aim to give the best experience possible on each OS, where applicable. In the case of the CredentialDialog class, this means that the new Vista-style dialog is automatically used on operating systems that support it (Vista and newer). The Vista-style file dialog classes will automatically fall back to the old style dialogs when using Windows XP. This is also true of the VistaFolderBrowserDialog class for WPF, even though WPF itself doesn't provide a folder browser dialog; the VistaFolderBrowserDialog class is a full folder browser dialog implementation for WPF supporting XP and newer.&lt;/p&gt;&lt;p&gt;This library replaces the Ookii.VistaDialogs library, which contained only the Vista-style file dialogs and didn't offer any support for WPF.&lt;/p&gt;&lt;p&gt;This library is a collection of classes that I have developed for personal use over the years. Because of the difference in age of some of the code, and the many modifications made over time, there may be some inconsistencies.&lt;/p&gt;&lt;p&gt;Let me know what you think of it, if you use it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/GLpnzCwI2vw" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/software.aspx">Software</category>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/new_download_ookiidialogs.aspx</feedburner:origLink></item>
    <item>
      <title>Randomizing a list with LINQ</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/D8xy3lMwrVA/randomizing_a_list_with_linq.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/randomizing_a_list_with_linq.aspx</guid>
      <pubDate>Fri, 16 Jan 2009 14:12:44 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/randomizing_a_list_with_linq.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=143</wfw:commentRss>
      <description>&lt;p&gt;There are many ways to randomize a list; perhaps the most common is to simply iterate over the list and swap each element with a random other element. Some libraries even include built-in methods for randomizing a list, but .Net isn’t one of those.&lt;/p&gt;&lt;p&gt;The introduction of LINQ in .Net 3.5 provides an easy way to manipulate lists and collections in all sorts of ways. So naturally one question that may come up is, can we use it to randomize a list? The answer is yes, you can. There’s probably more than one way to do it, but here’s one I like myself.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="type"&gt;Random&lt;/span&gt; rnd = &lt;span class="keyword"&gt;new&lt;/span&gt; &lt;span class="type"&gt;Random&lt;/span&gt;();
&lt;span class="keyword"&gt;var&lt;/span&gt; randomizedList = &lt;span class="keyword"&gt;from&lt;/span&gt; item &lt;span class="keyword"&gt;in&lt;/span&gt; list
                     &lt;span class="keyword"&gt;orderby&lt;/span&gt; rnd.Next()
                     &lt;span class="keyword"&gt;select&lt;/span&gt; item;&lt;/pre&gt;&lt;p&gt;The orderby clause will use the specified expression to compare elements to determine their order. Here, it is using random values to do that comparison, so the end result is a randomized list.&lt;/p&gt;&lt;p&gt;Of course we can easily create an extension method to make things even easier (here I use an alternative syntax to use orderby, just to demonstrate how to do it with that):&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="keyword"&gt;public&lt;/span&gt; &lt;span class="keyword"&gt;static&lt;/span&gt; &lt;span class="type"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; Randomize&amp;lt;T&amp;gt;(&lt;span class="keyword"&gt;this&lt;/span&gt; &lt;span class="type"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; source)
{
    &lt;span class="type"&gt;Random&lt;/span&gt; rnd = &lt;span class="keyword"&gt;new&lt;/span&gt; &lt;span class="type"&gt;Random&lt;/span&gt;();
    &lt;span class="keyword"&gt;return&lt;/span&gt; source.OrderBy&amp;lt;T, &lt;span class="keyword"&gt;int&lt;/span&gt;&amp;gt;((item) =&amp;gt; rnd.Next());
}&lt;/pre&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/D8xy3lMwrVA" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/randomizing_a_list_with_linq.aspx</feedburner:origLink></item>
    <item>
      <title>The effects of x64 on your .Net application</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/KySa2Gh-IRA/the_effects_of_x64_on_your_net_application.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/the_effects_of_x64_on_your_net_application.aspx</guid>
      <pubDate>Thu, 08 Jan 2009 12:58:50 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.ookii.org/post/the_effects_of_x64_on_your_net_application.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=142</wfw:commentRss>
      <description>&lt;p&gt;When you run an application created using .Net 2.0 or later on an x64 version of Windows, it will execute as a native 64 bit application. This is generally a good thing; your application gets to use the larger virtual address space and other advantages of x64 without you needing to change anything.&lt;/p&gt;&lt;p&gt;There are however a few consequences of running as a 64 bit process which need to be understood. There are three main differences when your application is running as a 64 bit process:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;You cannot use 32 bit DLLs.&lt;/li&gt;&lt;li&gt;File and registry virtualization is always disabled.&lt;/li&gt;&lt;li&gt;DEP is always enabled.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The first issue is relatively well known. A 64 bit process cannot load 32 bit DLLs, and .Net is no exception. This isn’t a problem if you use PInvoke to use native Windows APIs; all the Windows DLLs come in both 32 and 64 bit versions. But if you’re using a third party (or your own) native DLL or COM component, you need to be aware of this. Also some .Net libraries, such as Managed DirectX and XNA, indirectly depend on 32 bit DLLs and will therefore not work in a 64 bit process. If you try to run such an application on Windows x64, it will crash with a BadImageFormatException.&lt;/p&gt;&lt;p&gt;If your application depends on any external native DLLs and you cannot provide a 64 bit version of those DLLs, or if the application is otherwise incompatible with x64, you should change the target CPU of your executable to x86. For C# projects in Visual Studio 2008, you can find this setting on the “Build” tab of the project properties; the “Platform target” setting is the one you want. For Visual Basic projects, look under the “Compile” tab, click the “Advanced Compile Options…” button, and change the “Target CPU” setting. When you change this setting, the compiler adds an attribute to the executable to tell the CLR to always run the program as a 32 bit process. You can also set this setting to x64 or ia64 which means your application will fail to run on systems that don’t support those architectures.&lt;/p&gt;&lt;p&gt;The second issue is less well known, and it applies to Windows Vista and newer only. If you have UAC enabled your application will run with limited rights, and cannot write to many locations such as Program Files or HKEY_LOCAL_MACHINE in the registry. For compatibility, Windows will redirect attempts to write to these locations to a different folder in the user’s profile (in %LocalAppData%\VirtualStore, to be precise). For 32 bit processes, this behaviour is enabled by default (you can manually disable it using a manifest), but for 64 bit processes, it is always disabled (it cannot be enabled at all) so if you attempt to write to these locations, it will fail.&lt;/p&gt;&lt;p&gt;File and registry virtualisation can be disabled for 32 bit processes using a manifest, and to make your application behave consistently on both 32 and 64 bit systems I strongly recommend you do this. Visual Studio 2008 will automatically embed a manifest in your application that disables the virtualisation. If you are using Visual Studio 2005, you can use &lt;a href="http://www.ookii.org/post/vista_manifests_and_net.aspx"&gt;this method to embed the manifest&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The final issue has to do with Data Execution Prevention. XP and Vista will not apply DEP protection to a 32 bit process unless the executable is marked with the NXCOMPAT flag, but for 64 bit processes, DEP is always enabled. If you interop with native code which might be incompatible with DEP you need to be aware of this. Visual Studio 2008 (and Visual Studio 2005 as well, provided you’re using .Net 2.0 SP1) will mark the application with the NXCOMPAT flag so DEP will be enabled for 32 bit processes as well. If your application is not compatible with DEP, and you cannot fix it for some reason, you must set the platform target to x86 as described above, and &lt;a href="http://blogs.msdn.com/ed_maurer/archive/2007/12/14/nxcompat-and-the-c-compiler.aspx"&gt;remove the NXCOMPAT flag&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/KySa2Gh-IRA" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/the_effects_of_x64_on_your_net_application.aspx</feedburner:origLink></item>
    <item>
      <title>.Net Remoting and IPv6</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/Zbn809pvKPI/net_remoting_and_ipv6.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/net_remoting_and_ipv6.aspx</guid>
      <pubDate>Sat, 03 Jan 2009 08:19:06 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/net_remoting_and_ipv6.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=141</wfw:commentRss>
      <description>&lt;p&gt;&lt;a href="http://www.ookii.org/link.ashx?id=NetRemoting"&gt;.Net Remoting&lt;/a&gt; is quite an old technology, and has been superseded by Windows Communication Foundation in .Net 3.0. However, that doesn’t mean it’s useless; you may have an old application that already uses it, or you may need to target clients that don’t have .Net 3.0, or maybe you’re even working with &lt;a href="http://www.ookii.org/link.ashx?id=Mono"&gt;Mono&lt;/a&gt;, which currently doesn’t support WCF. In all these scenarios, using .Net Remoting is still perfectly valid.&lt;/p&gt;&lt;p&gt;.Net Remoting was introduced in .Net 1.0, and broad support for IPv6 was not introduced until .Net 2.0. For reasons of backwards compatibility, a .Net Remoting server still listens on IPv4 by default, even in .Net 2.0 and higher. Only if your networking configuration supports only IPv6 (IPv4 is disabled completely) will .Net Remoting automatically listen on IPv6.&lt;/p&gt;&lt;p&gt;It seems like that should be fine. After all, if your network supports IPv4, what is the problem with using it? It turns out there is one, and it’s quite subtle. If your network is configured to use both IPv6 and IPv4, and your Remoting clients are using host names to connect to the server, those host names will resolve to both an IPv6 and IPv4 address. Windows will then try to connect using IPv6 first – which fails because the server is listening only on IPv4 – causing a delay of a few seconds on the initial connection.&lt;/p&gt;&lt;p&gt;You can easily reproduce this problem by having a .Net Remoting client connect to a server on the local host on a computer running Vista with the default networking setup which has IPv6 enabled. If you use localhost in the well-known service URL it will attempt IPv6 first, causing a delay. If instead you use 127.0.0.1 it will be much quicker. However, using IP addresses instead of host names may not be practical, and disabling IPv6 is also a bit of a sledgehammer solution. A better idea is to make .Net Remoting listen on IPv6.&lt;/p&gt;&lt;p&gt;Although it can be rather hard to find out how to do this from the documentation, it turns out to be quite simple. If you use the app.config file to configure remoting you can use the &lt;code&gt;bindTo&lt;/code&gt; attribute of the channel to listen on IPv6. If you just add that attribute, the server will no longer listen on IPv4 however; if you want both IPv4 and IPv6, you need to define two channels. An example is given below:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;system.runtime.remoting&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;application&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;service&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;wellknown&lt;/span&gt; &lt;span class="attributeName"&gt;mode&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"Singleton"&lt;/span&gt; &lt;span class="attributeName"&gt;type&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"MyApplication.MyServer, MyAssembly"&lt;/span&gt; &lt;span class="attributeName"&gt;objectUri&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"MyServer"&lt;/span&gt; &lt;span class="tagDelimiter"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="tagDelimiter"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tagName"&gt;service&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;channels&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;channel&lt;/span&gt; &lt;span class="attributeName"&gt;ref&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"tcp"&lt;/span&gt; &lt;span class="attributeName"&gt;name&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"tcp6"&lt;/span&gt; &lt;span class="attributeName"&gt;port&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"9000"&lt;/span&gt; &lt;span class="attributeName"&gt;bindTo&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"[::]"&lt;/span&gt; &lt;span class="tagDelimiter"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="tagDelimiter"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tagName"&gt;channel&lt;/span&gt; &lt;span class="attributeName"&gt;ref&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"tcp"&lt;/span&gt; &lt;span class="attributeName"&gt;name&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"tcp4"&lt;/span&gt; &lt;span class="attributeName"&gt;port&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"9000"&lt;/span&gt; &lt;span class="attributeName"&gt;bindTo&lt;/span&gt;&lt;span class="attributeDelimiter"&gt;=&lt;/span&gt;&lt;span class="attributeValue"&gt;"0.0.0.0"&lt;/span&gt; &lt;span class="tagDelimiter"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="tagDelimiter"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tagName"&gt;channels&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="tagDelimiter"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tagName"&gt;application&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="tagDelimiter"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tagName"&gt;system.runtime.remoting&lt;/span&gt;&lt;span class="tagDelimiter"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;As you can see, the IPv6 addresses are enclosed in square brackets. By using [::], the server will listen on all IPv6 addresses; you can of course also specify an explicit IPv6 address to listen on, same as for IPv4. For example, [::1] would cause it to listen on the local host only. This example uses a TCP channel, but the same principle works for HTTP channels as well.&lt;/p&gt;&lt;p&gt;If you configure remoting programmatically, you can use the same approach:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="type"&gt;IDictionary&lt;/span&gt; properties = &lt;span class="keyword"&gt;new&lt;/span&gt; &lt;span class="type"&gt;Hashtable&lt;/span&gt;();
properties[&lt;span class="string"&gt;"name"&lt;/span&gt;] = &lt;span class="string"&gt;"tcp6"&lt;/span&gt;;
properties[&lt;span class="string"&gt;"port"&lt;/span&gt;] = 9000;
properties[&lt;span class="string"&gt;"bindTo"&lt;/span&gt;] = &lt;span class="string"&gt;"[::]"&lt;/span&gt;;
&lt;span class="type"&gt;TcpServerChannel&lt;/span&gt; channel = &lt;span class="keyword"&gt;new&lt;/span&gt; &lt;span class="type"&gt;TcpServerChannel&lt;/span&gt;(properties, &lt;span class="keyword"&gt;null&lt;/span&gt;);
&lt;span class="type"&gt;ChannelServices&lt;/span&gt;.RegisterChannel(channel,  &lt;span class="keyword"&gt;false&lt;/span&gt;);&lt;/pre&gt;&lt;p&gt;Again, if you need it to listen on both IPv6 and IPv4, you need to configure two channels. The client does not need to be changed at all, for both methods of configuration.&lt;/p&gt;&lt;p&gt;A small note for people who are using Mono: on Linux, if you bind to an IPv6 address, it will automatically bind to the equivalent IPv4 address as well. In that case, you don’t need to specify two channels, just create a channel for IPv6 and it will listen on IPv4 too. This behaviour is exclusive to Linux, other flavours of Unix (e.g. FreeBSD) don’t do it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/Zbn809pvKPI" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/net_remoting_and_ipv6.aspx</feedburner:origLink></item>
    <item>
      <title>New year trip to Mt. Haguro</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/kx0pcrO8sbM/new_year_trip_to_mt_haguro.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/new_year_trip_to_mt_haguro.aspx</guid>
      <pubDate>Fri, 02 Jan 2009 06:31:40 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/new_year_trip_to_mt_haguro.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=140</wfw:commentRss>
      <description>&lt;p&gt;First of all, happy new year to those of you that still read my increasingly infrequently updated blog! Let's hope 2009 will be a good year.&lt;/p&gt;&lt;p&gt;I certainly got it off to an interesting start, as I took a trip with some friends from the Soshigaya International House. Over four days, we visited several nice places in Tohoku, the north of Honshu, the main island of Japan. We left by night bus, not my favourite method of transportation but it is cheaper than the alternatives (such as Shinkansen) and arrived at Morioka in the morning of the 29th. From there we took a regular bus to Matsukawa Onsen, a small hot spring resort in the mountains. Here we enjoyed the beautiful snowy surroundings and the various hot springs. Taking a bath in an open air hot spring surrounded by snow is certainly a unique experience!&lt;/p&gt;&lt;p&gt;The next day we travelled to Tazawa-ko by train, a town between Morioka and where we would spend new year, to see the lake there, the deepest in Japan or so I've been told. It was funny seeing the beach all covered with snow. The lake itself never freezes, probably due to its depth, although according to legend it's because Princess Tatsuko fell in love with a dragon god and that it's their passionate love making that keeps the lake from freezing over.&lt;/p&gt;&lt;p&gt;On the 31st we took the Shinkansen to Akita, and from there a local train (which was delayed a lot) to Tsuruoka and finally a bus to the top of Mt. Haguro. There we would stay at the temple itself, and attend the fire festival during the night. The festival was very interesting. It involved a competition between two local villages. First some young men from each village would have a debate, which involved enormous amounts of sake, to decide who would run the race later. The winners of the debate (incredibly drunk of course) of each village would race against each other pulling a giant burning rope. There was also a ceremony inside involving monks trying to fly as a bird, and some monk wearing a rabbit mask. Near new year, the temple bell would ring 108 times to get rid of the troubles of the previous year. Finally, another fire was lit at new year itself.&lt;/p&gt;&lt;p&gt;It was an amazing experience and very different from how I usually celebrate new year. I'm glad I could witness it.&lt;/p&gt;&lt;p&gt;So what will 2009 hold? I don't know of course. I do know that the first part will involve lots of bureaucracy as my first two years in Japan come to an end. This means I have to renew my visa (made more complicated by the fact that my passport will also expire this year), and move out of the international house. I've already started looking (online only at the moment) at apartments in the area. I plan to visit a housing agent (which a lot of the international students use because of their low fee and English speaking abilities) next week. Then I'll have to notify everybody like the insurance to the city hall of my address change. So I've certainly got my work cut out for me. Besides my actual research work, that is. :)&lt;/p&gt;&lt;p&gt;There are 50 images attached to this post. &lt;a href="http://www.ookii.org/post/new_year_trip_to_mt_haguro/images/01_morioka_station.jpg.aspx"&gt;Click here to view them&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/kx0pcrO8sbM" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/personal.aspx">Personal</category>
      <category domain="http://www.ookii.org/category/japan.aspx">Japan</category>
    <feedburner:origLink>http://www.ookii.org/post/new_year_trip_to_mt_haguro.aspx</feedburner:origLink></item>
    <item>
      <title>Improving Japanese fonts in Internet Explorer and Firefox on Vista</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/jgsTRcDAPNA/improving_japanese_fonts_in_internet_explorer_and_firefox_on_vista.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/improving_japanese_fonts_in_internet_explorer_and_firefox_on_vista.aspx</guid>
      <pubDate>Fri, 10 Oct 2008 09:32:00 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>5</slash:comments>
      <comments>http://www.ookii.org/post/improving_japanese_fonts_in_internet_explorer_and_firefox_on_vista.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=139</wfw:commentRss>
      <description>&lt;p&gt;If you've visited Japanese sites, you're probably used to the text looking something like this:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.ookii.org/blogfiles/ie_pgothic.png" alt="A webpage using MS PGothic" /&gt;&lt;/p&gt;&lt;p&gt;The font used here is called MS PGothic. It's quite an old font, and it actually uses bitmaps for smaller sizes like that one. This means there's no anti-aliasing at all, including ClearType. So Japanese text ends up looking a lot less nice than western text, especially if you've got ClearType enabled (which you probably do; it's on by default in Vista).&lt;/p&gt;&lt;p&gt;Windows Vista includes a brand new, much better, Japanese font, called Meiryo, which is optimized for screen reading and is fully ClearType enabled. Unfortunately, MS PGothic is still the default Japanese font in both Internet Explorer and Firefox.&lt;/p&gt;&lt;p&gt;Fortunately, we can change that by doing the following:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Click Tools, Internet Options;&lt;/li&gt;&lt;li&gt;Click the Fonts button;&lt;/li&gt;&lt;li&gt;Under Language script, choose Japanese;&lt;/li&gt;&lt;li&gt;Under Webpage font, choose Meiryo;&lt;br /&gt;&lt;img src="http://www.ookii.org/blogfiles/ie_fontsdialog.png" alt="The Internet Explorer fonts dialog" /&gt;&lt;/li&gt;&lt;li&gt;Now, under Language script, choose Chinese (simplified);&lt;/li&gt;&lt;li&gt;Again, set Webpage font to Meiryo.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;You must do this for both Japanese and Chinese, otherwise not all characters will be displayed with the new font. Now your fonts should look something like this:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.ookii.org/blogfiles/ie_meiryo.png" alt="A webpage using Meiryo" /&gt;&lt;/p&gt;&lt;p&gt;You can achieve the same effect in Firefox. The following instructions apply to Firefox 3:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Click Tools, Options;&lt;/li&gt;&lt;li&gt;Click Content;&lt;/li&gt;&lt;li&gt;Under Fonts &amp;amp; Colors, click Advanced;&lt;/li&gt;&lt;li&gt;Set Fonts for to Japanese;&lt;/li&gt;&lt;li&gt;Set the desired fonts to Meiryo;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Of course this only applies to sites that don't specify a font. If a webpage specifies in the HTML or CSS that it wants t use PGothic or another Japanese font, it will use that instead of your selection. In Firefox you can choose to have your choice override whatever font the page specifies; in IE, you cannot.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/jgsTRcDAPNA" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
    <feedburner:origLink>http://www.ookii.org/post/improving_japanese_fonts_in_internet_explorer_and_firefox_on_vista.aspx</feedburner:origLink></item>
    <item>
      <title>Enumerating the lines of a file</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/LkjQ4iOip9A/enumerating_the_lines_of_a_file.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/enumerating_the_lines_of_a_file.aspx</guid>
      <pubDate>Fri, 26 Sep 2008 07:25:52 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>3</slash:comments>
      <comments>http://www.ookii.org/post/enumerating_the_lines_of_a_file.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=138</wfw:commentRss>
      <description>&lt;p&gt;If you've done any programming at all, you'll probably have read a file line by line at some point. Fortunately, most libraries provide an easy way of doing that, and .Net is no exception: the &lt;a href="http://msdn.microsoft.com/en-us/library/system.io.textreader.readline.aspx"&gt;TextReader.ReadLine&lt;/a&gt; method provides what you need. If you've used this method, you'll have written something like the following C# code.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;( &lt;span class="type"&gt;StreamReader&lt;/span&gt; reader = &lt;span class="type"&gt;File&lt;/span&gt;.OpenText(&lt;span class="string"&gt;"myfile.txt"&lt;/span&gt;) )
{
    &lt;span class="keyword"&gt;string&lt;/span&gt; line;
    &lt;span class="keyword"&gt;while&lt;/span&gt;( (line = reader.ReadLine()) != &lt;span class="keyword"&gt;null&lt;/span&gt; )
    {
        &lt;span class="comment"&gt;// Do something with the line&lt;/span&gt;
    }
}&lt;/pre&gt;&lt;p&gt;While it does the job, personally I think it would be nicer and more semantic if we could use the foreach keyword for this. It's possible of course to use File.ReadAllLines for this purpose (we can use foreach to enumerate over the array it returns), but that reads the entire file into memory at once, so it's not a good solution if the file you want to read is big.&lt;/p&gt;&lt;p&gt;Fortunately, we can make it possible to do this with very little code indeed, thanks to &lt;a href="http://msdn.microsoft.com/en-us/library/bb383977.aspx"&gt;extension methods&lt;/a&gt; (introduced in .Net 3.5) and the &lt;a href="http://msdn.microsoft.com/en-us/library/9k7k7cf0.aspx"&gt;yield&lt;/a&gt; keyword (introduced in .Net 2.0).&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="keyword"&gt;public&lt;/span&gt; &lt;span class="keyword"&gt;static&lt;/span&gt; &lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="type"&gt;TextReaderExtensions&lt;/span&gt;
{
    &lt;span class="keyword"&gt;public&lt;/span&gt; &lt;span class="keyword"&gt;static&lt;/span&gt; &lt;span class="type"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span class="keyword"&gt;string&lt;/span&gt;&amp;gt; EnumerateLines(&lt;span class="keyword"&gt;this&lt;/span&gt; &lt;span class="type"&gt;TextReader&lt;/span&gt; reader)
    {
        &lt;span class="keyword"&gt;if&lt;/span&gt;( reader == &lt;span class="keyword"&gt;null&lt;/span&gt; )
            &lt;span class="keyword"&gt;throw&lt;/span&gt; &lt;span class="keyword"&gt;new&lt;/span&gt; &lt;span class="type"&gt;ArgumentNullException&lt;/span&gt;(&lt;span class="string"&gt;"reader"&lt;/span&gt;);

        &lt;span class="keyword"&gt;string&lt;/span&gt; line;
        &lt;span class="keyword"&gt;while&lt;/span&gt;( (line = reader.ReadLine()) != &lt;span class="keyword"&gt;null&lt;/span&gt; )
        {
            &lt;span class="keyword"&gt;yield&lt;/span&gt; &lt;span class="keyword"&gt;return&lt;/span&gt; line;
        }
    }
}&lt;/pre&gt;&lt;p&gt;Note that the extension is defined on TextReader, so you're not limited to using it with StreamReader; you can also use it with StringReader or anything else that inherits from TextReader.&lt;/p&gt;&lt;p&gt;With these few lines of code, we can now use foreach to enumerate over the lines of a file:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;( &lt;span class="type"&gt;StreamReader&lt;/span&gt; reader = &lt;span class="type"&gt;File&lt;/span&gt;.OpenText(&lt;span class="string"&gt;"myfile.txt"&lt;/span&gt;) )
{
    &lt;span class="keyword"&gt;foreach&lt;/span&gt;( &lt;span class="keyword"&gt;string&lt;/span&gt; line &lt;span class="keyword"&gt;in&lt;/span&gt; reader.EnumerateLines() )
    {
        &lt;span class="comment"&gt;// Do something with the line&lt;/span&gt;
    }
}&lt;/pre&gt;&lt;p&gt;While this isn't much shorter than the original, it looks much nicer in my opinion.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/LkjQ4iOip9A" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/enumerating_the_lines_of_a_file.aspx</feedburner:origLink></item>
    <item>
      <title>FormatC source code formatting</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/P-IPj-3YYm0/formatc_source_code_formatting.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/formatc_source_code_formatting.aspx</guid>
      <pubDate>Sat, 06 Sep 2008 09:46:27 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>3</slash:comments>
      <comments>http://www.ookii.org/post/formatc_source_code_formatting.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=137</wfw:commentRss>
      <description>&lt;p&gt;I am proud to announce a new utility here on Ookii.org: &lt;a href="http://www.ookii.org/software/formatc"&gt;FormatC&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;FormatC is a utility that allows you to add syntax highlighting to your C#, Visual Basic, C++, XML, HTML, Transact-SQL or PowerShell source code, so you can publish it on a web page or blog post.&lt;/p&gt;&lt;p&gt;Why does the world need yet another syntax highlighter? Mainly, because of none of the existing .Net based ones had the features I needed. That's right, FormatC is the utility I've been using to format source code for my own blog. So if you read my site you've already seen many examples, including &lt;a href="http://www.ookii.org/post/xml_literals_in_visual_basic_9.aspx"&gt;this one&lt;/a&gt; which demonstrates one of those features I mentioned: Visual Basic XML literals. I dare say I'm one of the first to actually support that, although it does have some limitations (which are mentioned on the &lt;a href="http://www.ookii.org/software/formatc"&gt;FormatC page&lt;/a&gt;). In fact, I have support for all C# 3.0 and Visual Basic 9.0 features, including Linq.&lt;/p&gt;&lt;p&gt;You can format your source code using the interface on my site and simply copy/paste the results into a webpage or blog post, and customize the highlighting by editing the provided style sheet (or simply keep the default). You can also download FormatC as a class library to use in your own application, or look at the source code. It's designed to be easily extensible, so you can add your own languages if you want.&lt;/p&gt;&lt;p&gt;If you use it, let me know what you think.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/P-IPj-3YYm0" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/software.aspx">Software</category>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/formatc_source_code_formatting.aspx</feedburner:origLink></item>
    <item>
      <title>Find As You Type and IE8 beta 2</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/vStcQvc5uj4/find_as_you_type_and_ie8_beta_2.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/find_as_you_type_and_ie8_beta_2.aspx</guid>
      <pubDate>Thu, 28 Aug 2008 08:36:50 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/find_as_you_type_and_ie8_beta_2.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=136</wfw:commentRss>
      <description>&lt;p&gt;
    &lt;img src="http://www.ookii.org/blogfiles/ie_logo.png" alt="Internet Explorer logo" style="float:right" /&gt;
    In case you missed it (which I think is only possible if you read no blogs except mine),
    &lt;a href="http://blogs.msdn.com/ie/archive/2008/08/27/internet-explorer-8-beta-2-now-available.aspx"&gt;Internet Explorer 8 beta 2&lt;/a&gt; was released today. Beta 2 fixes some of the issues that beta 1 had and brings a lot of new stuff
    to the table especially for the casual user (beta 1 really was only a developer preview, after all). It's
    definitely worth checking out.
&lt;/p&gt;
&lt;p&gt;
    Some of you may remember that my &lt;a href="http://www.ookii.org/software/findasyoutype"&gt;Find As You Type&lt;/a&gt; add-on
    didn't exactly work very well in beta 1. So what's the story with beta 2?
&lt;/p&gt;
&lt;p&gt;
    First of all: &lt;strong&gt;IE8 now includes functionality similar to Find As You Type!&lt;/strong&gt; This will surprise
    precisely no one since the feature was originally planned for IE7 but postponed. Now with IE8 beta 2, it's finally
    in there. IE8's new find functionaly works pretty much the same as my FAYT add-on, so there's really not much
    reason to keep using FAYT.
&lt;/p&gt;
&lt;p&gt;
    However, for those of you that do wish to keep using FAYT (for instance for some of features that IE8's new
    built-in find lacks, such as customization, auto-start, and immediate search while using an IME), there is good
    news also: unlike with beta 1, &lt;strong&gt;Find As You Type works fine with IE8 beta 2&lt;/strong&gt;. The only thing that
    appears broken is that if you press CTRL-F when the focus is on the browser chrome (e.g. the address bar or search
    box), the FAYT toolbar does not open, instead IE's own find opens. If you press CTRL-F while a page has focus,
    the FAYT toolbar will open just like it does in IE7. I suspect this has something to do with the modified process
    model that IE8 uses for tabs.
&lt;/p&gt;
&lt;p&gt;
    Please let me know your experiences with FAYT and IE8, if you have any.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/vStcQvc5uj4" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/software.aspx">Software</category>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
    <feedburner:origLink>http://www.ookii.org/post/find_as_you_type_and_ie8_beta_2.aspx</feedburner:origLink></item>
    <item>
      <title>Win an MSDN subscription</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/ZyNwQ87KTZo/win_an_msdn_subscription.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/win_an_msdn_subscription.aspx</guid>
      <pubDate>Sat, 28 Jun 2008 14:22:25 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/win_an_msdn_subscription.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=135</wfw:commentRss>
      <description>&lt;p&gt;My good friend &lt;a href="http://www.liensberger.it/"&gt;Christian Liensberger&lt;/a&gt; is giving away two MSDN Premium with Visual Studio Team System subscriptions, worth nearly $11,000! To be eligable you need to create a short screencast about a Microsoft technology, e.g. &amp;quot;how to get started with Silverlight 2&amp;quot;. The competition runs from July 1st until July 31st. I will be helping with the judging.&lt;/p&gt;&lt;p&gt;See Christian's blog for &lt;a href="http://www.liensberger.it/web/blog/?p=324"&gt;full details&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/ZyNwQ87KTZo" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
      <category domain="http://www.ookii.org/category/programming.aspx">Programming</category>
    <feedburner:origLink>http://www.ookii.org/post/win_an_msdn_subscription.aspx</feedburner:origLink></item>
    <item>
      <title>Windows Search 4.0 released</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/jnxnbTC5auk/windows_search_40_released.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/windows_search_40_released.aspx</guid>
      <pubDate>Wed, 04 Jun 2008 04:36:25 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/windows_search_40_released.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=134</wfw:commentRss>
      <description>&lt;p&gt;Microsoft has just released a new version of Windows Search, which is well worth getting if you have Vista because it's much faster than the built-in Vista search. Searching using the start menu search box feels at least five times faster now!&lt;/p&gt;&lt;p&gt;Get it &lt;a href="http://support.microsoft.com/?kbid=940157"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/jnxnbTC5auk" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
    <feedburner:origLink>http://www.ookii.org/post/windows_search_40_released.aspx</feedburner:origLink></item>
    <item>
      <title>Report your Windows Vista UI annoyances</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/N5ZyWZGYru4/report_your_windows_vista_ui_annoyances.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/report_your_windows_vista_ui_annoyances.aspx</guid>
      <pubDate>Tue, 03 Jun 2008 09:32:04 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.ookii.org/post/report_your_windows_vista_ui_annoyances.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=133</wfw:commentRss>
      <description>&lt;p&gt;&lt;a href="http://www.istartedsomething.com"&gt;Long Zheng&lt;/a&gt; has started the &lt;a href="http://www.istartedsomething.com/taskforce"&gt;Windows UX Taskforce&lt;/a&gt;. The goal: to create a list of all the little UI inconsistencies and annoyances in Windows, so that Microsoft might fix them for Windows 7.&lt;/p&gt;&lt;p&gt;So if there's anything that bothers you about the Windows Vista UI, now's your chance to let people know.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/N5ZyWZGYru4" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/general_computing.aspx">General computing</category>
    <feedburner:origLink>http://www.ookii.org/post/report_your_windows_vista_ui_annoyances.aspx</feedburner:origLink></item>
    <item>
      <title>Send your name to the moon</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/7OMJblP_Qm0/send_your_name_to_the_moon.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/send_your_name_to_the_moon.aspx</guid>
      <pubDate>Fri, 02 May 2008 11:21:15 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/send_your_name_to_the_moon.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=132</wfw:commentRss>
      <description>&lt;p&gt;As you may or may not know, NASA aims to return to the moon. In 2010, the Space Shuttle will fly for the last time, to be succeeded in 2013 by the Orion crew vehicle (part of &lt;a href="http://www.nasa.gov/mission_pages/constellation/main/index.html"&gt;project constellation&lt;/a&gt;), a capsule which looks a lot like a modern version of the Apollo command modules that between 1968 and 1972 sent 24 humans to the moon, half of which walked on it (one major difference is that the Orion will be reusable up to ten times; the Apollo capsules could be used only once).&lt;/p&gt;&lt;p&gt;The Orion will not only be used for supply missions to the International Space Station (taking over those duties from the Space Shuttle), it will also take humans to the moon (no later than 2020, according to NASA). Further plans include establishing a permanent settlement on the moon, learning to live and work on another planet, and to use this knowledge and technology for human exploration of Mars in the first half of the 21st century (again according to NASA). As a fan of space exploration I regret not having witnessed any of the original moon landings, so it would be great if they could pull all this off (especially if they go to Mars in my lifetime that would be awesome).&lt;/p&gt;&lt;p&gt;To gather detailed information about the moon (e.g. about possible landing sites) NASA is first sending the unmanned Lunar Reconnaisance Orbiter. And you can send your name with it. If you register your name on &lt;a href="http://lro.jhuapl.edu/NameToMoon/index.php"&gt;this site&lt;/a&gt;, it will become part of a database that will be put on a chip on the LRO, so your name will be in orbit of the moon.&lt;/p&gt;&lt;p&gt;Yes, it's completely pointless. I don't care, it's just a fun idea. :)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/7OMJblP_Qm0" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/random_stuff.aspx">Random stuff</category>
    <feedburner:origLink>http://www.ookii.org/post/send_your_name_to_the_moon.aspx</feedburner:origLink></item>
    <item>
      <title>Awesome flight simulator video</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/SDbk-wC27e8/awesome_flight_simulator_video.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/awesome_flight_simulator_video.aspx</guid>
      <pubDate>Sun, 20 Apr 2008 03:23:42 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>3</slash:comments>
      <comments>http://www.ookii.org/post/awesome_flight_simulator_video.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=131</wfw:commentRss>
      <description>&lt;p&gt;As some of you know, I play Flight Simulator. I tend to go for the serious, realistic simulation.&lt;/p&gt;&lt;p&gt;This video shows you can also have fun with Flight Simulator when you relax realism a bit. :)&lt;/p&gt;&lt;p&gt;&lt;object type="application/x-shockwave-flash" data="http://www.youtube.com/v/fej9EWWLSsw&amp;amp;rel=1" width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fej9EWWLSsw&amp;amp;rel=1" /&gt;&lt;param name="wmode" value="transparent" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=fej9EWWLSsw"&gt;Watch the video on YouTube&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/SDbk-wC27e8" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/personal.aspx">Personal</category>
      <category domain="http://www.ookii.org/category/random_stuff.aspx">Random stuff</category>
    <feedburner:origLink>http://www.ookii.org/post/awesome_flight_simulator_video.aspx</feedburner:origLink></item>
    <item>
      <title>Okinawa day 11, 12 and 13</title>
      <link>http://feedproxy.google.com/~r/ookii/~3/6OTnDaOgcx8/okinawa_day_11_12_and_13.aspx</link>
      <guid isPermaLink="false">http://www.ookii.org/post/okinawa_day_11_12_and_13.aspx</guid>
      <pubDate>Tue, 01 Apr 2008 13:14:36 GMT</pubDate>
      <dc:creator>Sven Groot</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.ookii.org/post/okinawa_day_11_12_and_13.aspx</comments>
      <wfw:commentRss>http://www.ookii.org/commentrss.ashx?post=130</wfw:commentRss>
      <description>&lt;p&gt;At last, the final set of photo's from my trip to Okinawa. :)&lt;/p&gt;&lt;p&gt;March 9th we planned to go to the Okinawa Churaumi Aquarium, the world's largest tropical aquarium. Because we've been told regular bus fares to the aquarium are expensive, we took an organised tour which also included several other attractions, lunch, and was still cheaper than a normal bus ticket. The tour first took us to Cape Manza, a very nice cliff. After this we had lunch at a hotel (very fancy lunch, very nice) and then went to the aquarium. The aquarium was very impressive indeed, especially the main tank. They had very large manta rays, more than 2 metres across! They are beautiful animals, and they look almost like birds with the swimming motion they make. This can be seen in the video attached to this post.&lt;/p&gt;&lt;p&gt;After the aquarium we went to some castle ruins nearby, not incredibly impressive, and finally to a pineapple park. I think this was mainly a commercial agreement between the bus company and the park. Anyway, they had pineapple ice cream (very nice, although the nicest ice cream flavour we discovered during this vacation: that title goes to sugar cane ice cream, and sweet potato ice cream is also high on the list), and you could taste (and buy, of course) pineapple wine (also very nice) and eat as much pineapple as you liked.&lt;/p&gt;&lt;p&gt;On March 10th, we went whale watching in the morning. Although we did see plenty of whales (or two of them, very often), they didn't jump out of the water, so it was only backs and tails unfortunately. After this we went to the Sefa Utaki, a holy grove, one of the most sacred places in Okinawa apparently. Unfortunately it started raining pretty hard. The end of the day was spent on Kokusai-dori (international street), a big shopping street where we'd been before but hadn't looked around properly yet. This also gave me the chance to buy some sweets (Okinawan brown sugar of coure, what else) which I could take to the lab (it's a custom in most Japanese work places to bring souvenirs (usually food) if you've been on a trip). I think you could survive in Okinawa purely on the free samples they have on this street. :)&lt;/p&gt;&lt;p&gt;The final day, March 11th, is poorly represented in the photographs because my camera's battery died. We visited the peace park and the associated museum. The museum provided great insight into the Japanese involvement in World War 2, and of course the Battle of Okinawa in particular. Most impressively, the museum was very objective, painting neither side of the conflict as good or bad guys. One of the better war museums I've ever visited, on par with the one in London. It's truely amazing the horrors the Okinawan population went through (at the hands of both American and Japanese soldiers) during that battle, where the Japanese attempted to draw out the battle as long as possible to give the mainland forces more time, and were told to fight to the last man rather than surrender. Some 120,000 Okinawans died during the battle.&lt;/p&gt;&lt;p&gt;After the peace park we visited a nearby memorial dedicated to a group of more than 200 middle school girls who were forced to become nurses for the army. The memorial museum paints a horrible picture of how the lives of these ordinary girls were destroyed by the war. They were forced to nurse the wounded soldiers in horrible conditions until they were suddenly discharged near the end of the battle and sent outside into the crossfire. Many were killed, and many simply pressed a grenade to their chest and blew themselves up. Only a handful survived. Reading their stories and seeing the pictures was a very emotionally powerful experience for me, and it was quite obvious the same was true for most visitors.&lt;/p&gt;&lt;p&gt;Finally, we went to the airport to take our flight home. Because we hadn't realised just how late this flight would arrive in Tokyo we were a bit concerned we might not catch the last train, but everything went very smooth, we got our luggage back in no time and had more than half an hour to spare in the end.&lt;/p&gt;&lt;p&gt;And thus ended a fantastic vacation, my longest tourist trip so far in Japan. I've got a feeling this won't have been the last time I've gone to Okinawa (if not during the rest of my stay in Japan, I will certainly return at some later point in my life).&lt;/p&gt;&lt;p&gt;There are 33 images attached to this post. &lt;a href="http://www.ookii.org/post/okinawa_day_11_12_and_13/images/01_turleshaped_rocks_right.jpg.aspx"&gt;Click here to view them&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ookii/~4/6OTnDaOgcx8" height="1" width="1"/&gt;</description>
      <category domain="http://www.ookii.org/category/personal.aspx">Personal</category>
      <category domain="http://www.ookii.org/category/japan.aspx">Japan</category>
    <feedburner:origLink>http://www.ookii.org/post/okinawa_day_11_12_and_13.aspx</feedburner:origLink></item>
  </channel>
</rss>
