Is there a limit on how many divs a vue component has to have so it can be displayed as a microfrontend?

I made this webpack module federation microfrontend project that consists a vue project that contains a vue component that should be displayed in another vue project.

So I have a vue component like this and it doesn’t get displayed:

    <div class="column is-6 is-offset-3">
      <div class="box">
        <div class="block">
          <h1 class="title">Title</h1>
        </div>
        <div class="columns">
          <div class="column has-text-grey">by x</div>
          <div class="column has-text-grey">12/12/32 12:34</div>
        </div>
        <div class="block">
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Culpa
          voluptatem harum praesentium quas voluptatibus nostrum debitis totam
          tempore, et dolor unde incidunt hic recusandae ipsa facilis quaerat
          quod sequi nulla?
        </div>
        <div class="block">
          <div class="tags">
            <span class="tag">tag </span>
            <span class="tag">tag </span>
            <span class="tag">tag </span>
            <span class="tag">tag </span>
          </div>
        </div>
      </div>
    </div>
  </div>

I have noticed that if I remove some divs it does eventually get displayed, like this:

<template>
  <div class="columns">
    <div class="column is-6 is-offset-3">
      <div class="box">
        <div class="block">
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Culpa
          voluptatem harum praesentium quas voluptatibus nostrum debitis totam
          tempore, et dolor unde incidunt hic recusandae ipsa facilis quaerat
          quod sequi nulla?
        </div>
      </div>
    </div>
  </div>
</template>

Is there a limit?, how can I change it?

this are the webpack configs:
for the project that provides data:

const path = require("path");
const { VueLoaderPlugin } = require("vue-loader");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { ModuleFederationPlugin } = require("webpack").container;
module.exports = (env = {}) => ({
  mode: "development",
  cache: false,
  devtool: "source-map",
  optimization: {
    minimize: false,
  },
  target: "web",
  entry: path.resolve(__dirname, "./src/main.js"),
  // output: {
  //   path: path.resolve(__dirname, './dist'),
  //   publicPath: '/dist/'
  // },
  output: {
    publicPath: "auto",
  },
  resolve: {
    extensions: [".vue", ".jsx", ".js", ".json"],
    alias: {
      // this isn't technically needed, since the default `vue` entry for bundlers
      // is a simple `export * from '@vue/runtime-dom`. However having this
      // extra re-export somehow causes webpack to always invalidate the module
      // on the first HMR update and causes the page to reload.
      vue: "@vue/runtime-dom",
    },
  },
  module: {
    rules: [
      {
        test: /.vue$/,
        use: "vue-loader",
      },
      {
        test: /.png$/,
        use: {
          loader: "url-loader",
          options: { limit: 8192 },
        },
      },
      {
        test: /.css$/,
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
            options: {},
          },
          "css-loader",
        ],
      },
    ],
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: "[name].css",
    }),
    new ModuleFederationPlugin({
      name: "home",
      filename: "remoteEntry.js",
      remotes: {
        home: "home@http://localhost:8002/remoteEntry.js",
      },
      exposes: {
        "./Content": "./src/components/Content",
        "./Button": "./src/components/Button",
        "./Post": "./src/components/Post",
        "./Test": "./src/components/Test"
      },
    }),
    new HtmlWebpackPlugin({
      template: path.resolve(__dirname, "./index.html"),
    }),
    new VueLoaderPlugin(),
  ],
  devServer: {
    static: {
      directory: path.join(__dirname),
    },
    compress: true,
    port: 8002,
    hot: true,
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
      "Access-Control-Allow-Headers":
        "X-Requested-With, content-type, Authorization",
    },
  },
});

For the project that reads data:

