Removed some old utils, added readme to utils, some new test data

This commit is contained in:
MrFry 2020-03-24 10:25:33 +01:00
parent 6e83e5051c
commit 105d1ee8be
9 changed files with 333 additions and 735 deletions

View file

@ -96,13 +96,18 @@ function PrintDB (r, olds) {
if (i % 4 === 0) { line += '.' } else { line += ' ' }
}
let tolog = true
if (olds && olds.length > 0) {
// TODO: check if correct row! should be now, but well...
if (olds[i] < 10) { line += ' ' }
if (olds[i] < 100) { line += ' ' }
if (r.Subjects[i].length !== olds[i]) {
// TODO: check if correct row! should be now, but well...
if (olds[i] < 10) { line += ' ' }
if (olds[i] < 100) { line += ' ' }
line += olds[i]
line += ' -> '
line += olds[i]
line += ' -> '
} else {
tolog = false
}
}
if (r.Subjects[i].length < 10) { line += ' ' }
@ -113,7 +118,9 @@ function PrintDB (r, olds) {
line += ' db'
console.log(line)
if (tolog) {
console.log(line)
}
}
console.log('Total questions: ' + qcount)
@ -165,7 +172,7 @@ function RemoveDuplFromSubject (subj) {
for (var i = 0; i < cp.length; i++) {
var j = 0
// Only removes 100% match!
while (j < subj.length && cp[i].Compare(subj.Questions[j]) !== 100) {
while (j < subj.length && cp[i].Compare(subj.Questions[j]).avg <= 99) {
j++
}
if (j < subj.length) {