Blogspot - the-useful.blogspot.com - ThE uSeFuL

Latest News:

Generate primary key - Objective C 13 Jun 2013 | 03:24 pm

The following code will generate a primary key using the current time stamp, a character (I have used the character 'T' in this example) and a random number. I have used this to generate primary keys ...

Account access denied - paypal 12 Jun 2013 | 08:46 am

Just got an email with subject "Account access denied" from paypal (see screenshot below). The mail said that there have been an unauthorized access to my account and I'm required to verify my account...

The new Google keyboard - A duplicate of SWYPE or better? 12 Jun 2013 | 08:38 am

Google Maps, Google Drive, Google This, Google That…. But there is always room for one more new arrival from Google, and now it is in the form of an app called Google Keyboard. Google's Android keyboa...

Twitter tip - How to undo a retweet (web) 15 Mar 2013 | 10:01 am

Earlier in the morning I wanted to undo a retweet I did. It took me a while to figure out how to. Just posting it here for future use and for you who is reading this right now. 1. Find the tweet your...

NSView AutoresizingMask explained 19 Feb 2013 | 04:09 pm

You can make your NSViews auto arrange/resize according to its superview's size by setting appropriate values using NSView's setAutoresizingMask: method. For this example's sake I'll consider elements...

Check for both null and nil to avoid crash - objective c 14 Oct 2012 | 11:24 pm

Sample code line 1: NSString *someString; line 2: someString = [self getStringValue]; line 3: NSLog(@"length of the string = %d",[someString length]); In the above example sometimes the code can c...

Objective C - missing documents directory 3 Oct 2012 | 08:28 pm

Did you know that by using "removeItemAt:" method in NSFileManager you could actually delete the documents directory? It is bit of a scary thought and I sometimes feel that it shouldn't be the case to...

Mac OSX Mountain Lion unidentified developer 10 Aug 2012 | 02:31 pm

Looks like Apple is serious about provisioning and developer certificates for Mac apps from their latest Mac OSX version (10.8 - Mountain Lion). It has always being the case for iOS apps but not for M...

Can’t add UIImagePickerViewController’s view as a sub view – iOS 4 22 May 2012 | 08:41 pm

Incorrect code sample UIImagePickerController *pickerController = [[UIImagePickerController alloc]init]; pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; pickerControlle...

UINavigationBar default back button - iOS 5 11 May 2012 | 10:17 pm

It is common knowledge that the UINavigationBar will display the previous UIViewController's title in an arrow shaped button at the left hand side corner. Basically if the previous UIViewController do...

Recently parsed news:

Recent searches: