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
vmrun version 1.13.0 build-1331545 | |
Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS] | |
AUTHENTICATION-FLAGS | |
-------------------- | |
These must appear before the command and any command parameters. |
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
// Setup | |
_composition = [AVMutableComposition composition]; | |
_audioMixValues = [[NSMutableDictionary alloc] initWithCapacity:0]; | |
_audioMixTrackIDs = [[NSMutableDictionary alloc] initWithCapacity:0]; | |
// Insert the audio tracks into our composition | |
NSArray* tracks = [NSArray arrayWithObjects:@"track1", @"track2", @"track3", @"track4", nil]; | |
NSString* audioFileType = @"wav"; | |
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
{ | |
"data": { | |
"allAirports": [ | |
{ | |
"name": "Sealand Helipad", | |
"latitude": 51.894444, | |
"iataCode": "", | |
"identifier": "ZZ-0001", | |
"isoCountry": "GB", | |
"__typename": "Airport", |
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
{ | |
"query": "query AllAirports { allAirports { __typename airportId identifier airportType name elevation isoCountry isoRegion municipality gpsCode iataCode localCode homepageURL wikipediaURL scheduledService latitude longitude }}" | |
} |
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
query AllAirports { | |
allAirports { | |
airportId, | |
identifier, | |
airportType, | |
name, | |
elevation, | |
isoCountry, | |
isoRegion, | |
municipality, |
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
self.persistentContainer = [NSPersistentContainer persistentContainerWithName:@"Model"]; | |
[self.persistentContainer loadPersistentStoresWithCompletionHandler: | |
^(NSPersistentStoreDescription* description, NSError* error) { | |
NSLog(@"%@ %@", description, 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
- (void)searchFor:(NSString*)query | |
{ | |
// Cancel any existing search queries | |
if (self.searchQuery) | |
{ | |
[self.searchQuery cancel]; | |
self.searchQuery = nil; | |
[self.searchResults removeAllObjects]; | |
[self updateSearchResults]; | |
} |
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)indexAirportData | |
{ | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ | |
for (ALAirport* airport in self.airports) | |
{ | |
// Create the attribute set | |
CSSearchableItemAttributeSet* attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString*)kUTTypeItem]; | |
attributeSet.displayName = airport.airportName; | |
attributeSet.latitude = @(airport.coordinate.latitude); |
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)runWithURL:(NSURL*)serverRoot onPort:(NSUInteger)port | |
{ | |
_server = [BARServer serverWithPort:port]; | |
[_server addGlobalMiddleware:[MarkdownTemplateRenderer rendererWithViewsDirectoryURL:serverRoot]]; | |
BARRouter *router = [[BARRouter alloc] init]; | |
[_server addGlobalMiddleware:router]; | |
[router addRoute:@"/:view" forHTTPMethod:@"GET" handler:^BOOL(BARConnection *connection, BARRequest *request, NSDictionary *parameters) |
NewerOlder