Monday, December 31, 2007

Getting a passport in a hurry?


I had to get my passport ready quite quickly for a business purpose. I was able to get it done within 1 day from department of Immigration and Migration located at Punchi Borella. Place is commenly known as Passport office. So if you are also in a hurry this is what you want to do. First get 3 photographs of passport size. Then get a certified copy of your birth certificate. And you are ready to go. All you have to do it take them and go to Passport office. You can go there using 144 or 103 from Pettah and you will have to get down from the halt just after Ananda College, Maradana. After you get down ask for passport office and you will get many of people asking whether you need an application and JP signed. Just catch one guy and get him ceritify your photo and signature for about Rs 100.00. After you are done will application filling go to the passport office and handover the application. This should be done before 12 noon if you want it within a day.
And another one important thing is that you will have to take documents to confirm your profession and an acceptable one too. For example I took a letter from the Company confirming my designation. But they insisted that I should have the degree certificate. Since I didn't have a degree certificate yet I just had to get the passport without the designation. But sometimes you might get around this if you meet the less strict guy. But who knows! I was pissed off but there wasn't anything that I could do! Also don't forget to take Rs 7500/= per one day all countries passport.

Learning to drive


After a long long time I thought of getting the license. I have given up the driving practice priviously due to busy academic schedule of the university. Not that I'm quite free now but this time it is like now or never. So I decided to get some help from a Learners and get it done. At the moment I can faily well drive. But I'm poor in reversing :(...

Wednesday, December 5, 2007

ZOO



After 13 year of lapse I had a chance to see the Dehiwala zoo with Osandi. It was a wonderful experience for us. It both gave us lot of fun and remind me the child hood, when I visited zoo in 1994 as a school boy. Ticket for the zoo is Rs 50/- per head for local tourists. Don't remember the amount for foreign tourists :(. As I remember something Rs. 1000+. Also it was not far away from the Galle road. And it took about 8 Rupees from the Dehiwala Junction.




It took us about 6 hours to cover the whole zoo. Except for few ill directed directions errors, directions given was quite handy and was adequate for a tourist to find his way around the zoo in an organized way. And as in any zoo there were animals! (You know right?) And there were lot of them including many I don't know. All in all it was wonderful experience.
So here are the photos


Monday, November 5, 2007

Does your firefox seg?



I had this terrible problem of seg fault of firefox. Finally after several weeks of googling I was able to work round the problem. This is the problem that I had with firefox........
$ ./firefox
./run-mozilla.sh: line 131: 6582 Segmentation fault "$prog" ${1+"$@"}

This problem comes from the SCIM package. It's broken since Debian switched from gcc3 to gcc4. Also not to mention that many others are also broken including Ubuntu. The package maintainer knows it but it seems the problem is not trivial (I don't know the details). Other applications like Acrobat Reader also crash because of SCIM.

There are two solutions:
1) Deactivate SCIM only while launching Firefox: "GTK_IM_MODULE=xim ./firefox" Of course you
won't have CJK input in Firefox. Anyway it won't really matter much.

e.g. $GTK_IM_MODULE=xim ./firefox

2) Stop using SCIM (switch to UIM)

Do the (1) first to get sure the problem comes from SCIM.

At the moment I havn't figured it how to switch from SCIM to UIM. But If I do I will let you know from this blog. Hope this is helpful for the people who have the same trouble.



Tuesday, October 30, 2007

Visit to Galle fort


I got a chance to go to Galle fort few weeks back for the first time in my life. Also Osandi was there with me. She was dying to go the Galle fort for ages. Not to tell that she would give anything for the travelling :). Finally she was able to go there with me.
Galle fort was built by Dutch few centuries back. Today it is a world heritage site and an attraction to local and foreign tourists. Galle fort now over looks the Galle International Cricket stadium. Also not to forget that view towards the sea is just Amazing...........

Now @ Dehiwala


We left our beloved hostel last week and came to a place at Dehiwala. It's very close to Dehiwala junction. I together with Dimuthu, Hiran, Omega and Sameera are at the new place. Since we rented a home this time there was no furniture at the beginning. Slowly but surely we have purchased some of the furnitures. Here are some of the scenes from the new boarding place (and also my new mug)......

Here are photos from ERU Symposium


