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
> [email protected] install /usr/local/lib/node_modules/levelmeup/node_modules/level/node_modules/leveldown | |
> node-gyp rebuild | |
/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: line 2: node: command not found | |
npm ERR! [email protected] install: `node-gyp rebuild` | |
npm ERR! Exit status 127 | |
npm ERR! | |
npm ERR! Failed at the [email protected] install script. | |
npm ERR! This is most likely a problem with the leveldown package, | |
npm ERR! not with npm itself. |
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
- (NSArray *)dataSource | |
{ | |
return [[[self fetchedResultsController] fetchedObjects] copy]; | |
} |
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
@implementation RWSViewController | |
- (id)initWithStyle:(UITableViewStyle)style | |
{ | |
self = [super initWithStyle:style]; | |
if (self) { | |
RWSStaticSection *section1 = [[RWSStaticSection alloc] init]; | |
RWSStaticSection *section2 = [[RWSStaticSection alloc] init]; | |
_sections = @[section1, section2]; | |
} |
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
@protocol RWSSection | |
- (NSUInteger)numberOfObjects; | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRow:(NSInteger)row; | |
@end | |
@interface RWSStaticSection : NSObject<RWSSection> | |
@property(nonatomic, readonly) NSArray *items; | |
@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
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
if<NSFetchedResultsSectionInfo> section = [self.resultsController sections][indexPath.section]; | |
return [section numberOfObjects]; | |
} |
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
typedef enum { | |
RWSSectionInfo, | |
RWSSectionDynamic, | |
RWSSectionCount | |
}RWSSection; | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
RWSSection section = indexPath.section; | |
switch(section){ |
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
typedef enum { | |
RWSSectionInfo, | |
RWSSectionDynamic, | |
RWSSectionCount | |
}RWSSection; | |
const NSInteger kNumberOfInfoRows = 2; | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ |
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
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
switch(section){ | |
case 0: | |
return 2; | |
break; | |
case 1: | |
return [self.items count]; | |
break; | |
} |
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
var target = UIATarget.localTarget(); | |
var app = target.frontMostApp(); | |
var window = app.mainWindow(); | |
var testName = "Dummy Test"; | |
function dummyTest(){ | |
UIALogger.logStart(testName); | |
var button = window.buttons()["Go"]; |
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 *dataPath = [weakOperation tmpFilePath]; | |
NSManagedObjectContext *context = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; | |
[context setParentContext:mainContext]; | |
[context performBlock:^{ | |
NSError *findingError = nil; | |
GOFeedItem *thisItem = (GOFeedItem *)[context existingObjectWithID:objectID error:&findingError]; | |
if(!thisItem){ | |
NSLog(@"Error finding item %@: %@", [feedItem title], [findingError userInfo]); | |
} |