Browsing articles in "Uncategorized"
Jul
25
2009

Unicode UTF-8 characters in WordPress Blog Title

Sometime back I was trying to put unicode characters(utf-8) in the title of a blog from wp-admin > settings > general. After saving it became like ?????????. All pages had utf-8 in their meta tags so the issue was somewhere else. A working solution was found : 1. Go to phpmyadmin and select the database of this blog 2. Select table wp_options and then click operations. In table options box change collation to utf8_unicode_ci which [...]

Jul
12
2009

Draw Plot Graphs with PHP

Googling up for graph plotting solutions in PHP , found these free libraries : 1. PHPLOT – Can create Pie Charts , Bar Graphs , Line Graphs , Point Graphs etc. 2. PostGraph – Can create simple bar graphs.

Jul
6
2009

Create AutoIncrement column/field in Apache Derby

While creating a table a particular column / field can be made autoincrement as : The value of an autoincrement column increments automatically with every insert and doesnt need to be specified in the insert command. It is 1 + the value of the same field in the previous row. Now data can be inserted as : Note that the value for the id field (which is an autoincrement field) is not specified. It fills [...]

Apr
28
2009

PHP parse text and change urls into links

Regex can be used to convert all urls in a plain text into links i.e. with anchor tags. Code :

Apr
23
2009

Javascript Image Cropper with Mootools and PHP

MooCrop is a library which can be used to create a cropping interface in your webpage. With this library after a crop region is selected a php script can be called to crop the image on serverside. The moocrop interface provides four values that is the width , height , left and top of the crop region ; these values can be used by a php script to crop an image. So these values can [...]

Apr
15
2009

Slow Internet on Ubuntu when using a switch

As usual internet was fast on ubuntu as it used to be till I needed to plug more PCs into the adsl route lying nearby. After connecting all computers and the adsl router to a switch I noticed that on one of the PC (Ubuntu 8.04) internet became really slow. Rest of the 2 PCs one on Ubuntu 8.10 and another on Ubuntu 8.04 had internet working fine. This slow internet PC was also the [...]

Mar
25
2009

Install Postgresql , phpPgAdmin and pgadmin on Ubuntu 8.04 Hardy Heron

Postgresql , phpPGAdmin and pgadmin 3 can be installed from synaptic. After installation the postgres password of postgresql can be changed like this : ALTER USER postgres WITH ENCRYPTED PASSWORD ‘‘; To exit : \q Also create a database : Now to access localhost/phppgadmin a link needs to be created which points to /usr/share/phppgadmin : Now localhost/phppgadmin should open up Trying to login with user : postgres and password : created above might give the [...]

Mar
22
2009

openSuse like start menu on Ubuntu

openSuse presents a different kind of menu in gnome desktop that what appears in Ubuntu. The menu can be added as an applet to the panel in Ubuntu gnome desktop also by installing the package : gnome-main-menu sudo apt-get install gnome-main-menu After installation right click on a panel and Add to Panel. Add ‘The main gnome menu’ from the list which shall be a start menu like the one on openSuse

Jan
23
2009

Change column / field order in OpenOffice Base ( HSQL )

Altering the sequence of fields of a table was a feature I was looking for in OpenOffice Base. It is not directly possible to drag the columns or fields and alter their sequence. A SQL workaround can do the same thing. If the sequence of fields is : name , email , address , phone and phone is to be brought before address like this : name , email , phone , address then the [...]

Dec
4
2008

Get Real IP address and proxy of visitor in PHP

$_SERVER['REMOTE_ADDR'] or getenv(’REMOTE_ADDR’) is often used to find the remote users or visitors IP address on a website. But this value may not be the real ip address of the user who just visited the site. If the user is behind a proxy then the value of $_SERVER['REMOTE_ADDR'] will the IP address of the proxy server rather than the real user. The $_SERVER super global has more fields which can be used to indicate the [...]

Pages:«1234»