This file contains 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
var sys = require('sys'); | |
function fib(n) { | |
if (n < 2) return n; | |
return fib(n-2) + fib(n-1); | |
} | |
sys.print(fib(39)); |
This file contains 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 <stdio.h> | |
#include <algorithm> | |
using namespace std; | |
int main() { | |
int array[5] = { 4, 1, 2, 5, 3 }; | |
sort(array, array + 5); | |
for( int i = 0; i < 5; i++ ) { |
This file contains 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 <stdio.h> | |
#include <algorithm> | |
using namespace std; | |
class Student { | |
public: | |
char name; | |
int math, eng; | |
bool operator < (const Student &s ) const { | |
if(math == s.math) |
This file contains 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
const google = require('googleapis'); | |
const analytics = google.analyticsreporting('v4'); | |
const mysql = require('mysql'); | |
require('date-utils'); | |
exports.handler = (event, context, callback) => { | |
// MySQL Setting | |
var rdsConnection = mysql.createConnection({ | |
host: '<DB Host>', |