19 november 2012

Werelds Eerste Gezongen Lipdub - Let's Kick Some Ass

Samen met mijn collega's heb ik onlangs met een LipDub mee gedaan !

Let's Kick Some ... Ass

Nu worden er ontzettend veel LipDub's gemaakt, maar deze is toch wel uniek. We hebben eigen teksten gemaakt ('we' niet letterlijk nemen hier) en deze zelf ingezongen (daar zat ik wel bij, doch ik heb me bescheiden opgesteld). Tijdens de opname deden we uiteraard wel LipDub, oftewel dit was de Werelds Eerste Gezongen Lipdub

Of dat nou een goed plan was om zelf te gaan zingen, hieronder een LipDub met de song van onze LibDub: Black Eyed Peas - I Gotta Feeling , oordeel zelf ...

Hieronder nog een klassieke LibDub voor wie liever niet naar een zooitje IT nerds kijkt maar meer romantisch van aard is, de mooiste LipDub ooit gemaakt.

..... Read more .....

19 mei 2010

Gratis WK 2010 Voetbal Pool

Doe mee met de gratis WK 2010 Voetbal Pool !

Er zijn diverse iPods te winnen.

..... Read more .....

25 juni 2009

WMB 6.1 @ Ubuntu 9.04

I have WMB with DB2 & MQ running on my Ubuntu 9.04 laptop, this blog posting shows what I have done to get that working.

<user> and <password> are the user and password that you use on your Ubuntu pc.

Ubuntu multi-media setup

If you have a default Ubuntu install then not everyting from *.ibm.com is working. To get Download Director, Education Assistant, etc working you can use below commands.
sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

sudo apt-get install ubuntu-restricted-extras libdvdcss2 libdvdread4 w32codecs msttcorefonts flashplugin-installer
sudo /usr/share/doc/libdvdread4/install-css.sh

sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-fonts sun-java6-plugin
sudo apt-get install mplayer mozilla-mplayer

Turn of Visual Effects

A bug in Java or DB2-setup give sometimes a grey screen, turning of Visual Effects solves this. (and your laptop is faster)

System -> Preferences -> Appearance -> Visual Effects -> None.

Allow other local users to connect locally to the X-Server

Somtimes you are working as the DB2 instance user, MQM owner and want to start a GUI, with below tweaks this is possible.
sudo vi /etc/gdm/gdm.conf
change "DisallowTCP=true" into "DisallowTCP=false"

sudo vi /etc/profile
add the line "export DISPLAY=localhost:0.0"

vi ~/.profile
add the line "xhost +localhost"

Add more shared memory

Tuning Ubuntu for DB2 and/or MQ can be difficult, for now we only need below setting.
sudo vi /etc/sysctl.conf
add the line "kernel.shmmax=536870912"

Change the password algorithm

The default ubuntu setting for password hashes (sha512) creates a hash thats to long for DB2
sudo vi /etc/pam.d/common-password
change "sha512" to "md5"
Change your password to make the change active, if you want to keep the same password you must do it as root.
sudo passwd <user>
Restart the machine now to make all above ubuntu tweaks active.

DB2, MQ, WMB software

Below the files I used, A total of 5.3 GB. You can get it from IBM PartnerWorld and the support sites for DB2, MQ & WMB.





DB2 install

sudo apt-get install libaio1
cd ~/install/db2
mkdir base
cd base
tar xf ../DB2_WSE_V95_Linux_x86.tar
sudo ./db2setup2
Now there are many options possible, below what I did.
- Custom install.
- Selected "Select All" and then de-select 'Informix datasource support' under servers
- Not installed the SA MP Base Compoment
- User configuration:
    DB2 administration server:
      user: db2admin
      group: db2
    DB2 instance:
      user: db2
      group: db2
    Fenced user:
      user: db2soft
      group: db2
- No autostart
- No SMTP notifications
Add yourself to the DB2 groups (in above example it is just one group named db2)
sudo usermod -a -G db2 root
sudo usermod -a -G db2

DB2 license

cd ~install/db2
mkdir lic
cd lic
unzip ../ DB2_WSE_Auth_User_Activation_V95.zip
sudo /opt/ibm/db2/V9.5/adm/db2licm -a db2/license/db2wse_u.lic

DB2 upgrade

. /home/db2/sqllib/db2profile

. /home/db2admin/das/dasprofile
db2admin stop

cd ~/install/db2
mkdir update
cd update
tar xf ../db2exc_952_LNX_x86.tar.gz
cd expc

sudo ./installFixPack

Starting the DB2 control center.

su - db2

MQ install

