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
# Manual hunk edit mode -- see bottom for a quick guide | |
@@ -184,5 +184,10 @@ | |
return cls.build_game_base_url(gid) + 'plays.xml' | |
@classmethod | |
- def build_inning_x_url(cls, gid, inning_number): | |
+ def build_inning_url(cls, gid): | |
+ """Returns URL for inning directory""" | |
+ return cls.build_game_base_url(gid) + 'inning/' | |
+ |
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
# NSKeyValueCoding | |
An informal protocol on NSObject. It provides an indirect way of setting values by key (property / iVar name) without using accessors or iVar access. | |
## Getting Values | |
``` | |
- valueForKey: | |
- valueForKeyPath: | |
- dictionaryWithValuesForKeys: |
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
// no new initializers defined in the .h | |
- (instancetype)init | |
{ | |
self = [super initWithNibName:nil bundle:nil]; | |
if (self) { | |
// do stuff | |
} | |
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 UIKit | |
protocol Borderable { | |
var cornerRadius: CGFloat { get set } | |
var borderWidth: CGFloat { get set } | |
var borderColor: UIColor? { get set } | |
} | |
@IBDesignable | |
extension UIView: Borderable { |
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
extension Bool { | |
mutating func toggle() { | |
self = !self | |
} | |
} | |
var isExpanded: Bool = false | |
isExpanded.toggle() |
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 <Quartz/Quartz.h> | |
@interface BMPAudioFilePlayerPlugIn : QCPlugIn | |
@property (nonatomic, copy) NSString *inputFilePath; | |
@end | |
#import "BMPAudioFilePlayerPlugIn.h" | |
#import <AVFoundation/AVFoundation.h> |
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
- (void)loadWindow | |
{ | |
var success = [CPBundle loadCibNamed:@"AddPlayer" owner:self]; | |
_window = [[CPWindow alloc] initWithContentRect:[_addPlayerContentView bounds] | |
styleMask:CPDocModalWindowMask]; | |
[_window setContentView:_addPlayerContentView]; | |
} |