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
int りんご = 5; | |
int ばなな = 3; | |
int 合計 = りんご + ばなな; | |
NSLog(@"合計は%d",合計); |
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/swift | |
import Foundation | |
let env = ProcessInfo.processInfo.environment | |
let manager = FileManager.default | |
let fileNakami = """ | |
<?xml version="1.0" encoding=\"UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
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 Person{ | |
var name: String | |
init(name: String) { | |
print("--- init \(name) ---") | |
self.name = name | |
} | |
deinit { |
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
let person1 = Person(name: "🐱") | |
let person2 = Person(name: "🦁") | |
let person3 = Person(name: "🐷") | |
person1.normalHello() | |
person2.strongHello() | |
person3.weakHello() | |
//結果 |
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 Person{ | |
var name: String | |
init(name: String) { | |
print("--- init \(name) ---") | |
self.name = name | |
} | |
deinit { |
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
let person1 = Person(name: "🐱") | |
let person2 = Person(name: "🦁") | |
let person3 = Person(name: "🐷") | |
let person4 = Person(name: "🐼") | |
person1.normalHello() | |
person2.strongHello() | |
person3.weakHello() | |
person4.noescapeHello() |
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 Person{ | |
var name: String | |
init(name: String) { | |
print("--- init \(name) ---") | |
self.name = name | |
} | |
deinit { |
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
let person1 = Person(name: "🐱") | |
let person2 = Person(name: "🦁") | |
let person3 = Person(name: "🐷") | |
let person4 = Person(name: "🐼") | |
let person5 = Person(name: "🐻") | |
person1.normalHello() | |
person2.strongHello() | |
person3.weakHello() | |
person4.noescapeHello() |
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 SceneKit | |
import PlaygroundSupport | |
// 表示用のSCNViewを作る。 | |
var sceneView = SCNView(frame: CGRect(x: 0, y: 0, width: 300, height: 300)) | |
var scene = SCNScene() | |
sceneView.scene = scene | |
sceneView.autoenablesDefaultLighting = true | |
// PlaygroundPageに作ったSCNViewを設定。 |
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 ARKit | |
import PlaygroundSupport | |
var arView = ARSCNView(frame: CGRect(x: 0, y: 0, width: 300, height: 300)) | |
arView.autoenablesDefaultLighting = true | |
let scene = SCNScene() | |
arView.scene = scene | |
let configuration = ARWorldTrackingConfiguration() |