Friday, October 1, 2010

මගේම පැටී

කොච්චර මට hate කලත්
හැමදාමත් මගේ මතකයේ
රැජිණ වෙලා
මගේ ලගින් ඉඳීවි ඔයා
මගේම පැටී!!

Thursday, September 30, 2010

අනේ මගේ කට!!!

හැමදාම ඔයා ඉදපු
Bordin එක ලගින් යද්දි..
ඔයාට Films දෙන්න ආව මතකයි...
ඒත් මට අන්තිමේදි කීවෙ  "දර්ශන ඔයා ඕක ඕනෑම කෙල්ලෙක් වෙනුවෙන් කරයි"
 අනේ මගේ කට!!!!

Thursday, July 29, 2010

Logging off using the terminal

Open a terminal and type:
gnome-session-save --kill

if you dont want the log off window add --silent

Tuesday, July 27, 2010

How to install compiz

Compiz is a very great desktop effect application that runs on Linux environment, here how to install it

type in the terminal:
sudo apt-get install compiz compizconfig-settings-manager compiz-fusion-plugins-main compiz-fusion-plugins-extra emerald librsvg2-common

and

sudo apt-get install fusion-icon

Friday, July 23, 2010

How to create a custom symlink

If you compile some custom program and you need to run it without adding path
you can create a symlink(symbolic link) so that it will directed to the specified link

open terminal
type:
sudo ln -s /home/darshana/ns-allinone-2.34/ns-2.34/ns /usr/bin/ns

Here I explained to add the symbolic link for ns (network simulator)

How to view CPU and RAM information from terminal

In some cases you are unable to use system monitor or any other tool to check what is your processor type, how much memory in the RAM. You can use /proc to view the information

To view cpu info
open a terminal
type:
less /proc/cpuinfo

To view ram information
open a terminal
type:
less /proc/meminfo

Sunday, July 18, 2010

How to convert a String to date object in Java

I am going to illustrate using an example

import java.util.Date;
import java.text.SimpleDateFormat;
public class test{
public static void main(String args[]){
String dateStr = "26/08/2010";
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");

try{
Date date = formatter.parse(dateStr);
System.out.println("Date is : " + formatter.format(date));
}
catch (java.text.ParseException e){
e.printStackTrace();
}

}
}