mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Removed some old utils, added readme to utils, some new test data
This commit is contained in:
parent
6e83e5051c
commit
105d1ee8be
9 changed files with 333 additions and 735 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue