Instructions:
- Download this application skeleton.
- Convert the app to use AJAX.
- Add any files you changed to your gist and submit your code.
Challengue solution repo : https://github.com/fabianuribe/lucky_ajax.git
execute pathogen#infect() | |
" don't bother with vi compatibility | |
set nocompatible | |
" enable syntax highlighting | |
syntax enable | |
" configure Vundle | |
filetype on " without this vim emits a zero exit status, later, because of :ft off | |
filetype off |
/** | |
* heap.js | |
* A module that implements a Doubly Linked List data Structure | |
* @module LinkedList | |
*/ | |
module.exports = Heap; | |
var TYPE_MIN = 'min'; | |
var TYPE_MAX = 'max'; | |
/** |
/** | |
* linked-list.js | |
* A module that implements a Doubly Linked List data Structure | |
* @module LinkedList | |
*/ | |
module.exports = LinkedList; | |
/** | |
* Represents a Linked List Node. | |
* @param {Object} data |
Challengue solution repo : https://github.com/fabianuribe/lucky_ajax.git
require 'nokogiri' | |
doc = Nokogiri::HTML(File.open('post.html')) | |
def extract_usernames(doc) | |
doc.search('.comhead > a:first-child').map do |element| | |
p element.inner_text | |
end |
class Vehicle | |
attr_reader :status, :wheels | |
def initialize(args) | |
@color = args[:color] | |
@wheels = args[:wheels] | |
@status = :stopped | |
end |
# Create an RPNCalculator class which can evaluate expressions written in Reverse Polish notation. | |
# It should have an evaluate instance method which takes as its input a valid RPN expression and returns its evaluation. Your calculator only needs to handle addition, multiplication, and subtraction (not division). | |
# Operators and numbers should be separated by a single space. | |
# For example, | |
# calc = RPNCalculator.new |
sudoku_string = "003020600900305001001806400008102900700000008006708200002609500800203009005010300" | |
sudoku_array = sudoku_string.split('') | |
rows_array = Array.new(9){ sudoku_array.shift(9) } | |
rows_array.each{|row| p row} | |
box_rows_array = [] | |
# p rows_array |
sudoku_string = "003020600900305001001806400008102900700000008006708200002609500800203009005010300" | |
sudoku_array = sudoku_string.split('') | |
rows_array = Array.new(9){ sudoku_array.shift(9) } | |
rows_array.each{|row| p row} | |
box_rows_array = [] | |
# p rows_array |
#Returns a number in english language | |
def english_number (number) | |
raise ArgumentError.new("Argument must be a positive integer") if !(number.is_a? Integer) || number < 0 | |
return 'zero' if number == 0 | |
result = "" |