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
# Description: | |
# Shows how many velos are free on "nearby" Velo stations. | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
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
- (UIInterfaceOrientation)orientationByTransforming:(CGAffineTransform)transform fromOrientation:(UIInterfaceOrientation)c | |
{ | |
CGFloat angle = atan2f(transform.b, transform.a); | |
NSInteger multiplier = (NSInteger)roundf(angle / M_PI_2); | |
UIInterfaceOrientation orientation = self.interfaceOrientation; | |
if (multiplier < 0) { | |
// clockwise rotation | |
while (multiplier++ < 0) { | |
switch (orientation) { |
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
TestModel *model = [TestModel new]; | |
model.aString = @"abc"; | |
model.aDate = [NSDate new]; | |
model.anURL = [NSURL URLWithString:@"http://inferis.org"]; | |
model.subModel = [SubModel new]; | |
model.subModel.aNumber = @123; | |
model.subModel.aValue = [NSValue valueWithCGAffineTransform:CGAffineTransformIdentity]; | |
model.things = @[[SubModel new], [TestModel new]]; | |
model.reference = @{ @"sm": [SubModel new] }; | |
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
//: Playground - noun: a place where people can play | |
protocol HeterogenousEquatable | |
{ | |
func isEqual(other: HeterogenousEquatable) -> Bool | |
} | |
protocol Value: HeterogenousEquatable | |
{ | |
OlderNewer