<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog blog("Baptiste Wicht"); (Posts about Others)</title><link>https://baptiste-wicht.com/</link><description></description><atom:link href="https://baptiste-wicht.com/categories/others.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Thu, 20 Aug 2026 05:27:30 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Zabbix - Low Level Discovery of cores, CPUs and Hard Disk</title><link>https://baptiste-wicht.com/posts/2013/12/zabbix-low-level-discovery-cores-cpus-hard-disk.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;&lt;a href="https://baptiste-wicht.com/wp-content/uploads/2013/12/Screenshot-from-2013-12-29-165743-e1388332859892.png"&gt;&lt;img src="https://baptiste-wicht.com/wp-content/uploads/2013/12/Screenshot-from-2013-12-29-165743-e1388332859892-300x151.png" alt="Zabbix SSD Status, configured with Low Level Discovery" width="300" height="151" class="size-medium wp-image-2644"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At home, I'm using Zabbix to monitor my servers, it has plenty of interesting features and can be extended a lot by using User Parameter.&lt;/p&gt;
&lt;p&gt;In this post, I'm gonna talk about Low Level Discovery (LLD). If you are only interested in the final result, go the Conclusion section, you can download my template containing all the rules ;)&lt;/p&gt;
&lt;h4&gt;Low Level Discovery (LLD)&lt;/h4&gt;

&lt;p&gt;LLD is a feature to automatically discover some properties of the monitored host and create items, triggers and graphs.&lt;/p&gt;
&lt;p&gt;By default, Zabbix support three types of item discovery:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Mounted filesystems&lt;/li&gt;
    &lt;li&gt;Network interface&lt;/li&gt;
    &lt;li&gt;SNMP's OIDs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two are very useful, since they will give you by default, for instance, the free space of each mounted file system or the bandwith going in and out of each network interface. As I only monitor Linux servers, I don't use the last one, but it will eventually interest other people.&lt;/p&gt;
&lt;p&gt;Another very interesting thing about this feature is that you can extend it by discovering more items. In this article, I will show how to discover CPUs, CPU Cores and Hard Disk.&lt;/p&gt;
&lt;p&gt;The most important part of custom discovery is to create a script on the monitored machines that can "discover" something. It can be any executable, the only thing important is that it outputs data in the correct format. I have to say that the format is quite ugly, but that is probably not very important ;) Here is the output of my hard disk discovery script:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sda"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sda"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sdb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sdb"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sdc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sdc"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sdd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sdd"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sde"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sde"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sdf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sdf"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"{#DISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/dev/sdg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"{#SHORTDISKNAME}"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sdg"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can have as many keys for each discovered items, but the format must remains the same. In the item, trigger and graph prototypes, you will then use {#DISKNAME} or {#SHORTDISKNAME} to use the discovered values. &lt;/p&gt;
&lt;p&gt;Once you have created your scripts, you have to register it in the zabbix configuration as a user parameter. For instance, if you use the zabbix daemon, you need these lines in /etc/zabbix/zabbix_agentd.conf: &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="nv"&gt;EnableRemoteCommands&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
...
&lt;span class="nv"&gt;UnsafeUserParameters&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
...
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;discovery.hard_disk,/scripts/discover_hdd.sh
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, when you will create the discovery rule, you can use discovery.hard_disk as the key. &lt;/p&gt;
&lt;p&gt;A discovery rule in itself is useful without prototypes, you can create three types of prototypes: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Item Prototype: This will create a new item for each discovered entity&lt;/li&gt;
    &lt;li&gt;Trigger Prototype: This will create a new trigger for each discovered entity. &lt;/li&gt;
    &lt;li&gt;Graph Prototype: This will create a graph for each discovered entity. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most useful are by far the item and trigger prototypes. The biggest problem with graphs is that you cannot create an aggregate graph of each discovered items. For instance, if you record the temperature of your CPU cores, you cannot automatically create a graph with the temperature of each discovered cores. For that, you have to create the graph in each host. Which makes, imho, graph prototypes pretty useless. Anyway...&lt;/p&gt;
&lt;p&gt;In the next section, I'll show how I have created discovery rules for Hard Disk, CPU and CPU cores. &lt;/p&gt;
&lt;h4&gt;Discover Hard Disk&lt;/h4&gt;

&lt;p&gt;The discovery script is really simple: &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;disks&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;-l&lt;span class="w"&gt; &lt;/span&gt;/dev/sd*&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $NF}'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sed&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'s/[0-9]//g'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;uniq&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\"data\":["&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;disk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$disks&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"    {\"{#DISKNAME}\":\"&lt;/span&gt;&lt;span class="nv"&gt;$disk&lt;/span&gt;&lt;span class="s2"&gt;\",\"{#SHORTDISKNAME}\":\"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;5&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\"},"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"]"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"}"&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It just lists all the /dev/sdX devices, remove the partition number and remove the duplicates, to have only the hard disk at the end. &lt;/p&gt;
&lt;p&gt;I've created several item prototypes for each hard disk. Here are some examples using S.M.A.R.T. (you can download the template with all the items in the Conclusion section): &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Raw Read Error Rate&lt;/li&gt;
    &lt;li&gt;Spin Up Time&lt;/li&gt;
    &lt;li&gt;SSD Life Left&lt;/li&gt;
    &lt;li&gt;Temperature&lt;/li&gt;
    &lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You may notice that some of them only make sense for SSD (SSD Life Left) and some others do not make any sense for SSD (Spin Up Time). This is not a problem since they will just be marked as Not Supported by Zabbix. &lt;/p&gt;
&lt;p&gt;All these datas are collected using the smartctl utility. &lt;/p&gt;
&lt;p&gt;I've also created some trigger to indicate the coming failure of an hard disk: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;SSD Life Left too low&lt;/li&gt;
    &lt;li&gt;Reallocated Sector Count too low&lt;/li&gt;
    &lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've just used the threshold reported by smartctl, they may be different from one disk manufacturers to another. I don't put a lot of faith on these values, since disk generally fail before going to threshold, but it could be a good indicator anyway. &lt;/p&gt;
&lt;h4&gt;Discover CPUs&lt;/h4&gt;

&lt;p&gt;Here is the script to discover CPUs: &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;cpus&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;lscpu&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CPU(s):"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $NF}'&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="nv"&gt;cpus&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="nv"&gt;$cpus&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\"data\":["&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cpu&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;seq&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cpus&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"    {\"{#CPUID}\":\"&lt;/span&gt;&lt;span class="nv"&gt;$cpu&lt;/span&gt;&lt;span class="s2"&gt;\"},"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"]"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"}"&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It just uses lscpu and parses its output to find the number of CPU and then create an entry for each CPUs. &lt;/p&gt;
&lt;p&gt;I just have one item for each CPU: The CPU Utilization. &lt;/p&gt;
&lt;p&gt;I haven't created any trigger here. &lt;/p&gt;
&lt;h4&gt;Discover CPU Cores&lt;/h4&gt;

