Saturday, May 16, 2009

Selection Sort Vs Insertion Sort

selection   sort
Selection Sort: Given a list, take the current element and exchange it with the smallest element on the right hand side of the current element.
insertion   sort Insertion Sort: Given a list, take the current element and insert it at the appropriate position of the list, adjusting the list every time you insert. It is similar to arranging the cards in a Card game.
Time Complexity of selection sort is always n(n - 1)/2, whereas insertion sort has better time complexity as its worst case complexity is n(n - 1)/2. Generally it will take lesser or equal comparisons then n(n - 1)/2.
Any suggestion to improve this article is always welcome!

Below you can find the Ruby code snippets:-
Selection Sort
Insertion Sort

Quickly ping Google/Yahoo to know your Connection Status.

1. Open notepad and jot down ping -t 209.85.171.100. Close and rename it as *.bat file. This is the IP address* of Google.

2. Send shortcut to your Desktop.Change icon(Optional).

1.ping   bat file 2.ping   shortcut

Note: Don’t use IP address of Microsoft.com/Amazon.com, etc as they don’t respond to ping command.

ping   google

For my broadband connection ‘Round Trip Propagation time’ of around 300-400ms(seen in snapshot above) indicates a fairly good connection speed. If you see reply from remote server, close the batch process.

*why use IP address? If the connection is not ok, the batch process will fail to execute if you simply write ping -t google.com, so you won’t be able to find the problem.

Thursday, May 7, 2009

ADSL Splitter Connection.

Last night I shifted my modem and laptop to another place, so I had to disconnect all the phone and modem connections. After reconnecting my router ‘line state’ was showing ‘Down’ rather than ‘Showtime’.

wrong   splitter   Adsl   connection

I tried to figure out the problem but was unable to do so. In the morning after much of the troubleshooting I finally figured out that the problem was with the splitter connection. Damn!!!

I have interchanged the modem and phone lines while reconnecting… what the hell?

 

splitter reverse  + splitter

Monday, May 4, 2009

Ubuntu 8.1 delivered.

Today I received my Ubuntu CD’s  which I ordered sometime back. It has come all the way from ‘The Netherlands’.

ubuntu delivered

I am so Happy :).

RSS + FeedDemon + Google Reader

rss I am not gonna tell you what is RSS? To have a quick overview see this Video.

 

I will just show how to make it work for you. Download and  install FeedDemon. If you are already using Google reader for RSS feeds just synchronize it with FeedDemon. If you are new follow the instructions below :

Open a website you want to subscribe. If you open it in Firefox RSS button will be present in the address bar itself.

RSS   FeedDemon   firefox   google   reader

or else you will find it in the website as shown below :

image

Just configure FeedDemon as your default feed reader.

feedDemon3

Now subscribe all your favorite websites and stay tuned. Happy feeding!

Thursday, April 30, 2009

BSNL Broadband + ADSL configuration ripped.

Login to the router device. It is advisable to change the default login password of your router. If you don’t know how? Click here.

Bsnl provides mainly 4 types of modem. Type I is the simple ADSL modem, I am using Type II wireless ADSL modem. I don’t know about the other two types. Or you may use your own ADSL modem but before doing that you have to configure your modem.

Open the interface setup where you would find 3 sections as shown:-

1. Internet.

image

Configure the Asynchronous Transfer mode virtual circuit ( ATM VC ). You can save your current configuration as any of the 8 permanent virtual circuit (PVCO – PVC7). Set the Virtual Path Identifier(VPI) to ‘0’ and Virtual Channel Identifier(VCI) to ‘35’.

Set the Quality of Service(ATM QoS ) to constant bit rate (CBR). You can connect either in the PPPOE or Bridge mode. Select encapsulation as Point to Point Protocol Over Ethernet(PPPOA/PPPOE) mode to avoid dialing the connection every time you connect to the internet.

image

Set the username/password encapsulation as PPPOE LLC(Logical Link Control) and connection as ‘Always On’. IP address should be set to dynamic or as specified by your ISP. Turn Default Route to ‘Yes’ so that the connection is routed via your modem itself.

2. LAN.

 lan

You may change your router IP address in the LAN section.  Now setting the DNS can be done in several ways. You may choose auto discoverable, Open DNS*, DNS provided by BSNL or maybe DNS of any other Internet provider. I have used the first option.

image

*Many of us might like to use Open DNS:

208.67.222.222 (primary)
208.67.220.220 (secondary).

3. Wireless.

wireless internet setup

If you are using Wireless LAN turn the access point ‘On’ or else it is recommended to turn it ‘Off’ to avoid usage without your knowledge.

Save the Configuration. I have saved it as PVCO.

Now go to ‘Diagnostics’ section and check PVCO.

image

In many cases ATM OAM segment and end to end ping may fail but it won’t be any problem.

image

Now go to the Status section :-

image

If you are connected it will automatically retrieve the IP address default gateway and DNS server as shown above. Line state shows the present line state of your telephone or broadband line. It will be ‘Showtime’ for the connection to be Ok.

Try pinging Google server to get a reply. The round trip propagation can be used to analyze your present connection speed.

ping round trip propagation

You are all set for surfing. :)

Maloncho Niwas Agartala

maloncho niwas

