Skip to content

Instantly share code, notes, and snippets.

View portercar's full-sized avatar

Carolyn P portercar

View GitHub Profile
<style>
.content-wrapper{
width: 100%;
}
.content-wrapper img{
width: 100%;
}
.text-wrapper{
function main() {
Logger.clear();
var apiKey = '';
var acctID = '';
var token = retrieveTokenByApiKey(apiKey);
url = 'https://api.wildapricot.org/v2/accounts/acctID/'
var batchUrl = "https://api.wildapricot.org/batch";
@portercar
portercar / rpn.rb
Last active December 19, 2015 05:39
RPN Calculator (Recursive)
class RPNCalc
def evaluate(str)
operator = /[\/\+\-\*\^]/
stack = []
equation = str.split(' ')
while equation[0].numeric?
equation[0] = Float(equation[0])
stack << equation.shift
end
@portercar
portercar / flatten.rb
Created June 29, 2013 20:47
Flatten Array Recursively
def flatten(array)
if array.empty?
array
else
element = array.pop
element.kind_of?(Array) ? flatten(array) + flatten(element) : flatten(array) << element
end
end