Skip to content

Instantly share code, notes, and snippets.

// ZMapTable.swift
//
// Copyright (c) 2016 Kaz Yoshikawa. Released under MIT License.
enum ZMapTableOption {
case StrongToWeak
case WeakToStrong
case WeakToWeak
case StrongToStrong
@akio0911
akio0911 / Regexp.swift
Last active March 14, 2016 06:01 — forked from feelingplace/Regexp.swift
Swift utility class for regular expression
import Foundation
extension String {
func isMatch(regexp:Regexp) -> Bool {
let range = NSMakeRange(0, self.characters.count)
let matches = regexp.internalRegexp.matchesInString(self, options: [], range:range )
return matches.count > 0
}
func matches(regexp:Regexp) -> [String]? {
//課題13
import UIKit
class TableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
import UIKit
class TableViewController: UITableViewController {
//都道府県名はここから取得
let prefecturalArr = [
"北海道","青森県","岩手県","宮城県","秋田県","山形県",
"福島県","茨城県","栃木県","群馬県","埼玉県","千葉県",
"東京都","神奈川県","新潟県","富山県","石川県","福井県",
"山梨県","長野県","岐阜県","静岡県","愛知県","三重県",
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var target1TextField: UITextField!
@IBOutlet weak var target2TextField: UITextField!
@IBOutlet weak var target1Label: UILabel!
@IBOutlet weak var target2Label: UILabel!
import UIKit
enum CalculationEnum: Int {
case PLUS
case MINUS
case TIMES
case DIVIDE
func calculate(target1: Double, target2: Double) -> Double {
<font>
</font>