It took me a while to download the photos from my Phone to the laptop. Anyway here are the photos taken at the 13th ERU of University of Moratuwa at Taj Samudra, Colombo. There I presented the paper for our final year project "A Web Development Framework for Sport Event Management System". Here are some of the photos taken while we were there...

"Thala" at Matara


Last Sunday Famous Dance group Channa-Upuli came to Matara. Osandi and Me was there to witness great display of traditional and modern ballets. Also one of the leading Drum Artists in Sri Lanka, Jananath Warakagoda was present. Many of the dancers seems like quite yound people, not the ones we see on TV most of the time. Yet they performed exceptionaly well. Event was great!, but organizing could have been better(It was organized by OG of Sujatha BV).

Wednesday, October 24, 2007

Have any problem with volume control settings in Debian?

I have been having this problem of volume control setting is not being saved in my Debian lenny. Finally I was able to get some help from #debian IRC people @ freenode and fix that errors. As I understood settings and things like that related to audio comes with alsa-util. So I installed it and problem was solved.

Friday, October 19, 2007

Couple of things about VI

I'm now completely working on Debian and my true friends are vi and grep. Since Debian installations doesn't provide much of the things out of the box, we will have to configure most of them. Last week I was able to get syntax highlighting and tabs as spaces in my vi. If you want to save these settings permenantly put thse commands in .vimrc in your home(just $cd to get to ur home dir).
$cd
$vi .vimrc
(press i to get to insert mode for vi)
syntax on
:set expandtab
(pres ESC for command mode and type :wq to write and quit)

Now you are good to go.
Also in the vi command mode u can issue :set all to view all the possible options and :set to view your current configuration.

Getting missing man pages in Debian new installations

As some of you may know when u install Debian(most likely Ubuntu too) you will not get many thing in the first place if you did a net install. So as a developer one of the most important thins is that u need man pages which are unfortunately not avialable. To install man pages... try

#apt-get install manpages-dev

Also if you want to see where man pages are located issue

$manpath

Hope this will help others out as I found it very difficult to get that fixed.

Wednesday, October 3, 2007

PERL Regular expressions

“Hello world” =~/world/ -> evaluates to true

“Helllo world”!~/world/ -> evaluates to false

$word= “world”
$_=”Hello world”
print “It matches “ if $world

“Hello world”=~m!world!
“Hello world”=~m{world}

Meta characters

{} [] () ^ $ . * + ? \

Escape sequences

\t \n \033 \x1B

Anchor meta characters

$ = end

^ = beginning

Character classes

/[b,c,r]at/ - matches bat, cat and rat

/yes/i - here i denote case insensivity

Special charactors for character classes are -]\^$

‘-‘ rage operator
/item[0-9]/

If – is first/last in the class it is treated normally

Perl abbreviation for common char classes

\d – digit [0-9]

\s – whitespaces [\ \t\n\t\f]

\w – wordchar [0-9a-zA-Z_]

\D – negate \d

\S – negate \s

\W – negate \w

. – matches any character but “\n”

Word anchor - \b

$x = “Housecat catenates house & cat”

$x = ~/\bcat/
$x = ~/cat\b/
$x = ~/\bcat\b/

Alternation meta character |

“cats and dogs”=~/cats|dogs/

Grouping hierarchical matching…

Grouping meta characters ‘()’

/house(cat(s|))/

Extracting matches

$time =~/(\d\d):(\d\d):(\d\d)

$hour=$1
$min = $2
$sec = $3

/(ab(cd|ef))((gi)|j)/

$1 $2 $3$4

Bock referencing (\1,\2…)

/(\w\w\w)\s\1/ - matches words like “the the”

Matching repetition

a? – 0 or 1 a’s

a* - 0 or more a’s

a+ - 1 or more a’s

a{n,m} – least n not more than m

a{n,} – at least n

a{n} – exactly n

xx/xx/o – row substitution

xx/xx/g – global

Search & replace

s/regex/replacement/modifiers

$y = “’quoted modifiers’”
$y=~ s/^’(.*)’$/$1/
$x=”I batted 4 for 4”
$x =~ s/4/four/g

#resulted in I batted four for four

s///, s!!!, s{}{}

s{}//, s’’’

The splitter operator

$x = “Calving and Hobbes”
@word = split/\s+/,$x
#$word[0]=’calving’
#$word[1]=’and’
#$word[2]=’Hobbes’

