Sophie draws within the lines!
July 11, 2010
Today I discovered that my little daughter has secretly been perfecting the art of drawing within the lines. I’m very proud.
Look at those stars!
Path to Enlightenment
July 9, 2010
I’m a big fan of Chet Haase and his brilliant blog Codedependent. He makes very entertaining instructional videos about coding on the Flex 4 framework. I occasionally spend some time on his blog getting to know the new features in the Flex 4 framework. And time and time again he has managed to motivate me to get back to work and use my skills in a playful manner.
A while a go I watched this gripping and suspenseful video about creating a simple drawing application. The video talks about the new “Path” object in Flex 4. The Path object is an easy tool to save and manipulate line data. (This simple demo uses only simple straight line segments but this object could be used for bezier curves as well.)
Anyway I was fascinated by the small amount of code needed for this application. I downloaded the code and played with it. Here’s my interpretation of the Path to Enlightenment. It’s in the spirit of “less is more”. Draw some lines and wait a few seconds to see what I mean. Your lines will be enlighted and stripped down to their bare essentials.
The demo (press your left mouse button and draw by moving your mouse)
The source
Quick Response Code Platipus
December 7, 2009
(What’s a Quick Response Code?)
mysql_fetch_array loop not working while result set contains rows
October 27, 2009
Last night I ran into the crazy problem that a mysql result set contained rows (confirmed with mysql_num_rows) but I wasn’t able to fetch the rows in mysql_fetch_array while loop construction. I managed to create a workaround but I posted a note on the php.net mysql_fetch_array page asking for an explanation. The note got rejected so I figured I could use my own blog in the search for an answer.
Here is the note;
I hope someone can help me with this question.
I have 2 code snippets. The first works, the second doesn’t. I would prefer using the second code snippet because it seems cleaner. What’s wrong with the second code snippet?
This works;
$results = mysql_query("SELECT DISTINCT(col) FROM table WHERE col!='' ORDER BY RAND()");
for( $i = 0; $i < mysql_num_rows( $results ); $i++ )
{
// do something with mysql_result($results,$i,0);
}
This doesn’t work;
$results = mysql_query("SELECT DISTINCT(col) FROM table WHERE col!='' ORDER BY RAND()");
while($result = mysql_fetch_array($results))
{
//do something with $result
}
PHP imagepng transparant turns black
October 24, 2009
I’m writing a web application that allows it’s users (among other things) to upload their company logos. PHP script is used to take the user provided jpgs/pngs and present them uniformly in a webpage. I ran into the problem that rescaled png images had their transparent regions turned black.
Here’s the solution I found;
- First create a new image (imagecreatetruecolor) with the required dimensions.
- Allocate a transparent color for that image. (imagecolorallocatealpha)
- Fill the image with the transparent color. (imagefilledrectangle)
- Now copy a scaled version of your original png image into the new image. (imagecopyresampled)
Voila.
Although the last step effectively overwrites all the pixels in your image, step 2 and 3 seem to be absolutely necessary to allow transparency inside your png image.
One more word of advice; use imagecopyresampled instead of imagecopyresized.
Resampled

Resampled "Dutch Design Award"
Resized

