Monthly Archives: January 2010

Indenting code blocks with wordpress

I finally figured out how to setup code blocks and preserve indentation. I expected the code tag to do this but this only handles the font and colour. Use the pre tag

Tagged with:
Posted in Code, Misc

Avoiding the 30 second tcp timeout on iPhone OS

So you are writing the next great iPhone app and you pull some data from a server using TCP, but what happens in the unhappy scenario? TCP timeout takes about 30 seconds, if in the main loop, your app freezes,

Tagged with: , ,
Posted in Code

The search for Zombies (NSZombies)

Debugging (auto)release errors It’s quite easy to release an object twice, causing Objective-C programs to crash somewhere else. Quite difficult to detect, therefore create the following .gdbinit file in your home folder: fb -[NSException raise] fb objc_exception_throw() fb -[_NSZombie release]

Tagged with:
Posted in Code

Building a bass guitar

With the closure of geocities my fist webpage ever became homeless. It seems a good idea to resurrect it here. last update : 27 February 1998 What will you need Right, the first thing you will be requiring is a

Tagged with: , , , , ,
Posted in Music

Taurus III Tab

Visions of the past, when i had time, and faster fingers: Taurus III ———- by Mike Oldfield tabbing :Chris Lukassen special thanks to : Chris Conway Arpeggio 1] 3] |——————|—6-7-9—7-6—-|—6-7————|——————|| |————-6-7–|-9—————-|-9——-7-9-6-7–|——————|| |———6-8——|——————|——-8———-|—6————–|| |—6-8-9———-|——————|——————|-9—9-8-9-8——|| |-9—————-|——————|——————|————-9—-|| |——————|——————|——————|——————|| 2] 4] |——————|| |——————| |———7——–||

Tagged with: , ,
Posted in Music

Levan Polka Score

I absolutely loved this song when i first heard it, and there is a certain magic to the finish language. It’s extremely difficult to get it right but i can make it through verse one and halfway verse two. Resources

Tagged with: ,
Posted in Music

Playing a sound from Cocoa and setting the balance

The NSSound class is great for playing simple sounds, yet it lacks control over a more flexible way to play sounds. MacTrek plays sounds louder when they happen closer to the players position and balances them left or right when

Tagged with: ,
Posted in Code

Getting the version number from Info.plist in your code

If you are a lazy coder like me (or you don’t like to code version numbers all over the place) you should use the version number that Apple wants you to specify (in the Info.plist file) whenever you need to

Tagged with: , ,
Posted in Code

Feeding NSXMLParser a stream of xml

NSXMLParser is a great parser, but what if you are reading XML from, say a socket. You may not have the complete message right away, and there may be multiple root tags (or you can close and open a socket

Tagged with: , , ,
Posted in Code

My favorite computer

Tagged with: , ,
Posted in Apple
Categories