Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php:215) in /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php on line 222

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/items/model/_itemquery.class.php on line 628

Warning: Cannot modify header information - headers already sent by (output started at /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php:215) in /home/hemmi3/public_html/blog/inc/_core/_template.funcs.php on line 59
Dilectio http://www.blog.hemminga.net/index.php?blog=13&tempskin=_atom b2evolution 2013-05-19T00:30:39Z An Ubuntu user goes Fedora admin http://www.blog.hemminga.net/?title=an-ubuntu-user-goes-fedora&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2011-07-13T16:47:41Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2011-07-13T23:05:30Z
On my desktop -which basically acts as a server- I did upgrade from Ubuntu 10.11 to 11.04. But as we all know there's Unity and that's not what I want. As an alternative I considered several alternatives. Of course there's Kubuntu or another KDE derivate. I did try that in the past but fucked the install with an undisclosed experiment. Drawbacks -apart from my failed experiment- were the resources it used and the immaturity of several core applications.
You must be curoius about the experiment. IIRC I tried the latest version of KDevelop from some external repo (Debian sid?) With it came newer versions of core libraries which were incompatible with the rest of the install. I decided to abandon ship.
On my laptop I never upgraded Ubuntu to 11.04. I did have a serious look at several other distro's. I managed to install Arch but failed in a similar way to Kubuntu when trying the then just stable Gnome3. Arch in itself is very boring. It's simply that I don't want to spend all that time and effort to only keep the install up-to-date, let alone compile whatever I need only to write a note or do something I just want to do at that very moment. It made me love all those volunteers creating distro's with all the art work and precompiled standard applications.
So I tried the Fedora 15 live CD in it' s beta stage. Gnome3 looked promising. More so than the tablet interface Unity is. I decided I'd go for it. It required several attempts to install and configure the way I want. So, for the record, and as note to self some remarks.
- I always use GParted to partition my disks (ext4 usually). Fedora live CD doesn't come with it, so use Ubuntu or an Ubuntu CD to re-partition your harddrive before installing Fedora. I created a 20Gb partition for / and more for /home. I don' t intend to use /home for larger collections of images, music, video or whatever. I will auto-mount either a seperate /data partition or -on the laptop- an nfs mount to the 1Tb harddrive on the server.
- Near the end of the Fedora install it asks to isntall grub. Don't if you want to keep the Ubuntu alongside it. Fedora will install Grub legacy (Grub 1). Instead install Fedora, boot into Ubuntu and run

sudo update-grub

It will find and add Fedora to the existing Grub2 menu.
- After reboot into Fedora it will ask for your name. Don't forget to add yourself to the administrator group. That's a checkbox choice in that panel
- Now updater all packages. The package update manager failed but it should run nicely in Terminal with

su -c 'yum clean all'
su -c 'yum update'

Spoiler: yum sucks, dpkg / apt rocks.
- Install the free and non-free repositories from RPM Fusion on http://rpmfusion.org They contain the applications and drivers you really care about.
- I managed to install Chrome by hand from the Chrome download page. Can't tell just now if that's a wise decision. Will it upgrade itself when a new version of chrome arrives?
- I downloaded the 64 bit Flash .so file from Adobe. Put it in ~/.mozilla/plugins the (re-) start Firefox and it should just work. Also Chrome did pick it up nicely.
- I struggled with the nfs connection to the server. The documentation of nfs on Fedora is outdated (for Fedora 14). The documentation on Ubunut is how I did set it up in 10.11 on the server and on the Ubuntu partition on the laptop. I managed to get it to work with:

sudo -c 'yum install nfs-utils'
sudo mount -t nfs4 -o proto=tcp,port=2049 
    192.168.1.65:/data /mnt

