<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CE3C</title>
	<atom:link href="http://www.ce3c.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ce3c.be</link>
	<description>My Projects and Blogsite</description>
	<lastBuildDate>Thu, 24 Nov 2011 15:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Stripping colors &amp; control codes in UnrealIRCd</title>
		<link>http://www.ce3c.be/207-stripping-colors-control-codes-in-unrealircd/</link>
		<comments>http://www.ce3c.be/207-stripping-colors-control-codes-in-unrealircd/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 15:32:05 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=207</guid>
		<description><![CDATA[Apart from the obvious channel mode +S and +c, there's already an Unreal module available that will strip out colors in private messages (called nocolorumode.c). But I wanted a usermode to allow stripping all colors/codes that are being sent to the client. I needed to dig into the available hooks for this (since there is [...]]]></description>
			<content:encoded><![CDATA[<p>Apart from the obvious channel mode +S and +c, there's already an Unreal module available that will strip out colors in private messages (called nocolorumode.c). But I wanted a usermode to allow stripping all colors/codes that are being sent to the client.</p>
<p>I needed to dig into the available hooks for this (since there is no manual available for them). I'll be discussing three of them:</p>
<pre>HOOKTYPE_PRIVMSG (aClient *cptr, aClient *sptr, aChannel *acptr, char *text, int notice)
HOOKTYPE_CHANMSG (aClient *cptr, aClient *sptr, aChannel *acptr, char *text, int notice)
HOOKTYPE_PACKET (aClient *from, aClient *to, char **msg, int *len)</pre>
<p>Nocolorumode.c used HOOKTYPE_PRIVMSG for stripping out colors in PMs. You'd think that HOOKTYPE_CHANMSG would be the logical choice to strip out colors in channel messages.<br />
I've come to understand however that that aproach won't work when using prefixes in PRIVMSG's (like PRIVMSG %#chan :text). When hooking into HOOKTYPE_CHANMSG, it's not possible to know about the prefix it's being sent to.<br />
You could get it by overriding the command, but that's pretty ugly, and in this particular case would mean you end up rewriting the entire m_message function, which is just silly.</p>
<p>It's also not possible to modify the text on a per-user basis. I need some users must receive the message with the colors stripped out, while other users must receive the message in it's untouched form.</p>
<p>There should be a hook that gets executed for every message that is soon to be received by the client, but there is none. The only option left is to strip the colors on the outgoing packet, using HOOKTYPE_PACKET.</p>
<p><a href="http://pastebin.com/raw.php?i=38Rm4iRX">http://pastebin.com/raw.php?i=38Rm4iRX</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/207-stripping-colors-control-codes-in-unrealircd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colored vhosts in UnrealIRCd</title>
		<link>http://www.ce3c.be/199-colored-vhosts-in-unrealircd/</link>
		<comments>http://www.ce3c.be/199-colored-vhosts-in-unrealircd/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 10:24:32 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[ircd]]></category>
		<category><![CDATA[unreal]]></category>
		<category><![CDATA[vhost]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=199</guid>
		<description><![CDATA[If you don't care that it is violating the RFC (like me), you can easily modify the unreal source-code so it will take colored vhosts. In src/s_misc.c, find the valid_host function, and change: if (!isalnum(*p) &#38;&#38; (*p != '_') &#38;&#38; (*p != '-') &#38;&#38; (*p != '.') &#38;&#38; (*p != ':')) to: if (!isalnum(*p) &#38;&#38; [...]]]></description>
			<content:encoded><![CDATA[<p>If you don't care that it is violating the RFC (like me),<br />
you can easily modify the unreal source-code so it will take colored vhosts.</p>
<p>In src/s_misc.c, find the valid_host function, and change:</p>
<blockquote><p>if (!isalnum(*p) &amp;&amp; (*p != '_') &amp;&amp; (*p != '-') &amp;&amp; (*p != '.') &amp;&amp; (*p != ':'))</p></blockquote>
<p>to:</p>
<blockquote><p>if (!isalnum(*p) &amp;&amp; (*p != '_') &amp;&amp; (*p != '-') &amp;&amp; (*p != '.') &amp;&amp; (*p != ':') &amp;&amp; (*p != '\x03') &amp;&amp; (*p != '\x0f'))</p></blockquote>
<p>Recompile.<br />
Now the /chghost function will not complain when changing someone's virtual host to something colorful <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
This also supports the 'off' character (CTRL+O in mIRC). I encourage you to always use this at the end of your colored vhost to prevent bleeding.</p>
<p>This will only allow foreground colors.<br />
If you want background colors, you will have to add (*p != ',').<br />
If you want bolds, you will have to add (*p != '\x02').</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/199-colored-vhosts-in-unrealircd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Counter-Strike 1.6, Windows 7, and lag spikes. The sequel.</title>
		<link>http://www.ce3c.be/179-counter-strike-1-6-windows-7-and-lag-spikes-the-sequel/</link>
		<comments>http://www.ce3c.be/179-counter-strike-1-6-windows-7-and-lag-spikes-the-sequel/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 22:59:49 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=179</guid>
		<description><![CDATA[Honestly I've had a shitload of problems already running Counter-Strike (1.6) lagfree. Important detail is that I'm trying to play wireless. On XP, there was the Wireless Zero Configuration Service that was causing lagspikes (if you're on XP and having lagspikes, check that link ). Now that I am on Windows 7, I'm not sure [...]]]></description>
			<content:encoded><![CDATA[<p>Honestly I've had a shitload of problems already running Counter-Strike (1.6) lagfree. Important detail is that I'm trying to play wireless.<br />
On XP, there was the <a href="http://www.ce3c.be/2009,02,14/resolving-lag-spikes-in-games-over-a-wireless-connection/">Wireless Zero Configuration Service</a> that was causing lagspikes (if you're on XP and having lagspikes, check that link <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).<br />
Now that I am on Windows 7, I'm not sure what to look for. I've done a clean OS install, updated my video card drivers, wlan drivers, but to no avail.</p>
<p>When enabling "net_graph 1" in the Counter-Strike console, I get the following result. The left side is during normal gameplay (a straight green line), and on the right there's a bouncy, interrupted line.</p>
<p><a href="http://www.ce3c.be/wp-content/uploads/2010/09/csgreen.png"><img class="alignnone size-full wp-image-180" title="csgreen" src="http://www.ce3c.be/wp-content/uploads/2010/09/csgreen.png" alt="" width="161" height="95" /></a> <a href="http://www.ce3c.be/wp-content/uploads/2010/09/cspike.png"><img class="alignnone size-full wp-image-181" title="cspike" src="http://www.ce3c.be/wp-content/uploads/2010/09/cspike-e1283808156323.png" alt="" width="163" height="95" /></a></p>
<p>I've set my cvars to:</p>
<pre>cl_updaterate 101
cl_cmdrate 101
rate 20000
max_fps 101</pre>
<p>These are the vars I like, I'm just telling them for information.</p>
<p>I've taken the following steps in the hope to reduce the lagproblems,<br />
I hope something of this will work for you:</p>
<h3>1. Disabling MMCSS</h3>
<p>Multiple forums stated that the lagspikes could be caused by the Multimedia Class Sheduler service.<br />
Run regedit and remove in the entry <em>DependOnService</em> the line that says "MMCSS".</p>
<pre>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Audiosrv</pre>
<p>You will have to reboot after this. But try the rest of the proposed fixes first to save some time.</p>
<h3>2. Disable Network Throttling</h3>
<blockquote><p>Because  multimedia programs require more resources, the Windows  networking  stack implements a throttling mechanism to restrict the  processing of  non-multimedia network traffic to 10 packets per  millisecond.</p></blockquote>
<p>This implies that we should set the rate a bit higher to allow more packets. This seems a bit irrelevant, but I did it anyway.<br />
Modify the following key in your registry, set <em>NetworkThrottlingIndex</em> to FFFFFFFF (hex) or 4294967295 (dec):</p>
<pre>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile</pre>
<p>(thanks to stranger for pointing out that it had to be FFFFFFFF instead of FFFFFF)</p>
<h3>3. Nagle's algorithm</h3>
<blockquote><p>Beyond the obvious settings in Windows or on your router, here’s a list  of tweaks that may help quite a bit. It involves disabling <a href="http://en.wikipedia.org/wiki/Nagle%27s_algorithm">Nagle’s algorithm</a>,  also commonly known as TCP no delay, which is basically an optimization  of network traffic that tries to reduce overall packet volume but can  cause extra latency in the connection. This should work on Windows 7 or  Vista, though the same principle can probably applied to other operating  systems as well.</p></blockquote>
<p>Go to the registry key for your network interface card, it's one of the {XXXX-XXXX-XXXX-XXXX}. Look for one that has 192.168.x.x in it.</p>
<pre>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\{45115C55-0588-4D99-B404-CE3246685EEF}</pre>
<p>Add a new DWORD 32-bit value here, name it <em>TcpAckFrequency</em>, then set it to <strong>1</strong>. Do the same for <em>TCPNoDelay</em>.<br />
This step would require a reboot also. (This is why you shouldn't have rebooted earlier lol.</p>
<h3>4. Disable IPv6</h3>
<p>In the Network and Sharing Center, change the adapter settings of the connection you're using (Properties).<br />
On the Networking tab, remove the tick from the IPv6 box. If there's no difference, you can always tick it again.</p>
<p><span style="text-decoration: underline;">References:</span></p>
<p>http://windows7forums.com/windows-7-games/22315-problem-latency-counter-strike-1-6-a.html</p>
<p>http://social.answers.microsoft.com/Forums/en-US/w7network/thread/af7aaf26-c5e3-478c-b1b8-2b1443d1306b</p>
<p>http://lifeandcode.net/2009/05/reduce-game-network-latency-in-windows-7-or-vista/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/179-counter-strike-1-6-windows-7-and-lag-spikes-the-sequel/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Running Windows 7 natively and in a virtual machine (VirtualBox)</title>
		<link>http://www.ce3c.be/164-running-windows-7-natively-and-in-a-virtual-machine-virtualbox/</link>
		<comments>http://www.ce3c.be/164-running-windows-7-natively-and-in-a-virtual-machine-virtualbox/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 15:47:42 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dualboot]]></category>
		<category><![CDATA[natively]]></category>
		<category><![CDATA[physical partition]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[win7]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=164</guid>
		<description><![CDATA[Do you fancy linux, but have to work with Windows once in a while because there is no linux equivalent available? WINE can not handle the complex program you want to run? Then you may faceing the same problem as me I got tired of switching back and forth. The better solution is to get [...]]]></description>
			<content:encoded><![CDATA[<p>Do you fancy linux, but have to work with Windows once in a while because there is no linux equivalent available?<br />
WINE can not handle the complex program you want to run?<br />
Then you may faceing the same problem as me <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I got tired of switching back and forth. The better solution is to get VirtualBox to run your Windows OS.<br />
(Note: I didn't get this to work for VMWare.)<br />
Let me expound how:</p>
<p><strong>My current setup:</strong><br />
Host OS: Linux Mint 9 Isadora x64<br />
VM OS: Windows 7 x64<br />
Using Oracle VM VirtualBox 3.2.4 (hey! Sun has been taken over!)</p>
<p><strong>! </strong>You're assumed to have installed both your OS'es in dualboot already.<br />
<strong>! </strong>You best know what you're doing, and know that what you're doing may have fatal consequences which I will not be held responsible for <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
<strong>! </strong>This is hardly a tutorial. These are the big lines I followed when setting up the box. Getting the required packages etc is your responsibility.<br />
<strong>! </strong>You will need your Windows 7 CD (altho ISO will do fine too).</p>
<p>First, add yourself to the "disk" and "vboxusers" group. This will allow you to access the other partitions without needing root permissions.<br />
This may be considered dangerous for some reason <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Also logout and back in after doing this. In the examples, I'm the user "cedric".<br />
<code><br />
$ sudo usermod -G disk,vboxusers cedric<br />
</code></p>
<p>Now backup your MBR (Master Boot Record):<br />
(Just run this from your homedirectory or so.)<br />
<code><br />
$ sudo dd if=/dev/sda of=bootrec.mbr bs=512 count=1<br />
</code></p>
<p>Now find out which partitions you have installed Windows on.<br />
Usually you will see a 100MB sized boot partition, and your NTFS partition with Windows 7 on. You need both for the next step!</p>
<p><code>$ fdisk -l<br />
/dev/sda1   *           1          13      102400    7  HPFS/NTFS<br />
/dev/sda2              13       22557   181082112    7  HPFS/NTFS<br />
/dev/sda3           22557       60802   307200001    5  Extended<br />
/dev/sda5           22557       59334   295409664   83  Linux<br />
/dev/sda6           59334       59595     2099589+  82  Linux swap / Solaris<br />
/dev/sda7           59596       60801     9687163+   b  W95 FAT32<br />
</code></p>
<p>We'll now create a Virtual Machine Disk (VMDK) of the partitions we want to use in the VM.<br />
Sometimes you may also want to add extra partitions to have them shared between Linux &#038; the VM.<br />
In my case, the required partitions are sda1 and sda2. I also choose to add sda7.<br />
Note: It's useless to add linux partitions to the VMDK. Windows can not read them anyway, and you don't want to raise the chance of fucking up Linux as well <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code><br />
$ sudo VBoxManage internalcommands createrawvmdk -filename win7.vmdk -rawdisk /dev/sda -partitions 1,2,7 -relative -mbr bootrec.mbr<br />
</code></p>
<p>Now go in VirtualBox and add a new VM for Windows 7 x64. Load win7.vmdk which you created earlier.<br />
In my case I got to deal with permissions problems. Make sure you are the owner of win7.vmdk files and bootrec.mbr.<br />
<code><br />
$ sudo chown cedric:cedric win7* bootrec.mbr<br />
$ sudo chmod 777 win7* bootrec.mbr<br />
</code></p>
<p>If that still doesn't solve the issue, you may have not logged out and logged in again after the first step.<br />
Otherwise, do for all partitions you need:<br />
<code><br />
$ sudo chmod 666 /dev/sda[127]<br />
</code><br />
You may have to repeat this on every boot of the VM.</p>
<p>Now go in the settings for the VM. In the System tab, enable I/O APIC.<br />
When you have done that, it's time to boot up your VM. Startup will most likely fail.<br />
Mount the Windows 7 CD and let it launch startup repair. "Repair installation", not "Install now" <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
The VM may restart and hopefully you will be able to get to your login screen.</p>
<p>Well done!<br />
My congratulations also come directly with a <strong>warning</strong>. Do not attempt to install the VirtualBox tools. In v3.2.4 they make integration work perfectly in the VM, but when running native your mouse and keyboard will go loco.<br />
There are also drivers available to get your audio working (make sure to select AC97 as your audio driver in the VBox settings), get them <a href="http://www.64bitdrivers.com/spoof.php?id=1399">here</a> and install them on your VM.</p>
<p><u>Troubleshooting:</u></p>
<p>If you can't use the first option after "Repair installation" (<a href="http://z.about.com/d/pcsupport/1/0/g/4/-/-/windows-7-startup-repair-5.jpg">screeny</a>), then click the second one "Restore your computer using a system image you've created earlier". An alert will popup, but cancel/ignore/kill it.<br />
Cancel this dialog too, and you will get to a screen that will give you a couple of options (<a href="http://www.mydigitallife.info/wp-content/uploads/2007/08/vista-recovery-options.jpg">screeny</a>).<br />
Open the command prompt and type<br />
<code>$ bootrec.exe /fixmbr</code><br />
Hopefully that fixed a couple of things. Reboot.</p>
<p><u>Kudos:</u></p>
<p><a href="http://forums.virtualbox.org/viewtopic.php?f=2&#038;t=31759">http://forums.virtualbox.org/viewtopic.php?f=2&#038;t=31759</a><br />
<a href="http://www.rajatarya.com/website/taming-windows-virtualbox-vm">http://www.rajatarya.com/website/taming-windows-virtualbox-vm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/164-running-windows-7-natively-and-in-a-virtual-machine-virtualbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cross-compiling QT C++ for windows on linux</title>
		<link>http://www.ce3c.be/152-cross-compiling-qt-c-for-windows-on-linux/</link>
		<comments>http://www.ce3c.be/152-cross-compiling-qt-c-for-windows-on-linux/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 15:28:11 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cross-compile]]></category>
		<category><![CDATA[mingw]]></category>
		<category><![CDATA[mingw32]]></category>
		<category><![CDATA[qmake]]></category>
		<category><![CDATA[QT]]></category>
		<category><![CDATA[xcompile]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=152</guid>
		<description><![CDATA[I've been trying to get cross-compiling to work on my linux box for quite some time now. Now that it's finally working, I decided it was something that had to be shared I wanted to cross-compile to build nightlies for a new, open-source and cross-platform p2p application To be clear, I'm not trying to write [...]]]></description>
			<content:encoded><![CDATA[<p>
<div>I've been trying to get cross-compiling to work on my linux box for quite some time now.<br />
Now that it's finally working, I decided it was something that had to be shared <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </div>
<div>I wanted to cross-compile to build nightlies for a new, open-source and cross-platform p2p application <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
To be clear, I'm not trying to write a full tutorial, just some basic guidelines to get you started.</div>
<p></p>
<div><strong>Step 1: Set up a MinGW cross-compile environment</strong></div>
<p></p>
<div>Normally this would take some time, but you can get a script that does it all for you from <a href="http://www.mingw.org/wiki/LinuxCrossMinGW">http://www.mingw.org/wiki/LinuxCrossMinGW</a>.</div>
<p></p>
<div><strong>$</strong> sh x86-mingw32-build.sh</div>
<div>Follow the steps on your screen, this should be straight-forward.</div>
<div>For this guide, I assume you have installed MinGW in /home/user/mingw32/.</div>
<p></p>
<div><strong>Step 2: Compile QT</strong></div>
<p></p>
<div>We have two options here:</div>
<div>- Cross-compile QT on linux: don't. It'll take you too much time. There is a guide that covers this pretty well though on <a href="http://divided-mind.blogspot.com/2007/09/cross-compiling-qt4win-on-linux.html">Divided Mind</a>. It's for an older QT version, I didn't get it to work.</div>
<div>- Pre-compile QT on windows: this will take you far less time <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This is what I'll try to cover a bit:</div>
<div>Install the SDK on your windows box (if you have QT Creator installed, you have the SDK already).</div>
<div>For me, QT was installed in C:\Qt\2010.02.1\qt. (Mind the qt subdirectory!) Now copy this whole directory and transfer it to your linux box.<br />
I will assume you have put the contents in /home/user/qtwin/, which should contain an "include" and "lib" directory.</div>
<div><strong><span style="font-weight: normal;"><br />
</span></strong></div>
<p></p>
<div><strong>Step 3: Modding QT on linux</strong></div>
<p></p>
<div>You should have QT installed on your linux box as well. Amongst the lines I executed on my debian box were:</div>
<div><strong>$</strong> apt-get build-dep qt4-qmake</div>
<p></p>
<div>I also needed this one:</div>
<div><strong>$</strong> apt-get install libphonon-dev</div>
<p></p>
<div>Now find out where the QT "mkspecs" directory is located on your linux box.</div>
<div><strong>$</strong> find / -type d -name "mkspecs"</div>
<div>This should at least return the directory where APT installed QT, and the directory that you transfered to /home/user/qtwin.</div>
<div>The APT directory was /usr/share/qt4/mkspecs in my case. Changedir to it, now:</div>
<p></p>
<div><strong>$</strong> cp -r win32-g++ win32-x-g++</div>
<div>The win32-g++ directory (and now win32-x-g++ too) contain a file called qmake.conf. It tells QT which tools to use for compiling.</div>
<div>Standard, it uses windows tools (like "xcopy" and "del"). You have to replace the ones in win32-x-g++/qmake.conf with their linux counterpart.</div>
<div>You'll also have to modifiy include and library dirs, and make it use the MinGW tools.<br />
You can find my own modded qmake.conf on <a href="http://pastebin.com/raw.php?i=nmGyY7Hy">pastebin</a> (it isn't perfect, but will give you an idea). This is a very important step, so make sure to get it right <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<p></p>
<div><strong>Step 4: Compiling your application</strong></div>
<p></p>
<div>Yes, we're here already <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div>Changedir to your project directory and execute:</div>
<div><strong>$</strong> qmake -spec win32-x-g++</div>
<p></p>
<div>So generally compile as you do usually but with another -spec flag.</div>
<div><strong>$</strong> make</div>
<div>And, see if it works!</div>
<p></p>
<div><span style="text-decoration: underline;">Kudos:</span></div>
<div><span style="text-decoration: underline;"><br />
</span></div>
<div>Links that helped me a lot:</div>
<div><a href="http://silmor.de/39">http://silmor.de/39 </a></div>
<div><a href="http://divided-mind.blogspot.com/2007/09/cross-compiling-qt4win-on-linux.html">http://divided-mind.blogspot.com/2007/09/cross-compiling-qt4win-on-linux.html</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/152-cross-compiling-qt-c-for-windows-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up SSH (or SCP/SFTP) to remember your password</title>
		<link>http://www.ce3c.be/144-setting-up-ssh-or-scpsftp-to-remember-your-password/</link>
		<comments>http://www.ce3c.be/144-setting-up-ssh-or-scpsftp-to-remember-your-password/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 19:54:44 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[authored_keys]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[private key]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=144</guid>
		<description><![CDATA[If you are tired of inputting your password each time for a SSH or SCP connection or if you're setting up a cronjob to transfer files, this will guide you through the process: The LOCAL machine is the machine that inits the connection for SSH / SCP. The REMOTE machine is the machine that accepts [...]]]></description>
			<content:encoded><![CDATA[<p>If you are tired of inputting your password each time for a SSH or SCP connection or if you're setting up a cronjob to transfer files, this will guide you through the process:</p>
<p>The <em>LOCAL</em> machine is the machine that inits the connection for SSH / SCP.<br />
The <em>REMOTE</em> machine is the machine that accepts the connection.</p>
<p>The following command generates a private and a public key. The private key is for your eyes only,<br />
the public key goes to the remote machine.</p>
<p><em>LOCAL $</em> <strong>ssh-keygen -t rsa -N ""</strong></p>
<p>Now execute:</p>
<p><em>LOCAL $</em> <strong>scp ~/.ssh/id_rsa.pub USER@REMOTE:.ssh/</strong></p>
<p>This will copy the public key to the relative .ssh/ dir in your remote user's homedir.<br />
(And ofcourse you have to substitute the needed fields.)</p>
<p>Now login to you remote server with SSH. I assume you can handle this step yourself.<br />
Then execute:</p>
<p><em>REMOTE $</em> <strong>cat ~/.ssh/id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys</strong></p>
<p>That will add the id_rsa.pub file to the authorized keys-file on the remote machine.<br />
You can safely remove the id_rsa.pub file now if you wish</p>
<p><em>REMOTE $</em> <strong>rm ~/.ssh/id_rsa.pub</strong></p>
<h3><strong><span style="text-decoration: underline;">TROUBLESHOOTING</span></strong></h3>
<p>Well, in fact, it's not always that easy. If you've completed these steps, and the remote server still keeps asking for a password, you might want to pay attention to the following:</p>
<p>In some cases (and it must've been annoying me for at least two hours now,) people forget to chmod the authorized_keys file or .ssh directory.<br />
That can be easily fixed with this command:</p>
<p><em>REMOTE $</em> <strong>chmod -R 700 ~/.ssh</strong></p>
<p>In my case, my homedir was chmodded to 707 (weird uh..). However, the SSH server didn't seem to like that and therefor I changed it back to 755.</p>
<p><em>REMOTE $</em> <strong>chmod 755 ~</strong></p>
<p>Depending on your SSH version (or if compatibility mode is not enabled in the SSH server settings), you might have to use <strong>authorized_keys2</strong> instead of authorized_keys. Newer SSH-server versions will look in both of these files, I've been told.</p>
<p>My last remarks: if you're trying to login as root, you have to explicitly enable this in the SSH server on the remote machine. Open etc/ssh/sshd_config and change PermitRootLogin to yes. Some users using empty passwords will also have to set PermitEmptyPasswords to yes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/144-setting-up-ssh-or-scpsftp-to-remember-your-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Vikings tetheren naar laptop</title>
		<link>http://www.ce3c.be/140-mobilevikings-tetheren-laptop-gsm/</link>
		<comments>http://www.ce3c.be/140-mobilevikings-tetheren-laptop-gsm/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 17:31:34 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[adapter]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[mobile internet]]></category>
		<category><![CDATA[mobile vikings]]></category>
		<category><![CDATA[mvno]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[proximus]]></category>
		<category><![CDATA[sim]]></category>
		<category><![CDATA[tethering]]></category>
		<category><![CDATA[verbinding]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=140</guid>
		<description><![CDATA[Ik ben jarenlang trouwe klant geweest bij Proximus: ik kocht elke maand braaf een herlaadkaart van 15 euro om mijn bonus van 1000 gratis sms'en te blijven behouden, die je kreeg bij het Generation tariefplan. Ik ben echter dat type klant die net iets meer verwacht van zijn operator: mobile internet om te beginnen en [...]]]></description>
			<content:encoded><![CDATA[<p>Ik ben jarenlang trouwe klant geweest bij Proximus: ik kocht elke maand braaf een herlaadkaart van 15 euro om mijn bonus van 1000 gratis sms'en te blijven behouden, die je kreeg bij het Generation tariefplan. Ik ben echter dat type klant die net iets meer verwacht van zijn operator: mobile internet om te beginnen en een API o.i.d. <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Voor mobile internet betaal je je helaas blauw bij Proximus. Over een API was nergens iets terug te vinden, en hun klantendienst was enkel bereikbaar via telefoon. Op heel het internet heb ik geen enkel e-mailadres teruggevonden van Proximus.</p>
<p>Dat (en nog enkele kleine ergernissen) dwongen me om over te schakelen naar een andere operator (hoewel ik verder tevreden was van Proximus).<br />
Zodoende ben ik nu lid van <a href="http://www.mobilevikings.com" target="_blank">Mobile Vikings</a>, een nieuwe gsm operator in België. Zij benutten het netwerk van Base om hun diensten aan te bieden. Ze zijn een MVNO ofwel Mobile Virtual Network Operator.</p>
<p>Voor elke 15 euro die je herlaadt bij Mobile Vikings krijg je maar liefst 1000 SMS'en en <strong>1 GB datavolume</strong>!<br />
Er zijn geen abonnementskosten, en je kan je kaart herladen via PayPal / overschrijving / Ogone.<br />
Als je je huidig nummer wil behouden, ontvang je je nieuwe SIM-kaart zelfs gratis <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Verder zijn ze ook druk bezig met hun API (waarvoor enkele sympathisanten al wat apps hebben gemaakt). Dat is voor mij een groot pluspunt.</p>
<p>Vanaf m'n nieuwe SIM-kaart ontvangen, geactiveerd en opgeladen was, ging ik the beauty booty dan ook meteen eens uitproberen!<br />
Ik moest eerst m'n gsm nog instellen (access point name e.d.) maar nadat die klus geklaard was kon ik meteen op internet.</p>
<p>In eerste plaats was ik echter overgeschakeld om de internetverbinding te kunnen tetheren naar mijn laptop. (Daarmee kan je dus surfen in de auto, op de trein, overal.)</p>
<blockquote><p>Tethering in draadloze communicatie is de mogelijkheid om een apparaat zonder internetverbinding (zoals desktop, notebook of laptop) aan te sluiten op een mobiel apparaat (zoals gsm of PDA) met mobiel internet om zo toegang tot internet te verschaffen aan het apparaat zonder internetverbinding. (Wikipedia)</p></blockquote>
<p>Toen ik een nieuwe bluetooth adapter instelde op m'n laptop, wou die helaas niet direct werken... dus hoe loste ik dat op? <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Vanaf hier ga ik ervan uit dat je internet werkend gekregen op je gsm (in mijn geval een Nokia 3120 classic), indien dat niet het geval is, zijn daar tutorials voor te vinden op de site van Mobile Vikings zelf <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Welnu, er is altijd te mogelijk om aan de slag te gaan met software bloat zoals de Nokia PC Suite, maar hier doe ik het even op de propere manier:<br />
Als je gsm via bluetooth verbonden is met de computer en de bluetooth modem bij je Netwerken/Adapters staat, kun je normaal gesproken op die manier verbinden met internet. Helaas is dat in de realiteit niet zo. Wanneer ik probeer te verbinden krijg ik fout 777 naar mijn hoofd gesmeten: "De verbindspoging is mislukt omdat de modem (of een ander verbindgsapparaat) op de externe computer niet werkt."</p>
<p>Dit valt gelukkig heel makkelijk op te lossen! Vul voor zowel de gebruikersnaam als het wachtwoord "web" in. Bij het telefoonnummer zet je dan <strong>*99***1#</strong>. Tadaam <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  That works like a charm! De 1 in de code staat voor de standaardinstellingen op je gsm waarmee hij probeert te verbinden (als je met je gsm op internet kan, moet dit dus ook werken). Verder zou ook de code <strong>*99#</strong> moeten werken indien je een data kabel (usbkabel) gebruikt om je gsm aan te koppelen op je pc.</p>
<p>Toen dat allemaal achter de rug was, ging ik even naar speedtest.net uit nieuwsgierigheid naar de downloadsnelheid.<br />
Geklokt op 25KB/s viel dat al bij al goed mee voor mobile internet! MV heeft momenteel slechts een Edge netwerk, maar de upgrade naar 3G in januari komt dichterbij, en de hogere snelheden dus ook <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/140-mobilevikings-tetheren-laptop-gsm/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Unhiding passwords masked behind asterisks</title>
		<link>http://www.ce3c.be/132-unhiding-passwords-masked-behind-asterisks/</link>
		<comments>http://www.ce3c.be/132-unhiding-passwords-masked-behind-asterisks/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 16:11:49 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[asterixes]]></category>
		<category><![CDATA[auto-complete]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[forgot]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[revealer]]></category>
		<category><![CDATA[saved]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=132</guid>
		<description><![CDATA[Seen this field below before? Can't you remember what you used as a password, because it was saved and auto-completed by your browser? It came to my attention that many people forget passwords from time to time. Blame our human nature. This post is especially for the forgetful between us. Don't download an asterisk / [...]]]></description>
			<content:encoded><![CDATA[<p>Seen this field below before? Can't you remember what you used as a password, because it was saved and auto-completed by your browser?</p>
<form>
<input type="password" value="asterisks" /></form>
<p>It came to my attention that many people forget passwords from time to time. Blame our human nature. This post is especially for the forgetful between us.<br />
Don't download an asterisk / password revealer yet, because you can do this without any software at all.</p>
<p>Using a simple javascript one-liner we can recover the lost password by displaying an alert for each password on the page.<br />
Go ahead and try this code. It should display "asterisks" (or whatever you altered the password box with):</p>
<p><a href="javascript:f=document.body.getElementsByTagName(&quot;input&quot;);for(i=0;i&lt;f.length;i++){try{if(f[i].getAttribute(&quot;type&quot;)==&quot;password&quot;)alert(&quot;Password: &quot;+f[i].value)}catch(e){}};void(0);"><span style="color: #993300;">javascript:f=document.body.getElementsByTagName("input");for(i=0;i&lt;f.length;i++){try{if(f[i].getAttribute("type")=="password")alert("Password: "+f[i].value)}catch(e){}};void(0);</span></a></p>
<p>For those who are interested, I will dissect that line below:<br />
First we can rewrite the same line as:</p>
<p><span style="color: #993300;">inputElements = document.body.getElementsByTagName("input");<br />
for(i=0; i&lt;inputElements.length; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;try<br />
</span><span style="color: #993300;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #993300;">{<br />
</span><span style="color: #993300;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #993300;">if(f[i].getAttribute("type")=="password")<br />
</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #993300;">alert("Password: "+f[i].value)<br />
</span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #993300;">} catch(e) {}<br />
};<br />
void(0);</span></p>
<p>We collect all input elements with the line <span style="color: #993300;">inputElements = document.body.getElementsByTagName("input");</span><br />
Next, we loop through all the elements using the for-statement.<br />
That code is surrounded by a try/catch-block to avoid errors (which I experienced in IE).<br />
If an input element has the password-type, an alert will show up with the element value.</p>
<p><span style="color: #993300;"> </span></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 173px; width: 1px; height: 1px;"><a href="javascript:f=document.body.getElementsByTagName(&quot;input&quot;);for(i=0;i&lt;f.length;i++){try{if(f[i].getAttribute(&quot;type&quot;)==&quot;password&quot;)alert(&quot;Password: &quot;+f[i].value)}catch(e){alert(e)}};void(0);"><span style="color: #993300;">for(i=0;i&lt;f.length;i++){try{if(f[i].getAttribute("type")=="password")alert("Password: "+f[i].value)}catch(e){alert(e)}};void(0);</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/132-unhiding-passwords-masked-behind-asterisks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell script for server status</title>
		<link>http://www.ce3c.be/128-shell-script-for-server-status/</link>
		<comments>http://www.ce3c.be/128-shell-script-for-server-status/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 01:51:14 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[memory usage]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server status]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[uptime]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=128</guid>
		<description><![CDATA[This site is now hosted on a brand new server! It's (again) a VPS from HostEurope, located in Germany. We had to move our business because the old server with its 256M dedicated RAM wasn't sufficient for our needs anymore But hey! we now have: 5 terabyte monthly bandwidth! (five times what we had earlier) [...]]]></description>
			<content:encoded><![CDATA[<p>This site is now hosted on a brand new server! It's (again) a VPS from HostEurope, located in Germany.<br />
We had to move our business because the old server with its 256M dedicated RAM wasn't sufficient for our needs anymore <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>But hey! we now have:</p>
<ul>
<li>5 terabyte monthly bandwidth! (five times what we had earlier)</li>
<li> 16 CPU cores Intel Nehalem @ 2.27 Ghz! (sixteen times what we had earlier)</li>
<li>1024M dedi / 2048M shared! (four times what we had earlier)</li>
<li>25GB diskspace (the double of what we had earlier)</li>
</ul>
<p>Not that bad if you ask me <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, with those new fancy features, I decided to put a modest <a href="http://www.sharpserv.net" target="_blank">server status page (sharpserv.net)</a>. (That's my first logo by the way!)<br />
I couldn't find any php functions that would display server statistics (except for phpinfo())... so what we learned at university became suddenly very helpful: shell scripting!</p>
<p>I know this is just a piece of cruft, but it's perfect for what I needed! (eg. a regex would've been better)<br />
This is helper function that will allow you to get the part of the string after a particular string in that string :p<br />
First of all: <strong>WordPress fucks up the quotes</strong> so make sure you use single or double quotes where it's needed.</p>
<blockquote><p><span style="color: #993300;">function after ($this, $inthat) </span><span style="color: #993300;">{</span><span style="color: #993300;"><br />
</span><span style="color: #993300;"> </span><span style="color: #993300;"> if (!is_bool(strpos($inthat, $this)))</span><span style="color: #993300;"><br />
</span><span style="color: #993300;"> return substr($inthat, strpos($inthat,$this)+strlen($this));</span><span style="color: #993300;"><br />
</span><span style="color: #993300;">}</span></p></blockquote>
<h4>Displaying the uptime of the server</h4>
<p>(This is <span style="text-decoration: underline;">not</span> the uptime of Apache but of the server!)</p>
<blockquote><p><span style="color: #993300;">$data = shell_exec('uptime');</span></p>
<p><span style="color: #993300;">$uptime = after(' up ', $data);</span><span style="color: #993300;"><br />
</span><span style="color: #993300;">$uptime = explode(',', $uptime);</span><span style="color: #993300;"><br />
</span><span style="color: #993300;"> $uptime = $uptime[0].', '.$uptime[1];<br />
</span><span style="color: #993300;"><br />
</span><span style="color: #993300;">echo "Uptime: $uptime";</span></p></blockquote>
<h4>Displaying the server load</h4>
<p>(we used the $data variable from uptime here)</p>
<blockquote><p><span style="color: #993300;">echo "Load: " . after("load average: ", $data);</span></p></blockquote>
<h4>Displaying the free and used memory</h4>
<blockquote><p><span style="color: #993300;">$data = shell_exec('free -m | grep "Mem" | sed "s/[ ]\+/ /g"');<br />
$mem = explode(" ", $data);<br />
echo "&lt;tr&gt;&lt;td class='a'&gt;&lt;u&gt;Memory:&lt;/u&gt;&lt;/td&gt;&lt;td&gt;".$mem[2]."M used / ".$mem[3]."M free&lt;/td&gt;&lt;/tr&gt;";</span></p></blockquote>
<p><em>shell_exec</em> will execute the following commands:</p>
<ul>
<li><em>free</em> : to get the available free memory/buffers/cache/swap</li>
<li><em>grep</em> : to keep only the line that displays the free memory</li>
<li><em>sed</em> : to remove surplus spaces</li>
</ul>
<p>I used the <em>explode</em> function in php to extract the free and used memory.</p>
<p>I've rly got a feeling we're starting to learn useful things at uni!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/128-shell-script-for-server-status/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Teksten Latijn: Cicero, Tusculanae disputationes, liber V §1-11</title>
		<link>http://www.ce3c.be/99-teksten-latijn-cicero-tusculanae-disputationes/</link>
		<comments>http://www.ce3c.be/99-teksten-latijn-cicero-tusculanae-disputationes/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 19:19:35 +0000</pubDate>
		<dc:creator>ce3c</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cicero]]></category>
		<category><![CDATA[latijn]]></category>
		<category><![CDATA[laus philosophiae]]></category>
		<category><![CDATA[liber]]></category>
		<category><![CDATA[teksten]]></category>
		<category><![CDATA[tusculanae disputationes]]></category>
		<category><![CDATA[vertaling]]></category>

		<guid isPermaLink="false">http://www.ce3c.be/?p=99</guid>
		<description><![CDATA[Opnieuw een vertaling van één van de teksten. Ze blijft redelijk dicht bij het Latijnse origineel Cicero, Tusculanae disputationes, liber V §1-11 1) Deze vijfde dag, Brutus, zal een einde maken aan de Tusculaanse gesprekken, de dag waarop er door ons is gediscussieerd over dat onderwerp dat jij van alle onderwerpen het meest waardeert. Ik [...]]]></description>
			<content:encoded><![CDATA[<p>Opnieuw een vertaling van één van de teksten. Ze blijft redelijk dicht bij het Latijnse origineel <img src='http://www.ce3c.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>Cicero, Tusculanae disputationes, liber V §1-11</h3>
<p>1) Deze vijfde dag, Brutus, zal een einde maken aan de Tusculaanse gesprekken, de dag waarop er door ons is gediscussieerd over dat onderwerp dat jij van alle onderwerpen het meest waardeert. Ik heb immers gemerkt dat het jou ten volle aanstaat zowel op grond van dat boek dat je zeer nauwgezet naar mij geschreven hebt, als op grond van jouw vele gesprekken, dat de virtus aan zichzelf genoeg heeft om gelukkig te leven. Hoewel het moeilijk is dat goed te keuren wegens de zo verschillende en zo vele kwellingen van het lot, is het toch van die aard dat men moeite moet doen om het des te makkelijker goed te keuren. Er is immers niet van alles dat in de filosofie behandeld wordt dat ernstiger en schitterender genoemd wordt.</p>
<p>2) Want aangezien deze zaak hen die zich als eersten aan de leer van de filosofie wijdden ertoe heeft aangezet om zich geheel te verdiepen in het zoeken naar de beste levensomstandigheden na alle problemen achteruit te stellen, hebben ze zeker en vast zo'n grote zorg en moeite besteed aan die studie in de hoop om gelukkig te leven. Indien ze de virtus uitgevonden hebben en vervolmaakt hebben en als er voldoende bescherming is in de virtus om gelukkig te leven, wie is het dan die meent dat het werk van het filosoferen niet op een schitterende wijze zowel door hen is gegrondvest als door ons is overgenomen? Maar indien de virtus onderworpen is aan verscheidene en onzekere lotgevallen als slavin van het lot en ze niet zo'n grote krachten heeft dat ze zichzelf kan beschermen, vrees ik dat we niet zozeer moeten steunen op het vertrouwen in de virtus in de hoop om gelukkig te leven, dan wel dat we schijnbaar moeten verlangen om gelukkig te leven.</p>
<p>3) Wanneer ik evenwel bij mezelf die lotgevallen overweeg waarbij het lot me hevig heeft gekweld dan begin ik soms deze stelling te wantrouwen en bang te worden voor de zwakheid en broosheid van het menselijk geslacht. Ik vrees immers dat de natuur, toen ze aan ons zwakke lichamen gegeven had en daaraan zowel ongeneeslijke ziektes als ondraaglijke pijnen had toegevoegd, ons ook geesten gegeven heeft die zowel onderhevig zijn aan lichamelijke pijnen als afzonderlijk nauw verbonden zijn met hun eigen angsten en pijnen.</p>
<p>4) Maar op dit punt berisp ik mezelf namelijk dat ik een oordeel vel over de kracht van de virtus op grond van de zwakheid van anderen en misschien op onze zwakheid en niet op grond van de virtus zelf. Die immers, als er tenminste iets is zoals de virtus, een twijfel die jouw oom, Brutus, weggenomen heeft, houdt alles wat op een mens kan vallen onder zich <span style="color: #888888;">(relativeert alles wat een mens kan overkomen)</span>, en terwijl ze daarop neerkijkt, minacht ze de menselijke lotgevallen en terwijl ze vrij is van elke fout, meent ze dat niets op haar betrekking heeft behalve haarzelf. Wij echter, vergroten al onze tegenslagen door angst zowel wanneer ze op ons afkomen als wanneer ze er zijn door onze droefheid, en we veroordelen liever de natuur der dingen dan onze eigen vergissing.</p>
<p>5) Maar elke verbetering van zowel deze vergissing als van onze overige gebreken en fouten moet gevraagd worden aan de filosofie. Toen onze wil en belangstelling ons van jongsaf aan gedreven had naar haar geborgenheid, hebben we in deze zware lotgevallen onze toevlucht gezocht naar dezelfde haven waaruit we weggevaren waren nadat we heen en weer geslingerd waren door de zware storm. O filosofie, leidster van het leven, naspeurster van de virtus en verdrijfster van de ondeugden! Wat zouden niet alleen wij, maar in één woord het leven van de mensen kunnen geweest zijn zonder jou? Jij hebt steden voortgebracht en  hebt verspreidde mensen samengeroepen in een levensgemeenschap, jij hebt ze onderling verbonden, eerst met woningen, vervolgens met huwelijken en dan met een gemeenschappelijk schrift en taal, jij bent de uitvindster van de wetten geweest, de meesteres van de zeden en de wetenschap, tot jou zoeken we toevlucht, aan jou vragen we hulp, aan jou leveren we ons over, zoals vroeger grotendeels, zo nu door en door en helemaal. Eén dag echter die goed en volgens jouw voorschriften is doorgebracht, moet men verkiezen boven de onsterfelijkheid van diegenen die fouten maken. Wiens hulp zouden we dus liever gebruiken dan die van jou? Jij die zowel de rust van het leven geschonken hebt en de angst voor de dood weggenomen hebt.</p>
<p>6) En in plaats daarvan dat de filosofie in elk geval geprezen wordt in dezelfde mate als ze zich verdienstelijk gemaakt heeft tegenover het leven van de mensen, is ze veeleer door de meesten verwaarloosd en wordt ze door velen zelfs afgekeurd. Durft iemand de ouder van het leven te berispen en zich bezoedelen aan oudermoord en zo goddeloos ondankbaar te zijn om haar te beschuldigen die hij zou moeten vrezen zelfs als hij haar niet minder had kunnen begrijpen? Maar, zoals ik meen, bestaat deze vergissing en deze dikke nevel die zich uitgebreid heeft over de geesten van ongeleerden, omdat ze niet zo ver kunnen terugkijken en omdat ze niet menen dat diegenen door wie het leven van de mensen als eerste onderricht is, filosofen geweest zijn.</p>
<p>7) Hoewel we zien dat die zaak zeer oud is, toch bekennen we dat de naam recent is. Want wie kan weliswaar ontkennen dat de wijsheid zelf niet alleen in werkelijkheid oud is, maar ook wat betreft de naam? Door de kennis van de goddelijke en menselijke zaken, en de beginselen van de oorzaken van elke zaak, verwierf ze deze zeer mooie naam bij de ouden. [...]</p>
<p>8<b></b>) [...] In hun voetspoor vervolgens werden allen die zich toelegden op de beschouwing van de dingen als wijzen beschouwd en zo genoemd. Die naam van hen heeft zich verspreid helemaal tot aan de tijd van Pythagoras. Men vertelt dat die naar Philius gekomen is, zoals de leerling van Plato schrijft, Ponticus Heraclides, een geleerd man bij uitstek, en dat hij met Leon, de leider van de inwoners van Philius, bepaalde onderwerpen geleerd en uitvoerig besproken heeft. Toen Leon zijn verstand en welsprekenheid bewonderd had, vroeg hij op welke wetenschap hij het meest vertrouwde. Maar deze antwoordde dat hij in elk geval geen enkele wetenschap kende, maar dat hij een filosoof was. Leon die verwonderd is over de nieuwigheid van de naam vroeg wie dan toch filosofen waren, en wat het verschil is tussen hen en de overigen.</p>
<p>9) Pythagoras echter antwoordde dat het leven van de mensen leek te gelijken op die markt die gehouden werd met de grootste luister van spelen met een toeloop van heel Griekenland. Want zoals daar sommigen, nadat ze hun lichaam geoefend hebben, de roem en de adellijke stand nastreven verleend door de overwinningskrans, en zoals anderen geleid worden door de winst en het profijt van kopen en verkopen, zoals er verder een bepaalde soort van diegenen is -en dat is veruit de meest edele- die noch applaus noch winst zoeken, maar die komen om nauwgezet te doorzien wat er zich afspeelt en hoe. Eveneens dienen sommigen van ons de roem, anderen het geld, wij die als het ware vertrokken zijn naar een bepaalde toeloop van een markt vanuit één of andere stad, zo ook vanuit een ander leven en natuur naar dit leven. Diezelfden waren zeldzaam die na alle andere zaken niets waard geacht te hebben, de natuur der dingen nauwgezet te bekijken. Dezen noemden zich wijsgeren (dat zijn immers filosofen). En zoals het daar het voornaamst is te kijken zonder iets voor zich te verwerven, zo overtreffen in het leven de beschouwing en de kennis der dingen veruit alle streefdoelen.</p>
<p>10) Pythagoras echter was niet alleen de uitvinder van de naam, maar heeft ook het vakterrein zelf uitgebreid. Toen hij was aangekomen in Philius in Italië na dit gesprek, bracht hij tot eer en aanzien dat Griekenland, dat groot genoemd werd, zowel privaat en publiek door uiterst voortreffelijke instellingen en wetenschappen. Over de leer van deze zou er misschien een andere tijd zijn om erover te spreken. Maar van de oude filosofie helemaal tot aan Socrates, die de leerling was geweest van Archelaum of Anaxagora, werden de wiskunde en de theorie van de beweging behandeld, en vanwaar alles ontstond en waarheen alles terugviel. En nauwgezet werden door hen de grootte van de sterren, de tussenruimten, de banen en het hele heelal onderzocht. Socrates echter riep de filosofie als eerste uit de hemel naar beneden en plaatste ze in de steden en bracht ze zelfs binnen in de huizen en hij dwong zich om zich vragen te stellen over het leven, de zeden, en het goede en het kwade.</p>
<p>11) Zijn veelzijdige manier van spreken, verscheidenheid van onderwerpen en de grootheid van zijn verstand, die zijn vereeuwigd door de overlevering en geschriften van Plato, heeft meerdere generaties van oneens zijnde filosofen doen ontstaan, waaruit wij bij voorkeur die strekking hebben gevolgd, die zoals wij meenden Socrates gebruikt heeft, namelijk dat we onze eigen mening verhullen, anderen van een vergissing af helpen en in alle discussies zoeken naar wat het meest gelijkt op de waarheid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ce3c.be/99-teksten-latijn-cicero-tusculanae-disputationes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

