Posts filed under “Development”

Flex Box: Prevent Children From Stretching

So, flex boxes are a glorious addition to CSS3 to make advanced layouts rapidly. No more crazy floats and nested divs and weird percentage values for columns! Just setup your orientation to horizontal and toss a box-flex: 1 in for kicks. However, just a tip: In the course of working with flex boxes, you will [...]

Doctrine 1.2 MSSQL Alternative LIMIT/Paging

At work I had been having all sorts of issues with Doctrine_Connection_Mssql‘s LIMIT alteration, based on Zend_Db‘s code. The code used the more-compatible-with-SQL-Server-2000 technique of modifying the query to SELECT TOP (offset + limit), reverse the ORDER BY clause and SELECT TOP (limit), then finally reversing the returned dataset. As ugly as this technique is, [...]

Netbeans Code Completion and your Zend_View

Oh, look at me, blogging again! I definitely have a lot to blog about as I get the time, I’m coming off of a really involved project and learned a lot of tips I’d like to share about the Zend Framework. In the mean time I thought I’d share something I had a helluva time [...]

Python PHPSerialize Posted To Googlecode

A while back I posted a Python snippet that I noticed could be used in a few other side projects. I have since posted it to Google Code so more than just myself will know it exists: http://code.google.com/p/phpserialize/.

Doctrine Migrations Proper

I was talking with someone (I will edit this post when I find her card and remember her name) here at ZendCon and discovered that they were having trouble with migrations in Doctrine. Having gone through the same issues of Doctrine seemingly not being able to figure out your changes and generate migration classes, I [...]

Solve A Sliding Puzzle With JavaScript And Your AI Course: Part 1

In all my years of web development and formal computer science training, you know I never really got around to truly sitting down and learning JavaScript. Sure I knew the syntax (C based, not terribly hard), understood closures (LISP will do that to you), understood the prototype approach to Object Orientation (oddly enough playing with [...]

Development Environment Help! Setting Up PHP mail() On Windows, Or: Where Is My Windows sendmail.exe?

Lately at work I’ve been having the worst of trouble getting PHP on my workstation to send mail. Previously it was a simple trek to a website to download a Windows build of sendmail.exe, but for some reason I cannot get access to it, so I have to go another route. Enter hMailServer, a free, [...]

Calculating Daylight Savings Time Boundary In PHP

I had an issue recently where I needed to calculate the Unix timestamp for the daylight savings time boundaries. According to the United States Naval Observatory, daylight savings time begins the Second Sunday of March and ends on the First Sunday of November. Awkward date calculations if you don’t have the magical strtotime() function in [...]

PHP File Uploads And Background Conversion: Oopsie

So I spent an inordinate amount of time tracking down a bug recently for a former employer in a system that accepts media file uploads and converts them on the fly. The system spawns off a small script that manages mplayer/ffmpeg/lame into the background and holds on to the PID to track the conversion process. [...]

PHP, Mumbles (Growl), and DBus: Sweeet

So, after reading Mark Shuttlework’s blog on ideas for notifications in Ubuntu (basically mimicking Growl notifications for the Mac), I decided I wanted that kind of functionality, but… you know, NOW! There are a multitude of options available but currently I’m liking Mumbles. Unlike, say, Specto, which does the monitoring itself, Mumbles provides a DBus [...]