The mystery place was once famous for the ghostly figures seen at late nights.  It has also been serving as the hideouts for teens and night lovers until when the state government took the responsibility to rebuilt it. Local people say during the times of  Maharaja, the great Rabindranath Tagore use to stay here during his visit to Agartala. It is said that this bangalow has a secret underground passage to the Maharaja’s palace. For safety reasons one must not visit this place after dusk.  :o

Internet Banking – use virtual keyboard.

virtual keyboard

Identity hackers are always on the spree to install Key loggers without the knowledge of the user. Every key that is typed in into the physical keyboard is recorded as a log and is transmitted to the hacker eventually. Use of virtual keyboards can relieve you of this tension. The virtual keyboard is designed to protect your password from malicious “Spyware” and “Trojans”. Use of Virtual keyboard will reduce the risk of password theft.

Change BSNL broadband default login password?

If you have not yet changed your default password still now. Please do it ASAP.

How to change? Call your local BSNL Office and ask for the portal id to login to website for your broadband account management. The password for this account is the same as the default password provided by Dataone.

Also for enhancing your router/ADSL modem security you should change its default password especially if you are using a wireless modem.

How to change? Open 192.168.1.1 in the web browser.

address bar 

Username/password will be admin/admin by default. Set new password as shown in picture below.

You are done. :)

Monday, April 27, 2009

Blogger - modify hyperlink to open in new page.


Just add 'target="_blank"' attribute in the 'Edit Html' mode just after the href="URL of the story" in Blogger editor, the target URL will open in a new window.

for example:
original: a href="URL"
modified: a href="URL " target="_blank"

This is easy!

You can apply the same logic for images also.

Sunday, April 26, 2009

Agartala - Bangladesh border.

 agartala bangladesh border
                 Border is yet another place to have some nice time in the evening. The vast green fields and crimson sunsets makes  it quite a memorable spot.  One may occasional see airplanes against the sky as it is very near to the airport.
See  more in picasa.

addthis - bookmarking and sharing service.


Now forget adding stumbleupon, digg, del.icio.us, etc button separately in your blog. Just addthis widget and enjoy all the bookmarking and sharing services present on the web.

Sunday, April 19, 2009

Ujjayanta Palace.

ujjayanta palace

A few minutes walk from my home will bring you to this soothing palace right in the heart of the city.  Now it serves as the legislative assembly of  the state. Government opens it for tourists and local residents only during certain period of the year. The palace has ponds on both sides of its path way that was symmetrically designed.

symmetric ponds aerial view ujjayanta palace

 See more in picasa.

Thursday, April 16, 2009

Bsnl Dialup



_________________________________________________________________________________________________
Dialup number: 172222
*Use dialing rules: enter the pin code of your place.
First time users will have to register... by using username/password as netone/netone. For already registered users please see image for details.
Agartala users can see their usage details in here..
*don't forget. :)
_________________________________________________________________________________________________

Wednesday, March 25, 2009

Neermahal - 'The Water Palace'


I had again come back from my office to my hometown after quite a while. We decided to make a visit to Neermahal. It was a rainy day somewhere in the mid of May. The whole day it was drizzling with heavy showers in between. This made the journey a bit more memorable. We hired a private car and started at 8 am after having our breakfast. Our car raced against the torrential rainfall to reach Melaghar after about 4 hours. In between we took a short visit to MataBari(the famous Kali Temple), Udaipur.

Due to heavy rains there were no tourists, so we hired a big speed boat for six of us. The whole palace was ours for the time. It was my palace for the moment. The boat ride was so exciting, I just wanted to have a little more. We had much fun in the palace. The whole journey was just awesome ... See more in picasa.

Tuesday, March 24, 2009

College Lake, Agartala

college lake mbb college tilla


This serene natural lake is situated right in the capital of Tripura.  This lake was once famous for the blue lotus which is on its way to become extinct. One may feel lost in its sparkling waves away from the busy crowds of the city. Definitely one of the better places on earth.

See more in picasa.

BSNL Caller Id.

________________________________________________________________
I brought a Caller Id modem and attached it to my phone. At first I thought the modem was not working. Then I found that you have to request BSNL for the Caller id facility. Oh it was a lengthy process I had to wait for 3 weeks before I got it installed on my phone by calling 1500(BSNL North East) from my Land line number. So friends best of luck!
________________________________________________________________

Monday, March 23, 2009

Ubuntu shipit.



________________________________________________________________

I have been a great fan of Linux. I have again ordered for the free CD's of new version of Ubuntu and Kubuntu and I am quite excited about it.
You too can give a try at the Greatest OS made by a open source community.


Request an Ubuntu CD now.

Request a Kubuntu CD now.

What are you waiting for? God Bless Ubuntu community!

________________________________________________________________

Inventory Software freeware.

________________________________________________________________
Last few days I was trying to build a Inventory Management Software for my Uncle's business. He is a cloth merchant and takes Govt. contracts and orders. But suddenly an idea sparked and I started looking for a free software in the web. Finally after much of the search I collided with NCH software and found all that I was looking for. If you are looking for such a software for your inventory control of your small business then you have landed into the right place.
I have downloaded and started using 3 product suites, viz:
Cheerio!
________________________________________________________________

Sunday, March 22, 2009

Stamina Typing Tutor.

________________________________________________________________
I faced this problem many years back. Now I can type really fast all because of Stamina. It just rocks and its free! yippee.
Don't blame me for the sounds it causes while you type in it. You can enable the censorship from the settings. Good luck and enjoy typing!
________________________________________________________________