iPhone
Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en-gb)
AppleWebKit/534.46.0 (KHTML, like Gecko)
CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3
#import <AppKit/AppKit.h> | |
#import <objc/runtime.h> | |
#import <objc/message.h> | |
@interface NSBitmapImageRep (Mapping) | |
- (void)map:(void (^)(NSUInteger[4]))aBlk; | |
@end | |
@implementation NSBitmapImageRep (Mapping) | |
- (void)map:(void (^)(NSUInteger[4]))aBlk | |
{ |
// | |
// NSObject+setValuesForKeysWithJSONDictionary.h | |
// SafeSetDemo | |
// | |
// Created by Tom Harrington on 12/29/11. | |
// Copyright (c) 2011 Atomic Bird, LLC. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
#!/bin/bash | |
#Usage: ./defconvid-downloader.sh $id | |
#Where $id is the conference number | |
wget -c -nc -e robots=off --wait 5 -i -- `curl "http://defcon.org/html/links/dc-archives/dc-$1-archive.html" | grep -o "https.*\.m4v" | sed 's/ \+/%20/g'` |
Memoization is fundamentally a top-down computation and dynamic | |
programming is fundamentally bottom-up. In memoization, we observe | |
that a computational *tree* can actually be represented as a | |
computational *DAG* (the single most underrated data structure in | |
computer science); we then use a black-box to turn the tree into a | |
DAG. But it allows the top-down description of the problem to remain | |
unchanged. | |
In dynamic programming, we make the same observation, but construct | |
the DAG from the bottom-up. That means we have to rewrite the |
- (void)fizzBuzzObjectiveC | |
{ | |
for(int i = 1; i <= 100; i++) { | |
NSString *output = @""; | |
if(i % 3 == 0) | |
output = [output stringByAppendingString:@"Fizz"]; | |
if(i % 5 == 0) | |
output = [output stringByAppendingString:@"Buzz"]; |
r""" | |
gotham | |
~~~~~~ | |
Gothic Poetry Generator | |
""" | |
import marshal |
// | |
// iTahDoodleAppDelegate.m | |
// iTahDoodle | |
// | |
// Created by Henry Brock on 8/25/12. | |
// Copyright (c) 2012 brockbackups. All rights reserved. | |
// | |
#import "iTahDoodleAppDelegate.h" | |
NSString *docPath() |
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@end |