-
Notifications
You must be signed in to change notification settings - Fork 0
/
.node_repl_history
538 lines (538 loc) · 9.57 KB
/
.node_repl_history
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
web3.eth.coinbase
web3
web3.miner.setEtherbase(web3.eth.accounts[0])
web3.miner
web3.eth.defaultAccount
web3.eth.mining
web3.eth.coinbase
web3.eth
web3.eth.accounts
web3.personal.listAccounts
web3.personal.unlockAccount('0x2ef7baadbc71bbf7b6834a19348ed95889961a63', 'Elizabeth1283344', 15000)
web3.personal.listAccounts
web3.personal
web3.eth.accounts
web3.eth.syncing
web3.eth
web3.eth.blockNumber
web3.eth.syncing
web3.eth.getBlock(3125966)
web3.eth.getBlock(3125938)
web3.eth.getBlock(3125602)
web3.eth
web3.eth.blockNumber
web3.eth.getBalance('0x2ef7baadbc71bbf7b6834a19348ed95889961a63')
web3.eth.accounts
web3.eth.getAccounts()
web3.eth.getAccounts
web3.eth
web3.eth.getBalance()
web3.eth.getBalance
web3.eth.blockNumber
web3.eth
web3.net
web3.eth
web3.eth.
web3.eth.blockNumber
web3.eth.filter('latest').watch(function() { console.log(web3.eth.getBalance(coinbase).toNumber(); });
document.getElementById("diff").innerText = 'diff: ' + (currentBalance - originalBalance);
document.getElementById("current").innerText = 'current: ' + currentBalance;
var currentBalance = web3.eth.getBalance(coinbase).toNumber();
web3.eth.filter('latest').watch(function() {
web3.eth
web3.eth.getBlock(3123839)
web3.eth.getBlock(3123777).transactions.length
web3.eth.getBlock(3123777)
web3.eth.getBlock(3123778)
web3.eth.getBlock(3123777)
web3.eth.getBlock(3123776)
web3.eth.getBlock(3123775)
web3.eth.getBlock(3123774)
web3.eth.getBlock(3123773)
web3.eth.getBlock(3123772)
web3.eth.getBlock(3123771)
web3.eth.getBlock(3123776)
web3.eth.blockNumber
web3.eth.currentBlock
web3.net.peerCount
web3.eth.coinbase
web3.eth.gasPrice
web3.eth.defaultBlock
web3.eth.defaultAccount
web3.eth.getBlock(3123528)
web3.eth.getBlock(3123527)
web3.eth.accounts
web3.net.listening
web3.eth
web3.net.listening
web3.eth.accounts
web3.net.listening
web3.eth.accounts
web3.eth.syncing
web3.eth.accounts
web3.eth.syncing
web3.eth.accounts
web3.eth.defaultAccount
web3.eth.defaultBlock
web3.eth.gasPrice
web3.net.listening
web3.eth.getBlock(2678490)
web3.eth.getBlock(2678469)
web3.eth.getBlock(3118320)
web3.eth.getBlock(3118322)
web3.eth.getBlock(3118323)
web3.eth.gasPrice
try { web3.net.listening } catch(e) { console.log('not connected') }
web3.net
web3.net.listening
web3.eth.gasPrice
web3.eth.coinbase
web3.eth.coinbase = '0x0063b45139bdb3e44c0bd58479b6ab7556f1efd0';
web3.eth.coinbase
web3.eth.defaultBlock
web3.eth.defaultAccount
web3.eth.defaultAccount = '0x0063b45139bdb3e44c0bd58479b6ab7556f1efd0';
web3.eth.accounts
web3.eth.defaultAccount
web3.net.peerCount
web3.eth.getTransactionCount
web3.eth.gasPrice
web3.eth.hashrate
web3.eth.mining
web3.eth.coinbase
web3.eth.syncing
web3.net
web3.net.peerCount
var MyContract = web3.eth.contract(abi);
web3.eth.syncing
web3.eth.defaultBlock;
web3.eth.defaultBlock
web3.eth.getUncle(500, 0);
web3.eth.getBlock(3150);
web3.eth.getBalance('0063b45139bdb3e44c0bd58479b6ab7556f1efd0')
web3.eth.getBalance('0x0063b45139bdb3e44c0bd58479b6ab7556f1efd0')
web3.eth.blockNumber
web3.eth.mining
web3.eth.accounts
web3.eth.getBlockNumber((x) => { console.log(x)})
web3.eth.getBlockNumber()
web3.eth.getBlockNumber
web3.eth.blockNumber
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
Web3 = require("web3")
262144 / 16384
node
2097152 / 16384
1048576 / 16384
16384 - 9862
255622 - 9862
255622 % 16384
255622 / 16384
1371249 / 16384
1371249 % 16384
x
let x = new Date(1484192143616);
x
let x = new Date(1484191543588);
Math.floor(0 / 100 * 100)
Math.floor(0 / 100)
0 / 100
quit
exit
500/29.5729
_.range(114.00, 115.22, 0.1)
_.range(114.00, 115.22, 0.05)
_.range(114.00, 115.22, 0.01)
const _ = require('lodash');
exit
-5/0
5/0
uuid = require('node-uuid)
Math.log(5)
log(5)
.exit
exit
quit
3%9
6%3
3%3
9%3
1 & 3
2 % 5
5 % 5
Math.sqrt(33)
Math.sqrt(3)
3 ^ 3 ^ 5 ^ 7
Math.pow(Math.pow(10,10),6)
1 ^ 1 ^ 1 ^ 2
Math.pow(50,4)
8/3
25*80/100
23/25*100
13*6/3
300-180
300-90
3600/12
360*10
54/2
/2
18*3
36/2
24/2
8*3
16/4
9+7
3*3
9 - 6
"dsNvn(Pos\o;l\md:)" == "dsNvn(Pos\e;l\md:)"
";sapr){314JM\@~mm" == ";sapr){314JM\@~mm"
"\Ivnrllrvopee~f.4'wr" == "\Ivnrllrvopee~f.4'wr"
"CDBI98QEy39o;@|IP" == "CDBI98QEy39o;@|IP"
"f&y349hwe[nfl';SD,\M" == "f&y349hwe[nfl';SD,\M"
35+3
+3
13+15+3+3+1
11-8
"ladnl:vdlne,842tybqi\m" == "ladnl:vdlne;842tybqi\m"
"oaejo[v,5./Av?cva;VS'" == "oaejo[v,5./Av?cva;VS'"
"[aepv5[.[3.q3#[kca;fh'" == "[aepv5[.[3.q3#[kca;fh'"
"zk;rgkggr'lz#g#[[pr[s5o;" == "zk;rgkggr'lz#g#[[pr[s5o;"
"\kjfo5;gm\"va'a'c,'\fz" == "\kjfo5;gm\"va'a'c,'\fz"
"\kjfo5;gm"va'a'c,'\fz" == "\kjfo5;gm"va'a'c,'\fz"
"'z;agle5pao5[,zd,pE;" == "'z;agle5pao5[,zd,pE;"
17*6
13-7
11-7
33/3
/3
28+5
7*4
28/3
/3
7*4
33*3
28+5
7*4
5*360/12
18/3
5000/80
/80
50*100
Math.log(100000)
log(100000)
9 / 10
1 / 10
1 * 10
11 % 10
11/10
29-3
-3
81-52
28-3
80-52
300*300*40
Math.pow(0,2)+Math.pow(3,2)
Math.pow(1,2)+Math.pow(1,2)
Math.pow(1,2)+Math.pow(3,2)
Math.pow(1,2)+Math.pow(2,2)
Math.sqrt(Math.pow(1,2)+Math.pow(2,2))
Math.sqrt(Math.pow(1,2)+Math.pow(1,2))
4096*4096
Math.cos(45)
Math.sqrt(5)*8
Math.sqrt(5)
Math.sqrt(Math.pow(0,2)+Math.pow(2,2))
Math.sqrt(Math.pow(0,2)+Math.pow(2,2))*2
Math.sqrt(Math.pow(2,2)+Math.pow(1,2))*8
Math.sqrt(Math.pow(2,2)+Math.pow(1,2))
Math.sqrt(Mat.pow(2,2)+Math.pow(1,2))
256-253
512-496
506/2
22*23
Math.pow(0,2)
4/5
4.5
.exit
x[5] == null
x[1] == null
x
var x = new Array(10)
var x = new Array[6]
x
var x = [6]
.exit
1/2
.exit
0.95*1.118
10*14
305781+815771+550800
.exit
300*180
285*285
.exit
'4' < 'a'
'4' < 'A'
'4' < '5'
'A' < 'B'
A < B
.quit
256/2
Math.pow(.95,0)
Math.pow(.95,2)
Math.pow(1.95,5)
Math.pow(1.95,2)
Math.pow(1.95,1)
Math.pow(.95,1)
Math.floor(0.9)
320+525
8*40
75*7
Math.sqrt(Math.pow(3,2) + Math.pow(4,2))
Math.pow(2,2)
Math.log(3,12)
Math.log(3,10)
Math.log(3,2)
Math.log(3)
Math.log(2)
Math.log(1)
math.log(1)
log(1)
)
log(1
(1*6)+(1*9)+(1*7)
(1*5)+(1*8)+(1*5)
(1*4)+(1*7)+(1*4)
(2*6)+(3*9)+(4*7)
(2*5)+(3*8)+(4*5)
(2*4)+(3*7)+(4*4)
(1*6)+(2*9)+(3*7)
(1*5)+(2*8)+(3*5)
(1*4)+(2*7)+(3*4)
(4*1)+(2*7)
(2*5)+(3*8)
(2*4)+(3*7)
(1*5)+(2*8)
(4*1)+(5*2)
2 % 5
5 % 2
1 % 5
0 % 8
0 % 5
1000*1000
1000*1000*6
.quit
x/2
x = 1326000000000+1325000000000
.exit
int y = x
x
x/2
x
x = 5
1325338338022-1325338017610
.quit
y
var y = x/1000
x
var x = (160*320412)+(320*441201)+(96*474123)+(312*234123)+(147*623132)
(160*320412)+(320*441201)+(96*474123)+(312*234123)+(147*623132)
.quit
x
x.push(1)
x
x.shift()
x = [1,2,3,4]
x
x = x.push();
x
x.push();
x
var x = [1,2,3,4]
.exit
Math.sqrt(l);
c = Math.ceil(Math.sqrt(l));
r
r = Math.floor(Math.sqrt(l));
l
var l = s.length
s
var s = 'chillout'
.exit
s = s.replace(' ','');
s
var s = 'have a nice day'
.exit
console.log(s.charAt(x*c))
for (x = 0; x < r; x++)
s
console.log(s.charAt(x*r))
for (x = 0; x < c; x++)
s
console.log(s.charAt(x+r))
for (x = 0; x < c; x++)
console.log(s.indexOf(r))
for (x = 0; x < c; x++)
s
a
var a = (function(){ var i=r, arr=[]; while(i--) arr.push([]); return arr })();
c
var c = Math.ceil(l);
r
var r = Math.floor(l);
l
var l = Math.sqrt(s.length);
l
var l = Math.sqrt(s)
s.length
s
var s = 'haveaniceday'
x = Math.abs(x);
x = math.abs(x);
x
var x = -5
.exit
a
a = a.map(function(x){return false});
a
a[1] = true
a = a.map(function(x){return false});
a
var a = Array.apply(null, new Array(3)).map(function(){return false});
a
a = a.forEach(function(x){return false});
a
a.forEach(function(x){return false});
a
a[1] = true
a
var a = Array.apply(null, new Array(3)).map(function(){return false});
a
var a = Array.apply(null, new Array(numeroPerguntas)).map(function(){return false});
add a comment
2,858619
Sampath Liyanage
answered Nov 20 '14 at 13:19
shareimprove this answer
► Run code snippet
alert(a);
var a = Array.apply(null, new Array(numeroPerguntas)).map(function(){return false});
var numeroPerguntas = 5;
b_ar
var b_ar = Array.apply(null, new Array(6).map(function(){return false;}));
var foo = [].map(x[])
x
xx
var x = [1,2];
.exit
x
var x = Array.apply(null,Array(10)).map(function (a,b) {return b;});
x
var x = Array(10).map(function (a,b) {return b;});
x
var x = Array(10).map(function (x) {return x;});
x
var x = Array(10).forEach(function (x) {return x;});
u.range(10)
var u = require('underscore');
var u = require('underscore.js');
var x = Array.map(function (n){return n;},range(1,10));
var x = array.map(function (n){return n;},range(1,10));
var x = array_map(function (n){return n;},range(1,10));
array_map(function (n){return n;},range(1,10));
var x = range(1,10)
x
var x = [1.10]
x
var x = [1,10]
var x = [1..10]
[1..11].Array(x+1).join('#');
d
s
11.Array(x_1).join('#');
.exit
a_ar
b_ar.forEach(function (x) {if (a_ar.indexOf(x) > -1) a_ar.splice(a_ar.indexOf(x),1)});
test3
var test3 = b_ar.indexOf(6)
test2
var test2 = b_ar.indexOf(5)
var test2 = b_ar.indexof(5)
test1
var test1 = b_ar.indexOf(2)
b_ar
var b_ar = [0,1,2,2,3,3,4,4,4,5,5,5,5,5]
a_ar
var a_ar = [0,1,2,2,3,3,3,4,4,4,4,5,5,5,5,5];
var a_ar = [0,1,2,2,3,3,3,4,4,4,4,5,5,5,5,5]
.exit
Math.abs(-4)
math.abs(-4)
.exit
_
3+4
.exit
console.log("#");
for (var y = 0; y < x; y++)
for (var x = 0; x < 7; x++)
console.log(num);
for (var num = 0; num < 12; num += 2)
NaN == Nan;
NaN == false;
NaN = false
0 == false;
Array.apply(null, {length: N}).map(Function.call, Number*2)
Array.apply(null, {length: N}).map(Number.call, Number*2)
var N = 10
.exit
exit()
var n = 10;
confirm("shall we, then?");
console.log(Math.max(2,4));
console.log(math.max(2,4));
console.log(Math.max(2,4));
alert("Good Morning!");
alert("Good Morning!);
.exit
requires math
sqrt(2)
quit
:quit
:q
5/2
45-12
quit
Integer b = 5;
Integer b = 5
npm install -g learnyounode
exit
CC
C
c
cc
process
global.a
window
a
var a = 1;
requires math
sqrt(2)
quit
:quit
:q
5/2
45-12
quit
Integer b = 5;
Integer b = 5
npm install -g learnyounode
exit
CC
C
c
cc
process
global.a
window
a
var a = 1;