Facing issues with speaker audio going into mic for an Interruptible Voice Bot in Chrome

I am making a voice bot, which can be interrupted while speaking. I am using WebAudio APIs to get the float32 array of samples, to calculate average amplitude. If this crosses a certain threshold, then code assumes someone is speaking.

Now, when i run this on laptop speakers, the average amplitude i calculate in Javascript WebAudio APIs gets the speaker audio’s output. How do i ensure the speaker output doesnt go into the mic, just like Google Meet ?
I tried echoCancellation : {ideal: true}, and noiseSupression : {ideal: true} , but they dont help much.

Please let me know if more details are needed. i will be happy to provide.

Remove series markers from series in tradingview charts using lightweight charting library

Hi i am trying to draw a chart and markers on a series using trading view lightweight charting library. Below is my code how am i am adding a marker on a series.

(function anonymous(instance, properties, context

) {

let seriesID = properties.seriesid;
let markerID = properties.markerid;
let duplicate = false;

if(instance.data.mainMarkers.filter(kkk => kkk.markerId === markerID).length>0){
    duplicate =true;
}
instance.data.allPaneData.forEach( a=>{
    if(a.name === seriesID){
        if(a.markersArr.filter(aaa => aaa.markerId === markerID).length>0){
            duplicate = true;
        } 
    }
});
if(duplicate === false){
    function formateTime(timestemp){
        let date = new Date(timestemp);
        return{
            year: date.getFullYear(),
            month: date.getMonth()+1,
            day: date.getDate()
        }
    }
    let markerObj = {
        time: formateTime(properties.time),
        position: properties.position,
        color: properties.color,
        shape: properties.shape,
        text: properties.marker_text,
        size: properties.size,
        markerId : markerID,
        //marker_obj : null,
    }

    function setObject(obj,series){
        series.markerObject = obj;
    }

    if (seriesID !== null) {
        instance.data.allPaneData.filter(item => item.name === seriesID).forEach(item2 => {
            item2.markersArr.push(markerObj);
            let seriesmarker = LightweightCharts.createSeriesMarkers(item2.series,item2.markersArr);
            if(item2.markerObject == null){
                setObject(seriesmarker,item2);
            }
            //item2.markerObject.setMarkers(item2.markersArr);
        });

    } else {

        instance.data.mainMarkers.push(markerObj);
        let mainMarker=LightweightCharts.createSeriesMarkers(instance.data.allSeriesData[0].series,instance.data.mainMarkers);
        instance.data.markerObject = mainMarker
        //instance.data.markerObject.setMarkers(instance.data.mainMarkers);
    }
}

And below is my code to remove marker from the series

(function anonymous(instance, properties, context

) {

let seriesID = properties.seriesid; 
let markerID = properties.markerid;
let newarr=[];
if (seriesID == null) {
    instance.data.mainMarkers.forEach((val, index) => {
        if (val.markerId === markerID) {
            instance.data.mainMarkers.splice(index, 1); 
            
        }
    });
  instance.data.markerObject.setMarkers(instance.data.mainMarkers);  
}else {

    instance.data.allPaneData.forEach(chartObject => {
        if (chartObject.name === seriesID) {
            chartObject.markersArr.forEach((val, index) => {
                if (val.markerId === markerID) { 
                    chartObject.markersArr.splice(index, 1); 
                }
                chartObject.markerObject.setMarkers(chartObject.markersArr);
            })

        }

    });
}

})

now the problem is it only removes 1 marker from the array even if i pass an empty array it does nothing.

Scroll moves to the top on redraw of form builder in form.io library

Form.io Angular1.x library

I am using the library with Angular (1.x). I have some special situations where I will require your guidelines.

Case 1
I need to attached the element_id property in the component JSON before it gets render in the form. This element_id I get after I do the API call.

Currently, we are getting the addComponent event after the component gets add to the form due which I need to redraw the builder form in order to update the json of the form builder. I need to avoid this reload because due to this reload the scroll of the screen goes to the top.

Case 2
I have couple of component like Panel and Data Grid that I add to form without drag and drop. This components are added when user clicks on the button but in order to load them to the form I need to re-initialise the form again due to which the scroll of the screen goes to top which is not the good user friendly behaviour.

Case 3
For component sequence we are managing the order_no property so when user change the element position using drag and drop then we are calling the API with updated order_no but in order to update the same in form builder json we need to re-initialise the form builder and that move the scrolls to the top of the screen.

case 4
We have skipped the confirm box of form io open for the remove component and loads our modal with message. The problem is we can only load the model after the removeComponent event is triggered and till this moment the element is removed from the form builder json. We need to configure in such a way that the component should not be removed from the json until user gives the confirmation to the model.

Also when we re-initialise the form builder the side panel of component list is also re-initialise the scroll position as well as the search text are reset.

Looking forward to hear form you for the solution.

Refresh dynamic select box in JavaScript with Bootstrap 5

Using bootstrap 5, I have the following html:

<select class="form-select">
<option hidden="hidden">17 kW</option>
<option>18 kW</option>
<option>19 kW</option>
<option>20 kW</option>
<option>22 kW</option>
<option selected="selected">24 kW</option>
<option>26 kW</option>
<option>28 kW</option>
<option>30 kW</option>
<option>32 kW</option>
<option hidden="hidden">34 kW</option>
</select>

Note the two hidden options.

The first time I click the select box I get the image on the left. The next time I click the select box I get the image on the right. Using Chrome as the browser.

Bootstrap select dropdown

Is there a way in javascript or jquery to refresh the select box to ensure proper display, before the box is displayed for the first time?

Why JQuery AJAX POST sends null value?

I’m new at JQuery-AJAX. I’ve a form in index.php file. When clicking the first input(id=”d_code”) it opens a div(id=”d_codes”) which has been filled with some li tags which have text values from mysql database (table: d_code). I need to fill out next div(id=”d_names”) (display:none) without refreshing webpage with some li tags which have text values from mysql database (table: d_code) with AJAX post method under second input(id=”d_no”). Even if I get value of li in “d_names” I get an error (Undefined array key “d_no” in dno.php) in the browser. By the way, console.log(d_no); gives correct result. I search for a week but could not find a suitable answer for this problem. Tried several solutions but got nothing. What am I doing wrong? I’m not a native speaker that’s why I may have some issues with my English. I’ll try to give more details if you have any question(s).

index.php file form elements

<div class="d_code" id="d-e-m">
    <label for="d_code">D C:</label>
    <input type="text" id="d_code" name="d_code">
</div>
<?php dC($pdo); ?>

<div class="d_no" id="d-e-m">
   <label for="d_no">DNo:</label>
   <input type="text" id="d_no" name="d_no">
</div>
<?php dNo($pdo); ?>

script.js file

$("#d_codes li").click(function(){
$("#d_code").val($(this).attr("value"));

var d_no = $("#d_code").val();

console.log(d_no);

$.ajax({
  url: "includes/dno.php",
  type: "POST",
  data: {d_no:"d_no"},
  dataType: "text",
  success: function(options){
    $("#d_names").empty().append(options);
  },
  error: function(options) {
    console.log(options);
  }
});

$("#d_names").css("display","none");
});

dno.php file

<?php 

 declare (strict_types=1);

 require_once 'db.php';  

 function dNo(object $pdo){
  $d_code= $_POST["d_no"];

  $query = "SELECT d_no, d_name FROM d WHERE d_code=:d_code;";
  $stmt = $pdo->prepare($query);
  $stmt->bindParam(":d_code", $d_code);
  $stmt->execute();
  $dNA = $stmt->fetchAll(PDO::FETCH_ASSOC);

  echo '<div id="d_names">';
  echo '<ul>';
    foreach($dNA as $row){
      echo "<li value='" . htmlspecialchars($row["d_no"] . " - " . $row["d_name"]) 
    . "' name='d_no'>" . htmlspecialchars($row["d_no"] . " - " . $row["d_name"]) . " 
    </li>";       
    }
  echo '</ul>';
 echo '</div>';
 }
 ?>

Manage and consume npm packages in ASP.NET Core MVC application using Visual Studio

I installed couple of npm packages in an ASP.NET Core MVC app following instructions at one of the MS Learn’s how-to guide: Manage npm packages in Visual Studio

After setting up everything, my solution explorer and code files look as below:
Screenshot from Visual Studio

When I view the index.cshtml file in browser, the import statement in index.js (highlighted in the above screenshot) fails and the console shows below error:

Uncaught TypeError: The specifier “@azure/msal-browser” was a bare
specifier, but was not remapped to anything. Relative module
specifiers must start with “./”, “../” or “/”.

I also tried with relative paths and fully qualified .js file name with no luck (error messages are mentioned in the above screenshot, below each highlighted import statement).

Please help. What am I missing here?

Unable to set cookies in chrome in application tab

When I try to manually add cookies in google chrome in application tab I just can’t add more than one, I doubt if this one is even added. There is no extra empty row below for adding a new cookie.
What I’ve tried:

  1. When I googled, I read about chrome://flags/ and Partitioned cookies – but there is no such an option;
  2. I tried to enable all cookie related options in chrome://flags/ and it didn’t work;
  3. Thirt-party cookies are allowed in chrome settings;
  4. Tried to add cookies programmatically and got Uncaught SecurityError: Failed to set the 'cookie' property on 'Document': Access is denied for this document.;

The strange thing is that everything worked fine a few weeks ago and now I’m unable to auth on localhost and test or do smth.
Anyone has encountered this problem? Would be happy for help.

Google Docs API: Text from insertText appears all in the first cell of table — how to correctly insert text into each cell? Using React

I’m working with the Google Docs API to insert a table and then populate each cell with text. The table gets inserted correctly, but when I insert text into the cells, all the content appears squished into the first cell, like this:
my output

What I’m doing:

  1. I create the table using insertTable.
  2. Then I fetch the updated document to find the table and cell structure.
  3. I attempt to insert text into each cell using insertText.

Here’s the relevant code I’m using:

    const insertTableWithText = async () => {
  if (!docId) return;

  try {
    const doc = await gapi.client.docs.documents.get({ documentId: docId });
    const endIndex = doc.result.body.content.reduce((max, el) => {
      return el.endIndex > max ? el.endIndex : max;
    }, 1);

    const tableData = [
      ["Header 1", "Header 2"],
      ["Value 1", "Value 2"]
    ];

    await gapi.client.docs.documents.batchUpdate({
      documentId: docId,
      resource: {
        requests: [{
          insertTable: {
            rows: tableData.length,
            columns: tableData[0].length,
            location: { index: endIndex - 1 }
          }
        }]
      }
    });

    await new Promise(resolve => setTimeout(resolve, 1000));

    const updatedDoc = await gapi.client.docs.documents.get({ documentId: docId });

    let tableElement = null;
    for (let i = updatedDoc.result.body.content.length - 1; i >= 0; i--) {
      if (updatedDoc.result.body.content[i].table) {
        tableElement = updatedDoc.result.body.content[i];
        break;
      }
    }

    if (!tableElement) throw new Error("Table not found");

    const requests = [];

    tableElement.table.tableRows.forEach((row, rowIndex) => {
      row.tableCells.forEach((cell, colIndex) => {
        const paragraphIndex = cell.content[0].paragraph.elements[0].startIndex;

        requests.push({
          insertText: {
            text: tableData[rowIndex][colIndex],
            location: { index: paragraphIndex }
          }
        });
      });
    });

    if (requests.length > 0) {
      await gapi.client.docs.documents.batchUpdate({
        documentId: docId,
        resource: { requests }
      });
    }

  } catch (err) {
    console.error("Error inserting table with text:", err);
  }
};

Problem:
Instead of each value going into its respective cell, all the values are being inserted into the first cell, one after another (as if the insert index is reused or overlapping).

How do I properly determine the correct index to insert text into each individual cell?
Why is text appearing all in one cell even though I loop through different cells?

Why can’t I click this button in the ChatGPT UI using standard JavaScript?

I want to script Safari to automate some actions in ChatGPT. To achieve that I need to click plus-button in the input field:

enter image description here

Usually when I try to do something like this I use JavaScript like

var button = document.evaluate("//div/div/div[2]/form/div[1]/div/div[2]/div/div[1]/div[1]/div/div/div/span[2]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; button.click();

but for some reason this snippet doesn’t work – nothing happens – with the ChatGPT UI.

How do I click this button using JavaScript?

  1. I am aware of the ChatGPT API but it is not useful for my purpose.
  2. Safari has a do JavaScript method in its AppleScript dictionary that I use.

How to Implement Conference Call Feature Using JsSIP with FusionPBX/Freeswitch

I’m currently developing a SIP phone using the JsSIP library and would appreciate some guidance on implementing a conference call feature.

So far, I’ve successfully implemented the basic call controls such as mute, unmute, hold, unhold, and call transfer. I’m now looking to add support for conference calling.

I’m using FusionPBX with FreeSWITCH as the backend SIP server. Has anyone implemented conference calling with this setup using JsSIP? I’m specifically looking for advice or best practices on how to:

Merge multiple calls into a single conference

Manage audio streams appropriately

Handle SIP signaling and media negotiation

Use FreeSWITCH’s conference modules (if applicable)

Any examples, references, or tips would be really helpful!

Thanks in advance!

Tableau embed report asking for login instead of directly loading the report in safari browser

I am working on a project in ReactJs in which I have embedded tableau reports. I have use connected apps direct trust with JWT so the reports does not require signin before loading and they are loading without signin in chrome and firefox however they require signin to tableau cloud in safari browser.

This is the error I get in console.
[Error] Failed to load resource: the server responded with a status of 404 () (tableau.embedding.3.12.0-pre.25.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 401 () (viewing, line 0)

import TableauViz from "@/components/TableauViz/TableauViz";
import { useEffect, useState } from "react";
import { useSelector } from "react-redux";

const Report = () => {
   const [device, setDevice] = useState("desktop");

   const { selectedReport = null, reportToken = "" } = useSelector(
      (state) => state.reports
   );

   const { isLargeScreenSidebarOpen } = useSelector((state) => state.ui);

   useEffect(() => {
      const handleResize = () => {
         if (window.innerWidth < 768) {
            setDevice("mobile");
         } else {
            setDevice("desktop");
         }
      };

      // Initial check
      handleResize();

      // Add event listener for window resize
      window.addEventListener("resize", handleResize);

      // Clean up the event listener on component unmount
      return () => {
         window.removeEventListener("resize", handleResize);
      };
   }, []);

   if (!selectedReport) return <></>;

   const options = {
      toolbar: "bottom",
      "hide-tabs": true,
      device,
      "hide-edit-button": true,
      width: "100%",
   };

   return (
      <TableauViz
         src={selectedReport.embeddedLink}
         options={options}
         token={reportToken}
      />
   );
};

export default Report;
import React, { useEffect, useRef, useState } from "react";
import { TableauEventType } from "https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js";
import { ErrorMessage } from "@/components/ErrorMessage/ErrorMessage";

const TableauViz = ({ src, options, token }) => {
   const vizContainer = useRef(null);
   const [error, setError] = useState("");

   function handleError(err) {
      try {
         if (err.detail) {
            const details = JSON.parse(err.detail.message);
            console.error(details);
            if (details.statusCode === 401) {
               setError("You are not authorized to view this report.");
               emptyVizContainer();
            } else {
               setError("Something went wrong.");
               emptyVizContainer();
            }
         }
      } catch (error) {
         console.error("handleError", error);
         setError("Something went wrong.");
         emptyVizContainer();
      }
   }

   function emptyVizContainer() {
      if (vizContainer.current) {
         vizContainer.current.innerHTML = "";
      }
   }

   useEffect(() => {
      // Initialize the Tableau Viz web component
      const vizElement = document.createElement("tableau-viz");
      vizElement.id = "tableauViz";
      vizElement.src = src;
      vizElement.token = token;

      // Add options as attributes
      for (const [key, value] of Object.entries(options)) {
         vizElement.setAttribute(key, value);
      }

      // Append the viz element to the container
      if (vizContainer.current) {
         vizContainer.current.innerHTML = "";
         vizContainer.current.appendChild(vizElement);
      }

      // Add event listeners
      vizElement.addEventListener(TableauEventType.VizLoadError, handleError);


      // Cleanup event listeners on unmount
      return () => {
         vizElement.removeEventListener(
            TableauEventType.VizLoadError,
            handleError
         );
      };
   }, [src, options]);

   if (error)
      return (
         <div className="h-100 d-flex align-items-center justify-content-center">
            <ErrorMessage message={error} />
         </div>
      );

   return <div ref={vizContainer} className="tableau-viz-container m-auto" />;
};

export default TableauViz;

In the official documentation they say it is because safari blocks third party cookies the report is asking for signin but they don’t provide a solution. I tried block third party cookies in chrome but still the report were loading fine.

Browser-based gTag OSINT tool does not run, is not fully functional, and returns no scan results after form submission

`I’m building a browser-based gTag OSINT tool to monitor spoofed user-agents using Puppeteer and a WebSocket/Express backend.

The frontend dashboard renders correctly, and the form accepts input, but submitting the form does not trigger scans or produce any data. I also notice that some WebGL options don’t behave as expected, though I’m not sure if that’s related.

There are:

  • No JS console errors
  • No backend logs showing incoming POSTs or WebSocket activity
  • No chart data or scan results rendering

Any help would be appreciated. I’m a novice and just want to get form→scan→result working before scaling up.


What I expect:

  • Form submission should call /api/scan (via fetch() or WebSocket)
  • Backend should run scanTag(tag, url) and return result
  • UI should update with new scan data and chart stats

What I’ve tried:

  • Verified endpoint /api/scan exists and works when hit manually (Postman)
  • Checked dashboard.js to confirm form handler is present and fetch() call exists
  • Backend logs show nothing when form is submitted
  • scanTag() works correctly if triggered from backend during startup

Code (frontend)

form.addEventListener('submit', async (e) => {
      e.preventDefault();
      const submitBtn = form.querySelector('button[type="submit"]');
      if (submitBtn) submitBtn.disabled = true;

      try {
        const formData = new FormData(form);
        const data = {
          tag: formData.get('tag'),
          url: formData.get('url') || this.config.defaultUrl,
          webglPreset: formData.get('webglPreset'),
          timezone: formData.get('timezone'),
          language: formData.get('language'),
          proxy: formData.get('proxy')
        };

        if (!data.tag) throw new Error('Tag is required');

        const response = await fetch('/api/scan', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify(data)
        });

        if (!response.ok) {
          const error = await response.json();
          throw new Error(error.message || 'Scan failed');
        }

        const result = await response.json();
        this.showToast(
          'Scan Complete',
          result.status === 'LIVE' ? 'success' : 'danger',
          `${data.tag}: ${result.status}`
        );

        this.updateScanUI({
          tag: data.tag,
          status: result.status,
          confidence: result.confidence || 0
        });

      } catch (error) {
        this.showToast('Scan Failed', 'danger', error.message);
      } finally {
        if (submitBtn) submitBtn.disabled = false;
      }
    });
  }

Base 3 chunked encoder off by 1 bug

I’m trying to write an arbitrary base N chunked encoder. This is different than a mathematical encoder where the entire buffer is converted to an integer and then that integer is converted into a number. It’s supposed to work like how base 64 reads the buffer in chunks of 3 bytes and outputs 4 chars per chunk.

Non powers of 2 bases “waste” bits because the the # of bits in N bytes never align with M chars.

For base 3 in particular, I’ve computed that 12 bytes can be encoded into 61 chars with a wastage of 0.683 bits because 3**61=96.68 and 12*8=96, so 0.683 bits will be left unused.

What this looks like is:

expect(base3encoder.encode([0,0,0,0,0,0,0,0,0,0,0,1])).toBe('0000000000000000000000000000000000000000000000000000000000001')
expect(base3encoder.encode([0,0,0,0,0,0,0,0,0,0,0,2])).toBe('0000000000000000000000000000000000000000000000000000000000002')
expect(base3encoder.encode([0,0,0,0,0,0,0,0,0,0,0,3])).toBe('0000000000000000000000000000000000000000000000000000000000010')
expect(base3encoder.encode([0,0,0,0,0,0,0,0,0,0,1,0]),"256 = 1*3**5 + 1*3**2 + 1*3**1 + 1*3**0").toBe('0000000000000000000000000000000000000000000000000000000100111')

When the input is not a multiple of 12 bytes, we have to add some padding.

I’ve got this working perfectly with base 64 (it matches the native impl), but for base 3 my algo is a little off, but I can’t quite put my finger on where the problem is.

I’ve modified the code and test to run in StackOverflow. I believe the bug is in ChunkedBufferEncoder.decode but it could be in ChunkedBufferEncoder.encode. I know encode works for input bytes that are multiples of 12 (as shown above), but for anything else it gets a little crazy.

I’ve included a base64encoder in the test. That currently passes all tests and should continue to pass.

Where is the bug?

function getView(buffer) {
    if (ArrayBuffer.isView(buffer)) {
        return new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
    }
    if (buffer instanceof ArrayBuffer) {
        return new DataView(buffer, buffer.byteLength, buffer.byteLength);
    }
    return new DataView(Uint8Array.from(buffer).buffer);
}

function bufToInt(buffer) {
    if (buffer.length <= 1) {
        if (buffer.length === 0) {
            return 0n;
        }
        return BigInt(buffer[0]);
    }
    if (buffer.length >= 8) {
        let i = 0;
        let result = 0n;
        const view = getView(buffer);
        const end = buffer.length - 8;
        for (;;) {
            result |= BigInt(view.getBigUint64(i, false));
            i += 8;
            if (i >= end) {
                break;
            }
            result <<= 64n;
        }
        for (;i < buffer.length; ++i) {
            result = result << 8n | BigInt(buffer[i]);
        }
        return result;
    }
    let result = BigInt(buffer[0]);
    for (let i = 1; i < buffer.length; ++i) {
        result = result << 8n | BigInt(buffer[i]);
    }
    return result;
}

function calcCharsPerChunk(bytesPerChunk, base) {
    const min = 2n ** BigInt(8 * bytesPerChunk);
    let c = 1;
    let val = base;
    for (;;) {
        if (val >= min) return c;
        val *= base;
        ++c;
    }
}

function toArray(arr) {
    return Array.isArray(arr) ? arr : Array.from(arr);
}

class ChunkedBufferEncoder {
    alphabet;
    reverse;
    base;
    bytesPerChunk;
    charsPerChunk;
    constructor(alphabet, bytesPerChunk, charsPerChunk) {
        this.alphabet = toArray(alphabet);
        console.assert(this.alphabet.length >= 2);
        this.reverse = new Map(this.alphabet.map(((ch, i) => [ ch, BigInt(i) ])));
        this.base = BigInt(this.alphabet.length);
        this.bytesPerChunk = bytesPerChunk;
        if (charsPerChunk == null) {
            this.charsPerChunk = calcCharsPerChunk(bytesPerChunk, this.base);
        } else {
            this.charsPerChunk = charsPerChunk;
            console.assert(this.alphabet.length ** this.charsPerChunk >= 2 ** (8 * bytesPerChunk));
        }
    }
    encode(arr) {
        if (!arr?.length) {
            return "";
        }
        const buf = Uint8Array.from(arr);
        let i = 0;
        let result = "";
        do {
            const chunk = buf.slice(i, i + this.bytesPerChunk);
            let val = bufToInt(chunk);
            if (chunk.length < this.bytesPerChunk) {
                const missingBytes = this.bytesPerChunk - chunk.length;
                val <<= 8n * BigInt(missingBytes);
                result += this.intToArr(val).slice(0, -missingBytes).join("");
                return result;
            }
            result += this.intToStr(val);
            i += this.bytesPerChunk;
        } while (i < buf.length);
        return result;
    }
    padEnd(chunk) {
        if (chunk.length >= this.charsPerChunk) return chunk;
        return chunk.concat(Array(this.charsPerChunk - chunk.length).fill(this.alphabet[0]));
    }
    decode(str) {
        if (!str?.length) return new Uint8Array;
        const out = [];
        let i = 0;
        const arr = toArray(str);
        while (i < arr.length) {
            const chunk = arr.slice(i, i + this.charsPerChunk);
            if (chunk.length === this.charsPerChunk) {
                const num = this.arrToInt(chunk);
                for (let j = this.bytesPerChunk - 1; j >= 0; j--) {
                    out.push(Number(num >> BigInt(8 * j) & 0xffn));
                }
            } else {
                const missing = this.charsPerChunk - chunk.length;
                let num = this.arrToInt(this.padEnd(chunk));
                num >>= BigInt(8 * missing);
                const byteCount = this.bytesPerChunk - missing;
                for (let j = byteCount - 1; j >= 0; --j) {
                    out.push(Number(num >> BigInt(8 * j) & 0xffn));
                }
                break;
            }
            i += chunk.length;
        }
        return new Uint8Array(out);
    }
    arrToInt(arr) {
        let num = 0n;
        for (const ch of arr) {
            num = num * this.base + this.reverse.get(ch);
        }
        return num;
    }
    strToInt(str) {
        return this.arrToInt(toArray(str));
    }
    intToStr(num) {
        if (!num) {
            return this.alphabet[0].repeat(this.charsPerChunk);
        }
        let n = BigInt(num);
        let result = "";
        do {
            const rem = n % this.base;
            result = this.alphabet[Number(rem)] + result;
            n /= this.base;
        } while (n > 0n);
        return result.padStart(this.charsPerChunk, this.alphabet[0]);
    }
    intToArr(num) {
        if (!num) {
            return Array(this.charsPerChunk).fill(this.alphabet[0]);
        }
        let n = BigInt(num);
        let result = [];
        do {
            const rem = n % this.base;
            result.unshift(this.alphabet[Number(rem)]);
            n /= this.base;
        } while (n > 0n);
        while (result.length < this.charsPerChunk) {
            result.unshift(this.alphabet[0]);
        }
        return result;
    }
}

// ---------- TEST ----------

function randomUint8Array(minLen, maxLen) {
    return crypto.getRandomValues(new Uint8Array(Math.floor(Math.random() * (maxLen - minLen + 1)) + minLen))
}


const base64encoder = new ChunkedBufferEncoder('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',3)
const base3encoder = new ChunkedBufferEncoder('012', 12, 61)

const NUM_TESTS = 10000
const MIN_BYTES = 1
const MAX_BYTES = 17

function arrEq(a, b) {
    if (a.length !== b.length) return false;
    for (let i = 0; i < a.length; i++) {
        if (a[i] !== b[i]) return false;
    }
    return true;
}

function uint8ArrayToHex(arr) {
    return Array.from(arr, b => b.toString(16).toUpperCase().padStart(2, '0')).join(' ')
}


for(const encoder of [base64encoder,base3encoder]) {
    for(let i = 0; i < NUM_TESTS; i++) {
        const buf = randomUint8Array(MIN_BYTES, MAX_BYTES)
        const encoded = encoder.encode(buf)
        const decoded = encoder.decode(encoded)
        if(!arrEq(buf, decoded)) throw new Error(
            `Buf: ${uint8ArrayToHex(buf)} Encoded: ${encoded} Decoded: ${uint8ArrayToHex(decoded)}`
        )
    }
}

It might be the .slice(0,-missingBytes).

[0,0,0,0,0,0,0,0,0,0,1] (11 elements) should be padded such that it becomes [0,0,0,0,0,0,0,0,0,0,1,0] which encodes to 0000000000000000000000000000000000000000000000000000000100111, but when decoded again it’ll come out [0,0,0,0,0,0,0,0,0,0,1,0] with the “missing byte” appended. I don’t want that. Base64 uses = as padding, but it’s not really necessary because you can figure out how many bytes/chars it’s supposed to be with a bit of math. I’m not actually positive if it’s possible to do something similar with non powers of 2.

Site created with Blogger does not have the sitemap updated on Search Console and has custom codes

The site https://yoursupergames.blogspot.com/ created with Blogger has the Contempo Light theme and is customized. I noticed that the custom codes I inserted have problems. They do not seem to work properly.

Search Console has not detected the sitemap for 3 months. I have reset the theme and disabled all codes in widgets. I do not understand what the problem is.

I even lost the indexing of the home page and now I have 0 pages indexed after 5 months.

I created some text on the home page and inserted the appropriate keywords, but nothing has changed.

I do not understand the nature of the problems on my website.

<!-- Disable the blogger.com cookie banner -->
<script>/*<![CDATA[*/ cookieChoices = {}; /*]]>*/</script>
    
<!-- Google tag (gtag.js) -->
<script async='async' src='https://www.googletagmanager.com/gtag/js?id=G-SZ20W1F1MR'/>
<script> 
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag(&#39;js&#39;, new Date());

  gtag(&#39;config&#39;, &#39;G-SZ20W1F1MR&#39;);
</script>

<!-- Publish consent banner -->    
<script type='text/javascript'>
var _iub = _iub || [];
_iub.csConfiguration = {&quot;siteId&quot;:3941908,&quot;cookiePolicyId&quot;:85220213,&quot;lang&quot;:&quot;en&quot;,&quot;storage&quot;:{&quot;useSiteId&quot;:true}};
</script>
<script src='https://cs.iubenda.com/autoblocking/3941908.js' type='text/javascript'/>
<script src='//cdn.iubenda.com/cs/gpp/stub.js' type='text/javascript'/>
<script async='async' charset='UTF-8' src='//cdn.iubenda.com/cs/iubenda_cs.js' type='text/javascript'/>

<!-- Aggiunta di Font Awesome -->
<link crossorigin='anonymous' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css' integrity='sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg==' referrerpolicy='no-referrer' rel='stylesheet'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>

<!-- Pubblicità automatica Adsense -->    
<script async='async' crossorigin='anonymous' src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3142475692533377'>
</script>

<!-- Titoli delle pagine e post --> 
<title>
  <b:if cond='data:blog.pageType == &quot;index&quot;'>
    <data:blog.pageTitle/>
  <b:else/>
  
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
      <data:view.title.escaped/> - Online Game
    <b:else/>
  
      <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
        <b:if cond='data:view.title.escaped == &quot;About Us&quot;'>About Us - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;Contact Us&quot;'>Contact Us - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;Privacy Policy&quot;'>Privacy Policy - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;Terms of Service&quot;'>Terms of Service - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;FAQ&quot;'>FAQs - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;Accessibility&quot;'>Accessibility - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;Disclaimer&quot;'>Disclaimer - Your Super Games</b:if>
        <b:if cond='data:view.title.escaped == &quot;Cookie Policy&quot;'>Cookie Policy - Your Super Games</b:if>

        <b:if cond='data:view.title.escaped != &quot;About Us&quot;                      and data:view.title.escaped != &quot;Contact Us&quot;                     and data:view.title.escaped != &quot;Privacy Policy&quot;                     and data:view.title.escaped != &quot;Terms of Service&quot;                     and data:view.title.escaped != &quot;FAQ&quot;                     and data:view.title.escaped != &quot;Accessibility&quot;                     and data:view.title.escaped != &quot;Disclaimer&quot;                     and data:view.title.escaped != &quot;Cookie Policy&quot;'>
          <data:view.title.escaped/> - Your Super Games
        </b:if>
      <b:else/>
        <data:view.title.escaped/> - Your Super Games
      </b:if>
    </b:if>
  </b:if>
</title>