const path = require("path");
const { VueLoaderPlugin } = require("vue-loader");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { ModuleFederationPlugin } = require("webpack").container;
module.exports = (env = {}) => ({
  mode: "development",
  cache: false,
  devtool: "source-map",
  optimization: {
    minimize: false,
  },
  target: "web",
  entry: path.resolve(__dirname, "./src/main.js"),
  output: {
    publicPath: "auto",
  },
  resolve: {
    extensions: [".vue", ".jsx", ".js", ".json"],
    alias: {
      // this isn't technically needed, since the default `vue` entry for bundlers
      // is a simple `export * from '@vue/runtime-dom`. However having this
      // extra re-export somehow causes webpack to always invalidate the module
      // on the first HMR update and causes the page to reload.
      vue: "@vue/runtime-dom",
    },
  },
  module: {
    rules: [
      {
        test: /.vue$/,
        use: "vue-loader",
      },
      {
        test: /.png$/,
        use: {
          loader: "url-loader",
          options: { limit: 8192 },
        },
      },
      {
        test: /.css$/,
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
            options: {},
          },
          "css-loader",
        ],
      },
    ],
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: "[name].css",
    }),
    new ModuleFederationPlugin({
      name: "layout",
      filename: "remoteEntry.js",
      remotes: {
        home: "home@http://localhost:8002/remoteEntry.js",
      },
      exposes: {},
    }),
    new HtmlWebpackPlugin({
      template: path.resolve(__dirname, "./index.html"),
      chunks: ["main"],
    }),
    new VueLoaderPlugin(),
  ],
  devServer: {
    static: {
      directory: path.join(__dirname),
    },
    compress: true,
    port: 8001,
    hot: true,
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
      "Access-Control-Allow-Headers":
        "X-Requested-With, content-type, Authorization",
    },
  },
});

Pictures Wall with using InputFile multiple upload

There is a nice example with picture wall. However in example third party service is used that is not that much help in case there is a need to store pictures locally or in DB. How to implement the same in case of pictures would be stored locally with using native InputFile?

I saw there is a solution with single image file and I am already using it in my project, that is working nice. However how to implement the same in case there are multiple files?

This is what I have got so far, but I am missing gallery layout in case of multiple images. Also I am missing preview option and remove option. How to get these icons on image hover? How to make images appear like in gallery?

  <span class="ant-upload-picture-card-wrapper" >
    <label class="avatar-uploader" for="upload">
      <div class="ant-upload ant-upload-select-picture-card ant-upload-select">
        <div tabindex="0" class="ant-upload" style="position:relative;">
          <InputFile OnChange="@this.OnFileSelection" multiple id="upload" hidden accept=".png,.jpg,.jpeg,.gif" />
          <div class="row">
            @if (this.ImgUrls.Any())
            {
              @foreach (var url in this.ImgUrls)
              {
                <div>
                  <img src="@url" alt="avatar" style="width: 100%" />
                </div>
              }
            }
            else
            {
              <div>
                <Icon Spin="this.loading" Type="@(this.loading?"Loading":"plus")"></Icon>
                <div className="ant-upload-text">Upload</div>
              </div>
            }
          </div>
        </div>
      </div>
    </label>
  </span>

Here is what I am trying to achieve:

enter image description here

Implement order select and display using document.querySelectorAll in Angular

This is a part of an e-commerce app in which customers can select an order and go to checkout. A group of similar buttons that have a data- attribute, with respective extensions to data-something. I am able to implement this well in JavaScript and Html 5. I want to know how to achieve exactly the same using Angular.
Here I only show a small part of HTML code to maintain simplicity.

        <div class="financials oriental">
          <div class="pf-icons">
            <i class="fab"></i>
          </div>

          <table>
            <caption class="text-white">
              Package Brand & Details.
            </caption>
            <thead>
              <tr>
                <th colspan="2">
                  <h2 class="product-header">Aladdin Basic</h2>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td><h3 class="table-key text-white">Minimum</h3></td>
                <td>
                  <h3 class="table-value min-amount text-white">K 50</h3>
                </td>
              </tr>
              <tr>
                <td><h3 class="table-key even">Maximum</h3></td>
                <td><h3 class="table-value even max-amount">Unlimited</h3></td>
              </tr>
              <tr>
                <td><h3 class="table-key text-white">Interest</h3></td>
                <td>
                  <h3 class="table-value text-white percentage-earning">
                    100% in 48Hrs.
                  </h3>
                </td>
              </tr>
            </tbody>
          </table>

          <button data-plan="aladdin">Select Plan</button>
        </div>

Below is JavaScript I wish to implement in Angular,

