Skip to content

Instantly share code, notes, and snippets.

View irrationalRock's full-sized avatar

Matt Q irrationalRock

View GitHub Profile
@irrationalRock
irrationalRock / reversetest.js
Created March 11, 2018 23:03
Some tests of reverse
var arrayInt1 = [1,2,3,4,5];
var arrayInt2 = arrayInt1.reverse();
var arrayLength = arrayInt1.length;
var arrayToString = arrayInt1.toString();
var arrayString1 = ["A","B","C","E","F"];
var arrayString2 = arrayString1.reverse();
var arrayDouble1 = [1.0,2.0,3.0,4.0,5.0];
var arrayDouble2 = arrayDouble1.reverse();
//CHECK#1
var x = [];
var reverse = x.reverse();
assert.sameValue(x,reverse,"#1: x = " + x + " ; x.reverse() = " + reverse );
//CHECK#2
x = [];
x[0] = 1;
var reverse = x.reverse();
@irrationalRock
irrationalRock / debug.js
Created March 20, 2018 18:28
Debug information
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'debug' ]
2 info using npm@5.6.0
3 info using node@v9.4.0
4 verbose run-script [ 'predebug', 'debug', 'postdebug' ]
5 info lifecycle bridge-troll@1.0.0~predebug: bridge-troll@1.0.0
6 info lifecycle bridge-troll@1.0.0~debug: bridge-troll@1.0.0
@irrationalRock
irrationalRock / menu.js
Created March 24, 2018 18:45
Removed code
/*
{
label: locale.translation('toolbars'),
visible: false
submenu: [
{label: 'Favorites Bar', accelerator: 'Alt+CmdOrCtrl+B'},
{label: 'Tab Bar'},
{label: 'Address Bar', accelerator: 'Alt+CmdOrCtrl+A'},
{label: 'Tab Previews', accelerator: 'Alt+CmdOrCtrl+P'}
]
@irrationalRock
irrationalRock / Error.js
Created March 24, 2018 18:47
A lot of errors
{ Error: ENOENT: no such file or directory, scandir 'C:\Users\mquan\AppData\Local\Temp\brave-test\1520270086833274'
at Object.fs.readdirSync (fs.js:904:18)
at rmDir (E:/OSD600 Lab 2/browser-laptop/test/lib/brave.js:34:20)
at Context.cleanup (E:/OSD600 Lab 2/browser-laptop/test/lib/brave.js:1192:26)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
errno: -4058,
code: 'ENOENT',
syscall: 'scandir',
@irrationalRock
irrationalRock / tests.txt
Created March 31, 2018 20:04
some tests for lab 6
"dog"
Chrome: Good
Brave: Good
Edge: Good
IE: Good
" dog "
Chrome: Good
Brave: Good
Edge: Good
"dog"
" dog "
"dog cat"
" dog cat "
"https://www.google.ca/search?q=dog"
" https://www.google.ca/search?q=dog "
"https://www.google.ca/search?q=dog cat"
" https://www.google.ca/search?q=dog cat "
-O0
Real: 27m45.129s
User: 27m42.538s
Sys: 0m1.039s
-O1
Real: 8m53.567
User: 8m52.045s
Sys: 0m0.839s
@irrationalRock
irrationalRock / if.js
Created April 7, 2018 18:48
if in brave
//if (case1Reg.test(str)) {
// return true
//}
//if (case2Reg.test(str) || !case3Reg.test(str) ||
// (scheme === undefined && /\s/g.test(str))) {
// return true
//}
@irrationalRock
irrationalRock / stage2.txt
Created April 9, 2018 00:59
stage 2 data
*Aarchie with 180mb file
-Just with -O2:
real 2m51.523s
user 2m51.247s
Number of options tested: 1284
Real best time: 2m50.799s (CMAKE_CXX_FLAGS_DEBUG:STRING= -O2 -ftree-loop-distribute-patterns -floop-interchange -ftree-slp-vectorize -fipa-cp-clone)
User best time: 2m50.367s (CMAKE_CXX_FLAGS_DEBUG:STRING= -O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fvect-cost-model -ftree-partial-pre)
**************************************************************************************************************************