programming


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 [...]

SVN repository on root directory - “out of date”

As nice as it sounds, you cannot have a repository on the root folder. There seems to be a problem with Apache and its virtual folders. If you insist to do so, you will most likely receive error messages  when commiting:
svn: The version resource does not correspond to the resource within the transaction. Either the requested [...]

Decadence

Decadence

Irony is just a kind of iron melting technique.

Non Compatible

Non Compatible

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 [...]

Better make it disappear…

a.button:hover{
filter:alpha(opacity=50);
-moz-opacity: .50;
opacity: .5; }
Opacity doesn’t work for me in IE. Not even in IE7. It just won’t work. I searched the web for something else that would help me but no luck.
My current solution?
browser.ie{
opacity: .0; }
If anyone has anything else to propose I’d be glad to listen to other actually practical solutions.
Edit: Solution given by Dionyziz as follows:
(thank you a [...]

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, [...]

Some Basic Things

 

 
A great experience I had back in the beginning of junior high was the discovery of QBasic variant of the BASIC language and development environment. I didn’t know much about programming back then ( well at least compared to what I know now ). I found the file by chance while searching the dos directory [...]