- Install http://nodejs.org/
- Save
parse-table.js
to your Downloads folder - Open
Terminal
application - Enter command
cd Downloads
- Enter command
node parse-table.js
Now output.csv is in your Downloads folder.
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>ProgressBar.js - Minimal Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.progress { |
parse-table.js
to your Downloads folderTerminal
applicationcd Downloads
node parse-table.js
Now output.csv is in your Downloads folder.
// Return operations to modify array a to b. | |
// e.g. var a = [{id:1}, {id:2}], b = [{id:2}] | |
// operations(a, b) -> [{operation: ‘remove’, item: {id:1}] | |
function operations(a, b) { | |
var aIds = _.pluck(a, 'id'); | |
var bIds = _.pluck(b, 'id'); | |
var notInBoth = _.xor(aIds, bIds); | |
return _.map(notInBoth, function(id) { | |
var isInA = _.contains(aIds, id); |
For the Space Tyckiting event, students had to solve a small problem at the sign up. Bonus points were awarded for creativity.
If we list all the natural numbers below 10 that are multiples of 3 or 5,
we get 3, 5, 6 and 9. The sum of these multiples is 23.
Your task is to **write a function** which finds the sum of all the
multiples of 3 or 5 below 1000.
function sendErrorToAnalytics(err) { | |
console.log('Sending error to analytics', err); | |
// WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
// Google analytics exception's exDescription max length is 150 bytes. | |
// USE ANOTHER EXCEPTION LOGGING SERVICE IF YOU NEED TO LOG E.G. STACKTRACES | |
ga('send', 'exception', { | |
exDescription: err.stack, | |
fatal: false | |
}); |
// utils.jsx | |
// Returns wanted data or null. You can specify default value instead of null. | |
// Remember that arrays are actually objects so you can get index of array with | |
// 'arr.0' | |
// e.g get(object, 'data.results.0') | |
function get(obj, attributePath, defaultValue) { | |
var opts = _.extend({defaultValue: null}, {defaultValue: defaultValue}); | |
if (!obj) { |
// _.find returns undefined if nothing is found, otherwise returns the found item. | |
var existsOnCurrentPeriod = _.find(currentValues.operators, function(operatorId) { | |
return operatorId === operator.usbKeyId; | |
}); | |
operator.existsOnPeriod = !!existsOnCurrentPeriod; | |
// This looks correct at first glance, but see below |
Google uses WGS 84 Web Mercator as its coordinate system. In ESRI it is under geographic coordinate systems.