Definitely not comprehensive. This is meant to be a basic memory aid with links to get more details. I'll add to it over time.
$ npm install mongoose --save
const mongoose = require('mongoose');
(() => { | |
let count = 0; | |
function getAllButtons() { | |
return document.querySelectorAll('button.is-following') || []; | |
} | |
async function unfollowAll() { | |
const buttons = getAllButtons(); | |
for (let button of buttons) { | |
count = count + 1; |
/* COMMAND LINE */ | |
mongod & // start mongo server on port 27017 by default | |
mongo mydb // launch mongo shell using the specified database | |
// importing & exporting | |
mongoimport -d mydb -c mycollection --jsonArray --file input.json | |
mongoimport -d mydb -c mycollection --headerline --type csv --file input.csv | |
mongoexport -d mydb -c mycollection --out output.json | |
/* MONGO SHELL */ |
// NOTE: if you save this into a file on your local machine you can run these using nodeJS on your terminal using this command: | |
// node [filename].js | |
// JAVASCRIPT CODING CHALLENGE 1 | |
const people = [ | |
{ | |
name: "Arisa", | |
department: "BP", | |
gender: "F", |
struct Person { | |
struct Identifier: RawRepresentable, Hashable, Equatable { | |
let rawValue: String | |
init(rawValue: String) { self.rawValue = rawValue } | |
} | |
let id: Identifier | |
var name: String | |
var age: Int? | |
} |
// Indigo Entertainment Exam for the 1000 size array | |
int[] _theArray = new int[1000]; | |
for (int i = 1; i < 1000; i++) | |
{ | |
int result; | |
bool divisibleBy2 = (i % 2) == 0; | |
bool divisibleBy3 = (i % 3) == 0; | |
if (divisibleBy2) |