Skip to content

Instantly share code, notes, and snippets.

View katherholt's full-sized avatar
💅

Katy Atherholt katherholt

💅
View GitHub Profile

Keybase proof

I hereby claim:

  • I am katherholt on github.
  • I am katherholt (https://keybase.io/katherholt) on keybase.
  • I have a public key ASCAdr2qbYJHhZC5CoF0u2cqiJYcPaoDfV5cllPijQ8Xdwo

To claim this, I am signing this object:

// Write a function arrayOfLight(x) (get it? Lighthouse…? Come on!) which takes one parameter, a positive number, and return
// an array containing all numbers from 0 up to and including the given number.
function arrayOfLight(x) {
var array = [];
for(var y = 0; y <= x; y++) {
array.push(y);
}
return array;
#1
select e.isbn from editions as e
join publishers as p on (p.id = e.publisher_id)
where p.name = 'Random House';
#2
select e.isbn, b.title from editions as e
join publishers as p on (p.id = e.publisher_id)
join books as b on (b.id = e.book_id)
where p.name = 'Random House';
def benchmark
start_time = Time.now
Time.now - start_time
end
long_string = "apple"*100000000
running_time = benchmark { long_string.reverse }
puts "string.reverse took #{running_time} seconds to run"
def maximum(arr)
while arr.length>1
arr.each do |i|
if i+1>i
arr.delete(i)
end
end
end
if arr.length==0