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
// | |
// GoogleDocsViewController.swift | |
// Created by laiso on 2018/06/12. | |
// | |
// let gdViewController = GoogleDocsViewController(nibName: nil, bundle: nil) | |
// gdViewController.url = "https://docs.google.com/document/.../pub" | |
// let nav = UINavigationController(rootViewController: gdViewController) | |
// self.present(nav, animated: true, completion: nil) | |
// |
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
いつもGMOコインをご利用いただき、誠にありがとうございます。 | |
当社では現在、すべてのアルトコインについてスプレッドを縮小するキャンペーンを実施させていただいておりますが、12月上旬以降のアルトコイン価格高騰に伴い、当初2017年12月27日(水) 15:00終了を予定していた本キャンペーンにつきまして、 | |
「2017年12月22日(金) 10:00終了」 | |
とさせていただきます。 | |
※当社のスプレッドは、変動制であり、相場状況等により変動する場合がございます。 | |
お客様には直前のご案内となり、大変ご不便をおかけいたしますが、ご了承いただけますよう何卒お願い申し上げます。 | |
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
本書への推薦の言葉 | |
エリック・リースによるまえがき | |
監訳者まえがき | |
はじめに | |
謝辞 | |
第Ⅰ部 Lean UXへのイントロダクションと基本原則 | |
1章 かつてないほどに高まるLean UXの重要性 | |
デザインは常に進化している |
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
// http://qiita.com/:user/following_users を開き1ページづつコンソールで実行 | |
jQuery('.tableList_avatarCell a').map( (i, url) => { return url + '/unfollow' }).map( (i, url) => { jQuery.post(url) }) |
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 ViewController: UIViewController { | |
@IBOutlet weak var button: UIButton! | |
private var viewModel: ViewModel! | |
private let disposeBag = DisposeBag() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
viewModel = ViewModel(buttonTap: self.button.rx.tap.asObservable()) |
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
// ViewModel | |
completion = myStream.asObservable() | |
.flatMapLatest { | |
performOrError() | |
} | |
// ViewCOntroller | |
viewModel.completion.observeOn(MainScheduler.instance) | |
.retryWhen(showAlert(error:)) | |
.subscribe(onNext: { [weak self] in |
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 RxSwift | |
import RxCocoa | |
import APIKit | |
extension Reactive where Base: URLSession { | |
func response<T: Request>(_ request: T) -> Observable<T.Response> { | |
var req: URLRequest | |
do { | |
req = try request.buildURLRequest() | |
} catch { |
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
viewModel.showLoadingHUD.asDriver(onErrorJustReturn: false) | |
.drive(onNext: { show in | |
if show { | |
HUD.show(.progress) | |
} else { | |
HUD.hide() | |
} | |
}) | |
.addDisposableTo(disposeBag) |
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
// MARK: Submit Button - action | |
viewModel.loggedIn.asObservable() | |
.observeOn(MainScheduler.instance) | |
.retryWhen { errorObservable -> Observable<Error> in | |
errorObservable.map { [weak self] error in | |
let alert = ErrorAlertBuilder(error: error).build() | |
self?.present(alert, animated: true, completion: nil) | |
return error | |
} |
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
// Implementation | |
import Himotoki | |
// https://pay.jp/docs/api/#error | |
struct APIError: Decodable { | |
let code: APIErrorCode | |
let message: String | |
let statusCode: Int | |
let type: APIErrorType | |