PHP


PHP Flood Fill

PHP Flood Fill

Flood Filler is a small program in PHP demonstrating the Flood Fill algorithm in a simple way.
Here’s the code:

/*

 * @title:  Flood Fill Class

 * See below class for example input.

 */

class FloodFiller {

 

    private $x, $y, $fill, $searchNext, $map;

 

    public function Scan( $map, $point ) {

        // We create the list of [...]

Dynamically Generated Greasemonkey Scripts

I recently made a Greasemonkey Script which I intended to use in some project of mine. It took me quite a while to write and debug ( damn css developers who use “!important” anywhere they do not know how to make things work correctly   ).
My script contained a couple of configuration variables, that needed to [...]

To GET or to POST? Edit: Deezer.com example

It was some days ago when, working on my practice project - a simple file uploader in PHP, I wanted to unable the users to delete any of the files they had previously uploaded on the server.
My first thought was to create a “delete” link, after each file or folder on the list displayed to [...]

Beware of the Strings

 
Today I learned a really useful lesson.
Currently I’m working on converting my practice project, a simple uploader program in PHP, into OOP.
Let’s take a look at the construct of the User class. For every instance of the class that is created, there is a check on whether the parameter provided is an id or a username, [...]