<?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>Cosninix</title>
	<atom:link href="http://www.cosninix.com/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cosninix.com/wp</link>
	<description>The @woenz blog</description>
	<lastBuildDate>Tue, 31 Jan 2012 10:10:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>getting ruby, rails, passenger on my centos box</title>
		<link>http://www.cosninix.com/wp/2011/01/getting-ruby-rails-passenger-on-my-centos-box/</link>
		<comments>http://www.cosninix.com/wp/2011/01/getting-ruby-rails-passenger-on-my-centos-box/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 01:22:36 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cosninix.com/wp/?p=48</guid>
		<description><![CDATA[Do not yum for ruby, cause you&#8217;ll get 1.8.5. Follow these steps to get everything installed: http://www.catapult-creative.com/2009/02/04/installing-rails-on-centos-5/ Then create a passenger virtualhost: &#60;VirtualHost *:80&#62; DocumentRoot /var/www/railstest/public ServerName railstest.cosninix.com RailsBaseURI    / RailsEnv development &#60;Directory "/var/www/railstest/public"&#62; allow from all Options -MultiViews &#60;/Directory&#62; &#60;/VirtualHost&#62; Watch:  railsEnv is mandatory!  This is not in the passenger doc but gives you [...]]]></description>
			<content:encoded><![CDATA[<p>Do not yum for ruby, cause you&#8217;ll get 1.8.5.<br />
Follow these steps to get everything installed: <a href="http://www.catapult-creative.com/2009/02/04/installing-rails-on-centos-5/">http://www.catapult-creative.com/2009/02/04/installing-rails-on-centos-5/</a></p>
<p>Then create a passenger virtualhost:</p>
<pre>&lt;VirtualHost *:80&gt;</pre>
<pre> DocumentRoot /var/www/railstest/public</pre>
<pre> ServerName railstest.cosninix.com</pre>
<pre> RailsBaseURI    /</pre>
<pre> RailsEnv development</pre>
<pre> &lt;Directory "/var/www/railstest/public"&gt;</pre>
<pre> allow from all</pre>
<pre> Options -MultiViews</pre>
<pre> &lt;/Directory&gt;</pre>
<pre>&lt;/VirtualHost&gt;</pre>
<p>Watch:  railsEnv is mandatory!  This is not in the passenger doc but gives you a 500-internal server error if missing.</p>
<p>Now go to /var/www and create your rails app (and use mysql as well)</p>
<p>rails new railstest -d mysql</p>
<p>restart httpd and we should see the generated index.html, but that is still static html processed so no rails nor ruby is actually used.</p>
<p>Now remove index.html from railstest/public and generate a test controller:</p>
<p><code>rails generate controller home index</code></p>
<p>And change the default route (config/routes.rb) for the root: (search for root, it is already there but commented out)</p>
<div>
<div><code>Blog::Application.routes.draw </code><code>do</code></div>
<div><code> </code><code>root </code><code>:to</code> <code>=&gt; </code><code>"home#index"</code></div>
</div>
<div></div>
<div>now restart httpd and you should see rails at work.</div>
<div></div>
<div>Then it might be nice to have a sinatra setup as well.</div>
<div>Create another virtual server, this time it is called sinatratest:</div>
<pre>&lt;VirtualHost *:80&gt;
 DocumentRoot /var/www/sinatratest/public
 ServerName sinatratest.cosninix.com

 RackEnv production

 &lt;Directory "/var/www/sinatratest/public"&gt;
 allow from all
 Options -MultiViews
 &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
<div>Also here, the RackEnv is mandatory!</div>
<div></div>
<div>Now create the sinatratest dir and a public dir.</div>
<div>Leave the public dir empty, it is a placeholder for now but can be filled with javascript files and css etc.</div>
<div>Create a file called config.ru in the sinatratest dir (this is a rack definition file that passenger accepts)</div>
<pre>require 'rubygems'</pre>
<pre>require 'sinatra'</pre>
<pre>set :environment, :production</pre>
<pre>disable :run, :reload</pre>
<pre>
require 'testje'</pre>
<pre>run Sinatra::Application
</pre>
<p>This is for the latest sinatra version (1.2.0) as some methods has changed names and/or became class methods.</p>
<p>now create a small file testje.rbin (also in the sinatratest dir)</p>
<pre>get '/' do</pre>
<pre>   "hello world, my name is Frank"
</pre>
<pre>end
</pre>
<p>Restart httpd and this should work. You now have a working rails and sinatra deployment on centos with passenger.</p>
<p>One tip: Instead of restarting httpd all the time it is easier to create a tmp dir and use</p>
<pre>touch tmp/restart.txt</pre>
<p>every time you changed something. This will trigger passenger to reload everything</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2011/01/getting-ruby-rails-passenger-on-my-centos-box/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Generating microsoft office documents (word, excel) on your webserver using php</title>
		<link>http://www.cosninix.com/wp/2010/04/generating-microsoft-office-documents-word-excel-on-your-webserver-using-php/</link>
		<comments>http://www.cosninix.com/wp/2010/04/generating-microsoft-office-documents-word-excel-on-your-webserver-using-php/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 12:46:07 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[developer]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=3</guid>
		<description><![CDATA[Actually, this is much easier than you might think. The trick is to use the capability of excel and word to read html files So just generate normal html, but use a content-type header line to force the browser to see this as a word or excel file: (using php) header (&#8220;Content-type: application/msword&#8221;); or header [...]]]></description>
			<content:encoded><![CDATA[<p>Actually, this is much easier than you might think. The trick is to use  the capability of excel and word to read html files</p>
<p>So just generate  normal html, but use a content-type header line to force the browser to  see this as a word or excel file: (using php)</p>
<p>header  (&#8220;Content-type: application/msword&#8221;);  or<br />
header (&#8220;Content-type:  application/vnd.ms-word&#8221;);<br />
for word and<br />
header (&#8220;Content-type:  application/msexcel&#8221;); or<br />
header (&#8220;Content-type:  application/vnd.ms-excel&#8221;);</p>
<p>I have never seen any difference  between msword and vnd.ms-word, so if anybody knows the difference,  please respond.</p>
<p><span id="more-3"></span></p>
<p>Then you might want to define the local filename.  This can be done using the content-disposition header:</p>
<p>header(&#8220;Content-Disposition:  filename=\&#8221;invoice_$invoicenr.xls\&#8221;");</p>
<p>For excel, just start  generating a html table. The full table is used as excel sheet with its  rows and columns.<br />
For word, just start generating html code. It is  interpreted by word. Make sure to use a FULL url path if you want to  include images.</p>
<p>Here is an example to generate a word document:</p>
<pre class="php">&lt;?
$inr=10056;     // invoice number
$item="usbst";  // article number
$itemdesc="Usb stick 512Mb"; // article descr
$price=6.49;    // price

header("Content-type: application/vnd.ms-word");
header("Content-Disposition: filename=\"invoice_$inr.doc\"");
Header("Expires: Wed, 14 Oct 1997 06:41:40 GMT");
Header("Cache-control: no-cache");
?&gt;
&lt;html&gt;
&lt;HEAD&gt;
&lt;style type="text/css"&gt;
body {	font-family: "Microsoft Sans Serif";
font-size:10pt;
margin:0px;}
img	 { padding:0px;margin:0px;border: solid 0px white;}
&lt;/style&gt;
&lt;/HEAD&gt;&lt;BODY&gt;
&lt;img src="http://www.cosninix.com/blog49/themes/default/images/header750x100.jpg" width="100"&gt;
&lt;div style="margin-left:12px;"&gt;
&lt;p&gt;Invoice #&lt;?=$inr?&gt;&lt;/p&gt;
&lt;table width="100%"&gt;
&lt;tr&gt;
&lt;td width="20%"&gt;&lt;b&gt;&lt;?=$item?&gt;&lt;/b&gt;&lt;/td&gt;
&lt;td width="40%"&gt;&lt;?=$itemdesc?&gt;&lt;/td&gt;
&lt;td width="40%"&gt;&lt;?=$price?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Click  <a href="http://www.cosninix.com/nageloud/invoicedoc.php" target="_blank">here</a> to test it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2010/04/generating-microsoft-office-documents-word-excel-on-your-webserver-using-php/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Find the DHCP servers on your net</title>
		<link>http://www.cosninix.com/wp/2009/02/find-the-dhcp-servers-on-your-net/</link>
		<comments>http://www.cosninix.com/wp/2009/02/find-the-dhcp-servers-on-your-net/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 14:15:44 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=26</guid>
		<description><![CDATA[How often does this go wrong: multiple dhcp servers on your subnet? Because routers, accesspoints, modems boxes ALL have dhcp servers nowadays, a double or triple dhcp server in your network is not uncommon. But tools to identify which dhcp servers are available are not easy to find. To identify that something might be wrong, [...]]]></description>
			<content:encoded><![CDATA[<p>How often does this go wrong: multiple dhcp servers on your subnet?  Because routers, accesspoints, modems boxes ALL have dhcp servers  nowadays, a double or triple dhcp server in your network is not  uncommon.  But tools to identify which dhcp servers are available are  not easy to find.<span id="more-26"></span></p>
<p>To identify that something might be wrong, you  can use ipconfig on a windows cmd box:</p>
<p><code><br />
C:\Documents and  Settings\rvw.KOEKJE&gt;ipconfig /all</code></p>
<p>Windows IP-configuratie<br />
&#8230;<br />
Ethernet-adapter LAN-verbinding:<br />
&#8230;<br />
Standaardgateway. . . . . . . . . : 10.237.147.2<br />
DHCP-server .  . . . . . . . . . . : 10.237.147.50<br />
DNS-servers . . . . . . .  . . . . : 213.51.129.37<br />
213.51.144.37<br />
etc</p>
<p>This shows you your CURRENT  dhcp server, but if there are multiple dhcp servers running by  accident, you will get an IP address from a RANDOM server!</p>
<p>Same  with NETSH. The command NETSH DIAG SHOW DHCP only shows your CURRENT  dhcp server and does not do a scan.<br />
Even utilities that claim to do  this, only show one or only the current dhcp. DHCPexplorer from nsasoft  is such a fake application.</p>
<p>Fortunately there is a tool that  comes standard with windows, called DHCPLOC. If it is not installed, you  can find it on your windows CD under the \support\tools directory OR  get it from<br />
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&amp;displaylang=en" target="_blank">here</a></p>
<p>Give your current IP address as an  argument to dhcploc, and press &#8220;d&#8221; (discover).  Press d a few times to  get a good view.</p>
<p><code><br />
C:\WINDOWS&gt;dhcploc 10.237.147.101<br />
15:28:30     OFFER (IP)10.237.147.199  (S)10.237.147.50   ***Form<br />
15:28:32     OFFER (IP)10.237.147.170  (S)10.237.147.1    ***<br />
15:28:32    OFFER  (IP)10.237.147.199  (S)10.237.147.50   ***<br />
15:28:34    OFFER  (IP)10.237.147.199  (S)10.237.147.50   ***<br />
15:28:35    OFFER  (IP)10.237.147.170  (S)10.237.147.1    ***<br />
15:28:35    OFFER  (IP)10.237.147.199  (S)10.237.147.50   ***<br />
15:28:36    OFFER  (IP)10.237.147.170  (S)10.237.147.1    ***<br />
15:28:37    OFFER  (IP)10.237.147.199  (S)10.237.147.50   ***</code><br />
There!  there is a rogue dhcp server running at IP 10.237.147.1 !!<br />
So you  know.</p>
<p>(the rogue dhcp server turned out to be a netopia dsl  router, which only changes dhcp server settings after a REBOOT! Shame!)</p>
<p>Edit:<br />
Another nice tool is DHCPFIND.EXE, from roadkil. Its free and  works, and is a GUI tool, not a commandline tool. Only problem is that  it does not show the dhcp server IP, so dhcploc is still the  best  utility for the job. If you want to try dhcpfind, look <a href="http://www.roadkil.net/dhcpfind.html" target="_blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2009/02/find-the-dhcp-servers-on-your-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash memory reliability</title>
		<link>http://www.cosninix.com/wp/2008/05/flash-memory-reliability/</link>
		<comments>http://www.cosninix.com/wp/2008/05/flash-memory-reliability/#comments</comments>
		<pubDate>Sat, 17 May 2008 14:12:34 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[hardware and gadgets]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=22</guid>
		<description><![CDATA[During my trip to China a few weeks ago I met Ernst Fuld again. Ernst is CEO of the NGN, the dutch IT-professional platform. He told me that he has tried to test some usb-sticks and see if they could be written and erased so many times that they break. As you probably know, flash [...]]]></description>
			<content:encoded><![CDATA[<p>During my trip to China a few weeks ago I met Ernst Fuld again. Ernst is  CEO of the <a href="http://www.ngn.nl/ngn?waxtrapp=aluzzFsHyoOtvOXEaMbMA" target="_blank">NGN</a>, the dutch IT-professional platform. He told me  that he has tried to test some usb-sticks and see if they could be  written and erased so many times that they break. As you probably know,  flash memory can only be written a limited number of times. Each time  you erase (rewrite) the memory cell, there is a slight chance that it  breaks. Normally, the memory is guaranteed to last for 100000 rewrites,  but has anybody tested this on a regular usb stick?</p>
<p>There is a  problem however. The sticks are known to use a technique called &#8220;wear  levelling&#8221;. The data you write to the stick is remapped to memory area&#8217;s  where the number of rewrites is the lowest. This means that you cannot  test 1 cell by re-writing a small file over and over. You have to fill  the WHOLE stick in order to rewrite all cells. And even if you manage to  break a cell, there is also error-correction logic and bad-block  remapping that will correct the error without notice. So the flash  memories seem to be unbreakable.. or not!?</p>
<p>That&#8217;s why I wrote  this simple app: <a href="http://www.cosninix.com/pub/flashkiller.zip" target="_blank">Flashkiller</a>. It&#8217;s a free download so you can test  the reliability of your memory stick yourself. If you broke a usb-stick  or memory card with it, please respond to this post!</p>
<p>May 2  update: the kingston 512mb is now @19000 rewrites and still without an  error..</p>
<p>june 13 update: The kingston is DEAD. After 65000 writes  it becomes a read-only stick. Nothing can be written any more, and when i  try to write it gives an error!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2008/05/flash-memory-reliability/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Een office in china?</title>
		<link>http://www.cosninix.com/wp/2008/04/een-office-in-china/</link>
		<comments>http://www.cosninix.com/wp/2008/04/een-office-in-china/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 14:08:59 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[investing]]></category>
		<category><![CDATA[dutch investing]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=18</guid>
		<description><![CDATA[Dit lijkt moeilijker dan dat het is. Als eerste natuurlijk de keuze van de plaats. Na ons bezoek aan Shanghai werd wel duidelijk dat het daar lastiger gaat worden: de stad is overvol, de lonen stijgen en de chinezen zijn nu vooral zelf heel ondernemend en hebben in steeds mindere mate de buitenlanders nodig. Neem [...]]]></description>
			<content:encoded><![CDATA[<p>Dit lijkt moeilijker dan dat het is. Als eerste natuurlijk de keuze van de plaats. Na ons bezoek aan Shanghai werd wel duidelijk dat het daar lastiger gaat worden: de stad is overvol, de lonen stijgen en de chinezen zijn nu vooral zelf heel ondernemend en hebben in steeds mindere mate de buitenlanders nodig. Neem dan Chengdu, de tweede stad waar we een kijkje namen. Chengdu is een van de 2nd-tier steden in China, waar op dit ogenblik de overheid hard de economische ontwikkeling aan het promoten is. En die promotie gaat samen met een mooie welkomst speech tijdens ons bezoek aan de High Tech Zone door een vertegenwoordiger van het gestaalde kader: volledig in het chinees. Gelukkig wordt de speech daarna dunnetjes overgedaan door een goed engels sprekende man die ons uitlegt wat de mogelijkheden zijn.</p>
<p><span id="more-18"></span></p>
<p>Je hebt het gevoel in een reclamespot terecht te zijn gekomen, en de lokale overheid laat geen moment onbenut om je ervan te overtuigen dat je hier moet zijn als je in China wilt komen investeren. De bijbehorende glossy folder vermeld: electriciteit: 8 eurocent per kwh, drinkwater 31 eurocent per kuub, overal glasvezel aanwezig voor supersnel internet, labor cost…. Labor cost? De folder meldt dat een “gemiddelde” programmeur hier 2300 euro per jaar kost, en voor een software engineer met master’s degree moet je gemiddeld aan 6600 euro per jaar denken. Je moet hier dan nog wel 31% sociale premies bij optellen als je de werkgeverslasten wilt berekenen. Ook wordt terloops nog even vermeld dat zwaar chemisch afval of radioaktief afval bij de overheid kan worden ingeleverd indien je daar gebruik van wenst te maken. Verder een stapel folders van kale bouwkavels (“removal and demolition are under way” – in China schildert de overheid een teken op je muur en dan heb je 14 dagen voordat je woning tegen de vlakte gaat. Voordeel is wel dat je altijd andere woonruimte krijgt), panden in aanbouw of compleet gerealiseerde kantoorunits in elke gewenste grootte die je maar wilt. zie cdht.gov.cn</p>
<p>Daarnaast krijg je de beschikking over iemand van de overheid die je full time komt helpen bij het verkrijgen van alle benodigde vergunningen, als je je daar al zorgen over maakt want in de folder staan alle stappen die voor de vergunning nodig zijn in een overzichtelijk schema vermeld. Kortom: te mooi om waar te zijn. Denkend aan ons kikkerlandje waar de overheid de ondernemer op elk mogelijke manier het leven zuur probeert te maken is het toch wel een verademing, zo’n dictatuur. Als proef op de som zijn we dezelfde dag ook nog op bezoek geweest bij Plenware, een fins detacheringsburo werkzaam in de ICT sector. Zij hebben net een Chengdu office geopend, en zijn op het moment dat we binnenkomen net klaar met inrichten. Op de vraag of alles inderdaad zo gemakkelijk gaat kwam het antwoord dat we al min of meer hadden verwacht: sommige dingen gaan makkelijk, andere moeilijk. De ervaring was dat vaak de simpele dingen lang duren, bv het regelen van een mobieltje. Dat komt ook overeen met onze ervaring toen we een paar batterijen wilde kopen en een half uur aan het onderhandelen waren met de beste man omdat hij vond dat we teveel betaalden. In China gaan makkelijke dingen moeilijker, moeilijke dingen gaan gemakkelijker.</p>
<p>Al met al ben ik zeer enthousiast geworden om hier iets te gaan starten. In Nederland wordt het steeds moeilijker om software te ontwikkelen, goede mensen zijn niet te krijgen, en hier in China lijkt de kans op succes veel groter. Na eerdere mislukte pogingen om software ontwikkeling in India en in China door een outsourcing bedrijf te laten uitvoeren denk ik er nu over om hier een kantoorunit te huren en een development club te starten. Ik ben om.<br />
Ronald van Woensel &#8211; Chinareis2008.nl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2008/04/een-office-in-china/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the IE6 to IE7 upgrade</title>
		<link>http://www.cosninix.com/wp/2008/03/the-ie6-to-ie7-upgrade/</link>
		<comments>http://www.cosninix.com/wp/2008/03/the-ie6-to-ie7-upgrade/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 14:14:21 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=24</guid>
		<description><![CDATA[I&#8217;m using firefox as my default browser, but for testing and development i need explorer every once in a while. A couple of weeks ago, my microsoft update asked my to upgrate to IE7. So why not? well, always reluctant to install microsoft stuff, but if everybody uses IE7, i should at least test websites [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using firefox as my default browser, but for testing and development  i need explorer every once in a while. A couple of weeks ago, my  microsoft update asked my to upgrate to IE7. So why not? well, always  reluctant to install microsoft stuff, but if everybody uses IE7, i  should at least test websites for this new browser.</p>
<p>So i  installed IE7. What a bummer! I got an icon, but that was about it.  Clicking the IE7 icon shows the hourglass for a fraction of a second,  and then it exits immediately. So i uninstalled it and installed it  again. Nope.. Then I reinstalled IE6. Works fine!<span id="more-24"></span></p>
<p>Next step:  google the answer. Googling for &#8220;IE7 wont start&#8221; gives you this link:<br />
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;928427&amp;sd=rss&amp;spid=8722" target="_blank">http://support.microsoft.com/default.as &#8230; ;spid=8722</a></p>
<p>Wow!  microsoft already solved my problem!..but n o.. this wont fix it.<br />
of  course, further searching the microsoft site using their own search  function never gives a valid clue.</p>
<p>so.. now what? Runing IE7  without plugins also doesn&#8217;t help. It just wont start.</p>
<p>uninstalling  .net 1.0, .net2.0 visual studio and a lot of other apps? no luck.</p>
<p>So  after a while I stumbled upon SFC. This utility is able to check *ALL*  critical system files and reinstalls them if neccesary,<br />
Running SFC  /SCANNOW went well. I took about half an hour, and you only see a  progressbar, no information, no logging and at the end, the program just  exists without any report.. BUT it did the job: IE7 now starts. It took  me about 6 hours to get IE7 working, but in the end i finally can test  this great piece of work from microsoft.. Why can they *never* get their  software right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2008/03/the-ie6-to-ie7-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Acceptgiro&#8217;s printen</title>
		<link>http://www.cosninix.com/wp/2007/07/acceptgiros-printen/</link>
		<comments>http://www.cosninix.com/wp/2007/07/acceptgiros-printen/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 14:21:11 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[developer]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=35</guid>
		<description><![CDATA[Even een item in het nederlands. Wat is het toch lastig om informatie te vinden over het printen van acceptgiro&#8217;s, en dan met name het berekenen van de controle getallen. Uiteindelijk bij interpay de goede informatie gevonden: http://www.interpay.nl/binaries/IPforms &#8230; -34971.pdf Maar hoe werkt het nou? Vrij simpel. Alle controles worden met de bekende 11-proef (modulus-11 [...]]]></description>
			<content:encoded><![CDATA[<p>Even een item in het nederlands. Wat is het toch lastig om informatie te  vinden over het printen van acceptgiro&#8217;s, en dan met name het berekenen  van de controle getallen.</p>
<p>Uiteindelijk bij interpay de goede  informatie gevonden:<br />
<a href="http://www.interpay.nl/binaries/IPformspecseuroacceptgiro_tcm35-34971.pdf" target="_blank">http://www.interpay.nl/binaries/IPforms &#8230; -34971.pdf</a></p>
<p>Maar  hoe werkt het nou? Vrij simpel. Alle controles worden met de bekende  11-proef (modulus-11 algoritme) uitgevoerd. Dat wil zeggen dat je elk  cijfer met een weging optelt en het resultaat deelt door 11. De rest die  je overhoudt trek je van 11 af en dit geeft het controle getal.</p>
<p>voorbeeld:  (16 cijferig betalingskenmerk)<br />
c000 0567 8901 2345  (c=het  controlegetal dat we gaan berekenen)</p>
<p>de wegingen zijn 2 4 8 5 10 9  7 3 6 1 en die moet je vanaf rechts toepassen, en als je klaar bent  begin je weer van voor af aan. Dus:</p>
<pre>c 0  0  0  0  5  6  7  8  9  0  1  2  3  4  5
  10 5  8  4  2  1  6  3  7  9 10  5  8  4  2
--------------------------------------------- x
  0+ 0+ 0+ 0+10+ 6+42+24+63 +0+10+10+24+16+10 = 215
</pre>
<p>215/11  = 19 rest 6<br />
11-6 = 5 dus controle getal (c) is 5<br />
Indien C = 10 wordt 1 aangenomen<br />
Indien  C = 11 wordt 0 aangenomen</p>
<p>dus  het betalingskenmerk is dan</p>
<p>5000 0567 8901 2345</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2007/07/acceptgiros-printen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mserv client for windows</title>
		<link>http://www.cosninix.com/wp/2006/10/mserv-client-for-windows/</link>
		<comments>http://www.cosninix.com/wp/2006/10/mserv-client-for-windows/#comments</comments>
		<pubDate>Tue, 17 Oct 2006 14:19:31 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=31</guid>
		<description><![CDATA[Already for a few years, i&#8217;m running MSERV, a great opensource mp3 jukebox which is completely client-server and has a good rating- and genre system which allows it to play random music that corresponds to the current mood, current lister etc. You can rate numbers as superb, good, normal, bad, awful etc. and it takes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="javascript:openpopup('images/mserv4win.jpg',700,576,false);"><img class="alignleft" src="http://cosninix.com/blog49/images/mserv4win.jpg" border="0" alt="" width="427" height="351" /></a>Already for a few years, i&#8217;m running <a href="http://www.mserv.org/" target="_blank">MSERV</a>, a great opensource mp3 jukebox  which is  completely client-server and has a good rating- and genre system which  allows it to play random music that corresponds to the current mood,  current lister etc.</p>
<p>You can rate numbers as superb, good, normal,  bad, awful etc. and it takes this into account to play numbers more or  less often, depending on your rating. Everybody can rate, so this is a  good jukebox to use with a group of people.</p>
<p>There are a few  clients available, and I&#8217;ve taken MservClient as a base to further  develop the windows client. MservClient is written by Marco Schulze and  Marc Klinger, <a href="http://wiki.nightlabs.de/en/MServClient" target="_blank">and can be found here</a>. Because I&#8217;ve changed the  whole concept of MservClient, I adopted a new name: Mserv4win. Also,  there is not much left from the original code of mservclient. Mserv4win  takes the look and feel from winamp and puts it on top of mserv.</p>
<p><span id="more-31"></span></p>
<p>One  of the things missing in Mserv is a good &#8220;cover picture&#8221; feature, so  I&#8217;ve also added an &#8220;x cover&#8221; command to get a cover pic from the server.  The client still talks to the original server that does not support  this command, but with this feature, the experience is a lot better.</p>
<p>Here&#8217;s  a screenshot:</p>
<p>Download Mserv4win: <a href="http://cosninix.com/blog49/images/MServClient.zip" target="_blank">MServ4win.zip</a><br />
Download  source (delphi7): <a href="http://cosninix.com/blog49/images/mservclient.rar" target="_blank">sources.rar</a></p>
<p>If  you want to patch your mserv for &#8220;cover&#8221; support, use this to patch  mserv&#8217;s cmd.c and recompile: <a href="http://cosninix.com/blog49/images/cmd.patch" target="_blank">cmd.patch</a><br />
or  replace cmd.c with this version: <a href="http://cosninix.com/blog49/images/cmd.c" target="_blank">cmd.c</a></p>
<p>make  sure you put cover .jpg files in the same directory as the album mp3&#8242;s.  Also, make sure the jpg is not too big (max 50k or so)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2006/10/mserv-client-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding an AUX input to a Mini Cooper or BMW car stereo</title>
		<link>http://www.cosninix.com/wp/2006/02/39/</link>
		<comments>http://www.cosninix.com/wp/2006/02/39/#comments</comments>
		<pubDate>Fri, 17 Feb 2006 14:24:16 +0000</pubDate>
		<dc:creator>rvw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://reet/wp/?p=39</guid>
		<description><![CDATA[I recently bought a mini cooper, because it&#8217;s such a great car. (yes, it&#8217;s the cooper-S convertible, model 2005, so the only thing it needs is the &#8220;cooper works&#8221; upgrade) But even nowadays, a simple aux-input on the radio is not a standard option. And who listens to music without an mp3 player/ipod? I have [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://cosninix.com/blog49/images/Mini-Cooper-S-Convertible.jpg" border="0" alt="" width="500" height="310" />I recently bought a mini cooper, because it&#8217;s such a great car. (yes,  it&#8217;s the cooper-S convertible, model 2005, so the only thing it needs is  the &#8220;cooper works&#8221; upgrade)</p>
<p>But even nowadays, a  simple aux-input on the radio is not a standard option. And who listens  to music without an mp3 player/ipod?</p>
<p><span id="more-39"></span></p>
<p>I have bought an Archos mp3 player with  20Gb disk a couple of years  ago, and although it&#8217;s large and old, and it  has a slow USB 1.0 port,  it still functions as my music take-away. But  without an input on the  car radio, it&#8217;s useless.<br />
<a href="javascript:openpopup('images/IMG_0900.JPG',800,297,false);"><img src="http://cosninix.com/blog49/images/IMG_0900.JPG" border="0" alt="" width="512" height="190" /></a></p>
<p>But no worries, a  bit of googling suggested a <a href="http://www.northamericanmotoring.com/forums/showthread.php?t=11518&amp;highlight=blitzsafe+installation" target="_blank">solution</a>.</p>
<p>unfortunately, this did not work  for me, as other people in the article suggest, it works only for *some*  radio models.</p>
<p>So I started some experiments. First, get the  radio out. The plastic cover under the steering wheel is locked by some  &#8220;clicking&#8221; pins, so a  hard pull will tear it down. This makes room to  unscrew both torx screws on the left and right side of the radio  compartment.</p>
<p>My radio turns out to be BMW radio, probably from  Alpine.<br />
<img src="http://cosninix.com/blog49/images/IMG_0899.JPG" border="0" alt="" width="512" height="437" /><br />
The back reveals a few  connectors:<br />
<a href="javascript:openpopup('images/IMG_0904.jpg',700,459,false);"><img src="http://cosninix.com/blog49/images/IMG_0904.jpg" border="0" alt="" width="512" height="336" /></a></p>
<p>The pin layout is described in this  picture, that can be googled for:<br />
<a href="javascript:openpopup('images/cooper-radio-pins.gif',700,483,false);"><img src="http://cosninix.com/blog49/images/cooper-radio-pins.gif" border="0" alt="" width="512" height="353" /></a></p>
<p>So connecting the audio  output to pin 3,4 and pin 10 was the first tryout. Cutting an old PC-USB  port connecter in pieces was sufficient to get everything connected:  (green=pin3 pink=pin4 white=pin10)<br />
<a href="javascript:openpopup('images/IMG_0910.JPG',1928,764,false);"><img src="http://cosninix.com/blog49/images/IMG_0910.JPG" border="0" alt="" width="512" height="203" /></a></p>
<p>But no success. The problem is that  the radio does not &#8220;recognise&#8221; the aux input, and the MODE key doesn&#8217;t  include AUX in its options. So what is the trick?</p>
<p>I noticed that  turning the volume up and clicking on the mode key very rapidly  sometimes DID give the AUX menu for a second or so. So I guessed it  should be some kind of impedance/resistor pull up or pull down. So after  some experiments I came up with this little thingy:<br />
<a href="javascript:openpopup('images/IMG_0905.JPG',1968,1596,false);"><img src="http://cosninix.com/blog49/images/IMG_0905.JPG" border="0" alt="" width="512" height="415" /></a></p>
<p>Basically, it connects the left and  right channel with a resistor. To uncouple the audio lines, a small  capacitor is used (220n). This seemed to work at first, but some music  passages made the AUX menu go away. So I made the resistor smaller and  smaller. I also tried to connect it to pin 9 and/or pin 10 as well:<br />
<a href="javascript:openpopup('images/IMG_0917.JPG',700,482,false);"><img src="http://cosninix.com/blog49/images/IMG_0917.JPG" border="0" alt="" width="512" height="353" /></a></p>
<p>Finally, the best solution for me  was this schematic:</p>
<pre>                  C1:220nF
Left audio --------||--+---------+----- pin 3
                       |         |
                      +-+        | +-------+
                      | |        +-|  10k  |---+
                      | | R1:1k2   +-------+   |
                      | |          +-------+   +--car ground
                      +-+        +-|  10k  |---+
                       |         | +-------+
Right audio -------||--+---------+-------- pin 4
                 C2:220nF

Audio Ground -----------||-------------------- pin 10
                        C3:2uF</pre>
<p>Note: Because the output impedance of the MP3 player is low  (speaker output, typically 1-50 ohms)  the 1k2 resistor does not have a  large impact on stereo separaion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosninix.com/wp/2006/02/39/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