In Ubuntu you'd install nfs-common. Also there's something weird with the mount command.
On the server the folder is /export/data and this command shows all files in /mnt whre I expected a /data folder. nfs-server:/data, as advertised in the Ubuntu guide didn't do the trick. I'll try a couple more times after I reboot the install. Since it works I don't expect serious issues here.
- The printer was found easily. Cups rocks. The printer is attached to the server, not directly to the laptop but that's all taken care of as easy as it was in Ubuntu.
- I tried to install the ATI Radeon driver on earlier occasions. All failures. I think I need to reconfigure /etc/X11/xorg.conf before the reboot but since the non-proprietary driver works just fine I'll not engage in another disappointment. Dual head works out of the box. That's my main concern.

So far I'm happy. Just not really that confident as I'm with my Ubuntu install.

]]>
Pythonic PHP admin http://www.blog.hemminga.net/?title=pythonic-php&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2011-06-28T02:36:28Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2011-07-13T23:07:41Z
I shot some photographs for a friend and put them in an open dir for himto grab them. NO big deal, but he mailed me that he'd rather see the images in the folder.
I did that before at least twice. This time I decided to grab an exiting script. I found http://www.phpace.com/image-resizing-with-php/ by Sam Yapp. The script scans the folder fot images, creates thumbs with the GD library and displays them.

I liked two lines of code because they feel so Pythonic. This is the first:

preg_match('#^(.+?)(_t)?\.(jpg|gif|png)#i', 
    $entry->getFilename(), $matches) );
list( ,$name, $is_a_thumb, $extension) = $matches;

If you look beyond the regular expression, at least if you're intimidated by them, the array $matches collects matches from the regex. $matches[0] is the complete match consisting of the filename of an image. $matches[1] contains the first part (before the dot) of the filename, $matches[2] contains '_t' if it's there (thumbnails are created with an added _t in the filename) and $matches[3] contains the part after the dot.
Interesting is the list constructor in the second line of the example code. That's the Pythonic part. It creates all the variables in one line. Or am I mistaken and is it Perl magic in origin?

That's not all there is. You see the $entry->getFileName(). That comes from this code:

$dir = new DirectoryIterator($path);
foreach( $dir as $entry ){

Wow. An iterator in PHP. I hadn't seen this in PHP before. I have in Python though. hte DirectoryIterator seems pretty complete. PHP is growing up.

]]>
Browser admin http://www.blog.hemminga.net/?title=browser&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2010-01-30T17:39:19Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2010-01-30T17:39:19Z
"Google announced Friday that it will be phasing out support for Internet Explorer 6, more than two weeks after the attacks on Google's servers that targeted a vulnerability in IE6. In a blog post, Rajen Sheth, Google Apps senior product manager, said that support for IE6 in Google Docs and Google Sites will end March 1. At that point, IE6 users who try to access Docs or Sites may find that 'key functionality' won't work properly. Sheth suggested that customers upgrade their browsers to pretty much anything else."
Source: Slashdot

]]>
My new phone: T-Mobile Pulse admin http://www.blog.hemminga.net/?title=my-new-phone-t-mobile-pulse&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-10-08T02:12:48Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-10-08T03:53:01Z
Note: This is about the Dutch T-Mobile.

I ordered the brand new T-Mobile pulse a week ago and I am expecting it to arrive next week. Let me describe what made me choose this particular cellphone and make some remarks about my expectations. That will be fun to reread in a couple of month time.

History
I've never had a lot of fun with phones. Most likely that's because I'm no longer sixteen years old. But I've had 'm for some time but I seldom use the phone. Take this literally. With seldom I mean less than 20 minutes per month.
My first phone was a Siemens M55. I bought it because of the then emerging data (Internet) possibilities. The performance was horrible. It could only show real WAP sites and there were only a few of them around. Starting up the GPRS and loading the first site would take the best part of five minutes. I didn't use it a lot. I payed per kB so what the heck.
I had high hopes of the possibilities with the embedded java. I did manage to find a few games that I could download and install from within the phone. Apart from the fact that it was dead slow I was demoted by the small screen (color!). So I didn't play a lot.
This was technique in it's infancies.

Today
I have a basic Nokia, simlock free. No Internet. Phone only.

Next week
If all goes according to the promises by T-Mobile they will start shipping the Pulse from Monday October 12. Have a look at a picture:

