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
| const NSUInteger testCount = 1000000; | |
| { | |
| CFAbsoluteTime t = CFAbsoluteTimeGetCurrent(); | |
| GLKMatrixStackRef stack = GLKMatrixStackCreate(NULL); | |
| GLKMatrixStackLoadMatrix4(stack, GLKMatrix4Identity); | |
| for (NSUInteger i = 0; i < testCount; i++) { | |
| GLKMatrixStackPush(stack); | |
| GLKMatrixStackMultiplyMatrix4(stack, GLKMatrix4Identity); | |
| GLKMatrixStackPop(stack); | |
| } |
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
| Какое значение вернёт вызов функции на языке Java count(32767)? | |
| private BigInteger g(BigInteger n, BigInteger g) | |
| { | |
| if (g.compareTo(BigInteger.ONE) <= 0 || g.compareTo(n.subtract(BigInteger.ONE)) >= 0){ | |
| return BigInteger.ONE; | |
| } | |
| BigInteger result = BigInteger.ONE; | |
| BigInteger c = BigInteger.valueOf(2); | |
| while (c.compareTo(g) <= 0){ |
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
| @interface Foo : NSObject | |
| { | |
| NSData* _data; | |
| } | |
| @end | |
| @implementation Foo | |
| - (void) download | |
| { |
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
| struct Stack<T> : Sequence { | |
| struct StackNode | |
| { | |
| var value: T | |
| var next: Any? = nil | |
| } | |
| struct StackGenerator : Generator { | |
| var top : StackNode? = nil |
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 Array { | |
| func each(closure: ((item: T, idx: Int) -> Void)) { | |
| var idx : Int = 0 | |
| for item in self { | |
| closure(item: item, idx: idx) | |
| idx += 1 | |
| } | |
| } | |
| } |
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
| #ifdef DEBUG | |
| /// Tests if .xctest bundle is loaded, so returns YES if the app is running with XCTest framework. | |
| inline BOOL IsUnitTesting() __attribute__((const)); | |
| inline BOOL IsUnitTesting() | |
| { | |
| NSDictionary *environment = [NSProcessInfo processInfo].environment; | |
| NSString *injectBundlePath = environment[@"XCInjectBundle"]; | |
| return [injectBundlePath.pathExtension isEqualToString:@"xctest"]; | |
| } | |
| #endif |
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
| curl --max-time 1800 http://testflightapp.com/api/builds.json -F file=PATH_TO_IPA -F dsym=PATH_TO_DSYM -F api_token="API_TOKEN" -F team_token="TEAM_TOKEN" -F notes=$filename -F replace=True -F notify=True |
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
| @implementation Foo | |
| { | |
| __weak id lastRequest_; | |
| } | |
| -(id) buildRequest | |
| { | |
| lastRequest_ = [PARequestLobbyTournamentsPlayers requestWithFilter:self.filter from:self.offset amount:self.amount]; | |
| return lastRequest_; | |
| } |
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
| objc[6539]: Class Foo is implemented in both /private/var/mobile/Containers/Bundle/Application/FBDC29F1-5447-47B0-B898-02E6714F319E/App.app/App and /private/var/mobile/Containers/Bundle/Application/FBDC29F1-5447-47B0-B898-02E6714F319E/App.app/App. One of the two will be used. Which one is undefined. |
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/Foundation.h> | |
| #import <libkern/OSAtomic.h> | |
| typedef struct { | |
| BOOL scheduled; | |
| OSSpinLock lock; | |
| } PAScheduleOnceToken; | |
| static char PAScheduleOnceTokenKey; |
OlderNewer