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
enum BinarySearchTree<T: Comparable> { | |
case Leaf(T?) | |
indirect case Node(T, BinarySearchTree, BinarySearchTree) | |
} | |
func search<T: Comparable>(in tree: BinarySearchTree<T>, for item: T) -> Bool { | |
switch tree { | |
case .Leaf(let value): | |
return item == value | |
case .Node(let selfValue, let left, let right): |
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
language: objective-c | |
os: osx | |
xcode_workspace: {workspace-name}.xcworkspace | |
xcode_scheme: {workspace-name} | |
xcode_sdk: iphonesimulator9.0 | |
osx_image: xcode8 | |
before_install: | |
- | | |
brew update | |
gem install xcpretty -N --no-ri --no-doc |
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
// --------------------------------- | |
// Based on Aerotwist's cool tutorial - http://www.aerotwist.com/tutorials/getting-started-with-three-js/ | |
// --------------------------------- | |
// set up the sphere vars | |
// lower 'segment' and 'ring' values will increase performance | |
var radius = 5, | |
segments = 6, | |
rings = 6; |
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
(function() { | |
if (Cordova.hasResource("youtubeUploader")) return; | |
Cordova.addResource("youtubeUploader"); | |
function YouTubeUploader() { | |
} | |
YouTubeUploader.prototype.uploadVideo = function(file, success, fail) { |