Monday, December 21, 2009

Mobile Partner Redialer

It seems like every mobile broadband (HSPA) connection in Sri Lanka has a very poor Quality of Service.
Initially I used a Dialog HSPA connection.
Due to their poor service recently I switched to Mobitel which was considered as a far better connection compared to Dialog.
But now things have gone wrong again. Mobitel has become a very unreliable connection. Mobitel users cannot say in idle.
It seems like they are disconnecting the idle users in order to accept new users.
If we want to get connected again, we have to keep pressing redial button for 10-15 times. This has become a pain.

I really hate this redialing thing. So I decided to write a small script to automate this.
I’m using a Huawei E220 HSPA modem with the Mobile Partner Software.

I share this small script with you hoping someone will find it useful.

This small program will run in background and keep redial for you (initially you have to press the connect button manually).

You can just wait and watch until it get connected.

This will consume some considerable amount of CPU (due to an endless loop), so make sure that you pause the script when you are not using it.

Demo Video




Download from here


Note – If someone can create a similar thing for Ubuntu it will be greatly appreciated.

Wednesday, December 16, 2009

qProxy - quick Proxy

This is a very simple extension for Mozilla Firefox which has the functionality of enable/disable proxy in a single click.
Actually I developed this extension for my personal usage. I use two connections to connect to the internet. One is the Mobitel HSPA connection (no proxy) and the other one is University Wireless network (proxy enabled).

Every time when I want to switch between networks I have to change the proxy settings.

Tools -> Options -> Select Advanced Section -> Select Network Tab -> Connection Settings -> Select No proxy or Manual Proxy

For me going through this series of steps each and every time to change the network is annoying.
So I decided to create a small extension to enable/disable proxy in a single click.

I didn’t put much effort to build this one. It cost me about 30min to come up with this solution.

For the first time you have to set the proxy settings at the Connection Settings window.

After installing qProxy an icon which indicates current proxy status will appear on the status bar. You can simply click on that icon to enable/disable proxy.


Download from here

Monday, December 14, 2009

qsFOX - My Level 3 Project



Project Description

(skip this part if you have already gone through it at http://qsfox.mozdev.org/)

qsFOX is an extension for Mozilla Firefox which enables Sinhala Unicode Reading and writing capability for Firefox. Most of the machines at internet cafes and some labs do not have Sinhala Unicode installed.

In order to install Sinhala Unicode we have to go through series of steps which takes too much of time. And lack of privileges makes it even tough for the normal users.

So it is always good to have a quick way of enabling Unicode without administrative user privileges since time is a highly considerable factor for the users who browse internet in those places.

Even though it is possible to read Sinhala Unicode text using a small trick, not being able

to write in Sinhala has become a great problem for the users who work with Sinhala Unicode (ex. Sinhala bloggers).

From qsFOX I have given a solution for this by providing both reading and writing capabilities in Sinhala Unicode for Firefox.

qsFOX comes as an extension for Firefox. Here I have developed the standard Wijesekara Sinhala keyboard.

So I hope it will be a great tool for the Sinhala Bloggers and Blog readers who are having problems with working in Sinhala in those constraint environments.

And there is an option for those who like to use the Phonetic style (singlish) keyboard.

User will be provided a UI with useful information (ex. Keyboard Layout).

The Story

For level 3 course module Programming Project (3200) we were asked to develop a plug-in for an existing code base (like Firefox, Thunderbird, Open Office, etc).

Initially I thought to develop an extension to record statistics of downloads/uploads. I asked some of my friends (Bhanu, Pahan, Nuwan) for a project idea.

Pahan came up with this great idea (I believe it is great) of developing an extension which allows users to use Sinhala Unicode in a constraint environment (without administrative privileges) which was in his mind for a long period of time. He has already created a portable Firefox with Sinhala reading capability which has some draw backs. He explained me how his portable Firefox works.

My project proposal got approved and I started the development. Initially part of the project is full of documents. Level 3 project runs very much similar to a real world project. Software Engineering course module which is conducted by Dr. Shahani Weerawarana was very helpful to gain knowledge to do the initial part of the project.

Initially I had to put some effort to learn JavaScript and XUL (XML User Interface Language) since I am very new to those two technologies. Luckily there are lots of online resources available.

First I developed the Wijesekara Keyboard functionality. It was not that easy as I thought. ‍ෙ(”Kombuwa”) caused series of troubles to me :-).

Lack of familiarity with the Wijesekara keyboard layout became a problem. Once again I got the help from Pahan to test the Wijesekara keyboard. He chats with me in Sinhala by using the extension to identify bugs.

Finally I succeeded in creating the entire Wijesekara Keyboard layout including “Rakaransha” and “Bendi Akshara”.

Implementing Sinhala reading functionality was a challenge. I created my own XPCOM component in C++ to access windows API. I am not going to describe more on that.

But you can get some idea from the following Logical view.



GUI



I think I am always good at GUI designing. I got some good feedbacks for the GUI and for the logo. I tried to make it attractive and user friendly. You can decide whether I am successful or not.

Finally I ended up all the development phases successfully on time.