cd ~/install/mq
mkdir base
cd base
tar zxf ../CZ0EWML.tar.gz

sudo apt-get install rpm

sudo ./mqlicense.sh

rm MQSeriesMsg*
rm MQSeriesKeyMan*

sudo rpm -i MQSeries* --nodeps
Adding root and yourself to the mqm group.
sudo usermod -a -G mqm root
sudo usermod -a -G mqm <user>

MQ update

cd ~install/mq
mkdir update
cd update
tar zxf ../7.0.0-WS-MQ-LinuxIA32-FP0002.tar.gz

rm MQSeriesMsg*
rm MQSeriesKeyMan*

sudo rpm -i MQSeries*
Starting the WebSphere Exploper
sudo strmqcfg

Broker install

cd ~install/broker
mkdir base
cd base
tar zxf ../C19YSML.tar.gz
cd messagebroker_runtime1

sudo groupadd mqbrkrs

sudo ./setuplinuxia32 -console
Adding root and yourself to the mqbrkrs group
sudo usermod -a -G mqbrkrs root
sudo usermod -a -G mqbrkrs <user>

Broker update

cd ~install/broker
mkdir update
cd update
tar zxf ../6.1.0-WS-MB-LINUXIA32-FP0004.tar.Z
cd disk1

sudo ./setuplinuxia32 -console

Toolkit install

cd ~install/toolkit
mkdir base
cd base
tar zxf ../C19Z2ML.tar.gz
tar zxf ../C19Z3ML.tar.gz
tar zxf ../C19Z4ML.tar.gz

cd disk1
sudo ./installToolkit.sh
The default location is a bit strange, eq /opt/IBM/ , all other IBM software is installed under /opt/ibm/ (under Linux those are 2 different directories), I used below targets.

Toolkit - Upgrade - Internet connection

Online (internet connection)
sudo /opt/ibm/toolkit/manager/eclipse/IBMIM
Click on upgrade (twice, once for IM and once for WMB)

Toolkit - Upgrade - no internet connection

cd ~install/toolkit
mkdir update
cd update
mkdir im
cd im
unzip ../../agent.installer.linux.gtk.x86.zip
cd ..
mkdir wmb
cd wmb
unzip ../../MB6100_6104.zip

sudo /opt/ibm/toolkit/manager/eclipse/IBMIM
create 2 local repositories ( file -> preferences )
and update the software (twice, once for IM, once for WMB)

Starting the toolkit

/opt/ibm/tookit/wmb/eclipse -product com.ibm.etools.msgbroker.tooling.ide
Btw: The toolkit is the only thing that has installed itself in the Ubuntu menu: Applications => IBM Software Development Platform

Localy installing Information Centers

Both DB2 and MQ have options to install the Information Center as a service, below a portable solution that you can put on your USB stick and use on every Linux machine.
cd ~install/info
tar zxf db2_v95_linuxia32_nonroot_infocenter.tar.gz
unzip WebSphere_MQ_V7_Information_Center_Lin_TGZ.zip
tar zxf WebSphere_MQ_V7_Information_Center_Lin.tgz
tar zxf wmb_help_linux.tgz

cd ~
mkdir InfoCenters
cd InfoCenters

mv /home/herbert/install/info/DB2\ v95\ Information\ Center/ db2
mv /home/herbert/install/info/InfoCenter_for_Linux/ mq
mv /home/herbert/install/info/ibm_help wmb

vi db2/help_start
add option '-port 25001'

vi mq/ibm_help/help_start.sh
add option '-port 25002'

vi wmb/help_start.sh
add option '-port 25003'

chmod 755 wmb/help_start.sh help_stop.sh
chmod 755 wmb/jre/jre/bin/java
vi start.sh
cd `dirname $0`

cd db2
nohup ./help_start &

cd ../mq/ibm_help
nohup ./help_start.sh &

cd ../../wmb
nohup ./help_start.sh &
vi stop.sh
cd `dirname $0`

cd db2
nohup ./help_end &

cd ../mq/ibm_help
nohup ./help_end.sh &

cd ../../wmb
nohup ./help_end.sh &
Make the scripts executable.
chmod 755 start.sh stop.sh

Creating the Default Configuration

The Default Configuration Wizard is not working for me. It thinks that my unix password is wrong, and worse, it does not see that my user is in de DB2 groups. So I created the default configuration by hand.
. ~db2admin/das/dasprofile
db2admin start

