<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on ZeroSharp</title><link>https://www.zerosharp.com/blog/</link><description>Recent content in Blog on ZeroSharp</description><generator>Hugo</generator><language>en-gb</language><copyright>Copyright © 2012–{year} Robert Anderson</copyright><lastBuildDate>Sat, 02 May 2026 08:00:00 +0100</lastBuildDate><atom:link href="https://www.zerosharp.com/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Moving from Octopress to Hugo</title><link>https://www.zerosharp.com/moving-from-octopress-to-hugo/</link><pubDate>Sat, 02 May 2026 08:00:00 +0100</pubDate><guid>https://www.zerosharp.com/moving-from-octopress-to-hugo/</guid><description>&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/moving-from-octopress-to-hugo-001.png" alt="The old Octopress version of the ZeroSharp blog, with the gold &amp;quot;0#&amp;quot; mark, dark teal header, and Solarized typography."&gt;
&lt;p&gt;I have converted this whole blog from Octopress to Hugo and modernised the theme.&lt;/p&gt;
&lt;p&gt;I haven&amp;rsquo;t blogged in a while, and the prospect of getting Octopress to build on a modern machine had become its own deterrent. So before I could write anything, I had to do something about the platform. But I&amp;rsquo;m not sure I would ever have bothered until Claude Code made things easy.&lt;/p&gt;</description></item><item><title>Has the Riemann Hypothesis been proven?</title><link>https://www.zerosharp.com/has-the-riemann-hypothesis-been-proven/</link><pubDate>Sun, 23 Sep 2018 08:35:00 +0100</pubDate><guid>https://www.zerosharp.com/has-the-riemann-hypothesis-been-proven/</guid><description>&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/has-the-riemann-hypothesis-been-proven-michael-atiyah.jpg" alt="By Tugsataydin CC BY-SA 4.0 from Wikimedia Commons"&gt;
&lt;p&gt;Tomorrow could be an exciting moment in the history of maths. &lt;a href="https://en.wikipedia.org/wiki/Michael_Atiyah"&gt;Sir Michael Atiyah&lt;/a&gt; is presenting a proof of the Riemann Hypothesis at the Heidelberg Laureate Forum which will be available on &lt;a href="https://www.youtube.com/user/LaureateForum"&gt;their youtube channel&lt;/a&gt;. There is a good angle by Ken Regan on the &lt;a href="https://rjlipton.wordpress.com/2018/09/21/the-specter-of-simpler-proofs/"&gt;Gödel&amp;rsquo;s Lost Letter blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Riemann Hypothesis is one of the most important unsolved problems in mathematics and the subject of one of my favourite books about maths: &lt;a href="https://www.amazon.com/Prime-Obsession-Bernhard-Greatest-Mathematics/dp/0452285259"&gt;Prime Obsession&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>My essential web applications and iPhone apps</title><link>https://www.zerosharp.com/my-essential-web-applications/</link><pubDate>Tue, 18 Sep 2018 09:27:00 +0100</pubDate><guid>https://www.zerosharp.com/my-essential-web-applications/</guid><description>&lt;p&gt;This is part three of a series of posts about the software and tools I find invaluable. See &lt;a href="https://www.zerosharp.com/essential-applications"&gt;Part 1: essential applications&lt;/a&gt; and &lt;a href="https://www.zerosharp.com/my-essential-visual-studio-tools-and-extensions"&gt;Part 2: Visual Studio tools&lt;/a&gt;. In this post I&amp;rsquo;m covering the online applications and iPhone apps I find indispensable.&lt;/p&gt;
&lt;h2 id="gmail"&gt;&lt;a href="https://www.google.com/gmail/"&gt;Gmail&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Does the job.&lt;/p&gt;
&lt;h2 id="lastpass"&gt;&lt;a href="https://www.lastpass.com/"&gt;Lastpass&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Everyone needs a password manager.&lt;/p&gt;
&lt;h2 id="pinboard-and-the-pinswift-iphone-app"&gt;&lt;a href="https://www.pinboard.in"&gt;Pinboard&lt;/a&gt; (and the &lt;a href="https://pinswiftapp.com/"&gt;PinSwift&lt;/a&gt; iPhone app)&lt;/h2&gt;
&lt;p&gt;The best bookmark tracking tool. Simple, fast, powerful. The best mobile app for it is &lt;a href="https://pinswiftapp.com/"&gt;PinSwift&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>My essential Visual Studio tools and extensions</title><link>https://www.zerosharp.com/my-essential-visual-studio-tools-and-extensions/</link><pubDate>Mon, 10 Sep 2018 15:45:00 +0100</pubDate><guid>https://www.zerosharp.com/my-essential-visual-studio-tools-and-extensions/</guid><description>&lt;p&gt;This is part two of a series of posts about the software and tools I find invaluable. See &lt;a href="https://www.zerosharp.com/essential-applications"&gt;part 1&lt;/a&gt; and &lt;a href="https://www.zerosharp.com/my-essential-web-applications"&gt;part 3&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="coderush"&gt;CodeRush&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve been using DevExpress &lt;a href="https://www.devexpress.com/products/coderush/"&gt;CodeRush&lt;/a&gt; since 2005. Check out &lt;a href="https://youtu.be/v5-MVSoqCnU"&gt;this video tutorial&lt;/a&gt; for a lightening tour of a lot of the features, and look at the DevExpress youtube channel for &lt;a href="https://www.youtube.com/playlist?list=PL8h4jt35t1wgawacCN9wmxq1EN36CNUGk"&gt;a load of other tutorials&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="ncrunch"&gt;NCrunch&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.ncrunch.net/"&gt;NCrunch&lt;/a&gt; provides continuous testing for Visual Studio. When I make any change to my code which breaks a unit test, the NCrunch risk status goes red a few seconds later, even without recompiling. I get immediate feedback for any breaking change, so long as I have a test for it. Not only does it encourages me and my team to write good tests, but it allows us to make new changes and
refactor with confidence.&lt;/p&gt;</description></item><item><title>My essential applications</title><link>https://www.zerosharp.com/essential-applications/</link><pubDate>Fri, 07 Sep 2018 15:23:00 +0100</pubDate><guid>https://www.zerosharp.com/essential-applications/</guid><description>&lt;p&gt;This is the first in a series of posts where I list the applications that I use and enjoy the most. See &lt;a href="(/my-essential-visual-studio-tools-and-extensions)"&gt;part 2&lt;/a&gt; and &lt;a href="https://www.zerosharp.com/my-essential-web-applications"&gt;part 3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A bit of preamble, my most powerful machine is a Windows-only desktop with lots of RAM and an SSD drive. I use it almost exclusively for development.&lt;/p&gt;
&lt;p&gt;I also have a Macbook Pro which is configured to dual-boot Windows and MacOS. The Windows machine is more or less a mirror of my main development machine. The Mac is where I do all my document editing, Word, blogging, etc. I also use it for my occasional forays in to iPhone development or other non-Windows experiments.&lt;/p&gt;</description></item><item><title>Macbook and the mysterious sleep</title><link>https://www.zerosharp.com/macbook-and-the-mysterious-sleep/</link><pubDate>Wed, 23 Aug 2017 16:46:00 +0100</pubDate><guid>https://www.zerosharp.com/macbook-and-the-mysterious-sleep/</guid><description>&lt;p&gt;I finally worked out why my Macbook was randomly sleeping.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; - &lt;a href="#anchor-tldr"&gt;Skip to the end&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="clues"&gt;Clues&lt;/h2&gt;
&lt;p&gt;It only seemed to happen when I was working while sitting up on the bed with the computer on my lap. It seemed to be related to the position of the computer or possibly the lid. The computer would sleep. I&amp;rsquo;d wake it and login again. Continue. Sometimes it would happen once. Sometimes three times in ten minutes. Annoying. I assumed some hardware defect.&lt;/p&gt;</description></item><item><title>Improvements to Serverless PHP support</title><link>https://www.zerosharp.com/improvements-to-serverless-php-support/</link><pubDate>Thu, 02 Mar 2017 11:37:00 +0100</pubDate><guid>https://www.zerosharp.com/improvements-to-serverless-php-support/</guid><description>&lt;p&gt;I was inspired by two events to jump back into serverless framework.&lt;/p&gt;
&lt;img class="img-left" src="https://www.zerosharp.com/images/blog/serverless-php-improvements-001.jpeg" alt="200 Serverless London Meetup"&gt;
&lt;p&gt;Firstly, I attended the second &lt;a href="https://www.meetup.com/Serverless-London/"&gt;London serverless meetup&lt;/a&gt; yesterday evening which was excellent and showed just how much enthusiasm there is for serverless architectures. Check out their new logo on the left. It was significant that each of the three speakers announced that they are actively hiring serverless developers.&lt;/p&gt;
&lt;p&gt;Secondly, &lt;a href="https://github.com/Stolz"&gt;Stolz&lt;/a&gt; has contributed improvements to my sample project for integrating PHP into the serverless framework. It&amp;rsquo;s the purpose of this blog post to cover the changes.&lt;/p&gt;</description></item><item><title>A concrete PHP Serverless example - export chess games in PDF</title><link>https://www.zerosharp.com/a-concrete-php-serverless-example/</link><pubDate>Tue, 29 Nov 2016 17:37:00 +0100</pubDate><guid>https://www.zerosharp.com/a-concrete-php-serverless-example/</guid><description>&lt;p&gt;In &lt;a href="https://www.zerosharp.com/the-serverless-framework-and-php/"&gt;the last post&lt;/a&gt; I built a PHP capable sample project for &lt;a href="https://serverless.com/"&gt;the Serverless Framework&lt;/a&gt;. In this post, I&amp;rsquo;ll show a concrete use of it.&lt;/p&gt;
&lt;p&gt;The service I&amp;rsquo;m building connects runs a PHP function for pretty-printing chess games from the &lt;a href="http://lichess.org/"&gt;lichess online chess server&lt;/a&gt;. &lt;a href="https://github.com/clarkerubber/lichessPDFExporter"&gt;James Clarke&lt;/a&gt; has written a PHP function to do this using &lt;a href="http://www.fpdf.org/"&gt;fpdf17&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The lichess exporter takes the game id of any game that has been played on the lichess server and produced a PDF output. Take for example, Game 8 of the current World Championship which is &lt;a href="https://en.lichess.org/COQChpzH"&gt;here&lt;/a&gt;. When I open the resulting file, I see this:&lt;/p&gt;</description></item><item><title>The Serverless Framework and PHP</title><link>https://www.zerosharp.com/the-serverless-framework-and-php/</link><pubDate>Mon, 21 Nov 2016 09:21:00 +0100</pubDate><guid>https://www.zerosharp.com/the-serverless-framework-and-php/</guid><description>&lt;p&gt;The goal of this post is to explain how to call a PHP function from within an AWS lambda using the &lt;a href="https://serverless.com/"&gt;Serverless Framework&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;First check everything we need is installed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ serverless --version
1.1.0
$ node --version
v7.1.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="install-the-sample-php-function"&gt;Install the sample PHP function&lt;/h2&gt;
&lt;p&gt;Install my sample &lt;em&gt;Hello&lt;/em&gt; function from my github repository.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sls install --url https://github.com/ZeroSharp/serverless-php
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Serverless: Downloading and installing &lt;span class="s2"&gt;&amp;#34;serverless-php&amp;#34;&lt;/span&gt;…
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Serverless: Successfully installed &lt;span class="s2"&gt;&amp;#34;serverless-php&amp;#34;&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="the-code"&gt;The code&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;$ cd serverless-php
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at the &lt;code&gt;serverless.yml&lt;/code&gt; file.&lt;/p&gt;</description></item><item><title>Smart hiding of the selection boxes in XAF web applications</title><link>https://www.zerosharp.com/smart-hiding-of-the-selection-boxes-in-xaf-web-applications/</link><pubDate>Sun, 06 Nov 2016 18:39:00 +0100</pubDate><guid>https://www.zerosharp.com/smart-hiding-of-the-selection-boxes-in-xaf-web-applications/</guid><description>&lt;p&gt;When an &lt;a href="https://www.devexpress.com/products/net/application_framework/"&gt;XAF&lt;/a&gt; list view has no selection-based actions available, the selection box still appears in the grid. Users get confused. In this post, we&amp;rsquo;ll look at a workaround.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The problem&lt;/h2&gt;
&lt;p&gt;In the XAF MainDemo, lets make Departments read-only for the User role.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;userRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddTypePermissionsRecursively&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Department&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;SecurityOperations&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SecurityPermissionState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Deny&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;userRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddTypePermissionsRecursively&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Department&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;SecurityOperations&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SecurityPermissionState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Deny&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;userRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddTypePermissionsRecursively&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Department&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;SecurityOperations&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Delete&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SecurityPermissionState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Deny&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then start the web application, login as John and navigate to the Departments list view. There is a column selection box, but it serves no purpose. There are no actions that depend on a grid selection.&lt;/p&gt;</description></item><item><title>Sometimes you've just got to deploy</title><link>https://www.zerosharp.com/sometimes-youve-just-got-to-deploy/</link><pubDate>Sun, 16 Oct 2016 18:44:00 +0100</pubDate><guid>https://www.zerosharp.com/sometimes-youve-just-got-to-deploy/</guid><description>&lt;p&gt;Sometimes the deadline has arrived and you still have some failing tests. After a discussion with the dev team, you decide to deploy anyway and fix the bugs for the next release. You need to get the build server to ignore the tests.&lt;/p&gt;
&lt;p&gt;One way is just to mark the test with the &lt;code&gt;[Ignore]&lt;/code&gt; attribute.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;[Test]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;[Ignore]&lt;/span&gt; &lt;span class="c1"&gt;// TODO: Fix this test before the next release!&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="n"&gt;Test&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// Some failing test code...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After the weekend, everyone forgets about the ignored tests and they never get fixed.&lt;/p&gt;</description></item><item><title>Boxstarter and checksums</title><link>https://www.zerosharp.com/boxstarter-and-checksums/</link><pubDate>Thu, 22 Sep 2016 21:04:00 +0100</pubDate><guid>https://www.zerosharp.com/boxstarter-and-checksums/</guid><description>&lt;p&gt;&lt;a href="https://www.zerosharp.com/provisioning-a-new-development-machine-with-boxstarter/"&gt;I&amp;rsquo;ve blogged before&lt;/a&gt; about using BoxStarter to efficiently provision a new development machine.&lt;/p&gt;
&lt;p&gt;This is working very well for our developers. Maintaining the installation script takes a bit of effort but the benefits are worth it.&lt;/p&gt;
&lt;p&gt;Recently, the chocolatey developers have been making things more secure and recent versions now require a checksum with any downloaded package. For now, there seems to be some difficulty using &lt;code&gt;Install-ChocolateyVsixPackage&lt;/code&gt; within BoxStarter scripts.&lt;/p&gt;</description></item><item><title>An XAF workaround for 'Prevent this page from creating additional dialogs.'</title><link>https://www.zerosharp.com/an-xaf-workaround-for-prevent-this-page-from-creating-additional-dialogs-dot/</link><pubDate>Mon, 16 May 2016 13:51:00 +0100</pubDate><guid>https://www.zerosharp.com/an-xaf-workaround-for-prevent-this-page-from-creating-additional-dialogs-dot/</guid><description>&lt;p&gt;Both Chrome and Firefox have a &amp;lsquo;feature&amp;rsquo; which allows a user to ignore future calls to &lt;code&gt;confirm()&lt;/code&gt;. Once this has been checked, any subsequent calls to &lt;code&gt;confirm()&lt;/code&gt; return false immediately without showing the window.&lt;/p&gt;
&lt;p&gt;In XAF, this behaviour prevents the application from working correctly. For instance, it becomes impossible to confirm a deletion.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/prevent-this-page-001.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;The following controller provides a work around. It injects some javascript into the page wrapping the call to &lt;code&gt;confirm()&lt;/code&gt;. The new code detects when the &lt;strong&gt;Prevent this page from creating additional dialogs&lt;/strong&gt; checkbox has been checked and returns true instead. The confirmation window still does not appear, but the XAF application works as if the user had pressed confirm instead of cancel.&lt;/p&gt;</description></item><item><title>A basic Chrome extension - analyze your chess.com games on lichess.org</title><link>https://www.zerosharp.com/a-basic-chrome-extension-analyze-your-chess-dot-com-games-on-lichess-dot-org/</link><pubDate>Fri, 04 Mar 2016 17:41:00 +0100</pubDate><guid>https://www.zerosharp.com/a-basic-chrome-extension-analyze-your-chess-dot-com-games-on-lichess-dot-org/</guid><description>&lt;p&gt;I&amp;rsquo;ve been trying to get better at chess by playing on &lt;a href="http://www.chess.com"&gt;chess.com&lt;/a&gt;. I often analyse my games with the help of a computer to see where I made mistakes. My favourite way of doing this is to make use of &lt;a href="http://lichess.org"&gt;Lichess.org&lt;/a&gt;&amp;rsquo;s import functionality. The latest version of chess.com has greatly improved its own post game analysis, but I still much prefer Lichess&amp;rsquo;s. So I would often download the finished game in pgn and upload it to Lichess.&lt;/p&gt;</description></item><item><title>Serverless Framework Part 5: Pulling in a node package</title><link>https://www.zerosharp.com/serverless-framework-part-5-pulling-in-a-node-package/</link><pubDate>Tue, 09 Feb 2016 11:31:00 +0100</pubDate><guid>https://www.zerosharp.com/serverless-framework-part-5-pulling-in-a-node-package/</guid><description>&lt;p&gt;This is the final part of an ongoing series about the &lt;a href="https://github.com/serverless/serverless"&gt;Serverless framework&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the previous posts, the &lt;code&gt;PasswordGenerator&lt;/code&gt; always returned &amp;lsquo;Password&amp;rsquo;. Instead each date should corresponds to a new unique password. We&amp;rsquo;ll make use of the &lt;a href="https://www.npmjs.com/package/crypto-js"&gt;Crypto-js&lt;/a&gt; node package and we&amp;rsquo;ll see that the AWS lambda copes just fine.&lt;/p&gt;
&lt;h3 id="installing-a-node-package"&gt;Installing a node package&lt;/h3&gt;
&lt;p&gt;Pull in the crypto-js package into the serverless component.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd nodejscomponent/
$ npm install crypto-js --save
crypto-js@3.1.6 node_modules/crypto-js
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we need the typescript definitions. Watch out there are two different TypeScript typings called &lt;em&gt;cryptojs&lt;/em&gt; and &lt;em&gt;crypto-js&lt;/em&gt;. The first one is more complete.&lt;/p&gt;</description></item><item><title>Serverless Framework - Part 4: Connecting the parts</title><link>https://www.zerosharp.com/serverless-framework-part-4-connecting-the-parts/</link><pubDate>Mon, 01 Feb 2016 09:44:00 +0100</pubDate><guid>https://www.zerosharp.com/serverless-framework-part-4-connecting-the-parts/</guid><description>&lt;p&gt;This is part of an ongoing series about the &lt;a href="https://github.com/serverless/serverless"&gt;Serverless framework&lt;/a&gt;: &lt;a href="https://www.zerosharp.com/serverless-framework-part-1-up-and-running/"&gt;Part 1&lt;/a&gt;, &lt;a href="https://www.zerosharp.com/serverless-framework-part-2-typescript-and-mocha/"&gt;part 2&lt;/a&gt;, &lt;a href="https://www.zerosharp.com/serverless-framework-part-3-the-guts/"&gt;part 3&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="new-version-031"&gt;New version 0.3.1&lt;/h2&gt;
&lt;p&gt;
&lt;span class="fluo"&gt;Edit: since the original version of this post, a new version 0.3.1 of Serverless was released. I have updated the tutorial below to reflect the newer version. Also, &lt;a href="https://github.com/DefinitelyTyped/tsd/issues/269"&gt;TSD has been deprecated&lt;/a&gt; in favour of &lt;a href="https://www.npmjs.com/package/typings"&gt;Typings&lt;/a&gt; so I&amp;rsquo;ve updated to use Typings instead.&lt;/span&gt;