// Select Plan Logic
    const planButtons = document.querySelectorAll("button[data-plan]");

    planButtons.forEach((button) => {
      button.addEventListener("click", (e) => {
        const button = e.currentTarget;
        const container = button.parentNode;
        const grandParent = container.parentNode;

        const plan = {
          id: button.getAttribute("data-plan"),
          containerClassList: container.getAttribute("class"),
          // iconClasses: container.querySelector(".fas").getAttribute("class"),
          title: container.querySelector(".product-header").innerText,
          minAmount: container.querySelector(".min-amount").innerText,
          maxAmount: container.querySelector(".max-amount").innerText,
          percentageEarning: container.querySelector(".percentage-earning")
            .innerText,
        };

        localStorage.setItem("plan", JSON.stringify(plan));

        const url = window.location.href.split("dashboard", 1)[0];
        window.location.href = `${url}plan`;
      });
    });

    displayOrder = () => {
      const order = localStorage.getItem("plan");
      const submitInput = document.getElementById("submittedAmount");
      const planInput = document.getElementById("plan");

      if (order) {
        const packageOrder = JSON.parse(order);

        const package = document.querySelector(".financials");

        const title = package.querySelector(".product-header"),
          icon = package.querySelector(".fas"),
          minAmount = package.querySelector(".min-amount"),
          maxAmount = package.querySelector(".max-amount"),
          percentageEarning = package.querySelector(".percentage-earning"),
          duration = package.querySelector(".duration");

        package.setAttribute("class", `${packageOrder.containerClassList}`);
        icon.setAttribute("class", `${packageOrder.iconClasses}`);
        title.innerText = packageOrder.title;
        minAmount.innerText = packageOrder.minAmount;
        maxAmount.innerText = packageOrder.maxAmount;
        percentageEarning.innerText = packageOrder.percentageEarning;

        whitenText = () => {
          // Make Text White for Package visibility
          const dataArr = document.querySelectorAll("h3");

          dataArr.forEach((item) => {
            item.classList.add("text-white");
          });
        };

        if (title.innerText === "PP1") {
          planInput.value = "pp1";
          submitInput.setAttribute("placeholder", "Enter amount 100");
          whitenText();
        } else if (title.innerText === "PP2") {
          planInput.value = "pp2";
          submitInput.setAttribute("placeholder", "Enter amount 200");
        } else if (title.innerText === "PP3") {
          planInput.value = "pp3";
          submitInput.setAttribute("placeholder", "Enter amount 500");
          whitenText();
        } else if (title.innerText === "SP1") {
          planInput.value = "sp1";
          submitInput.setAttribute("placeholder", "Enter amount 200");
          whitenText();
        } else if (title.innerText === "UP1") {
          planInput.value = "up1";
          submitInput.setAttribute("placeholder", "Enter amount 500");
          whitenText();
        } else if (title.innerText === "UP2") {
          planInput.value = "up2";
          submitInput.setAttribute("placeholder", "Enter amount 1000");
          whitenText();
        } else if (title.innerText === "UP3") {
          planInput.value = "up3";
          submitInput.setAttribute("placeholder", "Enter amount 2000");
          whitenText();
        }
      }
    };

    if (urlPath === "/plan") {
      displayOrder();
    }

How to get the products ID, Impressions and Click from Google Ads using Ads Script?

I am working with Google Ads Scripts. Based on my use case, I need to get the impressions, clicks, and other statistics about the products I have in my Google Ads account.

These product statistics will be analyzed in the script and based on certain criteria a Google Sheet document will be updated. The script goes like, retrieving all products (along with their statistics) from Google Ads account, see if the products impression and clicks meet a category (30 Impression, 1 click = Category “A”, 20 Impressions, 0 Clicks = “Category B”), determines the product category, open Google Sheet hosted on Google Drive and updates the Category column in the Sheet based on product name or id.

Currently, I am facing an issue with retrieving Products and their statistics from Google Ads Account using Ads Script. I used the following code snippets to look for products but found no method or class that would help me achieve my desired results. I can only retrieve the productGroups, AdGroups, and Campaigns but none of them allow me to extract individual products.

    function productGroup(){
      var prodGroupIter = AdsApp.productGroups().get();
      while (prodGroupIter.hasNext()){
        var prodGroup = prodGroupIter.next();
        var children = prodGroup.getCampaign().getName()
        Logger.log(children);
        while (children.hasNext()){
          Logger.log(children);
        }
      }
    }

    function adGroup() {
      var adGroupIterator = AdsApp.adGroups().get();
  
      while (adGroupIterator.hasNext()) {
        var adGroup = adGroupIterator.next();
        var products = adGroup.ads().get().next().
        Logger.log("adGroup: ")
        Logger.log(adGroup.getName());
        Logger.log(addGroupName);
      }
    }

    function campaign(){
      var campIter = AdsApp.campaigns().get();
      while (campIter.hasNext()){
        var campaign = campIter.next().ads().get();
        while(campaign.hasNext()){
          Logger.log(campaign.next().getStatsFor("LAST_30_DAYS"));
        }
      }
    }

    function sheet() {
      var sheetURL = "https://docs.google.com/spreadsheets/d/1W0zhRrQa1P7qjQf0eXXw-QzdcPKAlDPiVBOcIVEfDgw/edit#gid=1428103052";
      var sheet = SpreadsheetApp.openByUrl(sheetURL);
    }

    function main(){
      campaign();
      adGroup();
      productGroup();
    }