&lt;p&gt;Just before, we discovered the CPUs, but it is also interesting to discover the cores. If you don't have Hyperthreading, the result will be the same. It is especially interesting to get the temperature of each core. Here is the script: &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;cores&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;lscpu&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Core(s) per socket:"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $NF}'&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="nv"&gt;cores&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="nv"&gt;$cores&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\"data\":["&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;core&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;seq&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cores&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"    {\"{#COREID}\":\"&lt;/span&gt;&lt;span class="nv"&gt;$core&lt;/span&gt;&lt;span class="s2"&gt;\"},"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"]"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"}"&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It works in the same way as the previous script. &lt;/p&gt;
&lt;p&gt;I've only created one item prototype, to get the temperature of each core with lm_sensors. &lt;/p&gt;
&lt;h4&gt;Wrap-Up&lt;/h4&gt;

&lt;p&gt;Here are all the UserParameter necessary to make the discovery and the items works: &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="c1"&gt;### System Temperature ###&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;system.temperature.core&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,sensors&lt;span class="p"&gt;|&lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;Core&lt;span class="se"&gt;\ &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;cut&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"("&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;cut&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"+"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;cut&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;-4
&lt;span class="c1"&gt;### DISK I/O###&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.read.ops&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$4}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.read.ms&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$7}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.write.ops&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$8}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.write.ms&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$11}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.io.active&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$12}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.io.ms&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;y&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$13}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.read.sectors&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$6}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom.vfs.dev.write.sectors&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,cat&lt;span class="w"&gt; &lt;/span&gt;/proc/diskstats&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;head&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$10}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;system.smartd_raw&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,sudo&lt;span class="w"&gt; &lt;/span&gt;smartctl&lt;span class="w"&gt; &lt;/span&gt;-A&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tail&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;xargs&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$10}'&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;system.smartd_value&lt;span class="o"&gt;[&lt;/span&gt;*&lt;span class="o"&gt;]&lt;/span&gt;,sudo&lt;span class="w"&gt; &lt;/span&gt;smartctl&lt;span class="w"&gt; &lt;/span&gt;-A&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;egrep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tail&lt;span class="w"&gt; &lt;/span&gt;-1&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;xargs&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;awk&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{print $$4}'&lt;/span&gt;
&lt;span class="c1"&gt;### Discovery ###&lt;/span&gt;
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;discovery.hard_disk,/scripts/discover_hdd.sh
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;discovery.cpus,/scripts/discover_cpus.sh
&lt;span class="nv"&gt;UserParameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;discovery.cores,/scripts/discover_cores.sh
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;(it must be set in zabbix_agentd.conf)&lt;/p&gt;
&lt;p&gt;You also need to give zabbix the right to use sudo with smartctl. For that, you have to edit your /etc/sudoers file and add this line: &lt;/p&gt;
&lt;pre&gt;ALL ALL=(ALL)NOPASSWD: /usr/sbin/smartctl&lt;/pre&gt;

&lt;h4&gt;Conclusion and Download&lt;/h4&gt;

&lt;p&gt;I hope that this helps some people to use Low Level Discovery in their Zabbix Monitoring Installation. &lt;/p&gt;
&lt;p&gt;LLD eases a lot the creation of multiple items discovery for hosts with different hardware or configuration. However, it has some problems for which I have not yet found a proper solution. First, you have to duplicate the client scripts on each host (or at least have them on a share available from each of them). Then, the configuration of each agent is also duplicated in the configuration of each host. The biggest problem I think is the fact that you cannot automatically create graph with the generated items of each discovered entities. For instance, I had to create a CPU Temperature graph in each of my host. If you have few hosts, like many, it is acceptable, but if you have hundreds of hosts, you just don't do it. &lt;/p&gt;
&lt;p&gt;All the scripts and the template export file are available in the &lt;a href="https://github.com/wichtounet/zabbix-lld" title="zabbix-lld repository"&gt;zabbix-lld&lt;/a&gt; repository. For everything to work, you need the lscpu, lm_sensors and smartmontools utilities. &lt;/p&gt;
&lt;p&gt;If you have any question or if something doesn't work (I don't offer any guarantee, but it should work on most recent Linux machines), don't hesitate to comment on this post.&lt;/p&gt;</description><category>homelab</category><category>Linux</category><category>Others</category><category>servers</category><category>zabbix</category><guid>https://baptiste-wicht.com/posts/2013/12/zabbix-low-level-discovery-cores-cpus-hard-disk.html</guid><pubDate>Mon, 30 Dec 2013 08:12:31 GMT</pubDate></item><item><title>budgetwarrior 0.2 - Visual reports, fortune status and expenses aggregates</title><link>https://baptiste-wicht.com/posts/2013/10/budgetwarrior-0-2-visual-reports-fortune-status-expenses-aggregates.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;I've released a new version of budgetwarrior the version 0.2.&lt;/p&gt;
&lt;p&gt;I've several new features to the tool. First, I've added a graph of the expenses/earnings/balances of each month for a given year in the form of a bar plot. You can see an example in practice here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://baptiste-wicht.com/wp-content/uploads/2013/10/Screenshot-from-2013-10-25-215839.png"&gt;&lt;img class="size-medium wp-image-2617" alt="budgetwarrior monthly report" src="https://baptiste-wicht.com/wp-content/uploads/2013/10/Screenshot-from-2013-10-25-215839-300x266.png" width="300" height="266"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nothing fancy, but it gives a good overview of the current state of your budget.&lt;/p&gt;
&lt;p&gt;I've added a new module, called fortune, that lets you enter your total fortune and then computes the difference between the entered fortune statuses. For now, it doesn't do anything else with this data. But in the future, I want to correlate this data with the balances to check the difference between the filled expenses and earnings and the fortune evolution.&lt;/p&gt;
&lt;p&gt;I've also added a more convenient way of creating expenses and earnings. Just type "budget expense add" and you'll be able to fill all the fields one by one. Of course, the command line commands are still available.&lt;/p&gt;
&lt;p&gt;The last new feature I've added is an aggregate report (budget overview aggregate). This view simply groups all the expenses with the same name of a year together. If you always use the same expense title for your groceries, you'll see the total you spent in groceries for a year. You can also name your expenses with the format "Category/Expenses" and all the expenses with the same category will be grouped together in the aggregate view. That allows you to still have enough details in the monthly overview but to logically groups your expenses together in the aggregate view.&lt;/p&gt;
&lt;p&gt;The other changes are minor. I've improved the monthly overview to sort the expenses and earnings by date. To facilitate the storage of the files in a service like Dropbox, the data and configuration files are now only written if they have been modified. The mean in the current overview has been changed to reflect only the months up to the current month and not the future (which was just ruining the means).&lt;/p&gt;
&lt;p&gt;If you are interested by the tool, you can download it on Github: &lt;a title="budgetwarrior repository" href="https://github.com/wichtounet/budgetwarrior"&gt;budgetwarrior&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hope this tool will be useful to some people. If you've any question, just let a comment on this post or contact me directly by email. I'll be glad to help.&lt;/p&gt;</description><category>budgetwarrior</category><category>C++</category><category>Others</category><category>projects</category><guid>https://baptiste-wicht.com/posts/2013/10/budgetwarrior-0-2-visual-reports-fortune-status-expenses-aggregates.html</guid><pubDate>Fri, 25 Oct 2013 14:10:50 GMT</pubDate></item><item><title>Why and how I completely left Windows for Linux</title><link>https://baptiste-wicht.com/posts/2013/07/why-how-left-windows-for-linux.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;For years now, I always kept a dual-boot at home with a Linux system (currently Gentoo) and a Windows system. At work, I only use Gentoo. This week-end, I decided to completely remove it and migrate the applications I used on Windows to my Gentoo system.&lt;/p&gt;
&lt;h4&gt;Why Windows ?&lt;/h4&gt;

