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
| #pragma mark - Table view data source | |
| - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ | |
| // Return the number of sections. | |
| return 1; | |
| } | |
| - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ | |
| return objectArray.count; | |
| } |
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
| ///// | |
| # MyMuch.h | |
| @protocol MyMuchDelegate; | |
| @interface MyMuch : MyMuchViewController | |
| { | |
| //id<MyMuchDelegate> _delegate; //new style not needed | |
| } |
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
| <?php | |
| // Provide the Host Information. | |
| $tHost = 'gateway.sandbox.push.apple.com'; | |
| $tPort = 2195; | |
| // Provide the Certificate and Key Data. | |
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
| // since iOS 4, extension C lang | |
| //AKA, lambdas, anonimous functions, clousures | |
| //function that can be stored as a variable (referred to as a "first-class function") | |
| //clousure scope incorporates parent scope "close" | |
| //encapsulate chunks of code and pass them around like any other object | |
| //As well as containing executable code, a block also has the ability to capture state from its enclosing scope. |
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
| //http://everybody.is-a-cyb.org/project/21 | |
| //PROCESSING WRITES TO ARDUINO | |
| import processing.serial.*; | |
| // The serial port: | |
| Serial myPort; | |
| int value = 0; |
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
| //http://everybody.is-a-cyb.org/project/21 | |
| //PROCESSING WRITES TO ARDUINO | |
| import processing.serial.*; | |
| // The serial port: | |
| Serial myPort; | |
| int value = 0; |
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
| //MyCell.h | |
| @protocol MyCellDelegate <NSObject> | |
| -(void)cellCheckBoxWasChanged:(MyCell *)cell; | |
| @end | |
| @interface MyCell : NSObject |
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
| //define before implementation | |
| typedef void(^myCompletion)(BOOL); | |
| //method todo after implementation | |
| -(void) myMethod:(myCompletion) compblock{ | |
| //do stuff | |
| for (int i = 0; i < 100; i++) { | |
| NSLog(@"i :: %d", i); | |
| } | |
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
| #ifdef DEBUG | |
| # define DLog(fmt, ...) NSLog((@"\n%s [Line %d] \n" fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
| #else | |
| # define DLog(...) /* */ | |
| #endif |
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
| void uncaughtExceptionHandler(NSException*); | |
| @implementation AppDelegate | |
| void uncaughtExceptionHandler(NSException *exception) | |
| { | |
| NSLog(@"CRASH: %@", exception); | |
| NSLog(@"Stack Trace: %@", [exception callStackSymbols]); |