<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Goatly.net</title>
    <link>https://www.goatly.net/</link>
    <description>Recent content on Goatly.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>Copyright © Mike Goatly; all rights reserved.</copyright>
    <lastBuildDate>Thu, 26 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.goatly.net/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Obfuscated assemblies and MSIX packaging: the mixed-build trap</title>
      <link>https://www.goatly.net/post/2026/03/obfuscation-wapproj-mixed-assemblies/</link>
      <pubDate>Thu, 26 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2026/03/obfuscation-wapproj-mixed-assemblies/</guid>
      <description>
        
          
            &lt;p&gt;If you&amp;rsquo;re packaging a .NET desktop app for the Windows Store using a WAP (Windows Application Packaging) project, and you&amp;rsquo;re also running an obfuscator as a post-build step, there&amp;rsquo;s a subtle trap waiting for you. The app works perfectly when you run the desktop &lt;code&gt;.exe&lt;/code&gt; directly — but the packaged version crashes immediately on startup with a cryptic native exception.&lt;/p&gt;
&lt;p&gt;This post walks through what&amp;rsquo;s going wrong, how to confirm it with ILSpy, and how to fix it with a small addition to your &lt;code&gt;.wapproj&lt;/code&gt;.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI v7: Eliminating Allocations with CharacterBuffer</title>
      <link>https://www.goatly.net/post/2025/11/lifti-v7-character-buffer/</link>
      <pubDate>Thu, 27 Nov 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2025/11/lifti-v7-character-buffer/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;LIFTI is an open source full text index library for .NET - you can check it out on &lt;a href=&#34;https://github.com/mikegoatly/lifti&#34;&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Performance has always been a core focus for LIFTI. For v7, I looked at the tokenization pipeline and found an opportunity to significantly reduce memory allocations. The solution? Replacing &lt;code&gt;StringBuilder&lt;/code&gt; with a custom &lt;code&gt;CharacterBuffer&lt;/code&gt; backed by &lt;code&gt;ArrayPool&amp;lt;char&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;
&lt;p&gt;During tokenization, LIFTI builds up character sequences from the input text. Previously, this used &lt;code&gt;StringBuilder&lt;/code&gt; - a perfectly reasonable choice, but one that allocates a new string every time you call &lt;code&gt;ToString()&lt;/code&gt;. When indexing 100,000 tokens with 50% duplicates, that&amp;rsquo;s roughly 50,000 unnecessary string allocations for tokens we&amp;rsquo;ve already seen.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI v7: Anchoring Queries to Field Boundaries</title>
      <link>https://www.goatly.net/post/2025/11/lifti-v7-anchor-operators/</link>
      <pubDate>Tue, 25 Nov 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2025/11/lifti-v7-anchor-operators/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;LIFTI is an open source full text index library for .NET - you can check it out on &lt;a href=&#34;https://github.com/mikegoatly/lifti&#34;&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;LIFTI v7 introduces anchor operators that let you constrain matches to the start or end of fields. This feature was requested for exact match scenarios - like finding records where a field contains &lt;em&gt;exactly&lt;/em&gt; one specific value, or where text starts or ends with particular words.&lt;/p&gt;
&lt;h2 id=&#34;the-syntax&#34;&gt;The syntax&lt;/h2&gt;
&lt;p&gt;The anchor operators are simple:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI v7: The And-Not Operator</title>
      <link>https://www.goatly.net/post/2025/11/lifti-v7-and-not-operator/</link>
      <pubDate>Sun, 23 Nov 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2025/11/lifti-v7-and-not-operator/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;LIFTI is an open source full text index library for .NET - you can check it out on &lt;a href=&#34;https://github.com/mikegoatly/lifti&#34;&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;LIFTI v7 introduces a new query operator that&amp;rsquo;s been on my wishlist for a while: the And-Not operator (&lt;code&gt;&amp;amp;!&lt;/code&gt;). This operator allows you to efficiently subtract one set of search results from another - perfect for those &amp;ldquo;find this but not that&amp;rdquo; scenarios.&lt;/p&gt;
&lt;h2 id=&#34;the-use-case&#34;&gt;The use case&lt;/h2&gt;
&lt;p&gt;Imagine you&amp;rsquo;re searching a collection of documents about Paris. You want documents mentioning &amp;ldquo;eiffel&amp;rdquo; but you&amp;rsquo;re specifically &lt;em&gt;not&lt;/em&gt; interested in the tower - maybe you&amp;rsquo;re researching the engineer Gustave Eiffel himself. With the new operator, you can write:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Azure DevOps AzureStaticWebApp: specifying Hugo version</title>
      <link>https://www.goatly.net/post/2025/06/azure-static-web-app-devops-hugo-version/</link>
      <pubDate>Thu, 12 Jun 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2025/06/azure-static-web-app-devops-hugo-version/</guid>
      <description>
        
          
            &lt;p&gt;I use Azure Static Web Apps in a couple of places, this blog and the &lt;a href=&#34;https://www.chordle.com&#34;&gt;Chordle&lt;/a&gt; site. While updating the templates they use,
I found that the deployment builds started to break because the included Hugo version was out of date.&lt;/p&gt;
&lt;p&gt;The first I fixed up was this blog. I was getting this error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;template: partials/func/getStylesBundle.html:4:90: executing &amp;ldquo;partials/func/getStylesBundle.html&amp;rdquo; at &lt;css&gt;: can&amp;rsquo;t evaluate field Sass in type interface {}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is deployed using GitHub actions, and I found &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/static-web-apps/publish-hugo#custom-hugo-version&#34;&gt;this&lt;/a&gt; documentation
helped me resolve it there - I simply had to add the Hugo version as an environment variable to the build task.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Coding With ChatGPT</title>
      <link>https://www.goatly.net/post/2022/12/coding-with-chatgpt/</link>
      <pubDate>Tue, 06 Dec 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2022/12/coding-with-chatgpt/</guid>
      <description>
        
          
            &lt;p&gt;This post is me having a conversation with an AI called &lt;a href=&#34;https://chat.openai.com/chat&#34;&gt;ChatGPT&lt;/a&gt;, using it as a time saving tool for writing code. I&amp;rsquo;d been thinking about some code I needed to write in &lt;a href=&#34;https://github.com/mikegoatly/lifti&#34;&gt;LIFTI&lt;/a&gt;. I knew what I wanted it to do and how I was going to implement it, but as an old friend once told me &amp;ldquo;Just because you know how to do something, doesn&amp;rsquo;t mean it takes zero time&amp;rdquo;. So I figured I&amp;rsquo;d have a bit of fun with ChatGPT.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Creating temporary Azure CLI login sessions</title>
      <link>https://www.goatly.net/post/2022/11/temporary-azure-cli-sessions/</link>
      <pubDate>Tue, 01 Nov 2022 12:26:21 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2022/11/temporary-azure-cli-sessions/</guid>
      <description>
        
          
            &lt;p&gt;The &lt;a href=&#34;https://learn.microsoft.com/en-us/cli/azure/&#34;&gt;Azure CLI&lt;/a&gt; is my preferred way of working with Azure from the command line - I love the
discoverability of the commands. &lt;code&gt;az --help&lt;/code&gt; is always a great reminder of the root commands and I can keep applying &lt;code&gt;--help&lt;/code&gt; as I work my down
the various levels - it&amp;rsquo;s much easier to remember than all the various Az PowerShell commands.&lt;/p&gt;
&lt;p&gt;You always start with an &lt;code&gt;az login&lt;/code&gt; to sign into Azure, but there may be times you need to temporarily connect as another account to the
same subscription. If you use &lt;code&gt;az login&lt;/code&gt; again, you&amp;rsquo;re effectively signing out the previous account and
there&amp;rsquo;s no way to switch back to the original account without going through another &lt;code&gt;az login&lt;/code&gt;.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Custom query parsers in LIFTI</title>
      <link>https://www.goatly.net/post/2022/02/custom-query-parsers-with-lifti/</link>
      <pubDate>Fri, 11 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2022/02/custom-query-parsers-with-lifti/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;LIFTI is an open source full text index library for .NET - you can check it out on &lt;a href=&#34;https://github.com/mikegoatly/lifti&#34;&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The Visual Studio Go To Symbol feature is smart enough that if you miss out letters it can still match with pretty good accuracy:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/images/post/2022/02/visual-studio-searching.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Now that LIFTI support wildcard matching (and &lt;a href=&#34;https://mikegoatly.github.io/lifti/docs/searching/#fuzzy-matching&#34;&gt;fuzzy matching&lt;/a&gt; too!) I thought this would be a good little demonstration of how you could customize LIFTI to behave in a similar way.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Test Your Azure Function Http Trigger Authorization Levels</title>
      <link>https://www.goatly.net/post/2020/12/verify-azure-function-http-auth-level-in-unit-test/</link>
      <pubDate>Thu, 17 Dec 2020 09:24:03 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2020/12/verify-azure-function-http-auth-level-in-unit-test/</guid>
      <description>
        
          
            &lt;p&gt;If you are using HTTP trigger bindings and are relying on keys to secure them using &lt;code&gt;AuthorizationLevel.Function&lt;/code&gt;,
