The story of the gentle knight and his servant Sancho Panza has entranced readers for centuries.
The one with the Slough of Despond and Vanity Fair.
The first English novel.
| var i = 0; | |
| while (i < 999) { | |
| console.log("Hello World!"); | |
| i++; | |
| } |
| // My Super Minimal CSS Reset | Credit due to Eric Meyer + Nicolas Gallagher | http://meyerweb.com/eric/tools/css/reset/ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, font, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| b, u, i, center, | |
| dl, dt, dd, ol, ul, li, | |
| fieldset, form, label, legend, |
| $(window).scroll(function() { | |
| var scroll = $(window).scrollTop(); | |
| if (scroll >= 80) { | |
| $(".nav").addClass("is-scrolled"); | |
| } else { | |
| $(".nav").removeClass("is-scrolled"); | |
| } | |
| }); |
| img{ | |
| max-width:100%; | |
| height:auto; | |
| } | |
| .map_canvas img { | |
| max-width: none; | |
| } |
| %truncate { | |
| width: 100px; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } |
| // Write a function that adds from two invocations. | |
| function addf(x){ | |
| return function(y){ | |
| return x + y; | |
| } | |
| } | |
| console.log(addf(3) (4)); |
| // Write a function that takes a binary function, and makes it callable with two invocations. | |
| function mul(x, y){ | |
| return x * y; | |
| } | |
| function applyf(binary){ | |
| return function (x) { | |
| return function (y) { | |
| return binary(x, y); |
| // Write a function that takes a function and an argument, and returns a function that can supply a second argument. | |
| function add(x,y){ | |
| return x + y; | |
| } | |
| function mul(x,y){ | |
| return x * y; | |
| } | |
| function curry(a,b){ |
| // http://www.codewars.com/kata/52cd0d600707d0abcd0003eb/train/javascript | |
| // Test Failed: maximumSum with n>values.length not working as expected | |
| var values = [5, 4, 3, 2, 1]; | |
| function minimumSum(values, n){ | |
| values.sort(); | |
| var total = 0; | |
| for (var i = 0; i < n; i++) { | |
| total += values[i]; |