(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
//Test Case 1 | |
//input >>>>>[1,4,2,4, [8, 10, 7], 3, [2, 12]] | |
// output >>>>> [1, 4, 2, 4, 8, 10, 7, 3, 2, 12] | |
//Test Case 2 | |
// //input >>>>>[1, 4, 2, 4, [8, [10, 57, 61], 7], 3, [2, 12]] | |
// output >>>>> [ 1, 4, 2, 4, 8, 10, 57, 61, 7, 3, 2, 12 ] | |
//Test Case 3 | |
// //input >>>>>[1, 4, 2, 4, [8, [10, [57, 108, 950], 61], 7], 3, [2, 12]] |
var express = require('express'); | |
var app = express(); | |
app.get('/', function(req,res) { | |
res.send('hello world'); | |
}); | |
app.listen(3000); |
exports.handler = (event, context, callback) => { | |
//some code here | |
callback(error, response); | |
}; |
const isPalindrome = (string) => { | |
const reverse = string.split('').reverse().join(''); | |
const isPalindrome = (string === reverse); | |
const result = isPalindrome ? `${string} is a Palindrome` : `${string} is not a Palindrome`; | |
return result; | |
}; |
{ | |
"Version":"2012-10-17", | |
"Statement":[ | |
{ | |
"Sid":"AddPerm", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], | |
"Resource":["arn:aws:s3:::examplebucket/*"] | |
} |
dependencies: | |
override: | |
- sudo pip install awscli | |
deployment: | |
prod: | |
branch: master | |
commands: | |
- aws s3 sync /home/ubuntu/S3ContinuousDeploy s3://s3awscd --delete |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.