All parts have been updated for the latest version of the framework 0.3.1.&lt;/p&gt;
&lt;h2 id="the-password-of-the-day-generator-class"&gt;The Password of the Day Generator class&lt;/h2&gt;
&lt;p&gt;First up we need a class to generate and check the password of the day. For the moment, let&amp;rsquo;s pretend the password of the day is always the string &lt;em&gt;&amp;ldquo;Password&amp;rdquo;&lt;/em&gt;. Put the following typescript class in &lt;em&gt;nodejscomponent/src&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Serverless Framework - Part 3: The guts of a serverless service</title><link>https://www.zerosharp.com/serverless-framework-part-3-the-guts/</link><pubDate>Fri, 29 Jan 2016 17:44:00 +0100</pubDate><guid>https://www.zerosharp.com/serverless-framework-part-3-the-guts/</guid><description>&lt;p&gt;This is part of an ongoing series about the &lt;a href="https://github.com/serverless/serverless"&gt;Serverless framework&lt;/a&gt;. For those following along, &lt;a href="https://www.zerosharp.com/serverless-framework-part-1-up-and-running/"&gt;part 1&lt;/a&gt; and &lt;a href="https://www.zerosharp.com/serverless-framework-part-2-typescript-and-mocha/"&gt;part 2&lt;/a&gt; have been updated for the current latest version of Serverless 0.3.1.&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll discuss how a Serverless function actually works.&lt;/p&gt;
&lt;h2 id="the-guts-of-a-serverless-function"&gt;The guts of a serverless function&lt;/h2&gt;
&lt;p&gt;When we visited the deployed endpoint at the end of &lt;a href="https://www.zerosharp.com/serverless-framework-part-1-up-and-running/"&gt;part 1&lt;/a&gt;, it correctly returned some JSON content.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;message:&lt;/span&gt; &lt;span class="nt"&gt;&amp;#34;Your Serverless function ran successfully!&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Where does this message come from? Look at &lt;em&gt;index.js&lt;/em&gt; in the component&amp;rsquo;s &lt;em&gt;lib&lt;/em&gt; folder.&lt;/p&gt;</description></item><item><title>Serverless Framework - Part 2: TypeScript and Mocha</title><link>https://www.zerosharp.com/serverless-framework-part-2-typescript-and-mocha/</link><pubDate>Tue, 12 Jan 2016 08:08:00 +0100</pubDate><guid>https://www.zerosharp.com/serverless-framework-part-2-typescript-and-mocha/</guid><description>&lt;p&gt;Happy New Year everyone!&lt;/p&gt;
&lt;p&gt;This is the second part of a series about the &lt;a href="https://github.com/serverless/serverless"&gt;Serverless&lt;/a&gt; framework. Read &lt;a href="https://www.zerosharp.com/serverless-framework-part-1-up-and-running/"&gt;the first part&lt;/a&gt; to get up and running.&lt;/p&gt;
&lt;p&gt;First I&amp;rsquo;ll describe the webservice I&amp;rsquo;m building. Then we&amp;rsquo;ll configure our environment for Typescript and Mocha testing.&lt;/p&gt;
&lt;h2 id="poor-mans-dual-factor-authentication-via-a-password-of-the-day"&gt;Poor man&amp;rsquo;s dual factor authentication via a password of the day&lt;/h2&gt;



&lt;p&gt;I&amp;rsquo;m the technical lead for an enterprise application which is in use by about 100 large multinational corporates. As part of the installation process, we ask for a registration code which is based on the date. The customer has to call us to get the password of the day. This gives us an opportunity to engage with the customer and also gives us little more control. It&amp;rsquo;s a simple form of dual factor authorization where one of the factors requires a phone call.&lt;/p&gt;</description></item><item><title>Serverless Framework - Part 1: Up and running</title><link>https://www.zerosharp.com/serverless-framework-part-1-up-and-running/</link><pubDate>Tue, 22 Dec 2015 20:26:00 +0100</pubDate><guid>https://www.zerosharp.com/serverless-framework-part-1-up-and-running/</guid><description>&lt;h2 id="new-version-031"&gt;New version 0.3.1&lt;/h2&gt;

&lt;span class="fluo"&gt;Edit: since the original version of this post, a new version 0.3.1 of Serverless was released. I have updated the tutorial below to reflect the newer version.&lt;/span&gt;

&lt;p&gt;I was in the middle of a blog post about the JAWS framework and before I had finished it changed its name to &lt;a href="https://github.com/serverless/serverless"&gt;the Serverless framework&lt;/a&gt;. It is a very clever way to build apps without worrying about provisioning server or whether it will scale. This is because it uses Amazon Web Services and in particular the Amazon lambda compute service. It&amp;rsquo;s currently in beta.&lt;/p&gt;</description></item><item><title>DevExpress 2015.2 review part 2</title><link>https://www.zerosharp.com/devexpress-15-dot-2-review-part-2/</link><pubDate>Thu, 10 Dec 2015 09:43:00 +0100</pubDate><guid>https://www.zerosharp.com/devexpress-15-dot-2-review-part-2/</guid><description>&lt;p&gt;This is the second and final dive into some of the new DevExpress XAF 2015.2 features. The &lt;a href="https://www.zerosharp.com/devexpress-15-dot-2-review-part-1/"&gt;first part&lt;/a&gt; covers the Report Designer and the new XML serialisation.&lt;/p&gt;
&lt;h2 id="batch-editing"&gt;Batch editing&lt;/h2&gt;
&lt;p&gt;Another feature I&amp;rsquo;m excited about is the support for batch editing within the web application grids.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see what happens when combined with the validation rules. What happens if I edit two rows but only one has a validation problem - does the whole batch get rejected? Or just the row with the problem?&lt;/p&gt;</description></item><item><title>DevExpress 2015.2 review part 1</title><link>https://www.zerosharp.com/devexpress-15-dot-2-review-part-1/</link><pubDate>Wed, 09 Dec 2015 14:43:00 +0100</pubDate><guid>https://www.zerosharp.com/devexpress-15-dot-2-review-part-1/</guid><description>&lt;p&gt;Last week, DevExpress released 2015.2.3, their second major version of the year.&lt;/p&gt;
&lt;p&gt;There are already some good blog posts about the changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/Tips/1060260/Whats-New-for-XAF"&gt;Michael Bogaerts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vimarx.com/blog/92/"&gt;Gustavo Marzioni&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.devexpress.com/Subscriptions/New-2015.xml?product=xaf"&gt;DevExpress What&amp;rsquo;s New&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Rather than repeat general overviews provided in these, this two-part blog post is more of a &amp;lsquo;deep dive&amp;rsquo;. In particular I&amp;rsquo;ll be looking at two of the new features in the expressApp Framework (XAF).
Today I&amp;rsquo;ll cover the new XML serialisation in the report designer. Tomorrow&amp;rsquo;s post will examine the new batch editing features.&lt;/p&gt;</description></item><item><title>Migrating a large web application from XAF 12.1 to 15.1 - Part 3</title><link>https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-3/</link><pubDate>Wed, 16 Sep 2015 09:39:00 +0100</pubDate><guid>https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-3/</guid><description>&lt;p&gt;This is the third part of a &lt;a href="https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-2"&gt;series&lt;/a&gt; about migrating a large application from XAF 12.1 to XAF 15.1. In this part I will compare the results of a simple stress test between the versions.&lt;/p&gt;
&lt;p&gt;I have described in previous posts how to &lt;a href="https://www.zerosharp.com/load-testing-xaf-overview/"&gt;stress test XAF applications&lt;/a&gt;. One of our most basic tests is to simulate 25 users cycling through all the navigation tabs for an hour. I&amp;rsquo;m happy to report there is a considerable improvement under load in version 15.1.&lt;/p&gt;</description></item><item><title>Migrating a large web application from XAF 12.1 to 15.1 - Part 2</title><link>https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-2/</link><pubDate>Tue, 15 Sep 2015 10:37:00 +0100</pubDate><guid>https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-2/</guid><description>&lt;p&gt;This is the second part of a &lt;a href="https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-1"&gt;series&lt;/a&gt; about migrating a large application from XAF 12.1 to XAF 15.1.&lt;/p&gt;
&lt;p&gt;In the 13.1 release, DevExpress made a change to the way XAF &lt;code&gt;Validator&lt;/code&gt; class is used. It now requires an &lt;code&gt;IObjectSpace&lt;/code&gt; parameter corresponding to the object. It is needed to correctly evaluate any rules which are descendants of the &lt;code&gt;RuleSearchObjectProperties&lt;/code&gt;. These include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;RuleCombinationOfPropertiesIsUnique&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RuleIsReferenced&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RuleObjectExists&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RuleUniqueValue&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A lot of our code has been around for years now and the older parts rely heavily on &lt;code&gt;Session&lt;/code&gt; and &lt;code&gt;UnitOfWork&lt;/code&gt; instead of &lt;code&gt;IObjectSpace&lt;/code&gt; For the most part our application used &lt;code&gt;IObjectSpace&lt;/code&gt; only within &lt;code&gt;ViewControllers&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Migrating a large web application from XAF 12.1 to 15.1 - Part 1</title><link>https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-1/</link><pubDate>Mon, 14 Sep 2015 10:01:00 +0100</pubDate><guid>https://www.zerosharp.com/migrating-a-large-web-application-from-xaf-12-dot-1-to-15-dot-1-part-1/</guid><description>&lt;p&gt;I am the principal software architect for a treasury application in use by over 100 large multinational corporates. Upgrades are generally met with reluctance in the enterprise world and so we&amp;rsquo;ve been somewhat stuck on an old version of the expressAppFramework.&lt;/p&gt;
&lt;p&gt;Recently I&amp;rsquo;ve been pushing to move to the newer version and I have spent about three weeks migrating the substantial code base to XAF 15.1 and .NET 4.6.&lt;/p&gt;
&lt;p&gt;The steps are:&lt;/p&gt;</description></item><item><title>Force a complete garbage collection in an ASP.NET application.</title><link>https://www.zerosharp.com/force-a-complete-garbage-collection-in-an-asp-dot-net-application/</link><pubDate>Wed, 05 Aug 2015 09:26:00 +0100</pubDate><guid>https://www.zerosharp.com/force-a-complete-garbage-collection-in-an-asp-dot-net-application/</guid><description>&lt;p&gt;How can I force a full garbage collection easily within an ASP.NET application? The method here is for XAF web applications but the same approach should work with any ASP.NET app.&lt;/p&gt;



