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
/******************************************************************** | |
* Add Recognizer to view | |
* | |
* UITapGestureRecognizer | |
* UISwipeGestureRecognizer | |
* UIPinchGestureRecognizer | |
* UIRotationGestureRecognizer | |
* UIPanGestureRecognizer | |
* UILongPressGestureRecognizer | |
*/ |
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/UIKit.h> | |
#define kSCNavigationBarBackgroundImageTag 6183746 | |
#define kSCNavigationBarTintColor [UIColor colorWithRed:0.54 green:0.18 blue:0.03 alpha:1.0] | |
@interface SCAppUtils : NSObject | |
{ | |
} | |
+ (void)customizeNavigationController:(UINavigationController *)navController; |
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
1. To Setup Git: | |
$git --version | |
$git config --global user.name "Your Name" | |
$git config --global user.email "Your Email Address" | |
$git config --global color.ui "auto" | |
$git config --global alias.co checkout | |
$git config --global core.editor "mate -w" | |
2. To Generate SSH Key for SSH Connection: |
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
#pragma mark - | |
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
messageLabel.text = @"Touches Began"; | |
[self updateLabelsFromTouches:touches]; | |
} | |
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { | |
messageLabel.text = @"Drag Detected"; | |
[self updateLabelsFromTouches:touches]; |
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 os | |
i=1 | |
for file in os.listdir("/Users/****/Downloads/Episode1"): | |
if os.path.splitext(file)[1] == ".gif": | |
os.rename(file, "2011_11_"+str(i)+".gif") | |
i+=1 |
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
NSString* aStr; | |
aStr = [[NSString alloc] initWithData:aData encoding:NSASCIIStringEncoding]; | |
NSData* aData; | |
aData = [aStr dataUsingEncoding: NSASCIIStringEncoding]; |
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
// Document Folder | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
NSString *filename = [documentsDirectory stringByAppendingPathComponent:@"theFile.txt"]; | |
// Temp Folder | |
NSString *tempPath = NSTemporaryDirectory(); | |
NSString *tempFile = [tempPath stringByAppendingPathComponent:@"tempFile.txt"]; |
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
1. List all the tables | |
sqlite> .tables | |
2. List the structure of a table | |
sqlite> PRAGMA table_info([ZCLIENT]); | |
3. Exit | |
sqlite> .exit | |
4. Open a database file |
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
a: AM/PM | |
A: 0~86399999 (Millisecond of Day) | |
c/cc: 1~7 (Day of Week) | |
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat | |
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday | |
d: 1~31 (0 padded Day of Month) | |
D: 1~366 (0 padded Day of Year) | |
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
Credit and Usage: http://www.mobileread.com/forums/showthread.php?t=162972 |
OlderNewer