This file contains hidden or 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 Foundation | |
struct StringCodingKey: CodingKey { | |
var stringValue: String | |
init(stringValue: String) { | |
self.stringValue = stringValue | |
} | |
var intValue: Int? { return nil } | |
init?(intValue: Int) { fatalError() } | |
} |
This file contains hidden or 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
Enter Mac mode: | |
Hold =, press m. | |
The top four thumb keys while in Mac mode, from left to right are: Command | Option | Ctrl | Command | |
Enable Media keys: | |
Hold =, press n. If you have applied the remappings below, note that it is the *remapped* = (i.e. tab). | |
Disable key clicks: | |
Hold Progrm, press -/_ (disable beeps). | |
Hold Progrm, press |/\ (disable clicks). |
This file contains hidden or 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
internal extension CollectionType where Index: BidirectionalIndexType { | |
internal func _lastIndexOf(@noescape isElement: Generator.Element -> Bool) -> Index? { | |
for i in indices.reverse() | |
where isElement(self[i]) { | |
return i | |
} | |
return nil | |
} | |
} |