How to Add, Remove or Edit Environment variables in Windows 7?

To add/remove or edit Environment variable in windows 7 follow these steps:

  • Go to Control Panel
  • Click on System and Security
  • Choose System
  • Choose Advanced System Setting in the left side bar

  • In this System Properties window select Advanced tab and click on Environment Variables

  • In  Environment Variable window you can see User defined and System defined environment variables. You can Add/Remove or Edit the User variables. To Add click on New, to remove select the variable and click Delete and to edit an existing variable select the variable and click Edit.

Comments are always welcome :) It helps me keep going.

How to Add, Remove or Edit Environment variables in
Windows 7?

How to import a blog from WordPress to Blogspot?

To keep the same blog on WordPress and Blogspot, export/import feature is most convenient tool. Follow these steps (divided into 3 parts):

WordPress:

  • Go to Dashboard
  • Look for Tools in the left sidebar
  • Choose the Export feature
  • You can apply filters to select a few post
  • If you want all the posts, do not apply filters
  • Click Download Export File
  • Save the XML file

 

 

Convert from WordPress to Blogspot: Though the downloaded file is XML and blogspot/blogger allows the import of XML file it will still give you the error “Sorry, the import failed due to a server error. The error code is bX-tjg9ds“. To successfully import the blog into blogspot I would suggest you to use an online tool on website If your wordpress file is less than 1 MB, it will convert the wordpress file to a file compatible with blogspot. (If you are still having trouble downloading the file, I would suggest to use Google Chrome instead of Firefox, I faced problem with Firefox). Save This new file.

 

Blogspot/Blogger: Similar steps to WordPress. Follow these steps:

  • Go to settings
  • Choose Import

 

 

 

  • Select the new file downloaded from http://wordpress2blogger.appspot.com/
  • Your blog is imported to blogspot

 

Feel free to leave your comments :)

How to enable “call phone” in gmail?

In the fourth quarter of 2010 gmail launched its newest and most attractive feature “Call Phone” which enable a gmail user to call to any land-line/mobile phone in US and Canada for free (introductory offer). But many of the users just cannot see this “Call Phone” option at all. It looks something like this:

  • To enable this feature you must have audio/video plugin installed on your computer.
  • To install these plugins click on a friend in chat window bar.
  • In the pop up chat window on the top there is a video and audio symbol click on that and it will install gmail audio and video plugins on your computer.
  • You might not be able to see the “call phone” option yet. There is one simple reason for that. This feature is available to the users of US only. That means the default language of your gmail account should be English(US).
  • To set the default languageclick on the “setting” button on the top right of the screen in your gmail window.
  • It will take you to setting page where look for the “language” option and choose “gmail display language” English(US)
  • Save the setting and check your chat window bar. There it is. Happy calling.

Sources: http://www.google.com/support/forum/p/gmail/thread?tid=206e1af8d16ee5fe&hl=en

http://gmailblog.blogspot.com/2010/12/free-calling-in-gmail-extended-through.html

How to download various music links at once using DAP?

Most of the music download websites provides separate links for all the songs of the same album. You have to download them one by one by right clicking and choosing save target as option. This is very tedious and tiresome.

An alternate and very relieving way to download several music links at the same time is by using Download Accelerator Plus (DAP). You can download the free version of DAP here It also increases the download speed by downloading from several links at the same time. Download and install DAP.

Here I am at songs.pk. And as you can see there are several links for downloading.

  • Now to download all the links, right click somewhere on the page.
  • Choose the option “Download all with DAP“.
  • Now look for the ones which start from “http://link….” if you want click on “verify” to see the size of the file underneath the link.
  • Click on “download now“.
  • All the files will be start to download simultaneously in your default download folder.
  • Enjoy the music.

Basic Networking Commands in Unix

I would like to discuss the basic Unix commands useful for networking:

Network interfaces commands:

  • ifconfig –a —- Show all interfaces
  • ifconfig ——shows the configuration (like IP, MAC, SubNet, IPV6) of a particular interface
  • ifconfig —–Set parameters of the interface (Root only) You can set various parameters like  IP address, subnet,
  • ifconfig —– that particular interface is Up (activated) or down (deactivated)

Connectivity:

  • ping —- sends an ICMP echo message (one packet) to a host. This may go continually until you hit Control-C.  Ping means a packet was sent from your machine via ICMP, and echoed at the IP level. ping tells you if the other Host is Up.
  • telnet host —- talk to “hosts” at the given port number. By default, the telnet port is port 23. Few other famous ports are:  7 – echo port, use control-] to get out
    25 – SMTP, use to send mail
    79 – Finger, provides information on other users of the network

Arp:

  • arp –a —- Print the arp table. Arp is used to translate IP addresses into Ethernet addresses. Root can add and delete arp entries. Deleting them can be useful if an arp entry is malformed or just wrong. Arp entries explicitly added by root are permanent — they can also be by proxy. The arp table is stored in the kernel and manipulated dynamically. Arp entries are cached and will time out and are deleted normally in 20 minutes

Routing:

  • netstat –r —- Print routing tables. The routing tables are stored in the kernel and used by ip to route packets to non-local networks.
  • route add —- The route command is used for setting a static (non-dynamic by hand route) route path in the route tables. All the traffic from this PC to that IP/SubNet will  go through the given Gateway IP. It can also be used for setting a default route; i.e.,  send all packets to a particular gateway, by using 0.0.0.0 in the pace of IP/SubNet.
  • routed —– The BSD daemon that does dynamic routing. Started at boot. This runs the RIP routing protocol. ROOT ONLY. You won’t be able to run this without root access.
  • gated —– Gated is an alternative routing daemon to RIP. It uses the OSPF, EGP, and RIP protocols in one place. ROOT ONLY.
  • traceroute —- Useful for tracing route of IP packets. The packet causes message to be sent back from all gateways in between the source and destination by increasing the number of hopes by 1 each time.

