// Swift 4.1
// Xcode 9.4.1
// iOS SDK 11.4
@IBOutlet weak var qrcodeImageView: UIImageView!
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
| repositories { | |
| maven { url “http://maven.springframework.org/release” } | |
| maven { url “https://maven.fabric.io/public” } | |
| } |
#!/bin/bash
# 作業ディレクトリ作成
mkdir build
# Archive作成
xcodebuild -workspace hogehoge.xcworkspace \
-scheme hogehoge \
-configuration Debug \
clean archive \
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
| // Xcode 9.4 | |
| // Swift 4.1 | |
| let share = "share text hoge hoge" | |
| let activityItems = [share] | |
| let activityVC = UIActivityViewController(activityItems: activityItems, applicationActivities: nil) | |
| // 使用しないアクティビティタイプ | |
| let excludedActivityTypes = [ | |
| UIActivityType.print, |
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
| // Xcode 9.4 | |
| // Swift 4.1 | |
| static func calculateRect(text: String) -> CGRect { | |
| let paragraphStyle = NSMutableParagraphStyle() | |
| paragraphStyle.lineBreakMode = NSLineBreakMode.byWordWrapping | |
| let attributeDict = [ | |
| NSAttributedStringKey.font: UIFont.systemFont(ofSize: 14.0), | |
| NSAttributedStringKey.paragraphStyle: paragraphStyle |
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
| // [CryptoSwift] https://github.com/krzyzanowskim/CryptoSwift | |
| // | |
| // Xcode 9.4 | |
| // Swift 4.1 | |
| import Foundation | |
| import CryptoSwift | |
| struct EncryptionUtil { | |
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
| def fizzbuzz(i): | |
| return 'Fizz' * (i % 3 == 0) + 'Buzz' * (i % 5 == 0) or str(i) | |
| # if i % 15 == 0: | |
| # return "FizzBuzz" | |
| # elif i % 3 == 0: | |
| # return "Fizz" | |
| # elif i % 5 == 0: | |
| # return "Buzz" | |
| # else: |
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
| # http://y0m0r.hateblo.jp/entry/20121205/1354718418 | |
| # python3 | |
| # 大きさがN*Mの迷路が与えられます。 | |
| # 迷路は通路と壁からできており、1ターンに隣接する上下左右4マスの通路へ移動することができます。 | |
| # スタートからゴールまで移動するのに必要な最小のターン数を求めなさい。 | |
| def debug_print(maze): | |
| for xx in maze: | |
| for yy in xx: | |
| print(yy, end="") |