sanderk

 

In a bash shell under cygwin I used grep like this:

grep [0-9]+[.][0-9]+ <filename>

I expected a line like “…>2.49<…” to match. Unfortunately, this was not the case.

It turns out that the plus sign is part of the extended regular expression syntax.

To let grep use the extended regular expression syntax, use this:

grep -E [0-9]+[.][0-9]+ <filename>
 

Subversion supports several protocols: http, https, svn and svn+ssh. I don’t like using http for Subversion, since the user name and password are transmitted as plain text. Getting https to work, you need to get a certificate from a Certificate Authority. This takes time and costs money. The svn+ssh alternative can be quickly set up and is for free. The application svnserve allows access to your Subversion repositories using the svn protocol.

I installed Subversion on my Ubuntu server. An excellent description on how to do this is available here. To make the svnserve start on system start up I used the following commands from this site:

cd /etc/init.d/
sudo touch svnserve
sudo vi svnserve
svnserve -d -r /usr/local/svn/repository_name

The only thing left is to get Subclipse to work with your Subversion repository. All I had to do was to go to Windows -> Preferences -> SVN and change the client to SVNKit (Pure Java).

On the Internet I found another way to get JavaHL work with svn+ssh. However, I experienced that configuring a private key was much easier with SVNKit than with JavaHL. So I will stick to SVNKit.

 

Adding the following registry settings in Windows 7 solved this problem for me:

        HKLM\System\CCS\Services\LanmanWorkstation\Parameters
            DWORD  DomainCompatibilityMode = 1
            DWORD  DNSNameResolutionRequired = 0

I found this solution at http://wiki.samba.org/index.php/Windows7.

 
Dennis achter de computer

Dennis achter de computer

Feb 272012
 
Julia, februari 2012

Julia, februari 2012

 

 

Dennis bij de peuterspeelzaal

Januari 2012: Een foto van Dennis gemaakt op de peuterspeelzaal. Hij heeft het altijd naar zijn zin op de peuterspeelzaal.

 

Bij het opruimen van een oude klapper op zolder vond ik een document dat ik in 1993 heb geschreven. Het beschrijft de structuur van bestanden van het programma Magic Music Module Professional.  Dit programma is een step-time muziekeditor voor de MSX-computer. Ik heb dat programma tijdens mijn schooltijd geschreven.

Mocht iemand nog de behoefte hebben om muziekbestanden van Magic Music Module Professional in te lezen, bijvoorbeeld om ze om te zetten naar MIDI-bestanden, dan is dit document handig om te hebben.

Klik hier om het document te downloaden.

 

Mobile devices do not have mouse. When the user uses the touch screen to click on a button, then this click is translated to mouse events. This way existing software can still be used on a mobile device without mouse.

When the mobile device has a barcode reader, then when a barcode is scanned, this barcode is offered to the application as if it was typed on a keyboard. And typically a key press for the enter key is added after the barcode.

But what happens if the user accidently moved the focus from a text box to a button? If the user then scans a barcode, the key presses for the barcode are ignored, but the key press for the enter will cause a button click!

It turns out that preventing this button click is difficult in Compact Framework.

I finally found a solution in the article “SubClassing a Control Using Native Callbacks” at codeproject.com. Compact Framework offer the possibility for native code (like the Button class) to call managed code using a callback delegate. The article describes how to implement a callback delegate that is called when the mouse button is pressed or released.

The solution I came up with is to create a subclass of Button. When the mouse button is pressed a flag is set. The method OnClick() only handles the click if the flag is set and then clears the flag.

One minor problem was that pressing enter on the mobile device actually sent two mouse press events. The second event always has wparam = 0 and lparam = 0. When such an event is received I also clear the flag so that the following call to OnClick() does not handle the click.

 

I decided to try a new Linux distribution. Last time I installed Linux I installed it from a USB stick. I remember I needed some special software to make the USB stick bootable.

Now I discovered UNetbootin. This tool copies a Linux distribution to a USB stick and makes it bootable. It can even download any of the popular distributions for you.

UNetbootin is available for Linux, Windows and Mac OS X.

http://unetbootin.sourceforge.net/
 

Technologisch gezien kunnen we nu ontzettend veel. Wie begin twintigste eeuw had gezegd dat binnen honderd jaar een mens op de maan zou lopen werd voor gek verklaard. Inmiddels is het al weer veertig jaar sinds de eerste mens op de maan is geweest.

Ook niet voor te stellen aan het begin van de twintigste eeuw was het Internet. Het Internet heeft zich sinds de jaren negentig sterk ontwikkeld. Het Internet wordt steeds vaker gebruikt om bestaande media als radio, TV en kranten aan te vullen of zelfs te vervangen.

Maar zijn al deze ontwikkelingen nou allemaal even wenselijk? Mensen die mij al langer kennen, zullen de volgende uitspraak van mij inmiddels ook kennen: Leuk dat het kan, maar daar zit ik niet op te wachten.

Neem nou eens het bericht Techniek onderzocht om voedingsinfo op gsm te lezen dat op 3 juli te lezen was op de nieuwspagina nu.nl. In dit bericht oppert Herman Koëter van de Orange House Partnership om voedingsinformatie van allerlei producten te tonen op de mobiele telefoon. Als een klant in de winkel voedingsinformatie van een potje pindakaas wil krijgen hoeft hij niet het etiket te lezen, maar moet hij zijn mobieltje richten op de streepjescode van het potje. Vervolgens verschijnt de voedingsinformatie op zijn mobieltje.

Het is leuk dat dit technisch mogelijk is, maar wie zit hier nou op te wachten? Veel consumenten doen slechs eens per week boodschappen. Ze kopen dan altijd hetzelfde merk pindakaas, frisdrank, melk enzovoort. Ze gaan echt niet iedere week de voedingsinformatie van deze producten bekijken op hun mobieltje.

Naast tonen van productinformatie stelt Koëter ook voor dat voor mensen met overgewicht een “rood alarm” krijgen voor slechte producten. Dit is echter een onpraktisch idee. Binnen een gezin is het meestal dezelfde persoon die de boodschappen doet voor het gehele gezin. Het mobieltje kan moeilijk bepalen voor welk gezinslid het potje pindakaas bedoeld is en of pindakaas ongezond is voor dat gezinslid. En geeft het systeem ook een alarm als iemand in het gezin allergisch is voor pinda’s?

Mensen die echt op hun voeding moeten letten vanwege een dieet verdiepen zich in de materie. Dit doen ze niet in de winkel, maar thuis. Verder doen ze dat niet met hun mobieltje maar met boeken of webpagina’s. Er zijn al talloze boeken en webpagina’s beschikbaar met gedetailleerde voedingsinformatie van alle producten. Dus de mensen op wie het nieuwe systeem gericht is kunnen prima uit de voeten met de huidige informatiebronnen.

Tot slot vrees ik dat een dergelijk complex systeem zeer duur is om te ontwikkelen. Ten eerste zijn er techinsche uitdagingen om een mobieltje een streepjescode te laten lezen en informatie op te laten zoeken op Internet. Ten tweede zal het een gigantische klus zijn om alle voedselproducenten ter wereld hun etiketinformatie digitaal te laten aanleveren.

Het moge duidelijk zijn dat het voorgestelde systeem moeilijk en duur is om te realiseren. Verder is het een technologische oplossing voor een probleem dat al opgelost is met eenvoudigere middelen. Voor mij geldt dus: leuk dat het kan, maar daar zit ik niet op te wachten.

© 2011 Sanders blog Suffusion theme by Sayontan Sinha