Others:

  • nslookup —-  Makes queries to the DNS server to translate IP to a name, or vice versa. eg. nslookup facebook.com will gives you the IP of facebook.com
  • ftp —– Transfer files to host. Often can use login=“anonymous” , p/w=“guest”
  • rlogin -l —– Logs into the host with a virtual terminal like telnet

Important Files:

  • /etc/hosts —- names to ip addresses
  • /etc/networks —- network names to ip addresses
  • /etc/protocols —– protocol names to protocol numbers
  • /etc/services —- tcp/udp service names to port numbers

Courtsey: Prof. Andrej Duda, Wikipedia, math.uaa.alaska.edu

Java code for GUI of a chat program

I worked on the GUI of a chat program in Java. I would like to share the experience as well as codes of my program. The code which I am going to share is a stand alone GUI i.e. its not a complete chat program but just the windows without any connectivity. (I’ll also upload the running version of the complete program sometime later).

It consists of three classes, LogInWindow, ConnectWindow, ChatWindow. The features of these classes are as following:

LogInWindow:

It consists the main and the whole code is run by this class. When it runs for the first time it automatically calls ConnectWindow so that user can provide detail about itself like its name, nick name, port number etc. There are (in this example predefined) a no. of users as buttons. Clicking on a user (Buttons) opens a ChatWindow. When you exit the LogInWindow the whole program exits. The window is named “WeChat”. There are two menu option in menu bar. One is to change status and one is to connect and terminate the chat. Various Status option are:

  • Available
  • Do Not Disturb
  • Away
  • Invisible

Connexion consists of two option: Connect and Terminate. Clicking on Connect allows the user to put info about itself in the ConnectWindow (If user has already done it then it shows the previous entries). Terminate deletes all the previous info about the user.

ConnectWindow:

It allows user to put info about itself. Already discussed in LogInWindow.

User can put the following information:

  • First Name
  • Last Name
  • Nick Name
  • Display Name
  • Status Message
  • Port Number

Pressing Ok Button enters these information. Clicking on cancel simply disposes the window

ChatWindow:

Chat Window class provides different facilities for interacting with other user. It has a text field where user can enter chat. All the text is shown in a text area. There are some buttons for Voice and Video Calls as well. The chat transcript can be saved easily by clicking the save button. Closing the chat window disposes it. And it also gives calls a function while closing the chat window (So that it can be used to pass info about the closing the chat window to some other class/module, if needed).


P.S. You can find the codes here (All the code are in word file. You can copy paste these codes in txt file): GUI Code

How to make an ISO file from folder/CD-DVD?

An ISO image (International Organization for Standardization) is an archive file (also known as a disc image) of an optical disc, composed of the data contents of every written sector of an optical disc, including the optical disc file system. They are stored in an uncompressed format. Any CD or DVD can be archived by .ISO format. It is a true digital copy of the original.

There are a number of freewares available to make ISO image from folders/CD-DVD. I happened to come across this easy to use software . It can be used in 3 simple steps:

  • Start Free ISO Creator, Click “Options” to choose the file system you want to use
  • Click “Add File(s)” button to add files or folders to the list.
  • Select ISO Path (destination folder) to create ISO image file.

 

List of other free ISO creators:

  • Folder2ISO
  • LC ISO Creator
  • DVD Decrypter

Sources: Wikipedia, Free ISO Creator

Best practices to get better Battery Life for your laptop

With the time the performance of Laptop battery changes drastically. A new one gives a backup of around 3 Hrs easily but in a year only it comes down to 1.5 Hrs or may be low. That makes one think how to get better battery life for laptop. Its always good to use the best practices to get the best out of your Battery. These are some of tips to extend the battery life:

  • A laptop battery’s health deteriorates the more you charge and discharge it, running it from a power source will make your battery remain in a state of charge/recharge. Instead, when your battery gets to near 100% charged, unplug it from the power and plug it in again when it is low.
  • Avoid frequent full discharges because this puts additional strain on the Li-ion battery. While on the other hand for nickel-cadmium batteries, discharge the battery completely at least once in a month.
  • If you are using your laptop more as a desktop, I would suggest you to remove its battery and use directly from power supply.
  • Never use your laptop directly on bed. If you have to use it on bed put some hard stuff under it.  If you look closely on the back of your laptop, it stands on four miniature legs, which allow the heat to pass from it. When you put it on bed or some other surfaces like it, there will be no space for heat to pass and it can harm your computer and the battery in long run.
  • Try cleaning your laptop battery contacts at least once every few months. This can be done by using a cotton swab and alcohol.
  • It is also a good practice to charge the battery when your laptop is turned off.

How to play .bin and .cue files

If you got .bin as movie file (many downloaded movie file has .bin extension) then you have obtained a CD Image. The BIN file is basically an entire CD in one file, and the CUE file stores information on the .BIN file that is needed when burning, or mounting to a virtual CD drive. A .cue/.bin image could be anything like a Data CD or  VCD .

One way to deal it with is to use a virtual drive software like PowerISO or Demon Tools. Demon tool lite version is a free to use software. Download it, install it and run it.

When Demon tool ask for the image file browse it to the bin file. Mount it. Now the cd image is in virtual drive. Play it Enjoy it.

P.S. I found a you tube video about the same. If you are not acquaint with Demon Tool, this video will be a great help.