Tuesday, April 19, 2011

UK government strict the international student rule


UK government has announced this month that next year (2012) April onwards change the international education student's rule.According to the new rule (Post Study work)PSW of the 2 years have been remove. So next year April onwards international student will not get the PSW.

Government had to take this decision,because this year unemployment rate have been increase.Currently student very hard to find part time jobs and also currently London is so crowded.All these facts put the government into that decision.So if any one plan to come to UK for education,think about it twice.

Tuesday, April 12, 2011

SL on 2011 World cup final



Sri lanka cricket team play well on the 2011 world cup.But fortunately or unfortunately they lost the last final match of the world cup.But as a Team they performance well.No duet on it.Kumara Sangakkara played a well role as a captain.Also he play good role on wicket keeping.As a batsmen also he played well.Mahela played the well role as a vice captain .Also he play well as a batsmen.Dilshan and upul Tharanga play good opening partnerships.Mathews play good role on middle order as a batsmen as a bolwer.Malinga bowled superbly.Muralidrana,Ajantha Mendis bowled well.Finally whole team work as a one team.

Finally but not least,Aravinda De Sliva play good role as a selecting Committee member.

Finally we play well as a team,we achieve what we can.I am really happy as a sri lankan.

Thursday, January 6, 2011

How to extract password protected zip file using java program

After the without password zip file extraction process, I start hunting password protected zip file extraction process. After Two days research I found out a web site, which is available free and open source jar file .From that jar file we can extract a password protected zip file. That jar file is zip4j.jar file .you can find out this jar file and it’s information in the following URL.

http://lingala.net/zip4j/

I have downloaded the zip4j.jar file
And I have implemented the following source code
=================================================



import java.io.IOException;
import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import net.lingala.zip4j.io.Zip4jInputStream;

