<?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>Martin Ankerl</title>
	<atom:link href="http://martin.ankerl.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://martin.ankerl.com</link>
	<description>No movement is faster than no movement</description>
	<lastBuildDate>Fri, 13 Aug 2010 07:34:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Umzug&#8211;letzte Schnäppchen!</title>
		<link>http://martin.ankerl.com/2010/08/13/umzug-letzte-schnappchen/</link>
		<comments>http://martin.ankerl.com/2010/08/13/umzug-letzte-schnappchen/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 07:19:15 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=426</guid>
		<description><![CDATA[Da ich bald nach Linz ziehe, habe ich hier ein paar kostbare Stücke aus meiner Wohnung gegen eine kleine Spende zu vergeben: ACHTUNG: Ab 25. August ist stelle ich die Teile alle ins Ebay! Also schnell sein Ebay links gibt es dann hier: 4 Holzstühle, TV Tisch, Küchentisch. Küchentisch/Esstisch, rund/oval, vergrößer-/kleinerbar Da ich umziehe muss [...]]]></description>
			<content:encoded><![CDATA[<p>Da ich bald <a href="http://martin.ankerl.com/2010/07/13/verkaufe-wegen-umzug/">nach Linz ziehe</a>, habe ich hier ein paar kostbare Stücke aus meiner Wohnung gegen eine kleine Spende zu vergeben:</p>
<p>ACHTUNG: Ab 25. August ist stelle ich die Teile alle ins Ebay! Also schnell sein <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Ebay links gibt es dann hier: <a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200507691137">4 Holzstühle</a>, <a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200507683553">TV Tisch</a>, <a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200507687960">Küchentisch</a>.</p>
<h1 style="clear:both;">Küchentisch/Esstisch, rund/oval, vergrößer-/kleinerbar</h1>
<p><a href="http://martin.ankerl.com/wp-content/uploads/2010/07/küchentisch1.jpg"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/küchentisch1-150x150.jpg" alt="" title="Küchentisch ausgezogen" width="150" height="150" class="alignnone size-thumbnail wp-image-428" style="float:left; margin-right:20px; margin-bottom:20px"/></a> <a href="http://martin.ankerl.com/wp-content/uploads/2010/07/küchentisch2.jpg"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/küchentisch2-150x150.jpg" alt="" title="Küchentisch verkleinert" width="150" height="150" class="alignnone size-thumbnail wp-image-429" style="float:left; margin-right:20px; margin-bottom:20px; margin-top:0px;" /></a> Da ich umziehe muss ich diesen schönen Esstisch verkaufen. Er ist wenig gebraucht.</p>
<p>Man kann den Tisch im handumdrehen entweder groß oder klein (wird dann kreisrund) machen.</p>
<p>Größe entweder 110cm Durchmesser, oder 145 x 110cm.</p>
<h1 style="clear:both;">4 Holzstühle mit Polsterung</h1>
<p><a href="http://martin.ankerl.com/wp-content/uploads/2010/07/sessel.jpg"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/sessel-150x150.jpg" alt="" title="sessel" width="150" height="150" class="alignnone size-thumbnail wp-image-430" style="float:left; margin-right:20px; margin-bottom:20px;" /></a> Diese vier Stühle gibt es passend zum Esstisch (oder auch separat wenn man will).</p>
<p>Sitzhöhe 46cm, Gesamthöhe 74cm.</p>
<p>Blaue Sitzpolster.</p>
<h1 style="clear:both;">TV Tisch Drehbar, Ausziehbar</h1>
<p><a href="http://martin.ankerl.com/wp-content/uploads/2010/07/tv-tisch.jpg"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/tv-tisch-150x150.jpg" alt="" title="tv-tisch" width="150" height="150" class="alignnone size-thumbnail wp-image-431" style="float:left; margin-right:20px; margin-bottom:20px;" /></a> <a href="http://martin.ankerl.com/wp-content/uploads/2010/08/tv-tisch2.jpg"><img src="http://martin.ankerl.com/wp-content/uploads/2010/08/tv-tisch2-150x150.jpg" alt="" title="TV Tisch offen, ausgezogene Lade" width="150" height="150" class="alignnone size-thumbnail wp-image-441" style="float:left; margin-right:20px; margin-bottom:20px;" /></a> Der Fernsehtisch ist auf Rollen gelagert, daher verschiebbar.<br />
die Tischfläche ist drehbar.</p>
<p>Größe: 110cm breit, 52cm tief, 57cm hoch</p>
<p>Abgedunkelte Glasfront</p>
<p>Eine ausziehbare Lade (z.b. für HIFI Geräte, etc.)</p>
<p style="clear:both;" />
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=426&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2010/08/13/umzug-letzte-schnappchen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Verkaufe wegen Umzug</title>
		<link>http://martin.ankerl.com/2010/07/13/verkaufe-wegen-umzug/</link>
		<comments>http://martin.ankerl.com/2010/07/13/verkaufe-wegen-umzug/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 05:29:14 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=386</guid>
		<description><![CDATA[Alles Verkauft! Neue stücke gibt es hier: Umzug-letzte Schäppchen Alte Liste Hallo, Da ich bald nach Linz ziehen werde, habe ich einige Gegenstände aus meiner alten Wohnung in Steyr zu verkaufen. Link: http://bit.ly/umzug-steyr HealthRider Crosstrainer 1050t Zustand: Gebraucht, Höhe (cm): 158, Trainingsgerät: Crosstrainer, Breite (cm): 120, Marke: HealthRider, Tiefe (cm): 50, Programmanzahl: 8, Schwungmasse: 19kg [...]]]></description>
			<content:encoded><![CDATA[<h2>Alles Verkauft!</h2>
<p>Neue stücke gibt es hier: <a href="http://martin.ankerl.com/2010/08/13/umzug-letzte-schnappchen/">Umzug-letzte Schäppchen</a></p>
<h1>Alte Liste</h1>
<div style="clear:both; background-color:#cccccc; margin:30px; padding:20px;">
<div style="float:right; margin-left:20px; margin-bottom:20px"/><a href="http://martin.ankerl.com/feed/" target="_blank"><img src="http://martin.ankerl.com/wp-content/plugins/qr-code-tag/data/qrct-0b3df647e9a386a82313533dd19db226.png" class="qrctimage" /></a></div>
<p>Hallo,</p>
<p>Da ich bald nach Linz ziehen werde, habe ich einige Gegenstände aus meiner alten Wohnung <b>in Steyr</b> zu verkaufen.</p>
<h2>Link: <a href="http://bit.ly/umzug-steyr">http://bit.ly/umzug-steyr</a></h2>
<h1 style="clear:both;">HealthRider Crosstrainer 1050t</h1>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&amp;item=200495093398"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/P1060363-150x150.jpg" alt="" title="P1060363" width="150" height="150" class="alignnone size-thumbnail wp-image-403" style="float:left; margin-right:20px; margin-bottom:20px"/></a><br />
Zustand: Gebraucht, Höhe (cm):	158, Trainingsgerät:	Crosstrainer, Breite (cm):	120, Marke:	HealthRider, Tiefe (cm):	50, Programmanzahl:	8, Schwungmasse:	19kg</p>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&amp;item=200495093398">Genauere Infos gibt es hier:<br />
<img src="http://martin.ankerl.com/wp-content/uploads/2010/07/kaufen.png" alt="" title="kaufen" width="109" height="39" class="alignnone size-full wp-image-408"/></a></p>
<h1>Rote Couch</h1>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200495075664"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/P1060357-150x150.jpg" width="150" height="150" style="float:left; margin-right:20px; margin-bottom:20px" /></a><br />
Zustand:	wenig Gebraucht, Farbe: Rot, Art:	Sofa, Sitzhöhe (cm):	40, Breite (cm):	210, Tiefe (cm):	90, Mit Bettfunktion:	Nein, Material:	Textil</p>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200495075664">Genauere Infos gibt es hier:<br />
<img src="http://martin.ankerl.com/wp-content/uploads/2010/07/kaufen.png" alt="" title="kaufen" width="109" height="39" class="alignnone size-full wp-image-408"/></a></p>
<h1 style="clear:both;">Couchtisch aus Glas</h1>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200495081439"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/P1060358-150x150.jpg" alt="" title="P1060358" width="150" height="150" class="alignnone size-thumbnail wp-image-401" style="float:left; margin-right:20px; margin-bottom:20px"  /></a><br />
Zustand:	Gebraucht, Höhe (cm):	40, Art:	Couchtisch<br />
Breite (cm):	120, Form:	Rechteckig, Tiefe (cm):	60, Material:	Glas</p>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200495081439">Genauere Infos gibt es hier:<br />
<img src="http://martin.ankerl.com/wp-content/uploads/2010/07/kaufen.png" alt="" title="kaufen" width="109" height="39" class="alignnone size-full wp-image-408"/></a></p>
<h1 style="clear:both;">Drehsessel, blau</h1>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200495099640"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/P1060369-150x150.jpg" alt="" title="P1060369" width="150" height="150" class="alignnone size-thumbnail wp-image-405" style="float:left; margin-right:20px; margin-bottom:20px"/></a><br />
Zustand: kaum gebraucht, Verarbeitung:	Gepolstert, Art:	Drehstuhl, Material:	Stoff. Verstellbare Sitzhöhe, Lehnenhöhe, Lehnenwinkel.</p>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&#038;item=200495099640">Genauere Infos gibt es hier:<br />
<img src="http://martin.ankerl.com/wp-content/uploads/2010/07/kaufen.png" alt="" title="kaufen" width="109" height="39" class="alignnone size-full wp-image-408"/></a></p>
<h1 style="clear:both;">Deckenfluter, dimmbar mit Leselampe</h1>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&amp;item=200495106265"><img src="http://martin.ankerl.com/wp-content/uploads/2010/07/P1060374-e1278997683865-150x150.jpg" alt="" title="P1060374" width="150" height="150" class="alignnone size-thumbnail wp-image-406" style="float:left; margin-right:20px; margin-bottom:20px"/></a><br />
Zustand:	Gebraucht, Dimmbar:	Ja, Art:	Stehleuchten, Produktart:	Stehleuchten, Sub-Type:	Deckenfluter, Präzise Produktart:	Deckenfluter, Stil:	Modern, Höhe:	182cm, Material:	Edelstahl, Durchmesser:	29cm</p>
<p><a href="http://cgi.ebay.at/ws/eBayISAPI.dll?ViewItem&amp;item=200495106265">Genauere Infos gibt es hier:<br />
<img src="http://martin.ankerl.com/wp-content/uploads/2010/07/kaufen.png" alt="" title="kaufen" width="109" height="39" class="alignnone size-full wp-image-408"/></a></p>
<p style="clear:both;" />
</div>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=386&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2010/07/13/verkaufe-wegen-umzug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>svn-shortlog &#8212; Compact &amp; Beautiful Subversion Changelog</title>
		<link>http://martin.ankerl.com/2009/12/23/svn-shortlog-compact-beautiful-subversion-changelog/</link>
		<comments>http://martin.ankerl.com/2009/12/23/svn-shortlog-compact-beautiful-subversion-changelog/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 16:58:17 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=303</guid>
		<description><![CDATA[At work we periodically have short developer meetings to discuss what has happened in the last month. To do this, we go through the bugs in our issue tracking system, and the subversion commits in our repository. Unfortunately, getting an overview of the subversion commits was rather cumbersome, and we could not find any efficient [...]]]></description>
			<content:encoded><![CDATA[<p>At work we periodically have short developer meetings to discuss what has happened in the last month. To do this, we go through the bugs in our issue tracking system, and the subversion commits in our repository. Unfortunately, getting an overview of the subversion commits was rather cumbersome, and we could not find any efficient tool to do this. Hence, <strong>svn-shortlog</strong> was born.</p>
<p>This is an attempt to format the subversion log of a one-month period in the following way:</p>
<ul>
<li>Beautiful HTML output.</li>
<li>Compact representation of lots of information</li>
<li>Usable with a not-so color rich beamer.</li>
<li>Fully automatic.</li>
</ul>
<h2>Usage</h2>
<ol>
<li>Install <a href="http://www.ruby-lang.org/de/">Ruby</a> (both 1.8 or 1.9 should work).</li>
<li>Download <a href="http://svn-shortlog.googlecode.com/svn/trunk/svn-shortlog.rb">svn-shortlog.rb</a>.</li>
<li>Open <tt>svn-shortlog.rb</tt> with your favourite text editor, and configure the config section according to your needs.</li>
<li>Doubleclick <tt>svn-shortlog.rb</tt></li>
<li>Open the generated <tt>changelog_....html</tt> file with your favourite browser.</li>
</ol>
<h2>Sample Output</h2>
<p>Here is a <a target="_blank" href="http://martin.ankerl.com/wp-content/uploads/2009/12/changes_2009-12-01_to_2009-12-31.html">sample output of one month of boost commits</a> into trunk, taken from the <a href="http://www.boost.org/users/download/#repository">public repository</a>. The output is quite information dense, a quick description is in the screenshot: <center><img src="http://martin.ankerl.com/wp-content/uploads/2009/12/documentation.png" alt="" title="documentation" width="690" height="408" /></center> All commits are structured by user, then by date. Each commit is on one line. You can click each line to see the full information related to a commit.</p>
<h2>Issues</h2>
<p>Ideas, suggestions, problems? Please post them as a comment here, at the <a href="https://code.google.com/p/svn-shortlog/issues/list">bug tracker</a>.</p>
<h2>Credits</h2>
<p>This tool is based on the idea from my colleague <a href="http://cheind.wordpress.com/">Christoph Heindl</a> and inspired by <a href="http://groups.google.com/group/linux.kernel/msg/d43224c9ba53f0cc?">Linus&#8217; Kernel shortlog</a> and <a href="http://mail.google.com/">Gmail</a>.</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=303&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/12/23/svn-shortlog-compact-beautiful-subversion-changelog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Generate Random Colors Programmatically</title>
		<link>http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/</link>
		<comments>http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 19:09:17 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=254</guid>
		<description><![CDATA[Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. For a little project at work I needed to automatically generate multiple background colors with the following properties: Text over the colored background should be easily readable Colors should be very distinct The [...]]]></description>
			<content:encoded><![CDATA[<p>Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. For a little project at work I needed to automatically generate multiple background colors with the following properties:</p>
<ul>
<li>Text over the colored background should be easily readable</li>
<li>Colors should be very distinct</li>
<li>The number of required colors is not initially known</li>
</ul>
<h1>Naïve Approach</h1>
<p>The first and simplest approach is to create random colors by simply using a random number between <tt>[0, 256[</tt> for the R, G, B values. I have created a little Ruby script to generate sample HTML code:
<pre class="brush: ruby;"># generates HTML code for 26 background colors given R, G, B values.
def gen_html
  ('A'..'Z').each do |c|
    r, g, b = yield
    printf &quot;&lt;span style=\&quot;background-color:#%02x%02x%02x; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;\&quot;&gt;#{c}&lt;/span&gt; &quot;, r, g, b
  end
end

# naive approach: generate purely random colors
gen_html { [rand(256), rand(256), rand(256)] }</pre>
<p> The generated output looks like this:
<p style="text-align:center;"><span style="background-color:#a69dd8; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">A</span> <span style="background-color:#0c35b0; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">B</span> <span style="background-color:#f82750; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">C</span> <span style="background-color:#0ebd31; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">D</span> <span style="background-color:#5fab4f; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">E</span> <span style="background-color:#c538cf; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">F</span> <span style="background-color:#014a59; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">G</span> <span style="background-color:#e14af8; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">H</span> <span style="background-color:#9fb730; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">I</span> <span style="background-color:#4bec60; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">J</span> <span style="background-color:#ef9345; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">K</span> <span style="background-color:#d2ece0; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">L</span> <span style="background-color:#9cda80; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">M</span> <span style="background-color:#dbc07c; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">N</span> <span style="background-color:#7328dd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">O</span> <span style="background-color:#1e9942; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">P</span> <span style="background-color:#621b7b; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Q</span> <span style="background-color:#c830b2; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">R</span> <span style="background-color:#362332; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">S</span> <span style="background-color:#e8c55d; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">T</span> <span style="background-color:#bd8787; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">U</span> <span style="background-color:#66c6a4; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">V</span> <span style="background-color:#21ec4b; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">W</span> <span style="background-color:#782364; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">X</span> <span style="background-color:#c3bf15; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Y</span> <span style="background-color:#3db35a; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Z</span>
</p>
<p>As you can see this is quite suboptimal. Some letters are hard to read because the background is too dark (B, Q, S), other colors look very similar (F, R).</p>
<h1>Using HSV Color Space</h1>
<p><a href="http://en.wikipedia.org/wiki/File:HSV_cylinder.png"><img src="http://martin.ankerl.com/wp-content/uploads/2009/12/HSV_cylinder_small.png" alt="HSV_cylinder_small" title="HSV_cylinder_small" width="250" height="200" style="float:right;margin-left:10px; margin-bottom:10px;" /></a>Let's fix the too dark / too bright problem first. A convenient way to do this is to not use the RGB color space, but <a href="http://en.wikipedia.org/wiki/HSL_and_HSV">HSV</a> (Hue, Saturation, Value). Here you get equally bright and colorful colors by using a fixed value for saturation and value, and just modifying the hue.</p>
<p>Based on the description provided by the wikipedia article on <a href="http://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB">conversion from HSV to RGB</a> I have implemented a converter:
<pre class="brush: ruby;"># HSV values in [0..1[
# returns [r, g, b] values from 0 to 255
def hsv_to_rgb(h, s, v)
  h_i = (h*6).to_i
  f = h*6 - h_i
  p = v * (1 - s)
  q = v * (1 - f*s)
  t = v * (1 - (1 - f) * s)
  r, g, b = v, t, p if h_i==0
  r, g, b = q, v, p if h_i==1
  r, g, b = p, v, t if h_i==2
  r, g, b = p, q, v if h_i==3
  r, g, b = t, p, v if h_i==4
  r, g, b = v, p, q if h_i==5
  [(r*256).to_i, (g*256).to_i, (b*256).to_i]
end</pre>
<p>Using the generator and fixed values for saturation and value:
<pre class="brush: ruby;"># using HSV with variable hue
gen_html { hsv_to_rgb(rand, 0.5, 0.95) }</pre>
<p>returns something like this:<center><span style="background-color:#f379ad; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">A</span> <span style="background-color:#7979f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">B</span> <span style="background-color:#9079f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">C</span> <span style="background-color:#79e5f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">D</span> <span style="background-color:#8979f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">E</span> <span style="background-color:#79f396; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">F</span> <span style="background-color:#79cff3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">G</span> <span style="background-color:#79b1f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">H</span> <span style="background-color:#7979f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">I</span> <span style="background-color:#799ef3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">J</span> <span style="background-color:#ecf379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">K</span> <span style="background-color:#80f379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">L</span> <span style="background-color:#797cf3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">M</span> <span style="background-color:#79f3f0; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">N</span> <span style="background-color:#9af379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">O</span> <span style="background-color:#79f37a; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">P</span> <span style="background-color:#f3ad79; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Q</span> <span style="background-color:#f3e179; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">R</span> <span style="background-color:#79b9f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">S</span> <span style="background-color:#e8f379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">T</span> <span style="background-color:#f3b379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">U</span> <span style="background-color:#f379c9; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">V</span> <span style="background-color:#79b8f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">W</span> <span style="background-color:#f379dc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">X</span> <span style="background-color:#79f37b; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Y</span> <span style="background-color:#8e79f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Z</span><br />
</center><br />
Much better. The text is easily readable, and all colors have a similar brightness. Unfortunately, since we have limited us to less colors now, the difference between the randomly generated colors is even less than in the first approach.</p>
<h1>Golden Ratio</h1>
<p>Using just <tt>rand()</tt> to choose different values for hue does not lead to a good use of the whole color spectrum, it simply is too random.<center><img src="http://martin.ankerl.com/wp-content/uploads/2009/12/distribution-random.png" alt="distribution-random" title="distribution-random" width="483" height="291" class="alignright size-full wp-image-273" /></center></p>
<p>Here I have generated 2, 4, 8, 16, and 32 random values and printed them all on a scale. Its easy to see that some values are very tightly packed together, which we do not want.</p>
<p>Lo and behold, some mathematician has discovered the <a href="http://en.wikipedia.org/wiki/Golden_ratio">Golden Ratio</a> more than 2400 years ago. It has lots of interesting properties, but for us only one is interesting:</p>
<blockquote><p>[...] Furthermore, it is a property of the golden ratio, <em>&Phi;</em>, that each subsequent hash value divides the interval into which it falls according to the golden ratio!<br />
-- <a href="http://brpreiss.com/books/opus4/html/page214.html">Bruno R. Preiss, P.Eng.</a></p></blockquote>
<p>Using the golden ratio as the spacing, the generated values look like this:<br />
<center><img src="http://martin.ankerl.com/wp-content/uploads/2009/12/distribution-goldenratio.png" alt="distribution-goldenratio" title="distribution-goldenratio" width="483" height="291" class="alignright size-full wp-image-274" /></center></p>
<p>Much better! The values are very evenly distributed, regardless how many values are used. Also, the algorithm for this is extremly simple. Just add 1/&Phi; and modulo 1 for each subsequent color.</p>
<pre class="brush: ruby;"># use golden ratio
golden_ratio_conjugate = 0.618033988749895
h = rand # use random start value
gen_html {
  h += golden_ratio_conjugate
  h %= 1
  hsv_to_rgb(h, 0.5, 0.95)
}</pre>
<p>The final result:<br />
<center><span style="background-color:#f37e79; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">A</span> <span style="background-color:#7998f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">B</span> <span style="background-color:#bbf379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">C</span> <span style="background-color:#f379df; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">D</span> <span style="background-color:#79f3e3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">E</span> <span style="background-color:#f3bf79; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">F</span> <span style="background-color:#9c79f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">G</span> <span style="background-color:#7af379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">H</span> <span style="background-color:#f3799d; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">I</span> <span style="background-color:#79c1f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">J</span> <span style="background-color:#e4f379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">K</span> <span style="background-color:#de79f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">L</span> <span style="background-color:#79f3ba; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">M</span> <span style="background-color:#f39779; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">N</span> <span style="background-color:#797ff3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">O</span> <span style="background-color:#a2f379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">P</span> <span style="background-color:#f379c6; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Q</span> <span style="background-color:#79e9f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">R</span> <span style="background-color:#f3d979; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">S</span> <span style="background-color:#b579f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">T</span> <span style="background-color:#79f392; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">U</span> <span style="background-color:#f37984; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">V</span> <span style="background-color:#79a8f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">W</span> <span style="background-color:#cbf379; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">X</span> <span style="background-color:#f379ee; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Y</span> <span style="background-color:#79f3d3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Z</span></center></p>
<p>You can see that the first few values are very different, and the difference decreases as more colors are added (Z and E are already quite similar). Anyways, this is good enough for me.</p>
<p>And because it is so beautiful, here are some more colors <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<tt>s=0.99, v=0.99</tt>, <tt>s=0.25, h=0.8</tt>, and <tt>s=0.3, v=0.99</tt> <center><span style="background-color:#024bfd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">A</span> <span style="background-color:#94fd02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">B</span> <span style="background-color:#fd02de; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">C</span> <span style="background-color:#02fdd3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">D</span> <span style="background-color:#fd8a02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">E</span> <span style="background-color:#4102fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">F</span> <span style="background-color:#0dfd02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">G</span> <span style="background-color:#fd0256; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">H</span> <span style="background-color:#029ffd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">I</span> <span style="background-color:#e8fd02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">J</span> <span style="background-color:#c802fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">K</span> <span style="background-color:#02fd7f; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">L</span> <span style="background-color:#fd3602; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">M</span> <span style="background-color:#0217fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">N</span> <span style="background-color:#61fd02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">O</span> <span style="background-color:#fd02aa; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">P</span> <span style="background-color:#02f3fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Q</span> <span style="background-color:#fdbe02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">R</span> <span style="background-color:#7402fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">S</span> <span style="background-color:#02fd2b; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">T</span> <span style="background-color:#fd0222; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">U</span> <span style="background-color:#026bfd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">V</span> <span style="background-color:#b5fd02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">W</span> <span style="background-color:#fc02fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">X</span> <span style="background-color:#02fdb3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Y</span> <span style="background-color:#fd6a02; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Z</span><br />
</center></p>
<p><center><span style="background-color:#99a8cc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">A</span> <span style="background-color:#b7cc99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">B</span> <span style="background-color:#cc99c6; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">C</span> <span style="background-color:#99ccc4; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">D</span> <span style="background-color:#ccb599; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">E</span> <span style="background-color:#a699cc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">F</span> <span style="background-color:#9bcc99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">G</span> <span style="background-color:#cc99aa; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">H</span> <span style="background-color:#99b9cc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">I</span> <span style="background-color:#c8cc99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">J</span> <span style="background-color:#c299cc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">K</span> <span style="background-color:#99ccb3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">L</span> <span style="background-color:#cca499; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">M</span> <span style="background-color:#999dcc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">N</span> <span style="background-color:#accc99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">O</span> <span style="background-color:#cc99bb; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">P</span> <span style="background-color:#99cacc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Q</span> <span style="background-color:#ccbf99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">R</span> <span style="background-color:#b099cc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">S</span> <span style="background-color:#99cca2; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">T</span> <span style="background-color:#cc99a0; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">U</span> <span style="background-color:#99afcc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">V</span> <span style="background-color:#becc99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">W</span> <span style="background-color:#cc99cc; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">X</span> <span style="background-color:#99ccbd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Y</span> <span style="background-color:#ccae99; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Z</span></center></p>
<p><center><span style="background-color:#b1c7fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">A</span> <span style="background-color:#ddfdb1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">B</span> <span style="background-color:#fdb1f3; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">C</span> <span style="background-color:#b1fdf0; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">D</span> <span style="background-color:#fddab1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">E</span> <span style="background-color:#c4b1fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">F</span> <span style="background-color:#b4fdb1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">G</span> <span style="background-color:#fdb1ca; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">H</span> <span style="background-color:#b1e1fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">I</span> <span style="background-color:#f7fdb1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">J</span> <span style="background-color:#edb1fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">K</span> <span style="background-color:#b1fdd7; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">L</span> <span style="background-color:#fdc1b1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">M</span> <span style="background-color:#b1b7fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">N</span> <span style="background-color:#cefdb1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">O</span> <span style="background-color:#fdb1e4; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">P</span> <span style="background-color:#b1fafd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Q</span> <span style="background-color:#fdeab1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">R</span> <span style="background-color:#d4b1fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">S</span> <span style="background-color:#b1fdbd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">T</span> <span style="background-color:#fdb1bb; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">U</span> <span style="background-color:#b1d1fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">V</span> <span style="background-color:#e7fdb1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">W</span> <span style="background-color:#fdb1fd; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">X</span> <span style="background-color:#b1fde7; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Y</span> <span style="background-color:#fdd0b1; padding:5px; -moz-border-radius:3px; -webkit-border-radius:3px;">Z</span></center></p>
<p>Have fun!<br />
Martin</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=254&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How To: Download Any Flash Video with flashrip in Ubuntu</title>
		<link>http://martin.ankerl.com/2009/11/15/how-to-download-any-flash-video-with-flashrip-in-ubuntu/</link>
		<comments>http://martin.ankerl.com/2009/11/15/how-to-download-any-flash-video-with-flashrip-in-ubuntu/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 11:57:37 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=218</guid>
		<description><![CDATA[Downloading flash videos in Linux was already not too difficult, but thanks to flashrip, it has gotten very easy. Here is a little demo how it works: Once installed, you basically use one click to get a video preview and then a prompt with the filename to save the file. The script works by looking [...]]]></description>
			<content:encoded><![CDATA[<p>Downloading flash videos in Linux was already <a href="http://www.youtube.com/watch?v=vxBGr2T1Ueo">not too difficult</a>, but thanks to <tt>flashrip</tt>, it has gotten very easy. Here is a little demo how it works:<br />
<center><br />
<object width="560" height="370"><param name="movie" value="http://www.youtube.com/v/qvxHQKGci9o&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qvxHQKGci9o&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="370"></embed></object><br />
</center></p>
<p>
Once installed, you basically use one click to get a video preview and then a prompt with the filename to save the file. The script works by looking into the newest flash files in your <tt>/tmp</tt> folder, and creates a hardlink to the save destination. When the video has fully loaded, you can close the browser window. The temp file will get deleted, and the linked copy will remain.</p>
<h2>Installing flashrip</h2>
<p>Open a terminal like gnome-terminal or konsole, and run these commands:</p>
<pre>wget http://martin.ankerl.com/wp-content/uploads/2009/11/flashrip.sh
chmod 755 flashrip.sh
sudo mv flashrip.sh /usr/local/bin</pre>
<p>Now all thats left to do is to create a link in your gnome panel for ease of use: Right click the gnome panel, &#8220;Add to panel&#8230;&#8221;, choose &#8220;Custom Application Launcher&#8230;&#8221;. Choose a proper name, and a command like this:
<pre>/usr/local/bin/flashrip.sh /home/manker/Videos</pre>
<p>For the command, replace the second parameter with the default location where you want to save the ripped videos (you have to use the full path here!)</p>
<p>I have tested this in Ubuntu, but it should work on any linux where gnome is installed. </p>
<p>Have fun!</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=218&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/11/15/how-to-download-any-flash-video-with-flashrip-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>iRob Feeder in Action (Video)</title>
		<link>http://martin.ankerl.com/2009/11/13/irob-feeder-in-action-video/</link>
		<comments>http://martin.ankerl.com/2009/11/13/irob-feeder-in-action-video/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 15:31:46 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=217</guid>
		<description><![CDATA[Finally! PROFACTOR (the company I work for) has decided to get a youtube account and upload some videos. Best of all, this gives me a chance to show off a bit of my (our) work iRob Feeder is a solution for equipping of industry facilities. We can recognize the 3D position of different pices, grasp [...]]]></description>
			<content:encoded><![CDATA[<p>Finally! <a href="http://www.profactor.at/">PROFACTOR </a> (the company I work for) has decided to get a <a href="http://www.youtube.com/user/profactorgroup">youtube account</a> and upload some videos. Best of all, this gives me a chance to show off a bit of my (our) work <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://www.profactor.at/en/en/irobfeeder.html">iRob Feeder</a> is a solution for equipping of industry facilities. We can recognize the 3D position of different pices, grasp it, put it wherever you want them, and all of this quickly. Actually, the whole thing is a bit more than that, since it is possible to reuse components from it. We have a nice demonstrator for very fast object recognition moving along on a conveyer belt.</p>
<p>Here you can see it in action:<br />
<center><object width="480" height="410"><param name="movie" value="http://www.youtube.com/v/hzWRGiZY3fc&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hzWRGiZY3fc&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="410"></embed></object></center></p>
<p>I am mostly involved in the algorithm development on the object recognition side. We have put quite some effort into making it fast: depending on the kind of object, we can have a reliable recognition in as low as 0.1 second on a standard desktop PC.</p>
<p>Hopefully Profactor will post some more videos about this in the near future.</p>
<p>PS: The article here are my personal opinions and do not necessarily reflect the position of my employee.</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=217&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/11/13/irob-feeder-in-action-video/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Online Password Encrypter for Apache</title>
		<link>http://martin.ankerl.com/2009/05/22/online-password-encrypter-for-apache/</link>
		<comments>http://martin.ankerl.com/2009/05/22/online-password-encrypter-for-apache/#comments</comments>
		<pubDate>Fri, 22 May 2009 21:33:35 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=213</guid>
		<description><![CDATA[Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password. Thats why I have created The [...]]]></description>
			<content:encoded><![CDATA[<p>Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password.</p>
<p>Thats why I have created <a href="http://martin.ankerl.com/files/pwd-encrypter.html">The Online Password Encrypter</a>. Here users can enter their desired username and password, and the encrypted key is automatically generated online, without transmitting anything to any server.</p>
<p>Here is an iframe of the file. <a href="http://martin.ankerl.com/files/pwd-encrypter.html">Click here for full screen</a>.</p>
<p><iframe src ="http://martin.ankerl.com/files/pwd-encrypter.html" width="95%" height="650">
<p>Your browser does not support iframes.</p>
<p></iframe></p>
<p>The <a href="http://martin.ankerl.com/files/pwd-encrypter.html">Online Password Encrypter</a> is just one single HTML page, it does not depend on any other files. So it is easy to download it, modify and send it around. Feel free do whatever you want with it.</p>
<p>Have fun,<br />
Martin</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=213&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/05/22/online-password-encrypter-for-apache/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Scientific Approach to Green Tea Preparation</title>
		<link>http://martin.ankerl.com/2009/05/13/scientific-approach-to-green-tea-prepreation/</link>
		<comments>http://martin.ankerl.com/2009/05/13/scientific-approach-to-green-tea-prepreation/#comments</comments>
		<pubDate>Wed, 13 May 2009 20:42:27 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=211</guid>
		<description><![CDATA[A few months ago I seem to have become a green tea advocat, since I have realized that it is probably the most healthy beverage ever invented (including water). The enormous study &#8220;Green Tea Consumption and Mortality Due to Cardiovascular Disease, Cancer, and All Causes in Japan&#8221; took 11 years with over 40.000 participants, and [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float:right; margin-left:20px; margin-bottom:20px;" src="http://martin.ankerl.com/wp-content/uploads/2009/05/greentea.jpg" alt="" title="greentea" width="200" height="223" class="alignnone size-medium wp-image-212" />A few months ago I seem to have become a green tea advocat, since I have realized that it is probably <a href="http://www.whfoods.com/genpage.php?tname=foodspice&#038;dbid=146">the most healthy beverage ever invented</a> (including water). </p>
<p>The enormous study &#8220;<a href="http://jama.ama-assn.org/cgi/content/abstract/296/10/1255">Green Tea Consumption and Mortality Due to Cardiovascular Disease, Cancer, and All Causes in Japan</a>&#8221; took 11 years with over 40.000 participants, and got the following result:</p>
<p>Green Tea Benefits in Woman</p>
<ul>
<li>23% lower risk of dying from any cause</li>
<li>31% lower risk of dying from CVD</li>
<li>62% lower risk of dying from stroke</li>
</ul>
<p>Green Tea Benefits in Men</p>
<ul>
<li>12% lower risk of dying from any cause</li>
<li>22% lower risk of dying from CVD</li>
<li>42% lower risk of dying from stroke</li>
</ul>
<p>On my quest for the perfect cup of tea, I have looked for scientific analysis and have found the enlightening paper &#8220;<a href="http://drmuthumani.googlepages.com/Factorsaffecting.pdf">Factors Affecting the Caffeine and Polyphenol Contents of Black and Green Tea Infusions</a>&#8220;. Here are the most important findings of it:</p>
<p>How to get the most out of a tea bag. The more extracted solids / catechins, the better.</p>
<p><strong>Brewing</strong></p>
<ul>
<li>doubling the bags doubles the extracted solids (which is good!)</li>
<li>Increasing brewing time from 1 minute to 2 minutes doubles the catechins. 5 minutes tripple the catechins.</li>
</ul>
<p><strong>Teabags vs. loose leafes</strong></p>
<ul>
<li>Loose leafes are better than teabags.</li>
<li>When teabags are left floating, the flow resistance of the material blocks almost everything! this is very bad.</li>
<li>Continuously dunk a tea bag and the extraction is 4 times better!</li>
<li>Loose leafes are still about 20% better than dunked teabags, and after about 2 minutes the water is saturated (no need to wait any further)</li>
</ul>
<p><strong>Leafe size / packing</strong></p>
<ul>
<li>loose leafes? extraction is faster with smaller leafes. No need for dunking.</li>
<li>teabag with small leafes / tightly packed? Continuously dunk it</li>
<li>teabag with large leafes / loosely packed? Leafe it static (the flows are driven by convection)</li>
</ul>
<p><strong>CONCLUSION</strong></p>
<ul>
<li>loose leafes are the best. Brew for 2 minutes and you have everything they got.</li>
<li>If you have to use teabags, dunking the bag gets you 4 times the catechins!</li>
</ul>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=211&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/05/13/scientific-approach-to-green-tea-prepreation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Java Challenge &#8211; The Mysterious Method Wrapper</title>
		<link>http://martin.ankerl.com/2009/04/16/java-challenge-the-mysterious-method-wrapper/</link>
		<comments>http://martin.ankerl.com/2009/04/16/java-challenge-the-mysterious-method-wrapper/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 07:11:00 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=209</guid>
		<description><![CDATA[Here is the challenge. Create some Java code so that this JUnit test works: public class EachMethodTest { /** * Simple test object. */ public static class Fu { @Callable public int fu() { return 1; } @Callable public int bar() { return 2; } } /** * Call all methods that have the @Callable [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the challenge. Create some Java code so that this <a href="http://www.junit.org/">JUnit</a> test works: </p>
<pre class="brush: java;">
public class EachMethodTest {

    /**
     * Simple test object.
     */
    public static class Fu {
        @Callable
        public int fu() {
            return 1;
        }

        @Callable
        public int bar() {
            return 2;
        }
    }

    /**
     * Call all methods that have the @Callable annotation.
     * The MethodsToProc works for ANY type of object, not just Fu.
     */
    @Test
    public void eachMethodTest() {
        final Fu fu = new Fu();

        int sum = 0;
        for (final Proc&lt;Integer&gt; c : new MethodsToProc&lt;Integer&gt;(fu)) {
            sum += c.call();
        }

        Assert.assertEquals(3, sum);
    }
}
</pre>
<p>Basically what I want to do is be able to automatically create wrappers for some object, so that each method with the <tt>@Callable</tt> can be called with a single common wrapper interface <tt>call()</tt>. It should be possible to specify the return type via Generics, and the ctor of <tt>MethodsToProc</tt> should be able to take any type of object.</p>
<p>See if you can do a general solution without cheating! The simpler, the better. You can post code snippets e.g. at <a href="http://snipt.org/">snipit</a> or <a href="http://gist.github.com/">gist</a>. Have fun!</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=209&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/04/16/java-challenge-the-mysterious-method-wrapper/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Beautiful Font Hinting in Ubuntu 8.10 and 9.04</title>
		<link>http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/</link>
		<comments>http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 20:59:03 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=197</guid>
		<description><![CDATA[Even though I have an LCD monitor, I always have the subpixel hinting switched off because it is just painfully ugly to my eyes. Even when hinting is switched to maximum, the fonts are quite blurry (if you don&#8217;t believe me, type xmag and take a screenshot of your font. You can see red and [...]]]></description>
			<content:encoded><![CDATA[<p>Even though I have an LCD monitor, I always have the subpixel hinting switched off because it is just painfully ugly to my eyes. Even when hinting is switched to maximum, the fonts are quite blurry (if you don&#8217;t believe me, type <tt>xmag</tt> and take a screenshot of your font. You can see red and blue linese everywhere). My eyes hurt when I see this. </p>
<p>Thanks to <a href="http://johan.kiviniemi.name/blag/ubuntu-fonts/">Johan Kivinemi</a> I have just found out how to bring back the excellent legacy subpixel hinting engine. This has a much more crisp hinting, and uses subpixels only where it really is an improvement:</p>
<p>Just open these files in your home directory, and copy the content into them:</p>
<h2>~/.fonts.conf</h2>
<pre class="brush: xml;">
&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
&lt;fontconfig&gt;
  &lt;match target=&quot;font&quot;&gt;
    &lt;edit name=&quot;antialias&quot; mode=&quot;assign&quot;&gt;
      &lt;bool&gt;true&lt;/bool&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;hinting&quot; mode=&quot;assign&quot;&gt;
      &lt;bool&gt;true&lt;/bool&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;hintstyle&quot; mode=&quot;assign&quot;&gt;
      &lt;const&gt;hintfull&lt;/const&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;lcdfilter&quot; mode=&quot;assign&quot;&gt;
      &lt;const&gt;lcdlegacy&lt;/const&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;rgba&quot; mode=&quot;assign&quot;&gt;
      &lt;const&gt;rgb&lt;/const&gt;
    &lt;/edit&gt;
  &lt;/match&gt;
&lt;/fontconfig&gt;
</pre>
<h2>~/.Xresources</h2>
<pre class="brush: xml;">
Xft.antialias:  true
Xft.hinting:    true
Xft.hintstyle:  hintfull
Xft.lcdfilter:  lcdlegacy
Xft.rgba:       rgb
</pre>
<p>This should work in Ubuntu 8.04, 8.10, and 9.04 too, and makes all fonts much more crisp. Of course, your mileage may vary.</p>
<h1>UPDATE: Comparison Screenshots</h1>
<p>As promised on <a href="http://www.reddit.com/r/linux/comments/7ru91/beautiful_font_hinting_in_ubuntu_810/">reddit</a>, I got back from an awesome snowboard trip so I am able to put up extensive comparison screenshots of the two subpixel hinting engines. Move your mouse over the following images to see the differences. Watch especially out for letters like &#8220;m&#8221; where the spacing between the lines is very small. You might have to wait a bit for the image to load.</p>
<p>I have used all of the most important fonts that I usually use, and just for fun I have added &#8220;Dijkstra&#8221;, which just looks cool.</p>
<h2>Sans Fonts</h2>
<p>Mouse to see the same fonts with the legacy hinter.</p>
<style type="text/css"><!-- #sans a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-normal.png); width:395px; height:850px; } #sans a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-legacy.png); } --> </style>
<div id="sans">
<a href="#">&nbsp;</a>
</div>
<h2>Mono Fonts</h2>
<p>Mouse to see the same fonts with the legacy hinter.</p>
<style type="text/css"><!-- #mono a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-normal.png); width:430px; height:940px; } #mono a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-legacy.png); } --> </style>
<div id="mono">
<a href="#">&nbsp;</a>
</div>
<h2>Zoomed Comparison Screenhots</h2>
<p>Here is an excerpt with 400% magnifications. Mouse over the pictures to see the legacy hinter.</p>
<h3>Zoomed Sans</h3>
<style type="text/css"><!-- #sanszoom a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-normal-zoomed.png); width:400px; height:200px; } #sanszoom a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-legacy-zoomed.png); } --> </style>
<div id="sanszoom">
<a href="#">&nbsp;</a>
</div>
<h3>Zoomed Mono</h3>
<style type="text/css"><!-- #monozoom a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-normal-zoomed.png); width:400px; height:200px; } #monozoom a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-legacy-zoomed.png); } --> </style>
<div id="monozoom">
<a href="#">&nbsp;</a>
</div>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=197&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.467 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-04 10:11:02 -->
<!-- Compression = gzip -->