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
*.pbxproj -crlf -diff -merge |
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
void RMPrintError(NSError* error){ | |
NSArray* errors = [[error userInfo] valueForKey:@"NSDetailedErrors"]; | |
if(errors != nil){ | |
for(NSError* nestedError in errors){ | |
NSLog(@"%@", [nestedError userInfo]); | |
} | |
} | |
else{ | |
NSLog(@"%@", error); | |
} |
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
NSDocumentController* documentContr = [NSDocumentController sharedDocumentController]; | |
NSWindowController* windowContr = [[[documentContr documents] objectAtIndex:0] browserWindowController]; | |
NSWindow* window = [windowContr window]; | |
NSToolbar* toolbar = [window toolbar]; | |
[toolbar insertItemWithItemIdentifier:[[SWMPluginController sharedInstance] toolbarButtonIdentifier] | |
atIndex:[[SWMPluginController sharedInstance] toolbarButtonIndex]]; |
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
2010-04-20 20:43:16.517 redmineManager[70691:4a1b] PUT -> http://yohannshouse.ath.cx/issues.xml | |
2010-04-20 20:43:16.518 redmineManager[70691:4a1b] <issue><project_id>1</project_id><subject>Test Namerr</subject><description>Test yyfff</description></issue> | |
2010-04-20 20:43:19.422 redmineManager[70691:4a1b] <= <html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Action Controller: Exception caught</title> | |
<style> | |
body { background-color: #fff; color: #333; } | |
body, p, ol, ul, td { | |
font-family: verdana, arial, helvetica, sans-serif; |
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
#define R 15 // исходные элементы - 15битные | |
#define E 4 // 4 бита под экспоненты, так как 23 <= R < 24 | |
// S[i] - беззнаковые числа | |
for (i=0; i<N; i++) { // С каждым элементом исходного блока | |
j=0; | |
while (S[i] >= 1<<j) j++; // Найдем такое j, что S[i] < (1 << j) | |
E[i]=j; // запишем j, т.е. порядок числа S[i] в массив E | |
if (j>1) |
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
/* | |
Error-free way to work with NSFetchedResultsController | |
*/ | |
/** | |
Delegate methods of NSFetchedResultsController to respond to additions, removals and so on. | |
*/ | |
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller { | |
// The fetch controller is about to start sending change notifications, so prepare the table view for updates. |
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
if ([self class] == [FBPermissionDialog class]) { | |
NSData *body = [request HTTPBody]; | |
if (body != nil) { | |
NSString *httpBody = [NSString stringWithUTF8String:[[request HTTPBody] bytes]]; | |
NSRange range = [httpBody rangeOfString:@"Don%27t+Allow"]; | |
if (range.location != NSNotFound) { // User clicks on "don't allow" | |
[self dismissWithSuccess:NO animated:YES]; | |
} | |
} | |
} |
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
{ | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
/* | |
... | |
*/ | |
//use a custom runloop | |
static NSString *runLoopMode = @"com.me.myloop"; | |
[connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:runLoopMode]; | |
[connection start]; | |
while (![connectionDelegate isDone] && ![self isCancelled]) { |
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 "MABaseFuture.h" | |
#import <libkern/OSAtomic.h> | |
@implementation MABaseFuture | |
@dynamic futureValue; | |
@synthesize futureHasResolved = _resolved; | |
- (id)futureValue | |
{ |
OlderNewer