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
public enum Suit { | |
Spades, Hearts, Diamonds, Clubs; | |
} | |
for (Suit suit : Suit.values()) { | |
System.out.println(suit.toString()); | |
} |
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
class NonObjCShark { | |
var name:NSString! | |
var howSwim:NSString! | |
init(name:NSString!, howSwim:NSString?) { | |
self.name = name | |
self.howSwim = howSwim; | |
} | |
func swim() -> 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
import Foundation | |
class GrayShark { | |
var name:String | |
var howSwim:String | |
init(name:String, howSwim:String) { | |
self.name = name | |
self.howSwim = howSwim; | |
} |
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
class ExampleShark { | |
var name:NSString! | |
var howSwim:NSString! | |
init(name:NSString!, howSwim:NSString!) { | |
self.name = name | |
self.howSwim = howSwim; | |
} | |
func swim() -> 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
import Foundation | |
enum PromiseState:Int { | |
case Incomplete = 0 | |
case Rejected = 1 | |
case Resolved = 2 | |
} | |
class Promise : Hashable { | |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Create a pasteboard, and pass some data to it | |
// the created pasteboard can be specified as persistent as well | |
UIPasteboard *pasteboard = [UIPasteboard pasteboardWithName:@"Widget" create:YES]; | |
pasteboard.persistent = YES; | |
pasteboard.string = @"やっほー!"; | |
return YES; | |
} |
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
* *************************************************************** | |
* プログラムID SSCD01 | |
* 機能名 S社詳細帳票出力01 | |
* 開発担当者 株式会社akisute | |
* あきすてさま | |
* 初版 2004/06/28 | |
* | |
* 変更履歴 | |
* 2004/06/28 変更者 あきすてさま | |
* 初版作成。 |
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 | |
import CoreLocation | |
class LocationManager : NSObject, CLLocationManagerDelegate { | |
class var sharedInstance : LocationManager { | |
get { | |
struct Static { | |
static let instance : LocationManager = LocationManager() |
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
id target = [self.navigationController valueForKey:@"_cachedInteractionController"]; | |
UIGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc] initWithTarget:target action:@selector(handleNavigationTransition:)]; | |
[self.view addGestureRecognizer:recognizer]; | |
// Add a dependency between your recognizer and the interactivePopGestureRecognizer | |
// to prevent multiple recognition, if needed. |
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
{"aps" : {"content-available" : 1}} |