Skip to content

Instantly share code, notes, and snippets.

@class NSManagedObjectContext;
@interface NSManagedObjectContext(SXConvenienceFetch)
- (NSArray *)fetchObjectsWithEntityName:(NSString *)entityName includingSubentities:(BOOL)flag sortKey:(NSString *)sortKey ascending:(BOOL)ascending error:(NSError **)error;
@end
@radeks
radeks / gist:1281162
Created October 12, 2011 12:56
fread
char *command1= "/usr/bin/dscl";
char *args1[] = {".","-read","/SharePoints/FolderName","directory_path",nil};
FILE *pipe = nil;
err = AuthorizationCreate(nil,
kAuthorizationEmptyEnvironment,
kAuthorizationFlagDefaults,
&authorizationRef);
/*
* To compile:
* $ clang iPod.c -o iPod
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void print_help(FILE *file) {
// -setServers:
dictionaryForDuplicateHostnameChecking = [[NSMutableDictionary dictionary] retain]; // release in -dealloc
for (RWServer *server in self.servers) {
if ([dictionaryForDuplicateHostnameChecking objectForKey:server.hostname]) {
NSMutableArray *array = [dictionaryForDuplicateHostnameChecking objectForKey:server.hostname];
[array addObject:server.hostname];
} else {
[dictionaryForDuplicateHostnameChecking setObject:[NSMutableArray arrayWithObject:server] forKey:server.hostname];
}
}
@radeks
radeks / test
Created November 27, 2010 17:17
lol
fu