you might want a way verify that you haven&amp;rsquo;t accidentally left one of them exposed
as &lt;code&gt;AuthorizationLevel.Anonymous&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;With a bit of reflection you can accomplish this in a unit test (I&amp;rsquo;m using the excellent &lt;a href=&#34;https://xunit.net/&#34;&gt;xUnit&lt;/a&gt;
and &lt;a href=&#34;https://fluentassertions.com&#34;&gt;FluentAssertions&lt;/a&gt; here):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;[Fact]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;AllHttpTriggerFunctions_MustHaveFunctionSecurity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Get the assembly containing the Azure Functions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;types&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;typeof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Startup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Assembly&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetTypes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Find all the HttpTriggerAttributes associated to any method in any of the types&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// in the assembly&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;httpTriggerAttributes&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;types&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SelectMany&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;t&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;t&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetMethods&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Select&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetParameters&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Select&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetCustomAttribute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpTriggerAttribute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;()).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FirstOrDefault&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Where&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;httpTriggerAttributes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Should&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NotBeEmpty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;foreach&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;httpTrigger&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;httpTriggerAttributes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;httpTrigger&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AuthLevel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Should&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Be&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AuthorizationLevel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s it. Now it&amp;rsquo;s even harder to make a mistake, which is a good thing.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>File Globbing in .NET</title>
      <link>https://www.goatly.net/post/2020/12/file-globbing-in-dotnet/</link>
      <pubDate>Mon, 07 Dec 2020 17:16:21 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2020/12/file-globbing-in-dotnet/</guid>
      <description>
        
          
            &lt;p&gt;If you&amp;rsquo;ve ever written entries in a &lt;code&gt;.gitignore&lt;/code&gt; file, you&amp;rsquo;ve written a glob. They can be simple, e.g. &lt;code&gt;*.so&lt;/code&gt; matching all files with the &lt;code&gt;so&lt;/code&gt; file extension, or a more complex, e.g. &lt;code&gt;**/bar/*.cs&lt;/code&gt; matching files with the &lt;code&gt;cs&lt;/code&gt; extension in folders called &lt;code&gt;bar&lt;/code&gt; anywhere in the search path.&lt;/p&gt;
&lt;p&gt;This is &lt;em&gt;very&lt;/em&gt; different to the simple wildcard patterns that you can apply to the usual .NET IO functions, which only allow for matching wildcards against filenames, e.g. &lt;code&gt;Directory.GetFiles(folder, &amp;quot;*.cs&amp;quot;)&lt;/code&gt;.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Blog Rebuild</title>
      <link>https://www.goatly.net/post/2020/08/blog-rebuild/</link>
      <pubDate>Tue, 25 Aug 2020 17:27:46 +0100</pubDate>
      
      <guid>https://www.goatly.net/post/2020/08/blog-rebuild/</guid>
      <description>
        
          
            &lt;p&gt;Like a phoenix from the ashes this blog has been reborn! I thought it might be
interesting to talk about the new architecture, as well as the process I went through to
migrate it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; I used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hugo to build the site&lt;/li&gt;
&lt;li&gt;Azure Static Web App for hosting&lt;/li&gt;
&lt;li&gt;CloudFlare to deal with the top level domain redirection&lt;/li&gt;
&lt;li&gt;A custom tool called &lt;code&gt;html2md&lt;/code&gt; to convert my old HTML content to markdown.&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;objectives&#34;&gt;Objectives&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use a static site generator&lt;/strong&gt;. As much as I like CMS&amp;rsquo;, for the frequency at which I post
they are overkill. Not having to maintain server side logic and a database is also a win.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep all the old content&lt;/strong&gt;, including dealing with redirects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If possible, use this as an opportunity to try new technologies&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;static-site-generation&#34;&gt;Static Site Generation&lt;/h2&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;Hugo logo:right:inline&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/images/post/2020/08/hugo.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;

I decided to use &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt;, having had some success with it recently while building
the new &lt;a href=&#34;https://mikegoatly.github.io/lifti/&#34;&gt;LIFTI v2 documentation&lt;/a&gt;. I used the &lt;a href=&#34;https://themes.gohugo.io/hugo-clarity/&#34;&gt;Clarity theme&lt;/a&gt;
with some minor customizations, such as swapping out Google Tag Manager for Application Insights to track page views.
You can have a look around the site&amp;rsquo;s code in the &lt;a href=&#34;https://github.com/mikegoatly/goatlydotnet&#34;&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Adding Application Insights to an existing Windows Store project using Visual Studio 2013 Update 3</title>
      <link>https://www.goatly.net/post/2014/08/adding-application-insights-to-an-existing-windows-store-project-using-visual-studio-2013-update-3/</link>
      <pubDate>Thu, 07 Aug 2014 11:55:08 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2014/08/adding-application-insights-to-an-existing-windows-store-project-using-visual-studio-2013-update-3/</guid>
      <description>
        
          
            &lt;p&gt;As of Update 3, Visual Studio 2013 now has support for Application Insights built in, so I thought I’d have a play with it again.&lt;/p&gt;
&lt;p&gt;Right now, my primary focus is adding instrumentation to a &lt;a href=&#34;http://www.chordle.com&#34;&gt;Windows 8 Store app I’m working on&lt;/a&gt;. I’d tried to do it with the previous Application Insights release (which was in preview), but found the need to explicitly build the app for all the various CPU targets a burden I could do without. The release that comes with Update 3 would seem to have fixed this, by allowing you to target Any CPU.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Fixing NuGet errors after removing Microsoft.Bcl.Build</title>
      <link>https://www.goatly.net/post/2014/08/fixing-nuget-errors-after-removing-microsoft-bcl-build/</link>
      <pubDate>Tue, 05 Aug 2014 20:20:36 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2014/08/fixing-nuget-errors-after-removing-microsoft-bcl-build/</guid>
      <description>
        
          
            &lt;p&gt;I found that a solution of mine was still referencing the Microsoft.Bcl.Build nuget project, and as I was using Visual Studio 2013, I figured it was no longer needed, so I removed it. After doing this, some of the projects refused to compile, reporting the error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see &lt;a href=&#34;http://go.microsoft.com/fwlink/?LinkID=317567&#34;&gt;http://go.microsoft.com/fwlink/?LinkID=317567&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;After I remembered that this package modifies the project files a little, I fixed the broken projects by:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using DynaCache with SimpleInjector</title>
      <link>https://www.goatly.net/post/2014/06/using-dynacache-with-simpleinjector/</link>
      <pubDate>Fri, 20 Jun 2014 11:39:50 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2014/06/using-dynacache-with-simpleinjector/</guid>
      <description>
        
          
            &lt;p&gt;&lt;a href=&#34;https://twitter.com/Colly_Mc_K&#34;&gt;@Colly_Mc_K&lt;/a&gt; asked me on twitter (and in my poorly moderated comments feed – sorry, Colly!) if it was possible to use DynaCache with SimpleInjector.&lt;/p&gt;
&lt;p&gt;Although I’ve used SimpleInjector a bit before, I hadn’t actually tried it with DynaCache. It turns out that the sample code for Ninject translates fairly well - here’s a sample bit of code that should do the trick with SimpleInjector:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Customizing table names for IdentityDbContextWithCustomUser data contexts</title>
      <link>https://www.goatly.net/post/2013/09/customizing-table-names-for-identitydbcontextwithcustomuser-data-contexts/</link>
      <pubDate>Mon, 23 Sep 2013 18:53:11 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2013/09/customizing-table-names-for-identitydbcontextwithcustomuser-data-contexts/</guid>
      <description>
        
          
            &lt;p&gt;I was playing around with Visual Studio 2013 and Entity Framework 6 in an MVC 5 application recently, and was impressed with the level of support that is provided out of the box for oAuth. If you create a new ASP.NET MVC 5 site with the Individual User Accounts authentication option and follow all the &lt;a href=&#34;http://go.microsoft.com/fwlink/?LinkId=301864&#34;&gt;instructions on MSDN&lt;/a&gt;, it&amp;rsquo;s trivial getting at least Google authentication working against a new site.&lt;/p&gt;
&lt;p&gt;If you follow the instructions through to the end, you’ll end up having a data context that derives from IdentityDbContextWithCustomUser&lt;TUser&gt;, where TUser is your custom user entity that derives from [NAMESPACE]User.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>PersistedFullTextIndexes with non-primitive types</title>
      <link>https://www.goatly.net/post/2013/05/persistedfulltextindexes-with-non-primitive-types/</link>
      <pubDate>Mon, 27 May 2013 09:03:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2013/05/persistedfulltextindexes-with-non-primitive-types/</guid>
      <description>
        
          
            &lt;p&gt;When you construct a PersistedFullTextIndex with a primitive type, such as int, you just need to define it like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;index&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PersistedFullTextIndex&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filePath&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However if you try to do this with something more complicated, such as a class or even just a Guid, you’ll get an exception like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;Unable to automatically serialize type Guid
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This because the framework doesn’t know how to (de)serialize these types when reading and writing to the backing file. In order to get this working, you have to provide the index with an implementation of ITypePersistence&lt;T&gt; for the type of object that you’ll be serializing.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using DynaCache with Unity</title>
      <link>https://www.goatly.net/post/2013/05/using-dynacache-with-unity/</link>
      <pubDate>Sat, 18 May 2013 11:35:38 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2013/05/using-dynacache-with-unity/</guid>
      <description>
        
          
            &lt;p&gt;I’ve had a couple of people ask for concrete examples of using DynaCache with frameworks other than Ninject. The first one that I’ve put together is for Unity.&lt;/p&gt;
&lt;p&gt;You’ll find the Unity example in the DynaCache documentation &lt;a href=&#34;http://dynacache.codeplex.com/wikipage?title=Example%20using%20Unity&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>StoryboardCompletedTrigger and SetPropertyAction</title>
      <link>https://www.goatly.net/post/2013/03/storyboardcompletedtrigger-and-setpropertyaction/</link>
      <pubDate>Thu, 21 Mar 2013 20:31:59 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2013/03/storyboardcompletedtrigger-and-setpropertyaction/</guid>
      <description>
        
          
            &lt;p&gt;I’ve spent a couple of hours on WinRTTriggers tonight and added a couple of features that have been requested recently, StoryboardCompletedTrigger and SetPropertyAction.&lt;/p&gt;
&lt;h2 id=&#34;storyboardcompletedtrigger&#34;&gt;StoryboardCompletedTrigger&lt;/h2&gt;
&lt;p&gt;This trigger allows to to fire an action when a storyboard completes – you can use it like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;Triggers:StoryboardCompletedTrigger&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Storyboard=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{StaticResource FlashNameChanged}&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c&#34;&gt;&amp;lt;!-- insert your action(s) here --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/Triggers:StoryboardCompletedTrigger&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;setpropertyaction&#34;&gt;SetPropertyAction&lt;/h2&gt;
&lt;p&gt;This allows you to react to a trigger by setting a property on an object – most likely your view model:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Aliens vs Finger</title>
      <link>https://www.goatly.net/post/2013/02/aliens-vs-finger/</link>
      <pubDate>Mon, 25 Feb 2013 19:09:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2013/02/aliens-vs-finger/</guid>
      <description>
        
          
            &lt;p&gt;I&amp;rsquo;ve been working on another game for Windows Phone (7.5+) and the result is &lt;a href=&#34;http://www.windowsphone.com/en-gb/store/app/aliens-vs-finger/02a04b4b-f284-4a6e-a424-33bc25763cc2&#34;&gt;Aliens vs Finger&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;6. MainMenu&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/Media/Default/Windows-Live-Writer/Aliens-vs-Finger_10A9F/6.%20MainMenu_c8552d67-fd44-4227-adcb-223a9ef04d07.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;1. Game1&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/Media/Default/Windows-Live-Writer/Aliens-vs-Finger_10A9F/1.%20Game1_766c17a2-fb1f-4854-9882-b7b509e52b94.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Aliens vs Finger is a (hopefully!) fun tap-&amp;rsquo;em-up game where you have to squish the aliens and stop the meteors crossing the screen, all the while being careful to not hit the friendly spacemen. Although it&amp;rsquo;s in the market place as a paid app (the lowest price possible!) - the entire game is available as an ad-supported trial, so you&amp;rsquo;ve got nothing to lose by giving it a go - only purchase if you enjoy it!&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using Azure Mobile Services from Windows Phone 7 apps</title>
      <link>https://www.goatly.net/post/2012/11/using-azure-mobile-services-from-windows-phone-7-apps/</link>
      <pubDate>Sat, 10 Nov 2012 16:04:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/11/using-azure-mobile-services-from-windows-phone-7-apps/</guid>
      <description>
        
          
            &lt;p&gt;&lt;a href=&#34;http://www.windowsazure.com/en-us/develop/mobile/&#34;&gt;Azure Mobile Services&lt;/a&gt; is an pretty cool platform that I’ve only just started trying out. Microsoft provide quick jumpstart projects for Windows Store, Windows Phone 8 and iOS apps – but that’s it. If you’re like me and are stuck working on a “legacy” app such as the Windows Phone 7 game that I’ve been working on for a couple of weeks now, then you’re largely on your own.&lt;/p&gt;
&lt;p&gt;If you’re in the same situation, I would recommend that you check out the &lt;a href=&#34;https://github.com/kenegozi/azure-mobile-csharp-sdk&#34;&gt;azure-mobile-csharp-sdk&lt;/a&gt; project by &lt;a href=&#34;https://github.com/kenegozi&#34;&gt;Ken Egozi&lt;/a&gt;. It seems to do everything I need – at the moment just querying and inserting - right off the bat, and it looks like the Mono guys have even taken to using this code in the Mono framework, so that’s a good sign as well!&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using WinRTTriggers within data templates</title>
      <link>https://www.goatly.net/post/2012/11/using-winrttriggers-within-data-templates/</link>
      <pubDate>Sat, 03 Nov 2012 13:14:12 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/11/using-winrttriggers-within-data-templates/</guid>
      <description>
        
          
            &lt;p&gt;&lt;a href=&#34;https://www.goatly.net/triggers-in-winrt-xaml#comments&#34;&gt;Kaki104 recently commented&lt;/a&gt; that they were having a problem using triggers in a certain situation. Helpfully a simple repro was provided – a simple grid view, with an attempt to start a storyboard when an item is clicked:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;image&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/Media/Default/Windows-Live-Writer/ab3082f74259_A766/image_3.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The trigger had been placed within the data template of the item:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;DataTemplate&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:Key=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;DataTemplate1&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;Grid&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;HorizontalAlignment=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Left&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Width=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;250&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Height=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;250&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;Grid.Resources&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;Storyboard&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:Key=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;storyboard1&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nt&#34;&gt;&amp;lt;ColorAnimationUsingKeyFrames&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Storyboard.TargetProperty=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;(Border.Background).(SolidColorBrush.Color)&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Storyboard.TargetName=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;border&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nt&#34;&gt;&amp;lt;EasingColorKeyFrame&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;KeyTime=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Value=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#FFB8B5B5&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nt&#34;&gt;&amp;lt;EasingColorKeyFrame&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;KeyTime=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0:0:1&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Value=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#FF3C3B3B&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nt&#34;&gt;&amp;lt;/ColorAnimationUsingKeyFrames&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nt&#34;&gt;&amp;lt;ColorAnimationUsingKeyFrames&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Storyboard.TargetProperty=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;(Panel.Background).(SolidColorBrush.Color)&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Storyboard.TargetName=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;stackPanel&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nt&#34;&gt;&amp;lt;EasingColorKeyFrame&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;KeyTime=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Value=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#A69C5151&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nt&#34;&gt;&amp;lt;EasingColorKeyFrame&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;KeyTime=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0:0:1&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Value=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#A6F9F3F3&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nt&#34;&gt;&amp;lt;/ColorAnimationUsingKeyFrames&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Storyboard&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Grid.Resources&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;t:Interactions.Triggers&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;t:PropertyChangedTrigger&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Binding=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{Binding Title}&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nt&#34;&gt;&amp;lt;t:ControlStoryboardAction&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Action=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Start&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Storyboard=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{StaticResource storyboard1}&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;/t:PropertyChangedTrigger&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/t:Interactions.Triggers&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;Border&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:Name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;border&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Background=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#FF3D3D3D&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;StackPanel&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:Name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;stackPanel&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;VerticalAlignment=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Bottom&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Background=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#A6000000&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;TextBlock&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Text=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{Binding Title}&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Foreground=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{StaticResource ListViewItemOverlayForegroundThemeBrush}&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Style=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{StaticResource TitleTextStyle}&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Height=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;60&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Margin=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;15,0,15,0&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;LayoutUpdated=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;TextBlock_LayoutUpdated_1&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;SelectionChanged=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;TextBlock_SelectionChanged_1&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;TextBlock&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Text=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{Binding Subtitle}&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Foreground=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Style=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{StaticResource CaptionTextStyle}&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;TextWrapping=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;NoWrap&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Margin=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;15,0,15,10&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/StackPanel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Grid&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/DataTemplate&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Interestingly the designer complains that there is an “illegal qualified name character” in the XAML, but when you run the code, everything works as expected.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using LiveDataScript</title>
      <link>https://www.goatly.net/post/2012/10/using-livedatascript/</link>
      <pubDate>Sat, 13 Oct 2012 12:50:47 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/10/using-livedatascript/</guid>
      <description>
        
          
            &lt;p&gt;&lt;a href=&#34;http://www.goatly.net/downloads/livedatascript&#34;&gt;LiveDataScript&lt;/a&gt; is a little utility to generate SQL insert scripts from SQL Server databases. I wrote it quite a few years ago, but since it’s still fairly useful and the last place it was hosted has now gone the way of the Dodo, I’ve re-hosted it &lt;a href=&#34;http://www.goatly.net/downloads/livedatascript&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This post will cover the high-level basics of using the application.&lt;/p&gt;
&lt;h2 id=&#34;getting-started&#34;&gt;Getting started&lt;/h2&gt;
&lt;p&gt;After starting LiveDataScript you’ll be prompted to select the server to connect to:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Conditional trigger actions with WinRTTriggers</title>
      <link>https://www.goatly.net/post/2012/10/conditional-trigger-actions-with-winrttriggers/</link>
      <pubDate>Sun, 07 Oct 2012 20:23:43 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/10/conditional-trigger-actions-with-winrttriggers/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;WinRTTriggers is a available from the &lt;a href=&#34;http://winrttriggers.codeplex.com/&#34;&gt;codeplex project site&lt;/a&gt; or from &lt;a href=&#34;https://nuget.org/packages/WinRTTriggers&#34;&gt;nuget&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Sample code for this post can be &lt;a href=&#34;https://www.goatly.net/Media/Default/Samples/ConditionalActionSample.zip&#34;&gt;downloaded here&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The latest update to WinRTTriggers (v1.1.0) includes 2 big changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple actions can be specified against a trigger&lt;/li&gt;
&lt;li&gt;An action can have conditions associated to it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first point is fairly self explanatory, but the second deserves a bit more elaboration.&lt;/p&gt;
&lt;p&gt;Take the situation where on the first use of your application you want to introduce the user to certain features using a storyboard animation. In the view model you might have some flag to indicate “first use”:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Triggers in WinRT XAML</title>
      <link>https://www.goatly.net/post/2012/09/triggers-in-winrt-xaml/</link>
      <pubDate>Fri, 28 Sep 2012 16:04:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/09/triggers-in-winrt-xaml/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;All the code for WinRTTriggers is available from the &lt;a href=&#34;https://winrttriggers.codeplex.com/&#34;&gt;CodePlex project site&lt;/a&gt;, and is available in binary form in a &lt;a href=&#34;https://nuget.org/packages/WinRTTriggers&#34;&gt;nuget package&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;A few months ago I attended one of Microsoft&amp;rsquo;s &amp;ldquo;Windows Phone to Windows 8 App&amp;rdquo; events. The intent was to take &lt;a href=&#34;http://www.goatly.net/equazor&#34;&gt;Equazor&lt;/a&gt;and migrate it to a Windows Store application as much as possible over the space of two days.&lt;/p&gt;
&lt;p&gt;On the whole, the event was really useful to just hang out with a bunch of other developers (along with some Microsofties like &lt;a href=&#34;http://mtaulty.com/&#34;&gt;Mike Taulty&lt;/a&gt; and &lt;a href=&#34;http://blogs.msdn.com/b/thebeebs/&#34;&gt;Martin Beeby&lt;/a&gt;) and I managed to port all the &amp;ldquo;business logic&amp;rdquo; of the app pretty successfully - you would expect so given that I had used the MVVM pattern with &lt;a href=&#34;http://mvvmlight.codeplex.com/&#34;&gt;MvvmLight&lt;/a&gt;, which is now available for WinRT XAML applications.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Equazor</title>
      <link>https://www.goatly.net/post/2012/09/equazor/</link>
      <pubDate>Thu, 20 Sep 2012 21:08:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/09/equazor/</guid>
      <description>
        
          
            &lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;equazor_equationcomplete&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/Media/Default/Windows-Live-Writer/Equazor_9555/equazor_equationcomplete_3.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
A couple of months ago I released my first Windows Phone game into the wild. It’s a “maths-based puzzle game” that will challenge, infuriate (hopefully not too much!) and with a bit of practice, genuinely develop your mental arithmetic.&lt;/p&gt;
&lt;p&gt;The premise is simple – you have to highlight a sequence of tiles forming an equation that results in a target number. It’s easy to start with, with just add and subtract and a limited number of tiles to play with, but it soon gets harder when the multiplication is introduced and the playing area and target numbers get larger. Oh, and you’re up against the clock, so there is some pressure!&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>New host, new look</title>
      <link>https://www.goatly.net/post/2012/09/new-host-new-look/</link>
      <pubDate>Wed, 19 Sep 2012 19:09:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/09/new-host-new-look/</guid>
      <description>
        
          
            &lt;p&gt;There hasn’t been much activity here for a while for several reasons, including a new job and the small matter of a total server failure for a few months…&lt;/p&gt;
&lt;p&gt;…but now I’m back. I’m on a new host, a new platform (&lt;a href=&#34;http://orchardproject.net/&#34;&gt;Orchard&lt;/a&gt;) and have a new look that I threw together – ok, I’m no professional graphic designer, but hey, it adapts to small screens nicer than the last one did!&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Export all tables in an Access database to CSV</title>
      <link>https://www.goatly.net/post/2012/05/export-all-tables-in-an-access-database-to-csv/</link>
      <pubDate>Tue, 29 May 2012 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/05/export-all-tables-in-an-access-database-to-csv/</guid>
      <description>
        
          
            &lt;p&gt;I don&amp;rsquo;t usually mess around with Access much, but when I do it&amp;rsquo;s usually to have it act as an intermediary data source while I&amp;rsquo;m getting data from one format to another.&lt;/p&gt;
&lt;p&gt;I had just such a problem to solve today, and the usually excellent out-of-the-box import/export processes let me down a little. Essentially I needed to get the data from each of the tables into separate CSV files - unfortunately I had quite a few tables to do and the UI only allows you to do one at a time.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Why have my visual state changes stopped working?</title>
      <link>https://www.goatly.net/post/2012/05/why-have-my-visual-state-changes-stopped-working/</link>
      <pubDate>Tue, 22 May 2012 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/05/why-have-my-visual-state-changes-stopped-working/</guid>
      <description>
        
          
            &lt;p&gt;This took me a little while to work out, and searching for an answer didn&amp;rsquo;t help me out, so I thought it might be helpful to post this as a pointer to anyone else who encounters the same problem.&lt;/p&gt;
&lt;p&gt;My scenario:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Silverlight Windows Phone 7.1 App&lt;/li&gt;
&lt;li&gt;a control with a number of visual states applied to it&lt;/li&gt;
&lt;li&gt;Interaction triggers that switch between the various states&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything was working fine until I wrapped the root element of my control in another container element - all of a sudden the visual states stopped working &lt;em&gt;at runtime&lt;/em&gt;. As far as the designer was concerned, everything was fine though.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Hooking into session start events in an HTTP module</title>
      <link>https://www.goatly.net/post/2012/01/hooking-into-session-start-events-in-an-http-module/</link>
      <pubDate>Wed, 25 Jan 2012 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/01/hooking-into-session-start-events-in-an-http-module/</guid>
      <description>
        
          
            &lt;p&gt;According to the MSDN documentation you can&amp;rsquo;t handle Session Start events in an HTTP module. The reason for this is because when you are initialising an HTTP module you hook into events associated to the HttpApplication class, and HttpApplication doesn&amp;rsquo;t expose any events relating to the starting of sessions.&lt;/p&gt;
&lt;p&gt;As a refresher, the Init method will typically look like something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpApplication&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Hook into the HttpApplication events you want to respond to&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BeginRequest&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BeginRequest&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So it&amp;rsquo;s not possible… right? Wrong, but only if you don&amp;rsquo;t mind a slightly dirty hack.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Article on using SqlBulkCopy with POCOs</title>
      <link>https://www.goatly.net/post/2012/01/article-on-using-sqlbulkcopy-with-pocos/</link>
      <pubDate>Fri, 20 Jan 2012 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/01/article-on-using-sqlbulkcopy-with-pocos/</guid>
      <description>
        
          
            &lt;p&gt;I realised that I never pushed this on my blog at all, so
belatedly I will.&lt;/p&gt;
&lt;p&gt;Last year I wrote an article for Developer Fusion that discussed
how you could make use of SqlBulkCopy to do high performance
inserts when you were working with POCOs, rather than inserting
them entity by entity using an ORM.&lt;/p&gt;
&lt;p&gt;The bottom line was that inserting 10,000 records took only 57ms
using the generic SqlBulkCopy approach I describe, rather than
2159ms to insert them on a record-by-record basis.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>DynaCache- just like page output caching, but for classes</title>
      <link>https://www.goatly.net/post/2012/01/dynacache-just-like-page-output-caching-but-for-classes/</link>
      <pubDate>Sun, 15 Jan 2012 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2012/01/dynacache-just-like-page-output-caching-but-for-classes/</guid>
      <description>
        
          
            &lt;p&gt;Anyone who has done any serious work with any ASP.NET based
framework will know that page output caching is a great feature.
For those not familiar with it, the basic premise is that it makes
sure that the generation of content is done only once for a set of
parameters, and that all subsequent requests with the same
parameters are served up from the cache for a specified period of
time.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Tutorial: Using LIFTI in an MVC 3 web application</title>
      <link>https://www.goatly.net/post/2011/07/tutorial-using-lifti-in-an-mvc-3-web-application/</link>
      <pubDate>Fri, 01 Jul 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/07/tutorial-using-lifti-in-an-mvc-3-web-application/</guid>
      <description>
        
          
            &lt;p&gt;&lt;em&gt;Updated 25/02/2012 - it was highlighted that some of the
seach phrases used towards the end of this article were not
returning the expected results - that was down to me making
assumptions about which words would be stemmed - these examples
have been updated.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This tutorial will take you through an end-to-end implementation
of a simple web site to manage a list of employees. LIFTI will be
used to perform full text searching of plain text information
associated to the employees.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Entity Framework Code First: &#34;The path is not valid. Check the directory for the database&#34;</title>
      <link>https://www.goatly.net/post/2011/06/entity-framework-code-first-the-path-is-not-valid-check-the-directory-for-the-database/</link>
      <pubDate>Mon, 27 Jun 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/06/entity-framework-code-first-the-path-is-not-valid-check-the-directory-for-the-database/</guid>
      <description>
        
          
            &lt;p&gt;If you create a new MVC application and try to go down the Code
First with SQL Server Compact route, you might encounter this error
when you first start the application:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The path is not valid. Check the directory for the
database.**[ Path = …\WebSample\App_Data\YourDatabase.sdf
]&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This error might be a surprise because by default the code first
approach should create the database for you if it doesn&amp;rsquo;t already
exist.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI XmlWordSplitter</title>
      <link>https://www.goatly.net/post/2011/06/lifti-xmlwordsplitter/</link>
      <pubDate>Fri, 10 Jun 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/06/lifti-xmlwordsplitter/</guid>
      <description>
        
          
            &lt;p&gt;The XmlWordSplitter is a new word splitter class in the latest
release of LIFTI. I created it mainly because it was required for
the persisted index sample, but it seemed too useful to keep out of
the core framework.&lt;/p&gt;
&lt;p&gt;At a very high level the XmlWordSplitter just enumerates words
contained within elements in a piece of XML text. This means that
element names, attributes and their associated values will not be
indexed. For example, consider the following XML:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Changes to the LIFTI API</title>
      <link>https://www.goatly.net/post/2011/06/changes-to-the-lifti-api/</link>
      <pubDate>Wed, 08 Jun 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/06/changes-to-the-lifti-api/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;This post relates to the breaking changes between version 0.4
and 0.5 of LIFTI. LIFTI is a full-text indexing library for .NET -
find out more on its &lt;a href=&#34;http://lifti.codeplex.com/&#34;&gt;CodePlex site&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The latest release of LIFTI has several breaking changes that
&lt;strong&gt;will&lt;/strong&gt; affect you, so I wanted to take some time to
explain not only what they are, but why I made them. I&amp;rsquo;ll start
with the what, then move onto the why.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Debugging &#34;The agent process was stopped while the test was running&#34;</title>
      <link>https://www.goatly.net/post/2011/04/debugging-the-agent-process-was-stopped-while-the-test-was-running/</link>
      <pubDate>Mon, 25 Apr 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/04/debugging-the-agent-process-was-stopped-while-the-test-was-running/</guid>
      <description>
        
          
            &lt;p&gt;I&amp;rsquo;ve encountered the unhelpful &amp;ldquo;The agent process was stopped
while the test was running&amp;rdquo; MSTest error result a couple of times
recently, and I thought that I&amp;rsquo;d share a few of my findings and
approaches to debugging the unit tests that cause them.&lt;/p&gt;
&lt;h2 id=&#34;the-mstest-error-result&#34;&gt;The MSTest &amp;ldquo;Error&amp;rdquo; Result&lt;/h2&gt;
&lt;p&gt;In my experience, the Error result usually manifests itself for
one of a two reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A critical error occurred during the execution of the test.
This might be due to something caused by the code executed by the
test, for example a stack overflow error, but it may also occur
when the test framework is unable to execute the test for some
reason, e.g. it is unable to copy dependent files.&lt;/li&gt;
&lt;li&gt;A test caused some code to be executed on &lt;em&gt;another
thread&lt;/em&gt;, and ** an exception occurred on that thread,
not the main test one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first of these is easy to overcome, as I&amp;rsquo;ll show later,
however the second can, under some circumstances, be much trickier
to diagnose.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using Windows Live Mesh to synchronize your draft blog posts</title>
      <link>https://www.goatly.net/post/2011/04/using-windows-live-mesh-to-synchronize-your-draft-blog-posts/</link>
      <pubDate>Tue, 12 Apr 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/04/using-windows-live-mesh-to-synchronize-your-draft-blog-posts/</guid>
      <description>
        
          
            &lt;p&gt;I use Windows Live Writer to put together all my blog posts, but
I also use multiple computers. I&amp;rsquo;ll sometimes find myself writing a
draft post on one computer and wanting to carry on editing it on
another.&lt;/p&gt;
&lt;p&gt;Live Writer stores draft posts in &lt;em&gt;Documents\My Weblog
Posts\Drafts&lt;/em&gt;, and in the past I&amp;rsquo;ve just manually copied these
draft files from one computer to another, however it recently
occurred to me that I could use Windows Live Mesh to automate this
for me. I&amp;rsquo;ll show you how you can do it too.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Describing the LIFTI persistence file format</title>
      <link>https://www.goatly.net/post/2011/04/describing-the-lifti-persistence-file-format/</link>
      <pubDate>Fri, 08 Apr 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/04/describing-the-lifti-persistence-file-format/</guid>
      <description>
        
          
            &lt;p&gt;This post will break down how the data in a LIFTI persisted full
text index is structured on disk. It might be a bit dry for some,
so I&amp;rsquo;ve tried to spice it up as much as possible with pretty
pictures!&lt;/p&gt;
&lt;h2 id=&#34;birds-eye-view&#34;&gt;Birds-eye view&lt;/h2&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;image&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/images/post/2011/04/Windows-Live-Writer_Structure-of-the-LIFTI-page-data_C4E8_image_thumb.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The file is broken up into two areas, headers and page data.
Each data page is is 8Kb in length and contains 1 or more entries.
(The only time you might find a page that is not marked as unused
and still contains 0 entries is when the index is completely
empty.)&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Persisting GetHashCode values is a staggeringly bad thing to do, and you should know better</title>
      <link>https://www.goatly.net/post/2011/04/persisting-gethashcode-values-is-a-staggeringly-bad-thing-to-do-and-you-should-know-better/</link>
      <pubDate>Mon, 04 Apr 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/04/persisting-gethashcode-values-is-a-staggeringly-bad-thing-to-do-and-you-should-know-better/</guid>
      <description>
        
          
            &lt;p&gt;The title pretty much sums up my feelings on the subject, but it
probably needs a bit of context.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been doing some work for a client that relies on a 3rd
party application framework (No, I&amp;rsquo;m not going to name and shame
the framework!). The application is split across multiple servers
and we&amp;rsquo;ve been upgrading some of them to a 64bit environment. Once
we had completed the upgrade process, other parts of the
application, &lt;em&gt;on other servers&lt;/em&gt;, started breaking.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Implementing a persisted file store for LIFTI</title>
      <link>https://www.goatly.net/post/2011/03/implementing-a-persisted-file-store-for-lifti/</link>
      <pubDate>Tue, 29 Mar 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/03/implementing-a-persisted-file-store-for-lifti/</guid>
      <description>
        
          
            &lt;p&gt;Over a month ago I started to write a persisted file store for
LIFTI. Given that I&amp;rsquo;d pretty much just finished implementing binary
serialization for indexes, why would I want to do that?&lt;/p&gt;
&lt;h2 id=&#34;serialization-vs-persistence&#34;&gt;Serialization vs. persistence&lt;/h2&gt;
&lt;p&gt;I wrote the serialization classes because I knew that it wasn&amp;rsquo;t
always going to be appropriate to re-index all the data every time
an application started up. These classes allowed for the current
state of an index to be saved to and reloaded from disk. This meant
that when the application &lt;strong&gt;exited&lt;/strong&gt;, a developer
could save what was currently in the index and reload it the next
time it started. The problem for me lies in the word
&lt;strong&gt;exited&lt;/strong&gt;. At what point would you persist your index
if you application crashed?&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Problems programatically creating AppPool</title>
      <link>https://www.goatly.net/post/2011/03/problems-programatically-creating-apppool/</link>
      <pubDate>Mon, 21 Mar 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/03/problems-programatically-creating-apppool/</guid>
      <description>
        
          
            &lt;p&gt;I was creating an AppPool using the Microsoft.Web.Administration
assembly today and kept running into this in the Application event
log:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The worker process failed to initialize correctly and therefore
could not be started. The data is the error.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The only &amp;ldquo;helpful&amp;rdquo; code that was provided in the event data was
&lt;strong&gt;57000780&lt;/strong&gt;. Not great, but it was at least
consistent.&lt;/p&gt;
&lt;p&gt;It turns out that the ManagedRuntimeVersion property of the
ApplicationPool object is case sensitive, so setting it to
&lt;strong&gt;V4.0&lt;/strong&gt; just won&amp;rsquo;t cut it - it has to be
&lt;strong&gt;v4.0&lt;/strong&gt;. Unfortunately it won&amp;rsquo;t tell you that
something is wrong if you do set it to the wrong value - it just
blows up when you first try to access an application that uses
it.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>NotSupportedException when calling EndGetResponse in Silverlight</title>
      <link>https://www.goatly.net/post/2011/03/notsupportedexception-when-calling-endgetresponse-in-silverlight/</link>
      <pubDate>Fri, 18 Mar 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/03/notsupportedexception-when-calling-endgetresponse-in-silverlight/</guid>
      <description>
        
          
            &lt;p&gt;This one had me stumped for a little while today. I was using a
WebRequest in a Silverlight 4 application to post some data to an
API endpoint, and whenever I called EndGetResponse, a
NotSupportedException was thrown.&lt;/p&gt;
&lt;p&gt;To help illustrate the problem, here&amp;rsquo;s a mock-up of the
code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System.Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System.Windows.Controls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;SilverlightApplication1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;partial&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;MainPage&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UserControl&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MainPage&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;InitializeComponent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpWebRequest&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WebRequest&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Create&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;http://myapi.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Method&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;POST&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;myPostData&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;byte&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ContentLength&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;myPostData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BeginGetRequestStream&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;n&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;stream&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EndGetRequestStream&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;stream&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;myPostData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;myPostData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BeginGetResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;GetResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IAsyncResult&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpWebRequest&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AsyncState&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;response&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EndGetResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;34&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;35&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// Get data from the response stream, etc.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;36&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;37&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;38&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After a brief spell of head-scratching, I got to the root of the
problem: &lt;strong&gt;the request stream wasn&amp;rsquo;t being closed before the
call to EndGetResponse&lt;/strong&gt;. This meant that as far as the
WebRequest was concerned, it was still sending data to the server
when I tried to get the response. A NotSupportedException is
probably not the most appropriate exception to be thrown in this
situation, but there you go.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Debugging bad request errors-Windows Live SDK</title>
      <link>https://www.goatly.net/post/2011/02/debugging-bad-request-errors-windows-live-sdk/</link>
      <pubDate>Wed, 02 Feb 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/02/debugging-bad-request-errors-windows-live-sdk/</guid>
      <description>
        
          
            &lt;p&gt;&lt;em&gt;Important note - this code is &lt;strong&gt;not&lt;/strong&gt; to be
considered production quality - as always feel free to use it, but
please take it with a handful of salt. In my experience working
with these sorts of APIs can be a real killer if you&amp;rsquo;re not
extremely careful about how you write your code.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re making calls to the live.com endpoints from .NET
code, you&amp;rsquo;ll probably be doing something like this:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Building a debugger visualizer for generic types</title>
      <link>https://www.goatly.net/post/2011/01/building-a-debugger-visualizer-for-generic-types/</link>
      <pubDate>Mon, 31 Jan 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/01/building-a-debugger-visualizer-for-generic-types/</guid>
      <description>
        
          
            &lt;p&gt;&lt;em&gt;&lt;strong&gt;You can find the source code relating to this
post&lt;/strong&gt;&lt;a href=&#34;https://www.goatly.net/media/1021/genericdebuggervisualizer.zip&#34;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&lt;/em&gt;&lt;em&gt;.&lt;/em&gt;**&lt;/p&gt;
&lt;p&gt;Since Visual Studio 2005 we have been able to write debugger
visualizers to help us look at data in a more convenient way whilst
debugging.&lt;/p&gt;
&lt;p&gt;A while ago I needed to write a visualizer for &lt;a href=&#34;http://lifti.codeplex.com/&#34;&gt;LIFTI&lt;/a&gt; - the
problem that I had was that the type I wanted to visualize was
generic, and it&amp;rsquo;s not straightforward to write a visualizer for a
generic type. I thought it would be useful to explain my approach
to this solution for others to follow.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Performance tuning using Visual Studio 2010</title>
      <link>https://www.goatly.net/post/2011/01/performance-tuning-using-visual-studio-2010/</link>
      <pubDate>Tue, 25 Jan 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/01/performance-tuning-using-visual-studio-2010/</guid>
      <description>
        
          
            &lt;p&gt;In this post I&amp;rsquo;ll be showing you how to use Visual Studio 2010
performance analysis tools to find slow parts in your code, make
changes and then verify that those fixes have actually been
beneficial.&lt;/p&gt;
&lt;p&gt;I will be analyzing the LIFTI code as of change set &lt;a href=&#34;http://lifti.codeplex.com/SourceControl/changeset/changes/54973&#34;&gt;
54973&lt;/a&gt;, so if you want to you can download it and follow along,
although the general principles will be the same regardless of
project.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Writing multi-threaded unit tests</title>
      <link>https://www.goatly.net/post/2011/01/writing-multi-threaded-unit-tests/</link>
      <pubDate>Sun, 16 Jan 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/01/writing-multi-threaded-unit-tests/</guid>
      <description>
        
          
            &lt;p&gt;In my &lt;a href=&#34;https://www.goatly.net/2011/1/11/implementing-thread-safety-in-lifti.aspx&#34;&gt;last blog post&lt;/a&gt; I described how I implemented
the lock manager in &lt;a href=&#34;http://lifti.codeplex.com/&#34;&gt;LIFTI&lt;/a&gt;. This was pretty straightforward because
ReaderWriterLockSlim was leveraged to do all of the really heavy
lifting, but the hard part came when I wanted to unit test the
code.&lt;/p&gt;
&lt;p&gt;This post will take you through the thought and implementation
process I went through to make this happen.&lt;/p&gt;
&lt;h2 id=&#34;test-cases&#34;&gt;Test cases&lt;/h2&gt;
&lt;p&gt;The four key scenarios I wanted to test were:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Implementing thread safety in LIFTI</title>
      <link>https://www.goatly.net/post/2011/01/implementing-thread-safety-in-lifti/</link>
      <pubDate>Tue, 11 Jan 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/01/implementing-thread-safety-in-lifti/</guid>
      <description>
        
          
            &lt;p&gt;I&amp;rsquo;ve wanted to get a bit of thread-safety going in LIFTI for a
little while now because one of the my target scenarios was for the
index to be hosted in a website.&lt;/p&gt;
&lt;p&gt;The index is already thread safe for concurrent reads, but it
would definitely be a really bad thing if we started mixing
concurrent writes with our reads, not least because LIFTI makes
heavy use of the generic Dictionary class. (The Thread Safety
section of the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#34;&gt;documentation&lt;/a&gt; specifically calls this out)&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI-Changes ahoy</title>
      <link>https://www.goatly.net/post/2011/01/lifti-changes-ahoy/</link>
      <pubDate>Wed, 05 Jan 2011 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2011/01/lifti-changes-ahoy/</guid>
      <description>
        
          
            &lt;p&gt;Happy new year! If anyone has been following the recent
check-ins that have been happening over on the &lt;a href=&#34;http://lifti.codeplex.com/&#34;&gt;LIFTI CodePlex
site&lt;/a&gt; will have noticed quite a bit of activity over the
Christmas period. In this article, I&amp;rsquo;ll try to summarise what those
changes have been and why they were introduced in the way that they
were.&lt;/p&gt;
&lt;p&gt;In short, these changes are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query parsing&lt;/li&gt;
&lt;li&gt;Updatable indexes&lt;/li&gt;
&lt;li&gt;Index serialization and de-serialization&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;breaking-changes&#34;&gt;Breaking Changes&lt;/h2&gt;
&lt;p&gt;Before I go any further, it&amp;rsquo;s probably
worth noting this: the only breaking change (that comes to mind
now…) is that the FullTextIndexer class has been renamed
FullTextIndex. The bottom line is that it just feels better I
wanted to change it before it was in too much use.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Advanced querying with LIFTI</title>
      <link>https://www.goatly.net/post/2010/12/advanced-querying-with-lifti/</link>
      <pubDate>Fri, 24 Dec 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/12/advanced-querying-with-lifti/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;As always, you can find the LIFTI project at its CodePlex home:
&lt;a href=&#34;http://lifti.codeplex.com&#34;&gt;http://lifti.codeplex.com&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Until now, the way in which you can query against LIFTI has been
pretty basic. If you searched for &amp;ldquo;apple orange&amp;rdquo;, you would only
get items back that had words starting with &lt;strong&gt;both&lt;/strong&gt;
apple and orange in their associated text.&lt;/p&gt;
&lt;p&gt;For simple scenarios this is fine, but what if you wanted to
search for apple &lt;strong&gt;or&lt;/strong&gt; orange? What if you actually
wanted both apple and orange, but they had to be near to each
other? Well I have a extra special treat for you this
Christmas.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>401 Unauthorized when Acquiring an Access Token: Windows Live SDK</title>
      <link>https://www.goatly.net/post/2010/12/401-unauthorized-when-acquiring-an-access-token-windows-live-sdk/</link>
      <pubDate>Thu, 23 Dec 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/12/401-unauthorized-when-acquiring-an-access-token-windows-live-sdk/</guid>
      <description>
        
          
            &lt;p&gt;Working with other people is hard. Working with new SDK
documentation is even harder, especially when it&amp;rsquo;s wrong.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re following the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/ff749624.aspx&#34;&gt;Working with OAuth WRAP&lt;/a&gt; Windows Live SDK
documentation and you get to the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/ff750952.aspx&#34;&gt;Acquiring an Access Token&lt;/a&gt; sample you&amp;rsquo;ll
probably encounter a 401 unauthorized error when you try and read
the response from
&lt;em&gt;https://consent.live.com/AccessToken.aspx&lt;/em&gt;. This is because
the POST data that the sample code gets you to build up is
incorrect.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI and Porter stemming</title>
      <link>https://www.goatly.net/post/2010/12/lifti-and-porter-stemming/</link>
      <pubDate>Tue, 07 Dec 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/12/lifti-and-porter-stemming/</guid>
      <description>
        
          
            &lt;p&gt;Back in the &lt;a href=&#34;https://www.goatly.net/2010/1/29/creating-a-lightweight-in-memory-full-text-indexer.aspx&#34;&gt;original post&lt;/a&gt; where I first introduced LIFTI I
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;LIFTI will not...:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Handle word derivatives, e.g. if &amp;ldquo;Cats&amp;rdquo; is searched for,
objects containing just the word &amp;ldquo;Cat&amp;rdquo; would not be returned.&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;
&lt;p&gt;This was always something that I wanted to handle, but felt that
it was better to have a simple system that actually worked than an
incomplete complex system. I&amp;rsquo;ve been a bit slack in updating the
LIFTI code, but this has always been at the top of my list of
things to implement.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using T4 to generate content at runtime</title>
      <link>https://www.goatly.net/post/2010/11/using-t4-to-generate-content-at-runtime/</link>
      <pubDate>Fri, 19 Nov 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/11/using-t4-to-generate-content-at-runtime/</guid>
      <description>
        
          
            &lt;p&gt;&lt;strong&gt;UPDATE 9 April 2014: The source is also available on &lt;a href=&#34;https://github.com/mikegoatly/T4TemplateSample&#34;&gt;GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/Text_Template_Transformation_Toolkit&#34;&gt;T4 (the &lt;strong&gt;T&lt;/strong&gt;ext &lt;strong&gt;T&lt;/strong&gt;emplate &lt;strong&gt;T&lt;/strong&gt;ransformation &lt;strong&gt;T&lt;/strong&gt;oolkit)&lt;/a&gt; is slowly becoming more widely known as a way to generate code to be compiled and used alongside hand-written code. Frameworks such as the Entity Framework V4 have adopted it for its code generation, allowing you to simply switch out the default class template for an alternative, e.g. POCO entity classes.&lt;/p&gt;
&lt;p&gt;Whilst it seems to be fairly well known that T4 can be used to generate output at design time, it is less well known that you can actually use a T4 template &lt;em&gt;at runtime&lt;/em&gt; as well. An example where you might want to do this is the generation of email content - this article will demonstrate how you might go about this.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>LIFTI: Searching Pascal-cased words</title>
      <link>https://www.goatly.net/post/2010/11/lifti-searching-pascal-cased-words/</link>
      <pubDate>Thu, 18 Nov 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/11/lifti-searching-pascal-cased-words/</guid>
      <description>
        
          
            &lt;p&gt;This post will show how LIFTI can be adapted to index and search
upon Pascal-cased words, similar to Visual Studio 2010&amp;rsquo;s &lt;strong&gt;&lt;a href=&#34;http://blogs.msdn.com/b/zainnab/archive/2010/01/20/how-to-use-navigate-to-vstiptool0006.aspx&#34;&gt;
Navigate To&lt;/a&gt;&lt;/strong&gt; window. (Or Resharper&amp;rsquo;s &lt;strong&gt;&lt;a href=&#34;http://stackoverflow.com/questions/1371241/can-resharper-navigate-to-a-method/1371262#1371262&#34;&gt;
Go to symbol&lt;/a&gt;&lt;/strong&gt; command, if you&amp;rsquo;re so inclined)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The code for this sample can be found in the Lifti
solution:&lt;/em&gt;&lt;a href=&#34;http://lifti.codeplex.com/SourceControl/list/changesets&#34;&gt;*
http://lifti.codeplex.com/SourceControl/list/changesets*&lt;/a&gt;&lt;em&gt;- you&amp;rsquo;ll find the sample project in the Samples solution
folder:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;picture&gt;

    
      
        
        
        
        
        
        
    &lt;img
      loading=&#34;lazy&#34;
      decoding=&#34;async&#34;
      alt=&#34;image_thumb9_thumb&#34;
      
        class=&#34;image_figure image_internal image_unprocessed&#34;
        src=&#34;https://www.goatly.net/images/post/2010/11/Windows-Live-Writer_1d2ddffacd3c_75BC_image_thumb9_thumb_thumb.png&#34;
      
      
    /&gt;

    &lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The way the default word splitter works is by breaking a phrase
into separate words wherever whitespace characters appear - by
changing this behaviour to break on changes in capitalisation,
we&amp;rsquo;re pretty much all the way there:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Errors using a custom RIA authentication service (and how to resolve them)</title>
      <link>https://www.goatly.net/post/2010/06/errors-using-a-custom-ria-authentication-service-and-how-to-resolve-them/</link>
      <pubDate>Wed, 30 Jun 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/06/errors-using-a-custom-ria-authentication-service-and-how-to-resolve-them/</guid>
      <description>
        
          
            &lt;p&gt;If you&amp;rsquo;ve created your own authentication service for a
Silverlight RIA application, you might encounter the following
scenarios:&lt;/p&gt;
&lt;p&gt;1) If you get the following errors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GetUser should have returned a single user&lt;/li&gt;
&lt;li&gt;Logout should have returned a single, anonymous user&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then the chances are your implementation of GetDefaultUser is
returning null.&lt;/p&gt;
&lt;p&gt;2) However, if you get these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Load operation failed for query &amp;lsquo;GetUser&amp;rsquo;. Entity &amp;lsquo;User : null&amp;rsquo;
cannot be added to cache because it doesn&amp;rsquo;t have a valid
identity&lt;/li&gt;
&lt;li&gt;Load operation failed for query &amp;lsquo;Logout&amp;rsquo;. Entity &amp;lsquo;User : null&amp;rsquo;
cannot be added to cache because it doesn&amp;rsquo;t have a valid
identity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then you&amp;rsquo;re probably returning a user object that has a null
Name.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Creating a lightweight in-memory full text indexer</title>
      <link>https://www.goatly.net/post/2010/01/creating-a-lightweight-in-memory-full-text-indexer/</link>
      <pubDate>Fri, 29 Jan 2010 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2010/01/creating-a-lightweight-in-memory-full-text-indexer/</guid>
      <description>
        
          
            &lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;SQL Server provides a really powerful full text index feature
whereby you can run queries along the lines of &lt;em&gt;&amp;ldquo;find me
comments that contain the words &amp;lsquo;success&amp;rsquo; and &amp;lsquo;happy&amp;rsquo;&amp;rdquo;&lt;/em&gt;. That&amp;rsquo;s
all well and good when you are using SQL Server to retrieve data,
but what do you do if you&amp;rsquo;re using some other data store, e.g. SQL
Server Compact, a flat file, or even a set of .NET objects, and
need to do something similar? In this sort of situation it would be
helpful to be able to construct a searchable object model from your
data, whatever that may be.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Using a recursive CTE to read the root parent id of a hierarchical table</title>
      <link>https://www.goatly.net/post/2009/12/using-a-recursive-cte-to-read-the-root-parent-id-of-a-hierarchical-table/</link>
      <pubDate>Tue, 08 Dec 2009 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2009/12/using-a-recursive-cte-to-read-the-root-parent-id-of-a-hierarchical-table/</guid>
      <description>
        
          
            &lt;p&gt;&lt;em&gt;Note that this post could be considered the second part in
my previously incredibly short series of 1 posts: Good Uses for SQL
Server 2005 Common Table Expressions - previous entries
being:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.goatly.net/%7BlocalLink:1078%7D&#34;&gt;&lt;em&gt;Part 1 - Determining the top and bottom n pieces of information
in a set&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.goatly.net/%7BlocalLink:1071%7D&#34;&gt;&lt;em&gt;Part 0 - Introduction&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;Ok, so the title of the post is a bit of a mouthful - sorry
about that. I was asked this as a question today, and as it had
been a little while since I had looked at CTEs I thought it would
be a good exercise to sit down and work it out.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>How to determine the version of IIS</title>
      <link>https://www.goatly.net/post/2009/03/how-to-determine-the-version-of-iis/</link>
      <pubDate>Mon, 09 Mar 2009 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2009/03/how-to-determine-the-version-of-iis/</guid>
      <description>
        
          
            &lt;p&gt;It took me far too long to work this out; I needed to know
whether or not it was safe to try and set the ManagedPipelineMode
property on an AppPool, and I figured the best way to do it would
be to check the current IIS version and if it was 7.0 or above. The
code to get the current version is straightforward, once you know
the names of the properties to read:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Creating MSBuild XSD schemas for your custom tasks</title>
      <link>https://www.goatly.net/post/2008/12/creating-msbuild-xsd-schemas-for-your-custom-tasks/</link>
      <pubDate>Mon, 08 Dec 2008 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2008/12/creating-msbuild-xsd-schemas-for-your-custom-tasks/</guid>
      <description>
        
          
            &lt;blockquote&gt;
&lt;p&gt;Update 12/10/2012 - Since the LSS website is no longer active, I&amp;rsquo;ve moved the download to this site.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I&amp;rsquo;ve just uploaded a little utility onto our website here&lt;a href=&#34;http://www.goatly.net/Downloads/MSBuildSchemaGen&#34;&gt;the downloads section on this site&lt;/a&gt; that should help those developers that write their own MSBuild tasks.&lt;/p&gt;
&lt;p&gt;One of the nice features that&amp;rsquo;s a little hidden in Visual Studio is its ability to provide IntelliSense and auto-completion for XML files based on the schemas that they reference, as long as the reference XSDs are included in &lt;strong&gt;{ProgramFiles}\{MicrosoftVisualStudioFolder}\Xml\Schemas\1033&lt;/strong&gt;. MSBuild scripts are XML, and as such it&amp;rsquo;s possible to provide information about custom tasks that you&amp;rsquo;ve written - the only problem is that whilst writing XSD schemas isn&amp;rsquo;t exactly difficult, it can be quite involved if there are a lot of tasks that you want to expose, and keeping them in sync with your code as it changes over time can be a pain.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Collapsing Visual Studio Solution Explorer to Project Definitions</title>
      <link>https://www.goatly.net/post/2008/01/collapsing-visual-studio-solution-explorer-to-project-definitions/</link>
      <pubDate>Wed, 23 Jan 2008 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2008/01/collapsing-visual-studio-solution-explorer-to-project-definitions/</guid>
      <description>
        
          
            &lt;p&gt;Here&amp;rsquo;s a little macro I&amp;rsquo;ve just knocked up that will collapse a
Visual Studio Solution to just its project definitions - put here
so you can use it too and I have access to it everywhere I
work!&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Sub&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;CollapseToProjects&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Dim&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;As&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UIHierarchyItems&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Dim&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;As&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Integer&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Get&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;root&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Solution&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;node&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;DTE&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToolWindows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SolutionExplorer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UIHierarchyItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;If&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Count&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Then&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Get&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;all&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;nodes&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;under&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;solution&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;node&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UIHierarchyItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;For&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;To&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Count&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Recursively&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;collapse&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;any&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;expanded&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;CollapseItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UIHierarchyItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Next&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;End&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;If&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;End&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sub&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Private&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sub&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;CollapseItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ByVal&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;As&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UIHierarchyItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Dim&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;As&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Integer&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Only&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mess&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;with&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;it&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;already&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;expanded&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;If&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Expanded&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Then&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Recurse&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;into&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;collapse&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;any&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;children&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;For&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;To&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Count&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;CollapseItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UIHierarchyItems&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Next&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Collapse&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Expanded&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;False&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;End&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;If&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;End&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sub&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Good Uses for SQL Server 2005 Common Table Expressions (Part 1)</title>
      <link>https://www.goatly.net/post/2008/01/good-uses-for-sql-server-2005-common-table-expressions-part-1/</link>
      <pubDate>Fri, 11 Jan 2008 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2008/01/good-uses-for-sql-server-2005-common-table-expressions-part-1/</guid>
      <description>
        
          
            &lt;p&gt;Previous posts in this series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.goatly.net/%7BlocalLink:1071%7D&#34;&gt;
Part 0 - Introduction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;determining-the-top-and-bottom-n-pieces-of-information&#34;&gt;Determining the top and bottom &lt;em&gt;n&lt;/em&gt; pieces of information&lt;/h3&gt;
&lt;p&gt;in a set&lt;/p&gt;
&lt;p&gt;This scenario involves a set that has a column with both
positive and negative ranges of data. The requirement is to filter
it such that the only rows returned are those with the 3 highest
positive and 3 lowest negative values - basically the two
extremes.&lt;/p&gt;
&lt;h4 id=&#34;the-sample-data&#34;&gt;The sample data&lt;/h4&gt;
&lt;p&gt;The data I&amp;rsquo;ll be working with in this example is in a table
called &lt;strong&gt;SampleData&lt;/strong&gt;, which contains:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Good Uses for SQL Server 2005 Common Table Expressions (Part 0)</title>
      <link>https://www.goatly.net/post/2008/01/good-uses-for-sql-server-2005-common-table-expressions-part-0/</link>
      <pubDate>Thu, 10 Jan 2008 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2008/01/good-uses-for-sql-server-2005-common-table-expressions-part-0/</guid>
      <description>
        
          
            &lt;p&gt;A significant portion of my time as a developer is taken up
looking into different approaches solving problems with newer
technologies. Often it feels like I&amp;rsquo;m trying to understand the
solution to a problem I haven&amp;rsquo;t yet defined, but I accept this
because I look upon it as adding tools to my arsenal that I can
draw upon when an appropriate situation arises.&lt;/p&gt;
&lt;p&gt;One such solution I&amp;rsquo;ve been aware of for a while now is the new
Common Table Expressions (CTEs) feature and related Ranking and
Windowing functions in SQL Server 2005, and I&amp;rsquo;ve recently found
myself stuck with problems that are these features solve nicely.
Although there are traditional tricks that work as well, usually
involving cursors, Ranking and Windowing provide a very neat
solution.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Determining Framework SDK Path</title>
      <link>https://www.goatly.net/post/2007/08/determining-framework-sdk-path/</link>
      <pubDate>Mon, 06 Aug 2007 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2007/08/determining-framework-sdk-path/</guid>
      <description>
        
          
            &lt;p&gt;Something I&amp;rsquo;ve needed to do a couple of times now is
programmatically work out where the the Framework SDK is installed.
Each time I have to find an example from an old project, because I
can never remember exactly how I did it before, so for posterity
(and to save me searching again), I&amp;rsquo;m posting it up here.&lt;/p&gt;
&lt;p&gt;Feel free to use this particular snippet however you want, but
as usual, I don&amp;rsquo;t provide any warranties that it fit for purpose,
etc, so use it at your own risk! Note that there&amp;rsquo;s no error
handling for when the SDK is not installed, so you might want to
add that in if you&amp;rsquo;re intending on using it in a fault-tolerant
environment.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Easy way to enter GUIDs for WiX scripts</title>
      <link>https://www.goatly.net/post/2006/07/easy-way-to-enter-guids-for-wix-scripts/</link>
      <pubDate>Thu, 20 Jul 2006 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2006/07/easy-way-to-enter-guids-for-wix-scripts/</guid>
      <description>
        
          
            &lt;p&gt;One of the pains of using WiX is that every component you
create has to have its own unique GUID.Using the Tools/Create GUID... option from Visual Studio is
one way to create a new GUID, but you have to copy and paste it
into the right place in your script, which, when you have to create
in the region of a trillion components, can be quite
tiresome.The easiest way I&amp;rsquo;ve found of doing it is to create a custom
macro, along the lines of:Sub Guid() 
DTE.ActiveDocument.Selection.Text =System.Guid.NewGuid.ToString
End SubYou can then associate the macro to a keyboard shortcut
(Tools/Options.../Keyboard), e.g. Ctrl-K,Ctrl-G.&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>Configuring ADAM to use SSL</title>
      <link>https://www.goatly.net/post/2006/07/configuring-adam-to-use-ssl/</link>
      <pubDate>Thu, 13 Jul 2006 00:00:00 +0000</pubDate>
      
      <guid>https://www.goatly.net/post/2006/07/configuring-adam-to-use-ssl/</guid>
      <description>
        
          
            &lt;p&gt;I&amp;rsquo;ve wasted muchos hours trying to configure ADAM to use SSL
in an attempt to use securely it as a membership provider in
ASP.NET 2.0, and one of the biggest problems was the documentation
I found for it. The procedures I have managed to find on the
internet are either wholly inadequate or simply incorrect.I&amp;rsquo;m posting the process I&amp;rsquo;ve documented at LSS so that
hopefully others can get through the whole setup a bit quicker.
I&amp;rsquo;ve repeated the process several times on our QA environment
running Server 2003 R2 and on two installations of XP, so I&amp;rsquo;m
fairly confident that things are pretty much correct.Before I begin, there are a couple of environment assumptions
that are made:&lt;/p&gt;
          
          
        
      </description>
    </item>
    
  </channel>
</rss>
