I hereby claim:
- I am kingcos on github.
- I am kingcos (https://keybase.io/kingcos) on keybase.
- I have a public key whose fingerprint is F1E0 1ED3 52B2 D711 0C92 3075 2CF7 B598 ABCC A55E
To claim this, I am signing this object:
# https://github.com/ctreffs/xcode-defaults | |
# 显示 Xcode 构建时间 | |
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES |
function active_count_lower_than(target_version) { | |
target_version = target_version | |
.split(".") | |
.map(e => { | |
if (e.length < 2) { | |
return "0" + e; | |
} else { | |
return e; | |
} | |
}) |
// | |
// ViewController.m | |
// KVOC | |
// | |
// Created by kingcos on 2019/3/24. | |
// Copyright © 2019 kingcos. All rights reserved. | |
// This is the demo code for my question: | |
// https://stackoverflow.com/questions/55321440/do-i-have-to-removeobserver-in-kvo-manually-now | |
// |
// Powered by github.com/kingcos | |
// Reference: https://github.com/kingcos/gitlab-mr-watchdog | |
// Usage: | |
// 1. ⏬ Download it | |
// 2. 🔧 `go build wechat_send.go` | |
// 3. 🏁 `./wechat_send -text "Hello" -users "A,B,C"` | |
// 4. 🎉 A, B, & C received "Hello" message | |
package main |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>SwiftyJSBridge</title> | |
</head> | |
<body></body> | |
<script> | |
var url = 'scheme://host?param1=value1¶m2=value2'; | |
var iframe = document.createElement('iframe'); |
func random(in range: Range<Int>) -> Int { | |
return Int(arc4random_uniform(UInt32(range.count))) + range.lowerBound | |
} | |
for _ in 0..<5 { | |
let range = Range<Int>(1...6) | |
print(random(in: range)) | |
} |
import UIKit | |
// 通过类型取出某个实例方法的签名,再传入实例调用相应的方法 | |
class ClassA { | |
func method(_ number: Int) -> Int { | |
return number + 1 | |
} | |
} | |
// func1: (ClassA) -> (Int) -> Int |
import UIKit | |
func addTo(_ adder: Int) -> (Int) -> Int { | |
return { | |
num in | |
return num + adder | |
} | |
} | |
func greaterThan(_ comparer: Int) -> (Int) -> Bool { |
I hereby claim:
To claim this, I am signing this object: