<?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>mtvl.org</title>
	<atom:link href="http://www.mtvl.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mtvl.org</link>
	<description></description>
	<lastBuildDate>Mon, 06 Sep 2010 09:38:41 +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>Yet another wheelchair demo&#8230;</title>
		<link>http://www.mtvl.org/2010/09/yet-another-wheelchair-demo/</link>
		<comments>http://www.mtvl.org/2010/09/yet-another-wheelchair-demo/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 22:06:36 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[BCI]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=808</guid>
		<description><![CDATA[The new wheelchair demo shot at EPFL is online (also HD!). More stuff here. We also got a first page on the EPFL website.]]></description>
			<content:encoded><![CDATA[<p>The new wheelchair demo shot at EPFL is online (also HD!). More stuff <a href="http://actu.epfl.ch/news/neuroprosthetics-the-mind-is-the-pilot/" onclick="pageTracker._trackPageview('/outgoing/actu.epfl.ch/news/neuroprosthetics-the-mind-is-the-pilot/?referer=');">here</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/0-1sdtnuqcE?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/0-1sdtnuqcE?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>We also got a first page on the EPFL website.</p>
<p style="text-align: center;"><a href="http://www.mtvl.org/wp-content/uploads/2010/09/epfl_rolex.png" rel="lightbox[808]"><img class="aligncenter size-thumbnail wp-image-814" style="padding: 2px; border: 1px solid lightgray;" title="Neuroprothèses: l'esprit aux commandes" src="http://www.mtvl.org/wp-content/uploads/2010/09/epfl_rolex-150x150.png" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/09/yet-another-wheelchair-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tito&#8217;s lake session</title>
		<link>http://www.mtvl.org/2010/09/titos-lake-session/</link>
		<comments>http://www.mtvl.org/2010/09/titos-lake-session/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 09:03:10 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[Dogs]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=804</guid>
		<description><![CDATA[Looks like Tito is showing off again in the wilderness of Lausanne.]]></description>
			<content:encoded><![CDATA[<p>Looks like Tito is showing off again in the wilderness of Lausanne.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-24-804">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-585" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000448.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000448" alt="image_000448" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000448.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-586" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000449.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000449" alt="image_000449" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000449.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-587" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000450.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000450" alt="image_000450" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000450.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-588" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000451.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000451" alt="image_000451" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000451.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-589" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000452.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000452" alt="image_000452" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000452.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-590" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000453.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000453" alt="image_000453" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000453.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-591" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000454.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000454" alt="image_000454" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000454.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-592" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000455.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000455" alt="image_000455" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000455.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-593" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000456.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000456" alt="image_000456" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000456.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-594" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000457.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000457" alt="image_000457" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000457.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-595" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000458.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000458" alt="image_000458" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000458.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-596" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/image_000459.jpg" title=" " rel="lightbox[set_24]" >
								<img title="image_000459" alt="image_000459" src="http://www.mtvl.org/wp-content/gallery/2010_titolakesession/thumbs/thumbs_image_000459.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/09/titos-lake-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mtpath</title>
		<link>http://www.mtvl.org/2010/08/mtpath/</link>
		<comments>http://www.mtvl.org/2010/08/mtpath/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 06:54:54 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Matlab]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=762</guid>
		<description><![CDATA[When working in Matlab, I usually create small projects that rely on different toolboxes. In order not to add all the toolboxes I want to load in the $MATLAB_PATH environment variable, I wrote a couple of functions that help me including what I need when needed. Example Let&#8217;s imagine we are working on two projects: [...]]]></description>
			<content:encoded><![CDATA[<p>When working in Matlab, I usually create small projects that rely on different toolboxes. In order not to add all the toolboxes I want to load in the $MATLAB_PATH environment variable, I wrote a couple of functions that help me including what I need when needed.</p>
<h4>Example</h4>
<p>Let&#8217;s imagine we are working on two projects:</p>
<ol>
<li><em>Project1</em> in <strong>~/tmp/project1</strong></li>
<li><em>Project2</em> in <strong>~/tmp/project2</strong></li>
</ol>
<p>Let&#8217;s also imagine that <em>Project2</em> requires alls the functions of <em>Project1</em>.</p>
<p>By using mtpath, we can then write an initialization file for Project1 (<strong>~/tmp/project1/project1_init.m</strong>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">% Init file for Project1: ~/tmp/project1/project1_init.m</span>
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Projects/Classification/Gaussian'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Projects/FeatureSelection/CVA'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Projects/gdfmatlab'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/gkde'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig/t200'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig/t250'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig/t300'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig/t400'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig/t490'</span><span style="color: #080;">&#41;</span>;
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'$CNBI_ROOT/Thirdparty/matlab/biosig/t500'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>

<p>All the lines above simply add all the toolboxes to the Matlab path. We said that <em>Project2</em> requires Project1 to work. If Project1 did not need any external toolbox, we could simply do:</p>

<div class="wp_syntax"><div class="code"><pre class="matlab" style="font-family:monospace;">&gt;&gt; <span style="color: #0000FF;">addpath</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'~/tmp/project1/'</span><span style="color: #080;">&#41;</span>;</pre></div></div>

<p>Since this is not the case, we can use mtpath_include.m to add <em>Project1</em> to the search path. mtpath_include.m will discover that a file called <strong>~/tmp/project1/project1_init.m</strong> exists, and it will execute it, adding all the dependencies of Project1 automatically.</p>
<p>We could use an initialization file for Project2 as well (<strong>~/tmp/project2/project2_init.m</strong>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">% Init file for Project2: ~/tmp/project2/project2_init.m</span>
mtpath_include<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'~/tmp/project1/'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>

<p>mtpath_init.m can be used to call automatically the *_init.m file in the current directory:</p>

<div class="wp_syntax"><div class="code"><pre class="matlab" style="font-family:monospace;">&gt;&gt; <span style="color: #0000FF;">cd</span> ~/tmp/project2
&gt;&gt; mtpath_init
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /<span style="color: #0000FF;">home</span>/mtavella/project1
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Projects/Classification/Gaussian
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Projects/FeatureSelection/CVA
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Projects/gdfmatlab
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/gkde
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig/t200
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig/t250
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig/t300
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig/t400
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig/t490
<span style="color: #080;">&#91;</span>mtpath_include<span style="color: #080;">&#93;</span> Adding: /tmp/cnbi-root/trunk/Thirdparty/matlab/biosig/t500</pre></div></div>

<p>This is a simple example of how mtpath could be used to recursively include toolboxes and their dependencies. The mtpath_include.m function can also add subdirectories recursively. Finally, it never adds duplicate folders to the Matlab search path.</p>
<h4>Download</h4>
<p><a title="http://files.mtvl.org/code/mtpath-0.1.0.tar.bz2" href="http://files.mtvl.org/code/mtpath-0.1.0.tar.bz2" onclick="pageTracker._trackPageview('/outgoing/files.mtvl.org/code/mtpath-0.1.0.tar.bz2?referer=');">mtpath-0.1.0.tar.gz2</a> &#8211; 2010-08-23</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/08/mtpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pictures</title>
		<link>http://www.mtvl.org/2010/08/pictures/</link>
		<comments>http://www.mtvl.org/2010/08/pictures/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 14:27:14 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=758</guid>
		<description><![CDATA[Few new pictures from the muddiest experience of my life at the Route du Rock festival in Saint Malo with Manacci and Valentina: &#8230; and some more of me playing with animals in a zoo in the Fribourg canton:]]></description>
			<content:encoded><![CDATA[<p>Few new pictures from the muddiest experience of my life at the Route du Rock festival in Saint Malo with Manacci and Valentina:</p>

<div class="ngg-galleryoverview" id="ngg-gallery-22-758">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-584" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000431.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000431" alt="image_000431" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000431.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-580" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000430.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000430" alt="image_000430" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000430.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-579" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000428.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000428" alt="image_000428" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000428.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-578" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000424.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000424" alt="image_000424" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000424.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-577" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000423.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000423" alt="image_000423" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000423.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-576" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000422.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000422" alt="image_000422" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000422.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-575" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000421.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000421" alt="image_000421" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000421.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-572" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000418.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000418" alt="image_000418" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000418.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-563" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000417.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000417" alt="image_000417" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000417.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-559" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000426.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000426" alt="image_000426" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000426.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-558" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000416.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000416" alt="image_000416" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000416.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-557" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000415.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000415" alt="image_000415" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000415.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-556" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000414.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000414" alt="image_000414" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000414.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-547" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000403.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000403" alt="image_000403" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000403.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-548" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000406.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000406" alt="image_000406" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000406.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-549" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000407.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000407" alt="image_000407" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000407.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-550" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000408.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000408" alt="image_000408" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000408.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-551" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000409.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000409" alt="image_000409" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000409.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-552" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000410.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000410" alt="image_000410" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000410.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-553" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000411.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000411" alt="image_000411" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000411.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-554" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000412.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000412" alt="image_000412" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000412.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-555" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000413.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000413" alt="image_000413" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000413.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-561" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000429.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000429" alt="image_000429" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000429.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-574" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000420.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000420" alt="image_000420" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000420.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-573" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/image_000419.png" title=" " rel="lightbox[set_22]" >
								<img title="image_000419" alt="image_000419" src="http://www.mtvl.org/wp-content/gallery/2010_saintmalo/thumbs/thumbs_image_000419.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-navigation'><span>1</span><a class="page-numbers" href="http://www.mtvl.org/2010/08/pictures/?nggpage=2">2</a><a class="next" id="ngg-next-2" href="http://www.mtvl.org/2010/08/pictures/?nggpage=2">&#9658;</a></div> 	
</div>


<p>&#8230; and some more of me playing with animals in a zoo in the Fribourg canton:</p>

<div class="ngg-galleryoverview" id="ngg-gallery-23-758">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-583" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000441.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000441" alt="image_000441" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000441.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-582" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000440.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000440" alt="image_000440" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000440.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-581" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000435.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000435" alt="image_000435" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000435.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-571" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000443.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000443" alt="image_000443" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000443.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-568" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000437.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000437" alt="image_000437" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000437.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-567" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000436.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000436" alt="image_000436" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000436.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-566" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000434.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000434" alt="image_000434" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000434.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-565" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000433.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000433" alt="image_000433" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000433.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-564" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000432.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000432" alt="image_000432" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000432.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-570" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000442.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000442" alt="image_000442" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000442.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-569" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_zoo/image_000439.png" title=" " rel="lightbox[set_23]" >
								<img title="image_000439" alt="image_000439" src="http://www.mtvl.org/wp-content/gallery/2010_zoo/thumbs/thumbs_image_000439.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/08/pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wheelchair testdrive</title>
		<link>http://www.mtvl.org/2010/08/wheelchair-testdrive/</link>
		<comments>http://www.mtvl.org/2010/08/wheelchair-testdrive/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 13:08:47 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[BCI]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=753</guid>
		<description><![CDATA[Yesterday we tested the BCI-controlled wheelchair outside of our lab. Ganga took a couple of cool pictures.]]></description>
			<content:encoded><![CDATA[<p>Yesterday we tested the BCI-controlled wheelchair outside of our lab. <a title="http://people.epfl.ch/gangadhar.garipelli" href="http://people.epfl.ch/gangadhar.garipelli" onclick="pageTracker._trackPageview('/outgoing/people.epfl.ch/gangadhar.garipelli?referer=');">Ganga</a> took a couple of cool pictures.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-21-753">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-543" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/heavyduty_00.jpg" title=" " rel="lightbox[set_21]" >
								<img title="heavyduty_00" alt="heavyduty_00" src="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/thumbs/thumbs_heavyduty_00.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-544" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/heavyduty_01.jpg" title=" " rel="lightbox[set_21]" >
								<img title="heavyduty_01" alt="heavyduty_01" src="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/thumbs/thumbs_heavyduty_01.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-545" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/heavyduty_02.jpg" title=" " rel="lightbox[set_21]" >
								<img title="heavyduty_02" alt="heavyduty_02" src="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/thumbs/thumbs_heavyduty_02.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-546" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/heavyduty_03.jpg" title=" " rel="lightbox[set_21]" >
								<img title="heavyduty_03" alt="heavyduty_03" src="http://www.mtvl.org/wp-content/gallery/2010_heavyduty/thumbs/thumbs_heavyduty_03.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/08/wheelchair-testdrive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy tag creator</title>
		<link>http://www.mtvl.org/2010/08/easy-tag-creator/</link>
		<comments>http://www.mtvl.org/2010/08/easy-tag-creator/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 12:21:44 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=716</guid>
		<description><![CDATA[I often need to distribute some code to people that do not have access to my SVN/GIT repositories. Furthermore, I create daily tags automatically with cron. Here you have the bash script I normally use. Please check the example below to understand how it works. Since I run this script for a large number of [...]]]></description>
			<content:encoded><![CDATA[<p>I often need to distribute some code to people that do not have access to my SVN/GIT repositories. Furthermore, I create daily tags automatically with cron. Here you have the bash script I normally use.</p>
<p>Please check the example below to understand how it works. Since I run this script for a large number of projects, I fork a tar process for each directory provided as argument. Remove the ampersand (&#038;) at the end of line 22 to disable forking. Lines 28 to 42 wait for all the forked processed before exiting.</p>
<p>Last but not least, if the directories provided as argument contain a <b>.git/</b> or <b>.svn/</b> subdirectory, the archive name changes accordingly.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># 2009-01-09  Michele Tavella &lt;tavella.michele@gmail.com&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> z<span style="color: #ff0000;">&quot;$1&quot;</span> == <span style="color: #ff0000;">&quot;z&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error: ctk_tag DIRECTORY...&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">PIDS</span>=<span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #000000; font-weight: bold;">@</span>; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #007800;">BASENAME</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$x</span><span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #007800;">TIMESTAMP</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>.svn <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #007800;">REPO</span>=<span style="color: #ff0000;">&quot;svn&quot;</span>
	<span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>.git <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #007800;">REPO</span>=<span style="color: #ff0000;">&quot;git&quot;</span>
	<span style="color: #000000; font-weight: bold;">else</span>
		<span style="color: #007800;">REPO</span>=<span style="color: #ff0000;">&quot;&quot;</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #007800;">ARCHIVE</span>=<span style="color: #800000;">${BASENAME}</span>_<span style="color: #800000;">${REPO}</span><span style="color: #800000;">${TIMESTAMP}</span>.tar.bz2 
&nbsp;
	<span style="color: #c20cb9; font-weight: bold;">tar</span> cjf <span style="color: #007800;">$ARCHIVE</span> <span style="color: #007800;">$x</span> <span style="color: #000000; font-weight: bold;">&amp;</span>
	<span style="color: #007800;">PID</span>=<span style="color: #007800;">$!</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[ctk_tag] PID=<span style="color: #007800;">$PID</span> <span style="color: #007800;">$x</span>--&amp;gt;<span style="color: #007800;">$ARCHIVE</span>&quot;</span>
	<span style="color: #007800;">PIDS</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$PID</span> <span style="color: #007800;">$PIDS</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span>; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #007800;">TPIDS</span>=<span style="color: #ff0000;">&quot;&quot;</span>
	<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$PIDS</span>; <span style="color: #000000; font-weight: bold;">do</span>
		<span style="color: #007800;">PIDCHECK</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ps</span> ax <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$x</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #c20cb9; font-weight: bold;">grep</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$PIDCHECK</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #007800;">TPIDS</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$x</span> <span style="color: #007800;">$TPIDS</span>&quot;</span>
		<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;z<span style="color: #007800;">$TPIDS</span>&quot;</span> == <span style="color: #ff0000;">&quot;z&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>;
	<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #007800;">PIDS</span>=<span style="color: #007800;">$TPIDS</span>
	<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">0.10</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<h4>Example</h4>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">mtavella@miro cnbitk $ ls <span style="color: #339933;">-</span>sh1
total 16K
4.0K cnbitkapps
4.0K libcnbicore
4.0K libcnbisyncro
4.0K libtransport</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">mtavella@miro cnbitk $ ctk_tag lib<span style="color: #339933;">*</span>
<span style="color: #009900;">&#91;</span>ctk_tag<span style="color: #009900;">&#93;</span> PID<span style="color: #339933;">=</span><span style="color: #0000dd;">11996</span> libcnbicore<span style="color: #339933;">--&gt;</span>libcnbicore_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
<span style="color: #009900;">&#91;</span>ctk_tag<span style="color: #009900;">&#93;</span> PID<span style="color: #339933;">=</span><span style="color: #0000dd;">12000</span> libcnbisyncro<span style="color: #339933;">--&gt;</span>libcnbisyncro_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
<span style="color: #009900;">&#91;</span>ctk_tag<span style="color: #009900;">&#93;</span> PID<span style="color: #339933;">=</span><span style="color: #0000dd;">12004</span> libtransport<span style="color: #339933;">--&gt;</span>libtransport_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">mtavella@miro cnbitk $ ctk_tag cnbitkapps<span style="color: #339933;">/</span>
<span style="color: #009900;">&#91;</span>ctk_tag<span style="color: #009900;">&#93;</span> PID<span style="color: #339933;">=</span><span style="color: #0000dd;">12594</span> cnbitkapps<span style="color: #339933;">/--&gt;</span>cnbitkapps_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">mtavella@miro cnbitk $ ls <span style="color: #339933;">-</span>sh1
total 10M
4.0K cnbitkapps
180K cnbitkapps_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
4.0K libcnbicore
8.8M libcnbicore_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
4.0K libcnbisyncro
 36K libcnbisyncro_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span>
4.0K libtransport
936K libtransport_git20100810.<span style="color: #202020;">tar</span>.<span style="color: #202020;">bz2</span></pre></div></div>

<h4>Download</h4>
<p><a href="http://files.mtvl.org/code/ctk_tag" onclick="pageTracker._trackPageview('/outgoing/files.mtvl.org/code/ctk_tag?referer=');">ctk_tag</a> &#8211; 2010-08-10</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/08/easy-tag-creator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Before/After</title>
		<link>http://www.mtvl.org/2010/08/beforeafter/</link>
		<comments>http://www.mtvl.org/2010/08/beforeafter/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 23:18:22 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[BCI]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=703</guid>
		<description><![CDATA[Is it better now or before? Well, we were very happy to trash the TV thing, replacing it with the cheapest IKEA couch. So it is better now. I cannot say the same for my head after a routine recording with Ganga(dhar Garipelli). Btw, the holes in my head are nobody&#8217;s fault, I just wonder [...]]]></description>
			<content:encoded><![CDATA[<p>Is it better now or before? Well, we were very happy to trash the TV thing, replacing it with the cheapest IKEA couch. So it is better now. I cannot say the same for my head after a routine recording with <a href="http://people.epfl.ch/gangadhar.garipelli" onclick="pageTracker._trackPageview('/outgoing/people.epfl.ch/gangadhar.garipelli?referer=');">Ganga(dhar Garipelli)</a>. Btw, the holes in my head are nobody&#8217;s fault, I just wonder about the word &#8220;non-invasive&#8221;.<br />

<a href='http://www.mtvl.org/2010/08/beforeafter/beforeafter_00/' title='Before/After - The couch'><img width="150" height="150" src="http://www.mtvl.org/wp-content/uploads/2010/08/beforeafter_00-150x150.png" class="attachment-thumbnail" alt="The couch" title="Before/After - The couch" /></a>
<a href='http://www.mtvl.org/2010/08/beforeafter/beforeafter_01/' title='Before/After - The head'><img width="150" height="150" src="http://www.mtvl.org/wp-content/uploads/2010/08/beforeafter_01-150x150.png" class="attachment-thumbnail" alt="The head" title="Before/After - The head" /></a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/08/beforeafter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple C++ project with Make</title>
		<link>http://www.mtvl.org/2010/07/simple-c-project-make/</link>
		<comments>http://www.mtvl.org/2010/07/simple-c-project-make/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 20:10:44 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[makefile]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=600</guid>
		<description><![CDATA[Once a while some colleague of mine is in deep need of Makefiles for compiling some C/C++ code. Although I normally suggest to use Autoconf/Automake or CMake, not everybody is interested in learning how to use those tools. Furthermore, sometimes is just more handy to start writing the code immediately, instead of writing/copying/modifying configuration files. So, [...]]]></description>
			<content:encoded><![CDATA[<p>Once a while some colleague of mine is in deep need of Makefiles for compiling some C/C++ code. Although I normally suggest to use Autoconf/Automake or CMake, not everybody is interested in learning how to use those tools. Furthermore, sometimes is just more handy to start writing the code immediately, instead of writing/copying/modifying configuration files.</p>
<p>So, since I believe I dedicated several hours of my life in explaining the mysteries of GNU Make, I decided to spend some time and showing how Make can be use to automagically compile all you need with no extra time spent in writing the Makefile itself.</p>
<h4>How it works</h4>
<p>The main idea is that you might want to code a small library in C/C++ and write a few executables that rely on the library. I will describe how a Makefile can be used to automatically compile the library without  any need of adding the files one by one to the Makefile itself. Once you have downloaded and uncompressed the archive, you will see the following file layout:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">bintemplate<span style="color: #339933;">/</span>
<span style="color: #339933;">|--</span> both.<span style="color: #202020;">cpp</span>
<span style="color: #339933;">|--</span> chicken.<span style="color: #202020;">cpp</span>
<span style="color: #339933;">|--</span> eagle.<span style="color: #202020;">cpp</span>
<span style="color: #339933;">|--</span> lib<span style="color: #339933;">/</span>
<span style="color: #339933;">|--</span> Makefile
`<span style="color: #339933;">--</span> src<span style="color: #339933;">/</span>
    <span style="color: #339933;">|--</span> Bird.<span style="color: #202020;">cpp</span>
    <span style="color: #339933;">|--</span> Bird.<span style="color: #202020;">hpp</span>
    <span style="color: #339933;">|--</span> Chicken.<span style="color: #202020;">cpp</span>
    <span style="color: #339933;">|--</span> Chicken.<span style="color: #202020;">hpp</span>
    <span style="color: #339933;">|--</span> Eagle.<span style="color: #202020;">cpp</span>
    `<span style="color: #339933;">--</span> Eagle.<span style="color: #202020;">hpp</span></pre></div></div>

<p>The <strong>src/</strong> directory contains all the files that are needed to compile the library, so both the included ones (<strong>.hpp</strong>) and the non-included ones (<strong>.cpp</strong>). The <strong>lib/</strong> directory will contain the library once it will be compiled.<br />
The small capitals <strong>.cpp</strong> files are the executables that will be linked against the library.<br />
In this example, the project contains tree C++ classes (<strong>Bird.*pp</strong>, <strong>Chicken.*pp</strong> and <strong>Eagle.*pp</strong>) and tree executables (<strong>both.cpp</strong>, <strong>chicken.cpp</strong>, <strong>eagle.cpp</strong>). </p>
<p>As explained later on, the Makefile will compile automatically in the library all the <strong>src/*.*pp</strong> files and will compile and link against the library all the <strong>*.cpp</strong> in the root folder. This means that, if you want to add a new class or a new include, or a new executable, you simply create the file at his place, and you call <strong>make</strong>. Let&#8217;s now see how it is possible.</p>
<h4>Makefile</h4>
<p>Let&#8217;s now take a look at the Makefile itself, chunk-by-chunk.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="make" style="font-family:monospace;"><span style="color: #339900; font-style: italic;"># 2010-07-27  Michele Tavella &lt;tavella.michele@gmail.com&gt;</span>
&nbsp;
PROJECT<span style="color: #004400;">=</span>bintemplate
VERSION<span style="color: #004400;">=</span>v0<span style="color: #004400;">.</span>0<span style="color: #004400;">.</span>1
AUTHOR<span style="color: #004400;">=</span>Michele Tavella <span style="color: #004400;">&lt;</span>tavella<span style="color: #004400;">.</span>michele<span style="color: #004400;">@</span>gmail<span style="color: #004400;">.</span>com<span style="color: #004400;">&gt;</span>
&nbsp;
CC<span style="color: #004400;">=</span>g<span style="color: #004400;">++</span>
CFLAGS<span style="color: #004400;">=-</span>Wall <span style="color: #004400;">-</span>O2
LDFLAGS<span style="color: #004400;">=-</span>lm 
CTAGS<span style="color: #004400;">=</span>ctags <span style="color: #004400;">-</span>R <span style="color: #004400;">--</span>c<span style="color: #004400;">++-</span>kinds<span style="color: #004400;">=+</span>p <span style="color: #004400;">--</span>fields<span style="color: #004400;">=+</span>iaS <span style="color: #004400;">--</span>extra<span style="color: #004400;">=+</span>q</pre></td></tr></table></div>

<p>The first few lines define the project name and version, the compiler, the compiler options, some libraries we normally want to link against and the parameters to build the tags.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>12
13
14
15
</pre></td><td class="code"><pre class="make" style="font-family:monospace;">LOCAL_PATH<span style="color: #004400;">=</span>~<span style="color: #004400;">/</span>Paths<span style="color: #004400;">/</span>playback
CONFIG_CFLAGS<span style="color: #004400;">=-</span>I<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LOCAL_PATH</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/</span><span style="color: #666622; font-weight: bold;">include</span>
CONFIG_LDPATH<span style="color: #004400;">=-</span>L<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LOCAL_PATH</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/</span>lib
CONFIG_LDFLAGS<span style="color: #004400;">=</span> <span style="color: #004400;">-</span>lpthread <span style="color: #004400;">-</span>lstdc<span style="color: #004400;">++</span> <span style="color: #004400;">-</span>Wl<span style="color: #004400;">,--</span>rpath <span style="color: #004400;">-</span>Wl<span style="color: #004400;">,$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LOCAL_PATH</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/</span>lib<span style="color: #004400;">/</span></pre></td></tr></table></div>

<p>The second block is a little more tricky. I always install libraries, headers etc. in a local folder (LOCAL_PATH). This allows me to have different directories with different releases of one or a set of libraries (this becomes very handy when you work on several projects at the same time). BTW, if you have some libraries installed in some weird place, modify lines 13-14 accordingly, otherwise simply remove whatever is on the right of the &#8220;=&#8221; character. Line 15 specifies the LDFLAGS needed to link against the correct libraries, in this case libpthread and libstrc++.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>17
18
19
20
21
22
</pre></td><td class="code"><pre class="make" style="font-family:monospace;">SRC<span style="color: #004400;">=</span>src
LIB<span style="color: #004400;">=</span>lib
LIB_INC<span style="color: #004400;">=$</span><span style="color: #004400;">&#40;</span><span style="color: #0000CC; font-weight: bold;">wildcard</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">SRC</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/*.</span>hpp<span style="color: #004400;">&#41;</span>
LIB_SRC<span style="color: #004400;">=$</span><span style="color: #004400;">&#40;</span><span style="color: #0000CC; font-weight: bold;">wildcard</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">SRC</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/*.</span>cpp<span style="color: #004400;">&#41;</span>
BIN_SRC<span style="color: #004400;">=$</span><span style="color: #004400;">&#40;</span><span style="color: #0000CC; font-weight: bold;">wildcard</span> <span style="color: #004400;">*.</span>cpp<span style="color: #004400;">&#41;</span>
TARGET_LIB<span style="color: #004400;">=$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LIB</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">PROJECT</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">.</span>a</pre></td></tr></table></div>

<p>Lines 17-18 define the location of the <strong>src/</strong> and the <strong>lib/</strong> directories, while lines 19-21 use the Make wildcard command to generate a list of the files required to build the library (<strong>src/*.*pp</strong>) and the files required to build the executables (<strong>*.cpp</strong>), as it was discusses in the previous section.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="make" style="font-family:monospace;"><span style="color: #990000;">.PHONY</span><span style="color: #004400;">:</span> library libraryo binaries binarieso
&nbsp;
default<span style="color: #004400;">:</span> library binaries
&nbsp;
binaries<span style="color: #004400;">:</span> binarieso <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>BIN_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=</span><span style="color: #004400;">&#41;</span>
&nbsp;
binarieso<span style="color: #004400;">:</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>BIN_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=.</span>o<span style="color: #004400;">&#41;</span>
&nbsp;
library<span style="color: #004400;">:</span> libraryo
	ar r <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">TARGET_LIB</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>LIB_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=.</span>o<span style="color: #004400;">&#41;</span>
&nbsp;
libraryo<span style="color: #004400;">:</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>LIB_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=.</span>o<span style="color: #004400;">&#41;</span>
&nbsp;
<span style="color: #004400;">%.</span>o <span style="color: #004400;">:</span> <span style="color: #004400;">%.</span>cpp
	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">-</span>c <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CONFIG_CFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">-</span>I<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">SRC</span><span style="color: #004400;">&#41;</span> \
            <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CONFIG_LDPATH</span><span style="color: #004400;">&#41;</span> <span style="color: #000088; font-weight: bold;">$&lt;</span> <span style="color: #004400;">-</span>o <span style="color: #000088; font-weight: bold;">$@</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CONFIG_LDFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LDFLAGS</span><span style="color: #004400;">&#41;</span> 
&nbsp;
<span style="color: #004400;">.</span>o<span style="color: #004400;">:</span>
	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CONFIG_CFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CONFIG_LDPATH</span><span style="color: #004400;">&#41;</span> \
            <span style="color: #000088; font-weight: bold;">$*</span><span style="color: #004400;">.</span>o <span style="color: #004400;">-</span>o <span style="color: #000088; font-weight: bold;">$*</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">TARGET_LIB</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LDFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CONFIG_LDFLAGS</span><span style="color: #004400;">&#41;</span></pre></td></tr></table></div>

<p>To understand this chunk, you need to know a little about Make. The main idea is that we define the targets (phony or not) and the rules needed to first compile the library and then to compile the binaries.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
</pre></td><td class="code"><pre class="make" style="font-family:monospace;"><span style="color: #990000;">.PHONY</span><span style="color: #004400;">:</span> tags install clean <span style="color: #666622; font-weight: bold;">info</span> edit
&nbsp;
clean<span style="color: #004400;">:</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;[Makefile] Cleaning...&quot;</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">TARGET_LIB</span><span style="color: #004400;">&#41;</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>BIN_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=</span><span style="color: #004400;">&#41;</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>BIN_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=.</span>o<span style="color: #004400;">&#41;</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>LIB_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=.</span>o<span style="color: #004400;">&#41;</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv core<span style="color: #004400;">*</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv vgcore<span style="color: #004400;">*</span>
	<span style="color: #004400;">@</span>rm <span style="color: #004400;">-</span>fv tags
&nbsp;
install<span style="color: #004400;">:</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;[Makefile] Running installation&quot;</span>
	<span style="color: #004400;">@</span>cp <span style="color: #004400;">-</span>v <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>BIN_SRC<span style="color: #004400;">:.</span>cpp<span style="color: #004400;">=</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LOCAL_PATH</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/</span>bin
&nbsp;
tags<span style="color: #004400;">:</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;[Makefile] Building tags&quot;</span>
	<span style="color: #004400;">@$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CTAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LOCAL_PATH</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/</span><span style="color: #666622; font-weight: bold;">include</span><span style="color: #004400;">/</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">SRC</span><span style="color: #004400;">&#41;</span><span style="color: #004400;">/</span> <span style="color: #004400;">.</span>
&nbsp;
<span style="color: #666622; font-weight: bold;">info</span><span style="color: #004400;">:</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;[Makefile] Info:&quot;</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Project:   $(PROJECT)&quot;</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Version:   $(VERSION)&quot;</span> 
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Author:    $(AUTHOR)&quot;</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Lib:       $(TARGET_LIB)&quot;</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Bin:       $(TARGET_BIN)&quot;</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Src:       $(LIB_SRC)&quot;</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;  Inc:       $(LIB_INC)&quot;</span>
&nbsp;
edit<span style="color: #004400;">:</span>
	<span style="color: #004400;">@</span>echo <span style="color: #CC2200;">&quot;[Makefile] Editing:&quot;</span>
	<span style="color: #004400;">@</span>gvim <span style="color: #004400;">-</span>geom 175x60 <span style="color: #004400;">-</span>O2 <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LIB_INC</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LIB_SRC</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">BIN_SRC</span><span style="color: #004400;">&#41;</span></pre></td></tr></table></div>

<p>Lines 45-73 define all the phony targets (command, in Make jargon) that I use to make my life easier. </p>
<h4>Example</h4>
<p>Once you extracted the archive, you can run</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">make</pre></div></div>

<p>to compile the libraries and the executables, or similarly you can run:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">make clean</pre></div></div>

<p>to remove all the <strong>.o</strong> and <strong>.a</strong> files. Assuming you have GVim and exuberant-ctags installed, you can try to play around with all the other phony targets I briefly discussed above.</p>
<h4>Download</h4>
<p><a href="http://files.mtvl.org/code/bintemplate.tar.bz2" onclick="pageTracker._trackPageview('/outgoing/files.mtvl.org/code/bintemplate.tar.bz2?referer=');">bintemplate.tar.bz2</a> &#8211; 2010-07-27</p>
<h4>To-do</h4>
<p>1. Make phony rules not-phony<br />
2. Improve overall, many important details are missing</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/07/simple-c-project-make/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online BCI demo on TED</title>
		<link>http://www.mtvl.org/2010/07/405/</link>
		<comments>http://www.mtvl.org/2010/07/405/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 17:18:31 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[BCI]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=405</guid>
		<description><![CDATA[BCI technology has far to go, and we solvently demo our prototypes for the media or during public events. We know that our prototypes work well, but once we go online in front of the audience, it is the subject that carries on the most complex task (that is, not getting stressed). If things work out of [...]]]></description>
			<content:encoded><![CDATA[<p>BCI technology has far to go, and we solvently demo our prototypes for the media or during public events. We know that our prototypes work well, but once we go online in front of the audience, it is the subject that carries on the most complex task (that is, not getting stressed). If things work out of the box, we are generally happy but we are not surprised.</p>
<p>Tan Le is the head of Emotiv Systems, a company that inspires a few doubts among some of my colleagues. She gave a speech on TED:</p>
<p style="padding-left: 30px;"><em>&#8220;Tan Le&#8217;s astonishing new computer interface reads its user&#8217;s brainwaves, making it possible to control virtual objects, and even physical electronics, with mere thoughts (and a little concentration). She demos the headset, and talks about its far-reaching applications.&#8221;</em></p>
<p>Nothing against Emotiv Systems, but I believe we should be really careful in building up false expectations, specially if the technology is targeting people with disabilities. By the way, she did not promise too much and she demoed some kind of application using mental-state. It is interesting how surprised she was when everything was working more or less properly! Body language sometimes tells you more than what you would think.</p>
<p style="text-align: center;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="446" height="326" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="bgColor" value="#ffffff" /><param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/TanLe_2010G-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/TanLe-2010G.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=921&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=tan_le_a_headset_that_reads_your_brainwaves;year=2010;theme=what_s_next_in_tech;theme=tales_of_invention;theme=how_the_mind_works;theme=a_taste_of_tedglobal_2010;event=TEDGlobal+2010;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><param name="src" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" /><param name="bgcolor" value="#ffffff" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="446" height="326" src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" flashvars="vu=http://video.ted.com/talks/dynamic/TanLe_2010G-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/TanLe-2010G.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=921&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=tan_le_a_headset_that_reads_your_brainwaves;year=2010;theme=what_s_next_in_tech;theme=tales_of_invention;theme=how_the_mind_works;theme=a_taste_of_tedglobal_2010;event=TEDGlobal+2010;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" bgcolor="#ffffff" wmode="transparent" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/07/405/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On dogs and employees</title>
		<link>http://www.mtvl.org/2010/07/on-dogs-and-employees/</link>
		<comments>http://www.mtvl.org/2010/07/on-dogs-and-employees/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 19:32:54 +0000</pubDate>
		<dc:creator>Michele</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Dogs]]></category>

		<guid isPermaLink="false">http://www.mtvl.org/?p=536</guid>
		<description><![CDATA[Back in the days I had a serious problem as a dog owner. The problem was related to the fact that when I was not in my flat, Tito kept jumping and sleeping on the couch. This sucks in several ways. Saliva and hair are usually transferred to your clothes and removing them is incredibly [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the days I had a serious problem as a dog owner. The problem was related to the fact that when I was not in my flat, Tito kept jumping and sleeping on the couch. This sucks in several ways. Saliva and hair are usually transferred to your clothes and removing them is incredibly painful. Furthermore, during daytime Tito has to stay home by himself. Tito knew that the couch was forbidden, but guess what happened when I was not home&#8230;</p>
<p>By the way, at that time I wrote a dummy Python/OpenCV script to detect brown moving objects (read: dogs) moving on a brighter background (read: the couch). In case of detection, a sound with my voice was played. I have to admit that the thing was working generally well, specially because in a couple of days Tito became really afraid of the couch. I guess the whole trick was done by the dog earing my voice without seeing (smelling?) me.</p>
<p>By the way, this is an example of the detection:</p>

<div class="ngg-galleryoverview" id="ngg-gallery-20-536">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-536" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_00_02.jpg" title="True negative" rel="lightbox[set_20]" >
								<img title="spytito_00_02" alt="spytito_00_02" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_00_02.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-535" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_00_01.jpg" title="True positive" rel="lightbox[set_20]" >
								<img title="spytito_00_01" alt="spytito_00_01" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_00_01.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-537" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_00_03.jpg" title="True positive" rel="lightbox[set_20]" >
								<img title="spytito_00_03" alt="spytito_00_03" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_00_03.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-538" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_00_04.jpg" title="True positive" rel="lightbox[set_20]" >
								<img title="spytito_00_04" alt="spytito_00_04" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_00_04.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-539" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_00_05.jpg" title="True positive" rel="lightbox[set_20]" >
								<img title="spytito_00_05" alt="spytito_00_05" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_00_05.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-540" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_01_00.jpg" title="False negative" rel="lightbox[set_20]" >
								<img title="spytito_01_00" alt="spytito_01_00" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_01_00.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-541" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_02_01.jpg" title="False negative" rel="lightbox[set_20]" >
								<img title="spytito_02_01" alt="spytito_02_01" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_02_01.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-542" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_03_02.jpg" title="False negative" rel="lightbox[set_20]" >
								<img title="spytito_03_02" alt="spytito_03_02" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_03_02.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-534" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mtvl.org/wp-content/gallery/work_spytito/spytito_00_00.jpg" title="True negative" rel="lightbox[set_20]" >
								<img title="spytito_00_00" alt="spytito_00_00" src="http://www.mtvl.org/wp-content/gallery/work_spytito/thumbs/thumbs_spytito_00_00.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p>A couple of days ago I was asked by one of my usual contractors if it was possible to use a webcam to detect whether a person is in front of the computer. The whole idea is have a page in the intranet that tells everybody if you are in your office or not. Although I believe that this kind of stuff is generally evil, I started reading this <a href="http://opencv.willowgarage.com/wiki/FaceDetection" onclick="pageTracker._trackPageview('/outgoing/opencv.willowgarage.com/wiki/FaceDetection?referer=');">Face Detection using OpenCV</a> howto. It looks like everything is more or less there, so it&#8217;s an easy job that can be carried on with the rest.</p>
<p>I will suggest to my contractor to play a track with the voice of the CEO as soon as the employee leaves his computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mtvl.org/2010/07/on-dogs-and-employees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