T-Mobile Pulse

These are the specs from the website. You find this phone at http://tinyurl.com/ydnc32q

Specificaties:

  • Afmetingen: 112 x 56.2 x 14.4 mm
  • Gewicht: 135 gram
  • Spreektijd: tot 480 minuten
  • Standby tijd: tot 750 uur
  • Netwerken: GSM 850/900/1800/1900 UMTS/HSDPA tot 7.2mbps/GSM/GPRS

Functies

  • Besturingssysteem: Google Android
  • Scherm: TFT Touch Screen met 65.000 kleuren
  • Camera: 5.0 megapixel
  • Processor: Qualcomm MSM 7200A 528 MHz
  • E-mail
  • Intern geheugen: 288 MB RAM, 512 MB ROM
  • Games
  • Handenvrije luidspreker
  • HTML-browser
  • MP3 beltonen
  • MP3-speler
  • Polyfone beltonen
  • Geïntegreerde GPS ontvanger
  • Video/Audio speler
  • Uitgebreide agenda
  • Trilfunctie
  • USB aansluiting

It has everything a modern smartphone would want. But these specs are vague. Like what is the screen resolution (480 x 320). The other page on their site claims it runs the latest Android but I can't imagine it to be 1.6. The camera resolution is 3.15MP, not 5 as claimed here.
The phone really is a Huawei U8220. For those among you interested in more detailed specs, have a look at this site: http://tinyurl.com/y8r6f5z.

Money
This phone will cost me close to € 30,- a month in a one year contract. It includes darn slow but unlimited Internet (345kB/64kB) and 150 min for E.T. to phone home.

Choices
What made me decide for this one? Mainly it was money. This phone sells at € 257,- or thereabout and that's about the upper limit for both my wallet and my notion of what a phone should cost. The latest iPhone would cost me around € 1100,- for two years of fun. I would probably go for it anyway if it was only fun I could expect. But I don't like the software being closed source, the App store being controlled without an alternative store available. Even the case is closed so I can't add memory or a spare battery if need be.
If I would want to develop apps for the iPhone I'd need to pay a decent sum of money to start and next get in touch with Objective C. I am not an Apple fanboy. I simply don't want to be locked up into the fantasies of other people.
An alternative would be another phone with Android. Notably the HTC Hero. It's just more expensive. I tend to believe the specs are in the same range.

Expectations
I'll be phoning a lot more. But more important, I;ll have my mail around. And my Twitter. Being a profound bicyclist I have high expectations of the GPS possibilities of the phone. I hope it's got some tracking possibilities. I'll be making pictures and listen to music. I think it's all those basic tasks that keep me busy at least some time in a regular day. It has the potential to be used something like two hours a day when I'm not at home. I can live without it, so it's a pure gadget.
Will I be developing for the Android? Yes and no. I do think I'll be doing a 'Hello World' of some sort. I don't think I'll be doing a real app. I regularly lack inspiration. And things I do come up with are so specific I'll be my only customer. That's the outcome of many of my efforts. I really do know what I'm talking about!
I don't like Java. There Python bindings available but they need to be expanded. It is not expected to be any Python GUI bindings, so the Python part will be text based I presume.
Part of me believes this phone will be a disappointment. But that happened before. It's a glance into the future. The phones of today will turn out to be immature in a few years time. But that's the fun part of progress.

I'll take some time to write a review. I think before the end of the year.

]]>
The Virus admin http://www.blog.hemminga.net/?title=the-virus&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-05-03T00:06:45Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-06-17T18:32:47Z
This is what we're all afraid of: the H1N1 virus aka 'Mexican flu' or 'swine flu'.


Unfortunately it doesn't say how often it's magnified.
Source: CDC - Center for Disease Control and Prevention

]]>
Linux ad admin http://www.blog.hemminga.net/?title=linux-ad&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-04-09T19:35:37Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-06-19T03:53:30Z
This ad is about will be aired some day. It's picked from a competition.

