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 Cocoa | |
import MASShortcut | |
func pow() { | |
let rect = NSScreen.mainScreen()?.frame | |
let window = NSWindow(contentRect: rect!, styleMask: NSBorderlessWindowMask, backing: .Buffered, `defer`: false) | |
window.backgroundColor = NSColor.clearColor() | |
window.opaque = false | |
window.alphaValue = 1 | |
window.makeKeyAndOrderFront(NSApplication.sharedApplication()) |
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 Thunder { } | |
class Fire { } | |
protocol Pokemon { | |
typealias PokemonType | |
func attack(move:PokemonType) | |
} | |
struct Pikachu: Pokemon { | |
typealias PokemonType = Thunder |
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
enum ClientType { | |
case Main | |
case Sub | |
} | |
struct MyStruct { | |
var type:ClientType! | |
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 math._ | |
1L // Long型の 1 | |
1:Long // Long型の 1 | |
127:Byte // Byte型の 127 | |
32767:Short // Short型の 32767 | |
(1+2).toLong // Long型への変換 | |
(2+3) toLong // Long型への変換 |