- 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
const fetchHeaders = { | |
accept: "*/*", | |
"accept-language": "en-US,en;q=0.9", | |
authorization: | |
"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA", // This will expire, you can get a new one by inspecting the network requests on twitter.com | |
"cache-control": "no-cache", | |
pragma: "no-cache", | |
"sec-ch-ua": | |
'"Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"', | |
"sec-ch-ua-mobile": "?0", |
MIT License | |
Copyright (c) Meta Platforms, Inc. and affiliates. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 |