if(0 < 1){
let div = document.createElement('div');
div.innerHTML="";
if(reg.test(value) == false) {
if(..){
var nextTab = resultNumberActiveTab + 1;
}
else if(...){
var nextTab = resultNumberActiveTab - 1;
}
const projects = Array.from(
{ length: 10 },
(_, i) => ({title: `proj_${i}`, id: i})
);
const runs = Array.from(
{ length: 100 },
(_, i) => ({title: `task_${i}`, id: i, pid: randomInteger(0, 10)})
);
const data = projects.map(proj => ({
title: proj.title,
tasks: runs.filter(t => t.pid === proj.id)
}));
console.log(data);
// utils
function randomInteger(min, max) {
let rand = min + Math.random() * (max + 1 - min);
return Math.floor(rand);
}
function selectionSort(arr) {
let sortArr = [];
while (arr.length !== 0) {
let small = findSmallEl(arr);
console.log("small:" + small);
sortArr.push(arr[small]);
console.log("sortArr:" + sortArr);
arr.splice(small, 1);
console.log("arr:" + arr, "arr.length" + arr.length);
}
return sortArr;
}
let message = new Uint8Array([
0x01,
21,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
target & 0xFF,
target >> 8 & 0xFF
]);
360 / a = l / s
, гдеa
- угол сектораl
- длина окружностиs
- длина сектораfunction dbget(table, ind, key) {
return new Promise((resolve) => {
let openRequest = indexedDB.open('FV', 6);
openRequest.onsuccess = function() {
let db = openRequest.result;
let transaction = db.transaction(table, 'readonly');
let labs = transaction.objectStore(table);
let index = labs.index(ind);
let request = index.getAll(key);
request.onsuccess = function() {
let res = request.result;
resolve(res);
};
};
});
}
gl_FragColor = vec4(color, 0.4 * start);
gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);