The command used to flush the DNS cache changed in OS X 10.5 Leopard and later versions. The new command is just as easy to run, if not to remember. This article has been updated for all current versions of Mac OS X.
Creating tables in databases is an important first step for storing data. The CREATE TABLE statement is rich and sometimes confusing. This tech-recipe with an example describes the basics of creating a table in MySQL.
Editing some files on an OS X system requires superuser or root permissions. Typically, this is accomplished using sudo (which lets authorized users assume superuser powers, cape and tights optional) and vi. To the uninitiated, vi can cause intestinal distress and hair loss. An alternative is the use of TextEdit, the graphical text editor application, [...]
Category Mac system administration
Once you get past basic table view applications on the iPhone or iPad, you may run into the need to create an instance of NSIndexPath. NSIndexPath is an interesting class that stores the path to get to something in a nested set of collections. In an iPhone UITableView application, NSIndexPath is central as it provides [...]
Category Computer 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 [...]
Category C programming
We are giddy to announce the availability of our first game for the iPhone, GreenThumb. View the game at iTunes or try a full-featured, ad-supported FREE version! GreenThumb is an original, one-thumb casual game for the iPhone and iPod Touch. It is easy to pick up yet challenging to master.
Apple’s latest hardware upgrade for the iPhone line, the iPhone 3G S, adds voice control capabilities. Without looking at the device, using voice control you can easily dial the phone using numbers or a contact’s name, and control the iPod with various commands. (Updated as these can be performed with iPhone 4 as well) Here [...]
iPhone SDK: Solve [UINavigationController pushViewController:] unrecognized selector sent to instance
I adore coding to the iPhone SDK. It’s the most joyful coding I’ve done in the quarter century (gasp!) I’ve spent coding various computer systems. It’s a combination of Objective-C (elegant) and Cocoa (beautiful). There is one exception I keep getting and just infrequently enough that I forget why I get it. I thought someone [...]
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 [...]
Category Computer programming
The iPhone SDK provides an easy-to-code standard for creating consistent user interfaces. The UITableView class is used in many iPhone applications. Most applications that present information to you in rows that you can tap to slide a new page over to see details use a UITableView to do the magic. Once you have a UITableView [...]