/**
*
* @author Administrator
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
try{
ZipFile zipFile = new ZipFile("c:\\zip\\29111001.124.zip");
// Check to see if the zip file is password protected
if (zipFile.isEncrypted()) {
// if yes, then set the password for the zip file
zipFile.setPassword("abcd");
}
zipFile.extractFile("29111001.124.txt", "c:\\zip\\12\\");

}catch(ZipException ex){
System.out.println("error "+ ex );
}
}

}
=======================================================
In this program
zip file is available at c:\\zip\\29111001.124.zip
and extracted file is available at c:\\zip\\12\\ folder
Here "abcd" is the password used to extract zip file.

Note :- i have write down this source code for benefit of all the java programmer.

How to extract a zip file (without password protected) using java Program

I have assigned a job, which has a module to read a password protected zip file using java program. At the beginning I was able to write a java using ZipInputStream class.( java.util.zip package).In that program I can extract zip file ,which does not have password protection. But when it comes to password protected zip file extraction, java.util.zip package does not support. For the zip file without password it works very well.

Here is the sample code i have use for that

==============================================================
import java.io.*;
import java.util.zip.*;
public class UnzipExample
{
public static void main(String a[])
{
try
{
BufferedOutputStream out = null;
ZipInputStream in = new ZipInputStream
(new BufferedInputStream(new FileInputStream(a[0])));
ZipEntry entry;
while((entry = in.getNextEntry()) != null)
{
int count;
byte data[] = new byte[1000];
out = new BufferedOutputStream(new
FileOutputStream("out.txt"),1000);
while ((count = in.read(data,0,1000)) != -1)
{
out.write(data,0,count);
}
out.flush();
out.close();
}
}catch(Exception e)
{
e.printStackTrace();
}
}
}

===========================================================

According to this source code we have to pass the zip file name ,when it run the program (run time).

===================================
java UnzipExample 11.zip
===================================

In this program, "out.txt" is the output file

Wednesday, December 22, 2010

Water pump market in Sri Lanka

Today I got an idea to write down a article about water pump in sri lankan market.I had to buy a water pump ,because my home need one.Home had a water pump ,which is 20 years old.It’s a ANTON Brand.That water pump is good one,but now ANTON is not in the water pump market any more.So difficult to repair that old water pump.So I decide to buy new one. There fore first I have done a research on water pumps in sri lanka.
I have found out following brand of water pumps in sri lanka.
1.Jinesena
2.Solex
3.Arpitec
4.singer
5.Z-lon



Jinesena ,It’s the sri lankan most popular brand for the water pump since 1932 .It’s spare parts for available every way in sri lanka.This brand water pump are durable.Price wise it’s the no 1 water pump. 3/4 horse power brand new water pump will be nearly 16,000 – 18,000 sri lanka rupees. This brand product had ISO 9001 and ISO 9001/2000 certification. Jinesena water impeller is made from white steel .So it’s durable . They also produce Industrial Pumps and Agricultural Pumps. You can reach Jinesena product by dialing 011 2584919 or visit www.jinasena.com



Solex ,not famous than Jinesena.But It had potential market in sri lanka.Solex water pump spare parts wildly available throughout the sri lanka.It’s spare parts are more cheaper than compare to Jinesena.If you are buy a water pump for a home ,this is the right brand.This brand available in sri lanka since 1980.This brand had a ½ horse power water pump. you can buy ½ horse power brand new water pump nearly 8,000 -10,000 sri lanka rupees.3/4 horse power brand new water pump will be 12,000 -14,000.Solex water impeller is made from copper .So it’s durable .They issues you 5 years warranty. You can reach Solex product by dialing 11 2931730 or visit www.solexeng.com.



Arpitec,product of Arpico people. Arpico people came to water pump market very recently. So unlike Jinsena,Solex Arpitec do not have rich history in water pump market. Arpitec impeller is made from steel.So it might get damage.Price wise it’s cheaper than Jinesena and Solex both.you can buy ¾ horse power brand new water pump 10,000 SL rupees.1/2 horse power one 6,000 SL rupees.you can reach Arpico water pump by dialing 11 4310500 or visit www.arpico.com



Singer ,came to water pump market latter part of the 90.They are spare parts are widely available. They suction speed is less compare to Jinsena and solex.They had various selection,not like other brand.So you can buy a good suction speed water pump with ¾ horse power 14,000 SL rupees. you can reach Singer water pump by dialing 11 2316316 or visit www.singersl.com

Z-lon,came to water pump market very recently.They are the cheapest brand in sri lanka.You can buy ¾ horse power water pump 8,000 – 9,000 SL rupees.Spare parts are not widely available.spare parts are available in a limited area.i have no idea about it’s impeller. you can reach Z lon water pump by dialing 114760100.

All these information are base on my own personal experience.If you are hope to buy a new water pump better to visit all these brands .After that get some idea about each and every brand. Next decided what your requirement is. After that select the brand and capacity you need .They buy a water pump according to your requirement.In this article I point out nutshell of the water pump market in sri lanka .There can be other brand,But i found out only these brands in sri lanka.Any way good luck for your water pump hunting job.

Thursday, November 25, 2010

more information about PGP encryption

If you install PGP command line version and also if you had .pgp file and it's key in a .asc file.

then you can decrypt the file using the following command.

pgp --import key.asc

pgp --decrypt file.pgp

for the GPG command line it's in the following way.
gpg --import key.asc

gpg --decrypt file.pgp


How Confidentiality generate from PGP encryption


Here message or file is encrypted using a symmetric encryption algorithm, which requires a symmetric key. Each symmetric key is used only once and is also called a session key. The session key is protected by encrypting it with the receiver's public key thus ensuring that only the receiver can decrypt the session key. The encrypted message along with the encrypted session key is sent to the recipient.

Thursday, November 4, 2010

What is AS 400

AS 400 is a midrange server designed for small businesses and departments in large enterprises and now redesigned so that it will work well in distributed networks with Web applications. The AS/400 uses the PowerPC microprocessor with its reduced instruction set computer technology. Its operating system is called the OS/400. With multi-terabytes of disk storage and a Java virtual memory closely tied into the operating system, IBM hopes to make the AS/400 a kind of versatile all-purpose server that can replace PC servers and Web servers in the world's businesses, competing with both Wintel and Unix servers, while giving its present enormous customer base an immediate leap into the Internet.