Friday, January 8, 2010

Resolving JQuery.validate as my necessary part:2

After the Resolving JQuery.validate as my necessary, It still have some trouble. When selecting the "0" value of "select" (* Dropdown in HTML), the highlight was appear ( the satisfied in the part 1 solution ), but it still appear when i had changing it with not "0" or "" value. Fiuh.....observing and debugging again in this JQuery.validation.

{ Indonesian version : http://faridjauhari.wordpress.com/2009/12/31/edit-jquery-validate-2/ }

Finally,...Gotcha.....

The solution is adding "onchange function" as the default action in the extends class, that will extend to any input (* HTML tag :< input /> ) in the form that applying the JQuery.validation.

Thursday, January 7, 2010

Resolving JQuery.validate as my necessary

In the original JQuery.validate, 'required' action consider that the empty value of select (* dropdown in HTML) is just "". Value "0" considered this value not empty, so the 'required' action of JQuery.validate doesn't take it.
My necessary is the 'required' action is taking action when the value of select (* dropdown in HTML) was "0".

{Indonesian version : http://faridjauhari.wordpress.com/2009/12/31/jquery-validate-customize/}

The solution is making some changes in the 'required' action in "prototype" class of JQuery.validate. You can observed the changes below :

Wednesday, January 6, 2010

Last KeyUp Event (JQuery)....

In some cases while developing web, I had an idea to optimize the validation. I think that was so wasting to check an input when keyup. Why spent many times to check if the result is the same as did it in one last time.
To get the last keyup, it have to delay the check process until the last keyup. To delay some process, we need timers. I prefer to use JQuery.timers, cause i have applying JQuery library before and the timers can be an object on the element.    

{Indonesian Version : http://faridjauhari.wordpress.com/2009/12/31/event-keyup-terakhir/}

This code is an example of my implementation :

Tuesday, January 5, 2010

Resizing Image with Transparent Bacground in CI

This post is my experience, when i've got the problem about resizing image with transparent background, that

transparent part of the result image wasn't transparent any more, but it changed by black.
the first solution that i found was in the CI's forum ( http://codeigniter.com/forums/viewthread/62955/ ).

But it didn't work in png file. I was thinking, it might be the numerical representation of transparent

color was different beetwen png and gif.
And then i found another solution in the PHP's web

(http://www.php.net/manual/en/function.imagecolortransparent.php), that observed png and gif.

My implementation about that problem :

had knew that MySQL could....

It start when i tried to make SQL statement that can update some row in PHP and MySQL, but I didn't want
loops that request update statement to MySQL 
{Ex : for($i=1;$i<5;$i++) mysql_query("update some_table set some_field=some_value where primary_key = $i") },
I thought that it seems expensive (costly), cause it have to send request to DBMS (MySQL "in this way") many times. And I didn't want to make stored procedures or stored function or trigger or something else.
When I was "googling", "Boooom!!! How ashame!!!", at this far my experience with MySQL I didn't know it.

{ Indonesian version :http://faridjauhari.wordpress.com/2009/12/31/multi-update-in-one-sql-statement/ }


Well than, let me put it to an example :

Monday, January 4, 2010

PHTB Programmer

My result in http://www.doolwind.com/index.php?page=11 :

Your programmer personality type is:

PHTB

You're a Planner.
You may be slow, but you'll usually find the best solution. If something's worth doing, it's worth doing right.


You like coding at a High level.
The world is made up of objects and components, you should create your programs in the same way.


You work best in a Team.
A good group is better than the sum of it's parts. The only thing better than a genius programmer is a cohesive group of genius programmers.


You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We're not writing on paper anymore so we can take up as much room as we need.