<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns: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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Chief of the System Blog</title>
	
	<link>http://remy.supertext.ch</link>
	<description>We should be taught not to wait for inspiration to start a thing. Action always generates inspiration. Inspiration seldom generates action.</description>
	<pubDate>Mon, 21 Sep 2009 08:55:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ChiefOfTheSystemBlog" /><feedburner:info uri="chiefofthesystemblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Collection was modified; enumeration operation may not execute</title>
		<link>http://feedproxy.google.com/~r/ChiefOfTheSystemBlog/~3/JEtOkf2l7lA/</link>
		<comments>http://remy.supertext.ch/2009/07/collection-was-modified-enumeration-operation-may-not-execute/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 14:57:31 +0000</pubDate>
		<dc:creator>Remy Blaettler</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://remy.supertext.ch/2009/07/collection-was-modified-enumeration-operation-may-not-execute/</guid>
		<description><![CDATA[Ever tried to remove or change something in a C# Enumeration while you iterate over it? Yes, it does not work very well.
But there are ways around it.
foreach (Item item in items.ToArray())
{
    if (item.Visible == false)
    {
        items.Remove(item);
    }
}
The [...]]]></description>
			<content:encoded><![CDATA[<p>Ever tried to remove or change something in a C# Enumeration while you iterate over it? Yes, it does not work very well.</p>
<p>But there are ways around it.</p>
<pre class="code"><span style="color: rgb(0,0,255)">foreach</span> (Item item <span style="color: rgb(0,0,255)">in</span> items.ToArray())
{
    <span style="color: rgb(0,0,255)">if</span> (item.Visible == <span style="color: rgb(0,0,255)">false</span>)
    {
        items.Remove(item);
    }
}</pre>
<p>The simplest way is to use ToArray(). No much coding, no complicated loops, but obviously not very efficient for larger lists.</p>
<p>A few alternatives are presented by <a href="http://blogs.msdn.com/kevin_ransom/archive/2005/03/14/395101.aspx">Kevin Ransom</a>.</p>
<img src="http://feeds.feedburner.com/~r/ChiefOfTheSystemBlog/~4/JEtOkf2l7lA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://remy.supertext.ch/2009/07/collection-was-modified-enumeration-operation-may-not-execute/feed/</wfw:commentRss>
		<feedburner:origLink>http://remy.supertext.ch/2009/07/collection-was-modified-enumeration-operation-may-not-execute/</feedburner:origLink></item>
		<item>
		<title>Float Drop Problem</title>
		<link>http://feedproxy.google.com/~r/ChiefOfTheSystemBlog/~3/-UW-kr5uAaE/</link>
		<comments>http://remy.supertext.ch/2009/07/float-drop-problem/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 17:27:37 +0000</pubDate>
		<dc:creator>Remy Blaettler</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://remy.supertext.ch/2009/07/float-drop-problem/</guid>
		<description><![CDATA[For our Orders, Jobs and Documents pages we switched from using tables to using lists (ul/li) with left floating div&#8217;s. This is nice in terms of modern CSS driven HTML and is easier to adopt to the iPhone. But it does bring a few issues with it. For example that the div&#8217;s tend to drop [...]]]></description>
			<content:encoded><![CDATA[<p>For our Orders, Jobs and Documents pages we switched from using tables to using lists (ul/li) with left floating div&#8217;s. This is nice in terms of modern CSS driven HTML and is easier to adopt to the iPhone. But it does bring a few issues with it. For example that the div&#8217;s tend to drop below the one on their left if the content is too large and they have no size attribute. </p>
<p>I&#8217;ve built a page where I tried out different ways to prevent this with example code.</p>
<p><a href="http://remy.supertext.ch/uploads/floatproblem.html">Float Drop Examples</a></p>
<p>What we used at Supertext is to have the 2nd column with a fixed position. But this is only possible if you have only 2 columns and if the width of the first column is fixed too.</p>
<p>&#160;</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:48ee661d-f850-4c0c-929b-b0b8fb7686cd" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">div</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">div</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">Test</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">div</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">div style</span><span style="color: #000000; ">=</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">position: absolute; left: 40px;</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">
        </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">b</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">Long Text and very </span><span style="color: #0000FF; ">long</span><span style="color: #000000; "> Text. Long Text and very </span><span style="color: #0000FF; ">long</span><span style="color: #000000; "> Text. Long Text and very </span><span style="color: #0000FF; ">long</span><span style="color: #000000; "> Text.</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">b</span><span style="color: #000000; ">&gt;&lt;</span><span style="color: #000000; ">br </span><span style="color: #000000; ">/&gt;</span><span style="color: #000000; ">
    </span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">div</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">
</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">div</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">
</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Let me know if you have a better solution!</p>
<img src="http://feeds.feedburner.com/~r/ChiefOfTheSystemBlog/~4/-UW-kr5uAaE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://remy.supertext.ch/2009/07/float-drop-problem/feed/</wfw:commentRss>
		<feedburner:origLink>http://remy.supertext.ch/2009/07/float-drop-problem/</feedburner:origLink></item>
		<item>
		<title>Breadcrumbs to indicate the Checkout Progress</title>
		<link>http://feedproxy.google.com/~r/ChiefOfTheSystemBlog/~3/VytkYC0hMEI/</link>
		<comments>http://remy.supertext.ch/2009/06/breadcrumbs-to-indicate-the-checkout-progress/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:27:27 +0000</pubDate>
		<dc:creator>Remy Blaettler</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://remy.supertext.ch/?p=139</guid>
		<description><![CDATA[According to webdesignpractices, about 45% all all major websites use Breadcrumbs in some way. Either to help navigation or to indicate some type of progress.
At Supertext we didn&#8217;t do anything like this so far. During the ordering process, we just had a title to tell the user at which step he was and some info [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.webdesignpractices.com/navigation/breadcrumb.html">webdesignpractices</a>, about 45% all all major websites use Breadcrumbs in some way. Either to help navigation or to indicate some type of progress.</p>
<p>At Supertext we didn&#8217;t do anything like this so far. During the ordering process, we just had a title to tell the user at which step he was and some info about the order on the right column.</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image.png"><img title="Supertext Order Process" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="302" alt="Supertext Order Process" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb.png" width="494" border="0"></a> </p>
<p>So we tried a simple approach by just adding some text breadcrumbs into the title bar this like this:</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image1.png"><img title="Process with Breadcrumbs (Bad example)" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="429" alt="Process with Breadcrumbs (Bad example)" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb1.png" width="494" border="0"></a> </p>
<p>But this example is bad for multiple reasons:</p>
<ol>
<li>No indication where the user is at the moment. Address should be highlighted or in a different color.
<li>No information about the following steps
<li>Look and feel is poor</li>
</ol>
<p>We&#8217;ve now decided on something like this:</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image2.png"><img title="New Version" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="265" alt="New Version" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb2.png" width="494" border="0"></a> </p>
<p>Just look at the new part below the title. There some other changes on this mockup too. Just ignore them. They will go online later this year. What do you think? It covers pretty much all issues that I mentioned above. No?</p>
<p>We modeled it after the example from swiss airlines:</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image3.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="298" alt="image" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb3.png" width="494" border="0"></a> </p>
<p><br/>Here are some other examples we looked at:</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image4.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="341" alt="image" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb4.png" width="494" border="0"></a> </p>
<p><a href="http://www.doodle.com/">Doodle</a> with their KISS approach. Not really breadcrumbs, but gives a progress indication too. Just not much more.</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image5.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="312" alt="image" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb5.png" width="494" border="0"></a> </p>
<p>Did you find them? On the upper right corner. Yeah, I had to search for them too. But it&#8217;s all there. Where I am, next step, last step. But it does have some potential for improvments <img src='http://remy.supertext.ch/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image6.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="292" alt="image" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb6.png" width="494" border="0"></a> </p>
<p>Another nice example is Amazon with the cart indicating where I am. Maybe we could use a pencil for Supertext?</p>
<p><a href="http://remy.supertext.ch/wp-content/uploads/2009/06/image7.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="304" alt="image" src="http://remy.supertext.ch/wp-content/uploads/2009/06/image-thumb7.png" width="494" border="0"></a> </p>
<p>Not very surprising, Apple also delivers with a simple yet elegant solution. </p>
<p><br/>Another article that covers some of these topics is <a href="http://www.smashingmagazine.com/2009/05/28/12-tips-for-designing-an-excellent-checkout-process/">12 Tips For Designing an Excellent Checkout Process</a> on Smashing Magazin.</p>
<p><br/></p>
<img src="http://feeds.feedburner.com/~r/ChiefOfTheSystemBlog/~4/VytkYC0hMEI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://remy.supertext.ch/2009/06/breadcrumbs-to-indicate-the-checkout-progress/feed/</wfw:commentRss>
		<feedburner:origLink>http://remy.supertext.ch/2009/06/breadcrumbs-to-indicate-the-checkout-progress/</feedburner:origLink></item>
		<item>
		<title>Using Log4Net for a Windows Console Application</title>
		<link>http://feedproxy.google.com/~r/ChiefOfTheSystemBlog/~3/5LRRQcYhIdk/</link>
		<comments>http://remy.supertext.ch/2009/02/using-log4net-for-a-windows-console-application/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 13:03:49 +0000</pubDate>
		<dc:creator>Remy Blaettler</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://remy.supertext.ch/?p=120</guid>
		<description><![CDATA[Most examples with Log4Net are with ASP.NET, but it works perfectly fine with Windows Form and Console Applications too.
What you need is an App.config file that you add to your project. 


&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;
&#60;configuration&#62;
  &#60;configSections&#62;
    &#60;section name=&#34;log4net&#34; type=&#34;log4net.Config.Log4NetConfigurationSectionHandler,log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821&#34; /&#62;
  &#60;/configSections&#62;

    &#60;!-- Log4net Logging [...]]]></description>
			<content:encoded><![CDATA[<p>Most examples with Log4Net are with ASP.NET, but it works perfectly fine with Windows Form and Console Applications too.</p>
<p>What you need is an App.config file that you add to your project. </p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:802e2285-ace3-4f62-86d0-8dea6ec79df3" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">&lt;?</span><span style="color: #FF00FF; ">xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; </span><span style="color: #0000FF; ">?&gt;</span><span style="color: #000000; ">
</span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">configuration</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
  </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">configSections</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">section </span><span style="color: #FF0000; ">name</span><span style="color: #0000FF; ">=&quot;log4net&quot;</span><span style="color: #FF0000; "> type</span><span style="color: #0000FF; ">=&quot;log4net.Config.Log4NetConfigurationSectionHandler,log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821&quot;</span><span style="color: #FF0000; "> </span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
  </span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">configSections</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">

    </span><span style="color: #008000; ">&lt;!--</span><span style="color: #008000; "> Log4net Logging Setup </span><span style="color: #008000; ">--&gt;</span><span style="color: #000000; ">
  </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">log4net </span><span style="color: #FF0000; ">debug</span><span style="color: #0000FF; ">=&quot;false&quot;</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">appender </span><span style="color: #FF0000; ">name</span><span style="color: #0000FF; ">=&quot;RollingLogFileAppender&quot;</span><span style="color: #FF0000; "> type</span><span style="color: #0000FF; ">=&quot;log4net.Appender.RollingFileAppender&quot;</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">param </span><span style="color: #FF0000; ">name</span><span style="color: #0000FF; ">=&quot;File&quot;</span><span style="color: #FF0000; "> value</span><span style="color: #0000FF; ">=&quot;C:\\directory\\supertext_outsidetasks.log&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">param </span><span style="color: #FF0000; ">name</span><span style="color: #0000FF; ">=&quot;AppendToFile&quot;</span><span style="color: #FF0000; "> value</span><span style="color: #0000FF; ">=&quot;true&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">maxSizeRollBackups </span><span style="color: #FF0000; ">value</span><span style="color: #0000FF; ">=&quot;10&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">datePattern </span><span style="color: #FF0000; ">value</span><span style="color: #0000FF; ">=&quot;yyyy-MM-dd&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">rollingStyle </span><span style="color: #FF0000; ">value</span><span style="color: #0000FF; ">=&quot;Date&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">lockingModel </span><span style="color: #FF0000; ">type</span><span style="color: #0000FF; ">=&quot;log4net.Appender.FileAppender+MinimalLock&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">layout </span><span style="color: #FF0000; ">type</span><span style="color: #0000FF; ">=&quot;log4net.Layout.PatternLayout&quot;</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
        </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">header </span><span style="color: #FF0000; ">value</span><span style="color: #0000FF; ">=&quot;Date | Level | SessionID | Logger | Message | &amp;#xA;&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
        </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">param </span><span style="color: #FF0000; ">name</span><span style="color: #0000FF; ">=&quot;ConversionPattern&quot;</span><span style="color: #FF0000; "> value</span><span style="color: #0000FF; ">=&quot;%date{ABSOLUTE}| %-5p | %-30logger| %m|%n&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">layout</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">appender</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">root</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">priority </span><span style="color: #FF0000; ">value</span><span style="color: #0000FF; ">=&quot;DEBUG&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
      </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">appender-ref </span><span style="color: #FF0000; ">ref</span><span style="color: #0000FF; ">=&quot;RollingLogFileAppender&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
    </span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">root</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
  </span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">log4net</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
</span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">configuration</span><span style="color: #0000FF; ">&gt;</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Then initialize it in your main() function:</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:244af8fc-6042-409f-9963-6ba333a17f71" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">using</span><span style="color: #000000; "> log4net;
</span><span style="color: #0000FF; ">using</span><span style="color: #000000; "> log4net.Config;

</span><span style="color: #0000FF; ">static</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">void</span><span style="color: #000000; "> Main(</span><span style="color: #0000FF; ">string</span><span style="color: #000000; ">[] args)
{
    log4net.Config.XmlConfigurator.Configure();

    </span><span style="color: #008000; ">//</span><span style="color: #008000; ">your code</span><span style="color: #008000; ">
</span><span style="color: #000000; ">}</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>And you can use it like in ASP.NET:</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:012b4164-c0bf-4e97-bffa-54c30ba2b36f" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">log.Info(</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">Hello Logfile</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">);
</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The only issue I had was that adding the configSection like this did not work:</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:7466d111-acf7-461b-b129-bb7503a1f8ae" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">configSections</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
    </span><span style="color: #0000FF; ">&lt;</span><span style="color: #800000; ">section </span><span style="color: #FF0000; ">name</span><span style="color: #0000FF; ">=&quot;log4net&quot;</span><span style="color: #FF0000; "> type</span><span style="color: #0000FF; ">=&quot;log4net.Config.Log4NetConfigurationSectionHandler,log4net&quot;</span><span style="color: #0000FF; ">/&gt;</span><span style="color: #000000; ">
</span><span style="color: #0000FF; ">&lt;/</span><span style="color: #800000; ">configSections</span><span style="color: #0000FF; ">&gt;</span><span style="color: #000000; ">
</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>I had to add the whole shebang with Version, etc. to it. Then it started working. Anyone else had that problem?</p>
<p>Anyway, are people still using Log4Net? There is not much activity on the project anymore and the last version is getting pretty old.</p>
<img src="http://feeds.feedburner.com/~r/ChiefOfTheSystemBlog/~4/5LRRQcYhIdk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://remy.supertext.ch/2009/02/using-log4net-for-a-windows-console-application/feed/</wfw:commentRss>
		<feedburner:origLink>http://remy.supertext.ch/2009/02/using-log4net-for-a-windows-console-application/</feedburner:origLink></item>
		<item>
		<title>Change a CSS Control Adapter in Code</title>
		<link>http://feedproxy.google.com/~r/ChiefOfTheSystemBlog/~3/ngIE1h1d4Ys/</link>
		<comments>http://remy.supertext.ch/2008/11/change-a-css-control-adapter-in-code/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 23:01:24 +0000</pubDate>
		<dc:creator>Remy Blaettler</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://remy.supertext.ch/2008/11/change-a-css-control-adapter-in-code/</guid>
		<description><![CDATA[I run into a situation where I needed different CSS Control Adapters for the ASP.NET Menu Control for differnent browsers, in my case a default one and one for the iPhone.
So my first idea was to just put multiple controlAdapters sections into a .browser file, but for whatever reason that did not work (I still [...]]]></description>
			<content:encoded><![CDATA[<p>I run into a situation where I needed different CSS Control Adapters for the ASP.NET Menu Control for differnent browsers, in my case a default one and one for the iPhone.</p>
<p>So my first idea was to just put multiple controlAdapters sections into a .browser file, but for whatever reason that did not work (I still think this should work somehow, if you have the answer, let me know). Then I was looking to just change the adapter in my code, but even Scott Guthrie said it&#8217;s <a href="http://weblogs.asp.net/scottgu/archive/2006/09/08/CSS-Control-Adapter-Toolkit-Update.aspx#978543">not possible</a>. Ok, time to call it a day and get a beer (or two).</p>
<p>But who cares if the Corporate Vice President in the Microsoft Developer Division says it&#8217;s not possible, lets go at it again. Eventually I found <a href="http://forums.asp.net/p/1105715/1957702.aspx#1957702">this post</a>. If it is possible to add and remove Adapters at run time, it clearly has to be possible to change them, no? And indeed, it is possible:</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:26641ae0-8204-4e90-bd31-1cb0fc58354c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 379px; padding-top: 0px">
<pre style="background-color:White;;overflow: auto;">
<div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">    </span><span style="color: #0000FF; ">protected</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">void</span><span style="color: #000000; "> OnPreInit(EventArgs e)
    {
        HttpContext.Current.Request.Browser.Adapters[</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">System.Web.UI.WebControls.Menu, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">] </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">Supertext.Adapters.iUiMenuAdapter</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">;
        </span><span style="color: #0000FF; ">base</span><span style="color: #000000; ">.OnPreInit(e);
    }

    </span><span style="color: #0000FF; ">protected</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">void</span><span style="color: #000000; "> OnUnload(EventArgs e)
    {
        </span><span style="color: #0000FF; ">base</span><span style="color: #000000; ">.OnUnload(e);

        HttpContext.Current.Request.Browser.Adapters[</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">System.Web.UI.WebControls.Menu, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">] </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">CSSFriendly.MenuAdapter</span><span style="color: #000000; ">&quot;</span><span style="color: #000000; ">;
    }

</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Just add the above code to your aspx page and change the key/value pair appropriately. You can iterate through the Adapters list to get a better idea what is in there and how to replace it.</p>
<p>Now, this is not exactly a schoolbook code sample, but it works and it&#8217;s just intended to give you kick in the right direction. In that sense, please no of these &#8220;this is unmaintainable code&#8221; comments. Thanks!</p>
<img src="http://feeds.feedburner.com/~r/ChiefOfTheSystemBlog/~4/ngIE1h1d4Ys" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://remy.supertext.ch/2008/11/change-a-css-control-adapter-in-code/feed/</wfw:commentRss>
		<feedburner:origLink>http://remy.supertext.ch/2008/11/change-a-css-control-adapter-in-code/</feedburner:origLink></item>
		<item>
		<title>iPhone as a Modem (Finally)</title>
		<link>http://feedproxy.google.com/~r/ChiefOfTheSystemBlog/~3/vRckKhKJ69I/</link>
		<comments>http://remy.supertext.ch/2008/11/iphone-as-a-modem-finally/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 17:36:06 +0000</pubDate>
		<dc:creator>Remy Blaettler</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://remy.supertext.ch/2008/11/iphone-as-a-modem-finally/</guid>
		<description><![CDATA[One of the bigger drawbacks of the iPhone has always been that you could not use it as a modem together with your laptop (also called tethering). Obviously AT&#38;T is not very interested in that, since you pay a flat rate for iPhone data plan. With other phones you always need a special plan if [...]]]></description>
			<content:encoded><![CDATA[<p>One of the bigger drawbacks of the iPhone has always been that you could not use it as a modem together with your laptop (also called tethering). Obviously AT&amp;T is not very interested in that, since you pay a flat rate for iPhone data plan. With other phones you always need a special plan if you want to use tethering.</p>
<p><a href="http://www.junefabrics.com/iphone/index.php"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="484" alt="IMG_0004" src="http://remy.supertext.ch/wp-content/uploads/2008/11/img-0004.png" width="324" border="0"></a> </p>
<p>But now, thanks to <a href="http://www.junefabrics.com/iphone/index.php">PDAnet</a> you can use your Jailbroken iPhone as a modem too! Installation is a breeze, assuming you have Cydia installed and it works fine so far. Obviously, speed is limited if you don&#8217;t have the 3G phone, but it&#8217;s better than nothing.</p>
<p>We can all be Digital Nomads now!</p>
<p>Apparently even <a href="http://www.insanely-great.com/news.php?id=9860">AT&amp;T woke up</a> and said they would offer tethering for the iPhone soon.</p>
<img src="http://feeds.feedburner.com/~r/ChiefOfTheSystemBlog/~4/vRckKhKJ69I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://remy.supertext.ch/2008/11/iphone-as-a-modem-finally/feed/</wfw:commentRss>
		<feedburner:origLink>http://remy.supertext.ch/2008/11/iphone-as-a-modem-finally/</feedburner:origLink></item>
	</channel>
</rss>
