Category "javascript"

Typescript: object with classes as a values

Let's say I want to build a proxy class from this question's accepted answer. So I need to prepare some object which contains all the classes as values: class C

wait for function execution before executing next instruction

I'm trying to upload images to firebase and get the download Url and save the url in the firestore in the database. The code was working until I modified it to

Amadeus Api Coverage

I am designing a website as an a travel agent using Amadeus Travel Apis. I am curious about the coverage. My main market is going to be China. And I want to mak

Javascript - sort an array of multiple objects of objects

I tried with no success to sort an array of multiple objects of objects. Here my database : var jsonDatas = [ { "type": "Voiture", "item

Find longest sequence of zeros in binary representation of an integer in JavaScript?

Well in this question I have to find the longest sequence of zeros in the binary representation of an integer. After a lot of hard work, I'm able to find the lo

How can I get React.js TypeScript to accept 'parentElement' on 'event.target' with a onKeyDown event?

I have a special accessible element built with React TypeScript and I am trying to define keys to navigate it and to be able to focus within the table element.

Strapi v4 REST API :GET image [closed]

please I am working with the new strapi v4 and... In the old versions of strapi all I needed to do in order to get the image from my collectio

How can I hide the userid of a user from the session storage while inspecting?

While storing data in sessionStorage for a react app, I can't hide the user's userid in the browser. How can I do it?

How to check date within two given dates and return true or false

I am trying to verify whether the given date is within the two dates. I tried based on online resources I find using below methods whatever I tried code returni

Uncaught TypeError: Cannot read properties of undefined (reading 'common')

import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; const CountryDetail = () => { const {countryname}=u

How to check date within two given dates and return true or false

I am trying to verify whether the given date is within the two dates. I tried based on online resources I find using below methods whatever I tried code returni

Uncaught TypeError: Cannot read properties of undefined (reading 'common')

import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; const CountryDetail = () => { const {countryname}=u

My BMR calculator is not showing a result

I wrote this for a Bmr tool on my website. I don't have much understanding regarding html CSS just started learning this. . On running the snippet is not showin

My BMR calculator is not showing a result

I wrote this for a Bmr tool on my website. I don't have much understanding regarding html CSS just started learning this. . On running the snippet is not showin

Node/JS mongoose REST API How to push a new object into a nested array of objects all in one collection

Noob MERN Stack Dev here, I am building a little food delivery practice web app. I have begun creating a basic RESTful API to serve my food delivery site. I am

Socket.io is working on localhost but not working after deploying heroku?

Here is the code of my socket server const io = require("socket.io")(8080, { cors: { // origin: "http://localhost:3000", origin: "https://mern-bubble.he

Copy Text from one browser window to another programmatically

I have this two browser windows, which are opened for each order on an apparel list with about 18K orders. I have to manually copy the values from the first win

Tailwind V3 causing TypeError: Cannot read property '500' of undefined

I recently tried to upgrade my project to tailwind css and I'm getting this error this is my tailwind config module.exports = { mode: "jit", purge

Saving html code to a database if the font family has double quotes?

I do a simple text editor. With the javascript select option I add font-family to innline-style and change the font-family style. After that I need to ajax-save

React-scripts test: no traceback on exception

I remake browser version of TacticToy game with React, and during unit-tests writing I've got a problem: there is no full traceback of a custom exception, only