This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i = 0; | |
while (i < 999) { | |
console.log("Hello World!"); | |
i++; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).scroll(function() { | |
var scroll = $(window).scrollTop(); | |
if (scroll >= 80) { | |
$(".nav").addClass("is-scrolled"); | |
} else { | |
$(".nav").removeClass("is-scrolled"); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img{ | |
max-width:100%; | |
height:auto; | |
} | |
.map_canvas img { | |
max-width: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%truncate { | |
width: 100px; | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write a function that adds from two invocations. | |
function addf(x){ | |
return function(y){ | |
return x + y; | |
} | |
} | |
console.log(addf(3) (4)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZE2 9AW - Perrie Beanie's, Skaw, Shetland | |
M1 5AN - Manchester | |
W13 8DL - The Duke of Kent, London |
OlderNewer