<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for w.holeso.me</title>
	<atom:link href="http://w.holeso.me/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://w.holeso.me</link>
	<description>A blog about Python, Django, and other things</description>
	<lastBuildDate>Thu, 15 Sep 2011 17:53:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Django: A Profanity Filter by proc</title>
		<link>http://w.holeso.me/2008/08/django-a-profanity-filter/#comment-23564</link>
		<dc:creator>proc</dc:creator>
		<pubDate>Thu, 15 Sep 2011 17:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=6#comment-23564</guid>
		<description>&lt;a href=&quot;#comment-23562&quot; rel=&quot;nofollow&quot;&gt;@yeago &lt;/a&gt; 
Yeah, you&#039;re right -- 2 ways to solve this -- lowercase everything before you do the analysis or use regular expressions.  In any case, it&#039;s just meant as a quick filter to remove the most common bad words and is definitely not meant to be a one stop shop.  Check out http://en.wikipedia.org/wiki/Scunthorpe_problem</description>
		<content:encoded><![CDATA[<p><a href="#comment-23562" rel="nofollow">@yeago </a><br />
Yeah, you&#8217;re right &#8212; 2 ways to solve this &#8212; lowercase everything before you do the analysis or use regular expressions.  In any case, it&#8217;s just meant as a quick filter to remove the most common bad words and is definitely not meant to be a one stop shop.  Check out <a href="http://en.wikipedia.org/wiki/Scunthorpe_problem" rel="nofollow">http://en.wikipedia.org/wiki/Scunthorpe_problem</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: A Profanity Filter by proc</title>
		<link>http://w.holeso.me/2008/08/django-a-profanity-filter/#comment-23563</link>
		<dc:creator>proc</dc:creator>
		<pubDate>Thu, 15 Sep 2011 17:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=6#comment-23563</guid>
		<description>&lt;a href=&quot;#comment-23201&quot; rel=&quot;nofollow&quot;&gt;@paul &lt;/a&gt; 
The syntax highlighter plugin I was using was terrible...sorry about that. thanks for pointing it out.</description>
		<content:encoded><![CDATA[<p><a href="#comment-23201" rel="nofollow">@paul </a><br />
The syntax highlighter plugin I was using was terrible&#8230;sorry about that. thanks for pointing it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: A Profanity Filter by yeago</title>
		<link>http://w.holeso.me/2008/08/django-a-profanity-filter/#comment-23562</link>
		<dc:creator>yeago</dc:creator>
		<pubDate>Thu, 15 Sep 2011 17:42:17 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=6#comment-23562</guid>
		<description>This doesn&#039;t handle caps/lowercase variants. AKA fUck</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t handle caps/lowercase variants. AKA fUck</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Day I Switched from Vista x64 to Ubuntu for Compatibility Reasons by Cocktail review</title>
		<link>http://w.holeso.me/2008/08/the-day-i-switched-from-vista-x64-to-ubuntu-for-compatibility-reasons/#comment-23524</link>
		<dc:creator>Cocktail review</dc:creator>
		<pubDate>Fri, 08 Jul 2011 17:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=32#comment-23524</guid>
		<description>Mac is attaining ever and increasing quantity of users. In fact the part Macs personal computer proprietors arrived at close to 20% of total number of US laptop owners. Certainly a fantastic job for a company once almost taken off personal computer marketplace. Nevertheless the matter is that rise in number of Macs end users is a good reason behind the actual rapid increase of the quantity of computer software intended for Mac pc pc platform. To select amongst these types of sensibly you have to undergo and read very carefully.</description>
		<content:encoded><![CDATA[<p>Mac is attaining ever and increasing quantity of users. In fact the part Macs personal computer proprietors arrived at close to 20% of total number of US laptop owners. Certainly a fantastic job for a company once almost taken off personal computer marketplace. Nevertheless the matter is that rise in number of Macs end users is a good reason behind the actual rapid increase of the quantity of computer software intended for Mac pc pc platform. To select amongst these types of sensibly you have to undergo and read very carefully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Simple Django Truncate Filter by Paul</title>
		<link>http://w.holeso.me/2008/08/a-simple-django-truncate-filter/#comment-23204</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 25 Feb 2010 17:56:48 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=38#comment-23204</guid>
		<description>the indentation was lost in the paste. here it is:

http://gist.github.com/314819</description>
		<content:encoded><![CDATA[<p>the indentation was lost in the paste. here it is:</p>
<p><a href="http://gist.github.com/314819" rel="nofollow">http://gist.github.com/314819</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Simple Django Truncate Filter by Paul</title>
		<link>http://w.holeso.me/2008/08/a-simple-django-truncate-filter/#comment-23203</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 25 Feb 2010 17:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=38#comment-23203</guid>
		<description>Thanks that&#039;s useful but I found two bugs with this:
- it throws an error if there&#039;s no space in the string before max_length
- the get the character right after truncation, you should use value[max_length], not value[max_length + 1] which also solves the issue chris reported. 
Heres the fixed version:


from django import template
register = template.Library()

@register.filter(&quot;truncate_chars&quot;) 
def truncate_chars(value, max_length):
    if len(value) &lt;= max_length:
        return value

    truncd_val = value[:max_length]                        
    if value[max_length] != &quot; &quot;:
        rightmost_space = truncd_val.rfind(&quot; &quot;)
        if rightmost_space != -1:
            truncd_val = truncd_val[:rightmost_space]           

    return  truncd_val + &quot;...&quot;</description>
		<content:encoded><![CDATA[<p>Thanks that&#8217;s useful but I found two bugs with this:<br />
- it throws an error if there&#8217;s no space in the string before max_length<br />
- the get the character right after truncation, you should use value[max_length], not value[max_length + 1] which also solves the issue chris reported.<br />
Heres the fixed version:</p>
<p>from django import template<br />
register = template.Library()</p>
<p>@register.filter(&#8220;truncate_chars&#8221;)<br />
def truncate_chars(value, max_length):<br />
    if len(value) &lt;= max_length:<br />
        return value</p>
<p>    truncd_val = value[:max_length]<br />
    if value[max_length] != &#8221; &#8220;:<br />
        rightmost_space = truncd_val.rfind(&#8221; &#8220;)<br />
        if rightmost_space != -1:<br />
            truncd_val = truncd_val[:rightmost_space]           </p>
<p>    return  truncd_val + &#8220;&#8230;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: A Profanity Filter by paul</title>
		<link>http://w.holeso.me/2008/08/django-a-profanity-filter/#comment-23201</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Sun, 21 Feb 2010 02:09:03 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=6#comment-23201</guid>
		<description>Amazed no one pointed out that you should have an indent below the for loop statement</description>
		<content:encoded><![CDATA[<p>Amazed no one pointed out that you should have an indent below the for loop statement</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Simple Django Truncate Filter by Neum</title>
		<link>http://w.holeso.me/2008/08/a-simple-django-truncate-filter/#comment-23188</link>
		<dc:creator>Neum</dc:creator>
		<pubDate>Tue, 09 Feb 2010 21:08:21 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=38#comment-23188</guid>
		<description>Excellent! That was exactly what I was looking for. I agree, this should be in Django proper. Until then, you saved me 10 min. :)  Thanks!</description>
		<content:encoded><![CDATA[<p>Excellent! That was exactly what I was looking for. I agree, this should be in Django proper. Until then, you saved me 10 min. <img src='http://w.holeso.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: A Simple Keyword Search by Harry Swift</title>
		<link>http://w.holeso.me/2009/09/django-a-simple-keyword-search/#comment-22631</link>
		<dc:creator>Harry Swift</dc:creator>
		<pubDate>Sat, 21 Nov 2009 11:22:22 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=57#comment-22631</guid>
		<description>It make sense which is most useful.</description>
		<content:encoded><![CDATA[<p>It make sense which is most useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: A Simple Keyword Search by Hector</title>
		<link>http://w.holeso.me/2009/09/django-a-simple-keyword-search/#comment-22460</link>
		<dc:creator>Hector</dc:creator>
		<pubDate>Thu, 08 Oct 2009 18:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://w.holeso.me/?p=57#comment-22460</guid>
		<description>wow! i used this on my project and it worked great!  keep the articles cumming!</description>
		<content:encoded><![CDATA[<p>wow! i used this on my project and it worked great!  keep the articles cumming!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

