I hereby claim:
- I am trsathya on github.
- I am trsathya (https://keybase.io/trsathya) on keybase.
- I have a public key whose fingerprint is 4C01 F56A D48C 0269 1C67 60DC 3BCC E082 9E52 ACC4
To claim this, I am signing this object:
import Foundation | |
import Cryptex | |
struct CurrencyStore: CurrencyStoreType { | |
static let shared: CurrencyStore = { | |
return CurrencyStore(currencies: CurrencyStore.currencies) | |
}() | |
let currencies: [Currency] | |
import Foundation | |
infix operator ^^ { } | |
func ^^ (radix: Int, power: Int) -> Int { | |
return Int(pow(Double(radix), Double(power))) | |
} | |
func euclidean(topLeft: Int, topRight: Int, bottomLeft: Int, bottomRight: Int, φ: Int) -> Int { | |
let leftFactor = topLeft/bottomLeft | |
var leftResult = topLeft - (bottomLeft * leftFactor) |
http://swiftlang.ng.bluemix.net/#/repl/1717eb1a82ca957084bc404d38d36ea2e4589a08e221c8145998ded93d8d33d3 |
func osBuild() -> String { | |
var size : Int = 0 | |
var mib = [CTL_KERN, KERN_OSVERSION] | |
sysctl(&mib, u_int(mib.count), nil, &size, nil, 0) | |
var osBuild = [CChar](count: Int(size), repeatedValue: 0) | |
sysctl(&mib, u_int(mib.count), &osBuild, &size, nil, 0) | |
return String.fromCString(osBuild)! | |
} |
// https://projecteuler.net/problem=1 | |
let n = 999 | |
// Bad solution | |
var sum = 0 | |
for i in 1...n { | |
if i % 3 == 0 || i % 5 == 0 { | |
sum += i | |
} |
I hereby claim:
To claim this, I am signing this object: