Computer programming tutorials

Symfony: Detect Which Version is Installed

contributed by David Kirk on March 5, 2010 under Symfony

The Symfony php framework is frequently updated. Detecting which version is actively installed, however, is not well documented. Here is how to do it.

 

Cocoa: Convert number to comma-separated NSString

contributed by qmchenry on January 30, 2010 under C programming

At some point in your Mac, iPhone, or iPad development you may find the need to express a long number (1000000000) as a comma-separated string (1,000,000,000) to make life easier on your users. The NSNumberFormatter class is a rich tool for converting numbers to strings supporting different types of currencies and localizations. It’s also the perfect class to leverage for our comma-ing task.

 

Symfony: Drop Down List Box Without Submit Button

contributed by David Kirk on November 25, 2009 under Symfony

I needed a drop down list box for a symfony site I was designing. As a newbie symfony programmer, I wanted to record this so I could reference it later. Although this uses a little javascript, it will correctly function and is backwards compatible to users without javascript enabled.

 

Pear Fix for “Error: Unable to Unpack”

contributed by David Kirk on February 12, 2009 under PHP programming

Recently while trying to install some Pear packages, I received an odd “Error: Unable to Unpack” message. A search for this error message found a lot of complaining people and not a lot of answers. I finally figured out the cause and the fix for this common Pear problem.

 

Cocoa: Explode or break an NSString into individual words

contributed by qmchenry on October 20, 2008 under Computer programming

Breaking apart a string of text into component words is a requirement for performing searches in text and other text processing. This task is easy in Cocoa/Objective-C, although it requires digging through a few class references in the documentation. If you need a more complicated expansion of a string, at least this code will give you a starting point.

 

PHP: Upload Files to the Server

contributed by William_Wilson on September 30, 2008 under PHP programming

With PHP, it is simple to upload any file to your server.

 

Symfony / Propel: How to Left Join

contributed by David Kirk on July 4, 2008 under Symfony

A JOIN is a way to connect related database tables by the common values between them. A left join contains all of the rows from the primary table plus related members of the second database if they exist. Using joins can significantly reduce the number of database queries required to render a web page. This Tech-Recipe describes how to do a left join in Symfony using Propel.

 

Symfony: Rebuild from Schema.yml Without Loss of Data

contributed by David Kirk on June 27, 2008 under Symfony

As my test database became more complex, I hated entering data again after doing a propel-build-all. Following these commands, you can save your database content after rebuilding your database from your schema file.