Tuesday, December 26, 2006

Memories of the Tsunami Desaster - 26th December 2004

On 26th December 2004, at 9.21 AM, Malé and other islands in Maldives was hit by devastating tsunami waves after earthquakes in the eastern Indian Ocean. Hulhumalé was also in the list of the islands which were affected by this wave.

At that time I was in Malé, at Ghiyaasuddin School hall, attending a draw taking ceremony of a scholarship that I have applied. While we were at the hall, through the windows of the hall, I saw the flood moving with waste and small containers. And when people started to standup and look outside, we heard the announcement from a coordinator that Malé was hit by a wave but he said that the ceremony will be continued coz they didn’t know how serious the situation was. However, I also didn’t took it so seriously until I got a phone call from my sister saying that Hulhumalé is flooded because of a big wave and that they have moved to the nearby mosque. Then I walked out of the hall and looked outside, was really surprised to see the big flood in the capital city. Everything was changed within a couple of minutes. Even my cycle was totally under the flood and I couldn’t start the engine so I had to walk to the ferry terminal. While I was walking around Malé, I was just wondering, what had really happened on that beautiful sunny day. There was no sign at all of a thing like this could happen to this country.

After about 2 hours, I was able to reach my island, Hulhumalé. Since, Hulhumalé is a reclaimed island which is above 3 meters from the sea-level, the affect by the tsunami was less compared to other islands of Maldives.

So to bring those memories back, here are some photos of Hulhumalé that I have collected from my friends at Hulhumale. One of the most interesting photo is the first one which was taken after about 5 minutes after the tsunami hit Hulhumalé.


After a couple of minutes when the wave hit the island of Hulhumale


People running for shelter


Protection walls are exploded..


No Admitance!! but for Tsunami...



Next day .. 27th December 2004.. Thanks for the residents of Hulhumale

Sunday, December 3, 2006

Dhiraagu Web SMS widget using ASP VB.NET and AJAX






Yesterday, I didn’t have much work to do, so I decided to surf the net to find something interesting. And while I was reading some blogs at mvblogs.org I found a PHP script written by jaa, which sends web sms using the Dhiraagu’s web server. I don’t know much about PHP, but I wanted to write a similar script using ASP vbscript, the language that I have been using for the past 3 years. But due to the limitations in ASP vbscript I decided to move to ASP VB.NET to do the server-side scripting. (in classic ASP, http web request cannot be made without using a third-party component like AspHttp)


In ASP VB.NET, the methods were much simpler than I thought. But it took about 5 hours of non-stop programming to complete the server-side part. In general, what this script does is, it passes the login information to the perl-script hosted at dhiraagu server, and when the user is authenticated, the perl-script sets a cookie named “Dhi” which has a value like ‘0653233’. After grabbing the cookie value from that page, the second request is made to the “send_message.pl” to send the message.


I have also added some additional functionality to script, which will display the remaining SMS for the day and all validations are made on server-side. AJAX (Asynchronous Javascript And XML) is used to supply the form fields with required parameters. I will release the source code for the script after ‘beautifying’ and commenting the code blocks.

Tuesday, November 28, 2006

Dynamic image resizing and caching in ASP .NET

Recently I have faced a problem of caching in ASP .NET. What happened was, I was using an ASPX page to resize the image size by passing the required image width and image path in querystring. An example image resizing tag that I was using will look like this..


< i m g src="thumbnail.aspx?filename=" width="170" />

The above tag works perfectly when it was running on .NET framework 1.1 but when I changed my server to framework 2.0 all the images displayed are the same, no matter the image path and file name was changed!! I knew it was a problem with the caching feature in .NET 2.0. So I googled for a solution for this, and figured out this cool tag to control the caching based on the parameters passed to the ASPX page. Here’s the tag that you need to place at the top of the ASPX page.

< % @ OutputCache duration="1000" varybyparam="width; filename" %>

After implementing the above code the page rendered as expected, and the caching was controlled based on the width and file name passed in querystring. You can find more information about this and the serverside thumbnail script from here http://west-wind.com/weblog/posts/283.aspx

Monday, November 27, 2006

Saturday, November 18, 2006

Web portal of Ministry of Economic Development and Trade is on BETA run

Ministry of Economic Development and Trade's webportal of general services is out for beta testing. The website address is http://services.trademin.gov.mv/. From this site you will be able to search the registered business names in Maldives. This include shops, café's, companies etc. An interesting feature in this website will be the SMS functionality. You can reserve business names for a specified duration and will be notified via email or SMS when your reservation expires. Sounds interesting dho.. but the sad news is that SMS part is not yet functional in the website but I have completed it and given to the Ministry.

Thursday, November 16, 2006

Safariyyath Maldives website hosted tonight



I have uploaded the website of Safariyyath Maldives tonight. This was a redesigning project to make the site compatible with all the latest browsers in the market and to include multi-lingual functionality. But I haven't finished the english pages yet. Now the website is fully dynamic and is scripted using the ASP VBScript and ASP .NET. Here's the link for the website, so take a look and drop a comment.. thanks.. www.jazeera-maldives.com.mv

Wednesday, November 15, 2006

Nice cloud


This is a photo that i have taken from my phone while i was going for a ride in hulhumale' (the place where i live) What do you see from this...

Tuesday, November 14, 2006

How to send Arabic email using CDOSYS in classic ASP

I have been trying this for a couple of weeks now and last night i have found a way that it could be done quite easily in classic ASP. Sending emails using the SMTP server in windows is quite easy, however i have been trying to do this for a client where he needs to send emails from the website using arabic characters when users make reservations from the website. After completing this page using a typical ASP page, i figured out that the arabic characters are displayed as ????? (question marks)..

As usual, i tried to solve this problem by searching the google to find a solution for this. I found that many people have faced the same problem as me, but couldn't find a solution. Then i tried to search the Microsoft website to find the members of the "CDO.Message" object. And finally i figured out that there is a property to change the charset of the message body.. and when i changed this charset to "utf-8" it worked!!


Here's the source code of the ASP file, so that anyone who faces this problem might find this useful..


set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
cdoMessage.BodyPart.Charset = "utf-8"
cdoMessage.From = "from@mail.com"
cdoMessage.To = "recipients@mail.com"
cdoMessage.Subject = "Arabic Email usin SMTP - CDOSYS"
cdoMessage.HtmlBody = "مرحبا بك فى المالديف"
cdoMessage.Send
set cdoMessage = Nothing
set cdoConfig = Nothing