Friday, October 17, 2008

Remote Connect MySQL On OpenSUSE 11 From Different Host

Unlike to Ubuntu 8, OpenSuse 11 is equipped with Firewall and ON by default. You may need to grant the permission to allow remote access to the MySQL server from the client.

Computer --> YaST (at system menu) --> Security and Users --> Firewall

At the firewall configuration panel --> Allowed Services --> At Service to Allow, select MySQL Remote Access --> Click Add button --> Click Next button.

Be sure to start the mysql services. If not you can go to the terminal and type this command:
sudo /etc/init.d/mysql start

Also, make sure the user had the privilege to access the MySQL database from different host. If not you add the user using MySQL command:

GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'%' IDENTIFIED BY 'some_password' WITH GRANT OPTION;

Thats all..

Install Java, Tomcat and MySQL On OpenSUSE 11

We will install the JRE, Tomcat and MySQL for hosting JSP application website. Most of the installation will be done through the YaST management tools.

Launch YaST

Computer --> YaST (at system menu) --> enter root password --> Software (at YaST control center) --> Software Management.

Install JRE

1. We will require JRE in order to run Tomcat later. If you wish to do a development using Java programming, you may install both JDK and JRE together. At the filter field, type jdk.

2. Select java-1_6_0-openjdk for JRE (or java-1_6_0-openjdk-devel for JDK – for development). Next, click the Install button. Click Apply to download and install.

Install Tomcat
1. Download the tomcat 5.5 from http://tomcat.apache.org/ and saved it to desktop. Here, apache-tomcat-5.5.26.tar.gz been used. Right click on the file and click on Extract Here.

2. Rename the folder to tomcat for easier to remember the folder name. It is good idea to move the tomcat to /usr/local directory.

3. Type the command sudo mv tomcat-on-your-desktop-path /usr/local

4. You need to tell the tomcat where the JRE has been installed and to do this you need to define the JAVA_HOME environment variable in .bashrc file.

5. At the terminal, type the command gedit ~/.bashrc
6. At the end of the file type export JAVA_HOME=your/java/home and save the file.

7. Start the tomcat with the command: sh /usr/loca/tomcat/bin/startup.sh

8. Open the Mozilla Firefox browser and browse to http://localhost:8080 and should see the Tomcat welcome screen.

9. To stop the tomcat, type: sh /usr/loca/tomcat/bin/shutdown.sh

Install MySQL
1. Launch YaST. At the filters field type mysql and select the mysql package to install.

2. You may prompt to insert the openSuse-DVD 11. Insert the DVD and click retry to continue.

3. The installation process will take place.

Friday, August 29, 2008

Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. Attempted reconnect 3 time

Just would like to remind anyone who refering to both Remote Access To MySQL Database and Setup Java, Tomcat, MySQL on Ubuntu (JSP Hosting), do remember to change the datasource property which defined via JNDI.

If you are attempting to connect to the database which sit on localhost or other host, make sure the JDBC driver URL is defined exact same on both JNDI and my.cnf. So, the JNDI would able to point to the right host where the database is sit.



Else not, your web application would not able to connect to the database and you will get error similar as below:

javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'.Attempted reconnect 3 times. Giving up.)"

Thursday, August 21, 2008

Ubuntu Share Folder Using SAMBA

Sharing folder from Ubuntu between the network is very easy. The shared folder can be access by the same platform or Windows using SAMBA services.

Share folder on GNOME @ Ubuntu 8.04.

1. Create a new folder that you want to share.


2. Right click on the folder --> Sharing Options


3. Tick on the Share this folder


4. Click at the Install service.


5. Enter the administrator password.


6. Downloading and installing...please wait.


7. Click the close.


8. Restart the Ubuntu and it should works.

Generally,SAMBA services can be installed by:
1. At the terminal, type sudo apt-get install smbfs to download and install SAMBA.
2. Set the password for the user by sudo smbpasswd -a username. (Be sure you had created the user account. To do this: System --> Administration --> Users and Groups).


Monday, August 18, 2008

Install antivirus for Ubuntu

Download and install AVG
After installed Ubuntu, I would highly recommend to proceed with patches update and install the antivirus. The chances of Ubuntu affected by virus are rare. However, if you are connected within the network, it is recommended to have one. At this moment, I am using AVG 7.5.51 antivirus to protect my file from viruses.

