Skip to content

Instantly share code, notes, and snippets.

View tuplebunny's full-sized avatar

Daniel tuplebunny

  • Pacific Northwest
View GitHub Profile
@tuplebunny
tuplebunny / binarytree.rb
Created May 26, 2019 07:48 — forked from yuya-takeyama/binarytree.rb
Binary Tree implemented in Ruby.
module BinaryTree
class Node
attr_reader :word, :count, :left, :right
include Enumerable
def initialize(word)
@word, @count = word, 1
end
$('.add_content').live('click', function() {
if(! selected_list) {
alert('Select a list first.');
return;
}
$.ajax({
type: 'POST',
url: '/lists/' + selected_list.attr('list_id') + '/add_content?content_id=' + $(this).attr('content_id') + '&list_id=' + selected_list.attr('list_id'),
dataType: 'json',