I hereby claim:
- I am ez-li on github.
- I am fours (https://keybase.io/fours) on keybase.
- I have a public key ASASDkN1e5Fc0h2xvjyJScQwx8sxgBosSOPZNpwHVw8CJAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
config: | |
target: 'http://localhost:3000' | |
phases: | |
- duration: 60 | |
arrivalRate: 100 | |
defaults: | |
headers: | |
x-my-service-auth: '987401838271002188298567' | |
scenarios: | |
- flow: |
config: | |
target: 'http://localhost:3004' | |
phases: | |
- duration: 60 | |
arrivalRate: 100 | |
defaults: | |
headers: | |
x-my-service-auth: '987401838271002188298567' | |
scenarios: | |
- flow: |
// TEST API CALL | |
app.get('/api/restaurants/r1', (req, res) => { | |
db.getReservation('r20', '2019-09-04', (err, data) => { | |
if (err) return console.log(err); | |
res.send(data); | |
}); | |
}); | |
// RESULT |
function CashAmount(dollars) { | |
this.total = dollars; | |
this.pennies = dollars * 100; | |
} | |
CashAmount.prototype.totalInPennies = function() { | |
return this.pennies; | |
} |
var findLargestLevel = function(node) { | |
var levelSum = {}; | |
levelSum[0] = node.value; | |
var levels = [1]; | |
var sumNodes = function(node, level) { | |
for (var i = 0; i < node.children.length; i ++) { | |
if (!levelSum[level]) { | |
levelSum[level] = node.children[i].value; | |
} else { |
class Browser extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
currentPage: defaultPage, | |
backPages: [], | |
forwardPages: [], | |
inputText: '', | |
submit: false |
/** | |
* @param {number} numRows | |
* @return {number[][]} | |
*/ | |
var generate = function(numRows) { | |
// the first row is always [1] | |
// the second row is always [1,1] | |
// GOAL take the previous array and add elements sequentially | |
// our result array has numRows # of elements | |
// we count from 0 to numRows, each row is an array with length of its index |