Skip to content

Instantly share code, notes, and snippets.

View jkasun's full-sized avatar

Janith Kasun jkasun

View GitHub Profile
@jkasun
jkasun / index.js
Created September 24, 2019 16:45
Uploading Files to S3 With Node.js
const fs = require('fs');
const AWS = require('aws-sdk');
// Enter copied or downloaded access id and secret here
const ID = '';
const SECRET = '';
// Enter the name of the bucket that you have created here
const BUCKET_NAME = 'test-bucket-1242tsr';;
// Online C++ compiler to run C++ program online
#include <iostream>
float pi = 3.141;
// This should take circleRadius as a parameter and rutrn the area
float caculateArea(float r) {
// Area = Pi x Square(R)
float area = pi * r * r;
return area;
}
// Online C++ compiler to run C++ program online
#include <iostream>
char getGradeAlt(int mark) {
// mark < 100 && mark > 75
if (mark >= 75) {
return 'A';
} else if (mark >= 65) {
return 'B';
}