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
| //## 文字列 ##### | |
| //## 長さ | |
| "abcde".characters.count //5 | |
| "アイウエオ".characters.count //5 |
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
| [ | |
| { | |
| "fPath": "/_contents/video/Music/jazz/artist1-title1.mp4", | |
| "group": "artist1", | |
| "title": "title1", | |
| "fType": "video", | |
| "cType": "Music", | |
| "zWhen": "", | |
| "zWhere": "", | |
| "tags": [ "jazz", |
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 UIKit | |
| //## 予約文字 | |
| // [] () \ * + ? {} ^ $ . | / | |
| //# 予約文字そのものを探すにはエスケープする | |
| // \\[ \\] \\( \\) \\* \\+ \\? \\{ \\} \\^ \\$ \\. \\| \\/ | |
| let l検査文字列 = "[] () * + ? {} ^ $ . | /" | |
| let lRgxArry = [ | |
| "\\[", "\\]", "\\(", "\\)", "\\*", "\\+", "\\?", |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| class ViewController: NSViewController { | |
| // MARK:プロパティ | |
| @IBOutlet weak var vテキスト: NSTextField! | |
| @IBOutlet weak var vラベル: NSTextField! | |
| @IBOutlet weak var vボタン: NSButton! | |
| ... | |
| } | |
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 UIKit | |
| class MyTableViewController: UITableViewController { | |
| // MARK:プロパティ | |
| let items:[String] = ["項目1","項目2","項目3"] | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // プレゼンテーション中に選択を維持するにはコメントを取る |
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 UIKit | |
| class ViewController: UIViewController, UIImagePickerControllerDelegate , UINavigationControllerDelegate { | |
| // Mark:プロパティ | |
| @IBOutlet weak var photoImageVIew: UIImageView! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // Do any additional setup after loading the view, typically from a nib. |
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 | |
| //青色のオブジェクトを作成 | |
| let blue = NSColor.blueColor() | |
| blue.setFill() | |
| //100x100 の4角形を作成 | |
| let r = NSRect(x:0, y:0, width:100, height:100) |
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 | |
| //MARK: 定数定義 | |
| let L行高 = CGFloat(10.2) | |
| let L行数 = 80 | |
| let Lマージン上 = CGFloat(10.0) //mm 単位 | |
| let Lマージン左 = CGFloat(10.0) | |
| let Lマージン右 = CGFloat(10.0) | |
| let Lマージン下 = CGFloat(10.0) | |
| // 70DPI -> 70dot/25.4mm = 2.756 |
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 | |
| let LWinX = CGFloat(20) | |
| let LWinY = CGFloat(20) | |
| let LWinW = CGFloat(800) | |
| let LWinH = CGFloat(600) | |
| let LWinSize = CGSize(width: LWinW, height: LWinH) | |
| let LWinTitle = "App Title" |