Tuesday, September 18, 2007

Great test tool for web apps

Even thought our final year project was a web application framework, we weren't able find a good enough testing tool to test the web apps. Finally I found the solution from Amil ayya. It is a tool called Selenium. It have several cool features and web application tests can be automated using it. Also there is a macro recording which is kind of cool way to automate test applications. Also it can test application using several browsers. If you are into web applications development, I will tell you this is quite a handy tool. Also don't forget the firebug ;). More information about Selenium can be found from http://www.openqa.org/selenium/. BTW Selenium here is not as in Chemistry ;).

Saturday, September 15, 2007

I've got a new mobile



Finally I've decided to the give away my long standing Samsung X100 phone for more feature rich Sony Ericsson W810i.

Also with me, Osandi and Omega got the same model. Before us Dimuthu and Nirman got the phone. So all in all W810i is becoming a trend. :)
Phone seems to be really a good one. It covers all most all the things I want. Most important feature of it is the cool earphone set. This is more cool to me as those are only earphones that can be stucked in my ears. Hope others will also follow the same trend. :)
More information about the phone will be followed.

Pathetic Sri lankan railway/police

It's a week since Osandi lost her phone at Pettah railway station while she was in the girls' rest room. Those memories were brought back when I saw yesterday news, where fair amount of people protesting poor quality of service of Railway by blocking the train transport and creating chaos. And funny part about it that all station master, fellow from transport board and the minister accept that there are misconducts by Railway. And like in Sri Lanka, no action is taken so far to irradicate any problems. Same happend when we went to complain the phone was lost. First it was the station police, who said that those sort of stealing happens every day and you can make a compain go home and forget that anything like that happened. Even the women who is looking after the things in the women rest room says that she has no idea what happened to the phone. I thought here job is to look after things! If someone (A thief) is coming each and every day she should be able to note down he/her. Also it wouldn't be difficult to identify a thief if she's careful enough to link between thefts and the people appearing in a theft scene. It can be assumed with common sense that people working there including the railway staff and some police members may be involved in the theft taking place in the railway station. Also when we went to the police to put an entry, they were not very keen to take down it. BUT it is of utmost important as your SIM card may be used to carry out illegal activities after steeling and only way to protect is to report your loss to the police. Also they requested the IMEI number of the phone, which I didn't have any idea of. Then I figured out that it is the number used to identify the phone uniquely. You can find out the EMEI number of anyphone using *#06#. It would be useful to take that down. Also I learnt from the police and Mobitel that it is possible to track down the EMEI number from the logs of the servers. But required a court order to do so. But stealing of phone under the worth of 30000 isn't good enough to get a court order. (It's funny how law allow thiefs to get away). Anyway if you have access to servers you can track it down as every call that is being made using the phone record phone number and the EMEI number of the phone. BUT most IMPORTANT of all things is that BE CAREFUL every where you go.

Thursday, September 6, 2007

Photos from campus are here!

Finally I'm receiving photos from people who took them. These are few photos taken by Saranga's Phone( or Camera?).








At Department, Near Microsoft lab










At Department, Near Microsoft lab









With Saranga and Pati(driving), Going out for our last lunch of Uni life.












Inside the final year research lab with Tripod(from June term video production) in hand

Monday, September 3, 2007

I'm Employed!!

Last few days lot of thing happened! Latest of them is now I'm employed at Wavenet International (pvt) ltd. It's too early to comment of what I do and how new life with working. So more information will follow in coming weeks. And before that we spent last few days of our campus life filming the short video. It has been 4 years from the first day when I stepped in to the campus. Time has flown away like a bullet not even letting us enjoy the campus life. Some times I feel very sad for being a campus like our one since it offers no joy at all. It's just studying and studying.
At least we could forget such thing by wonderful subject like video production in the June term. More on the video production will be posted as soon as we are done with the video. Also before we finished shooting of the video, we were busy taking photographs inside Uni. Actually I took more photos than whole my University life in last week. Hopefully I will upload then here when Sujith and Saranga return them to me.

Wednesday, August 29, 2007

First few dates with Lenny!!!




Ok, let me answer your first and most demanding question - Who (the hell) is Lenny?. To start with Lenny is not a girl!!!. Lenny is the name given to the Debian testing distro (Sid is another name for Lenny). Penny helped me to get the system up and running with latest debian distro. It was her suggestion to install Lenny. It seems pretty cool. I'm still trying to get hold with the different way of doing things in Debian. I'm now pretty much ok with apt commands. But I am quite struggling with the commandline editing tools as keys act little different from that of Fedora.
Anyway it seems really wonderful experience to work with it. First of all it identified my ADSL modem in the first place and then installed almost all the drivers I need to run the system. Then I had this little problem with getting apt-get working. Luckily for me Penny was there to help. Then I started working on the graphics which was not identified correctly by Lenny. I was able to fix it with little googling on ATI graphics and debian. Then with the help of Penny and some other blogs and forums I was able to install gnome windows manager. That is about it for the moment and I hope to write more about my Debian experience in coming days...

Monday, August 27, 2007

Buying an iPhone!!



People who are eagerly waiting the arrival of Apple, iPhone to Sri Lanka will have to wait till the first quarter of 2008. Epsi computers, who are the dealers in Sri Lanka for Apple products said that immediately after the release of the phone to Asian market, it would be available in Sri Lanka. Also it said that iPhone will be available on European market late this year (Octomber/November). Finally let's hope that apple would not cut a deal with any telecom operator, when selling the gadget in Sri Lanka as it did in USA.
And in US, youngster called George Hotz has unlocked the iPhone, to be used on any other network than authorized AT&T. More on how to unlock the phone is available from http://iphonejtag.blogspot.com by Hotz.

Buying a ADSL modem for Rs. 5250/= and DSL Router for Rs. 500/=

As I got the ADSL package, I got a ADSL modem(D-Link) from Unity Plaza for Rs. 5250/=. Which happens to be the cheapest available. Then few days later, I was there(Unity plaza) again for some other work, then there I leaned that there is a bargaining sale on ground floor on computer gadgets. So I got there and was amazed to find a DSL/Router(Aztech NA3000) available for just Rs. 500/=. I couldn't believe my luck. Correctly there was "No warranty". So I got the equipment with 2 utp cables, power pack with it's cardboard packing. But only problem was missing manual/installation cd. Then I searched the net and found a manual for the exact router. Then I tried to reset the router and give the username and password(admin and epicrouter respectively) to login. But it didn't work!! :(. I posted to here and there and googled and even mailed the technical support of the product. But they were of no use. Anyway 4 ethernet ports are working. (Thank god !). If you are reading this and know how to crack this username/password please be kind enough to let me know.

Field Photo is taken

After four year of academic hard work at the University of Moratuwa, our time as undergrads are rapidly approaching it's final hours. So it's like to take souvenir's , photo graphs, etc to remember things that we loved for last four years. As a part of that process field photo graph for the batch was taken on 24th of Aug, 2007 (last Friday). Fortunately All of them were present on that day and we had such a wonderful morning taking photographs and standing under the blazing sun later on. Anyway official batch photo is yet to be released. But luckily enough we had some digital cameras to take some photos. So here they are ...













































Batch photo for our batch (batch 03 or 2002/2003 (a) ) is scheduled to be held on 7th Sept. , which happens to be the first week at work for me and many others :(. I sincerely hope that I'd be able to get a leave on that day as It's of utmost important as an undergrad.

ADSL speeds of SLT

It's been 2 weeks since I got ADSL Home express package for my home @ Matara. It has been quite disappointment that speed of 512Kbps that is guaranteed by the SLT, is no where near the given levels of speeds. They are in the range of 64-128Kbps. I have heard from friends that there is these problems associated with SLT. I sincerely hope that SLT would correct these things after the complaints I made to SLT ADSL hotline. And also give a service that worth paying for.

Thursday, June 21, 2007

My first in a long time post!!

Hi all,
It has been sometimes since I last wrote somethings on a blog. Anyway I'm back. Finally all the academic related exams for BSc. Eng is over. Also there are two June terms to finish. Hopefully we will be graduating in this November. Final exams were pretty ordinary as there were no enthusiasm among people. They are more less bored with exams. Anyway we had some great time doing exams in last couple of years.
These days I have two major concerns. One if GSOC 2007 and other one is final year project. Both need lot of attention right now. I'm trying to do as much work as possible. Hope to update more on these things on this time around. c ya later.