This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.amazonaws.auth.AWSCredentials credentials_tSQSConnection_1 = new com.amazonaws.auth.BasicAWSCredentials("abcdefghijklmnopqrst",decryptedPassword_tSQSConnection_1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include "mpi.h" | |
#include <time.h> | |
#include <sys/time.h> | |
/* | |
In here 'process o' which distribute the workload to other processes is considered | |
as Root (Master) process and other processes which do the computation is considered | |
as Slave task processes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports.hello = (event, context, callback) => { | |
let user = 'User'; | |
if(event.queryStringParameters.name) { | |
user = event.queryStringParameters.name | |
} | |
const response = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: HelloService | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
hello: | |
handler: handler.hello | |
events: | |
- http: | |
path: hello/welcome |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tryAsync = async () => { | |
let msgs = await Promise.all([promise(1000), promise(2000), promise(3000)]) | |
msgs.forEach(msg => { | |
console.log(msg) | |
}); | |
console.log(`End of Promise.all(..)`) | |
} | |
tryAsync() | |
//Result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tryAsync = async () => { | |
console.log(await promise(1000)) // |-----| | |
console.log(await promise(2000)) // |-----|-----| | |
console.log(await promise(3000)) // |-----|-----|-----| | |
} | |
tryAsync() | |
//Result | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tryAsync = async () => { | |
let p1 = promise(1000) // |-----| | |
let p2 = promise(2000) // |-----|-----| | |
let p3 = promise(3000) // |-----|-----|-----| | |
console.log(await p1) | |
console.log(await p2) | |
console.log(await p3) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promise.all([promise(1000), promise(2000), promise(3000)]) | |
.then((msgs) => { | |
msgs.forEach(msg => { | |
console.log(msg) | |
}); | |
console.log(`End of Promise.all(..)`) | |
}) | |
//Result | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
promise(1000) // |-----| | |
.then((msg) => { | |
console.log(msg) | |
return promise(2000) // |-----|-----| | |
}) | |
.then((msg) => { | |
console.log(msg) | |
return promise(3000) // |-----|-----|-----| | |
}) | |
.then((msg) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
promise(1000) // |-----| | |
.then(msg => { | |
console.log(msg) | |
}) | |
promise(2000) // |-----|-----| | |
.then(msg => { | |
console.log(msg) | |
}) | |
promise(3000) // |-----|-----|-----| | |
.then(msg => { |
NewerOlder