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
// | |
// ArrayDiff.swift | |
// | |
// Created by Frank A. Krueger on 6/30/15. | |
// Copyright © 2015 Krueger Systems, Inc. All rights reserved. | |
// License: MIT http://opensource.org/licenses/MIT | |
// | |
import Foundation |
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
// | |
// CollectionViewDataSource.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 10/14/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit |
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
// | |
// DateAdditions.swift | |
// OMGSWIFT | |
// | |
// Created by Robin Goos on 03/06/14. | |
// Copyright (c) 2014 OMG. All rights reserved. | |
// | |
import Foundation |
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
/** | |
Provides the ability to verify key paths at compile time. | |
If "keyPath" does not exist, a compile-time error will be generated. | |
Example: | |
// Verifies "isFinished" exists on "operation". | |
NSString *key = SQKeyPath(operation, isFinished); | |
// Verifies "isFinished" exists on self. |
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
@interface DDDelegateProxy : NSProxy | |
+ (id)proxyForDelegate:(id)delegate conformingToProtocol:(Protocol *)protocol; | |
@property (weak, readonly) id delegate; | |
@property (strong, readonly) Protocol *protocol; | |
/*! | |
* Set a default return value for a method on the delegate's protocol. | |
* \param value This must be a block that returns the default value. Bad Things will happen if it's not. |
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
+ (NSDate *)dateFromISO8601String:(NSString *)iso8601 { | |
if (!iso8601) { | |
return nil; | |
} | |
const char *str = [iso8601 cStringUsingEncoding:NSUTF8StringEncoding]; | |
char newStr[24]; | |
struct tm tm; | |
size_t len = strlen(str); |