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
__unsafe_unretained __block void (__weak ^recursiveBlock)(int, int) = ^ void (int a, int b) { | |
NSLog(@"%d", a); | |
int n = a + b; | |
recursiveBlock(b, n); | |
}; | |
recursiveBlock(0, 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
#import <Foundation/Foundation.h> | |
/** ClassGetSubclasses | |
Returns all subclasses for a given class by interrogating every class in the | |
runtime. Results are cached to save time on repeat calls for the same class. | |
*/ | |
extern NSArray *ClassGetSubclasses(Class parentClass); |
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 argparse | |
parser = argparse.ArgumentParser(description='Python script for rendering ASCII Grid format terrain data to a height map.') | |
parser.add_argument('path-to-ascii-file', metavar='<path-to-ascii-file>', type=str, | |
help='path to the ASCII Grid format file') | |
parser.add_argument('output-path', metavar='<output-path>', type=str, | |
help='file path to write the output PNG to') | |
args = vars(parser.parse_args()) |