This file contains 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
{ | |
"coreTeam" : [ | |
{ | |
"name" : "Ben Cohen", | |
"email" : "[email protected]" | |
}, | |
{ | |
"name" : "Chris Lattner", | |
"email" : "[email protected]" | |
}, |
This file contains 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
class RandomQueue<T> : IteratorProtocol { | |
typealias Element = T | |
var position = 0 | |
var positions : [Int] = [] | |
let items : [T] | |
init(items:[T]){ | |
self.items = items | |
} |
This file contains 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 UIKit | |
import PlaygroundSupport | |
class CircularQueue<T> : IteratorProtocol, RandomAccessCollection { | |
typealias Element = T | |
public typealias Index = Int | |
public typealias Indices = CountableRange<Int> | |
var position = 0 | |
let items : [T] |
This file contains 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
class CircularQueue<T> : IteratorProtocol, RandomAccessCollection { | |
typealias Element = T | |
public typealias Index = Int | |
public typealias Indices = CountableRange<Int> | |
var position = 0 | |
let items : [T] | |
init(items:[T]){ | |
self.items = items |
This file contains 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
until $(curl -v --header "SessionToken: 16676855" https://chat-esd-dev.appls.cmpn.paas.gsnetcloud.corp/chat/reasons/0001/permissions\?app\=00); do | |
osascript -e 'display notification "Não funcionou o serviço"' | |
printf 'Waiting 240 seconds ....................................... ' | |
sleep 240 | |
done | |
osascript -e 'display notification "Funcionou o serviço"' |
This file contains 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
//Include this in AppDelegate | |
if let window = window where NSProcessInfo.processInfo().arguments.contains("UITestRun") { | |
FlowTestRouter.selectRoute(window, routes: NSProcessInfo.processInfo().arguments) | |
return true | |
} | |
import UIKit | |
class FlowTestRouter { |
This file contains 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 | |
import XCPlayground | |
enum CellData<A, B, C> { | |
case Number(A) | |
case Name(B) | |
case Money(C) | |
This file contains 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
// | |
// CURLDebug.swift | |
// | |
// Created by apple on 02/06/16. | |
// Copyright © 2016 Rodrigo Reis. All rights reserved. | |
// | |
import Foundation | |
This file contains 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
func generateHigherInteger(number:Int) -> Int { | |
let siblingsStr = String(number).characters.map { String($0) } | |
let bigSibling = siblingsStr.sort(>).reduce("", combine:+) | |
return Int(bigSibling) ?? number | |
} |
This file contains 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
protocol ExcutableQueue { | |
var queue: dispatch_queue_t { get } | |
} | |
extension ExcutableQueue { | |
func execute(closure: () -> Void) { | |
dispatch_async(queue, closure) | |
} | |
} |