How to fix: Google Earth crash on Ubuntu 10.04 Lucid Lynx

I got the following error after executing Google Earth application on Ubunto 10.04 Lucid Lynx ubuntu@ubuntu:/opt/google-earth$ /usr/local/bin/googleearth Fatal error in __driConfigOptions line 1, column 0: unknown encoding. Google Earth has caught signal 6. We apologize for the inconvenience, but Google Earth has crashed. This is a bug in the program, and should never happen under normal circumstances. A bug report…

Read More »

How to: dynamically add input field in form, using Javascript

Recently I ran across this issue on a project. Whereas I need to employ a html textarea when needed (dynamic), plus the delete link. These is the Javascript part: function addElement(fieldType, fieldName, className, ctrl1, ctrl2) { var ni = document.getElementById(ctrl1); var numi = document.getElementById(ctrl2); var num = (document.getElementById(ctrl2).value -1)+ 2; numi.value = num; var divIdName = ctrl1+num; var newdiv =…

Read More »

Unrar solution on CentOS

For CentOS 32bit: rpm -i http://dag.wieers.com/rpm/packages/unrar/unrar-3.7.4-1.el5.rf.i386.rpm For CentOS 64bit: rpm -i http://dag.wieers.com/rpm/packages/unrar/unrar-3.7.4-1.el5.rf.x86_64.rpm To extract rar file, format: unrar e /path/to/file.rar Eg.: unrar e /home/me/somefile.rar

Read More »

How to: install mod_geoip2 for Apache2 on CentOS server.

mod_geoip2 is an Apache 2.x module for finding the country and city that a web request originated from. It uses the GeoIP library and database to perform the lookup. Steps: [*] Login via SSH as root to your server [*] Get the GeoIP C Library from MaxMind wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz Wait until finished –09:43:23– http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz Resolving geolite.maxmind.com… 64.246.48.99 Connecting to geolite.maxmind.com|64.246.48.99|:80……

Read More »

How to: Convert MySQL Hierarchical Data Flat List Result to Multi-Dimensional PHP Array

Recently, for a fun stuff, I came across a need of an infinite level of categories. I stumbled uponGijs Van Tulder‘s article of “Storing Hierarchical Data in a Database” at SitePoint. Based of Van Tulder article I’m experimenting on my localhost. Below is the contents of my ‘categories’ table:+—–+——-+——–+———-+——+——+ | id | title | parent | parentid | lft |…

Read More »

How to: remove vertical green line in Geany code window

By the way, the green vertical line act as an aid, but many users find its distracting. Follow the steps below to remove the vertical green line in Geany version 0.18 (Ubuntu) window: Run Geany, go to: Edit >> Preferences >> Editor >> Display Select “Disabled” radio options below “Long line marker”. Hit “Apply” and “OK” button.

Read More »