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
#!/usr/bin/env node | |
var http = require('http'); | |
var instanceId = "YOUR_INSTANCE_ID_HERE"; // TODO: Replace it with your gateway instance ID here | |
var clientId = "YOUR_CLIENT_ID_HERE"; // TODO: Replace it with your Forever Green client ID here | |
var clientSecret = "YOUR_CLIENT_SECRET_HERE"; // TODO: Replace it with your Forever Green client secret here | |
var jsonPayload = JSON.stringify({ | |
number: "12025550108", // TODO: Specify the recipient's number here. NOT the gateway number |
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
//inspired by https://gist.github.com/oshliaer/70e04a67f1f5fd96a708 | |
var SHEET_ID = 'YOUR_SHEET_ID'; | |
var CREDIT_LIMIT = 500000; //YOUR GRAB LIMIT | |
//gmail before and after filter, read: https://support.google.com/mail/answer/7190 | |
var after_date = '2017/09/25'; //this date is included in filter result | |
var before_date = '2017/10/25'; //this date is excluded in filter result | |
function getEmails(query,sheet){ |
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 masalah2 = [ | |
[1, 2, 3, 4, 5], | |
[6, 7, 8, 9, 10], | |
[11, 12, 13, 14, 15], | |
[16, 17, 18, 19, 20], | |
[21, 22, 23, 24, 25] | |
] | |
var hasil = [] |
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 array_masalah = [ | |
[1, 2, 3, 4], | |
[5, 6, 7, 8], | |
[9, 10, 11, 12], | |
[13, 14, 15, 16] | |
] | |
function spriral(input) { | |
var hasil = [] | |
for (var i = 0; i < input[0].length; 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
function solvePola(str) { | |
//write your code here | |
var tmp = str.split(" ") | |
var arr1 = tmp[0].split("") | |
var arr2 = Number(str.match(/\d{3} /g)[0].trim()) | |
var arr3 = tmp[tmp.length-1].split("") | |
var hasil = [] |
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
function deretBilangan(input) { | |
var arr = [] | |
for (var i = 1; i <= input; i++) { | |
arr.push(i * 3) | |
} | |
for (var i = 0; i < arr.length; i++) { | |
if (arr[i] % 5 == 0 && arr[i] % 6 == 0) { | |
arr[i] = "KASKUS" | |
} else if (arr[i] % 5 == 0) { | |
arr[i] = "KAS" |
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 request = require("request"), | |
cheerio = require("cheerio"), | |
url = "https://www.google.com/search?q=data+mining", | |
corpus = {}, | |
totalResults = 0, | |
resultsDownloaded = 0; | |
function callback () { | |
resultsDownloaded++; |
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
"use strict" | |
class hacktiv{ | |
constructor(siswa){ | |
this.siswa = siswa; | |
} | |
pasangan(){ | |
var peserta = []; | |
var nama = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; |
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 readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
var peserta = []; | |
function pertanyaan(x){ |
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
function hacktiv(x){ | |
var peserta = []; | |
var nama = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; | |
for (var i = 0; i < x; i++) { | |
peserta.push(nama[i]) | |
} | |
var hasil = []; | |
for (var j = 0; j < peserta.length; j++) { | |
for (var i = 1; i < peserta.length; i++) { | |
if(peserta[j]!==peserta[i]){ |