If you like to create Firefox extensions I can give you a small guidance according to my knowledge.

Mozilla Developer center (MDC) is a good online resource to learn extension development.

And if you have any problems during the project you can get the help from the Mozillazine forum members. I got a good support from them (most of the times they give code snippets)

Credits

Pahan Sarathchandra for project idea, supportive ideas and testing (I can definitely say that if he is not there I will not get this chance to contribute to Sinhala Blogosphere. He deserve a very big credit for his concept and for the support he gave me throughout the project.)

Creators of Unicode Real Time converter

Creators of Malithi Web Font

Authors of articles at http://siyabas.lk/

Still there may be some unidentified bugs in this extension. If you find a serious bug please let me know.

And please add your reviews here


Sunday, June 28, 2009

A simple trick to protect OTHERS from your flash drive

As you all know most of the viruses which spread through Flash drives use the autorun.inf file to auto execute it.

You can do a simple registry tweak or you can use software like autorun eater to block the execution of the instructions on this file. Here I’m not going to describe that. What I’m going to explain here is how to stop your flash drive becomes a carrier for viruses.

In here I`m using a feature of windows which is rarely noted by users

You can`t create a file and a folder which has the same name in the same location (directory).



Ex. You can`t create a file called isuru.txt while having a folder called isuru.txt in the same directory.

So what you have to do is create a read-only folder called autorun.inf in the root of your flash drive.

What if the virus is smart enough to delete the folder autorun.inf?

For that let’s do a small trick.

MS-DOS Device Driver Names Cannot be Used as File Names



You can use this feature to prevent the deletion of the autorun.inf folder

What you have to do is create folder called CON inside the autorun.inf folder using Linux or by executing the following commands in command prompt

(x is your drive flash drive)

x:

cd autorun.inf

md .\CON\.

The Folder CON cannot be deleted from windows. Therefore you are not allowed to delete autorun.inf folder.

This will work for most of the viruses. But I can’t guarantee this will work for all the viruses.

I wrote a simple batch file to do all above tasks. You can copy this file to root of your flash drive and execute it. Get it from here.

Saturday, May 2, 2009

A Trick to identify INVISIBLE contacts in Gmail chat

Here is a simple way to check whether a contact is really offline in Gmail Chat. Actually this uses a bug of invisible feature.

First select the off the record option for the chat


Then type something and send it.
You will get a message (as shown on the picture below) if the contact is offline.



If the contact is invisible you won’t get the message.

Tuesday, April 21, 2009

OpenSolaris

Today morning I received a Sun OpenSolaris CD.

I tested the live CD with VMware. Here are some screen shots. It looks pretty much similar to Fedora10 in appearance.

Get it from here











Monday, April 20, 2009

A stable HSPA connection from Dialog ????



Today I got an unbelievable stable upload speed from Dialog HSPA connection.

See how stable it is.

I uploaded an 82MB file. 45.1KBps remained all the time.

You may ask why it is unbelievable.
Any Dialog HSPA user can answer to that question with our hard experiences with this connection :-)

Sunday, April 19, 2009

An Easy way of adding background images for JFrames/JDialogs

People who are working with Java JFrames using NetBeans IDE may have experienced that adding a background image for a Jframe is not a very easy thing (have to write some codes).
I found a cool and easy way of doing that.

Here’s what you can do

1.Choose null layout as the layout for the frame.
2.Add your all components and arrange them.
3.Add a Label and delete the label text.
4.Resize the label into full frame size
5.Get the properties window of the Label and select icon.
6.Select your background image for the icon property of the label

That’s all. Very simple.

If you want to add a component after setting the background, you can send the background (Label) behind the other components using option of the JFrame.



Monday, April 13, 2009

MiniGPS

Do you travel long distances?

Have you got the habit of falling into sleep while travelling?

Do you have a Nokia Symbian handset in your pocket?

If the answer is YES for all,

Here is what you can do for wakeup at the destination.

Psiloc MiniGPS

MiniGPS is not something related to GPS. No need of a GPS enabled handset. MiniGPS is a symbian software which detects GSM network Cell IDs and uses those IDs to identify locations. You can define locations for those Cell IDs. You can execute following events when you enter or leave a location.

Send SMS
Run Alarm (I think this is the most important one)
Change Profile
Change Bluetooth State
Change Theme

So you can run an Alarm when you enter the destination.




Note that this depends on the mobile network. So if you changed your operator you have to re-define your locations.


Download for S60 v.3 from here


Sleep Well. Wake up at the correct place :-)


Sunday, April 12, 2009

Virtual Floppy Drive


This is a simple tool which creates a virtual floppy drive in windows. You may ask what the use of a virtual floppy drive is while floppy drives are getting out of the business these days. Actually this may not be useful to everyone. But for me this is a great tool. People who are interested in dealing with bootable CDs/DVDs are facing a problem in editing floppy images since the absence of floppy drives in modern machines (specially in laptops). So this is the solution. This small application contains almost everything we needed. It supports many image types including img and ima. And it is a freeware.

You can download it from here


Hope someone will find this useful :-)