You can download the free AVG from here (.deb). Once downloaded, right click and select Open with “GDebi Package Installer”. Follow the instructions carefully.


Click on the Install Packages button.


Installing..please wait.


Click the close button.


Launch the program and do the update
Once the installation done, you can start AVG by going to Applications -->Accessories -->AVG for Linux Workstation. Do the update to download the latest virus definition.


If you encountered the update problem with the message below, you may need to configure the right permission.


Open the User and Groups panel.


Click on Unlock button and sign in as the power user. Click on the Manage Groups button.


Select the avg group and click on the Properties button.



Tick on the user to assign to AVG group.


Logout and do the update again. You should able to retrieve the update.


Alternative, at terminal you can type sudo avgupdate -o to download the update. The -o parameter indicate online update from the Internet.

Friday, August 15, 2008

Remote Access To MySQL Database

Configure my.cnf
1. We will need to edit the my.cnf file. I am assuming you are using GNOME, so open the terminal and type sudo gedit /etc/mysql/my.cnf

2. Change the bind-address to your server IP address (not to 127.0.0.1). Example, I found out my server IP is 192.168.30.30 by using the ifconfig command. So here are the changes,
bind-address = 192.168.30.30



3. Be sure to comment out the skip-networking.
# skip-networking

4. Save and close the file.

Create MySQL New User Account
** Assuming to create the superuser having all privileges and accessed from localhost and other host.
5. Open terminal and start the mysql program.

6. Type this:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'some_user’@'localhost'
-> IDENTIFIED BY 'some_password' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'%'
-> IDENTIFIED BY 'some_password' WITH GRANT OPTION;



7. Restart the MySQL server by open the terminal and type sudo /etc/init.d/mysql restart

Tuesday, July 8, 2008

Setup Java, Tomcat, MySQL on Ubuntu (JSP Hosting)

This tutorial will lead you to setup a simple JSP hosting on Ubuntu machine. You may want to consider this as a basic setup to host any of your web application which developed using Java - JSP or Servlet, Tomcat and MySQL.

** If you had downloaded Ubuntu 8.04 LTS Desktop Edition, you can skip the step below and goto Step 8. Desktop edition will be easy to install. All you need is to boot from the CD and follow the instruction closely.

Install Ubuntu Ubuntu 8.04 LTS Server
Step 1: Download the Ubuntu Server from http://www.ubuntu.com/
Step 2: Burn the ISO file into CD and boot your machine from CD.
Step 3: Follow the installation step closely and it is easy to do it
Step 4: Once install successfully, you will require to login.
Step 5: After login, perform the necessary updates. Make sure you have the internet connections. Type sudo apt-get update to do the update.

Install the GNOME desktop
Step 6: Type sudo apt-get install ubuntu-desktop to download and install GNOME.
Step 7: Type startx to start the GNOME

**You can install KDE desktop instead of GNOME. However, this is up to your taste. To install KDE, type the command sudo apt-get install kubuntu-desktop

Install JDK and JRE (Java)
Step 8: Open the terminal. Applications --> Accessories --> Terminal


Step 9: Type sudo apt-get install sun-java6-jdk


Step 10: After successful install, you can do some verification to find out the installed JDK and JRE version. At the terminal, type javac –version for JDK and java –version for JRE.



Install Apache Tomcat 5.5
**Before installing the Tomcat 5.5, you will need to ensure that you had installed JDK and JRE.


Step 11: Download the tomcat 5.5 from http://tomcat.apache.org/ and saved it to desktop. Here, apache-tomcat-5.5.26.tar.gz been used.
Step 12: Right click on the file and click on Extract Here


Step 13: Rename the folder to tomcat for easier to remember the folder name.
Step 14: Is good idea to move the tomcat to /usr/local directory.
Type the command sudo mv tomcat-on-your-desktop-path /usr/local


**You need to tell the tomcat where the JDK has been installed and to do this you need to define the JAVA_HOME environment variable in .bashrc file.

Step 15: You are about to edit the .bashrc file. Please backup the file first before make any changes. The .bashrc is a hidden file and is located in your home directory.




Step 16: Right click on the .bashrc and select Open with “Text Editor”.

**Alternatively, at terminal, type the command gedit ~/.bashrc (GNOME) or kate ~/.bashrc (KDE)

