Friday, May 13, 2011

PHP Pear Mail Test Kit

Requested by the support team, I had build a PHP page that able to test the functionality of the PHP Pear Mail module.



The features included
  • Validate installation of PEAR
  • Validate installation of PEAR Mail module
  • Support all send mail options that supported by PEAR Mail - mail, direct sendmail, SMTP.
  • Enable or disable SMTP authentication.
  • Full validation on user input
  • ALL in a SINGLE file, easy to install.


Thursday, March 31, 2011

Enhancement of jquery datetime plugin

The problem
Lately integrate jquery datetime v1.0.5 plugin (http://plugins.jquery.com/project/datetime) into my web app to let user choose both date and time. When using it, found a problem if below conditions is applied.
  1. Min date and Max date is set.
  2. Default date and time is the middle of min and max date and the default date is following month of min date.
  3. e.g. Min date is 28/04/2011, Max date is 30/06/2011 and default date is 30/04/2011 16:00.

The problem are
  1. The calender shown May calender as expected but the previous button is disable and user cannot back to April which the Min date is set.
  2. User can forward to additional two months after the Max date month, which mean this case the next button only disable when user access until month of August. However, user still cannot choose the date after the Max date.

Wednesday, January 19, 2011

Excel column label calculation (increment)

Sharing out the code that calculate the excel column label by increment. Suitable for any version of excel.

Sunday, January 16, 2011

IE8 : jquery : ajaxfileupload : Syntax Error: Unterminated string constant

The problem
Write a web app to upload a file, read the content then return the content in HTML table using JSON format then display the result dynamically at current HTML page. Below is the JSON return by a PHP script.
{filename: 'input.dat',total_recipient: '1',totalcolumn: '3',samples: '<table width="400px"><thead><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr></thead><tbody><tr><td>name</td><td>phone no</td><td>address</td></tr></tbody></table>',columntag: '{Col_1},{Col_2},{Col_3},'}
As usual it work perfectly on FF 3.5.3, but when come to IE8 I got the error message "Syntax Error: Unterminated string constant".

Saturday, January 15, 2011

IE8 : Object doesn't support this property or method

The problem
Try to load following html to IE8 then insert some text to the input box and click the button. It should just alert the text you had key in but it give a javascript error "Object doesn't support this property or method". Below code work perferly on FF 3.5.3.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>ID Test</TITLE>
<script type="text/javascript">
function testnow()
{
 inputvalue = document.getElementById('inputvalue').value;
 alert ("input value is ["+inputvalue+"]");
}
</script></HEAD>
<BODY>

<H3>Input Text</H3>
<input id="inputvalue" type="tet"></input>
<BR/>
<button onclick="testnow()">click me</button>
</BODY></HTML>

Saturday, May 8, 2010

Machine Image Tool - A GUI Disk Dump Tool

While involving in cloud computing project, migrate virtual machine image is a common activity in order to use current virtual machine image in EUCALYPTUS environment.

However, for non technical people to
  1. mount a loop file, 
  2. list the partition in the mounted loop file and
  3. using disk dump (dd) to dump the partition to a file
is really not a straight forward job. To ease the user, I had build a java based GUI tool to solved the problem.



Saturday, May 1, 2010

Grid Monitoring Tool

Most of the distributed system like grid or cloud is using ganglia as resource monitoring tool. Out of the box solution provided by ganglia is powerful and useful enough for operation center. However, in term of flexibility and ease of integration to external application, is not straight forward.

I had designed and developed a web apps that run on top of ganglia with few enhanced features as below.
  1. Process and save ganglia gmetad xml file to relational database
  2. API and hook to process user defined data in gmetad XML
  3. Event triggering and configuration
  4. Threshold configuration
  5. Job monitoring and statistic
  6. New UI and data presentation to give new better overview of resource status
  7. Data mining and report generation
  8. User authentication and authorization