<?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>richard-slater.co.uk</title>
	<atom:link href="http://www.richard-slater.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richard-slater.co.uk</link>
	<description>Jesus, Life, Programming and Systems Administration</description>
	<lastBuildDate>Sat, 21 Aug 2010 17:40:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Spot The Mistake 1</title>
		<link>http://www.richard-slater.co.uk/archives/2010/08/21/spot-the-mistake-one/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/08/21/spot-the-mistake-one/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 17:30:29 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=804</guid>
		<description><![CDATA[This one had me puzzled for about an hour, I shall endeavour to post the answer in the comments in short order. foreach &#40;var id in CharacterIdentities&#41; &#123; QueryMethodAsync&#40; APIMethods.CharacterSkillInTraining, m_userId, m_apiKey, id.CharacterID, &#40;x&#41; =&#62; OnSkillInTrainingUpdated&#40;x, id&#41;&#41;; &#125;]]></description>
			<content:encoded><![CDATA[<p>This one had me puzzled for about an hour, I shall endeavour to post the answer in the comments in short order.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var id <span style="color: #0600FF;">in</span> CharacterIdentities<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
  QueryMethodAsync<span style="color: #000000;">&#40;</span>
    APIMethods.<span style="color: #0000FF;">CharacterSkillInTraining</span>, 
    m_userId, 
    m_apiKey, 
    id.<span style="color: #0000FF;">CharacterID</span>,
    <span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#41;</span> <span style="color: #008000;">=&gt;</span> OnSkillInTrainingUpdated<span style="color: #000000;">&#40;</span>x, id<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/08/21/spot-the-mistake-one/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using EVEMon Data with LINQPad</title>
		<link>http://www.richard-slater.co.uk/archives/2010/07/31/using-evemon-data-with-linqpad/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/07/31/using-evemon-data-with-linqpad/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 21:52:17 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[EVEMon]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EVE Online]]></category>
		<category><![CDATA[LINQPad]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=782</guid>
		<description><![CDATA[LINQPad is an awesome aide to .NET Developers. Written by Joseph Albahari of LinqBridge and the C# In a Nutshell series fame. LINQPad allows the developer to write, compile and run C# or VB.NET Expressions, Statements of Programs outside of Visual Studio. Everything I am going to show you in this post can be done [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.linqpad.net">LINQPad</a> is an awesome aide to .NET Developers. Written by Joseph Albahari of <a href="http://www.albahari.com/nutshell/linqbridge.aspx">LinqBridge</a> and the <a href="http://www.albahari.com/nutshell">C# In a Nutshell</a> series fame. LINQPad allows the developer to write, compile and run C# or VB.NET Expressions, Statements of Programs outside of Visual Studio.</p>
<p>Everything I am going to show you in this post can be done with Visual Studio simply by wrapping the text in a new console application, and adding references to the DLLs. However I strongly encourage you to download LINQPad and give it a go.</p>
<p>In the event you are using 64-bit windows and are still using LINQPad 2 you will need to download the <a href="http://www.linqpad.net/Beta.aspx">x86 version</a> of LINQPad 2, as all of the EVEMon assemblies are compiled for x86. If you have LINQPad 4 you don&#8217;t need to worry about.</p>
<p>Assuming you have <a href="http://evemon.battleclinic.com">EVEMon</a> installed, the first step is to load the EVEMon.Common.dll assembly into LINQPad:</p>
<ol>
<li>Go ahead and fire up LINQPad ensure you have a new query window open</li>
<li>Press F4 (Query -> Query Properties).</li>
<li>Click the &#8220;Browse&#8230;&#8221; button at the bottom of the properties window.</li>
<li>Navigate to the EVEMon install directory.</li>
<li>Select &#8220;EVEMon.Common.dll&#8221;</li>
</ol>
<p><a href="http://www.richard-slater.co.uk/wp-content/uploads/2010/07/LINQPadQueryProperties.png"><img src="http://www.richard-slater.co.uk/wp-content/uploads/2010/07/LINQPadQueryProperties.png" alt="" title="LINQPadQueryProperties" width="556" height="223" class="aligncenter size-full wp-image-783" /></a></p>
<p>While you have &#8220;Query Properties&#8221; open go to the &#8220;Additional Namespace Import&#8221; tab and add the following two lines:</p>
<pre>
EVEMon.Common.Data
EVEMon.Common
</pre>
<p>EVEMon.Common was designed to work as part of a long running process, namely the EVEMon application sitting in your system tray from when you turn your computer on until you turn it off, as such we need load the static data from the data files.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">EveClient.<span style="color: #0000FF;">Initialize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>Now we get to do some LINQ,</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">var allItems <span style="color: #008000;">=</span> from item <span style="color: #0600FF;">in</span> StaticItems.<span style="color: #0000FF;">AllItems</span>
	       where item.<span style="color: #0000FF;">Family</span> <span style="color: #008000;">==</span> ItemFamily.<span style="color: #0000FF;">Ship</span>
	       select <span style="color: #008000;">new</span> 
	       <span style="color: #000000;">&#123;</span>
	           item.<span style="color: #0000FF;">Name</span>,
	           item.<span style="color: #0000FF;">Race</span>,
	           CPU <span style="color: #008000;">=</span> item.<span style="color: #0000FF;">Properties</span><span style="color: #000000;">&#91;</span>DBConstants.<span style="color: #0000FF;">CPUOutputPropertyID</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Value</span>.<span style="color: #0000FF;">Value</span>,
	           PG <span style="color: #008000;">=</span> item.<span style="color: #0000FF;">Properties</span><span style="color: #000000;">&#91;</span>DBConstants.<span style="color: #0000FF;">PGOutputPropertyID</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Value</span>.<span style="color: #0000FF;">Value</span>,
	           item.<span style="color: #0000FF;">Description</span>
	       <span style="color: #000000;">&#125;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>I could start to explain the above line by line, but there are lots of really good LINQ articles on the Internet, including one by <a href="http://www.linqpad.net/WhyLINQBeatsSQL.aspx">Joseph Albahari</a>. We will just say that the above pulls all of the ships out of EVEMon&#8217;s Items data file and selects the Name, Race, CPU, PowerGrid and Description property for each one.</p>
<p>Now we see my favorite aspect of LINQPad, the .Dump() extension method, simply running the following command:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>14
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">allItems.<span style="color: #0000FF;">Dump</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>Will output the data we have just queried as a nice HTML Table:</p>
<p><a href="http://www.richard-slater.co.uk/wp-content/uploads/2010/07/LINQPadDumpShips.png"><img src="http://www.richard-slater.co.uk/wp-content/uploads/2010/07/LINQPadDumpShips.png" alt="" title="LINQPadDumpShips" width="574" height="402" class="aligncenter size-full wp-image-784" /></a></p>
<p>That is all I have for you for now, I am working on a project that uses this data outside of EVEMon, keep an eye on <a href="https://twitter.com/richardslater">Twitter</a> where I will hopefully be providing a link for testing in the not too far distant future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/07/31/using-evemon-data-with-linqpad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracing A Method Signature</title>
		<link>http://www.richard-slater.co.uk/archives/2010/07/16/tracing-a-method-signature/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/07/16/tracing-a-method-signature/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 21:03:52 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[EVEMon]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=776</guid>
		<description><![CDATA[Over the past three weeks I have discovered that many performance problems with Windows Forms applications are down to certain events being fired very rapidly, usually these are down to layout operations being triggered by updates to controls. Without the use of RedGate Software&#8217;s excellent performance profiler I have been forced back into the habit [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past three weeks I have discovered that many performance problems with Windows Forms applications are down to certain events being fired very rapidly, usually these are down to layout operations being triggered by updates to controls.</p>
<p>Without the use of <a href="http://www.red-gate.com/">RedGate Software&#8217;s</a> excellent performance profiler I have been forced back into the habit of temporarily peppering the code I suspect of being a problem with trace messages.</p>
<p>For a while I was quite disorganised using trace messages such as &#8220;Entered SoAndSoMethod&#8221;, &#8220;OnSomeEvent Triggered&#8221;, etc. Over time I have settled into using the declaring class and method name to identify which method was being called.</p>
<p>Thinking about it today I decided this was still too much work (yeah, I am that lazy), I wondered if <a href="http://msdn.microsoft.com/en-us/library/system.reflection.aspx">System.Reflection</a> could help me:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> Trace<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    var stackTrace <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> StackTrace<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    var frame <span style="color: #008000;">=</span> stackTrace.<span style="color: #0000FF;">GetFrame</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    var method <span style="color: #008000;">=</span> frame.<span style="color: #0000FF;">GetMethod</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    var parameters <span style="color: #008000;">=</span> FormatParameters<span style="color: #000000;">&#40;</span>method.<span style="color: #0000FF;">GetParameters</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    var declaringType <span style="color: #008000;">=</span> method.<span style="color: #0000FF;">DeclaringType</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;EVEMon.&quot;</span>, <span style="color: #FF0000;">String</span>.<span style="color: #0000FF;">Empty</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    Trace<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{0}.{1}({2})&quot;</span>, declaringType, method.<span style="color: #0000FF;">Name</span>, parameters<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">string</span> FormatParameters<span style="color: #000000;">&#40;</span>ParameterInfo<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> parameters<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    var paramDetail <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> StringBuilder<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var param <span style="color: #0600FF;">in</span> parameters<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>paramDetail.<span style="color: #0000FF;">Length</span> <span style="color: #008000;">!=</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>
            paramDetail.<span style="color: #0000FF;">Append</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;, &quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        paramDetail.<span style="color: #0000FF;">AppendFormat</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{0} {1}&quot;</span>, param.<span style="color: #0000FF;">GetType</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Name</span>, param.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">return</span> paramDetail.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This means that with liberal application of:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">EveClient.<span style="color: #0000FF;">Trace</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>Will output the following to the trace:</p>
<pre>
0d 0h 00m 03s > CharacterMonitor.OnLoad(ParameterInfo e)
0d 0h 00m 03s > CharacterMonitor.multiPanel_SelectionChange(ParameterInfo sender, ParameterInfo e)
0d 0h 00m 03s > CharacterMonitor.multiPanel_SelectionChange(ParameterInfo sender, ParameterInfo e)
</pre>
<p>Hopefully that will save a few seconds here and there. It is a shame that reflection can&#8217;t get the actual values of the parameters from the frame, as that would be even more useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/07/16/tracing-a-method-signature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.net 3.5 GridView RowCommand event fired twice</title>
		<link>http://www.richard-slater.co.uk/archives/2010/04/01/asp-net-3-5-gridview-rowcommand-event-fired-twice/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/04/01/asp-net-3-5-gridview-rowcommand-event-fired-twice/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:25:27 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=763</guid>
		<description><![CDATA[I am writing this up to hopefully save someone else time in the future, this particular problem took up six hours of my day yesterday causing quite a bit of frustration for me, as the developer, and the users of the application. If you are searching for the solution scroll down to the bottom of [...]]]></description>
			<content:encoded><![CDATA[<p>I am writing this up to hopefully save someone else time in the future, this particular problem took up six hours of my day yesterday causing quite a bit of frustration for me, as the developer, and the users of the application.</p>
<p>If you are searching for the solution scroll down to the bottom of the page where I will outline the solution I used to resolve the problem. It is also worth pointing out that this does appear to be fixed in .NET 4. Certainly I was able to consistently reproduce the problem with VS2008/.NET 3.5 on multiple different computers. However after converting the project to VS2010/.NET 5 I haven&#8217;t seen the issue.</p>
<h1>Explanation of the problem</h1>
<p>I wrote and maintain an application that publishes a list of courses and allows users to book onto these courses, what I have listed below is a simplified version of this application.</p>
<p>The administration console contains two lists:</p>
<ul>
<li><strong>Published Courses</strong> &#8211; courses visible to all employees.</li>
<li><strong>Unpublished Courses </strong>- courses waiting to be published, only visible from the administration console.</li>
</ul>
<p>Courses can be freely published (i.e. moved from Unpublished to Published) by clicking green tick. Courses that have not had any bookings made can be unpublished by clicking the red cross.</p>
<p>The cross and the tick are implemented as <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx">GridView</a> <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield.aspx">ButtonFields</a>:</p>
<pre>
</pre>
<pre><code>&lt;asp:ButtonField ButtonType="Image" CommandName="UnpublishCourse"
</code><code>    ImageUrl="~/images/unpublish.png" InsertVisible="False" Text="Unpublish" /&gt;
</code></pre>
<p><a href="http://www.richard-slater.co.uk/wp-content/uploads/2010/04/CourseBookings1.png"><img class="aligncenter size-medium wp-image-765" title="CourseBookings" src="http://www.richard-slater.co.uk/wp-content/uploads/2010/04/CourseBookings1-300x114.png" alt="" width="300" height="114" /></a></p>
<p>This application has been running for six months, the issue had not been observed up until yesterday. The user explained to me that when they were publishing courses they were always published in pairs, equally when unpublishing courses it was being done in pairs, concealingly unpublishing a course with bookings.</p>
<h1>Investigating the problem</h1>
<p>Initially I tried to reproduce this on my local machine, backed up and subsequently restored the database locally made sure I was running the same revision as the server and fired it up. Couldn&#8217;t reproduce the problem, no matter how fast I clicked it wouldn&#8217;t happen. Tried various permutations of code and database but could only reproduce on the server.</p>
<p>Refreshed the binaries on the server with the HEAD from subversion, problem was still happening most of the time. I confirmed that it wasn&#8217;t an issue with the stored procedures by running them manually through LinqPad.</p>
<p>I started putting debug statements at the entry points to the critical parts of the code, this yielded an interesting output on my development machine, each time the cross or the tick was clicked UnpublishedGridView_RowCommand was fired twice. This gave me something to search for, seems I am not the only one to have this problem, <a href="https://connect.microsoft.com/VisualStudio/feedback/details/102115/gridview-rowcommand-event-firing-twice">Microsoft tried to reproduce it in 2006</a> but couldn&#8217;t.</p>
<h1>Solving the problem</h1>
<p>As it turns out there are several ways of fixing the problem, several people have used timers to <a href="http://www.labbookpages.co.uk/electronics/debounce.html">&#8220;debounce&#8221;</a> the RowCommand event, assuming that the event is always going to be fired twice a session variable can be used to filter out the second event.</p>
<p>Because the event is only fired twice when ButtonType=&#8221;Image&#8221; not when ButtonType=&#8221;Link&#8221; you can set the text property to the HTML to render your image. This resulted in the code above becomming:</p>
<pre>
</pre>
<pre><code>&lt;asp:ButtonField ButtonType="Link" CommandName="UnpublishCourse"
</code><code>    InsertVisible="False" Text="&lt;img src=images/unpublish.png /&gt;" /&gt;
</code></pre>
<p>This proved to be the simplest possible solution, Visual Studio 2008 throws a warning about ASP.net validation, but I can live with that as long as the application works. In addition to the simplicity of the solution it also continues to work in ASP.net 4 (which doesn&#8217;t exhibit the double event behaviour).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/04/01/asp-net-3-5-gridview-rowcommand-event-fired-twice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lack of AutoEllipsis support in ToolStripSystemRenderer</title>
		<link>http://www.richard-slater.co.uk/archives/2010/03/07/lack-of-autoellipsis-support-in-toolstripsystemrenderer/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/03/07/lack-of-autoellipsis-support-in-toolstripsystemrenderer/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 21:03:04 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EVEMon]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=753</guid>
		<description><![CDATA[AutoEllipsis is a property introduced to System.Windows.Forms.Label with .NET 3.0, which in the event of the text overflowing the rendering rectangle of the Label will trim the end and add a Ellipsis (&#8220;…&#8221;), if this does occur the ToolTip for the label will also be set to the full (untrimmed text). Unfortunately this functionality is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.label.autoellipsis%28VS.85%29.aspx">AutoEllipsis</a> is a property introduced to System.Windows.Forms.Label with .NET 3.0, which in the event of the text overflowing the rendering rectangle of the Label will trim the end and add a Ellipsis (&#8220;…&#8221;), if this does occur the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.aspx">ToolTip</a> for the label will also be set to the full (untrimmed text).</p>
<p>Unfortunately this functionality is not available for <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripstatuslabel.aspx">ToolStripStatusLabel</a>. To make things worse in the event the text overflows it disappears completely. This bug, oversight, feature or whatever you want to call it cause some confusion after the release of EVEMon 1.3.0.1912. Several people assumed the new more verbose status bar was broken, being empty and all.</p>
<p>We put together a kludge fix, which would set the text and if it overflowed try to guess the length with <a href="http://msdn.microsoft.com/en-us/library/6xe5hazb.aspx">Graphics.MeasureString</a>. This worked fairly well, it cause some flickering when resizing the window and would leave a small gap on the right hand side of the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.statusstrip.aspx">StatusStrip</a>.</p>
<p>I knew there must be a better way, and seeing an article about the <a href="http://msdn.microsoft.com/en-us/library/system.drawing.stringformat.aspx">StringFormat</a> class reminded me of the need to find it. Searching about a bit found me a post on <a href="http://discuss.joelonsoftware.com/default.asp?dotnet.12.597246.5">Joel on Software</a>, I refined the code a little and came up with this (which is basically identical to Tom&#8217;s solution):</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> AutoEllipsisToolStripRenderer <span style="color: #008000;">:</span> ToolStripSystemRenderer
<span style="color: #000000;">&#123;</span>
  <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> OnRenderItemText<span style="color: #000000;">&#40;</span>ToolStripItemTextRenderEventArgs e<span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    ToolStripStatusLabel label <span style="color: #008000;">=</span> e.<span style="color: #0000FF;">Item</span> <span style="color: #0600FF;">as</span> ToolStripStatusLabel<span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>label <span style="color: #008000;">==</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
      <span style="color: #0600FF;">base</span>.<span style="color: #0000FF;">OnRenderItemText</span><span style="color: #000000;">&#40;</span>e<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
      return<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    TextRenderer.<span style="color: #0000FF;">DrawText</span><span style="color: #000000;">&#40;</span>e.<span style="color: #0000FF;">Graphics</span>,
      label.<span style="color: #0000FF;">Text</span>,
      label.<span style="color: #0000FF;">Font</span>,
      e.<span style="color: #0000FF;">TextRectangle</span>,
      label.<span style="color: #0000FF;">ForeColor</span>,
      TextFormatFlags.<span style="color: #0000FF;">EndEllipsis</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>You need to wire this code into your StatusStrip:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">MainStatusStrip</span>.<span style="color: #0000FF;">Renderer</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> AutoEllipsisToolStripRenderer<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>To the ToolStripStatusLabel will also need it&#8217;s Spring property set to true, and if you want the text left aligned the TextAlign Property will need to be set to MiddleLeft.</p>
<p>If you want the ToolTip to work correctly the StatusStrip will need to have ShowItemToolTips set to work, and the ToolStripStatusLabel AutoToolTip set to true. It isn&#8217;t perfect as the ToolTip is displayed when the text is not truncated, but it is close enough for my purposes.</p>
<p>I am exploring WPF at the moment, I was glad to see the default behaviour of a <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.statusbar.aspx">StatusBar</a> was to just stop rendering the text at the bounds of control, an ellipsis could be added with the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.textblock.texttrimming.aspx">TextTrimming</a> and <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.textblock.textwrapping.aspx">TextWraping</a> properties:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statusbar</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,102,0,0&quot;</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;MainStatusBar&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statusbaritem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;textblock</span> <span style="color: #000066;">TextWrapping</span>=<span style="color: #ff0000;">&quot;NoWrap&quot;</span> <span style="color: #000066;">TextTrimming</span>=<span style="color: #ff0000;">&quot;CharacterEllipsis&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            Some Text Goes Here, this text may be very long as demonstrated here. In the event we run out of space an ellipsis is used.
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/textblock<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statusbaritem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statusbar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/03/07/lack-of-autoellipsis-support-in-toolstripsystemrenderer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LINQPad Crash</title>
		<link>http://www.richard-slater.co.uk/archives/2010/03/02/linqpad-crash/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/03/02/linqpad-crash/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:48:18 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Crash]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[LINQPad]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=746</guid>
		<description><![CDATA[Update: I never did &#8220;fix&#8221; this problem, installing .NET 4 then using LINQPad 4 seems to work well. I found myself using LINQPad more often than creating console applications, so much so I dicided to make the small but worth while investment in the optional &#8220;Autocompletion&#8221; (Intelisense-like) component. The licence is great because I can have [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #ff0000;">Update:</span> I never did &#8220;fix&#8221; this problem, installing .NET 4 then using LINQPad 4 seems to work well.</strong></p>
<p>I found myself using <a href="http://www.linqpad.net/">LINQPad</a> more often than creating console applications, so much so I dicided to make the small but worth while investment in the optional &#8220;Autocompletion&#8221; (Intelisense-like) component. The licence is great because I can have it installed on all three of my PCs without having to buy extra licences.</p>
<p>I was figuring out the limits of the Math.Pow function a few days ago on the laptop when the LINQPad upgrade message appeared, not sure what happened next because LINQPad crashed with the following exception.</p>
<p><strong>System Specification:</strong></p>
<ul>
<li>Windows 7 Home Premium x64</li>
<li>.NET v2.0.50727 (+3.0 &amp; 3.5)</li>
<li>.NET v4.0.20506</li>
<li>VisualStudio 2010 Beta1</li>
</ul>
<pre>System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at LINQPad.Program.ProcessException(Exception ex)
   at LINQPad.Program.Start(String[] args)
   at LINQPad.ProgramStarter.Run(String[] args)
   at LINQPad.Loader.Main(String[] args)</pre>
<p>If anyone has any theories as to how this can be fixed I would be very apprecitive if you could post in the comments.</p>
<p>So far I have tried:</p>
<ul>
<li>Reinstalling from the latest (2.10.1)<strong> </strong>from the LINQPad website.</li>
<li>Restarted the computer.</li>
<li>Removing LINQPad through Add/Remove Programs.</li>
<li>Remove LINQPAD manually.</li>
<li>Rename %APPDATA%\LINQPad.</li>
<li>Looked for Native Images in C:\Windows\assembly &#8211; None there</li>
</ul>
<p>It seems to me that LINQPad throws some exception, which it&#8217;s built in exception handler tries to handle then fails, this probably means that the above stack trace is probably not indicative of what is causing the problem. Not that I think it will make a difference but I am going to try upgrading to Visual Studio 2010 RC tomorrow then at least I wll be able to use LINQPad for .NET 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/03/02/linqpad-crash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing the PictureBox control from locking files</title>
		<link>http://www.richard-slater.co.uk/archives/2010/02/28/preventing-the-picturebox-control-from-locking-files/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/02/28/preventing-the-picturebox-control-from-locking-files/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 20:18:58 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[EVEMon]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=739</guid>
		<description><![CDATA[One of our more regular contributors to EVEMon posted on our forums showing that the application was incapable of updating cached files (specifically images), after a bit testing I discovered the following Exception was being thrown when trying to overwrite the file in question: System.IO.IOException: The process cannot access the file 'path\filename' because it is [...]]]></description>
			<content:encoded><![CDATA[<p>One of our more regular contributors to <a href="http://evemon.battleclinic.com/">EVEMon</a> posted on our forums showing that the application was incapable of updating cached files (specifically images), after a bit testing I discovered the following Exception was being thrown when trying to overwrite the file in question:</p>
<pre>System.IO.IOException: The process cannot access the file 'path\filename' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at EVEMon.Common.FileHelper.OverwriteOrWarnTheUser(String srcFileName, String destFileName) in EVEMon.Common\FileHelper.cs:line 108
   at EVEMon.Common.FileHelper.OverwriteOrWarnTheUser(String destFileName, Func`2 writeContentFunc) in EVEMon.Common\FileHelper.cs:line 82
   at EVEMon.Common.Controls.CharacterPortrait.SavePortraitToCache(Image newImage) in EVEMon.Common\Controls\CharacterPortrait.cs:line 248
</pre>
<p>After a bit of searching around I discovered a <a href="http://stackoverflow.com/questions/2188464/net-app-locks-file">post on StackOverflow</a> identifying that System.Drawing.Bitmap(string filename) would lock the filename until the Bitmap was disposed of. The post presented a solution but no code, A bit of further searching confirmed my expectation that <a href="http://msdn.microsoft.com/en-us/library/4sahykhd.aspx">Image.FromFile(string filename)</a> was subject to the same locking behaviour:</p>
<blockquote><p>The file remains locked until the <a id="ctl00_MTCS_main_ctl51_ctl00_ctl00" onclick="javascript:Track('ctl00_MTCS_main_ctl51_ctl00_contenthere|ctl00_MTCS_main_ctl51_ctl00_ctl00',this);" href="http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx">Image</a> is disposed.</p></blockquote>
<p>A bit more searching identified another <a href="http://stackoverflow.com/questions/542217/load-a-bitmapsource-and-save-using-the-same-name-in-wpf-ioexception">post on StackOverflow</a> which gave me the basic syntax and structure for the code I was going to need to implement this in EVEMon. The final code looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>189
190
191
192
193
194
195
196
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">MemoryStream stream <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MemoryStream<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #FF0000;">byte</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> imageBytes <span style="color: #008000;">=</span> File.<span style="color: #0000FF;">ReadAllBytes</span><span style="color: #000000;">&#40;</span>cacheFileName<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
stream.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>imageBytes, <span style="color: #FF0000;">0</span>, imageBytes.<span style="color: #0000FF;">Length</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
stream.<span style="color: #0000FF;">Position</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
&nbsp;
var image <span style="color: #008000;">=</span> Image.<span style="color: #0000FF;">FromStream</span><span style="color: #000000;">&#40;</span>stream<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">return</span> image<span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>It appears that GDI+ will lock any image that is loaded into a control in WinForms and WPF, several comments on StackOverflow and byte.com suggested that even disposing of the control and the FileStream was not a reliable way of being able to write to the file so the above method is seems to be be the best solution all round.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/02/28/preventing-the-picturebox-control-from-locking-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OneNote vs Evernote</title>
		<link>http://www.richard-slater.co.uk/archives/2010/02/27/onenote-vs-evernote/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/02/27/onenote-vs-evernote/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 20:11:33 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Misc.]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sys. Admin.]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=734</guid>
		<description><![CDATA[Somewhere in the middle of 2007 I was encouraged to use OneNote to clear my desk and move to a &#8220;paperless&#8221; system, initially this was a little painful as it seemed a gargantuan task to scan in all of the bits of paper on and around my desk that appeared to contain useful information. As [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhere in the middle of 2007 I was encouraged to use <a class='wikipedia' href='http://en.wikipedia.org/wiki/OneNote' title='Wikipedia article on OneNote'>OneNote</a> to clear my desk and move to a &#8220;paperless&#8221; system, initially this was a little painful as it seemed a gargantuan task to scan in all of the bits of paper on and around my desk that appeared to contain useful information.</p>
<p>As it turned out I realised that if a bit of paper was covered by another (or in fact covered by anything) it wasn&#8217;t that important to the execution of my role and could probably be thrown in the bin.</p>
<p>At the time I was not using Microsoft Office at home, opting to use <a class='wikipedia' href='http://en.wikipedia.org/wiki/OpenOffice' title='Wikipedia article on OpenOffice'>OpenOffice</a> for the limited needs I had for productivity software. I did however want a better way of organising my paperwork at home, OneNote 2007 came in at about £70 which isn&#8217;t unreasonable for what you got. Then I discovered <a class='wikipedia' href='http://en.wikipedia.org/wiki/Evernote' title='Wikipedia article on Evernote'>Evernote</a>.</p>
<p>Seemed perfect, I don&#8217;t generate so much paperwork that I would bust the 40mb/month limit on the free account. In the end I decided to adopt Evernote at home and continue to use OneNote at work, it proved quite a handy separation of work and life.</p>
<p>Recently I have run into two problems that are pushing me towards using Evernote for everything, and ditching OneNote entirely:</p>
<ol>
<li>Evernote handles PDFs really well, you drag them in and they are displayed using the Foxit rendering engine. It just works. OneNote on the other hand plain old embeds them into the note, great now how is that different from having them in a folder in My Documents.</li>
<li>Evernote 3.5 has vastly improved the synchronization mechanism meaning that I can safely put something on Evernote on my PC and it will be on my laptop shortly after it is turned on next. Microsoft has tried to get this kind of functionality into OneNote and <a class='wikipedia' href='http://en.wikipedia.org/wiki/SharePoint' title='Wikipedia article on SharePoint'>SharePoint</a> however it just doesn&#8217;t work that well, it is too slow and there seems to be a 10 minute refresh cycle hard coded into the product.</li>
</ol>
<p>I am still not sure that I want to ditch OneNote entirely, the 2010 version has some nice labour saving devices built in such as quick screen clippings and image formatting with the fluid user interface. Nothing in OneNote 2010 screams &#8220;don&#8217;t leave me&#8221; though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/02/27/onenote-vs-evernote/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Login failed for user &#8221;</title>
		<link>http://www.richard-slater.co.uk/archives/2010/01/25/login-failed-for-user/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/01/25/login-failed-for-user/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 13:51:41 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Things You Find]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=724</guid>
		<description><![CDATA[There is an excellent post on the SQL Protocols blog about diagnosing the “Login failed for user &#8221;. The user is not associated with a trusted SQL Server connection.” message displayed by SQL Management Studio and other applications which use the same API; Notice the blank username &#8221;. I believe there is one possibility missing [...]]]></description>
			<content:encoded><![CDATA[<p>There is an <a href="http://blogs.msdn.com/sql_protocols/archive/2008/05/03/understanding-the-error-message-login-failed-for-user-the-user-is-not-associated-with-a-trusted-sql-server-connection.aspx">excellent post</a> on the SQL Protocols blog about diagnosing the <em>“Login failed for user &#8221;. The user is not associated with a trusted SQL Server connection.”</em> message displayed by SQL Management Studio and other applications which use the same API; Notice the blank username &#8221;.</p>
<p>I believe there is one possibility missing from the above post: that is the Group Policy setting &#8220;Deny access to this computer from the network&#8221;. Which can be found in both Domain Group Policy and Local Security Policy in the following path:</p>
<p><em>Computer Configuration » Windows Settings » Security Settings » Local Policies » User Rights Assignment.</em></p>
<p>I have been using this policy more and more to lockdown access to site systems in accordance with our security and access policy. It pays to be cautious when applying User Rights Assignment policies to a machine, as in Windows 2003/XP they are not very granular.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/01/25/login-failed-for-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Christmas Cake</title>
		<link>http://www.richard-slater.co.uk/archives/2009/12/30/christmas-cake/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/12/30/christmas-cake/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 10:11:49 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Diary]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=721</guid>
		<description><![CDATA[We often get a bit of my mum&#8217;s Christmas cake each year, this year we got given a whole (albeit mini) cake. Whole lot of other treats in a gift bag. Got to be one of my favourite Christmas Presents this year.]]></description>
			<content:encoded><![CDATA[<p>We often get a bit of my mum&#8217;s Christmas cake each year, this year we got given a whole (albeit mini) cake. Whole lot of other treats in a gift bag. Got to be one of my favourite Christmas Presents this year.</p>
<p style="text-align: center;"><a href="http://www.richard-slater.co.uk/wp-content/uploads/2009/12/ChristmasCake2009.jpg"><img class="aligncenter size-medium wp-image-722" title="Christmas Cake 2009" src="http://www.richard-slater.co.uk/wp-content/uploads/2009/12/ChristmasCake2009-300x300.jpg" alt="Christmas Cake 2009" width="300" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/12/30/christmas-cake/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
