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
# param 1 is path to root of repository to clone | |
# param 2 is folder to clone to. The folder's name must be the | |
# same as the folder to be extracted from the repository at param 1. | |
GIT='/Applications/Xcode.app/Contents/Developer/usr/bin/git' | |
$GIT clone --no-hardlinks "$1" "$2" | |
cd "$2" | |
$GIT filter-branch --subdirectory-filter "`basename $2`" HEAD #-- --all |
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
@interface NSIndexSet (ULIIndexSetCreation) | |
+(NSIndexSet*) indexSetWithIndexes: (const NSInteger [])indexes count: (NSUInteger)count; | |
@end | |
@implementation NSIndexSet (ULIIndexSetCreation) | |
+(NSIndexSet*) indexSetWithIndexes: (const NSInteger [])indexes count: (NSUInteger)count |
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> | |
@interface MyClass : NSObject | |
@end | |
@implementation MyClass | |
@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
#import <Foundation/Foundation.h> | |
#define PASTE(a,b) a ## b | |
#define OCONSTANT(a) @class a; extern a* PASTE(k,a); @interface a : NSObject @end | |
#define OCONSTANTI(a) @class a; a* PASTE(k,a) = nil; @implementation a +(void) load { PASTE(k,a) = [[a alloc] init]; } @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
namespace Carlson | |
{ | |
class CToken | |
{ | |
public: | |
static void GoNextToken( const char* fname, std::deque<CToken>::iterator& tokenItty, std::deque<CToken>& tokens ); | |
}; | |
} |
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
@protocol TellARCAboutVoidReturn | |
-(void) performSelector: (SEL)inAction withObject: (id)inSender; | |
@end | |
... | |
[(id<TellARCAboutVoidReturn>)receiver performSelector: @selector(someVoidAction:) withObject: theSender]; |
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
// | |
// ViewController.swift | |
// SwiftTableTestIOS | |
// | |
import UIKit | |
class ViewController: UITableViewController { | |
// These enum cases should be in the order the user should see the items in: |
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> | |
#include <iostream> | |
@interface ULIFoo : NSObject | |
@end | |
@implementation ULIFoo | |
-(id) init |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
vector<string> components_separated_by_string( const string& s, const string& delimiter ) | |
{ | |
if( s.size() == 0 ) | |
return vector<string>(); |
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
#include <stdio.h> | |
void (^blockreturner(void))( int a, int b ) | |
{ | |
return ^(int a, int b){ printf("%d %d\n",a,b); }; | |
} | |
int main(int argc, char *argv[]) { | |
blockreturner()( 1, 2 ); |
OlderNewer