Step 17: At the end of the file type export JAVA_HOME=/usr/lib/jvm/java-6-sun and save the file.


Start and Stop tomcat
Step 18: At terminal, type sh /usr/local/tomcat/bin/startup.sh
Step 19: You can verify the success installation by open the Mozilla Firefox browser and browse to http://localhost:8080/
Step 20: At terminal, type sh /usr/local/tomcat/bin/shutdown.sh

Install the MySQL Server 5.0
Step 21: At terminal, sudo apt-get install mysql-server

** The step 22 and 23 are optional. Both are GUI which allow you to manage the database easily.

Install MySQL Query Browser.
Step 22: At terminal, type sudo apt-get install mysql-query-browser

Install MySQL Administrator
Step 23: At terminal, type sudo apt-get install mysql-admin

**I am assuming that you have the experience to do the deployment by yourself. All you need to do now, are:
-create all the necessary database, tables and fields,
-you will place your .war file into /usr/local/tomcat/webapps,
-start the tomcat....

Wednesday, June 18, 2008

Firefox 3 attempt to break the world record

The new version of Firefox 3 has been released at June 17, 2008.

Firefox is about to set the world record by breaking through the most downloadable software within 24 hours. Click here...





The moment I download the software, it's already hitting 3,331,796 of worldwide downloads.




Click on the banner below to donwload Firefox 3.

Download Day

Friday, June 13, 2008

Database Navigation using Next and Previous link - Part 2

This is enhanced sample of codes from previous post at http://www.leejeok.com/2008/06/navigate-database-record-using-next-and.html

I have reduce some JSP code by using the SQL script to get and return the number of rows from database. I am using MySQL as the database and using the LIMIT clause to retrieve the number of rows to display on single page.


<%@ page import="javax.sql.DataSource" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.naming.*" %>

<%!
static final String ctxstr = "java:comp/env/jdbc/navigationDB";
%>
<html>
<head>
<title>Database Navigation using Next and Previous button</title>
</head>
<body>
<form>
<h1>Database Navigation using Next and Previous link</h1>

<%
int id = 0;
String fullname = "";
String country = "";
int recordPerPage = 2;
int gotoPage = 0;

boolean moreResult = false;

Connection conn = null;
Statement stat = null;

//get page
try {
gotoPage = Integer.parseInt(request.getParameter("gotoPage"));
} catch (NumberFormatException e ) {
gotoPage = 0;
}

try {
//lookup for the JNDI datasource
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(ctxstr);

//create the database connection
conn = ds.getConnection();
stat = conn.createStatement();

String offset = String.valueOf(gotoPage * recordPerPage);
String rows = String.valueOf(recordPerPage);

//execute query using SELECT and LIMIT clause.
//LIMIT accept 2 argument.
//the first represent the offset of the first row to return
//the second represent the maximum number of rows to return
String sql = "SELECT id, fullname, country FROM customer LIMIT "+offset+" , "+rows;
ResultSet resultSet = stat.executeQuery(sql);

out.println("<table border='1'><th>ID</th><th>Name</th><th>Country</th>");

int totalRecord = 0;
for (; resultSet.next(); totalRecord++) {
id = (int)resultSet.getInt("id");
fullname = (String)resultSet.getString("fullname");
country = (String)resultSet.getString("country");
out.println("<tr><td>"+id+"</td><td>"+fullname+"</td><td>"+country+"</td></tr>");
}
out.println("</table>");
out.println("<br>");

if(totalRecord == recordPerPage)
moreResult = true;

//close connection
resultSet.close();
stat.close();
stat = null;
conn.close();
conn = null;

} catch(SQLException e) {
out.println("An error occured: " + e.toString());
return;
} finally{
if(conn != null)
conn.close();
}


if ( gotoPage == 0 ) {
out.print("Previous");
} else {
out.print("<a href=\"limit.jsp?gotoPage="+(gotoPage - 1)+"\"><b>Previous</b></font></a>");
}

out.print("&nbsp;&nbsp;");

if (!moreResult) {
out.print("Next");
} else {
out.print("<a href=\"limit.jsp?gotoPage="+(gotoPage + 1)+"\"><b>Next</b></a>");
}

%>

</form>
</body>
</html>

Sunday, June 8, 2008

Navigate Database using First, Previous, Next and Last Button

Here are some simple codes to display record within a page. User will click on the button to browse through the specific records.




<%@ page import="javax.sql.DataSource" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.naming.*" %>

<%!
static final String ctxstr = "java:comp/env/jdbc/navigationDB";
%>

<html>
<head>
<title>Database Navigation using Next and Previous button</title>
</head>
<body>
<form>
<h1>Database Navigation using Next and Previous link</h1>

<%
String fullname = "";
String country = "";

int counter = 0;

//total result for each page
int recordsPerPage = 5;

//the default page
int gotoPage = 1;

//get page
try {
gotoPage = Integer.parseInt(request.getParameter("gotoPage"));
} catch (NumberFormatException e ) {
gotoPage = 1;
}

Connection conn = null;
Statement stat = null;

try {
//lookup for the JNDI datasource
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(ctxstr);

//create the database connection
conn = ds.getConnection();
stat = conn.createStatement();

//execute query
String sql = "SELECT fullname, country FROM customer";
ResultSet resultSet = stat.executeQuery(sql);

//skip the records which not require within the page
int row = (gotoPage - 1) * recordsPerPage + 1;
for(int x=1; x<row; x++)
resultSet.next();

out.println("<table border='1'><th>Name</th><th>Country</th>");

//display only record which require within the page
while ( (counter < recordsPerPage) && resultSet.next() ) {
fullname = (String)resultSet.getString("fullname");
country = (String)resultSet.getString("country");
out.println("<tr><td>"+fullname+"</td><td>"+country+"</td></tr>");
counter++;
}

out.println("</table>");
out.println("<br>");

//create next and previous link
boolean moreResult = resultSet.next();
if ( gotoPage == 1 ) {
out.print("Previous");
} else {
out.print("<a href=\"index.jsp?gotoPage="+(gotoPage - 1)+"\"><b>Previous</b></font></a>");
}

out.print("&nbsp;&nbsp;");

if (!moreResult) {
out.print("Next");
} else {
out.print("<a href=\"index.jsp?gotoPage="+(gotoPage + 1)+"\"><b>Next</b></a>");
}

//close connection
resultSet.close();
stat.close();
stat = null;
conn.close();
conn = null;

} catch(SQLException e) {
out.println("An error occured: " + e.toString());
return;
} finally{
if(conn != null)
conn.close();
}
%>

</form>
</body>
</html>

If you are building the GUI application which similar to above functionalities, below are some quick ideas to what you can do to the ResultSet.

Next Record
if (!rs.isLast()) {
rs.next();
//retrieve the value
}


Previous Record
if (!rs.isFirst()) {
rs.previous();
//retrieve the value
}


Last Record
rs.last();

First Record
rs.first();

Goto Record
rs.absolute();

By keeping the ResultSet open, each code above can be define within the respective buttons’ ActionListener().

Navigate Database Record using Next and Previous Link

Here are some simple codes to display the fixed number of records within single page. Click on the previous and next link to browse through the records.




<%@ page import="javax.sql.DataSource" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.naming.*" %>

<%!
static final String ctxstr = "java:comp/env/jdbc/navigationDB";
%>

<html>
<head>
<title>Database Navigation using Next and Previous button</title>
</head>
<body>
<form>
<h1>Database Navigation using Next and Previous link</h1>

<%
String fullname = "";
String country = "";

int counter = 0;

//total result for each page
int recordsPerPage = 5;

//the default page
int gotoPage = 1;

//get page
try {
gotoPage = Integer.parseInt(request.getParameter("gotoPage"));
} catch (NumberFormatException e ) {
gotoPage = 1;
}

Connection conn = null;
Statement stat = null;