&lt;p&gt;First up: Never mess with the .NET garbage collector.&lt;/p&gt;
&lt;p&gt;I sometimes mess with the garbage collector in .NET when I&amp;rsquo;m trying to pin down some memory problem. Also, after &lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;a load test&lt;/a&gt;, I prefer to force the garbage collector to collect everything it can so that I can check that the memory drops as expected.&lt;/p&gt;</description></item><item><title>A strange error message from Visual Studio 2015</title><link>https://www.zerosharp.com/a-strange-error-message-from-visual-studio-2015/</link><pubDate>Mon, 03 Aug 2015 15:35:00 +0100</pubDate><guid>https://www.zerosharp.com/a-strange-error-message-from-visual-studio-2015/</guid><description>&lt;p&gt;When I recently upgraded to Visual Studio 2015, everything seemed to go very smoothly except that whenever I debugged my main application I got a dialog window with the following strange error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The procedure entry point could not be located in the dynamic link library C:\...\bin\Debug\netutils.dll.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After pressing &lt;code&gt;OK&lt;/code&gt; everything seemed to work as normal.&lt;/p&gt;
&lt;p&gt;After a considerable number of dead ends, I finally worked out that changing the name of the &lt;em&gt;NetUtils.dll&lt;/em&gt; assembly fixes the problem. It seems that Visual Studio 2015 gets confused with a Windows system assembly with the same name. I don&amp;rsquo;t know why it was never a problem with Visual Studio 2013, but I renamed the assembly and now everything is working fine.&lt;/p&gt;</description></item><item><title>Fixing slow debugging of ASP.NET applications</title><link>https://www.zerosharp.com/fixing-slow-debugging-of-asp-dot-net-applications/</link><pubDate>Wed, 03 Jun 2015 21:31:00 +0100</pubDate><guid>https://www.zerosharp.com/fixing-slow-debugging-of-asp-dot-net-applications/</guid><description>&lt;p&gt;For a while I&amp;rsquo;ve noticed an annoying slowness when debugging ASP.NET applications from Visual Studio. Just after every page load it takes about a second before the buttons become clickable. I noticed mostly when debugging XAF applications, perhaps because the pages are quite complex.&lt;/p&gt;
&lt;p&gt;Turns out the culprit is something called &lt;a href="http://www.asp.net/visual-studio/overview/2013/using-browser-link"&gt;Browser Link&lt;/a&gt; which was introduced in Visual Studio 2013. It&amp;rsquo;s enabled by default.&lt;/p&gt;
&lt;p&gt;To turn it off you can turn it off from the menu:&lt;/p&gt;</description></item><item><title>Top tip for viewing CSV files in Excel</title><link>https://www.zerosharp.com/top-tip-for-viewing-csv-files-in-excel/</link><pubDate>Fri, 08 May 2015 11:32:00 +0100</pubDate><guid>https://www.zerosharp.com/top-tip-for-viewing-csv-files-in-excel/</guid><description>&lt;p&gt;Here&amp;rsquo;s a quick hack when your CSV file has a different separator than Excel is expecting.&lt;/p&gt;
&lt;p&gt;Add this on the first line of the CSV file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sep=;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sep=,
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will override system setting for list separator character and Excel will open the file correctly.&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;Note: Excel expects the separator to match the one defined in the &lt;em&gt;Control Panel/Region/Formats/Additional settings/List Separator&lt;/em&gt;. On a French system, it expects a semi-colon.&lt;/sup&gt;&lt;/p&gt;</description></item><item><title>DevExpress 14.2 review</title><link>https://www.zerosharp.com/devexpress-14-dot-2-review/</link><pubDate>Tue, 20 Jan 2015 08:35:00 +0100</pubDate><guid>https://www.zerosharp.com/devexpress-14-dot-2-review/</guid><description>&lt;p&gt;This post is an overview of the brand new version XAF 14.2. The truly outstanding new feature is the ASP.NET report writer which is now available in all XAF applications.&lt;/p&gt;
&lt;p&gt;A few months ago, we lost a potential sale because the customer wanted the ability to create custom reports from within the browser. We told them it was impossible to provide a fully-fledged report designer within our web application - but the DevExpress guys have done it! And how!&lt;/p&gt;</description></item><item><title>ELMAH with DevExpress XAF</title><link>https://www.zerosharp.com/elmah-with-devexpress-xaf/</link><pubDate>Wed, 08 Oct 2014 15:45:00 +0100</pubDate><guid>https://www.zerosharp.com/elmah-with-devexpress-xaf/</guid><description>&lt;p&gt;&lt;a href="https://code.google.com/p/elmah/"&gt;ELMAH (Error Logging Modules and Handlers)&lt;/a&gt; is an open source library for logging unhandled exceptions. This post explains how to get it running with the &lt;a href="https://www.devexpress.com/Products/NET/Application_Framework/"&gt;DevExpress XAF&lt;/a&gt; main demo.&lt;/p&gt;
&lt;p&gt;A couple of amazing facts about ELMAH.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It has been around since 2004!&lt;/li&gt;
&lt;li&gt;It was written by &lt;a href="http://www.raboof.com/"&gt;Atif Aziz&lt;/a&gt; who happens to be an old school-friend from the International School of Geneva.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;XAF provides &lt;a href="https://documentation.devexpress.com/#xaf/CustomDocument2704"&gt;quite extensive error handling options&lt;/a&gt; out of the box, but I have found Elmah better suited to production environments because of the ability to remotely view the full error log.&lt;/p&gt;</description></item><item><title>Replacing a class at runtime using Ninject and Roslyn - Part 4: Roslyn</title><link>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-4/</link><pubDate>Wed, 17 Sep 2014 08:08:00 +0100</pubDate><guid>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-4/</guid><description>&lt;p&gt;This is the fourth and final part of a series about using Roslyn with dependency injection to create a flexible and powerful plug-in framework. Here I review the parts of the solution that deal with the Roslyn runtime compilation of plug-ins. Check out &lt;a href="https://github.com/ZeroSharp/RoslynPlugins"&gt;the working example on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Previously&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-1/"&gt;Part 1: The Goal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-2/"&gt;Part 2: The Solution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-3/"&gt;Part 3: Dependency Injection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="roslyn"&gt;Roslyn&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s look at some of the main classes used to compile plug-in code at runtime.&lt;/p&gt;</description></item><item><title>Replacing a class at runtime using Ninject and Roslyn - Part 3: Dependency Injection</title><link>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-3/</link><pubDate>Mon, 15 Sep 2014 08:01:00 +0100</pubDate><guid>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-3/</guid><description>&lt;p&gt;This is the third part of a series about using Roslyn with dependency injection to create a flexible and powerful plug-in framework. Here I review the parts of the solution that deal with dependency injection. Check out &lt;a href="https://github.com/ZeroSharp/RoslynPlugins"&gt;the working example on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Previously&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-1/"&gt;Part 1: The Goal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-2/"&gt;Part 2: The Solution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="dependency-injection"&gt;Dependency injection&lt;/h2&gt;
&lt;p&gt;The first trick is to use dependency injection to create any instance of the &lt;code&gt;HelloWorldGenerator&lt;/code&gt; class. Then if we need to add a new dependency to the class, we can just add it to the constructor without breaking anything.&lt;/p&gt;</description></item><item><title>Replacing a class at runtime using Ninject and Roslyn - Part 2: The Solution</title><link>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-2/</link><pubDate>Thu, 11 Sep 2014 09:18:00 +0100</pubDate><guid>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-2/</guid><description>&lt;p&gt;Previously: &lt;a href="https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-1/"&gt;Part 1: The Goal&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="the-solution"&gt;The solution&lt;/h2&gt;
&lt;p&gt;The code for the example is &lt;a href="https://github.com/ZeroSharp/RoslynPlugins"&gt;available on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id="how-it-looks"&gt;How it looks&lt;/h4&gt;
&lt;p&gt;So here&amp;rsquo;s the Hello World page in production:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/roslyn-plugins-001.png" alt=""&gt;.&lt;/p&gt;
&lt;p&gt;We navigate to the plugins view and create a new replacement for the HelloWorldGenerator:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/roslyn-plugins-002.png" alt=""&gt;.&lt;/p&gt;
&lt;p&gt;Without restarting, we can return to the HelloWorld page and see that the new class is being used because the output has changed.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/roslyn-plugins-003.png" alt=""&gt;.&lt;/p&gt;
&lt;p&gt;If you delete the row from the plugins page, the behaviour reverts to the original implementation (the code that was originally shipped with production).&lt;/p&gt;</description></item><item><title>Replacing a class at runtime using Ninject and Roslyn - Part 1: The Goal</title><link>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-1/</link><pubDate>Tue, 09 Sep 2014 10:47:00 +0100</pubDate><guid>https://www.zerosharp.com/replacing-a-class-at-runtime-using-ninject-and-roslyn-part-1/</guid><description>&lt;h2 id="the-goal"&gt;The goal&lt;/h2&gt;



How can we replace a given class&amp;rsquo;s code with new code at runtime? In particular, how we can we do this while allowing dependency injection and sidestepping assembly versioning issues.

&lt;p&gt;Let&amp;rsquo;s say you have bunch of classes like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SomeGenerator&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IGenerator&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;SomeGenerator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ISomeDependency&lt;/span&gt; &lt;span class="n"&gt;dependency&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;IAnotherDependency&lt;/span&gt; &lt;span class="n"&gt;another&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="n"&gt;Generate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// generate some output&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Now let&amp;rsquo;s assume that you need the ability to modify the behaviour of these classes at runtime without upgrading. And change the dependencies. Without restarting the application.&lt;/p&gt;</description></item><item><title>Persisting changes to config files within NuGet packages</title><link>https://www.zerosharp.com/persisting-changes-to-config-files-within-nuget-packages/</link><pubDate>Wed, 13 Aug 2014 06:39:00 +0100</pubDate><guid>https://www.zerosharp.com/persisting-changes-to-config-files-within-nuget-packages/</guid><description>&lt;p&gt;Whenever NuGet updates or restores a NuGet package, the config files within it are overwritten. Here&amp;rsquo;s a method to make sure the changes are reapplied via a &lt;a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx"&gt;config transform&lt;/a&gt; whenever the solution is built.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m using the NUnit.Runners NuGet packages. To get our coverage tool to play nicely, I need to replace &lt;code&gt;&amp;lt;supportedRuntime &amp;quot;v2.0.50727&amp;quot;&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;supportedRuntime &amp;quot;v4.0.30319&amp;quot;&amp;gt;&lt;/code&gt; within the &lt;em&gt;NUnit-console-x86.exe.config&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Normally, a config transform is for modifying the &lt;em&gt;web.config&lt;/em&gt; or &lt;em&gt;app.config&lt;/em&gt; files. Here, we need to modify a config file within the &lt;em&gt;packages&lt;/em&gt; subdirectory.&lt;/p&gt;</description></item><item><title>Pardon the interruption</title><link>https://www.zerosharp.com/pardon-the-interruption/</link><pubDate>Mon, 11 Aug 2014 10:33:00 +0100</pubDate><guid>https://www.zerosharp.com/pardon-the-interruption/</guid><description>&lt;p&gt;I left my laptop on a train a couple of months ago. Good thing I remembered my brain. I&amp;rsquo;m back now. This blog still lives.&lt;/p&gt;</description></item><item><title>A web UI performance tip for XAF web applications</title><link>https://www.zerosharp.com/a-web-ui-performance-tip-for-xaf-web-applications/</link><pubDate>Mon, 31 Mar 2014 10:16:00 +0100</pubDate><guid>https://www.zerosharp.com/a-web-ui-performance-tip-for-xaf-web-applications/</guid><description>&lt;p&gt;The purpose of this post is to raise your awareness of a toggle which exists in the &lt;a href="http://www.devexpress.com/xaf/"&gt;DevExpress XAF framework&lt;/a&gt; which can significantly improve UI performance in the web application.&lt;/p&gt;



