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
// To compile and test this from the command line: | |
// | |
// $> clang FunctionPointerFromMethod.m -ObjC -framework Foundation -fobjc-arc | |
// $> ./a.out | |
#import <Foundation/Foundation.h> | |
@interface MyClass : NSObject | |
- (void)someMethodThatTakesOneStringArgument:(NSString *)string; | |
@end |
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
### | |
Author: Jason Giedymin <jasong _a_t_ apache -dot- org> | |
http://www.jasongiedymin.com | |
https://github.com/JasonGiedymin | |
Appearing in the Quake III Arena source code[1], this strange algorithm uses | |
integer operations along with a 'magic number' to calculate floating point | |
approximation values of inverse square roots[5]. |
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
// Target API: | |
// | |
// var s = require('net').createStream(25, 'smtp.example.com'); | |
// s.on('connect', function() { | |
// require('starttls')(s, options, function() { | |
// if (!s.authorized) { | |
// s.destroy(); | |
// return; | |
// } | |
// |
NewerOlder