Presenting the PHP 5.3 compatible version of my PHP path resolution class! Why there should be a difference? Because my original version used create_function, which… created a whole new function object every time you used one of the class’s methods. This was very memory expensive and even incurred a slight performance hit.
Lately I’ve been working on a project that required me to handle a lot of file-system related operations, especially paths. While PHP offers some basic functions to handle paths, such as basename and dirname to resolute the (direct) parent and base name of a path, it does not offer any means of normalizing or combining […]
Lately I have been playing a lot with SSE optimizations and I really enjoy it so far – using functions to tell the compiler what instructions to use makes you feel the power in your finger tips. At first I was naive and thought the compiler will do exactly what it’s being told, assuming that […]
I recently came across a very nasty DoS attack that any script kiddy can execute – called slowloris. It involves sending partial HTTP packets while Apache2 patiently waits for an unreasonable amount of time for the remaining data while consuming a thread, doing so continuously will prevent Apache2 from opening more threads and serving potential […]
Call me crazy, but I really like Flash’s EventDispatcher class – it’s simple, powerful and most of all relatively fast. I felt the need to take EventDispatcher outside of my flash projects to my more advanced C++ ones. This turned out to be quite an easy task. Instead of a boring ‘download code’ link, I […]
Being a huge C/C++ fan, I had a really hard time switching to AS3 and giving up most of C++’s power features as enumerations. I was surprised that a programming language that is based on Java and C# doesn’t support native enumerations built in the language. After a quick look-up at various Google searches, turns […]