Skip to content

Instantly share code, notes, and snippets.

View prakashsellathurai's full-sized avatar
🦅
Focusing

Prakash Sellathurai prakashsellathurai

🦅
Focusing
View GitHub Profile
@prakashsellathurai
prakashsellathurai / EXPORT.js
Last active September 1, 2018 16:44
BETTER WAY TO EXPORT THE CLOUD FUNCTIONS BY WRAPPING IT UNDER DIRECTORY IN HIERARCHIAL NAMING SCHEMA
const glob = require('glob')
function exportFunction () {
return glob.sync('{,!(node_modules)/**/}*.js', { cwd: __dirname }).forEach(file => {
const only = process.env.FUNCTION_NAME
const name = concoctFunctionName(file)
if (only === undefined || only === name) {
console.log(name + '' + 'file: ' + file)
}
})
}
function sumTheNaturalNumbers(...theArgs) {
return theArgs.reduce((previous, current) => {
return previous + current;
});
}
console.log(sumTheNaturalNumbers(1, 2, 3));
void FloydWarshall(int distance[maxVertices][maxVertices],int vertices)
{
int from,to,via;
for(from=0;from<vertices;from++)
{
for(to=0;to<vertices;to++)
{
for(via=0;via<vertices;via++)
{
distance[from][to] = min(distance[from][to],