&lt;p&gt;So first things first, why was I keeping the Windows system ? For several reasons:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Games :) Unfortunately, most of the games I play are not natively compatible with Linux.&lt;/li&gt;
    &lt;li&gt;Office. I always liked Microsoft Office. As I hate OpenOffice/LibreOffice, I never wanted to remove it For schools we always had several teachers forcing us to use Microsoft document formats.&lt;/li&gt;
    &lt;li&gt;Hardware support. I always found that hardware support in Windows was great. Most of the time when you add new peripheral, there is nothing, it just works, which is great.&lt;/li&gt;
    &lt;li&gt;Applications. I always had some applications that I didn't found good enough Linux equivalents for. For instance, Newsleecher, iTunes or TaggedFrog.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On the other hand, I work on Linux for years now and I would like to have to work on Windows again.&lt;/p&gt;
&lt;h4&gt;What Changed ?&lt;/h4&gt;

&lt;p&gt;This weekend I upgraded my hardware configuration (Motherboard, CPU and RAM). I was afraid that I had to reinstall my Linux configurations (because of Gentoo compiled with march=native), but I never thought that I would have to reinstall Windows. I turned out the contrary: my Gentoo installation worked just fine and my Windows totally crashed (BSOD at each startup). I finally made it through Windows after disabled AHCI mode on my motherboard, but then activation was invalidated (of course...) and online activation was not working. I decided to install the new chipset drivers and launch the Windows update and after that, Windows decided to boot without any USB support (WTF...). After that, I decided that Windows what not so great at all for   hardware support...&lt;/p&gt;
&lt;p&gt;Another reason I left Windows is Windows 8. I find that Window 7 was really great, but I really don't like Windows 8 and I would never have upgraded my Seven to it. Moreover, I recently bought Microsoft Office 2013 and it turned that I had to create an account at Microsoft to install it... Seriously ??? And moreover, it turned out to be worse thant Office 2010 (which, again, was great).&lt;/p&gt;
&lt;p&gt;So all these reasons made me remove Windows.&lt;/p&gt;
&lt;h4&gt;How to migrate everything to Linux ?&lt;/h4&gt;

&lt;p&gt;First, I had no problem with my data. Most of my data are on a personal NAS and the remaining is on Dropbox, so no problem on this side.&lt;/p&gt;
&lt;p&gt;I still had some problems to resolve. First of all, I needed my games to run on Linux. I currently play only Diablo III. As I had received a year free of &lt;a title="Crossover" href="http://www.codeweavers.com/products/"&gt;Crossover&lt;/a&gt;, I decided to give it a try. Crossover is based on Wine and ensures that some software are running correctly under it and provide technical support. After some tuning, Diablo III was running almost flawlessly on my Gentoo machine :) Problem 1 solved. I will totally buy a license of Crossover, once my free year is over.&lt;/p&gt;
&lt;p&gt;I still add some applications to replace. I use iTunes as my main music player and library manager. Some time ago, I tried a lot of programs like Amarok/Rythmbox/Banshee, but I didn't liked them a lot and they were not running very well on large library of music files. This time, I tried &lt;a title="Clementine" href="http://www.clementine-player.org/"&gt;Clementine&lt;/a&gt;. Even if not very beautiful, it had all the features I needed and worked very well. I decided to stick with it. Another program I like a lot on Windows is TaggedFrog. It is a very simple program allowing to put tags on any file on the system and then search by tag on them. I haven't found a total equivalent. I first tried Tracker that is a Gnome project, but I was not satisfied with the search interface. After that, I tried the very simple &lt;a title="TMSU" href="http://tmsu.org/"&gt;TMSU&lt;/a&gt;. It is a command-line based tagging manager. All the tagging must be done in command line. In my case, it is not a problem, as I don't mind using the command-line and I don't tag files very often. What is very interesting about TMSU is that it can create a virtual file system (based on FUSE). In this file system, you have all your tags  as folder and you can see directly all the files of each tag. Moreover, you can directly make cross search (has tag X and Y and Z) by just going down in the tag folder. It is really great and has everything I needed. Finally, I also needed something to replace Newsleecher. I haven't found something as great (especially no replacement for the Supersearch function), but I installed &lt;a title="Sabnzbd" href="http://sabnzbd.org/"&gt;Sabnzbd&lt;/a&gt; which works really well and is very simple. For now, I just use the web interface and haven't installed any other front-end, but that will perhaps change in the future.&lt;/p&gt;
&lt;p&gt;I haven't replaced Office for now on. It occurred to me that since I left school, I haven't used it a lot, so that will probably not be a problem anymore. I will change to write the few letters I have to write on Latex and if I have Office documents, I'll probably read them on Google Drive.&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;

&lt;p&gt;Even if I lost a lot of time with all that, I think it is a great think. It makes one less configuration to maintain and some less costs on the future. Moreover, I will save some time, because I won't have to switch between Linux and Windows for different tasks. And now, I have a second SSD ready for something else, either for RAID 1 to ensure redundancy on Linux or to mount on a server, I'll see later.&lt;/p&gt;
&lt;p&gt;I will probably have some more problems in the future, but I'm convinced that there will be Linux solutions to it :)&lt;/p&gt;</description><category>Gentoo</category><category>Linux</category><category>Others</category><category>Personal</category><category>Windows</category><guid>https://baptiste-wicht.com/posts/2013/07/why-how-left-windows-for-linux.html</guid><pubDate>Mon, 01 Jul 2013 06:24:25 GMT</pubDate></item><item><title>Some news</title><link>https://baptiste-wicht.com/posts/2013/06/some-news.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;No, I'm not dead ;)&lt;/p&gt;
&lt;p&gt;After having finished my Master thesis in March, I took a break from my personal projects including this project. I then started a job in my school, waiting for a Ph.D thesis. I'm now working on a very interesting Machine Learning project about Speech, unfortunately in Java ;)&lt;/p&gt;
&lt;p&gt;I just started again working on eddic this week. I'm gonna try to improve as much as possible the performances of the parser. I will also try to post again some articles on this blog, although I don't know about what.&lt;/p&gt;</description><category>C++</category><category>EDDI</category><category>Java</category><category>Machine Learning</category><category>Others</category><guid>https://baptiste-wicht.com/posts/2013/06/some-news.html</guid><pubDate>Tue, 04 Jun 2013 21:52:24 GMT</pubDate></item><item><title>Use CMake to easily compiles Latex documents into PDF</title><link>https://baptiste-wicht.com/posts/2012/09/cmake-compile-latex-documents.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;Everyone who compiles Latex documents by hand knows that it is not a panacea. You have to compile the file several times to handle the references. Moreover, if you have a glossary or an index, you have to run others commands between Latex commands so that everything is correctly resolved. The better way to handle Latex compilation is to write a MakeFile compiling each part. However, writing a Latex MakeFile by hand is not easy and especially not interesting. &lt;/p&gt;
&lt;p&gt;Using CMake for most of my development projects, I tried to find a CMake script to generates a MakeFile easily. I did found a good script for that, but I wanted to add some features and change some things, so I forked it to Github: &lt;a href="https://github.com/wichtounet/CMakeLatex" title="CMakeLatex Github repository"&gt;The CMakeLatex repository&lt;/a&gt;. &lt;/p&gt;
&lt;h3&gt;Usage&lt;/h3&gt;

