Codec ░ PHP

565Stripping Characters from an NSString

NSString *stripped = [unstripped stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"\n\t "]];

Well, Cocoa, a bit of too much syntactic nutrasweet here. Take a look at PHP and wheep:

$stripped = trim($unstripped);

(Yes, I am aware that’s somewhat of an unfair comparion, but still…)

564NSData to NSString and vice versa 484Printing Selectors in NSLog 452Padding with Zeros (or other characters) 383String By Appending Path Component 381Zero-Padding

319Chaning Colors in Twitter with the API

require "<a href="http://github.com/jdp/twitterlibphp">twitter.lib.php</a>";
 
$username = "<a href="http://twitter.com/trembl/">trembl</a>";
$password = "&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;";
 
$twitter = new Twitter($username, $password);
 
$options = array(
	"profile_background_color" => "fff",
	"profile_text_color" => "fff",
	"profile_link_color" => "fff",
	"profile_sidebar_fill_color" => "fff",
	"profile_sidebar_border_color" => "fff"
);
 
$update_response = $twitter->updateProfileColors($options);
print_r($update_response);

Nice, isn’t it?

565Stripping Characters from an NSString 303singleTap: and private API 265Like explode(), only componentsSeparatedByString: 175Curling Images at Twitter 98PHP-cgi wrapper

265Like explode(), only componentsSeparatedByString:

PHP
explode(“, ” , “One, Two, Three”);

Objective-C
NSArray *listItems = [@"One, Two, Three" componentsSeparatedByString:@", "];

569Layering one UIImage onto of another UIImage 565Stripping Characters from an NSString 560#import vs #include in Objective C – A quick reminder 457Singleton Classes and Shared Resources in Objective-C 420Getting current Time with Microseconds

98PHP-cgi wrapper

http://wordpress.org/support/topic/217411

http://www.pair.com/support/knowledge_base/authoring_development/system_cgi_php-cgiwrap.html

565Stripping Characters from an NSString 319Chaning Colors in Twitter with the API 265Like explode(), only componentsSeparatedByString: 85Calling ImageMagick from PHP

85Calling ImageMagick from PHP

Getting ImageMagick to work by calling system() in PHP turned out to be more troublesome that originally assumed. Of course, Safe-Mode has be off, the dirs need to have the appropriate permission, and the absolute paths to ‘convert’ and your files should be set.

But still, it would not work. Despite executing directly in the shell quite nicely. The revelation came late, but better than never:

IM apparently hate single quote ‘ ‘, and absolutely insists on double quotes ” ” to wrap it’s arguments in.

Can not really say, that this is well thought out… Anyways…

591Fonts on the iPhone 565Stripping Characters from an NSString 319Chaning Colors in Twitter with the API 265Like explode(), only componentsSeparatedByString: 98PHP-cgi wrapper