From 8190e31a9c61b18435ea9479242cb217e6d468e3 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:15:41 +1200 Subject: [PATCH 1/7] add access function --- script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script.js b/script.js index e1df4fb..a3101a3 100644 --- a/script.js +++ b/script.js @@ -131,3 +131,8 @@ const reshape = (arg) => { document.editor.textbox.value+="\n" + variable.value + "_1 = tf." + arg + "(" + variable.value + ", [" + batch.value + ", " + row.value + keep + "])"; } } + +// Select +const access = () => { + +} From ff16ba17574fb092c8ed62472cd34f1cd3527f17 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:19:13 +1200 Subject: [PATCH 2/7] add if statement for variable.value --- script.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/script.js b/script.js index a3101a3..556cfc6 100644 --- a/script.js +++ b/script.js @@ -7,9 +7,9 @@ let rank = document.getElementById("rank"); const tensor = stat => { if (variable.value === "") { - return alert("Please enter a variable name in the 'variable' field, in the 'Create Tensor' section"); + return alert("Please enter a variable name in the 'variable' field, in the 'Create Tensor' section."); } else if (value.value === "") { - return alert("Please enter a comma separated list of integers, floats, or Booleans in the 'value' field, in the 'Create Tensor' section"); + return alert("Please enter a comma separated list of integers, floats, or Booleans in the 'value' field, in the 'Create Tensor' section."); } else { let keepOne = ""; let keepTwo = ""; @@ -26,7 +26,7 @@ const tensor = stat => { let average = array.length / degree; if (parseInt(average) - average !== 0) { - return alert("Please enter more values in the 'value' field for the selected 'rank' in the 'Create Tensor' section"); + return alert("Please enter more values in the 'value' field for the selected 'rank' in the 'Create Tensor' section."); } let nest = []; @@ -52,7 +52,7 @@ const tensor = stat => { string = nest.slice(0, -4).replace(/\s*,\s*/, ", "); } } else { - return alert("Please enter more values in the 'value' field for the selected 'rank' in the 'Create Tensor' section"); + return alert("Please enter more values in the 'value' field for the selected 'rank' in the 'Create Tensor' section."); } } } @@ -69,7 +69,7 @@ const tensor = stat => { } else if (array.length > 0) { if (array.every(el => Number(el))) { } else { - return alert("Please enter a number for the 'value' field in the 'Create Tensor' section"); + return alert("Please enter a number for the 'value' field in the 'Create Tensor' section."); } } } @@ -81,7 +81,7 @@ const tensor = stat => { // Data at a glance const data = (stat) => { if (variable.value === "") { - return alert("Please enter a variable name in the 'Create Tensor' section"); + return alert("Please enter a variable name in the 'Create Tensor' section."); } else { document.editor.textbox.value+= '\ntf.' + stat.slice(0, -2) + '(' + document.editor.variable.value + ')'; } @@ -89,7 +89,7 @@ const data = (stat) => { const shape = (stat) => { if (variable.value === "") { - return alert("Please enter a variable name in the 'Load data' section"); + return alert("Please enter a variable name in the 'Create Tensor' section."); } else { document.editor.textbox.value+= '\n' + document.editor.variable.value + '.' + stat; } @@ -102,7 +102,7 @@ let column = document.getElementById("column"); const onesZerosFunc = (arg) => { if (variable.value === "") { - return alert("Please enter a variable name in the 'Create Tensor' section"); + return alert("Please enter a variable name in the 'Create Tensor' section."); } else if (batch.value === "") { return alert("Please enter a number in the 'batch' field in the 'Tensor functions' section."); } else if (row.value === "") { @@ -116,7 +116,7 @@ const onesZerosFunc = (arg) => { const reshape = (arg) => { if (variable.value === "") { - return alert("Please enter a variable name in the 'Create Tensor' section"); + return alert("Please enter a variable name in the 'Create Tensor' section."); } else if (batch.value === "") { return alert("Please enter a number in the 'batch' field in the 'Tensor functions' section."); } else if (row.value === "") { @@ -134,5 +134,7 @@ const reshape = (arg) => { // Select const access = () => { - + if (variable.value === "") { + return alert("Please enter a variable name in the 'Create Tensor' section."); + } } From 85addd4e6a1733f6a123af53202a47dc1a81224f Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:20:35 +1200 Subject: [PATCH 3/7] add else if statement for row.value --- script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script.js b/script.js index 556cfc6..dbdc313 100644 --- a/script.js +++ b/script.js @@ -136,5 +136,7 @@ const reshape = (arg) => { const access = () => { if (variable.value === "") { return alert("Please enter a variable name in the 'Create Tensor' section."); + } else if (row.value === "") { + return alert("Please enter a number in the 'row' field in the 'Tensor functions' section."); } } From 45f5eea8d72b2ec04b4f3fd46cbec6def6236017 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:23:16 +1200 Subject: [PATCH 4/7] add else statement --- script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script.js b/script.js index dbdc313..b852fb2 100644 --- a/script.js +++ b/script.js @@ -138,5 +138,7 @@ const access = () => { return alert("Please enter a variable name in the 'Create Tensor' section."); } else if (row.value === "") { return alert("Please enter a number in the 'row' field in the 'Tensor functions' section."); + } else { + } } From f1d4c5a9d77493a833531d3a7f6cd648e44e2f74 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:24:18 +1200 Subject: [PATCH 5/7] add keep variable --- script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script.js b/script.js index b852fb2..f723d87 100644 --- a/script.js +++ b/script.js @@ -139,6 +139,7 @@ const access = () => { } else if (row.value === "") { return alert("Please enter a number in the 'row' field in the 'Tensor functions' section."); } else { + let keep = ""; } } From ea8c3c46b16e2e4b1c38114ba32f68a90349f707 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:26:27 +1200 Subject: [PATCH 6/7] add if statement for column.value --- script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script.js b/script.js index f723d87..1e3e413 100644 --- a/script.js +++ b/script.js @@ -141,5 +141,9 @@ const access = () => { } else { let keep = ""; + if (column.value) { + + } + } } From 9aac48d75ed98b3906a04661ee2d46c712fb8d97 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:27:50 +1200 Subject: [PATCH 7/7] assign value to keep variable --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 1e3e413..3273e60 100644 --- a/script.js +++ b/script.js @@ -142,7 +142,7 @@ const access = () => { let keep = ""; if (column.value) { - + keep = ", " + column.value; } }