See
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
| #=============================================================================== | |
| # Filename: boost.sh | |
| # Author: Pete Goodliffe | |
| # Copyright: (c) Copyright 2009 Pete Goodliffe | |
| # Licence: Please feel free to use this, with attribution | |
| # Modified version | |
| #=============================================================================== | |
| # | |
| # Builds a Boost framework for iOS, iOS Simulator, and OSX. | |
| # Creates a set of universal libraries that can be used on an iOS and in the |
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 | |
| /** | |
| Determine whether Optional collection is nil or an empty collection | |
| :param: collection Optional collection | |
| :returns: true if collection is nil or if it is an empty collection, false otherwise | |
| */ | |
| public func isNilOrEmpty<C: CollectionType>(collection: C?) -> Bool { | |
| switch collection { |
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
| // 1. Disable centered look & animation: | |
| // 1.1. Subclass NSSearchFieldCell and add: | |
| - (BOOL)isCenteredLook | |
| { | |
| return NO; | |
| } | |
| // 1.2. Subclass NSSearchField and add: |
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
| namespace bamthread | |
| { | |
| typedef std::unique_ptr<boost::asio::io_service::work> asio_worker; | |
| // the actual thread pool | |
| struct ThreadPool { | |
| ThreadPool(size_t threads) :service(), working(new asio_worker::element_type(service)) { | |
| for ( std::size_t i = 0; i < threads; ++i ) { | |
| auto worker = boost::bind(&boost::asio::io_service::run, &(this->service)); | |
| g.add_thread(new boost::thread(worker)); | |
| } |
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 | |
| struct Regex { | |
| var pattern: String { | |
| didSet { | |
| updateRegex() | |
| } | |
| } | |
| var expressionOptions: NSRegularExpressionOptions { | |
| didSet { |
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 list = [8,1,55,34,13,8,5,0,1,3,2,21] | |
| func quicksort1(list:[Int]) -> [Int] { | |
| if list.count == 0 { | |
| return [] | |
| } | |
| let pivotValue = list[0] | |
| let smaller = filter(list, { $0 < pivotValue }) | |
| smaller |
Embedders of V8 should generally use the head of the branch corresponding to the minor version of V8 that ships in Chrome.
To find out what version this is,
- Go to https://omahaproxy.appspot.com/
- Find the latest stable Chrome version in the table
- Enter it into the "Translate a Chrome verison to a V8 version" box below the table.
- Ignore the last two parts.