Latest stories

Conversion of NSString to NSDate and NSDate to NSString

C

  Here is the way to convert NSDate to NSString in objective C Conversion of NSDate to NSString : NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@”yyyy-dd-MMM”]; NSString *dateString = [dateFormat stringFromDate:today]; NSLog(@”date: %@”, dateString); [dateFormat release]; Note that today should be your NSDate object which you...

Extracting data from Apple iTunes

E

I tried a lot to find RSS feeds for latest apps getting posted on Apple iTunes store under all categories but couldnt find anywhere, not sure why Apple does not provide such feed. So I decided to write one of my own and below is how I accomplished the task using curl in php. Through httpfiddler I first out request headers sent by iTunes software and used the same.   <?php function...

How to import Chinese characters in Mysql Table?

H

I know proper way to do this does exists but I was falling short of time and wasnt able to find perfect solution, so used this a way around to import a list of chinese cities in chinese language to one of my mysql table. 1. 1st changed the table structure to make the city field collation as big5_chinese_ci 2. I had the list of chinese cities in chinese language in excel sheet. Using a small VBA...

How to get sprite animation frames using spritesheet in cocos2d

H

if you are using SpriteSheet for animation,you can extract all required frame like this…     [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"spritesheet.plist"];     CCSpriteBatchNode *spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@"spritesheet.png"];     [self addChild:spriteSheet];      NSMutableArray *frames = [[[NSMutableArray alloc]init]retain];      for(int...

Lazy Loading UITableView Cell images in iPhone

L

.h – (void) loadImageInBackground:(NSArray *)urlAndTagReference ; – (void) assignImageToImageView:(UIImage *)img; .m – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0];...

Nanostuffs Exhibits At Ad-Tech, San Francisco.

N

Nanostuffs Exhibits At Ad-Tech, San Francisco – 9 to 10 April 2012 Stand Location: Mobile Marketing ZoneFor more than ten years, ad:tech has provided media, marketing and technology professionals with the tools and techniques they need to succeed in a changing digital world. With 10 shows in 7 countries, ad:tech’s globally respected roster of speakers, workshops and exhibitors...

How to signed Blackberry Application

H

Code Signing in not required when applications are loaded and tested on a BlackBerry Smartphone Simulator. Developers order code signing keys from RIM, and receive a set of files that are then installed on their development machine.  The BlackBerry development tools are then able to provide these key files to the BlackBerry Signature Tool when the developer requests that their application be...

How to Send Email through Simulator in blackberry

H

If you are using Blackberry Java Eclipse Plugins then follow the steps. Step-1:   a) Sending Email Without Attachment. //Get the Store from the default mail Session. Store store = Session.getDefaultInstance().getStore(); //retrieve the sent folder Folder[] folders = store.list(Folder.SENT); Folder sentfolder = folders[0]; //create a new message and store it in the sent folder Message msg = new...

Save and Load UIImage in Documents directory on iPhone

S

The following function saves UIImage in test.png file in the user Document folder: - (void)saveImage: (UIImage*)image { if (image != nil) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString* path = [documentsDirectory stringByAppendingPathComponent: [NSString stringWithString: @"test...

NSUserDefaults to save and retrieve the data in iPhone

N

In many applications we need to save the state of the application, in that case we can use NSUserDefaults. Lets start with saving the data into NSUserDefaults. We can save small amount of data in NSUserDefaults such as username, high scrore, etc. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:@”username” forKey:@”UserName”]; This is...

Category