try {
//lookup for the JNDI datasource
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(ctxstr);

//create the database connection
conn = ds.getConnection();
stat = conn.createStatement();

//execute query
String sql = "SELECT fullname, country FROM customer";
ResultSet resultSet = stat.executeQuery(sql);

//skip the records which not require within the page
int row = (gotoPage - 1) * recordsPerPage + 1;
for(int x=1; x<row; x++)
resultSet.next();

out.println("<table border='1'><th>Name</th><th>Country</th>");

//display only record which require within the page
while ( (counter < recordsPerPage) && resultSet.next() ) {
fullname = (String)resultSet.getString("fullname");
country = (String)resultSet.getString("country");
out.println("<tr><td>"+fullname+"</td><td>"+country+"</td></tr>");
counter++;
}

out.println("</table>");
out.println("<br>");

//create next and previous link
boolean moreResult = resultSet.next();
if ( gotoPage == 1 ) {
out.print("Previous");
} else {
out.print("<a href=\"index.jsp?gotoPage="+(gotoPage - 1)+"\"><b>Previous</b></font></a>");
}

out.print("&nbsp;&nbsp;");

if (!moreResult) {
out.print("Next");
} else {
out.print("<a href=\"index.jsp?gotoPage="+(gotoPage + 1)+"\"><b>Next</b></a>");
}

//close connection
resultSet.close();
stat.close();
stat = null;
conn.close();
conn = null;

} catch(SQLException e) {
out.println("An error occured: " + e.toString());
return;
} finally{
if(conn != null)
conn.close();
}
%>

</form>
</body>
</html>

Tuesday, May 27, 2008

Simple JNDI Accessing MySQL Datasource

Base on the previous post, I have used the struts-config.xml to define the datasource to access to the MySQL database. The datasource class is code within the Action class (controller layer) and map to the struts-config.xml.

In order to improve the programming pratice, the datasource can be created via JNDI and the java code should be sit within the model layer. As a result, business logic will separate from the controller layer and making the Action class without knowing any relation with business class at all.

Click here to read more...

Monday, May 26, 2008

Struts - Database Access by Defining Datasource within the struts-config.xml

A sample program which connecting to the MySQL database to display the data. I am using the Struts framework to developed this program. The main idea is of this post is to use the struts-config.xml to define the datasource and using Action class to access and select the data.

Please bear in mind, the Action class which represent as controller layer, should not contain any business logic code and database access code. The best pratice is to apply the DAO mechanism by putting your business logic or database access code within the model layer.
The datasource should only define within the struts-config.xml when there is a limitation of connectivity to the database within the model layer. Alternative, you can use the JNDI to define the datasource and that would be the best recommendation in best pratice. However, that will be my next post on my blog.



Here are the summary of development been used.

  • Struts 1.2.9 framework

  • index.jsp, selectBook.jsp, SelectBookActionForm.java - view layer

  • SelectBookAction.java - controller layer

  • Book.java - data layer

  • Defining datasouce at struts-config.xml

  • MySQL database
Read more and download the code: Click here

Sunday, May 25, 2008

Struts: Build HTML Options Tag Elements from MySQL data

Some sample program developed using STRUTS framework to access the MySQL database and retrieve data to build the html options elements. This post is consider as an enhancement from the previous post Struts: HTML Options Tag Sample Code.

The previous post was hardcoded to build the html options tag. Meanwhile, this post will build the html options’ elements by retrieving data from MySQL database.

I have used the struts-config.xml to define the datasouce to access to the MySQL database.

Click here to read more.

Wednesday, May 21, 2008

Java MySQL - Mass Update Using Batch Updating

Some sample of the code to perform the mass update of database.

The ideas behind of this code is to improve the database performance by reduce the cost of query executions. This is refer to the INSERT, UPDATE and DELETE of any rows within the database.

Some developer may execute the query statement within the WHILE or FOR loop condition.

With batch updating, a set of SQL query can be writen and execute together to improve the performance.

Example of the code:

//Create the prepared statement
String updateSQL = “UPDATE customer SET country = ? WHERE id = ?”;
stat = conn.prepareStatement(updateSQL);

//Insert the country and hardcoded id.
for(int i = 0; i <= 5; i++){
stat.setString(1, “Malaysia”);
stat.setInt(2, i);
stat.addBatch();
}

//Execute the batch.
int [] updateCounts = stat.executeBatch();


Full code available here: http://leejeok.wordpress.com/2008/05/21/java-mysql-mass-update-using-batch-updating/

Monday, May 19, 2008

Struts: HTML Options Tag Sample Code

I have been doing some research on the internet recently and notice not much of the sample code been provided to build the drop down menu using struts html option tag. Here are the sample program which I develop using Struts framework by applying the html options tag. The screenshot will look similar as below.



Please click here to view the code:
http://leejeok.wordpress.com/2008/05/14/struts-html-options-tag-sample-code/

Wednesday, May 7, 2008

MySQL Workbench