. ~db2/sqllib/db2profile
db2 create database DEFBKD61
Now we must make an ODBC entry.
sudo vi /var/mqsi/odbc/.odbc.ini
and add below lines
Description=DB2V9DB DB2 ODBC Database
Create the config manager and the broker.
. /opt/ibm/mqsi/6.1/bin/mqsiprofile
mqsicreateconfigmgr WBRK61_DEFAULT_CONFIGURATION_MANAGER -i <user> -a <password> -q WBRK61_DEFAULT_QUEUE_MANAGER
mqsicreatebroker WBRK61_DEFAULT_BROKER -i <user> -a <password> -q WBRK61_DEFAULT_QUEUE_MANAGER -n DEFBKD61 -u <user> -p <password>
The mqsicreate.. commands are creating a queuemanager if needed, however the listener is not created ( ^D means you must press control-D there )

Ok, let's start it:
Wait a few seconds and then look at the result.
tail -n 50 /var/log/syslog
Now we can start the Broker toolkit to add the Default Configuration to our workspace.
/opt/ibm/tookit/wmb/eclipse -product com.ibm.etools.msgbroker.tooling.ide
If you want to import examples into your workspace it is important to use below names for the Domain connection, see also the screen-shots.

Server project: LocalProject
Connection name: LocalDomain.configmgr

Starting and stopping

Finaly we can create a start and stop script, it combines everything installed/configured above.

Start script.



. ~db2admin/das/dasprofile

db2admin start

. ~db2/sqllib/db2profile


. /opt/ibm/mqsi/6.1/bin/mqsiprofile


nohup db2cc &
nohup strmqcfg &
nohup /opt/ibm/toolkit/wmb/eclipse -product com.ibm.etools.msgbroker.tooling.ide &

stop script


. ~db2admin/das/dasprofile
db2admin stop

. ~db2/sqllib/db2profile

. /opt/ibm/mqsi/6.1/bin/mqsiprofile


..... Read more .....

6 juni 2009

pQg - New release, new name

Hi, I have released a new release of my SQL to JDO wrapper for use at Google App Engine. Of course the name changes at every release, it's now pQg, PHP with SQL on Google App Engine.

It is still in an early stage, it's a hobby project.

See it live @ Google App Engine

For now this is the Manual :-)
..... Read more .....

1 juni 2009

How to use pQg

Ok, there are still a lot of bugs and most of the functionality is not yet implemented, but here is a HOW-TO posting about using pQg in your own PHP scripts at GAE.

pQg stands for PHP with SQL on Google App Engine, with pQg you can use SQL statements in PHP at Google App Engine.

..... Read more .....

31 mei 2009

pQg = PHP with SQL on GAE

I have made some progress on my SQL to JDO wrapper for PHP at GAE. There is a new example PHP script with lots of neat SQL statements.

The SQL to JDO wrapper has now a new name. It is pQg. What means PHP with SQL on Google App Engine.

Look at below PHP script. Look at the many SQL statements in it, they are working!


// pQg-Demo.php

echo "<html><body><pre>";

// Import the JDO classes for the database

import myDatabase.person;

// The database in use (must be the package for above classes)

$pQg_database = 'myDatabase';

// Include the ROM-PHP-GAE source file.

include "WEB-INF/pQg.inc";

// Start our demo with a empty table.

sql("delete from person");

// Fill the database with the test set.

