ドキュメントを書くとき、ObjCの setTile:forState:
を Swfitでどう書くか。
フルパターン。
メリット:
- 情報量が多くてわかりやすい
- オーバーロードしていても曖昧でない
// | |
// RootViewController.swift | |
// iOS9Sampler | |
// | |
// Created by Shuichi Tsutsumi on 2015/06/10. | |
// Copyright © 2015 Shuichi Tsutsumi. All rights reserved. | |
// | |
import UIKit |
#!/usr/bin/env python | |
import lldb | |
def slack(debugger, command, result, internal_dict): | |
frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame() | |
path = command | |
lldb.debugger.HandleCommand(""" | |
expr -l swift -- |
A Houdini asset file (.hdalc) will be created in the asset library directory
($HOUDINI_PATH/otls
). To maintain this file within the Git repository, it
should be moved into the project asset directory ($HIP/otls
).
#!/usr/bin/env python | |
import argparse | |
import datetime | |
import os | |
import yaml | |
def main(args): |
/* | |
* GifRecorder - makes it easy to record a sketch in animated GIF | |
* (c) 2014 cocopon. | |
*/ | |
import gifAnimation.*; | |
/* | |
* Usage: | |
* | |
* 0. Install a required library before using GifRecorder. |
import UIKit | |
extension UIImage { | |
public enum GIFBehavior { | |
case unclamped, clamped(TimeInterval), webkit | |
fileprivate func duration(_ properties: Any?) -> TimeInterval? { | |
// Look for specified image duration; always prefer unclamped delay time | |
guard let properties: [String: Any] = (properties as? [String: Any])?["{GIF}"] as? [String: Any], |
javascript: (function () { | |
const title = document.title.split('|')[0].trim(); | |
const url = `https://www.amazon.co.jp/dp/${ue_pti}`; | |
const markdown = `[${title}](${url})`; | |
navigator.clipboard.writeText(markdown).then(function () { | |
alert(`URL Copied! : ${markdown}`); | |
}, function () { | |
alert('URL Copy failed..') | |
}) |