Went to Thailand

PRAGMA 12

My boss has asked me to replace him to PRAGMA 12 meeting in Bangkok. For a moment, I really thought I didn't want to go there. It is because I just came back from Japan and also the fund to go there is no more. I've used most of my money at Japan to buy souvenir, for transportation and of course eat. So, I a little bit reluctant to go.

After thinking that PRAGMA 15 will be organized at USM, so, I've decided to go and see what they will show at Bangkok. So, I asked Akma to booked airline ticket to Bangkok and I told Walisa and A that I will be there. Not many things that I need to do before going there. I just printed a few documents from PRAGMA 12 website, and pack my things into a small bag. Just 3 days there.

I woke up early morning because my flight will departing from Penang at 8.10 a.m. It was dark when I leave my home. With only 1500 bath in my pockets, I arrived at Bangkok at 8 something in the morning. Dr Chan waited for me there. We had no problem with Custom and Immigration department, so, we booked a taxi to go to Rama Garden Hotel. It is a nice place but regretfully, I'm not in the mood to capture photos. Not sure why. Maybe I just tired.

At the hotel, the receptionist asked my credit card in case of incidential. I said I didn't bring any credit card. Then she asked for cash (deposit). I said I will not drink, eat or watch anything that need to be paid. And for God sake, I just had another 1000 bath in my pocket (at that time). So, Dr Chan said, just use his credit card, but I said its okay. After a while, the receptionist didn't press the matter any more. We need to wait for 15 minutes for our room to be clean. That's okay but I'm tired.

After got the room key, I just slept at my room. I didn't wake up until 6 p.m. I was thinking how I will survive. I'm not worried about the food because the organizer has arranged lunch and dinner while for breakfast I will eat at the hotel. The problem was solved eventually after I got my salary. My wife put the money into my BSN account. Since BSN joined PLUS, so, its easy to withdraw money. Just go to any PLUS machine, and you can withdraw money.

As the newcomer to PRAGMA meeting, I think I learn a lot from there. But I feel a bit embrassed to see all other universities have progressed. Some research institutes will go towards petascale in a few years time. I feel really embrassed. But I already made up plans for USM Grid. Although I doubt about it since the fund is nowhere to be found.

I'm not sure what our government think. The government do not want to invest more into R&D but they can invest into new palace (why the heck a new palace I don't know), new plane (huh? last time I read, the other executive jets still can fly), new highway from Taiping to where (why the highway? PLUS isn't enough?) and etc. Hey macha, pour more fund into R&D laa..At least when we got better infrastructure and fund our researchers can perform better.

I really want to manage lots of nodes in the cluster. I always dreams about having a bigggggggggg room where all the USM clusters are being assembled and put into production. Huhuhu..If only the dreams can be turned into reality.

Oh, one person asked me, why we need a new 'plane' (in this case big cluster) since the current clusters are not fully utilized by people? IMHO, if I got a biggggg clusters, I will not mind to build more applications to run on top of it. And the other answer is, some of our researchers were always want to play politics than research. The other answer is it will bring awe to most USM staff. Enuff said.

This question is for Obi, just say if we have enough fund to built a biggg cluster, what will you do? Will you proud with it?

Back to the topic, the PRAGMA dinner is nice. I only go to a dinner on the Chao Phraya Princess. It is the nice dinner I ever had. The next day after the meeting, I meet with Walisa and A. Had a dinner with them. Thank you for the treat both of you. Come to Malaysia (especially Penang) guys. :)

Thais has put some superb benchmark for PRAGMA hosting (and the comfort for guest), so, its a hard work for other PRAGMA organizer especially PRAGMA 15. Herm, need to go around Penang to see nice placest for dinner. Any ideas?

Converting blob to jpeg using VB6

I know that VB6 is already 'long' ago. And people now converting into .NET. But since I only know VB6 right now and never do any program in .NET, so, when people want a software in such a short time, you need to use the platform that you really know well.

I've volunteered myself to build a program to convert image data that is store in the database (using blob or other binary type) back into image file (in a sense jpeg, bitmap, gif, tiff or png). So, this is the piece of code on how to do that. You guys should appreciate it you know because I spend 2 whole days to find this solution (yeah, yeah, I know..sometimes I'm so late in digesting information)

This program will compare the information in the database. If the info exist, the program will take only the pics. I change the variable name, table name and everything because I don't want you to know what I'm doing.


' of course you need to establish connection into the database first. I'm not
' going to tell you about it, since most people can do it

sqlCommand = "SELECT picture from tblImage WHERE pictureID='handsomeGuy'"

rs.Open sqlCommand

if rs.EOF then
' tell user to do something
else
' in this case we assume only one binary data exist in the database
Dim tempBinary() As Byte
Dim filename As String

filename = "somepath\" & "somefile.jpg"

' this is using ADO, if you use DAO, look the statement below
tempBinary() = rs.Fields(0).GetChunk(rs.Fields(0).ActualSize)

' this statement using DAO
' tempBinary() = rs!FieldsName.GetChunk(0, rs!FieldsName.ActualSize)

Open filename For Binary As #1 ' #1 is filehandler

Put #1, , tempBinary ' see put for inputting data into file

Close #1 ' close the binary file


Using that piece of code, you can convert back the binary data (store in database) into image file. But you need to know first, what the kind of data is store in the database whether it is bitmap, tiff, jpeg, gif or png.

It easy, right? Kind of. But it is only one solution out of many other solutions. So, if you want the easy one (that can convert up to 5800++ data into image file), you can use this. But as I said, there are many solutions out there. So, your choice.

Oh, I hope its helpful for you guys.