Swift 的 LRU 缓存 SwiftlyLRU
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/justinmfischer/SwiftlyLRU
软件介绍
//// Example//import Foundation//...//Create cache with capacityvar cache = SwiftlyLRU<String, Float>(capacity: 7) //Add Key, Value pairs
cache["AAPL"] = 114.63
cache["GOOG"] = 533.75
cache["YHOO"] = 50.67
cache["TWTR"] = 38.91
cache["BABA"] = 109.89
cache["YELP"] = 55.17
cache["BABA"] = 109.80
cache["TSLA"] = 231.43
cache["AAPL"] = 113.41
cache["GOOG"] = 533.60
cache["AAPL"] = 113.01
//Retrieve
if let item = cache["AAPL"] {
println("Key: AAPL Value: \(item)")
} else {
println("Item not found.")
}/* OUTPUT Key: AAPL Value: 113.01*/
//Describe
println(cache)/* OUTPUT SwiftlyLRU Cache(7) Key: AAPL Value: Optional(113.01) Key: GOOG Value: Optional(533.6) Key: TSLA Value: Optional(231.43) Key: BABA Value: Optional(109.8) Key: YELP Value: Optional(55.17) Key: TWTR Value: Optional(38.91) Key: YHOO Value: Optional(50.67) *///...jQuery
Earle Castledine、Craig Sharkie / SitePoint / 2010-02-28 / USD 39.95
jQuery: Novice to Ninja is a compilation of best-practice jQuery solutions to meet the most challenging JavaScript problems. In this question-and-answer book on jQuery, you'll find a cookbook of ready......一起来看看 《jQuery》 这本书的介绍吧!
XML、JSON 在线转换
在线XML、JSON转换工具
RGB CMYK 转换工具
RGB CMYK 互转工具
