When dealing with legacy applications and moving them to Doctrine (or any ORM), you will undoubtedly encounter poorly named columns and tables in need of migration. Unfortunately in the case of Doctrine 2, the default behavior for SQL query generation fails to encapsulate the column names properly, causing syntax errors with column names like “delete”. […]
This will add a collector to handle Doctrine’s second-level cache and display basic information on puts, hits and misses on your PHP DebugBar. Then instantiate the cache logger, set it to the cache config and add it to the new collector.
One of the most annoying errors to debug when working with a litany of autoloaders using required instead of include_once in PHP: PHP Fatal error: Cannot declare class SomeClass, because the name is already in use in /somewhere/SomeClass.php on line 1234 What makes it annoying is the lack of a trace. You know it was only […]
For this to work, you’ll need FFMPEG and Python on your machine or server already. Configuration of this is beyond the scope of this post, but installation through yum or apt-get should be sufficient (or equivalent on a Windows or Mac). To pull the duration of a video from any machine with FFMPEG and Python […]
Fizz buzz is a group word game for children to teach them about division. Players take turns to count incrementally, replacing any number divisible by three with the word “fizz”, and any number divisible by five with the word “buzz”. ORG $1000 FIZZ DC.B ‘FIZZ’,$0D,$0A,0 BUZZ DC.B ‘BUZZ’,$0D,$0A,0 FBUZZ DC.B ‘FIZZBUZZ’,$0D,$0A,0 CRLF DC.B $0D,$0A,0 […]
Here are the default fuse settings for each Arduino from the boards.txt included with the Arduino development software. To understand more about the fuse settings for your microcontroller, visit Engbedded’s AVR Fuse Calculator. To write fuse settings, you will need a programmer with this capability. I use Mighty Ohm’s high-voltage rescue shield available here. Arduino […]
In need of an IP address on-the-fly that appears to be valid? Try this: from random import randrange def generateIP(): blockOne = randrange(0, 255, 1) blockTwo = randrange(0, 255, 1) blockThree = randrange(0, 255, 1) blockFour = randrange(0, 255, 1) print ‘Random IP: ‘ + str(blockOne) + ‘.’ + str(blockTwo) + ‘.’ + str(blockThree) […]