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
Вы ранее привлекались за хранение данных в глобальных переменных? | |
Вы когда-нибудь делали .Net за деньги? | |
Сформулируйте зависимость времени исправления критического бага от seniority присутствующего менеджера | |
В своём резюме вы указали знание php. вам не стыдно? | |
Перед вами кисть, холст и мольберт. напишите компилятор |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <CoreData/CoreData.h> | |
@interface NSManagedObject (ADVCopying) | |
- (instancetype) adv_copyInContext:(NSManagedObjectContext *)context; |
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
#!/usr/bin/python | |
import lldb | |
import shlex | |
def mem_location(arch, index): | |
index = int(index) | |
return { | |
'arm' : ("$r%d" % (index)) if (index < 4) else ("$sp+%d" % (index - 4)), | |
'armv7' : ("$r%d" % (index)) if (index < 4) else ("$sp+%d" % (index - 4)), |
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
typealias EventHandler = (AnyObject) -> Void | |
class Event { | |
var handlers: [EventHandler] = [] | |
func subscribe(handler: EventHandler) { | |
handlers.append(handler) | |
} | |
dynamic func invoke(sender: AnyObject) { |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <Foundation/Foundation.h> | |
typedef void(^ADVCellConfigurationBlock)(id cell, id object); | |
@interface ADVDataSource : NSObject <UITableViewDataSource, UICollectionViewDataSource> |
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
import XCTest | |
/// An expectation that is fulfilled when a Key Value Observing (KVO) condition | |
/// is met. It's variant of `XCTKVOExpectation` with support for native Swift | |
/// key paths. | |
final class KVOExpectation: XCTestExpectation { | |
private var kvoToken: NSKeyValueObservation? | |
/// Creates an expectation that is fulfilled when a KVO change causes the | |
/// specified key path of the observed object to have an expected value. |
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
import Foundation | |
func sha1(data: NSData) -> String { | |
let length = Int(CC_SHA1_DIGEST_LENGTH) | |
var digest = [UInt8](count: length, repeatedValue: 0) | |
CC_SHA1(data.bytes, CC_LONG(data.length), &digest) | |
return digest.map { String(format: "%02x", $0) }.reduce("", +) | |
} | |
func sha1(string: String) -> String? { |
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
// | |
// Copyright © 2012 Yuri Kotov | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSData (ADVHexadecimalRepresentation) | |
- (NSString *) hexadecimalRepresentation; |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <CoreLocation/CoreLocation.h> | |
typedef void(^ADVLocationHandler)(CLLocation *location, NSError *error); | |
@interface ADVLocationDetector : NSObject |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <UIKit/UIKit.h> | |
__attribute__((always_inline)) | |
extern inline UIColor * RGB(int color); |
NewerOlder