﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Cool Programming</title>
    <link>http://www.kbcafe.com/csharp/</link>
    <description>Cool Programming Tips with C#</description>
    <managingEditor>webmaster@kbcafe.com</managingEditor>
    <webMaster>webmaster@kbcafe.com</webMaster>
    <pubDate>Wed, 28 Dec 2005 21:58:34 GMT</pubDate>
    <lastBuildDate>Wed, 28 Dec 2005 21:58:34 GMT</lastBuildDate>
    <copyright>Copyright 2005 Randy Charles Morin</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <url>http://www.kbcafe.com/csharp/logo.jpg</url>
      <title>Cool Programming</title>
      <link>http://www.kbcafe.com/csharp/</link>
    </image>
    <rar:archive xmlns:rar="http://tempuri.org">http://www.kbcafe.com/csharp/archive.xml</rar:archive>
    <item>
      <title>Orphaned LFs</title>
      <description>&lt;P __designer:dtid="281474976710660"&gt;Today, I scoured the Web for an example of using Regex to patch orphaned linefeeds (LFs). I couldn't find anything. I took the time and wrote it myself. One line of beautiful code.&lt;/P&gt;
&lt;P __designer:dtid="281474976710661"&gt;&lt;FONT size=2 __designer:dtid="281474976710662"&gt;s = System.Text.RegularExpressions.&lt;/FONT&gt;&lt;FONT color=#008080 size=2 __designer:dtid="281474976710663"&gt;Regex&lt;/FONT&gt;&lt;FONT size=2 __designer:dtid="281474976710664"&gt;.Replace(s, &lt;/FONT&gt;&lt;FONT color=#800000 size=2 __designer:dtid="281474976710665"&gt;"[^\r]\n"&lt;/FONT&gt;&lt;FONT size=2 __designer:dtid="281474976710666"&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2 __designer:dtid="281474976710667"&gt;"\r\n"&lt;/FONT&gt;&lt;FONT size=2 __designer:dtid="281474976710668"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P __designer:dtid="281474976710669"&gt;&lt;/P&gt;
&lt;P __designer:dtid="281474976710670"&gt;Update: Oops, that didn't work. This works better.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;s = System.Text.RegularExpressions.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Regex&lt;/FONT&gt;&lt;FONT size=2&gt;.Replace(s, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"([^\r])\n"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"$1\r\n"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;/FONT&gt;</description>
      <link>http://www.kbcafe.com/csharp/?guid=20051228121229</link>
      <pubDate>Wed, 28 Dec 2005 20:12:29 GMT</pubDate>
      <guid>http://www.kbcafe.com/csharp/?guid=20051228121229</guid>
      <comments>http://www.kbcafe.com/csharp/?guid=20051228121229</comments>
      <trackback:ping xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">http://www.kbcafe.com/csharp/trackback.aspx?guid=20051228121229</trackback:ping>
      <wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.kbcafe.com/csharp/commentapi.aspx?guid=20051228121229</wfw:comment>
      <wfw:commentRSS xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.kbcafe.com/csharp/20051228121229.xml</wfw:commentRSS>
      <category>c#</category>
      <category>lf</category>
      <category>regex</category>
    </item>
    <item>
      <title>min-width in IE6</title>
      <description>&lt;P&gt;If you didn't already know, the min-width CSS attribute doesn't work in IE6. I searched for a solution that does. I came up with the following.&lt;/P&gt;
&lt;P&gt;&amp;lt;div id="content" style="min-width:800px;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (document.body.clientWidth &amp;lt; 800)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.body.style.width = 800;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/script&amp;gt;&lt;/P&gt;
&lt;P&gt;The &lt;EM&gt;content&lt;/EM&gt; div wraps most all of the body. I left in the min-width for Firefox glee. I could have also run the javascript against the width of the &lt;EM&gt;content&lt;/EM&gt; div.&lt;/P&gt;</description>
      <link>http://www.kbcafe.com/csharp/?guid=20051222122720</link>
      <pubDate>Thu, 22 Dec 2005 20:27:20 GMT</pubDate>
      <guid>http://www.kbcafe.com/csharp/?guid=20051222122720</guid>
      <comments>http://www.kbcafe.com/csharp/?guid=20051222122720</comments>
      <trackback:ping xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">http://www.kbcafe.com/csharp/trackback.aspx?guid=20051222122720</trackback:ping>
      <wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.kbcafe.com/csharp/commentapi.aspx?guid=20051222122720</wfw:comment>
      <wfw:commentRSS xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.kbcafe.com/csharp/20051222122720.xml</wfw:commentRSS>
      <category>javascript</category>
      <category>css</category>
      <category>ie6</category>
    </item>
    <item>
      <title>Playing the Piano via SOAP Messages</title>
      <description>&lt;P&gt;Don Box and Chris Anderson demonstrate &lt;A href="http://scobleizer.wordpress.com/2005/12/18/see-don-box-house/"&gt;how to play the piano on a xBox game controller connected to a remote piano via SOAP&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://scobleizer.wordpress.com/2005/12/18/see-don-box-house/"&gt;http://scobleizer.wordpress.com/2005/12/18/see-don-box-house/&lt;/A&gt;&lt;/P&gt;</description>
      <link>http://www.kbcafe.com/csharp/?guid=20051218213556</link>
      <pubDate>Mon, 19 Dec 2005 05:35:56 GMT</pubDate>
      <guid>http://www.kbcafe.com/csharp/?guid=20051218213556</guid>
      <comments>http://www.kbcafe.com/csharp/?guid=20051218213556</comments>
      <trackback:ping xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">http://www.kbcafe.com/csharp/trackback.aspx?guid=20051218213556</trackback:ping>
      <wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.kbcafe.com/csharp/commentapi.aspx?guid=20051218213556</wfw:comment>
      <wfw:commentRSS xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.kbcafe.com/csharp/20051218213556.xml</wfw:commentRSS>
      <category>winfx</category>
      <category>soap</category>
      <source url="http://scobleizer.wordpress.com/2005/12/18/see-don-box-house/">Scobleizer</source>
    </item>
  </channel>
</rss>
