Showing posts from February, 2009

MySQL - Replication

Hi all, Mysql replication helps to replicate data from one mysql server (called "Master") to another server or servers (called "slave/slaves" which locates either same machine where Master locates or a remote machine). This is useful in certain occations like when we have to keep a backup of a database while restricting read /write permission of one so that data is secure in that particular database and also when we have to reduce the load over one database so that we get the maximum efficiency. You can replicate all database or a particuler database/s or even a table. So here are the steps to do that. N.B : If you want to replicate in one machine you have to install 2 mysql servers that is running in two ports. I assume that you are aware of installing mysql.Here are the steps to setup replication in a one machine. When you install and run mysql it will ues its default configuration file "my.cnf". So if you want to add extra features you have create your

Watermarking Images in a Java Servlet

In our previous tutorial , we showed how to create dynamic images images in a servlet. In this tutorial, we are going to take it a step further by dynamically adding a text watermark to an image as it is requested. Setting up the Servlet In the web.xml, you will need to configure a filter that will be used to call the servlet. By creating a filter, this will simplify the url used to access the servlet and image. To an end user, the filter will look like part of the directory structure for the image. The servlet will be invoked when the url contains the pattern /watermark/*. In our example, we will place the images in a directory called photos in the web application directory. To view the image without the watermark, you would use the url http://webserver/webapp/photos/car.jpg. To invoke the servlet, you would use the url http://webserver/webapp/watermark/photos/car.jpg. view plain copy to clipboard print ? < servlet > < servlet-name > com.codebeach.

Install Skype on Ubuntu

Skype Instant messanger in Debian As the root user, add this line to the end of your /etc/apt/sources.list file and save. #vi /etc/apt/sources.list deb stable non-free Now you need to update your source list using the following command #apt-get update