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
| /* | |
| * SenTestingKit does not wait for blocks to finish by default so your test would simply complete | |
| * as successful. You need to use a semaphore and keep the run loop going in order for the test | |
| * to properly run. | |
| */ | |
| - (void)testGetSpots { | |
| dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
| CLLocation location = [[CLLocation alloc] initWithLatitude:70.0 longitude:50.0]; | |
| [Spot spotsWithURLString:@"/spots" near:location parameters:[NSDictionary dictionaryWithObject:@"128" forKey:@"per_page"] block:^(NSArray *records) { | |
| //sample assert |
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
| static inline BOOL CBIsEmpty(id obj) { | |
| return obj == nil | |
| || (NSNull *)obj == [NSNull null] | |
| || ([obj respondsToSelector:@selector(length)] && [obj length] == 0) | |
| || ([obj respondsToSelector:@selector(count)] && [obj count] == 0); | |
| } |
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
| // | |
| // Created by Cédric Luthi on 2012-02-24. | |
| // Copyright (c) 2012 Cédric Luthi. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface NSData (Base64) | |
| + (id) dataWithBase64Encoding_xcd:(NSString *)base64String; |
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
| // | |
| // MNDocumentConflictResolutionViewController.h | |
| // MindNodeTouch | |
| // | |
| // Created by Markus Müller on 15.12.11. | |
| // Copyright (c) 2011 __MyCompanyName__. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> | |
| @class MNDocumentReference; |
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
| require 'rmagick' | |
| include Magick | |
| shredded = ImageList.new "TokyoPanoramaShredded.png" # the original source | |
| ROWS = shredded.rows # number of lines of pixes | |
| working = [] # a working array of images | |
| def strip_width | |
| 32 | |
| end |
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
| #import <Foundation/Foundation.h> | |
| @interface NSURL (Pieces) | |
| -(NSDictionary *)piecesDictionary; | |
| @end |
NewerOlder