- 授权协议: MIT
- 开发语言: Swift
- 操作系统: OS X
- 软件首页: https://github.com/radex/swiftytimer
软件介绍
SwiftyTimer 是一组扩展,可以使 NSTimer API 更加清晰易用,亲近 Swift 语法。
使用示例:
使用 NSTimer.every 和 NSTimer.after,可轻松地安排重复和不重复计时器(重复和延时):
NSTimer.every(0.7.seconds) {
statusItem.blink()
}
NSTimer.after(1.minute) {
println("Are you still here?")
}SwiftyTimer 使用封闭的,而不是目标/选择/用户信息。你可以使用 Ruby on Rails-like 类似的助手,制定时间间隔:
1.second 2.5.seconds 5.seconds 10.minutes 1.hour
你可以传递方法引用,而不用闭包:
NSTimer.every(30.seconds, align)
如果你想对一个 Timer 对象不进行计划,使用 use new(after:) 和 new(every:):
let timer = NSTimer.new(every: 1.second) {
println(self.status)
}调用 start() 使用 new 来安排计时器的创建,您可以选择通过运行循环和循环运行模式:
timer.start() timer.start(modes: NSDefaultRunLoopMode, NSEventTrackingRunLoopMode)
Natural Language Processing with Python
Steven Bird、Ewan Klein、Edward Loper / O'Reilly Media / 2009-7-10 / USD 44.99
This book offers a highly accessible introduction to Natural Language Processing, the field that underpins a variety of language technologies, ranging from predictive text and email filtering to autom......一起来看看 《Natural Language Processing with Python》 这本书的介绍吧!
