01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140
Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.
[Laughter]
@startuml PlantUML Color Themes - Tomorrow Night Eighties | |
' "Tomorrow night eighties" color theme (see https://github.com/chriskempson/tomorrow-theme) | |
!define Background #2d2d2d | |
!define CurrentLine #393939 | |
!define Selection #515151 | |
!define Foregound #cccccc | |
!define Comment #999999 | |
!define Red #f2777a | |
!define Orange #f99157 |
private static boolean isWithinTolerance(BigDecimal amount, BigDecimal tolerance) { | |
return (amount.compareTo(tolerance.negate()) > 0 && amount.compareTo(tolerance) < 0) | |
|| amount.abs().compareTo(tolerance) == 0; | |
} |
enumerateDaysBetweenDates = (startDate, endDate) => { | |
const now = startDate.clone().startOf("day"); | |
const dates = []; | |
while (now.isSameOrBefore(endDate.startOf("day"))) { | |
dates.push(now.format("YYYY-MM-DD")); | |
now.add(1, "days"); | |
} | |
return dates; | |
}; |
enumerateDaysBetweenDates = (startDate, endDate) => { | |
const now = startDate.clone().startOf("day"); | |
const dates = []; | |
while (now.isSameOrBefore(endDate.startOf("day"))) { | |
dates.push(now.format("YYYY-MM-DD")); | |
now.add(1, "days"); | |
} | |
return dates; | |
}; |
const logger = (() => { | |
let log = ""; | |
return { | |
add: msg => log += msg + "\n", | |
show: () => console.log(log) | |
} | |
})(); |
// Turns [1,2,2,2] into [1,2] | |
const arr = [1,2,2,2] | |
[...new Set(arr)] |
I hereby claim:
To claim this, I am signing this object:
find . -name "node_modules" -exec rm -rf '{}' + |
git reset --soft "HEAD^" | |
git commit --amend |