&lt;p&gt;The biggest XAF project I work with has one very complex business object. The layout for this screen includes about 100 properties, several nested tabs, some custom editors, several collection properties and a whole lot of &lt;a href="https://documentation.devexpress.com/#Xaf/CustomDocument3286"&gt;Conditional Appearance&lt;/a&gt; rules. It was very sluggish to navigate - it was taking several seconds to load the detail view and then it was very slow switching between tabs. Switching to edit mode was also slow.&lt;/p&gt;</description></item><item><title>Provisioning a new development machine with BoxStarter</title><link>https://www.zerosharp.com/provisioning-a-new-development-machine-with-boxstarter/</link><pubDate>Tue, 25 Feb 2014 15:29:00 +0100</pubDate><guid>https://www.zerosharp.com/provisioning-a-new-development-machine-with-boxstarter/</guid><description>&lt;p&gt;I&amp;rsquo;ve been playing around with &lt;a href="http://boxstarter.org/"&gt;Boxstarter&lt;/a&gt; to configure my entire development environment with hardly any user intervention.&lt;/p&gt;
&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/boxstarter-001.png" alt="300"&gt;
&lt;p&gt;Here are the steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install Windows 8.1 on a new machine.&lt;/li&gt;
&lt;li&gt;Login.&lt;/li&gt;
&lt;li&gt;Open a command prompt and enter the following.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;START http://boxstarter.org/package/nr/url?http://bit.ly/1kapDXI
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it!&lt;/p&gt;
&lt;p&gt;Boxstarter will self-install via ClickOnce, asking for various confirmations and ultimately it will prompt you for your login password. (This gets saved and encrypted to allow for unattended reboots and re-logins during the installation). Then the real magic begins. Boxstarter downloads and installs all your tools and configures your environment, rebooting as necessary. An hour later your full development setup is installed, including Visual Studio 2013, any VS extensions, any other programs and tools, all the browsers you need, all critical Windows updates, etc. You just saved yourself a couple of days of work and a lot of hassle.&lt;/p&gt;</description></item><item><title>CruiseControl Notifications on your iPhone</title><link>https://www.zerosharp.com/cruisecontrol-notifications-on-your-iphone/</link><pubDate>Fri, 07 Feb 2014 11:32:00 +0100</pubDate><guid>https://www.zerosharp.com/cruisecontrol-notifications-on-your-iphone/</guid><description>&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/ccwatcher-002.jpg" alt="200"&gt;
&lt;p&gt;&lt;a href="http://sixafter.com/portfolio/continuous-integration-monitoring-for-ios/"&gt;CCWatcher&lt;/a&gt; is a great iPhone app for any developer who is using CruiseControl.NET, Jenkins or Hudson for their continuous integration.&lt;/p&gt;
&lt;p&gt;We have used &lt;a href="http://www.cruisecontrolnet.org/"&gt;CruiseControl.NET&lt;/a&gt; for several years to automate all builds. The build kicks off automatically whenever we push changes and this frequently happens a few times a day. We aim to have everything &lt;em&gt;green&lt;/em&gt; at the end of every day.&lt;/p&gt;
&lt;p&gt;A full build with unit tests and functional tests takes about an hour, so often, I will leave the office while the build is still running. But then I wouldn&amp;rsquo;t know if I&amp;rsquo;d broken the build.&lt;/p&gt;</description></item><item><title>Glimpse with DevExpress XAF</title><link>https://www.zerosharp.com/glimpse-with-devexpress-xaf/</link><pubDate>Tue, 17 Dec 2013 12:41:00 +0100</pubDate><guid>https://www.zerosharp.com/glimpse-with-devexpress-xaf/</guid><description>&lt;p&gt;I have finally got around to getting Glimpse working with XAF. Glimpse is an amazing extensible ASP.NET plug-in which gives you valuable information about what is going on within your server in production. It&amp;rsquo;s also very pretty.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s jump right in and have a look at what XAF looks like with Glimpse running.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/xaf-with-glimpse-016.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;That banner along the bottom of the screen is the Glimpse heads up display (HUD). Hovering over various sections of it pops up more information:&lt;/p&gt;</description></item><item><title>DevExpress 13.2 Review - Part 2</title><link>https://www.zerosharp.com/devexpress-13-dot-2-review-part-2/</link><pubDate>Tue, 10 Dec 2013 16:10:00 +0100</pubDate><guid>https://www.zerosharp.com/devexpress-13-dot-2-review-part-2/</guid><description>&lt;p&gt;This is the second part of a review of the new DevExpress 13.2. In &lt;a href="https://www.zerosharp.com/devexpress-13-dot-2-review-part-1"&gt;the last part&lt;/a&gt; we looked in-depth at the new &lt;a href="https://community.devexpress.com/blogs/eaf/archive/2013/11/08/easy-large-reports-in-13-2-ctp-of-reportsv2-module.aspx"&gt;Reports V2&lt;/a&gt;. In this part I&amp;rsquo;ll go over some of the other new features including the support for warnings and confirmations in the validation module.&lt;/p&gt;
&lt;h2 id="soft-validation-rules"&gt;Soft Validation Rules&lt;/h2&gt;
&lt;p&gt;With 13.2, DevExpress adds support for warning/confirmation messages to the validation engine. Warnings can be used to handle an unusual but valid data entry. An example would be:&lt;/p&gt;</description></item><item><title>DevExpress 13.2 Review - Part 1</title><link>https://www.zerosharp.com/devexpress-13-dot-2-review-part-1/</link><pubDate>Mon, 02 Dec 2013 16:23:00 +0100</pubDate><guid>https://www.zerosharp.com/devexpress-13-dot-2-review-part-1/</guid><description>&lt;p&gt;The first version of XAF I ever installed was called &lt;em&gt;eXpressApp-1.0.CTP2.exe&lt;/em&gt; in July 2006! It has certainly come a long way since then.&lt;/p&gt;
&lt;p&gt;This post is the first part of an overview of the brand new version XAF 13.2 which will be released any day now. This part is an in-depth review of the new report writer features (still in beta).&lt;/p&gt;
&lt;h2 id="reports-v2"&gt;Reports V2&lt;/h2&gt;
&lt;p&gt;Prior to this version, XAF reports were not source code. They were objects serialized to a file and then loaded into the database during initialisation. This has a lot of shortcomings some of which I have addressed in previous &lt;a href="https://www.zerosharp.com/making-xaf-reports-even-better-part-1/"&gt;blog posts&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>How to improve XAF grid layout for Chrome</title><link>https://www.zerosharp.com/how-to-improve-xaf-grid-layout-for-chrome/</link><pubDate>Fri, 08 Nov 2013 09:55:00 +0100</pubDate><guid>https://www.zerosharp.com/how-to-improve-xaf-grid-layout-for-chrome/</guid><description>&lt;p&gt;This post proposes a workaround for a specific XAF rendering problem related to recent versions of Google Chrome.&lt;/p&gt;
&lt;p&gt;Here is an XAF list view as it looks with IE 10 and DevExpress 13.1.8.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/chrome-grid-layout-001.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;This is how the same view looks with Chrome 30. Notice how the column widths are rendered poorly. The minimum space is given to the string field and the date and bool fields are too wide.&lt;/p&gt;</description></item><item><title>Three ways to store a list of currency codes in XAF</title><link>https://www.zerosharp.com/three-ways-to-store-a-list-of-currency-codes-in-xaf/</link><pubDate>Tue, 22 Oct 2013 18:15:00 +0100</pubDate><guid>https://www.zerosharp.com/three-ways-to-store-a-list-of-currency-codes-in-xaf/</guid><description>&lt;p&gt;In the &lt;a href="https://www.zerosharp.com/the-ugly-the-heavy-and-the-good"&gt;last post&lt;/a&gt; we looked at three solutions to a relatively simple XAF requirement. In this post I&amp;rsquo;ll discuss another XAF challenge, explain the options and provide a versatile and maintainable solution.&lt;/p&gt;
&lt;p&gt;In my DevExpress XAF application, I have an object which has several properties like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/currency-list-editor-002.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;In each case, the field is a comma-separated list of currency codes. These fields are not very important to the model - they are used mainly for reporting.&lt;/p&gt;</description></item><item><title>The Ugly, the Heavy and the Good: 3 solutions to an XAF layout problem</title><link>https://www.zerosharp.com/the-ugly-the-heavy-and-the-good/</link><pubDate>Mon, 14 Oct 2013 09:51:00 +0100</pubDate><guid>https://www.zerosharp.com/the-ugly-the-heavy-and-the-good/</guid><description>&lt;p&gt;This post aims to look at various solutions to a seemingly simple layout change.&lt;/p&gt;
&lt;p&gt;With &lt;a href="https://www.devexpress.com/Products/NET/Application_Framework/"&gt;DevExpress XAF&lt;/a&gt;, a lot of the difficult things are easy: authentication, authorisation, ORM, reporting, complex form layouts, themes, etc., are all made easy by XAF. On the other hand, some of the easy things are hard. It can be frustratingly difficult to make a small modification to the basic layout. We will look at an example of such a change and evaluate the recommended DevExpress approaches.&lt;/p&gt;</description></item><item><title>A review of NDepend 5</title><link>https://www.zerosharp.com/a-review-of-ndepend-5/</link><pubDate>Wed, 02 Oct 2013 17:54:00 +0100</pubDate><guid>https://www.zerosharp.com/a-review-of-ndepend-5/</guid><description>&lt;p&gt;NDepend is a commercial static analysis tool for .NET managed code. It&amp;rsquo;s been around a long time (since 2004!). Version 5 was just released and in this post I&amp;rsquo;m going to try it out on the DevExpress MainDemo.&lt;/p&gt;



