-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.js
executable file
·63 lines (57 loc) · 1.67 KB
/
run.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
'use strict';
(() => {
const _ = require('lodash');
// var email = "[email protected]";
//
// for(var i=0; i<500;i++) {
// var object = {};
// object['email'] = email + "" + i;
// object['username'] = "Test Username";
// object['fullname'] = "Test Fullname";
// object['password'] = "Test@123";
// object['profilePhoto'] = "";
// object['communityCount'] = 0;
// object['biolosophy'] = "Test for biolosophy";
// object['location'] = "India";
//
// db.users_copy.insert(object);
// }
//---------------------------------------------------------------------------
// var usersMappedInfo = [];
// db.users_copy.find({}).forEach(function(user){
// var prepare = {};
// prepare['email'] = user['email'];
// prepare['username'] = user['username'];
// prepare['fullname'] = user['fullname'];
// prepare['profilePhoto'] = user['profilePhoto'];
// prepare['communityCount'] = user['communityCount'];
// prepare['biolosophy'] = user['biolosophy'];
// prepare['location'] = user['location'];
// prepare['userId'] = user['_id'];
//
// usersMappedInfo.push(prepare);
// })
// db.usersmapped_copy.insertMany(usersMappedInfo);
})();
// function Trempoline_With_Factorial(){
// function findFactorial(n, cb) {
// var op = rec(n, n-1, cb);
// while (op != null && typeof op === 'function') {
// op = op();
// }
// }
//
// function rec(n,k, cb) {
// if(k === 0) {
// cb(n);
// } else {
// n += k
// return rec.bind(this, n, k-1, cb);
// }
// }
//
// const findFact = 500000;
// findFactorial(findFact, function(vv) {
// console.log("VV :: " + vv);
// });
// }