iPhone OS: ffmpeg for the iphone – Part 1

I am just checking if it is possible to get WMV9 support for one of my applications on the iphone using ffmpeg. The good point a lot of people tried to get these working, but actually none covered if his application was approved for the AppStore. Due to Apples guidelines there might be some problems […]

Read More

Terminal: Search and Replace text in all files in a folder and its subfolders

I just stumbled across a neat idea using perl to replace the content in files To replace all occurances of a string: find ./ -name “*.txt” | xargs perl -pi -e ‘s/stringtoreplace/replacementstring/g’ for every of these examples you can also use sed find ./ -name “*.txt” | xargs sed -i ‘s/stringtoreplace/replacementstring/’ or rpl rpl stringtoreplace […]

Read More

Scalable second-generation distributed database

simple

March 28, 2010

Databases

No Comment

A good friend of mine just showed me two links to scalable second-generation distributed database, I want to share with you. This approach is my favorite one – as it is the underlying database of Digg, Facebook, Twitter and many others. It is written in Java and released under the Apache License: http://cassandra.apache.org/ The other […]

Read More

MySQL Replication Setup

On the Master we first flush the tables in the database setting a read lock: USE phpMyWebcam;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS; The last command will show something like this +——————+———-+————–+——————+ | File | Position | Binlog_do_db | Binlog_ignore_db | +——————+———-+————–+——————+ | mysql-bin.015586 | 364167 | phpMyWebcam | | +——————+———-+————–+——————+ 1 row in set […]

Read More

Resolve IP Address for hostname on the iPhone

simple

March 17, 2010

iOS, UIKit

No Comment

On the Mac you might use NSHost, but as this is missing on the iPhone you are of using CFHost. Or much simpler use some standard C functions and you can easily get an IP Address for a hostname on the iPhone: #include #include // Get host entry info for given host struct hostent *remoteHostEnt […]

Read More

Cocoa: Core-Plot for MacOS X and iPhone

If you want to draw nice plots or graphs on the Mac or the iPhone, then you will come across core-plot. This opensource project really works well and following some of the links should give you a good start Google Code Page: http://code.google.com/p/core-plot Tutorials: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application http://blogs.remobjects.com/blogs/mh/2010/01/26/p973

Read More

Purge MySQL Database

simple

February 23, 2010

Databases

No Comment

If you run out of disk space on your server, it might be a good time to check your mysql binary logs. If there is really to much space used than just issue some SQL commands and you can delete them. To delete all binary logs older than 7 days: mysql> PURGE BINARY LOGS BEFORE […]

Read More

Core Animation Tutorials

simple

April 13, 2009

Cocoa

No Comment

I found a nice site which features a tutorial for Core Animation: http://theocacao.com/document.page/533

Read More

iPhone OS: Crash Logs

simple

February 4, 2009

iOS, UIKit

No Comment

I’ll start with a disclaimer. I’m not sure whether the information provided in this post is covered by iPhone Developer Program NDA or not. If it is, the post will be removed. Secondly, this post is a result of googling, so I haven’t invented anything new here. Working with crash logs typically involves certain interaction […]

Read More

Cocoa: Debugging retain counts

simple

November 6, 2008

Cocoa

No Comment

This article is a big Time Save if you are debugging retain counts in Cocoa. Original version (Aaron Hillgrass): http://weblog.bignerdranch.com/?p=2 This article, originally published in MacTech Magazine, gives tips on how to write your code such that retain count problems are easier to find and how to locate the problem when symptoms appear. Before delving […]

Read More