$jan = sql("insert into person (firstName, lastName, email, salary )
values ('Jan', 'Modaal', 'j.modaal@het.net', 2500 ) ");

echo "Added Jan to the database with primary key $jan \n";

$john = sql("insert into person (firstName, lastName, email, salary )
values ('John', 'Doe', 'JOHN@GMAIL.COM', 5000 ) ");

echo "Added John to the database with primary key $john \n";

$jane = sql("insert into person (firstName, lastName, email, salary )
values ('Jane', 'Doe', 'JANE@AOL.COM', 4000 ) ");

echo "Added Jane to the database with primary key $jane \n\n";

// Let's see what is in the table right now


// getField, get a single field.

$salary = getField(" select salary from person where firstName = 'John' and lastName = 'Doe' ");

echo "The salary of John is $salary \n\n";

// getRecord, retrieve fields from 1 records.

$record = getRecord(" select strtoupper(FiRsTnAmE) as FIRST, strtoupper(LaStNaMe) as LAST
from person where id = $jane ");

echo "Who is number $jane? It is: " . $record['FIRST'] . ' ' . $record['LAST'] . "\n\n";

// Jane is getting a raise.

sql("update person set salary = salary + 1500 where id = $jane");

// Make url's from the emails

$count = sql("update person set email =
'<a href=\"mailto:' . strtolower(email) . '\">' . strtolower(email) . '</a>'

echo "Transform emails: Updated $count record(s) \n\n";

// Jan is fired

$count = sql("delete from person where id = $jan");

echo "Fire Jan: Deleted $count record(s) \n\n";

// This is the end result.


// Close the Datastore connection (the open is done on first usage)


echo "</pre></body></html>"

// Print all records in the person table.

function print_table() {

// getRecords, retrieve n records from the database.

$records = getRecords("select * from person order by salary desc");

echo '<p><table border="1">';

// Print the fields name by using the key's from the first record.

echo "<tr>";
foreach($records[0] as $key => $field)
echo "<td> <b> $key </b> </td>";
echo "</tr>";

foreach ($records as $record) {
echo "<tr>";
foreach($record as $field)
echo "<td> $field </td>";
echo "</tr>";

echo "</table></p>";

Below the output of this script.
Added Jan to the database with primary key 1
Added John to the database with primary key 2
Added Jane to the database with primary key 3

  email     firstName     lastName     salary     id  
  JOHN@GMAIL.COM     John     Doe     5000     2  
  JANE@AOL.COM     Jane     Doe     4000     3  
  j.modaal@het.net     Jan     Modaal     2500     1  

The salary of John is 5000

Who is number 3? It is: JANE DOE

Transform emails: Updated 3 record(s)

Fire Jan: Deleted 1 record(s)

  email     firstName     lastName     salary     id  
  jane@aol.com     Jane     Doe     5500     3  
  john@gmail.com     John     Doe     5000     2  
I will upload this script and a zip files with sources soon to the GAE site for it. First I must look into indexes. It works fine on the development environment. However on GAE it complains that there are no indexes. Somehow those indexes are not auto-generated on my development machine.

For now you can find the sources here

To use this zip file you must first create a PHP enabled GAE project inside Eclipse and then copy the sources from the zip file to the same directory locations as in the zip file. ( Click here for instructions how to setup an PHP enabled GAE project in Eclipse )
..... Read more .....

27 mei 2009

Creating, retrieving, updating & deleting records in PHP @ GAE

Google uses BigTable as the database in Google App Engine (GAE). This article uses the JDO layer with the Datastore Java API to create, retrieve, update & delete Database records in PHP at Google App Engine.

The starting point for this example is an GAE project in Eclipse with PHP, see this blog posting to set that up.

First create a java class for setting up the database connection, save below file as src/database/connection.java in your Eclipse GAE project.
package database;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

public final class connection {
private static final PersistenceManagerFactory pmfInstance =

private connection() {}

public static PersistenceManagerFactory get() {
return pmfInstance;
Create a Java class with JDO annotations for every database table you want to use, below the one as used in this article, save it as src/database/person.java in your Eclipse GAE project.
package database;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class person {

@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long person;

private String firstName;

private String lastName;

public Long getPerson() {
return person;

public String getFirstName() {
return firstName;

public String getLastName() {
return lastName;

public void setFirstName(String in) {
this.firstName = in;

public void setLastName(String in) {
this.lastName = in;

Above Java code has the same functionality as below SQL code (please make no nasty comments about the java folks)
firstName TEXT,
lastName TEXT,
PRIMARY KEY (person)
Now we are ready to create PHP scripts that uses GAE BigTable as database! Below the PHP source that will be used as a template for every example.

echo "<pre>";

// Import the java code for setting up a database connection.
import database.connection;

// Import the table definition class
import database.person;

// Setup a database connection.
$connection = connection::get()->getPersistenceManager();

..... example code goes here .....

// Close the database connection.

echo "</pre>";

Creating records in the database can be done with below PHP code.
$record = new person;



$key = $record->getPerson(); // Not the record but the field person that is primary key

echo "Added 'John Doe' with number $key in the database \n";

$record = new person;



$key = $record->getPerson(); // Not the record but the field person that is primary key

echo "Added 'Jane Doe' with number $key in the database \n";
Retrieving records from the database, that can be done with below PHP script.
$query = $connection->newQuery("select from database.person");
$results = $query->execute();

foreach($results as $record) {
echo "Key: " . $record->getPerson();
echo " Name: " . $record->getFirstName() . " " . $record->getLastName() . "\n";
Above examples prints all records from the table, of course you can change that, use something like below
$query = $connection->newQuery("select from person where person == 5");
$query = $connection->newQuery('select from person where lastName <> "Doe"');
A Update example below.
$query = $connection->newQuery('select from database.person where firstName == "John"');
$results = $query->execute();

$record = $results[0];


The delete example:
$query = $connection->newQuery('select from database.person where firstName == "Jane"');
$results = $query->execute();


See here for a proof of concept how you can use 'normal' SQL in PHP at GAE

Sources from this article
..... Read more .....