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
# Sample implementation of quicksort and mergesort in ruby | |
# Both algorithm sort in O(n * lg(n)) time | |
# Quicksort works inplace, where mergesort works in a new array | |
def quicksort(array, from=0, to=nil) | |
if to == nil | |
# Sort the whole array, by default | |
to = array.count - 1 | |
end |
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
/* | |
============================================================================== | |
BinarySearch.h | |
Created: 31 Jul 2014 9:57:04am | |
Author: Adam Wilson | |
============================================================================== | |
*/ |
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 os | |
import ycm_core | |
libDir = "JuceLibraryCode" | |
flags = [ | |
'-Wall', | |
'-Wextra', | |
'-Werror', |
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
Printing YouCompleteMe debug information... | |
-- Server has Clang support compiled in: True | |
-- Clang version: clang version 3.5.0 (tags/RELEASE_350/final) | |
-- Flags for /Users/adamelemental/dev/juce_projects/Chapter02_07/Source/CustomComponent.cpp loaded from /Users/adamelemental/dev/juce_projects/Chapter02_07/.yc | |
m_extra_conf.py: | |
-- ['-Wall', '-Wextra', '-Werror', '-Wno-attributes', '-std=c++11', '-x', 'c++', '-isystem', '/Users/adamelemental/dev/juce_projects/Chapter02_07/../BoostParts | |
', '-isystem/Users/adamelemental/dev/juce/modules', '-I/Users/adamelemental/dev/juce_projects/Chapter02_07/./JuceLibraryCode', '-isystem', '/System/Library/Fra | |
meworks/Python.framework/Headers', '-isystem', '/Users/adamelemental/dev/juce_projects/Chapter02_07/../llvm/include', '-isystem', '/Users/adamelemental/dev/juc | |
e_projects/Chapter02_07/../llvm/tools/clang/include', '-I', '/Users/adamelemental/dev/juce_projects/Chapter02_07/.', '-I', '/Users/adamelemental/dev/juce_proje | |
cts/Chapter02_07/./ClangCompleter', '-isystem', '/User |
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 "CustomCallOutBox.h" | |
CustomCallOutBox::CustomCallOutBox (Component &contentComponent, | |
const Rectangle< int > &areaToPointTo, | |
Component *parentComponent, | |
bool drawArrow) | |
: CallOutBox (contentComponent, areaToPointTo, parentComponent), drawArrow (drawArrow) | |
{ |
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 Foundation | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely() | |
class RemoteAPI { | |
func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void { | |
let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software") | |
let ses = NSURLSession.sharedSession() |
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
/** | |
* Simple ring buffer which is always the same length | |
* for keeping a stream of float input values | |
* Designed to give a snapshot in time | |
* | |
* TODO: use vector queue to store values instead of array pointer | |
*/ | |
class RingBuffer | |
{ |
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
apply plugin: 'com.android.model.library' | |
model { | |
android { | |
compileSdkVersion = 23 | |
buildToolsVersion = "23.0.1" | |
defaultConfig.with { | |
minSdkVersion.apiLevel = 16 | |
targetSdkVersion.apiLevel = 22 |
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 React, { Component } from 'react'; | |
import {TextInput, TouchableWithoutFeedback, StyleSheet} from 'react-native'; | |
const Platform = require('Platform'); | |
const requireNativeComponent = require('requireNativeComponent'); | |
const emptyFunction = require('fbjs/lib/emptyFunction'); | |
if (Platform.OS === 'android') { | |
var AndroidTextInput = requireNativeComponent('AndroidTextInput', null); | |
} else if (Platform.OS === 'ios') { | |
var RCTTextView = requireNativeComponent('RCTTextView', null); |
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
/* | |
============================================================================== | |
AudioBufferFIFO.h | |
Created: 29 Dec 2016 9:22:50am | |
Author: Adam Wilson | |
============================================================================== | |
*/ |
OlderNewer