What do you expect from a Linux commercial? Do you like this ad?

]]>
Creating an art image in Gimp admin http://www.blog.hemminga.net/?title=creating-an-art-image-in-gimp&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-03-10T02:51:16Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-06-19T03:50:24Z
This tutorial is an adaptation from Graphic Art - Photoshop which I rewrote for Gimp. Disclaimer: Gimp is a different tool than Photoshop. However I will show similar effects are possible. That's why I chose to follow the aforementioned HOWTO as close as possible. As usual I made the image for fun but this time also because I liked it but it was copyrighted without a license. My goal is to make a B2evolution skin with it. Big thanks to http://www.adobetutorialz.com/ for publicizing their version. This work is copyrighted but you can use it under the CC Attribution-Noncommercial-Share A like license. . This is a small size sneak preview of the resulting image:

The beginning

I started with a 640 x 400 px canvas. Then I made a gradient. There was no double edged gradient available, but it's easy to do yourself. Note: lateron in this Tutorial I realized myself the image was to small. I then created a larger image (800px x 600px). I think it's best you follow this Tutorial because the size of the circle is easier to apply with this canvas.

  1. Click the Gradient tool -> Gradient -> Open Gradient Selection Dialog. This is a screenshot taken after I finished the gradient called 'Double':

  2. Within the 'Gradient Tool' create a new gradient. From the context menu choose 'Split Segment at Midpoint. Select the left section (when selected the section changes colour) and do in context menu: 'Left Color type -> Background Color' and 'Right Color Type: Foreground Color'. For the right section you do the same but you use inverse colours: 'Left Color Type: Foreground Color' and 'Right Color Type: Background color'.
  3. Set 'Blending Function for Segment' to 'Curved' for both halves (segments). That flow is a little more natural than 'Linear'. When done the Gradient tool looks like this:

  4. For Foreground I use #6b9801 and background #0d1600.
  5. Apply the 'Gradient' to the canvas from up to down. This is the first screenshot dispayed at half size:

  6. More on the 'Gradient Editor' in the Gimp docs.
]]>
Playing with jQuery admin http://www.blog.hemminga.net/index.php/tutorials/?title=title-15&more=1&c=1&tb=1&pb=1
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-01-24T05:08:09Z
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
2009-06-17T18:43:45Z
While playing with the upcoming B2evolution version I ran across an ancient piece of javaScript. And I thought I could do better in jQuery. That's what I thought.
Yes I made it several lines shorter but I still used the original logic and a major slash of that code.
Here is the problem. When you write a post you have a title. You would want to dynamically have that title in the top bar of the browser. In (X)HTML you use the <title> tag in <head> for that.
javaScript can edit the title with document.title. And that's what was used. An event listener checks if the title is changed (keyup is hte best event for that, so when you lift the finger from the key. Keydown is before the key is pressed so you lag one character. onchange is way to late. That will only happen when the inputbox looses focus.)
I'll present the jQuery code and run through it:

jQuery(function(){
	var generateTitle = function()
	{
		currentPostTitle = jQuery('#post_title').val()
		document.title = document.title.replace(/(Poster dans le blog\:).*$/, '$1 '+currentPostTitle)
	}
	generateTitle()
	jQuery('#post_title').keyup(generateTitle)
})

We make a function because we call it twice - and repeatedly when the title is changed. ;) The variable currentPostTitle is filled with the contents of the textfield. That's the proposed title. Then in the next line the document.title is changed, basically the latest content of currentPostTitle is appended to what is already there. As you can see this is the most powerful line of all. And I took it from the original javaScript. I Googled the net and found this:

$(this).attr("title", "Your text goes here")

But it didn't seem to work. All other bits of advise point to document.title.

Of course jQuery is better. I have the event easily attached to the inputfield where Francois needed to create the event and the listener. My code can go anywhere. The old code needed to be placed after the textfield. All in all it's progression.

I put up a simple version for you to play with. Have fun.


]]>

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/sessions/model/_hitlist.class.php on line 127