NSTimeZone - Timezone Abbreviations ADT = "America/Halifax"; AKDT = "America/Juneau"; AKST = "America/Juneau"; ART = "America/Argentina/Buenos_Aires"; AST = "America/Halifax"; BDT = "Asia/Dhaka"; BRST = "America/Sao_Paulo"; BRT = "America/Sao_Paulo"; BST = "Europe/London";
This file contains 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 UIKit | |
import Foundation | |
/** Design a function that takes two string parameters: | |
input | |
pattern | |
The function should return the longest substring that fully matches | |
the provided pattern. Assume that the input and pattern characters are | |
alphabetic. |
This file contains 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
the proper sequence is | |
-(void)initWithCoder | |
-(void)awakefromNib //(if story board is used) | |
or | |
-(void)loadView----() //if manually generating the view contoller | |
-(void)viewDidLoad-----(called only once in the life cycle of viewController) | |
-(void)viewWillAppear | |
-(void)viewDidAppear |
This file contains 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 "AppDelegate.h" | |
#import <Realm/Realm.h> | |
// Define your models | |
@interface Dog : RLMObject | |
@property NSString *name; | |
@property NSInteger age; | |
@end | |
@implementation Dog |
This file contains 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
- (CGSize)tableView:(UITableView *)tableView sizeForHeaderLabelInSection:(NSInteger)section | |
{ | |
NSString *text = [self tableView:tableView titleForHeaderInSection:section]; | |
CGSize constraint = CGSizeMake(self.view.frame.size.width - kSectionTitleLeftMargin - kSectionTitleRightMargin, kMaxSectionTitleHeight); | |
return [text sizeWithFont:[self fontForSectionHeader] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; | |
} | |
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section | |
{ |
This file contains 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
{ | |
"completed_in": 0.012, | |
"max_id": 136536013832069120, | |
"max_id_str": "136536013832069120", | |
"next_page": "?page=2&max_id=136536013832069120&q=twitterapi&rpp=1", | |
"page": 1, | |
"query": "twitterapi", | |
"refresh_url": "?since_id=136536013832069120&q=twitterapi", | |
"results": [ | |
{ |
This file contains 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
# OS X Finder | |
.DS_Store | |
# Xcode per-user config | |
*.pbxuser | |
!default.pbxuser | |
*.mode1 | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 |
- To add Settings.bundle in Xcode. Command N and in Resource, choose Settings Bundle .
- Open
Root.plist
in source code, paste the code below to replace it,
<?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>PreferenceSpecifiers</key>
Either add this to your gitconfig:
[merge]
tool = kdiff3
[mergetool "kdiff3"]
cmd = \"C:\\\\Program Files\\\\KDiff3\\\\kdiff3\" $BASE $LOCAL $REMOTE -o $MERGED
Or run These at the command line:
$ git config --global merge.tool kdiff3
This file contains 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
moveTo = function (arr, value, position) { | |
var index = arr.indexOf(value), newPos = position - 1, temp = arr[newPos]; | |
if (index === -1) return; | |
if (newPos >= arr.length || newPos < 0) return; | |
if (index === newPos) return; | |
arr.splice(newPos, 1, value); // Remove 1 item at newPos insert value | |
arr.splice(index, 1, temp); // Remove 1 item at index, insert temp | |
} | |
//var a = ['Matt', 'Ralph', 'Jason']; |
NewerOlder