&lt;p&gt;Here is an example using all the features of the script for one of my Latex documents. &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="nb"&gt;PROJECT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;master_project&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;NONE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;cmake_minimum_required&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;VERSION&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;2.8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;SET&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;LATEX_OUTPUT_PATH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;build&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;INCLUDE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;UseLATEX.cmake&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;GLOB_RECURSE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;contents_files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;RELATIVE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CMAKE_SOURCE_DIR&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;contents/*.tex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;ADD_LATEX_DOCUMENT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;master.tex&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;INPUTS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;contents_files&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;IMAGE_DIRS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;images&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;BIBFILES&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;bibliography.bib&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;USE_INDEX&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;USE_GLOSSARY&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;FILTER_OUTPUT&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To use it, you have to download the files of the repository and put them aside your Latex files (or just make symlinks to the files in a clone of the repository for easy update). Then, the &lt;em&gt;UseLATEX.cmake&lt;/em&gt; file has to be included in your CMakeLists.txt file. &lt;/p&gt;
&lt;p&gt;I think that it is a good practice to generates the Latex files in another directory. This directory can be set using the &lt;em&gt;LATEX_OUTPUT_PATH&lt;/em&gt; variable. &lt;/p&gt;
&lt;p&gt;Then, to add a latex document, you can use the &lt;em&gt;ADD_LATEX_DOCUMENT&lt;/em&gt; function. The first parameter is the name of the main Latex file. After that, you have to give several parameters: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;INPUTS: It needs the list of Latex files that are included in master file. I use the GLOB_RECURSE function to find all of them in a contents subfolder. &lt;/li&gt;
    &lt;li&gt;IMAGE_DIRS: The directory where the image are stored. They will be copied to the build folder and automatically converted if necessary. &lt;/li&gt;
    &lt;li&gt;BIBFILES: If you have a bibliography, you just have to list all the .bib files of your project. &lt;/li&gt;
    &lt;li&gt;USE_INDEX: Necessary only if your document use an index. &lt;/li&gt;
    &lt;li&gt;USE_GLOSSARY: Necessary only if your document use a glossary. &lt;/li&gt;
    &lt;li&gt;FILTER_OUTPUT: This option activates the filtering of pdflatex output to the console. For now, the option is quite limited, but it allows you to have a smoother output. It has to be taken into account that this option hides the overflow and underflow warnings. &lt;/li&gt;
    &lt;li&gt;CONFIGURE: You can use the CMake configuration feature on some of your files if you want CMake variables to be replaced in the documents. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once your Latex document is configured, you can just run cmake on your project. After that, you can use targets to generate pdf: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;make pdf: This will generate the Latex file using several passes and running all the necessary commands. &lt;/li&gt;
    &lt;li&gt;make fast: This will generate a pdf in only one pass. This can be useful if you want to see a rough draft of your document quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I already use this script for several of my documents. I hope that it will be useful for some of you. If you want any problem in the script or in the generate make file or if you have an idea for improvement, don't hesitate to let a command or to publish an Issue or a Pull Request in &lt;a href="https://github.com/wichtounet/CMakeLatex" title="CMakeLatex Github repository"&gt;the CMakeLatex repository&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;This script only support pdflatex and can only generates pdf directly. If you want latex support with dvi/ps/pdf generation, you should take a look at the original project:  &lt;a href="http://public.kitware.com/Wiki/CMakeUserUseLATEX" title="CMakeUserUseLATEX"&gt;CMakeUserUseLATEX&lt;/a&gt;&lt;/p&gt;</description><category>cmake</category><category>Latex</category><category>Others</category><category>Tools</category><guid>https://baptiste-wicht.com/posts/2012/09/cmake-compile-latex-documents.html</guid><pubDate>Mon, 24 Sep 2012 07:07:33 GMT</pubDate></item><item><title>Back in Berkeley, California</title><link>https://baptiste-wicht.com/posts/2012/09/back-in-berkeley-california.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;I arrived yesterday to Berkeley, California.&lt;/p&gt;
&lt;p&gt;Just like I did my Bachelor thesis in Lawrence Berkeley National Laboratory (LBNL), I will do my Master Thesis there too. The thesis will last a bit less than a semester.&lt;/p&gt;
&lt;p&gt;During my Master Thesis I will try to use profiling samples from the Linux perf tools in GCC or Clang to optimize processor cache usage (avoid cache and page faults).&lt;/p&gt;
&lt;p&gt;I will try to publish some posts about that during the semester if I have time.&lt;/p&gt;</description><category>Compilers</category><category>gcc</category><category>Others</category><category>Personal</category><category>The site</category><guid>https://baptiste-wicht.com/posts/2012/09/back-in-berkeley-california.html</guid><pubDate>Thu, 13 Sep 2012 08:35:43 GMT</pubDate></item><item><title>The site is now running WordPress 3.4</title><link>https://baptiste-wicht.com/posts/2012/06/the-site-now-running-wordpress-3-4.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;I just updated the site to run WordPress 3.4&lt;/p&gt;
&lt;p&gt;Normally, you should not see any differences as most of the new features of this version are in the admin side, but if you see something that doesn't work, don't hesitate to contact me.&lt;/p&gt;</description><category>Others</category><category>Releases</category><category>The site</category><category>WordPress</category><guid>https://baptiste-wicht.com/posts/2012/06/the-site-now-running-wordpress-3-4.html</guid><pubDate>Sun, 24 Jun 2012 00:36:37 GMT</pubDate></item><item><title>Merry Christmas</title><link>https://baptiste-wicht.com/posts/2011/12/merry-christmas.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;A bit late, but better late than never : Merry Christmas to all the readers of this blog :)&lt;/p&gt;</description><category>Others</category><category>Personal</category><category>The site</category><guid>https://baptiste-wicht.com/posts/2011/12/merry-christmas.html</guid><pubDate>Sun, 25 Dec 2011 00:12:57 GMT</pubDate></item><item><title>Moodle promotion on Packt Publishing Books</title><link>https://baptiste-wicht.com/posts/2011/12/moodle-promotion-on-packt-publishing-books.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;In their December promotion, Pack Publishing are offering heavy discounts on all their Moodle books during all the month.&lt;/p&gt;
&lt;p&gt;You can find all books available on offer on this page : &lt;a href="http://www.packtpub.com/news/moodle-festive-month" target="_blank"&gt;http://www.packtpub.com/news/&lt;wbr&gt;moodle-festive-month&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are great offers:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Buy any &lt;strong&gt;Moodle &lt;/strong&gt;print book and get&lt;strong&gt; 20% off&lt;/strong&gt;&lt;/li&gt;
    &lt;li&gt;Buy any &lt;strong&gt;Moodle &lt;/strong&gt;eBook and get&lt;strong&gt; 30% off&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For those who don't know Moodle, Moodle is currently the world's most popular E-learning platform. Moodle is a free, open-source PHP web application for producing modular internet-based courses that support a modern social constructionist pedagogy.&lt;/p&gt;</description><category>Books</category><category>Others</category><category>Promotion</category><guid>https://baptiste-wicht.com/posts/2011/12/moodle-promotion-on-packt-publishing-books.html</guid><pubDate>Tue, 13 Dec 2011 07:40:08 GMT</pubDate></item><item><title>Packt Open Source Awards 2011</title><link>https://baptiste-wicht.com/posts/2011/09/packt-open-source-awards-2011.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;Packt launched the &lt;a title="Packt Open Source Awards 2011" href="http://www.packtpub.com/open-source-awards-home" target="_blank"&gt;Open Source Awards 2011&lt;/a&gt; contest. This is a contest that aims to encourage, support, recognize and reward Open Source projects.&lt;/p&gt;
&lt;p&gt;This contest has been running since 2006.&lt;/p&gt;
&lt;p&gt;The nominations started the first of August and finished on the 9th of September. The finalists of each category are available on the website. &lt;/p&gt;
&lt;p&gt;You can vote for your favorite open source project in each of these categories:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Open Source CMS&lt;/li&gt;
    &lt;li&gt;Open Source Mobile Toolkits and Libraries&lt;/li&gt;
    &lt;li&gt;Most Promising Open Source project&lt;/li&gt;
    &lt;li&gt;Open Source Business Applications&lt;/li&gt;
    &lt;li&gt;Open Source JavaScript Libraries&lt;/li&gt;
    &lt;li&gt;Open Source Multimedia Software&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The winner of each category will win 2500$ !&lt;/p&gt;
&lt;p&gt;Morevoer, if you vote for your favorite project, you will be entered into a prize draw to win a Kindle!&lt;/p&gt;
&lt;p&gt;The votes are open, you can vote now &lt;a href="http://www.packtpub.com/open-source-awards-home/voting-stage" title="Vote for your project"&gt;on this page&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;You can have more information about the awards &lt;a title="Information about the Awards" href="http://www.packtpub.com/blog/2011-open-source-awards-announcement" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><category>Others</category><category>Promotion</category><category>Web</category><guid>https://baptiste-wicht.com/posts/2011/09/packt-open-source-awards-2011.html</guid><pubDate>Fri, 23 Sep 2011 05:51:45 GMT</pubDate></item><item><title>Git Tip : Restore a deleted tag</title><link>https://baptiste-wicht.com/posts/2011/06/git-tip-restore-a-deleted-tag.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;A little tip that can be very useful, how to restore a deleted Git tag. &lt;/p&gt;
&lt;p&gt;If you juste deleted a tag by error, you can easily restore it following these steps. First, use&lt;/p&gt;
&lt;pre&gt;git fsck --unreachable | grep tag&lt;/pre&gt;

&lt;p&gt;then, you will see the unreachable tag. If you have several tags on the list, use &lt;/p&gt;
&lt;pre&gt;git show KEY&lt;/pre&gt;

&lt;p&gt;to found the good tag and finally, when you know which tag to restore, use&lt;/p&gt;
&lt;pre&gt;git update-ref refs/tags/NAME KEY&lt;/pre&gt;

&lt;p&gt;and the previously deleted tag with restore with NAME. &lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href="http://git.661346.n2.nabble.com/template/NamlServlet.jtp?macro=user_nodes&amp;amp;user=177109"&gt;Shawn Pearce&lt;/a&gt; for the tip.&lt;/p&gt;</description><category>Git</category><category>Others</category><category>Tips</category><guid>https://baptiste-wicht.com/posts/2011/06/git-tip-restore-a-deleted-tag.html</guid><pubDate>Wed, 15 Jun 2011 17:18:13 GMT</pubDate></item><item><title>Now writing from Berkeley, California</title><link>https://baptiste-wicht.com/posts/2011/05/now-writing-from-berkeley-california.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;This message has been written from California, where I'm for 3 months. I'm making my bachelor final project in Berkeley Labs. &lt;/p&gt;
&lt;p&gt;I'll certainly give some informations about the project and my researches during the next months. &lt;/p&gt;
&lt;p&gt;I hope that I'll have the time to write more articles this next months as I've made the last months... I had a lot of work at school and no motivation to write.&lt;/p&gt;</description><category>Others</category><category>Personal</category><category>The site</category><guid>https://baptiste-wicht.com/posts/2011/05/now-writing-from-berkeley-california.html</guid><pubDate>Sat, 28 May 2011 20:38:43 GMT</pubDate></item><item><title>The Pragmatic Programmer - Book Review</title><link>https://baptiste-wicht.com/posts/2010/09/the-pragmatic-programmer-book-review.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;This week, I finished a new book : &lt;strong&gt;The Pragmatic Programmer&lt;/strong&gt;, from journeyman to master, written by Andrew Hunt and David Thomas.&lt;/p&gt;
&lt;p&gt;According to the author, reading this book will make you a better programmer, a pragmatic programmer. A pragmatic programmer is a person who loves its work and who always want to improve it. He wants to improve its skills and to learn new technologies. He doesn't only code, he wants to provide better and better code.&lt;/p&gt;
&lt;p&gt;This book don't focus on any language, it can be useful to programmer of every language.&lt;/p&gt;
&lt;p&gt;I don't advice this book to complete beginners because this book contains a lot of different ideas that can discourage neophyte because of the lot of works they must provide to become a real pragmatic programmer.&lt;/p&gt;
&lt;p&gt;You will learn several very important things in these books :&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Have a pragmatic philosophy : Assume your responsibilities, don't let broken windows appears, fix issues as they come, make quality software, improve your knowledges, communicate with other persons, ...&lt;/li&gt;
    &lt;li&gt;Adopt a pragmatic approach : Duplication is Hell, Orthogonality is Heaven, use tracer bullets and prototype when starting projects to achieve your objectives&lt;/li&gt;
    &lt;li&gt;Use the good tools : Use good editors, automate all that you can, construct a set of tools for your usage&lt;/li&gt;
    &lt;li&gt;Be paranoiac : design by contract, use exceptions, ...&lt;/li&gt;
    &lt;li&gt;Don't go to deep in your errors&lt;/li&gt;
    &lt;li&gt;Make your code better and better while you're coding, consider the speed of algorithms&lt;/li&gt;
    &lt;li&gt;Before the project, get the good requirements, specify as good as you can&lt;/li&gt;
    &lt;li&gt;Create a pragmatic team&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Like you can see this book provide a long list of advices, that is not always easy to read and to understand. I've made a lot of pauses, re-reading a passage to have a good understanding of the whole lot.&lt;/p&gt;
&lt;p&gt;I''ve found all the advices very good and interesting and I think that applying these advices will help me to make better work.&lt;/p&gt;
&lt;p&gt;But, I must say that some chapters have not aged well. Especially, on tools. The authors advice to use only tools like plain text editor and shell commands. I think that with the power of modern IDE we can save a lot of time.&lt;/p&gt;
&lt;p&gt;But this little default expected, this book is a great book, a must read book, that every programmer should read once in its life.&lt;/p&gt;
&lt;p&gt;More informations on the website of the book : &lt;a target="_blank" href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer"&gt;http://www.pragprog.com/titles/tpp/the-pragmatic-programmer&lt;/a&gt;&lt;/p&gt;</description><category>Books</category><category>Others</category><guid>https://baptiste-wicht.com/posts/2010/09/the-pragmatic-programmer-book-review.html</guid><pubDate>Wed, 29 Sep 2010 05:12:10 GMT</pubDate></item><item><title>Solve Einstein’s Riddle using Prolog</title><link>https://baptiste-wicht.com/posts/2010/09/solve-einsteins-riddle-using-prolog.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;div&gt;&lt;p&gt;This week, we started learning Prolog at school. So to exercise, I choose the Einstein's Riddle. Einstein wrote this riddle in the 19th century. He stated that only 2% of the population can solve it by mind. Personnally, I'm not of this two %, I needed paper and pens to solve it. But this is not the them of the post, so let's use Prolog to solve it. I will present my solution, there is certainly other solutions, and certainly better, but it makes only some days that I started learning this language and this new kind of developing, logical programming. &lt;/p&gt;
&lt;p&gt;Here is the riddle as stated by Einstein :&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;In a street there are five houses, painted five different colours.&lt;/li&gt;
    &lt;li&gt;In each house lives a person of different nationality&lt;/li&gt;
    &lt;li&gt;These five homeowners each drink a different kind of beverage, smoke different brand of cigar and keep a different pet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The question is : Who owns the fish ?&lt;/p&gt;
&lt;p&gt;And there are 15 hints :&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;The Brit lives in a red house.&lt;/li&gt;
    &lt;li&gt;The Swede keeps dogs as pets.&lt;/li&gt;
    &lt;li&gt;The Dane drinks tea.&lt;/li&gt;
    &lt;li&gt;The Green house is next to, and on the left of the White house.&lt;/li&gt;
    &lt;li&gt;The owner of the Green house drinks coffee.&lt;/li&gt;
    &lt;li&gt;The person who smokes Pall Mall rears birds.&lt;/li&gt;
    &lt;li&gt;The owner of the Yellow house smokes Dunhill.&lt;/li&gt;
    &lt;li&gt;The man living in the centre house drinks milk.&lt;/li&gt;
    &lt;li&gt;The Norwegian lives in the first house.&lt;/li&gt;
    &lt;li&gt;The man who smokes Blends lives next to the one who keeps cats.&lt;/li&gt;
    &lt;li&gt;The man who keeps horses lives next to the man who smokes Dunhill.&lt;/li&gt;
    &lt;li&gt;The man who smokes Blue Master drinks beer.&lt;/li&gt;
    &lt;li&gt;The German smokes Prince.&lt;/li&gt;
    &lt;li&gt;The Norwegian lives next to the blue house.&lt;/li&gt;
    &lt;li&gt;The man who smokes Blends has a neighbour who drinks water.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So let's start with the code !&lt;/p&gt;
&lt;p class="more"&gt;&lt;a href="https://baptiste-wicht.com/posts/2010/09/solve-einsteins-riddle-using-prolog.html"&gt;Read more…&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Others</category><category>Prolog</category><guid>https://baptiste-wicht.com/posts/2010/09/solve-einsteins-riddle-using-prolog.html</guid><pubDate>Wed, 22 Sep 2010 05:01:30 GMT</pubDate></item><item><title>Hardware Guide : The power supply</title><link>https://baptiste-wicht.com/posts/2010/09/hardware-guide-the-power-supply.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;div&gt;&lt;p&gt;After writing a lot about Java concurrency, I wanted to write about something else, I chosen Hardware, so I wrote a new guide about power supplies.&lt;/p&gt;
&lt;h4&gt;Introduction&lt;/h4&gt;

&lt;p&gt;The power supply provide electrical power to the computer and to the several components. Without power supply, a computer cannot start. The power supply is connected to the power distribution system of your home and convert this power into the good number of watts needed by the components of your PC. All the power is redistributed using several different connectors.&lt;/p&gt;
&lt;p&gt;When we buy a power supply, you need to keep in mind several elements, the available connectors and the power generated by the power supply.&lt;/p&gt;
&lt;p class="more"&gt;&lt;a href="https://baptiste-wicht.com/posts/2010/09/hardware-guide-the-power-supply.html"&gt;Read more…&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Hardware</category><category>Others</category><guid>https://baptiste-wicht.com/posts/2010/09/hardware-guide-the-power-supply.html</guid><pubDate>Fri, 10 Sep 2010 05:33:12 GMT</pubDate></item><item><title>Java 7 : The new try-with-resources statement</title><link>https://baptiste-wicht.com/posts/2010/08/java-7-try-with-resources-statement.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;From the build 105, the compiler and runtime of Java 7 Releases have support for the new form of try : try-with-resources, also called ARM (Automatic Resource Management) blocks. &lt;/p&gt;
&lt;p&gt;This new statement make working with streams and all kind of closeable resources easier. By example, in Java, you can have this kind of code : &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;customBufferStreamCopy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;InputStream&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fis&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;OutputStream&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fos&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;fis&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FileInputStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;fos&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FileOutputStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8192&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;fos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printStackTrace&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fis&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fos&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Closeable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;closable&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;closable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;closable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IOException&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printStackTrace&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A little bit heavy, isn't it ? This is only an example, here the management of exceptions is not good. &lt;/p&gt;
&lt;p&gt;So let's use try-with-resources statement to simplify this code, who becomes : &lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;customBufferStreamCopy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;InputStream&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fis&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FileInputStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;OutputStream&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fos&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FileOutputStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)){&lt;/span&gt;

&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8192&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;fos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printStackTrace&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A lot cleaner, no ? With that code, the resources are automatically closed after the try. In the try resources list, you can declare several resources, but all these resources must implement the java.lang.AutoCloseable interface. &lt;/p&gt;
&lt;p&gt;If you want more informations, about this new statement read &lt;a target="_blank" href="http://blogs.sun.com/darcy/entry/project_coin_updated_arm_spec"&gt;try-with-resources specifications&lt;/a&gt;.&lt;/p&gt;</description><category>Java</category><category>Java 7</category><category>Others</category><category>Releases</category><guid>https://baptiste-wicht.com/posts/2010/08/java-7-try-with-resources-statement.html</guid><pubDate>Tue, 24 Aug 2010 05:30:53 GMT</pubDate></item><item><title>Holidays</title><link>https://baptiste-wicht.com/posts/2010/08/holidays.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;Monday, I will go on holidays for one week. I'll not have internet except on my smartphone, so I'll not post on this blog during one week.&lt;/p&gt;
&lt;p&gt;I will just approve comments and perhaps answer to comments if this is necessary, but this is all.&lt;/p&gt;
&lt;p&gt;So, to next week.&lt;/p&gt;</description><category>Others</category><category>Personal</category><category>The site</category><guid>https://baptiste-wicht.com/posts/2010/08/holidays.html</guid><pubDate>Sun, 15 Aug 2010 10:37:52 GMT</pubDate></item><item><title>15 years birthday of Java (a bit late)</title><link>https://baptiste-wicht.com/posts/2010/05/15-years-birthday-of-java-a-bit-late.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;I didn't notice that earlier, but the 23 May 2010 was the 15 years birthday of Java !&lt;/p&gt;
&lt;p&gt;I started using Java only 5 years ago, but I've always been happy of this language. &lt;/p&gt;
&lt;p&gt;It makes now a long time that we've this wonderful language to develop :)&lt;/p&gt;
&lt;p&gt;Thanks a lot to James Gosling and Sun Microsystems for this great language. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.baptiste-wicht.com/wp-content/uploads/2010/05/duke.png"&gt;&lt;img src="http://www.baptiste-wicht.com/wp-content/uploads/2010/05/duke.png" alt="Duke Java Logo" title="Duke Java Logo" width="255" height="200" class="size-full wp-image-601"&gt;&lt;/a&gt;&lt;/p&gt;</description><category>Java</category><category>Others</category><guid>https://baptiste-wicht.com/posts/2010/05/15-years-birthday-of-java-a-bit-late.html</guid><pubDate>Thu, 27 May 2010 04:18:33 GMT</pubDate></item><item><title>Evernote : A very smart note-book</title><link>https://baptiste-wicht.com/posts/2010/05/evernote-a-very-smart-note-book.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;Like any developer, I write a lot of notes with different tools :&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;A lot of paper&lt;/li&gt;
    &lt;li&gt;Office Word&lt;/li&gt;
    &lt;li&gt;My iPhone&lt;/li&gt;
    &lt;li&gt;My emails&lt;/li&gt;
    &lt;li&gt;Web applications like RememberTheMilk&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I use them depending on what I do and  where I am. But this not a really good way to manage notes. The notes are not centralized and I've not always them when I need them.&lt;/p&gt;
&lt;p&gt;Some days ago, I discovered a new web application than can perhaps solve my problem. This web tool is &lt;a href="http://www.evernote.com/" target="_blank"&gt;Evernote&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The site allows you to store elements on the web or offline in your storage space and organize all the elements like you want. With Evernote, you can :&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Write TODO List&lt;/li&gt;
    &lt;li&gt;Write some notes&lt;/li&gt;
    &lt;li&gt;Send them by email&lt;/li&gt;
    &lt;li&gt;Take screenshot&lt;/li&gt;
    &lt;li&gt;Add photo&lt;/li&gt;
    &lt;li&gt;Capture contents of web pages&lt;/li&gt;
    &lt;li&gt;Record audio records&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But there is more, this service make also Optical Character Recognition (OCR) in your images. So when you take a picture and send them in the Evernote account, the text in the photo is indexed and taken for your next searches. All the text of the other documents is of course also indexed. So with that you can search documents easily.&lt;/p&gt;
&lt;p&gt;Evernote is also more than an web application, it's also a desktop client for Windows and Mac OS. There is also Windows Mobile, Java and soon iPhone versions. With the client versions, you can directly drag and drop content to your account.&lt;/p&gt;
&lt;p&gt;So to resume, Evernote is a kind of aggregator for your content. So after writing something on paper, you can take a picture and add it to your Evernote and then make searches in your content. With the free registration, you have 40MB of upload monthly. To have more upload capacity, you can pay the premium account for 5$/month.&lt;/p&gt;
&lt;p&gt;For more informations, you can consult the &lt;a href="http://www.evernote.com/" target="_blank"&gt;Official site&lt;/a&gt;&lt;/p&gt;</description><category>Others</category><category>Tools</category><guid>https://baptiste-wicht.com/posts/2010/05/evernote-a-very-smart-note-book.html</guid><pubDate>Wed, 19 May 2010 04:32:54 GMT</pubDate></item><item><title>JTheque licensed under Apache License 2.0</title><link>https://baptiste-wicht.com/posts/2010/05/jtheque-licensed-under-apache-license-2-0.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;I decided to change the licence of all the JTheque Projects (The Core, the Utils and all the applications) to &lt;a href="http://www.apache.org/licenses/LICENSE-2.0.html"&gt;Apache Licence 2.0&lt;/a&gt;. The current license was GNU GPL V3. &lt;/p&gt;
&lt;p&gt;I wanted to remove the copyleft clause of the GPL License to make the use of JTheque more simple and more open. For me the copyleft is not really important, I need only the copyright clause. &lt;/p&gt;
&lt;p&gt;So, all the next versions of one of the JTheque Projects will now be made available under the Terms of the Apache License 2.0.&lt;/p&gt;</description><category>Apache</category><category>JTheque</category><category>Others</category><guid>https://baptiste-wicht.com/posts/2010/05/jtheque-licensed-under-apache-license-2-0.html</guid><pubDate>Tue, 04 May 2010 12:49:20 GMT</pubDate></item><item><title>Tip : How to switch from KUbuntu to Ubuntu</title><link>https://baptiste-wicht.com/posts/2010/05/switch-kubuntu-to-ubuntu.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;After installed the new version of &lt;strong&gt;KUbuntu Lucid Lynx&lt;/strong&gt;, I have changed the display manager from &lt;strong&gt;KDE&lt;/strong&gt; (KUbuntu) to &lt;strong&gt;Gnome&lt;/strong&gt; (Ubuntu).&lt;/p&gt;
&lt;p&gt;This is easier than we could think.&lt;/p&gt;
&lt;p&gt;The first thing to do is to install the Ubuntu desktop :&lt;/p&gt;
&lt;pre&gt;sudo apt-get install ubuntu-desktop&lt;/pre&gt;

&lt;p&gt;That will install the Ubuntu Display Manager. You'll be asked for the Display Manager to use, choose gdm (Gnome Display Manager).&lt;/p&gt;
&lt;p&gt;After that, you'll have the Gnome Display Manager, but you've also all the applications of the KUbuntu Desktop distribution.&lt;/p&gt;
&lt;p&gt;To remove them, you can use this command :&lt;/p&gt;
&lt;pre&gt;sudo apt-get remove akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark cdrdao dolphin dragonplayer exiv2 foomatic-db-gutenprint freespacenotifier gdebi-kde gnupg-agent gtk2-engines-qtcurve gwenview hpijs-ppds ibus-qt4 icoutils ijsgutenprint install-package jockey-kde k3b k3b-data kaddressbook kamera kate kbluetooth kcalc kcm-gtk kcm-touchpad kde-window-manager kde-zeroconf kdebase-bin kdebase-data kdebase-plasma kdebase-runtime kdebase-runtime-data kdebase-workspace kdebase-workspace-bin kdebase-workspace-data kdebase-workspace-kgreet-plugins kdegraphics-strigi-plugins kdelibs-bin kdelibs5 kdelibs5-data kdemultimedia-kio-plugins kdepasswd kdepim-groupware kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepim-wizards kdepimlibs-data kdepimlibs5 kdesudo kdm kfind khelpcenter4 klipper kmag kmail kmix kmousetool knm-runtime knotes konqueror konqueror-nsplugins konqueror-plugin-searchbar konsole kontact kopete kopete-message-indicator korganizer kpackagekit kppp krdc krfb krosspython ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-konqueror-shortcuts kubuntu-notification-helper kvkbd kwalletmanager language-selector-qt libakonadiprivate1 libao2 libattica0 libaudio2 libboost-program-options1.40.0 libclucene0ldbl libdbusmenu-qt2 libepub0 libexiv2-6 libflac++6 libibus-qt1 libindicate-qt0 libiodbc2 libk3b6 libkcddb4 libkdcraw8 libkdecorations4 libkdepim4 libkephal4 libkexiv2-8 libkfontinst4 libkipi7 libkleo4 libkonq5 libkonq5-templates libkonqsidebarplugin4 libkopete4 libkpgp4 libkscreensaver5 libksgrd4 libksieve4 libksignalplotter4 libkwineffects1 libkworkspace4 liblastfm0 libmimelib4 libmng1 libmodplug0c2 libmpcdec3 libmsn0.3 libmysqlclient16 libokularcore1 libotr2 libpackagekit-glib2-12 libpackagekit-qt-12 libphonon4 libplasma-applet-system-monitor4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4 libplasmagenericshell4 libpolkit-qt-1-0 libpoppler-qt4-3 libprocesscore4 libprocessui4 libqca2 libqca2-plugin-ossl libqimageblitz4 libqt4-assistant libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-webkit libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libsolidcontrol4 libsolidcontrolifaces4 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 libtag-extras1 libtaskmanager4 libvncserver0 libweather-ion4 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x libzip1 mysql-client-core-5.1 mysql-common mysql-server-core-5.1 network-manager-kde okular okular-extra-backends openoffice.org-kde openoffice.org-style-oxygen oxygen-cursor-theme oxygen-icon-theme oxygen-icon-theme-complete packagekit packagekit-backend-apt phonon phonon-backend-xine pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-kimpanel-backend-ibus plasma-widget-kubuntu-feedback plasma-widget-message-indicator plasma-widget-quickaccess plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo polkit-kde-1 printer-applet python-kde4 python-packagekit python-qt4 python-qt4-dbus python-sip quassel quassel-data shared-desktop-ontologies software-properties-kde soprano-daemon system-config-printer-kde systemsettings ttf-dejavu ttf-dejavu-extra update-manager-kde usb-creator-kde userconfig virtuoso-nepomuk&lt;/pre&gt;

&lt;p&gt;If you're under Karmic Koala (9.10), you must use this command : &lt;/p&gt;
&lt;pre&gt;sudo apt-get remove akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark cdrdao dolphin dragonplayer exiv2 foomatic-db-gutenprint gdebi-kde gnupg-agent gtk2-engines-qtcurve gwenview hpijs-ppds ibus-qt4 ijsgutenprint imagemagick install-package jockey-kde k3b k3b-data kaddressbook kamera kate kcm-gtk kde-icons-oxygen kde-style-qtcurve kde-window-manager kde-zeroconf kdebase-bin kdebase-data kdebase-plasma kdebase-runtime kdebase-runtime-bin-kde4 kdebase-runtime-data kdebase-runtime-data-common kdebase-workspace-bin kdebase-workspace-data kdebase-workspace-kgreet-plugins kdebase-workspace-libs4+5 kdebluetooth kdegraphics-strigi-plugins kdelibs-bin kdelibs5 kdelibs5-data kdemultimedia-kio-plugins kdepasswd kdepim-groupware kdepim-kresources kdepim-runtime kdepim-runtime-data kdepim-runtime-libs4 kdepim-strigi-plugins kdepim-wizards kdepimlibs-data kdepimlibs5 kdesudo kdm kfind khelpcenter4 kipi-plugins klipper kmag kmail kmix kmousetool knotes konq-plugins konq-plugins-l10n konqueror konqueror-nsplugins konqueror-plugin-searchbar konqueror-plugins konsole kontact kopete korganizer kpackagekit kppp krdc krfb ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-artwork-usplash kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-konqueror-shortcuts kvkbd kwalletmanager kwin-style-qtcurve language-selector-qt libakonadiprivate1 libao2 libaudio2 libboost-program-options1.38.0 libclucene0ldbl libepub0 libexiv2-5 libfftw3-3 libflac++6 libindicate-qt0 libjpeg-progs libk3b6 libkabcommon4 libkcddb4 libkdcraw7 libkdecorations4 libkdepim4 libkexiv2-7 libkipi6 libkleo4 libknotificationitem1 libkonq5 libkonq5-templates libkonqsidebarplugin4 libkontactinterfaces4 libkopete4 libkorundum4-ruby1.8 libkpgp4 libksane0 libksieve4 libkwineffects1 liblancelot0 liblastfm0 liblzma0 libmimelib4 libmodplug0c2 libmpcdec3 libmsn0.1 libokularcore1 libotr2 libpackagekit-glib11 libpackagekit-qt11 libplasma3 libpolkit-dbus2 libpolkit-grant2 libpolkit-qt0 libpolkit2 libpoppler-qt4-3 libqca2 libqca2-plugin-ossl libqimageblitz4 libqscintilla2-5 libqt4-assistant libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-phonon libqt4-qt3support libqt4-ruby1.8 libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-webkit libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libruby1.8 libscim8c2a libsmokekde4-2 libsmokeqt4-2 libsoprano4 libstreamanalyzer0 libstreams0 libstrigiqtdbusclient0 libtag-extras1 libtidy-0.99-0 libvncserver0 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x libzip1 mysql-server-core-5.1 okular okular-extra-backends openoffice.org-kde openoffice.org-style-oxygen oxygen-cursor-theme packagekit packagekit-backend-apt phonon-backend-xine pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-googlecalendar plasma-widget-indicatordisplay plasma-widget-kimpanel plasma-widget-kubuntu-qa-feedback plasma-widget-lancelot plasma-widget-networkmanagement plasma-widget-quickaccess plasma-widgets-addons plasma-widgets-workspace policykit printer-applet python-kde4 python-packagekit python-qt4 python-qt4-dbus python-sip4 quassel quassel-data ruby ruby1.8 software-properties-kde soprano-daemon speedcrunch system-config-printer-kde systemsettings ttf-arphic-uming ttf-dejavu ttf-dejavu-extra update-manager-kde update-notifier-kde usb-creator-kde userconfig&lt;/pre&gt;

&lt;p&gt;I hope that will be useful to someone :)&lt;/p&gt;</description><category>Linux</category><category>Others</category><category>Tips</category><guid>https://baptiste-wicht.com/posts/2010/05/switch-kubuntu-to-ubuntu.html</guid><pubDate>Tue, 04 May 2010 04:32:38 GMT</pubDate></item><item><title>Welcome to my new website !</title><link>https://baptiste-wicht.com/posts/2010/03/welcome-to-my-new-website.html</link><dc:creator>Baptiste Wicht</dc:creator><description>&lt;p&gt;Welcome to my new english website :)&lt;/p&gt;
&lt;p&gt;I've moved all my english stuff from Developpez.com to make here a completely english website.&lt;/p&gt;
&lt;p&gt;I hope you'll find here some interesting stuff. I will publish articles and posts about Java, Spring, Swing, OSGi, Hardware and Web and perhaps others technologies.&lt;/p&gt;
&lt;p&gt;Don't hesitate to say me what you think about this website.&lt;/p&gt;</description><category>Others</category><category>Personal</category><category>The site</category><guid>https://baptiste-wicht.com/posts/2010/03/welcome-to-my-new-website.html</guid><pubDate>Wed, 17 Mar 2010 03:21:29 GMT</pubDate></item></channel></rss>