Archive - Feb 15, 2007

Date

Power of 2

Bored, need 2 powerful energy drink to boost me up...
A function to find if a number is power of 2 or not.

function is_pow_of_2($x){
	return (!($x & ($x-1))) && ($x!=0);
}

and the other round the number to the nearest power of 2.

function round_pow_of_2($x){
	return pow(2,round(log($x)/log(2)));
}

Imarty release 0.02

in

Imarty just got it's release, check it out on it's project page.
The new features of this update:
1. Animations are possible
2. Imarty is broken into two classes, Imarty and AnImarty
3. A very easy URL interface

This system is still quite useless, I have to write more plugins.

Honey Pot that kill bots