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
// | |
// AppDelegate.swift | |
// Keychain | |
// | |
// Created by Markos Charatzas on 07/09/2014. | |
// Copyright (c) 2014 qnoid.com. All rights reserved. | |
// | |
import Cocoa |
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 Cocoa | |
class Plane | |
{ | |
init() | |
{ | |
readyToTakeOff(); | |
} | |
func readyToTakeOff(){ |
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() | |
@property(nonatomic, strong) dispatch_group_t lock; | |
@end | |
@implementation Foo | |
-(id)init | |
{ | |
self = [super init]; | |
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> | |
int main(int argc, char *argv[]) | |
{ | |
NSArray *array = @[ @"a", @"b", @"c" ]; | |
for (NSUInteger i = 0; i < array.count; i++) | |
{ | |
NSLog(@"%@", array[i]); | |
} |
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 QNDUnit | |
- (id)initWithCalculator:(QNDCalculator*) calculator | |
{ | |
self = [super init]; | |
if (self) { | |
_calculator = calculator; | |
} | |
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
-(IBAction)tap:(id)sender | |
{ | |
UIBarButtonItem *refresh = self.navigationItem.rightBarButtonItem; | |
CALayer *layer = ((UIButton*)refresh.customView).imageView.layer; | |
CABasicAnimation *rotate = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; | |
rotate.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear]; | |
rotate.fromValue = @(0); | |
rotate.toValue = @(2 * M_PI); |
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
public class Main | |
{ | |
static class Number | |
{ | |
final int value; | |
public Number(int value) { | |
this.value = value; | |
} | |
} |
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 org.junit.Test; | |
import org.junit.Assert; | |
import java.util.function.Consumer; | |
public class ApplicationScopeTest | |
{ | |
@Test(expected=RuntimeException.class) | |
public void testApplicationScope() throws Exception | |
{ | |
ApplicationScope applicationScope = new ApplicationScope(); |
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 java.util.function.Consumer; | |
import java.util.function.Supplier; | |
public class ApplicationScope | |
{ | |
private volatile String value; | |
private final Supplier<String> supplier; |
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
#define DO_PRAGMA(x) _Pragma (#x) | |
#define MESSAGE(x) DO_PRAGMA(message (x)) | |
@interface TBFoo : NSObject | |
@end | |
@implementation TBFoo | |
-(void)bar MESSAGE("Hello World!"){} |