I then reached out to the Ads Script support team and found out that it is not possible. But they suggested that I can use Shopping Performance Report, Product Partition Report, shopping_performance_view or product_group_view. They are part of AdWord API, and I do not know how to work with them.

So, I am looking for a Google Ads Script that would help me get a list of products (with detailed statistics) from Googe Ads and I am stuck with how to use the above-mentioned AdWord reporting endpoints to do it.

Here is the list of products in my Google Ads Account. They are 107 products along with their statistics.
Screenshot - Google Ads Products

Please, help with at least comments, ideas, and suggestions, I can write code but I am not sure what I am missing on

JavaScript, td size always change

I am writing a simple program that includes table and td’s.
In the program when you press q the number one appears in a td.
but when it happens the td width suddenly change.
so my question is how to stop it?
here is the code:

<html>
<body>
    <table border = "1">
        <tr>
            <td id = "td1"></td>
            <td id = "td2"></td>
        </tr>
    </table>
    <style>
        table {
            height: 400px;
            width: 800px;
            margin-left: auto;
            margin-right: auto;
            text-align: center;
            font-size:25px;
        }
    </style>
</head>
<head>
    <script>
        document.addEventListener("keydown", function(e){
            if (e.key == "q") {
                document.getElementById("td1").innerHTML = "1";
            }
        });
    </script>
</head>

Failure to click on a button in python using selenium with aria-label

I am trying to find and click a close button on an iframe.

<button _ngcontent-bti-c9="" aria-label="Close" class="close close_white_color" type="button">
<span _ngcontent-bti-c9="" aria-hidden="true">×</span>
</button>

I have tried the following methods:

Try1: close = driver.find_element_by_xpath("//button[@aria-label=Close']").click()
Try2: close = driver.find_element_by_xpath("//button[@class='close close_white_color']").click()
Try3: close = driver.find_element_by_xpath("//span[@aria-hidden='true']").click()

which gives following error

Error1: NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//button[@aria-label='Close']"}
Error2: NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//button[@class='close close_white_color']"}

I am able to interact with the iframe but unable to locate this button. Any suggestions would be appreciated

Node.js ‘fs’ throws an ENOENT error after adding auto-generated Swagger server code

Preamble

To start off, I’m not a developer; I’m just an analyst / product owner with time on their hands. While my team’s actual developers have been busy finishing off projects before year-end I’ve been attempting to put together a very basic API server in Node.js for something we will look at next year.

I used Swagger to build an API spec and then used the Swagger code generator to get a basic Node.js server. The full code is near the bottom of this question.

The Problem

I’m coming across an issue when writing out to a log file using the fs module. I know that the ENOENT error is usually down to just specifying a path incorrectly, but the behaviour doesn’t occur when I comment out the Swagger portion of the automatically generated code. (I took the logging code directly out of another tool I built in Node.js, so I’m fairly confident in that portion at least…)

When executing npm start, a few debugging items write to the console:

"Node Server Starting......
Current Directory:/mnt/c/Users/USER/Repositories/PROJECT/api
Trying to log data now! 
 Mock mode: disabled 
PostgreSQL Pool created successfully
Your server is listening on port 3100 (http://localhost:3100)
Swagger-ui is available on http://localhost:3100/docs"

but then fs throws an ENOENT error:

events.js:174
      throw er; // Unhandled 'error' event
      ^

 Error: ENOENT: no such file or directory, open '../logs/logEvents2021-12-24.log'
Emitted 'error' event at:
    at lazyFs.open (internal/fs/streams.js:277:12)
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)

Investigating

Now normally, from what I understand, this would just mean I’ve got the paths wrong. However, the file has actually been created and the first line of the log file has been written just fine.

My next thought was that I must’ve set the fs flags incorrectly, but it was set to ‘a’ for append:

var logsFile = fs.createWriteStream(__logdir+"/logEvents"+dateNow()+'.log',{flags: 'a'},(err) =>{
                    console.error('Could not write new Log File to location: %s nWith error description: %s',__logdir, err);
                });

