This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(BOOL)Contains:(NSString *)StrSearchTerm on:(NSString *)StrText | |
{ | |
return [StrText rangeOfString:StrSearchTerm options:NSCaseInsensitiveSearch].location==NSNotFound?FALSE:TRUE; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSNumberFormatter *formatter = [[[NSNumberFormatter alloc] init] autorelease]; | |
[formatter setNumberStyle:NSNumberFormatterDecimalStyle]; | |
double d =324233.89; | |
int i = 324324324; | |
NSString *strFloat = [formatter stringFromNumber:[NSNumber numberWithDouble:d]]; | |
NSString *strInt = [formatter stringFromNumber:[NSNumber numberWithInt:i]]; | |
NSLog(@"Float: %@", strFloat); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSNumberFormatter *currencyFormatter = [[[NSNumberFormatter alloc] init] autorelease]; | |
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; | |
double d2 = 3432.89; | |
NSString *strCurrency = [currencyFormatter stringFromNumber:[NSNumber numberWithDouble:d2]]; | |
NSLog(@"%@", strCurrency); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface SampleClass : NSObject | |
- (id)init __attribute__((unavailable("init is unavailable"))); | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadDescription</key> | |
<string>Disables home</string> | |
<key>PayloadDisplayName</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UUID: | |
It is the acronym of Universally Unique Identifier. | |
A sequence of 128 bits that can guarantee uniqueness across space and time, defined by RFC 4122. | |
GUID: | |
It is the acronym of Globally Unique Identifier | |
It is Microsoft's implementation of the UUID specification; often used interchangeably with UUID. | |
In dot net framework its called as Plain GUID and in sql server its called as newid | |
UDID: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is UDID deprecated? | |
Yes. UDID is deprecated in iOS 5. | |
What are the alternatives? | |
identifierForVendor and advertisingIdentifier. | |
What is identifierForVendor? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use the below code snippet inside the | |
application:didFinishLaunchingWithOptions: | |
[[UIToolbar appearance]setBackgroundImage:[UIImage imageNamed:@"toolBarImage.png"] forToolbarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; | |
Download the toolBarImage from http://bit.ly/1lMdc5R | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//DAL.h | |
#import <UIKit/UIKit.h> | |
#import <sqlite3.h> | |
@interface DAL : NSObject | |
{ | |
sqlite3* sqLiteObj; | |
NSString* dataBasePath; | |
} | |
@property(strong,nonatomic)NSString *DbName; | |
-(NSMutableArray *)RetrieveRecordswithSql:(NSString *)sql withColumnsCount:(NSNumber *)count andColumnsDelimiter:(NSString *)colDelimiter; |
OlderNewer