Resized "Dutch Design Award"
Fujitsu recommends Windows … ?
October 20, 2009
This commercial is about ….
A) a laptop with “Windows 7 Home Premium”
B) a laptop with “Windows Vista Home Premium”
Unexpected exception encountered while reading font file
October 18, 2009
I just had a weird unexpected exception thrown by the Flex 3.4 compiler on an existing ActionScript 3.0 project that always compiled without a problem.
exception during transcoding: Unexpected exception encountered while reading font file 'F.ttf' unable to build font 'F' Unable to transcode assets/F.ttf
Luckily I found solution via Google. Thanks Crazy Flexer “pixelfreak” adding -managers flash.fonts.AFEFontManager as an additional compiler argument fixed the build process.
Hope this blog post helps people that encounter the same issue.
T-Mobile web n walk stick under Linux
February 18, 2009
Today I tried using my T-Mobile Netherlands Web N Walk USB stick with Kubuntu 8.10. I had been dreading this moment, since installing T-Mobile’s web n walk manager for Windows has been a terrible experience for me. After a firmware update T-Mobile’s drivers became completely uninstallable. (A nightmare of several weeks with little to none support from T-Mobile Netherlands.) I figured, that since T-Mobile was offering driver downloads for Windows operating systems but not for Linux I was in for deep trouble. But this time I was pleasantly surprised. There are very well written tutorials on the Internet that explain how to use your web n walk stick with Linux within minutes.
I compiled the driver for my kernel with the instructions on this page: http://www.pharscape.org/hso.html
And then run the HSOconnect connection manager to connect to T-Mobile’s HSDPA network. It works!
I’ve been using the connection for several hours now with proper down- and upload speeds.
I guess the big difference between my Windows vs Linux experience is that Option NV (the chip-maker for T-Mobile’s web n walk stick) does not offer windows driver downloads directly (they forward you to T-Mobile), but Option does seem to work together with the Linux community to build good Linux drivers. I’m very happy with the Linux drivers and I recommend Option and T-Mobile to use a similar construction for the Windows support!
T-Mobile Netherlands Web N Walk Manager Update For Web N Walk Stick
October 23, 2008
I hope that this post gets found by people encountering the same problem that I did. So I’m deliberately using the keywords that I searched on. In this post I describe how I solved the problem of installing a T-Mobile software update (which turned out to be in a conflict with Kaspersky’s Internet Security software) and how I fixed the terrible slow upload performance after that.
For a few weeks now I have been bothered by a very annoying problem. T-Mobile Netherlands offered a free firmware update and driver update for their web’n'walk stick. (Contained in a zip found here: web n walk manager upgrade) I was delighted because the description of the update appeared very promising and I was getting tired of the bad performance of the mobile broadband connection under Windows Vista (performance is way better on my girlfriends Windows XP laptop). The zip contained (along with some pdf documentation) a self extracting executable named Superfire.exe. By following the on screen instructions I succesfully upgraded the web n walk USB sticks firmware but after a reboot trying to update the software drivers failed with this error;
“An incompatible standalone version of the speedmanager plus/ByteMobile Client is present on the system. This version must be uninstalled and OS restarted!”
Strange. I never explicitly installed a speedmanager or ByteMobile Client. If it was part of previous T-Mobile software I would have expected it to be easily uninstalled or updated. I started in Windows Vista’s Control Panel’s “Programs and Features” to uninstall everything possible related to mobile internet. With no success.
Inspired by Jürgen Pabel’s succes story I went to regedit to remove every registry key possible related to a ByteMobile client or Speedmanager. (Indeed I found some keys, I removed every key containing ”ByteMobile”, “Novatel”, “Option NV”, “GlobeTrotter” or “T-Mobile”.) No success.
At this point I was getting really annoyed. I started looking for a download of the old firmware or drivers. I found a working driver on t-mobile.at (austria) that at least made be able to use the web n walk stick again. Terrible network performance but good enough for web browsing.
Still wishing to solve this problem, I looked for ways to get more information about the microsoft installer failure. I found a way to get verbose logging from the microsoft installer.
I used:
msiexec /i webnwalkManager_en.msi /l*v c:\wnw.log
And this produced a 510 lines logfile. With this curious lines 277 and 278.
MSI (c) (04:1C) [12:05:38:939]: PROPERTY CHANGE: Modifying MINSTALLCHECKMSIRETURN.102FE328_B77C_41FB_847C_166244959AAB property. Its current value is ’0′. Its new value: ‘BM_ERROR_CONFLICT_SOFTWARE’.
MSI (c) (04:1C) [12:05:38:939]: PROPERTY CHANGE: Modifying BMCONFLICTSOFTWARENAME.102FE328_B77C_41FB_847C_166244959AAB property. Its current value is ’0′. Its new value: ‘Kaspersky Internet Security 6.0′.

New Web N Walk Manager interface
netsh interface tcp set global autotuninglevel=highlyrestricted

Web n Walk mobile broadband connection properties
Win!!!
October 15, 2008
We (me, Sylvia and Daan) have won an Silver W3 Award for Studio Roosegaarde!
In our humble opinions this is a well deserved result of our fanatic affords (in good and bad times) to build the best we could. And we’re determined to make it a gold one next time.