Removing Swagger Code

Now here’s the weird bit: if I remove the Swagger code, the log files write out just fine and I don’t get the fs exception!
This is the specific Swagger code:

// swaggerRouter configuration
var options = {
    routing: {
        controllers: path.join(__dirname, './controllers')
    },
};

var expressAppConfig = oas3Tools.expressAppConfig(path.join(__dirname, '/api/openapi.yaml'), options);
var app = expressAppConfig.getApp();


// Initialize the Swagger middleware
http.createServer(app).listen(serverPort, function () {
    console.info('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort);
    console.info('Swagger-ui is available on http://localhost:%d/docs', serverPort);
}).on('error',console.error);

When I comment out this code, the log file writes out just fine.

The only thing I can think that might be happening is that somehow Swagger is modifying (?) the app’s working directory so that fs no longer finds the same file?

Full Code

'use strict';

var path = require('path');
var fs = require('fs');
var http = require('http');

var oas3Tools = require('oas3-tools');
var serverPort = 3100;

// I am specifically tried using path.join that I found when investigating this issue, and referencing the app path, but to no avail

const __logdir = path.join(__dirname,'./logs');
//These are date and time functions I use to add timestamps to the logs
function dateNow(){
    var dateNow = new Date().toISOString().slice(0,10).toString();
    return dateNow
}
function rightNow(){
    var timeNow = new Date().toTimeString().slice(0,8).toString();
    return "["+timeNow+"]  "
};

console.info("Node Server Starting......");
console.info("Current Directory: " + __dirname)

//  Here I create the WriteStreams

var logsFile = fs.createWriteStream(__logdir+"/logEvents"+dateNow()+'.log',{flags: 'a'},(err) =>{
                    console.error('Could not write new Log File to location: %s nWith error description: %s',__logdir, err);
                });
var errorsFile = fs.createWriteStream(__logdir+"/errorEvents"+dateNow()+'.log',{flags: 'a'},(err) =>{
                    console.error('Could not write new Error Log File to location: %s nWith error description: %s',__logdir, err);
                });

// And create an additional console to write data out:

const Console = require('console').Console;
var logOut = new Console(logsFile,errorsFile);
console.info("Trying to log data now!") // Debugging logging
logOut.log("========== Server Startup Initiated ==========");
logOut.log(rightNow() + "Server Directory: "+ __dirname);
logOut.log(rightNow() + "Logs directory: "+__logdir);

// Here is the Swagger portion that seems to create the behaviour. 
//   It is unedited from the Swagger Code-Gen tool

// swaggerRouter configuration
var options = {
    routing: {
        controllers: path.join(__dirname, './controllers')
    },
};

var expressAppConfig = oas3Tools.expressAppConfig(path.join(__dirname, '/api/openapi.yaml'), options);
var app = expressAppConfig.getApp();


// Initialize the Swagger middleware
http.createServer(app).listen(serverPort, function () {
    console.info('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort);
    console.info('Swagger-ui is available on http://localhost:%d/docs', serverPort);
}).on('error',console.error);

In case it helps, this is the project’s file structure . I am running this project within a WSL instance in VSCode on Windows, same as I have with other projects using fs.

Is anyone able to help me understand why fs can write the first log line but then break once the Swagger code gets going? Have I done something incredibly stupid?
Appreciate the help, thanks!

how to draw Line chart using chart.js and datalabels should be shown

in the above image i will not able to show the datalabels on my dots where tooltips are shown instead of tooltips i want only values shown there and my code is in this i will not get any idea for how to show datalabels on my line chart dots.this is my script by which i make the line chart accordingly to the database values.

    $('canvas.LineChart').each(function(cnvindx, cnvobj) {
var proc_id = $(cnvobj).data('proc_id');
    var dcharry         = [];
    var labelChartArr   = [];
    var ctxs = cnvobj;
    var dataChart = {
        datasets: [],
    labels: []
};

    var optionsChart = {
        title: {
        display: true,
    text: "Offered Call's Hourly",
    position: 'top'
},
    legend: {
        display: true,
    position:'top',
    align:'start',
},
    tooltips: {
        enabled: false
},
    plugins: {
        datalabels: {
        anchor: 'end',
    align: 'end',
    labels: {
        value: {
        color: 'blue'
}
}

}
}
};

    var myLineChart = new Chart(ctxs, {
        type: 'line',
    data: dataChart,
    options: optionsChart
});

    myLineChart.data.datasets[0]    = { };
    myLineChart.data.labels     = [];
    myLineChart.update();

    if(msg.myLineChart != undefined) {
        myLineChart.data.datasets[0].data = [];

    myLineChart.data.datasets[0].label = ["Offered Call's"];
    myLineChart.data.datasets[0].fill = [false];
    myLineChart.data.datasets[0].borderColor = [Offered_Call_COLOR];

    myLineChart.data.datasets[0].backgroundColor = [];

    $.each(msg.multiplebarchart, function(indx, hourData) {

        //setting line data 
        myLineChart.data.datasets[0].data.push(hourData['Offered_Call']);

    //setting X axis label
    myLineChart.data.labels.push(hourData['HOUR1']);

    //setting background color
    myLineChart.data.datasets[0].backgroundColor.push(Offered_Call_COLOR);
});
    myLineChart.update();
    myLineChart.render({
        duration: 500,
    lazy: false,
});
}
});

SunEditor + Next.js setState problem onChange event

version

  • next: 12.0.7
  • suneditor: 2.41.3
  • suneditor-react: 3.3.1
const SunEditor = dynamic(() => import("suneditor-react"), {
  ssr: false,
});
import "suneditor/dist/css/suneditor.min.css"; // Import Sun Editor's CSS File
// states
const [toggle, setToggle] = useState<boolean>(false);
const [content, setContent] = useState<string>("");
useState(() => {
  console.log(toggle, content);
}, [toggle, content]);
// render
return (
  <SunEditor
    onChange={(content) => {
      setToggle(!toggle);
      setContent(!content);
    }
  />
);

The console panel always show me that only content was changed, but toggle is not change.

I really don’t know what happen, I just want to set other states inside SunEditor onChange event, but I can’t. can anyone just explain it for me and how to fix this. Thank you.

Debug/Develop Firebase remotely with vs-code or anything

I heard about emulators and they are really cool for developing and debugging.
Unfortunately, we can’t use them for our real case and the reason next: we have dozens of integrations and making everything to work locally almost impossible or will take too much time. Currently we have to redeploy functions after every change (deploy takes us 5-6 minutes, because of related libraries)
I’m trying to find a different solution, here is what I have:

And the main question how to apply all mentioned earlier to Firebase project?
I’ll appreciate any directions, examples, experiences, docs, or other ways to solve our problem.

Number formatted with separator in Javascript [duplicate]

i have few numbers.

i want to format those number with comma(,)separator if number>999

But if number less than 999 it returns only number
99-->99

i want to get like below right side number.

9999.19-->9,999.19
899920.14--->8,99,920.14
2166593.35--->2,16,513.35

how can get these comma separator value if value greater than 999?

Speech recognition is not working in OnePlus device

I am trying to implement speech to text and it is working on most of the devices except the Oneplus (Android 11).

from this URL – https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition

if (window.hasOwnProperty('webkitSpeechRecognition')) {

    var recognition = new webkitSpeechRecognition();

    recognition.continuous = false;
    recognition.interimResults = false;
    recognition.lang = "en-US";
    recognition.start();
    recognition.onstart = function(e) {
        recognizing = true;     
        startImgThree.src = './images/mic-animate.gif';
      };
    recognition.onresult = function (e) {
        document.getElementById('transcriptthree').value = e.results[0][0].transcript;
        recognition.stop();
        document.getElementById('labnol').submit();
    };
    recognition.onerror = function (e) {
        recognition.stop();
    };
    recognition.onend = function(e) {
        recognizing = false;
        startImgThree.src = './images/mic-inactive.png';
}
}

where is the mistake please help me with that

scalling problem in shapes and controllers of svg

I want to scale in component and shape javascript but it’s not working with following svg .. can you guide me how to solve this issue???

<g text-anchor="middle" font-family="sans-serif" font-size="14" stroke="#000000" fill="#FFFFFF" type="svg-ext-proceng-pumpjet" id="SHE_6769b48c-0bde4e24">
<path d="M342,232A20,20 0 0 1 322,252A20,20 0 0 1 302,232A20,20 0 0 1 322,212A20,20 0 0 1 342,232" id="SHE_80a3b7ab-a1794e09"></path>
<path d="M302,232L322,212L342,232M310.8,223.2C316.87,230.58 316.87,241.22 310.8,248.6M333.2,223.2C327.13,230.58 327.13,241.22 333.2,248.6" id="SHE_41f771e5-37da4534"></path>
</g>