- small amount of data, not predictable
- used when data is frequently inserted and deleted
- searching is slow
- the insertion order matters when searching
- searching and deletion are slow
{ | |
"People" : [ | |
"😀", | |
"😃", | |
"😄", | |
"😁", | |
"😆", | |
"😅", | |
"😂", | |
"🤣", |
static func CloudFlareResponseSerializer<T: Decodable where T == T.DecodedType>() -> GenericResponseSerializer<T> { | |
return GenericResponseSerializer { (request, response, data) -> Result<T> in | |
guard let validData = data else { | |
let failureReason = "Tried to decode response with nil data." | |
let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason) | |
return .Failure(data, CloudFlareError.SerializationError(error: error)) | |
} | |
let JSONSerializer = Request.JSONResponseSerializer(options: .AllowFragments) | |
let JSONResult = JSONSerializer.serializeResponse(request, response, validData) |
/*----------------------------------------------------*/ | |
#pragma mark - XCTAsserts | |
/*----------------------------------------------------*/ | |
XCTAssert(expression, format...); | |
XCTAssertTrue(expression, format...); | |
XCTAssertFalse(expression, format...); | |
XCTAssertEqual(expression1, expression2, format...); | |
XCTAssertNotEqual(expression1, expression2, format...); | |
XCTAssertNil(expression, format...); |
// | |
// JAZMusician.h | |
// JazzyApp | |
// | |
#import <Foundation/Foundation.h> | |
/** | |
JAZMusician models, you guessed it... Jazz Musicians! | |
From Ellington to Marsalis, this class has you covered. |
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
NSIndexPath *selectedRowIndexPath = [self.tableView indexPathForSelectedRow]; | |
if (selectedRowIndexPath) { | |
[self.tableView deselectRowAtIndexPath:selectedRowIndexPath animated:YES]; | |
[[self transitionCoordinator] notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
if ([context isCancelled]) { | |
[self.tableView selectRowAtIndexPath:selectedRowIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; |
#ifndef NS_DESIGNATED_INITIALIZER | |
#if __has_attribute(objc_designated_initializer) | |
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer)) | |
#else | |
#define NS_DESIGNATED_INITIALIZER | |
#endif | |
#endif |
#import <UIKit/UIKit.h> | |
@interface HighChartViewController : UIViewController | |
@property (weak, nonatomic) IBOutlet UIWebView *webView; | |
@property (strong, nonatomic) NSArray* seriesArray; | |
@property (copy, nonatomic) NSString* optionFileName; | |
@end |
/* | |
Distributed under The MIT License: | |
http://opensource.org/licenses/mit-license.php | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |