Compression API on the iPhone

If you store the data for the conversations in an NSData object, the folks at the CocoaDev wiki have posted an NSData category that adds gzip and zlib compression / decompression as simple methods. These have worked well for me in my iPhone application. As the above link has gone dead while the CocoaDev wiki … Read more

How to convert an NSString to hex values

The perfect and short way to convert nsstring to hexadecimal values NSMutableString *tempHex=[[NSMutableString alloc] init]; [tempHex appendString:@”0xD2D2D2″]; unsigned colorInt = 0; [[NSScanner scannerWithString:tempHex] scanHexInt:&colorInt]; lblAttString.backgroundColor=UIColorFromRGB(colorInt); The macro used for this code is—- #define UIColorFromRGB(rgbValue) [UIColor \colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

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