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)takeControlOfTheCookies | |
{ | |
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[self takeControlOfTheCookies]; |
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
tell application "Messages" | |
set allTheBens to every buddy whose id contains "[email protected]" | |
set ben to item 1 of allTheBens | |
send "hey" to ben | |
end tell |
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
- (BOOL)cmpObjAddr:(id)objAddr otherObj:(id)objOtherAddr | |
{ | |
int cVar = (int)objAddr; | |
int dVar = (int)objOtherAddr; | |
if (cVar != dVar) { | |
char c = *(char *)(cVar); | |
cVarModifier(c); | |
} |
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
+ ($class$ *)sharedInstance { | |
static dispatch_once_t onceQueue; | |
static $class$ *$var$ = nil; | |
dispatch_once(&onceQueue, ^{ | |
$var$ = [[self alloc] init]; | |
}); | |
return $var$; | |
} |
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
SEL methodSel = NSSelectorFromString(methodStr); | |
if ([self respondsToSelector:methodSel]) | |
{ | |
#pragma clang diagnostic warning push | |
#pragma clang diagnostic ignored "-Warc-performSelector-leaks" | |
[self performSelector:methodSel]; | |
#pragma clang diagnostic warning pop | |
} |
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
NSString *foo = | |
//123456789012345678901234567890 | |
@"##############################"; |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
// Override point for customization after application launch. | |
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; | |
self.window.rootViewController = self.viewController; | |
[self.window makeKeyAndVisible]; | |
return YES; | |
} |
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
// Given a set of NSManagedObjects, return those objects in this managed object context | |
-(NSMutableSet*)objectsInSet:(NSSet*)objects { | |
NSMutableSet *newSet = [NSMutableSet set]; | |
for (NSManagedObject* object in objects) { | |
[newSet addObject:[self objectWithID:object.objectID]]; | |
} | |
return newSet; | |
} |
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
<table width="100%" border="1" cellpadding="60"> | |
<tr> | |
<td>One</td> | |
<td>Two</td> | |
<td>Three Three Three Three Three Three Three Three Three Three Three Three Three Three Three Three Three Three</td> | |
</tr> | |
</table> |
NewerOlder