refer the below url
http://www.sethi.org/classes/cet415/lab_notes/lab_03.html
Sunday, November 6, 2011
Friday, July 29, 2011
OpenOffice Writer -How to Remove Page Number only from Cover Page
Today morning i want to create Word Document.Normally write word document I am using Open Office Writer.In that Report I want to have page Number.But Then Cover Page should be with out page Number.In this situation i used the page Number as footer value.
As a developer,I want to share this information with other.Because I feel writing this information will help some one in the world in a some day in the future.
How I insert Page Number
Insert -> Footer-> Default
Insert -> Field -> PageNumber
Then the page Number is apply to all the pages including cover page.
How I remove Cover Page Page Number
select the cover page (start the curser with bottom of page and ended beginning of the page)
right click and select Pharagraph
Then you get a pop up window,which is mention on the image.
Break section
tick on insert
Type as Page
Position as Before
With Page Style as First Page
Page Number 0
Then you will see cover page Page Number disappear.
Tuesday, July 19, 2011
My volunteer experience with Oxfam shop
My University advice me to work as volunteer while i am Studying.I search for volunteer opportunity through out the London few days.Then i found Oxfam shop in Richmond area.After three successful interviews Oxfam manager select me as a Volunteer.So I just feel to write it down about Oxfam in my blog.
What is Oxfam ?
Oxfam works directly with communities and seeks to influence the powerful to ensure that poor people can improve their lives and livelihoods and have a say in decisions that affect them.
History
Oxfam was originally founded in Oxford in 1942 as the Oxford Committee for Famine Relief by a group of Quakers, social activists, and Oxford academics; this is now Oxfam Great Britain, still based in Oxford, UK. It was one of several local committees formed in support of the National Famine Relief Committee.
Oxfam Shop
Oxfam has numerous shops all over the world, which sell many fair-trade and donated items. They opened their first charity shop in 1948.The proceeds from these usually get paid to different charities or are used to further Oxfam's relief efforts around the globe.
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.
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
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
Subscribe to:
Posts (Atom)