- Solve all problems using JavaScript
-
Write a function that returns an array with the first
npowers of 2. Call ittwoPow. -
Use
twoPowandArray.prototype.reduceto the sum of the first 10 powers of 2. -
Describe this call signature:
| @mixin hp-opacity($trans) { | |
| filter: alpha(opactiy=($trans * 100)); | |
| -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$trans * 100})"; | |
| -moz-opacity: $trans; | |
| -khtml-opacity: $trans; | |
| opacity: $trans; | |
| } |
| var flight = { | |
| airline: "Oceanic", | |
| number: 815, | |
| departure: { | |
| IATA: "SYD", | |
| time: "2004-09-22 14:55", | |
| city: "Sydney" | |
| }, | |
| arrival: { | |
| IATA: "LAX", |
| partyTime = new Date(2010,12,11,23,30,0); | |
| yrTime = new Date(); | |
| /// test for party | |
| var checkForParty = function (yrTime, partyTime){ | |
| if (yrTime < partyTime) { | |
| return false; | |
| } else { | |
| return true; | |
| } |
| initial estimate: 234 | |
| current: 0 |
| GitHub.TreeSlider = function () { | |
| if (window.history && window.history.pushState) { | |
| function a() { | |
| if (e.sliding) { | |
| e.sliding = false; | |
| $(".frame-right").hide(); | |
| $(".frame-loading:visible").removeClass("frame-loading") | |
| } | |
| } | |
| if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { |
| defaults write com.apple.screencapture location ~/your/path | |
| killall SystemUIServer | |
| # aliases - commands | |
| alias ls='ls -l -G' | |
| alias la='ls -a' | |
| alias rmdir="rm -rf" | |
| alias jsmin='~/sites/jsmin/jsmin' | |
| alias sw='sass --watch' | |
| alias pd='pwd' | |
| alias sinatra='ruby -rubygems | |
| # aliases - navigation |
| // For each of the following code fragments: | |
| // a. what does the code do? | |
| // b. what did the author intend for it to do? | |
| // c. how would you fix it? | |
| // NOTE: all code samples work exactly the same in all browsers | |
| // 1. object literals | |
| var data = [ { high: 100, low: 81 }, { high: 93, low: 73 }, { high: 60, low: 32 } ]; | |
| function getAverages(data) { | |
| var avgs = []; |
| # CommitBot | |
| # An interface for audibly broadcasting commit messages | |
| # Tested on OSX | |
| # Created by the friendly team at Hunch.com (sharing is caring!) | |
| # | |
| # Installation | |
| # 1. replace USERNAME, PASSWORD, and HOSTNAME below | |
| # 2. ... | |
| # 3. profit! |