Mac 2012
12 September 2011, 12:20 pm
Isnin, 12 September 2011, 12:20 pm0 This is one phishing mail I received today. If you hover the link, the URL seems correct, but you can’t fool me waltersgreenhouse.ca / rumahhawa.com, see the bottom left of the browser windows, it shows the link it’ll redirect you to. Don’t enter your info to that site!!! P/S: I […]
11 September 2011, 9:18 pm
Ahad, 11 September 2011, 9:18 pm0 This is continuation from singleton pattern post. Here’s the abstract class for singleton pattern, and other classes that need to be singleton just need to extend this class. We can’t directly use self::$instance = new self(); because self will refer to this singleton class itself, not the class we […]
8 September 2011, 10:04 pm
Khamis, 8 September 2011, 10:04 pm0 nude.js is JS based nudity scanner using HTML5 Canvas and Webworker. The algorithm is based on this research paper http://www.math.admu.edu.ph/~raf/pcsc05/proceedings/AI4.pdf. I’ve been working on to port the script to PHP and using GD library. So, here’s the result: php-nudity-filter. It’s a direct porting of the nude.js script to PHP, where […]
7 September 2011, 11:22 pm
Rabu, 7 September 2011, 11:22 pm0 I’m a noob in using Git, and I’m using Github to host some of the code I wrote. Here are some basic commands to host a project with Github (or using Git revision control generally) (sometimes I forgot the command or the order of which command goes first) Global […]
6 September 2011, 3:33 pm
Selasa, 6 September 2011, 3:33 pm0 I’ve been using Gimp as my primary image editing software. I never used photoshop (and I don’t want to). The only thing that make using Gimp quite difficult is the user interface – the main application window is separated into 3 (sometimes 2) tiny windows. I used to promote […]
5 September 2011, 1:11 pm
Isnin, 5 September 2011, 1:11 pm0 Within PHP app, we need to set the timezone to only one timezone – UTC. All timestamp data that going in and out of the database must use UTC timezone so that it’s easier to convert to other timezone value. It’s a basic in PHP script to first set […]
5 September 2011, 12:07 pm
Isnin, 5 September 2011, 12:07 pm0 In http://stackoverflow.com/questions/962915/how-do-i-make-an-asynchronous-get-request-in-php, it shows how to send asynchronous request from PHP script, so that the webpage is immediately rendered without waiting the request to finish. This technique is important if you want to implement background processing in web app, just by send a request to own script that going to […]
2 September 2011, 4:34 pm
Jumaat, 2 September 2011, 4:34 pm0 Here’s a simplified template class that was inspired by PHP Tip: Extract, Variable Variables and Templating. It supports template inheritance, it’s object oriented & got auto escaping variables. Furthermore, it doesn’t need to be compiled, since it’s using plain PHP The class: tpl.class.php This class is just a basic […]
2 September 2011, 2:36 pm
Jumaat, 2 September 2011, 2:36 pm0 Singleton class is class that allow only one instance of its class to be instantiated. A lot of examples I see the way to implement singleton pattern whether: 1. Extends a base singleton class 2. Each class apply singleton pattern (get_instance() method, has static $instance attribute) 3. Using registry […]
2 September 2011, 11:19 am
Jumaat, 2 September 2011, 11:19 am0 After reading Explaining Hooks, finally I understand the concept of hooks in PHP and why people use it in WordPress and say WP codes is poetry. The general idea is, in a web application, during the runtime of the program it go through stages of processes, such as connecting […]