&lt;p&gt;In the past I have always thought of NDepend as a complex tool. I was never sure where to start. In version 5, a lot of work has been done to improve the learning curve. The installation process is easy and a wizard very quickly points you in the right direction.&lt;/p&gt;</description></item><item><title>Always run Visual Studio as an Administrator</title><link>https://www.zerosharp.com/always-run-visual-studio-as-an-administrator/</link><pubDate>Mon, 09 Sep 2013 07:49:00 +0100</pubDate><guid>https://www.zerosharp.com/always-run-visual-studio-as-an-administrator/</guid><description>&lt;p&gt;I always run Visual Studio as an administrator. There are various reasons why this is necessary including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;using IIS with a web application&lt;/li&gt;
&lt;li&gt;running web UI tests&lt;/li&gt;
&lt;li&gt;profiling&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In fact there&amp;rsquo;s a list &lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/jj662724.aspx"&gt;on MSDN&lt;/a&gt; of all the actions you require administrator permissions.&lt;/p&gt;
&lt;p&gt;Here is a way to make sure Visual Studio always opens with elevated privileges, even if you double click on a &lt;em&gt;.sln&lt;/em&gt; file. (I&amp;rsquo;m running Windows 8.)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Right-click &lt;em&gt;devenv.exe&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;em&gt;Troubleshoot program&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Check &lt;em&gt;The program requires additional permissions&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Test the program&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Wait for the program to launch&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;em&gt;Yes, save these settings for this program&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Close&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have multiple versions of Visual Studio installed, you should repeat the operation for all of the following.&lt;/p&gt;</description></item><item><title>Fix Visual Studio update links when running as Administrator</title><link>https://www.zerosharp.com/fix-visual-studio-update-links-when-running-as-administrator/</link><pubDate>Mon, 02 Sep 2013 09:58:00 +0100</pubDate><guid>https://www.zerosharp.com/fix-visual-studio-update-links-when-running-as-administrator/</guid><description>&lt;p&gt;This post is about fixing an annoyance whereby Visual Studio refuses to update extensions when running as an administrator.&lt;/p&gt;
&lt;p&gt;I always had a problem when an update to an extension or tool tried to open the browser. For instance, I would see this notification in the system tray.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/visual-studio-updates-001.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;And then when I went to &lt;em&gt;Tools/Extensions and Updates&amp;hellip;&lt;/em&gt; in Visual Studio, I&amp;rsquo;d get to something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/visual-studio-updates-002.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;But the &lt;em&gt;Update&lt;/em&gt; button was not responding to any clicks. The only workaround I found was to restart Visual Studio under my normal user account and then the button would work.&lt;/p&gt;</description></item><item><title>MiniProfiler with DevExpress XAF</title><link>https://www.zerosharp.com/miniprofiler-with-devexpress-xaf/</link><pubDate>Tue, 27 Aug 2013 09:14:00 +0100</pubDate><guid>https://www.zerosharp.com/miniprofiler-with-devexpress-xaf/</guid><description>&lt;p&gt;In this post I will demonstrate how to add &lt;a href="http://miniprofiler.com/"&gt;MiniProfiler&lt;/a&gt; to the XAF MainDemo web application.&lt;/p&gt;
&lt;p&gt;MiniProfiler is a simple fast profiler with a pretty user interface. It is fast because it only profiles code that you have explicitly decorated with the &lt;code&gt;MiniProfiler.Step()&lt;/code&gt; method. It was designed by the team at &lt;a href="http://stackoverflow.com/"&gt;StackOverflow&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First, add the MiniProfiler NuGet package to the MainDemo.Web project. Then add a placeholder to &lt;em&gt;default.aspx&lt;/em&gt; just before the last &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;</description></item><item><title>Fluent queries with DevExpress XPO - Implementation</title><link>https://www.zerosharp.com/fluent-queries-with-devexpress-xpo-implementation/</link><pubDate>Wed, 14 Aug 2013 11:03:00 +0100</pubDate><guid>https://www.zerosharp.com/fluent-queries-with-devexpress-xpo-implementation/</guid><description>&lt;p&gt;Continuing from my &lt;a href="https://www.zerosharp.com/fluent-queries-with-devexpress-xpo-intro"&gt;last post&lt;/a&gt;, I&amp;rsquo;ll demonstrate how to create a fluent interface so that you can do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Session&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InTransaction&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Contacts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ByPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Developer&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ThatHave&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NoPhoto&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;And&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TasksInProgress&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;And&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TasksWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Priority&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;High&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FirstOrDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;First, let&amp;rsquo;s look at the &amp;lsquo;beginning&amp;rsquo; of the fluent interface: the &lt;code&gt;Query()&lt;/code&gt; extension method.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;QueryExtensions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="n"&gt;IQueries&lt;/span&gt; &lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="n"&gt;Session&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Queries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// If we&amp;#39;re using XAF, do the same for ObjectSpace as well&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="n"&gt;IQueries&lt;/span&gt; &lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="n"&gt;IObjectSpace&lt;/span&gt; &lt;span class="n"&gt;objectSpace&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;xpObjectSpace&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;objectSpace&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;XPObjectSpace&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;xpObjectSpace&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Queries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;What does the &lt;code&gt;Queries()&lt;/code&gt; class look like?&lt;/p&gt;</description></item><item><title>Fluent queries with DevExpress XPO - Intro</title><link>https://www.zerosharp.com/fluent-queries-with-devexpress-xpo-intro/</link><pubDate>Mon, 12 Aug 2013 17:54:00 +0100</pubDate><guid>https://www.zerosharp.com/fluent-queries-with-devexpress-xpo-intro/</guid><description>&lt;p&gt;There are &lt;a href="http://documentation.devexpress.com/#xaf/CustomDocument3052"&gt;many ways to perform queries with XPO&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can do this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FindObject&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Contact&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;BinaryOperator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Name&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Elvis&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;or this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FindObject&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Contact&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;CriteriaOperator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Name = &amp;#39;Elvis&amp;#39;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Another way to use the &lt;a href="http://documentation.devexpress.com/#XPO/CustomDocument2537"&gt;simplified criteria syntax&lt;/a&gt;, and with the &lt;a href="https://code.google.com/p/dxcorecommunityplugins/wiki/XPO_EasyFields"&gt;Xpo_EasyFields CodeRush plugin&lt;/a&gt;. Then you can do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c#" data-lang="c#"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FindObject&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Contact&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;Customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Elvis&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For each of the above, you can optionally query within the transaction by passing in the &lt;code&gt;PersistentCriteriaEvaluationBehavior.InTransaction&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Or we can use LINQ via &lt;code&gt;XPQuery&amp;lt;T&amp;gt;.TransformExpression()&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Session.FindObject&amp;lt;Contact&amp;gt;(
 XPQuery&amp;lt;Contact&amp;gt;.TransformExpression(Session, c =&amp;gt; c.Name == &amp;#34;Elvis&amp;#34;)
 );
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;All of these methods are powerful, but the power comes at a cost. The syntax is neither elegant nor particularly clear and as a result it is not very practical to maintain or test.&lt;/p&gt;</description></item><item><title>Removing the RSS subscription icon from Octopress</title><link>https://www.zerosharp.com/removing-the-rss-subscription-icon-from-octopress/</link><pubDate>Tue, 09 Jul 2013 09:13:00 +0100</pubDate><guid>https://www.zerosharp.com/removing-the-rss-subscription-icon-from-octopress/</guid><description>&lt;p&gt;A &lt;a href="https://twitter.com/tlaynes"&gt;fellow Octopress blogger&lt;/a&gt; recently asked how I removed the RSS subscription icon from the Octopress navigation bar.&lt;/p&gt;
&lt;p&gt;First, create a new site variable &lt;code&gt;show_feeds&lt;/code&gt; by adding a line to the _&lt;em&gt;config.yml&lt;/em&gt; file which is in the root folder of the Octopress source.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-diff" data-lang="diff"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# _config.yml
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; # RSS / Email (optional) subscription links (change if using something like Feedburner)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gi"&gt;+ show_feeds: false
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; subscribe_rss: http://feeds.feedburner.com/zerosharp
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; subscribe_email:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; # RSS feeds can list your email address if you like
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; email:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then modify the &lt;em&gt;source/_includes/navigation.html&lt;/em&gt; as follows&lt;/p&gt;</description></item><item><title>Making XAF reports even better - Part 2</title><link>https://www.zerosharp.com/making-xaf-reports-even-better-part-2/</link><pubDate>Tue, 28 May 2013 11:51:00 +0100</pubDate><guid>https://www.zerosharp.com/making-xaf-reports-even-better-part-2/</guid><description>&lt;p&gt;Good news. The conversion is now two-way. Get the source code &lt;a href="https://github.com/ZeroSharp/Xaf_MainDemo_ReportSync"&gt;from GitHub&lt;/a&gt;. Make sure you have built MainDemo.Reports project.&lt;/p&gt;
&lt;p&gt;You will find there are now two T4 transforms in the project. &lt;em&gt;RepxToCSharp.tt&lt;/em&gt; is covered in the &lt;a href="https://www.zerosharp.com/making-xaf-reports-even-better-part-1"&gt;Part 1&lt;/a&gt;. It searches for any &lt;em&gt;.repx&lt;/em&gt; files in the solution and converts the scripts into compilable C#.&lt;/p&gt;
&lt;p&gt;The second transform is new. &lt;em&gt;CSharpToRepx.tt&lt;/em&gt; copies any changes to the script part back into the original &lt;em&gt;.repx&lt;/em&gt; files. Again, there are performance optimisations via checksums to prevent overwriting unchanged files.&lt;/p&gt;</description></item><item><title>Making XAF reports even better - Part 1</title><link>https://www.zerosharp.com/making-xaf-reports-even-better-part-1/</link><pubDate>Tue, 21 May 2013 14:38:00 +0100</pubDate><guid>https://www.zerosharp.com/making-xaf-reports-even-better-part-1/</guid><description>&lt;p&gt;The ability to create reports using a report writer is a very powerful feature of &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/"&gt;DevExpress XAF&lt;/a&gt;, but there are some limitations which are particularly cumbersome to deal with in complex project.&lt;/p&gt;
&lt;p&gt;One of the projects I work on has over 100 reports in it. Even though we make use of unit tests to ensure they are not broken, the maintenance of the code in the embedded scripts is particularly difficult to manage.&lt;/p&gt;</description></item><item><title>Fixing an unmanaged code AppCrash</title><link>https://www.zerosharp.com/fixing-an-unmanaged-code-appcrash/</link><pubDate>Mon, 29 Apr 2013 16:21:00 +0100</pubDate><guid>https://www.zerosharp.com/fixing-an-unmanaged-code-appcrash/</guid><description>&lt;p&gt;This post is the result of a recent bug hunt in which I came across a tricky bug, found a debugging switch I&amp;rsquo;d completely forgotten existed and learned a little about calling &lt;code&gt;extern&lt;/code&gt; string functions from C#.&lt;/p&gt;
&lt;p&gt;I love bug hunting. It&amp;rsquo;s like a murder mystery: you&amp;rsquo;ve got your suspects and you try to eliminate them one at a time until, as a famous bug hunter said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;hellip; when you have eliminated the impossible, whatever remains, however improbable, must be the truth.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Bonus - Simultaneous EasyTests</title><link>https://www.zerosharp.com/load-testing-xaf-bonus-simultaneous-easytests/</link><pubDate>Mon, 22 Apr 2013 16:31:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-bonus-simultaneous-easytests/</guid><description>&lt;p&gt;In &lt;a href="https://www.zerosharp.com/load-testing-xaf-overview"&gt;my recent series on load testing XAF&lt;/a&gt;, I used a Selenium javascript test to run the client browser instances. This is a good and cheap method of validating the performance of XAF applications under production load.&lt;/p&gt;
&lt;p&gt;However, if the load tests fail because of a concurrency bug or a performance bottleneck, it can still be difficult to analyse and solve. For this, we need to be able to simulate load locally against the development environment.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Part 5 - Analysis</title><link>https://www.zerosharp.com/load-testing-xaf-part-5-analysis/</link><pubDate>Sun, 14 Apr 2013 07:37:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-part-5-analysis/</guid><description>&lt;p&gt;This is the final post in a series about load testing XAF applications. Previously in the series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-overview/"&gt;Load Testing XAF: Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;Part 1: Deploying the target webserver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-2-selenium/"&gt;Part 2: Selenium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-3-uploading-and-validating-the-virtual-user-script/"&gt;Part 3: Uploading and validating a script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-4-launching-the-load-test/"&gt;Part 4: Launching the load test&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this part, we analyse the results of the load test we ran in &lt;a href="https://www.zerosharp.com/load-testing-xaf-part-3-uploading-and-validating-the-virtual-user-script/"&gt;Part 4&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="results"&gt;Results&lt;/h2&gt;
&lt;p&gt;The results of the test we ran are &lt;a href="https://load.wpm.neustar.biz/load/test/share/e0f547d711624168bc7fa0a69ddd8283"&gt;here&lt;/a&gt;. The graphs are interactive and give quite interesting data about the load tests. Feel free to have a look and play around with the results.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Part 4 - Launching the load test</title><link>https://www.zerosharp.com/load-testing-xaf-part-4-launching-the-load-test/</link><pubDate>Mon, 08 Apr 2013 11:19:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-part-4-launching-the-load-test/</guid><description>&lt;p&gt;This is another post in a series about load testing XAF applications. Previously in the series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-overview/"&gt;Load Testing XAF: Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;Part 1: Deploying the target webserver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-2-selenium/"&gt;Part 2: Selenium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-3-uploading-and-validating-the-virtual-user-script/"&gt;Part 3: Uploading and validating a script&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this part, we will launch a 1 hour test with 25 virtual users using the &lt;a href="http://home.wpm.neustar.biz/"&gt;NeuStar Web Performance Management&lt;/a&gt; module.&lt;/p&gt;
&lt;h2 id="schedule-and-launch-a-test"&gt;Schedule and launch a test&lt;/h2&gt;
&lt;p&gt;From the script validation screen, click on &lt;em&gt;Schedule a load test with this script&lt;/em&gt;. The defaults are good, but you can specify in detail how to run your load test. For instance, you can coordinate multiple Selenium scripts to simulate different types of activity on your site.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Part 3 - Uploading and Validating the Virtual User Script</title><link>https://www.zerosharp.com/load-testing-xaf-part-3-uploading-and-validating-the-virtual-user-script/</link><pubDate>Wed, 03 Apr 2013 16:39:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-part-3-uploading-and-validating-the-virtual-user-script/</guid><description>&lt;p&gt;This is another post in a series about load testing XAF applications. Previously in the series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-overview/"&gt;Load Testing XAF: Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;Part 1: Deploying the target webserver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-2-selenium/"&gt;Part 2: Selenium&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this part, we will load test the application we set up in &lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;Part 1&lt;/a&gt;, using the Selenium load test we created in &lt;a href="https://www.zerosharp.com/load-testing-xaf-part-2-selenium/"&gt;Part 2&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="neustar-web-performance-management"&gt;Neustar Web Performance Management&lt;/h2&gt;
&lt;p&gt;NeuStar (formerly BrowserMob) are a company specialised in web application performance monitoring. We are interested in their &lt;a href="https://home.wpm.neustar.biz/"&gt;web performance module&lt;/a&gt;. It is free to create an account. To run a test with less than 25 virtual users costs only $0.15 per virtual user. Tests with more than 25 users (up to 5000) require an additional paid plan.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Part 2 - Selenium</title><link>https://www.zerosharp.com/load-testing-xaf-part-2-selenium/</link><pubDate>Thu, 28 Mar 2013 16:56:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-part-2-selenium/</guid><description>&lt;h1 id="writing-a-selenium-user-test-against-maindemo"&gt;Writing a Selenium User Test against MainDemo&lt;/h1&gt;
&lt;p&gt;This is another post in a series about load testing XAF applications. Previously in the series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-overview/"&gt;Load Testing XAF: Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;Part 1: Deploying the target webserver&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="why-not-use-devexpress-easytests"&gt;Why not use DevExpress EasyTests?&lt;/h2&gt;
&lt;p&gt;The DevExpress recommended method of writing functional tests is to use the EasyTest functionality of the expressAppFramework. This has several advantages over other functional testing approaches.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It uses a domain specific language tailored for XAF making it easy to test views and actions&lt;/li&gt;
&lt;li&gt;It makes it easy to interact with the DevExpress controls that are used within XAF&lt;/li&gt;
&lt;li&gt;A single EasyTest can be run against both the ASP.NET and WinForms applications&lt;/li&gt;
&lt;li&gt;EasyTests work against both the debug webserver and IIS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, one feature which is not (yet) available is the ability to use EasyTests for load testing.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Part 1 - Deploying</title><link>https://www.zerosharp.com/load-testing-xaf-part-1-deploying/</link><pubDate>Fri, 22 Mar 2013 11:21:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-part-1-deploying/</guid><description>&lt;p&gt;This is the first part of a tutorial about load testing XAF applications. See the &lt;a href="https://www.zerosharp.com/load-testing-xaf-overview/"&gt;overview&lt;/a&gt; for a bit of background. In this post we set up the target webserver.&lt;/p&gt;
&lt;p&gt;You can target any machine which has a publicly available web address, but for this tutorial, I&amp;rsquo;m&amp;rsquo; deploying the MainDemo to the Amazon cloud, by following the instructions in &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/"&gt;Part 1&lt;/a&gt; and &lt;a href="http://blog.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/"&gt;Part 2&lt;/a&gt; of my previous series about Amazon Web Services.&lt;/p&gt;
&lt;p&gt;I am using version 12.2.7 of the DevExpress XAF MainDemo. There are a couple of extra changes to make to the web.config.&lt;/p&gt;</description></item><item><title>Load Testing XAF: Overview</title><link>https://www.zerosharp.com/load-testing-xaf-overview/</link><pubDate>Tue, 12 Mar 2013 18:20:00 +0100</pubDate><guid>https://www.zerosharp.com/load-testing-xaf-overview/</guid><description>&lt;p&gt;Over the next few posts, I will demonstrate how to load test XAF web applications.&lt;/p&gt;
&lt;h2 id="history"&gt;History&lt;/h2&gt;
&lt;p&gt;Performance testing has traditionally been difficult and expensive. A few years ago, to do it well required a powerful piece of dedicated load testing software such as HP LoadRunner (typical cost back in 2007: USD 50,000-100,000 or more per year!). This software was capable of simulating multiple virtual users via the use of recorded scripts and providing detailed performance statistics. Usually the cost was increased further increased by the need for powerful hardware to be able to run the application.&lt;/p&gt;</description></item><item><title>How to recursively change file ownership</title><link>https://www.zerosharp.com/how-to-recursively-change-file-ownership/</link><pubDate>Thu, 28 Feb 2013 17:40:00 +0100</pubDate><guid>https://www.zerosharp.com/how-to-recursively-change-file-ownership/</guid><description>&lt;p&gt;I recently ran into some file ownership trouble after cloning a bitbucket repository.&lt;/p&gt;
&lt;p&gt;The following script saved my bacon.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# FixOwnership.ps1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# This script recursively fixes the ownership on the files in the &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# current and subdirectories.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$acct1&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;New-Object&lt;/span&gt; &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Security&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Principal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;NTAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Administrators&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$profilefolder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Get-Item&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$acl1&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$profilefolder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;GetAccessControl&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$acl1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;SetOwner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$acct1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;dir &lt;/span&gt;&lt;span class="n"&gt;-r&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;set-acl&lt;/span&gt; &lt;span class="n"&gt;-aclobject&lt;/span&gt; &lt;span class="nv"&gt;$acl1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pause&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Colourful git command line</title><link>https://www.zerosharp.com/colourful-git-command-line/</link><pubDate>Thu, 14 Feb 2013 05:10:00 +0100</pubDate><guid>https://www.zerosharp.com/colourful-git-command-line/</guid><description>&lt;p&gt;For Valentine&amp;rsquo;s Day, why not make your git command line a little more colourful.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git config --global color.ui true
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>A C# Developer's Adventures in iOS - Integrating Git and MonoDevelop</title><link>https://www.zerosharp.com/a-c-number-developers-adventures-in-ios-integrating-git-and-monodevelop/</link><pubDate>Fri, 08 Feb 2013 14:52:00 +0100</pubDate><guid>https://www.zerosharp.com/a-c-number-developers-adventures-in-ios-integrating-git-and-monodevelop/</guid><description>&lt;p&gt;This is the second post in a series about iOS development from the perspective of a C# developer.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="https://www.zerosharp.com/a-c-number-developers-adventures-in-ios-getting-started/"&gt;previous post in the series&lt;/a&gt; we got started with MonoTouch and installed MonoDevelop and XCode. In this post, we&amp;rsquo;ll look at how to set up version control for an existing MonoTouch solution.&lt;/p&gt;
&lt;h2 id="version-control"&gt;Version Control&lt;/h2&gt;
&lt;p&gt;I didn&amp;rsquo;t have enough time &lt;a href="https://www.zerosharp.com/how-i-went-from-c-number-developer-to-iphone-developer-in-a-weekend/"&gt;at the hackathon&lt;/a&gt; to learn how to set up version control for MonoDevelop on a Mac. So let&amp;rsquo;s fix that straight away.&lt;/p&gt;</description></item><item><title>Clone your Octopress to blog from two places</title><link>https://www.zerosharp.com/clone-your-octopress-to-blog-from-two-places/</link><pubDate>Fri, 01 Feb 2013 11:59:00 +0100</pubDate><guid>https://www.zerosharp.com/clone-your-octopress-to-blog-from-two-places/</guid><description>&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/clone-your-octopress-001.png" alt=""&gt;
&lt;p&gt;This post covers how recreate a local repository of your Octopress blog. Perhaps you&amp;rsquo;ve accidentally lost it, or perhaps you would like to be able to blog from two different places. Recently &lt;a href="https://www.zerosharp.com/the-best-pc-laptop-is-a-mac/"&gt;I bought a new computer&lt;/a&gt; and I wanted to be able to blog from both my desktop and my laptop.&lt;/p&gt;
&lt;h3 id="how-octopress-works"&gt;How Octopress works&lt;/h3&gt;
&lt;p&gt;Octopress repositories have two branches, &lt;code&gt;source&lt;/code&gt; and &lt;code&gt;master&lt;/code&gt;. The &lt;code&gt;source&lt;/code&gt; branch contains the files that are used to generate the blog and the &lt;code&gt;master&lt;/code&gt; contains the blog itself.&lt;/p&gt;</description></item><item><title>Installing Ruby with Homebrew and rbenv on Mac OS X Mountain Lion</title><link>https://www.zerosharp.com/installing-ruby-with-homebrew-and-rbenv-on-mac-os-x-mountain-lion/</link><pubDate>Thu, 31 Jan 2013 17:38:00 +0100</pubDate><guid>https://www.zerosharp.com/installing-ruby-with-homebrew-and-rbenv-on-mac-os-x-mountain-lion/</guid><description>&lt;h2 id="install-ruby-with-rbenv"&gt;Install Ruby with rbenv&lt;/h2&gt;
&lt;p&gt;I decided to setup Octopress on my Mac so that I can publish blog posts from either Windows or MacOS. I&amp;rsquo;m on OS X 10.8.2.&lt;/p&gt;
&lt;p&gt;I tried to follow the &lt;a href="http://octopress.org/docs/setup/rbenv/"&gt;Octopress instructions&lt;/a&gt; for installing Ruby but ran into a few problems.&lt;/p&gt;
&lt;h3 id="install-homebrew"&gt;Install Homebrew&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://mxcl.github.com/homebrew/"&gt;Homebrew&lt;/a&gt; is a package manager for OS X. Open Terminal and install Homebrew with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ruby -e &amp;quot;$(curl -fsSkL raw.github.com/mxcl/homebrew/go)&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once the installation is successful, you can run the following command to check your environment.&lt;/p&gt;</description></item><item><title>A C# Developer's Adventures in iOS - Getting Started</title><link>https://www.zerosharp.com/a-c-number-developers-adventures-in-ios-getting-started/</link><pubDate>Wed, 30 Jan 2013 11:18:00 +0100</pubDate><guid>https://www.zerosharp.com/a-c-number-developers-adventures-in-ios-getting-started/</guid><description>&lt;h2 id="first-steps-in-iphone-development"&gt;First steps in iPhone development&lt;/h2&gt;
&lt;p&gt;This is the first in a series of posts about developing an iOS application from the perspective of a Windows C# developer.&lt;/p&gt;
&lt;h3 id="startup-weekend"&gt;Startup Weekend&lt;/h3&gt;
&lt;p&gt;On a recent month-long trip to South America, I took part in the &lt;a href="http://buenosaires.startupweekend.org/"&gt;Buenos Aires Startup Weekend&lt;/a&gt; hackathon and my team came second!](/how-i-went-from-c-number-developer-to-iphone-developer-in-a-weekend). The application we built is a treasure hunt game for tourists which helps them discover Buenos Aires. At the beginning of the weekend I knew nothing about mobile development. It was the first time I developed software using a Mac.&lt;/p&gt;</description></item><item><title>My amateur git skills have lead to an RSS deluge</title><link>https://www.zerosharp.com/my-amateur-git-skills-have-lead-to-an-rss-deluge/</link><pubDate>Tue, 29 Jan 2013 11:31:00 +0100</pubDate><guid>https://www.zerosharp.com/my-amateur-git-skills-have-lead-to-an-rss-deluge/</guid><description>&lt;p&gt;I was trying to upgrade to the latest Octopress version but it seems I did something with the atom.xml file and some of you got every single post as &amp;rsquo;new&amp;rsquo; in your RSS readers. Not sure what I did, but sorry for any extra mouse clicks. All working now.&lt;/p&gt;</description></item><item><title>Facebook Graph Search pwns your privacy</title><link>https://www.zerosharp.com/facebook-graph-search-pwns-your-privacy/</link><pubDate>Thu, 24 Jan 2013 11:10:00 +0100</pubDate><guid>https://www.zerosharp.com/facebook-graph-search-pwns-your-privacy/</guid><description>&lt;p&gt;Facebook&amp;rsquo;s new Graph Search allows you to easily see anybody&amp;rsquo;s photos.&lt;/p&gt;
&lt;p&gt;First, search for someone who is not a friend. Most often, if you navigate to their photos, you see something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/facebook-graph-search-001.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;You can&amp;rsquo;t see any photos because their privacy settings are not set to &amp;lsquo;Public&amp;rsquo;. It&amp;rsquo;s what you&amp;rsquo;d expect.&lt;/p&gt;
&lt;h4 id="use-graph-search-to-bypass-privacy"&gt;Use Graph Search to bypass privacy&lt;/h4&gt;
&lt;p&gt;If you put &lt;em&gt;Photos of &amp;lt;name&amp;gt;&lt;/em&gt; or &lt;em&gt;Photos by &amp;lt;name&amp;gt;&lt;/em&gt; into the new Facebook graph search &lt;strong&gt;you can view all their photos regardless of their privacy settings&lt;/strong&gt;. This works even for friends who have put you on a &amp;rsquo;limited&amp;rsquo; profile.&lt;/p&gt;</description></item><item><title>Image captions for Octopress</title><link>https://www.zerosharp.com/image-captions-for-octopress/</link><pubDate>Wed, 23 Jan 2013 11:56:00 +0100</pubDate><guid>https://www.zerosharp.com/image-captions-for-octopress/</guid><description>&lt;p&gt;I wanted to add captions to some of my images and came across &lt;a href="https://github.com/imathis/octopress/issues/124"&gt;this forum thread&lt;/a&gt;, from which I was able to piece together &lt;a href="http://tedkulp.com/"&gt;Ted Kulp&lt;/a&gt;&amp;rsquo;s slick solution.&lt;/p&gt;
&lt;p&gt;The following markdown&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;figure&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
 &lt;img src="http://some.url.com/pic.jpg" alt="Leonhard Euler"&gt;
 &lt;figcaption&gt;Leonhard Euler&lt;/figcaption&gt;