One of the tools which I like to use to design my database is known as MySQL Workbench. I have used it to design the Entity Relationship Diagram and export the design into PDF or PING image. Once you complete the design, you can generate the physical database which included with the forward engineering capabilities or exporting it to SQL text file. This easy tool also assists you to document the database design into text and html form.

The MySQL Workbench deliver in 2 editions.
The Standard Edition will provide you all the needs which I mentioned above.
If you looking for a simple and free tools for you visualization and design of database, or you want to export your design to PDF, PNG or SQL query, perhaps you may want to try the Community Edition - this might be the one that you looking for.

Tuesday, April 15, 2008

Warning: mysql_connect(): Client does not support authentication protocol requested by server



I was using the PHP v4.4.2 and MySQL 4.1.18 to develop a website which displaying data that retrieve from database.

Have you ever encounter an error saying the message at below?



The error display such as "Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in....."


Well, the problem is more likely caused by the updated security model within the MySQL 4.1 and later. The prior MySQL 4.1.0 is using a 16 byte hash code to encrypt the password into binary string. Whereas, the MySQL 4.1.1 or later is using 41 bytes.

So, you may likely want to reset the user’s password within your MySQL using OLD_PASSWORD. The OLD_PASSWORD() was implemented when the PASSWORD() was changed to improve the security.

Before I do anything on my MySQL server, I take a closer look to see how’s my password been stored within the database. I am signing as ROOT user which having all the privilege rights.

I look through the database called mysql and table called user. Next I retrieve the password field which is in binary string. See the screen below.



Next, I will update the researcher password using the OLD_PASSWORD function.



Finally, I refresh my website and every things work fine.



Monday, March 31, 2008

Bloggers had censored the government feedback

Many bloggers had censored the government comments which posted to the blogger’s website. The government is trying to post the comments to correct the inaccurate statement and false allegations about the government, which appear on blogger site.

Most public read the articles and believe it. Bloggers who criticize the government should be brave enough to post responses from the government.

Just to recall, the Internet served a painful lesson for the BN due to the worst result of election. The web and SMS allowed blogger to spread their voice over the internet to criticize the government.

This must be fair giving the government to explain the issues to the public and preventing from hating the government if these criticisms are none stop.

GSC website hacked

One of my colleague just saw this article and shared with me about this link "GSC website compromised by Lowyat.NET" and blog from Dr. Safemode - (for more details, please visit to the link).

It mentioned about the GSC website was hacked.

A malicious piece of code -javascript, present on the GSC online website and has been removed.
If you happend to visit the website recently, perhaps it you may want to scan your PC with updated antivirus protection.

Attention for those Internet surfer, I would like to recommend the basic tools you must have to have a secure and safety online:

1. updated antivirus - eg: AVG
2. updated antispyware - eg: windows defender
3. firewall - eg: ZoneAlarm
4. Windows updated patches - eg: buy ORIGINAL windows, register and get update via online for free :)


Sunday, March 23, 2008

The Qing Ming 2008

Mean: The Qing Ming festival means Clear and Bright festival, is a traditional Chinese festival which family members will visit the gravesite to the one’s elderly or ancestors to do the cleaning on the graves.

Date: Fall around 5 April on Gregorian calendar and 4 April for leap year.

2008: 4 April 2008

Activities: The Chinese believers will clean and sweep on the graves with family. Weeds are pulled, dirt swept away and burning joss sticks and paper money, food is offered to the departed.

Death Chinese are always buried at their hometown so that the spirit will rest well and return bless to their young surviving generation. However, the one’s which in place in ash holder is included with the name, death of birth and death, hometown, and birthplace, so that the spirit will find their way home.

Qing Ming is a official public holiday for China, Hong Kong and Macau.

Friday, March 21, 2008

Health Tips: Ladies who like wearing high heels







60 Earth Hour 2008

On this 29 March 2008 - 24 cities around the world will take part in Earth Hour, a global movement that began in Sydney last year, with resident and businesses encouraged to turn off the light and non-essential appliances for an hour to deliver a powerful message about the need of action on global warming.











Free Barcode Label Program

I am interested on any program which is FREE and EASY to design barcode and print on the label. I am using Toshiba TEC-452 barcode printer. It is very old and has been bought for more than 5 years. I had installed the driver and connected the printer to a PC successfully. The driver is still available to be downloaded from the manufacture of the website. I had performed some print test and working fine.

