Testing file existence using NSURL

NSURL does have this method: – (BOOL)checkResourceIsReachableAndReturnError:(NSError **)error Which “Returns whether the resource pointed to by a file URL can be reached.” NSURL *theURL = [NSURL fileURLWithPath:@”/Users/elisevanlooij/nonexistingfile.php” isDirectory:NO]; NSError *err; if ([theURL checkResourceIsReachableAndReturnError:&err] == NO) [[NSAlert alertWithError:err] runModal];

Easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)?

Open a good text editor (I’d recommend TextMate, but the free TextWrangler or vi or nano will do too), and open: /etc/apache2/httpd.conf Find the line: “#LoadModule php5_module libexec/apache2/libphp5.so” And uncomment it (remove the #). Download and install the latest MySQL version from mysql.com. Choose the x86_64 version for Intel (unless your Intel Mac is the … Read more

Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?

To get Xcode 4.2 on Snow Leopard to run code on a device running iOS 5.1 you can do this: If you have another Mac running Lion and Xcode 4.3.1 you can copy the files from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176) Place the copied files in the equivalent place on your Snow Leopard Mac: probably /Developer/Platforms/iPhoneOS.platform/DeviceSupport Similarly copy … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)