&lt;/figure&gt; 
&lt;p&gt;will render like this.&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="http://upload.wikimedia.org/wikipedia/commons/d/d7/Leonhard_Euler.jpg" alt="Leonhard Euler"&gt;
 &lt;figcaption&gt;Leonhard Euler&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;It works with &lt;code&gt;left&lt;/code&gt; and &lt;code&gt;right&lt;/code&gt; too.&lt;/p&gt;
&lt;h3 id="the-changes"&gt;The changes&lt;/h3&gt;
&lt;p&gt;First, create the image_caption_tag plugin and put it in the plugins subfolder.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# plugins/image_caption_tag.rb&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Title: Image tag with caption for Jekyll&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Description: Easily output images with captions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;Jekyll&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CaptionImageTag&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Liquid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Tag&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;nil&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;nil&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@class&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tag_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;markup&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;markup&lt;/span&gt; &lt;span class="o"&gt;=~&lt;/span&gt; &lt;span class="sr"&gt;/(\S.*\s+)?(https?:\/\/|\/)(\S+)(\s+\d+\s+\d+)?(\s+.+)?/i&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@class&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vg"&gt;$1&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vg"&gt;$2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="vg"&gt;$3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vg"&gt;$5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vg"&gt;$5&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vg"&gt;$4&lt;/span&gt; &lt;span class="o"&gt;=~&lt;/span&gt; &lt;span class="sr"&gt;/\s*(\d+)\s+(\d+)/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vg"&gt;$1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="vi"&gt;@height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vg"&gt;$2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;super&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;super&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vi"&gt;@img&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;lt;span class=&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;caption-wrapper &amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="vi"&gt;@class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rstrip&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39;&amp;gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;lt;img class=&amp;#39;caption&amp;#39; src=&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@img&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39; width=&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@width&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39; height=&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@height&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39; title=&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39;&amp;gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;lt;span class=&amp;#39;caption-text&amp;#39;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/span&amp;gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;lt;/span&amp;gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;Error processing input, expected syntax: ![name(s)] /url/to/image [width height] [title text]]([class)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="no"&gt;Liquid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Template&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register_tag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;imgcap&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Jekyll&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;CaptionImageTag&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Next, modify the _utilities.scss file as follows.&lt;/p&gt;</description></item><item><title>Setting up Octopress on Windows Again</title><link>https://www.zerosharp.com/setting-up-octopress-on-windows-again/</link><pubDate>Thu, 17 Jan 2013 11:20:00 +0100</pubDate><guid>https://www.zerosharp.com/setting-up-octopress-on-windows-again/</guid><description>&lt;p&gt;My &lt;a href="https://www.zerosharp.com/setting-up-octopress-on-windows/"&gt;very first blog post&lt;/a&gt; was about setting up Octopress. The following is an updated version of those instructions for setting up Octopress with Windows, ruby 1.9.3, python 2.7.3.&lt;/p&gt;
&lt;p&gt;This is quick guide to setting up &lt;a href="http://octopress.org/"&gt;Octopress&lt;/a&gt; to publish to GitHub pages. I&amp;rsquo;m using Windows 8 64-bit, but the instructions should work with other versions of Windows.&lt;/p&gt;
&lt;h3 id="get-with-github"&gt;Get with GitHub&lt;/h3&gt;
&lt;p&gt;First, get an account on GitHub and follow the excellent instructions for Windows here. &lt;a href="http://help.github.com/win-set-up-git/"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Better handling of Decimals in the XAF audit trail</title><link>https://www.zerosharp.com/better-handling-of-decimals-in-the-xaf-audit-trail/</link><pubDate>Tue, 15 Jan 2013 10:29:00 +0100</pubDate><guid>https://www.zerosharp.com/better-handling-of-decimals-in-the-xaf-audit-trail/</guid><description>&lt;p&gt;The following screenshot shows the detail view of an object change from the DevExpress XAF Audit Trail. The &lt;code&gt;DecimalValue&lt;/code&gt; property was changed from 123.45 to 543.22.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/audit-trail-001.jpg" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Why is the &lt;code&gt;OldValue&lt;/code&gt; property is displayed with two trailing zeros? The corresponding property is defined as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;[DefaultClassOptions]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyClass&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;XPObject&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;MyClass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Session&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;base&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;//...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="n"&gt;_DecimalValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt; [ModelDefault(&amp;#34;DisplayFormat&amp;#34;, &amp;#34;{0:n2}&amp;#34;)]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="n"&gt;DecimalValue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;get&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;_DecimalValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;set&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;SetPropertyValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;DecimalValue&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;ref&lt;/span&gt; &lt;span class="n"&gt;_DecimalValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="n"&gt;XPCollection&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;AuditDataItemPersistent&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_ChangeHistory&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;XPCollection&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;AuditDataItemPersistent&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ChangeHistory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;get&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_ChangeHistory&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;_ChangeHistory&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AuditedObjectWeakReference&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetAuditTrail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;_ChangeHistory&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="explanation-and-fix"&gt;Explanation and fix&lt;/h3&gt;
&lt;p&gt;A C# &lt;code&gt;decimal&lt;/code&gt; is a type which represents a number&amp;rsquo;s value &lt;em&gt;and its precision&lt;/em&gt;. It actually stores the number of trailing zeros along with the value. For the &lt;code&gt;NewValue&lt;/code&gt;, it has stored the decimal value as the user entered it - with no trailing zeros. Howevever, for the &lt;code&gt;OldValue&lt;/code&gt;, it has retrieved the value from the database and used the SQL column definition to determine the precision.&lt;/p&gt;</description></item><item><title>How to remove the trailing zeros of precision from a C# Decimal</title><link>https://www.zerosharp.com/how-to-remove-the-trailing-zeros-of-precision-from-a-c-number-decimal/</link><pubDate>Wed, 09 Jan 2013 17:45:00 +0100</pubDate><guid>https://www.zerosharp.com/how-to-remove-the-trailing-zeros-of-precision-from-a-c-number-decimal/</guid><description>&lt;p&gt;You may know that the C# &lt;code&gt;Decimal&lt;/code&gt; type remembers any trailing zeros. So for instance:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Console.WriteLine(123.45m);
Console.WriteLine(123.45000m);
Console.WriteLine(123.4500000m);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;results in&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;123.45
123.45000
123.4500000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is because the &lt;code&gt;Decimal&lt;/code&gt; type is designed for representing a number including its accuracy.&lt;/p&gt;
&lt;p&gt;It is tricky to find a good way of controlling this accuracy. If I have &lt;code&gt;x = 123.45000&lt;/code&gt;, how can I easily remove the trailing zeros so that &lt;code&gt;x.ToString()&lt;/code&gt; outputs &lt;code&gt;123.45&lt;/code&gt;?&lt;/p&gt;</description></item><item><title>How I went from C# Developer to iPhone Developer in a Weekend</title><link>https://www.zerosharp.com/how-i-went-from-c-number-developer-to-iphone-developer-in-a-weekend/</link><pubDate>Fri, 04 Jan 2013 10:35:00 +0100</pubDate><guid>https://www.zerosharp.com/how-i-went-from-c-number-developer-to-iphone-developer-in-a-weekend/</guid><description>&lt;p&gt;Recently I took part in &lt;a href="http://buenosaires.startupweekend.org/"&gt;Startup Weekend Buenos Aires&lt;/a&gt;. It works just like most hackathons:&lt;/p&gt;
&lt;p&gt;[&lt;figure&gt;
&lt;img src="https://www.zerosharp.com/images/blog/basw/BABingo-2puesto-SWBA2012.jpg" alt="New friends: Caro, Eze, Gus and me"&gt;&lt;/p&gt;
 &lt;figcaption&gt;New friends: Caro, Eze, Gus and me&lt;/figcaption&gt;
&lt;/figure&gt;](http://buenosaires.startupweekend.org/2012/11/12/ganadores-swba2012/)
&lt;ul&gt;
&lt;li&gt;You give a one minute pitch on Friday evening.&lt;/li&gt;
&lt;li&gt;Winners put together a team.&lt;/li&gt;
&lt;li&gt;You work with your team on Saturday and Sunday to launch a product.&lt;/li&gt;
&lt;li&gt;Demo for the judges.&lt;/li&gt;
&lt;li&gt;Prizes. Beer. Sleep.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the Friday I spoke no Spanish and had no idea how to write an iPhone app. By Sunday I still spoke no Spanish, but &lt;strong&gt;I&amp;rsquo;d built my first app and it won second prize!&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Deploy XAF ASP.NET Applications to Amazon Web Services: Part 5</title><link>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-5-load-balancing/</link><pubDate>Wed, 05 Dec 2012 11:03:00 +0100</pubDate><guid>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-5-load-balancing/</guid><description>&lt;h2 id="part-5-load-balancing"&gt;Part 5: Load balancing&lt;/h2&gt;
&lt;p&gt;This is the final post in this 5 part series about deploying XAF to the Amazon cloud. The other parts are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/"&gt;Part 1 - Creating a database in RDS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/"&gt;Part 2 - Deploying to ElasticBeanstalk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-3-troubleshooting-via-remote-desktop/"&gt;Part 3 - Troubleshooting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-4-incremental-deployment/"&gt;Part 4 - Incremental Deployment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This part covers load balancing and autoscaling.&lt;/p&gt;
&lt;h3 id="load-balancing"&gt;Load balancing&lt;/h3&gt;
&lt;p&gt;In order to enable load balancing with DevExpress XAF applications, you must activate client affinity (sticky sessions) which you can do in the &lt;strong&gt;Load Balancer tab&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Deploy XAF ASP.NET Applications to Amazon Web Services: Part 4</title><link>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-4-incremental-deployment/</link><pubDate>Mon, 05 Nov 2012 14:16:00 +0100</pubDate><guid>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-4-incremental-deployment/</guid><description>&lt;h2 id="part-4-incremental-deployment"&gt;Part 4: Incremental Deployment&lt;/h2&gt;
&lt;p&gt;This is the fourth post in a series about deploying ASP.NET applications to the Amazon cloud. In the first three posts covered deploying the XAF ASP.NET MainDemo to the Amazon cloud (&lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/"&gt;Part 1&lt;/a&gt;, &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/"&gt;Part 2&lt;/a&gt;, &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-3-troubleshooting-via-remote-desktop/"&gt;Part 3&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;When we deployed to the Elastic Beanstalk in &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/"&gt;Part 2&lt;/a&gt;, we chose &lt;em&gt;not&lt;/em&gt; to enable incremental deployment.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.zerosharp.com/images/blog/aws/launch-aws-beanstalk-2.jpg" alt="figure 11"&gt;&lt;/p&gt;
&lt;p&gt;I want to explain this decision further.&lt;/p&gt;
&lt;p&gt;If you choose not to deploy incrementally your deployment will take longer because the entire web deployment package needs to be uploaded every time you re-publish which takes about 4-5 minutes on my connection. The incremental deployment option creates a git repository in the target environment so that only the modified files are re-deployed. If you are frequently making changes and redploying, you can save considerable time. A re-deployment takes only a few seconds.&lt;/p&gt;</description></item><item><title>Deploy XAF ASP.NET Applications to Amazon Web Services: Part 3</title><link>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-3-troubleshooting-via-remote-desktop/</link><pubDate>Fri, 02 Nov 2012 17:54:00 +0100</pubDate><guid>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-3-troubleshooting-via-remote-desktop/</guid><description>&lt;h1 id="part-3-troubleshooting"&gt;Part 3: Troubleshooting&lt;/h1&gt;
&lt;p&gt;This is the third post in a series about deploying ASP.NET applications to the Amazon cloud.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/"&gt;Part 1&lt;/a&gt; we created an Amazon RDS instance of SQL Server to act as the database for the deployment.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/"&gt;Part 2&lt;/a&gt; we published the DevExpress MainDemo.Web to the Amazon Elastic Beanstalk.&lt;/p&gt;
&lt;p&gt;In this part we will look at troubleshooting methods and in particular how to connect to an EC2 instance in order to troubleshoot installations.&lt;/p&gt;</description></item><item><title>Deploy XAF ASP.NET Applications to Amazon Web Services: Part 2</title><link>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/</link><pubDate>Wed, 31 Oct 2012 12:52:00 +0100</pubDate><guid>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-2-publishing-maindemo/</guid><description>&lt;h1 id="part-2-publishing-maindemo"&gt;Part 2: Publishing MainDemo&lt;/h1&gt;
&lt;p&gt;This is the second post in a series about deploying ASP.NET applications to the &lt;a href="http://aws.amazon.com/"&gt;Amazon cloud&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/"&gt;Part 1&lt;/a&gt; we created an Amazon RDS instance of SQL Server to act as the database for the deployment. Make sure this is up and running before continuing.&lt;/p&gt;
&lt;p&gt;This part guides you through publishing the &lt;a href="http://www.devexpress.com/Products/NET/Application_Framework/"&gt;DevExpress XAF&lt;/a&gt; MainDemo application to the Amazon Elastic Beanstalk.&lt;/p&gt;
&lt;h2 id="amazon-elastic-beanstalk"&gt;Amazon Elastic Beanstalk&lt;/h2&gt;



&lt;p&gt;Amazon Elastic Beanstalk provides automatic capacity provisioning, load balancing, auto-scaling, and application health monitoring. &lt;strong&gt;That sounds like a lot of features we don&amp;rsquo;t really need&lt;/strong&gt; for the MainDemo, so let me explain.&lt;/p&gt;</description></item><item><title>Deploy XAF ASP.NET Applications to Amazon Web Services: Part 1</title><link>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/</link><pubDate>Tue, 23 Oct 2012 12:52:00 +0100</pubDate><guid>https://www.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-1-putting-the-database-in-the-cloud/</guid><description>&lt;h1 id="part-1-putting-the-database-in-the-cloud"&gt;Part 1: Putting the Database in the Cloud&lt;/h1&gt;
&lt;p&gt;This is the first part of a tutorial for installing the DevExpress MainDemo.Web to Amazon Web Services, but the same principles apply to any ASP.NET web application.&lt;/p&gt;
&lt;p&gt;This part covers creating an Amazon RDS instance running SQL Server Express and connecting a (locally running) MainDemo to it.&lt;/p&gt;
&lt;p&gt;At the time of writing the DevExpress version is 12.1.7.&lt;/p&gt;
&lt;h2 id="amazon-web-services"&gt;Amazon Web Services&lt;/h2&gt;
&lt;p&gt;If you have not already done so, you will need to sign up with &lt;a href="http://aws.amazon.com/"&gt;Amazon Web Services&lt;/a&gt;. There are costs associated with AWS, but the tutorial only uses very small cheap instances which cost as little as 2 cents per hour to run. Also, new customers get a load of hours for free as part of the &lt;a href="http://aws.amazon.com/free/"&gt;AWS Free Usage Tier&lt;/a&gt;. See the &lt;a href="http://aws.amazon.com/ec2/pricing/"&gt;AWS pricing&lt;/a&gt; for more information. Don&amp;rsquo;t forget to terminate your instances when you have finished.&lt;/p&gt;</description></item><item><title>Incompatible character encodings when generating Octopress</title><link>https://www.zerosharp.com/incompatible-character-encodings-when-generating-octopress/</link><pubDate>Mon, 15 Oct 2012 16:26:00 +0100</pubDate><guid>https://www.zerosharp.com/incompatible-character-encodings-when-generating-octopress/</guid><description>&lt;p&gt;I started getting an encoding error whenever I tried to generate my Octopress blog with &lt;code&gt;rake generate&lt;/code&gt;. The error message was:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Liquid error: incompatible character encodings: UTF-8 and IBM437
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I tried to save all my recently modified files with UTF-8 encoding, but I couldn&amp;rsquo;t get the error to go away until
I found a solution on &lt;a href="http://chxt6896.github.com/blog/2012/02/13/blog-jekyll-native.html#comment-678936946"&gt;this blog in Chinese&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Set two environment variables (via Control Panel/System/Advanced System Settings/Environment Variables) as follows:&lt;/p&gt;</description></item><item><title>The best PC laptop is a Mac</title><link>https://www.zerosharp.com/the-best-pc-laptop-is-a-mac/</link><pubDate>Tue, 09 Oct 2012 17:09:00 +0100</pubDate><guid>https://www.zerosharp.com/the-best-pc-laptop-is-a-mac/</guid><description>&lt;h3 id="a-month-ago"&gt;A month ago&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve never liked laptops. The screen seems so small. A powerful laptop is too heavy; a light one doesn&amp;rsquo;t cut the mustard.
I can&amp;rsquo;t even find the on/off switch.&lt;/p&gt;
&lt;p&gt;Then there are those fancy new &lt;strong&gt;Macbook Pro&lt;/strong&gt;s with retina displays. They seem light and powerful and the screen looks great. I don&amp;rsquo;t know much about Macs, but I&amp;rsquo;d like to learn.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But I need Microsoft Windows and Visual Studio. I know theoretically I can run a virtual machine or setup a dual boot, but I&amp;rsquo;ll bet it&amp;rsquo;s all a bit of a hassle and rather clunky&amp;hellip;&lt;/p&gt;</description></item><item><title>A look at the DevExpress MainDemo with Google Page Speed</title><link>https://www.zerosharp.com/a-look-at-the-devexpress-maindemo-with-google-page-speed/</link><pubDate>Wed, 12 Sep 2012 17:22:00 +0100</pubDate><guid>https://www.zerosharp.com/a-look-at-the-devexpress-maindemo-with-google-page-speed/</guid><description>&lt;p&gt;In this post I&amp;rsquo;ll demonstrate how to use the &lt;a href="https://developers.google.com/speed/pagespeed/"&gt;Google Page Speed&lt;/a&gt; tools to analyse the performance of the DevExpress XAF MainDemo.&lt;/p&gt;
&lt;p&gt;The easiest way to run Google Page Speed is as a Chrome or Firefox plugin. Both are available &lt;a href="https://developers.google.com/speed/pagespeed/insights_extensions"&gt;here&lt;/a&gt;. I use Chrome.&lt;/p&gt;
&lt;p&gt;Now open the DevExpress MainDemo from Visual Studio. By default it is installed to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;C:\Users\Public\Documents\DXperience 12.1 Demos\eXpressApp Framework\MainDemo\CS\MainDemo.sln
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set the MainDemo.Web as the startup project and change the connection string in web.config if necessary. Launch the application with Chrome and login as &amp;lsquo;Sam&amp;rsquo; (password is blank). Then press &lt;code&gt;F12&lt;/code&gt; to bring up the developer tools. The last tab is the Page Speed Analysis and your browser should look like this:&lt;/p&gt;</description></item><item><title>XpoBatch source code available</title><link>https://www.zerosharp.com/xpobatch-source-code-available/</link><pubDate>Wed, 25 Jul 2012 16:24:00 +0100</pubDate><guid>https://www.zerosharp.com/xpobatch-source-code-available/</guid><description>&lt;p&gt;The source code for the fast batch operations with DevExpress XPO &lt;a href="https://github.com/ZeroSharp/XpoBatch"&gt;is now available on on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It includes unit tests that can be run against SQL Server or in memory. It runs against DevExpress 12.1.7, but it will work against 11.2 (and possibly earlier versions) with a couple of minor modifications which are documented in the code.&lt;/p&gt;
&lt;h4 id="references"&gt;References&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/fast-batch-deletions-with-devexpress-xpo/"&gt;Fast batch deletions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.zerosharp.com/fast-batch-modifications-with-devexpress-xpo/"&gt;Fast batch modifications&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Fast batch modifications with DevExpress XPO</title><link>https://www.zerosharp.com/fast-batch-modifications-with-devexpress-xpo/</link><pubDate>Tue, 24 Jul 2012 14:02:00 +0100</pubDate><guid>https://www.zerosharp.com/fast-batch-modifications-with-devexpress-xpo/</guid><description>&lt;p&gt;Last week I wrote about &lt;a href="https://www.zerosharp.com/fast-batch-deletions-with-devexpress-xpo/"&gt;fast batch deletions&lt;/a&gt;. In this post I&amp;rsquo;ll show how to do the same for modifications.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s assume we want to replace the &amp;lsquo;State&amp;rsquo; property with &amp;lsquo;CA&amp;rsquo; and CostCenter with 123 for all records where the &amp;lsquo;City&amp;rsquo; is &amp;lsquo;San Francisco&amp;rsquo;. The recommended DevExpress approach would be something like the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;UnitOfWork&lt;/span&gt; &lt;span class="n"&gt;uow&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;UnitOfWork&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;xpCollection&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;XPCollection&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MyObject&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;uow&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CriteriaOperator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;City == &amp;#39;San Francisco&amp;#39;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MyObject&lt;/span&gt; &lt;span class="n"&gt;myObject&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;xpCollection&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;myObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;State&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;CA&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;myObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CostCenter&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;123&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;uow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CommitChanges&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The problem with the above code is that every record must be loaded and then an individual &lt;code&gt;UPDATE&lt;/code&gt; command is generated for each modification. This is necessary for the business logic to be applied correctly (such as the code in methods such as &lt;code&gt;OnSaving()&lt;/code&gt;). It is also necessary to handle record locking.&lt;/p&gt;</description></item><item><title>Fast batch deletions with DevExpress XPO</title><link>https://www.zerosharp.com/fast-batch-deletions-with-devexpress-xpo/</link><pubDate>Thu, 12 Jul 2012 17:00:00 +0100</pubDate><guid>https://www.zerosharp.com/fast-batch-deletions-with-devexpress-xpo/</guid><description>&lt;p&gt;When deleting a collection of objects, DevExpress recommends using &lt;a href="http://documentation.devexpress.com/#XPO/DevExpressXpoSession_Deletetopic116"&gt;&lt;code&gt;Session.Delete(ICollection objects)&lt;/code&gt;&lt;/a&gt;. This has the same effect as calling the &lt;code&gt;Delete()&lt;/code&gt; method for every object in the collection so that the business logic is applied correctly. The business logic in this context refers to code such as that in the &lt;code&gt;OnDeleting()&lt;/code&gt;, &lt;code&gt;OnDeleted()&lt;/code&gt; methods, but it also includes the clearing of references to the object by other objects. This approach is slow, but ensures the integrity of the data.&lt;/p&gt;</description></item><item><title>Trying out a new keyboard with no labels on the keys</title><link>https://www.zerosharp.com/trying-out-a-new-keyboard-with-no-labels-on-the-keys/</link><pubDate>Mon, 02 Jul 2012 09:35:00 +0100</pubDate><guid>https://www.zerosharp.com/trying-out-a-new-keyboard-with-no-labels-on-the-keys/</guid><description>&lt;p&gt;&lt;a href="http://www.daskeyboard.com/model-s-ultimate/"&gt;&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/trying-out-a-new-keyboard-001.jpg" alt="Das Keyboard Model S Ultimate"&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My new &lt;del&gt;keyboarf&lt;/del&gt; keyboard &lt;a href="http://www.daskeyboard.com/model-s-ultimate/"&gt;has no labels on the keys&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;On a normal keyboard, I can type at about 60 wpm, but I only use three or four fingers and I have to periodically glance down at the keyboard. I hope my new keyboard forces me to learn to touch type properly. Various coders have written on the subject - Jeff Atwood says &lt;a href="http://www.codinghorror.com/blog/2008/11/we-are-typists-first-programmers-second.html"&gt;we are typists first&lt;/a&gt;; Phil Haack &lt;a href="http://haacked.com/archive/2007/06/05/dvorak-keyboard-layout-of-champions.aspx"&gt;opts for Dvorak&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>An afternoon with two Fields Medallists</title><link>https://www.zerosharp.com/an-afternoon-with-two-fields-medallists/</link><pubDate>Tue, 05 Jun 2012 08:30:00 +0100</pubDate><guid>https://www.zerosharp.com/an-afternoon-with-two-fields-medallists/</guid><description>&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/an-afternoon-with-two-fields-medallists-001.jpg" alt="By Tugsataydin CC BY-SA 4.0 from Wikimedia Commons"&gt;
&lt;p&gt;On Saturday I attended an excellent discussion at the Tate modern which was part of &lt;a href="http://www.tate.org.uk/whats-on/tate-modern/eventseries/topology"&gt;a series of lectures on Topology&lt;/a&gt;. The first part was a screening of &lt;em&gt;Au Bonheur des Maths&lt;/em&gt;, a film by Raymond Depardon and Claudine Nougaret which is a collection of portraits of famous mathematicians describing beauty in mathematics. The second part was a discussion on the same topic between Sir Michael Atiyah and Cédric Villani, both winners of the &lt;a href="http://en.wikipedia.org/wiki/Fields_Medal"&gt;Fields Medal&lt;/a&gt;. You can read a review of the event at &lt;a href="http://tonysmaths.blogspot.co.uk/2012/06/atiyah-and-villani-at-tate-modern-value.html"&gt;Tony Mann&amp;rsquo;s maths blog&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>The only robot on any other planet</title><link>https://www.zerosharp.com/the-only-robot-on-any-other-planet/</link><pubDate>Wed, 30 May 2012 08:44:00 +0100</pubDate><guid>https://www.zerosharp.com/the-only-robot-on-any-other-planet/</guid><description>&lt;p&gt;This post is part of an ongoing series about robots, past and present. See &lt;a href="https://www.zerosharp.com/musical-interlude/"&gt;Musical Interlude&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="the-mars-opportunity-rover"&gt;The Mars &lt;em&gt;Opportunity&lt;/em&gt; Rover&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Opportunity&lt;/em&gt; landed on Mars in January 2004. It is currently the only active robot on any planet other than Earth (until the scheduled arrival of &lt;a href="http://www.youtube.com/watch?v=P4boyXQuUIw"&gt;&lt;em&gt;Curiosity&lt;/em&gt;&lt;/a&gt; in August 2012). The mission was originally supposed to last 90 days.&lt;/p&gt;
&lt;p&gt;The rover contains pieces of the fallen World Trade Center which were turned into shields to protect cabling.&lt;/p&gt;</description></item><item><title>NuGet 1.8 Installation Problem</title><link>https://www.zerosharp.com/nuget-1-dot-8-installation-problem/</link><pubDate>Fri, 25 May 2012 00:26:00 +0100</pubDate><guid>https://www.zerosharp.com/nuget-1-dot-8-installation-problem/</guid><description>&lt;p&gt;The NuGet team just released NuGet 1.8. Unfortunately there is an issue when upgrading it via the NuGet package manager. The following message appears and the installation fails.&lt;/p&gt;
&lt;pre&gt;
VSIXInstaller.SignatureMismatchException: The installed version of 'NuGet Package Manager' 
is signed, but the update version has an invalid signature. Therefore, Extension Manager 
cannot install the update. 

 at VSIXInstaller.Common.VerifyMatchingExtensionSignatures(IInstalledExtension installedExtension, 
 IInstallableExtension updateExtension) 
 at VSIXInstaller.InstallProgressPage.BeginInstallVSIX(SupportedVSSKU targetAppID)
&lt;/pre&gt; 
&lt;p&gt;As explained in the &lt;a href="http://docs.nuget.org/docs/release-notes/nuget-1.8"&gt;NuGet release notes&lt;/a&gt;, one solution is to uninstall NuGet from the VS Extension Gallery before reinstalling. Note: If Visual Studio won&amp;rsquo;t allow you to uninstall the extension (the Uninstall button is disabled), then you likely need to restart Visual Studio using &amp;ldquo;Run as Administrator.&amp;rdquo;&lt;/p&gt;</description></item><item><title>Testing the property signatures of DevExpress validation rules using NUnit and LINQ</title><link>https://www.zerosharp.com/testing-the-property-signatures-of-devexpress-validation-rules-using-nunit-and-linq/</link><pubDate>Thu, 24 May 2012 16:39:00 +0100</pubDate><guid>https://www.zerosharp.com/testing-the-property-signatures-of-devexpress-validation-rules-using-nunit-and-linq/</guid><description>&lt;p&gt;One of the projects I work on uses the validation module of the &lt;a href="http://devexpress.com/Products/NET/Application_Framework/"&gt;eXpressApp Framework (XAF)&lt;/a&gt;. Since the business logic is complex, there are many validation rules defined using the &lt;code&gt;[RuleFromBoolProperty]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;One of the recurring problems occurs when the signature of the associated property is incorrect. Consider the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;[RuleFromBoolProperty(&amp;#34;Invoice_IsAmountGreaterThanZero&amp;#34;, 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt; DefaultContexts.Save, 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt; &amp;#34;Invoice amount must be greater than zero.&amp;#34;, 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt; UsedProperties = &amp;#34;Amount&amp;#34;)]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;IsAmountGreaterThanZero&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;get&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Amount&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Notice that the rule is declared &lt;code&gt;public&lt;/code&gt;. This causes the getter to be executed when it is not required (see the &lt;a href="http://documentation.devexpress.com/#Xaf/clsDevExpressPersistentValidationRuleFromBoolPropertyAttributetopic"&gt;note&lt;/a&gt; in the documentation). However another problem is that the default behaviour for public properties of XPObjects is to persist them to the datastore which means the application will attempt to create a new column called &lt;code&gt;IsAmountGreaterThanZero&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Musical Interlude</title><link>https://www.zerosharp.com/musical-interlude/</link><pubDate>Tue, 15 May 2012 11:10:00 +0100</pubDate><guid>https://www.zerosharp.com/musical-interlude/</guid><description>&lt;p&gt;This post is part of an ongoing series about robots, past and present. See &lt;a href="https://www.zerosharp.com/robot-egyptologists/"&gt;Robot Egyptologists&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Robot quadcopters playing the James Bond theme tune.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
 &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/_sUeGC-8dyk?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
 &lt;/div&gt;

&lt;p&gt;There is no human controlling the robots. Each one has been assigned a series of points in space that it must reach at specific times. The robots are aware of each other and avoid collisions.&lt;/p&gt;</description></item><item><title>Robot Egyptologists</title><link>https://www.zerosharp.com/robot-egyptologists/</link><pubDate>Tue, 01 May 2012 11:52:00 +0100</pubDate><guid>https://www.zerosharp.com/robot-egyptologists/</guid><description>&lt;p&gt;This post is part of an ongoing series about robots, past and present. See &lt;a href="https://www.zerosharp.com/skiing-on-mars/"&gt;Skiing on Mars&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="mysterious-shafts-in-the-great-pyramid-of-giza"&gt;Mysterious Shafts in the Great Pyramid of Giza&lt;/h3&gt;
&lt;p&gt;Various robots have been used to explore secret tunnels in the Great Pyramid of Giza.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://http://en.wikipedia.org/wiki/File:Great_Pyramid_Diagram.svg"&gt;&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/robot-egyptologists-001.png" alt=""&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The tunnels were discovered in 1872 by Waynman Dixon, a British engineer who was helping with a project to undertake accurate measurements of the pyramid. He noticed a crack in the southern wall of the Queen&amp;rsquo;s Chamber and &lt;strong&gt;discovered a shaft hidden behind the masonry&lt;/strong&gt;, as well as a similar shaft in the northern wall. The shafts are very narrow (20x14cm) and so there was no feasible method of exploring them until recently. The shafts in question are &lt;strong&gt;shown in red on the diagram above&lt;/strong&gt;. There are two similar shafts in the King&amp;rsquo;s Chamber above it, but these have exits on the outside of the pyramid.&lt;/p&gt;</description></item><item><title>Skiing on Mars</title><link>https://www.zerosharp.com/skiing-on-mars/</link><pubDate>Fri, 27 Apr 2012 11:45:00 +0100</pubDate><guid>https://www.zerosharp.com/skiing-on-mars/</guid><description>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/File:Mars_propm_rover.jpg"&gt;&lt;img class="img-right" src="https://www.zerosharp.com/images/blog/skiing-on-mars-003.jpg" alt=""&gt;
&lt;/a&gt;
This post is part of an ongoing series about robots, past and present. See &lt;a href="https://www.zerosharp.com/friends-robots-countrymen/"&gt;Friends, Robots, Countrymen&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="the-soviet-prop-m-rovers"&gt;The Soviet PrOP-M Rovers&lt;/h3&gt;
&lt;p&gt;In May 1971, the USSR launched two rovers to explore Mars. &lt;strong&gt;They were to move on skis (!!)&lt;/strong&gt; while connected to the landers with 15m umbilical cables.&lt;/p&gt;
&lt;p&gt;The first one crash landed. The second landed successfully but failed twenty seconds after landing and never moved. The reasons are unknown although the landing took place in the middle of a dust storm. The base module did manage to transmit about 20 seconds worth of the &lt;strong&gt;first ever photograph of the surface of Mars&lt;/strong&gt;, shown on the left here. According to the Soviet Academy of Sciences there is nothing, horizon or otherwise, identifiable in this photograph.&lt;/p&gt;</description></item><item><title>Friends, Robots, Countrymen</title><link>https://www.zerosharp.com/friends-robots-countrymen/</link><pubDate>Tue, 24 Apr 2012 15:55:00 +0100</pubDate><guid>https://www.zerosharp.com/friends-robots-countrymen/</guid><description>&lt;p&gt;This is the first in a series of posts about robots, past and present.&lt;/p&gt;
&lt;p&gt;Since at least the 1950s, people have claimed that we are just around the corner from a robot revolution. Perhaps it&amp;rsquo;s finally here! The robots are coming!&lt;/p&gt;
&lt;p&gt;Recently there have been substantial advances in many different overlapping domains: the driverless car, unmanned drones, machine vision, machine translation, machine learning, speech recognition, facial recognition, swarm robotics, self-reconfiguring modular robots, powered exoskeletons, nanotechnology, etc.&lt;/p&gt;</description></item><item><title>Octopress on Windows and GitHub</title><link>https://www.zerosharp.com/setting-up-octopress-on-windows/</link><pubDate>Fri, 06 Apr 2012 17:11:00 +0100</pubDate><guid>https://www.zerosharp.com/setting-up-octopress-on-windows/</guid><description>&lt;blockquote&gt;
&lt;div STYLE="color:red"&gt;There is a more recent version of this post which covers ruby 1.9.3, python 2.7.3.&lt;/div&gt;
&lt;p&gt;— January 2013 update: &lt;a href="http://blog.zerosharp.com/setting-up-octopress-on-windows-again"&gt;http://blog.zerosharp.com/setting-up-octopress-on-windows-again&lt;/a&gt; Setting up Octopress on Windows again&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;BR&gt;&lt;/div&gt;
---
&lt;div&gt;&lt;BR&gt;&lt;/div&gt;
This is quick guide to setting up [Octopress](http://octopress.org/) on a Windows 7 machine to publish to GitHub pages. It relies on ruby 1.9.2 and python 2.7.2.
&lt;h3 id="get-with-github"&gt;Get with GitHub&lt;/h3&gt;
&lt;p&gt;First, get an account on GitHub and follow the excellent instructions for Windows here. &lt;a href="http://help.github.com/win-set-up-git/"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>