iOS Design Patterns – you’ve probably heard the term, but do you know what it means? While most developers probably agree that design patterns are very important, there aren’t many articles on the subject and we developers sometimes don’t pay too much attention to design patterns while writing code.
Niche technologies
Thursday, 17 July 2014
Monday, 2 June 2014
UPTU Entrance Exam | GBTU Entrance Exam | MTU Entrance Exam UP Combined Engineering Exam UPSEE-2014
UPTU Entrance Exam | GBTU Entrance Exam | MTU Entrance Exam
UP Combined Engineering Exam UPSEE-2014
UP Combined Engineering Exam UPSEE-2014
Download UPSEE B.Tech/ B.Tech AG Result 2014
Download UPSEE B.Tech Second Year 2014
Download UPSEE B.Pharma Result 2014
B Pharma Second Year Result 2014
Download UPSEE Biotech Result 2014
Download UPSEE B.Arch Second Year 2014
Download UPSEE BFAD Result 2014
Download UPSEE BHMCT Result 2014
Download UPSEE MCA Result 2014
Download UPSEE MBA Result 2014
Download UPSEE BFA Result 2014
Download UPSEE MAM Result 2014
Download UPSEE MCALAT Result 2014
Download UPSEE B.Tech Second Year 2014
Download UPSEE B.Pharma Result 2014
B Pharma Second Year Result 2014
Download UPSEE Biotech Result 2014
Download UPSEE B.Arch Second Year 2014
Download UPSEE BFAD Result 2014
Download UPSEE BHMCT Result 2014
Download UPSEE MCA Result 2014
Download UPSEE MBA Result 2014
Download UPSEE BFA Result 2014
Download UPSEE MAM Result 2014
Download UPSEE MCALAT Result 2014
UPSEE | UPSEE Result | UPSEE B.tech Result
Tuesday, 1 April 2014
how to check file is updated or not without using modified time
how to check file is updated or not without using modified time in cocoa for mac-osx objective-c
How to get checkSum of a file........
#import "NSData+MD5.h"
@interface NSData(MD5)
- (NSString *)MD5;
@end
#import <CommonCrypto/CommonDigest.h>
@implementation NSData(MD5)
- (NSString*)MD5
{
// Create byte array of unsigned chars
unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH];
// Create 16 byte MD5 hash value, store in buffer
CC_MD5(self.bytes, self.length, md5Buffer);
// Convert unsigned char buffer to NSString of hex values
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++)
[output appendFormat:@"%02x",md5Buffer[i]];
return output;
}
@end
Call from Own class:
+(NSString *)getCheckSum:(NSString *)filePath{
NSData *nsData = [NSData dataWithContentsOfFile:filePath];
if (nsData){
return [nsData MD5];
}
else{
return nil;
}
}
Subscribe to:
Posts (Atom)