My colleague had introduced me a program called IDAutomation Free Barcode Label Design Application.



Usage: Mainly design for barcode, label printing and mail merge.
Printer: Able to connect and print at most kind of barcode printer, deskjet, bubblejet and laser printer. Please use a good and high quality printing for ease of barcode reader to read the barcode.
Data set: Data can be link to Access, Excel, CSV, text and its build in data file.



Support Bar Code Type: Code 39 and Extended Code 39 available for free. You can purchase the standard version which support other popular types including UPC, EAN, Code 128, Interleave 2, or 5 and Postnet.



The program is free for Code 39 and extended Code 39. The result of usage is very good, simple and easy to learn and use.

Windows command

Here are the collection of windows shorcut command.

Tested on Windows xp. Go to StartMenu > RUN, where u get the following box:

Function & Command

Accessibility Controls - access.cpl
Add/Remove Programs - appwiz.cpl
Administrative Tools - control admintools
Automatic Updates - wuaucpl.cpl
Bluetooth Transfer Wizard - fsquirt
Calculator - calc
Certificate Manager - certmgr.msc
Check Disk Utility - chkdsk
Clipboard Viewer - clipbrd
Command Prompt - cmd
Component Services - dcomcnfg
Computer Management - compmgmt.msc
DDE Shares - ddeshare
Device Manager - devmgmt.msc
Direct X Control Panel (If Installed)* - directx.cpl
Disk Cleanup Utility - cleanmgr
Disk Defragment - dfrg.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart
Dr. Watson System Troubleshooting Utility - drwtsn32
Driver Verifier Utility - verifier
Event Viewer - eventvwr.msc
File Signature Verification Tool - sigverif
Findfast - findfast.cpl
Fonts Folder - fonts
Free Cell Card Game - freecell
Group Policy Editor (XP Prof) - gpedit.msc
Hearts Card Game - mshearts
Iexpress Wizard - iexpress
Indexing Service - ciadv.msc
Internet Properties - inetcpl.cpl
IP Configuration (Display Connection Configuration) - ipconfig /all
IP Configuration (Display DNS Cache Contents) - ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) - ipconfig /flushdns
IP Configuration (Release All Connections) - ipconfig /release
IP Configuration (Renew All Connections) - ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) - ipconfig /registerdns
IP Configuration (Display DHCP Class ID) - ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) - ipconfig /setclassid
ava Control Panel (If Installed) - jpicpl32.cpl
Java Control Panel (If Installed) - javaws
Local Security Settings - secpol.msc
Local Users and Groups - lusrmgr.msc
Logs You Out Of Windows - logoff
Mcft Chat - winchat
Minesweeper Game - winmine
Network Connections - control netconnections
Network Connections - ncpa.cpl
Network Setup Wizard - netsetup.cpl
Nview Desktop Manager (If Installed) - nvtuicpl.cpl
Object Packager - packager
ODBC Data Source Administrator - odbccp32.cpl
On Screen Keyboard - osk
Opens AC3 Filter (If Installed) - ac3filter.cpl
Password Properties - password.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon
Phone and Modem Options - telephon.cpl
Power Configuration - powercfg.cpl
Printers and Faxes - control printers
Private Character Editor - eudcedit
Quicktime (If Installed) - QuickTime.cpl
Regional Settings - intl.cpl
Registry Editor - regedit
Remote Desktop - mstsc
Removable Storage - ntmsmgr.msc
Removable Storage Operator Requests - ntmsoprq.msc
Resultant Set of Policy (XP Prof) - rsop.msc
Scanners and Cameras - sticpl.cpl
Scheduled Tasks - control schedtasks
Security Center - wscui.cpl
Services - services.msc
Shared Folders - fsmgmt.msc
Shuts Down Windows - shutdown
Sounds and Audio - mmsys.cpl
Spider Solitare Card Game - spider
SQL Client Configuration - cliconfg
System Configuration Editor - sysedit
System Configuration Utility - msconfig
System File Checker Utility (Scan Immediately) - sfc /scannow
System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Setting) - sfc /revert
System File Checker Utility (Purge File Cache) - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Telnet Client - telnet
User Account Management - nusrmgr.cpl
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Magnifier - magnify
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Windows Update Launches - wupdmgr
Windows XP Tour Wizard - tourstart
Wordpad - write