let userID = "0 OR 1=1"
let sql = "SELECT accountNumber, balance FROM accounts WHERE account_owner_id = \(userID)"
print(sql)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import Dispatch | |
| import MongoKitten | |
| let numberOfDocuments = 100 | |
| let settings = ClientSettings(host: MongoHost(hostname: "127.0.0.1", | |
| port: UInt16(27017)), | |
| sslSettings: nil, | |
| credentials: nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Benchmark = require('benchmark'); | |
| var suite = new Benchmark.Suite; | |
| suite.add('mytest', function () { | |
| let a = { | |
| "firstname": "robert", | |
| "lastname": "dickerson", | |
| "date": Date() | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import Kassandra | |
| import FutureLib | |
| let kassandra = Kassandra() | |
| let newPost = Post(postID: nil, | |
| author: "Robert", | |
| description: "Kassandra driver released!", | |
| timestamp: Date()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| struct JSON { } | |
| struct ZewoMySQL { | |
| func execute(sqlStatement: String) {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| infix operator |> { associativity left precedence 140 } | |
| func |> <S,T> (value: S, f: (S) -> T) -> T{ | |
| return f(value) | |
| } | |
| enum SuccessOrFail<T> { | |
| case success(T) | |
| case failure(Error) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| make[2]: Entering directory '/home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src' | |
| /home/rfdickerson/swift-toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10/usr/bin/swiftc -frontend -c /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Block.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Data.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Dispatch.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/IO.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Private.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Queue.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Source.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Time.swift /home/rfdickerson/swift-toolchains/swift-corelibs-libdispatch/src/swift/Wrapper.swift -primary-file /home/rfdickerson/swift-toolchains/swift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| func sayHello2() { | |
| //sleep(5) | |
| print("Hello!") | |
| } | |
| #if false | |
| public func pthread_create( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typealias Byte = UInt8 | |
| let size: Int = 100000 | |
| var simpleData = [Byte](repeating: 3, count: size) | |
| var dataCompressed = [Byte](repeating: 6, count: size) | |
| simpleData[3] = 2 | |
| simpleData[4] = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| indirect enum STree { | |
| case Leaf | |
| case Node (STree, AnyObject, STree) | |
| } | |
| let s = STree.Node(.Node(.Leaf, 3, .Leaf), 5, .Leaf) | |
| func search(tree: STree, toFind: AnyObject) { | |
| switch tree { | |
| case .Leaf: return |