Category "javascript"

React get value of object from localstorge

I get data from localstorage. I used useEffect. But when I want to get a value in object, I got problem. const [carinfo, setCarInfo] = useState(); useEffect((

Calculating part of area inside zone. Fabric.js/Canvas

I have an area (in this case, the Kitchen area with yellow borders), inside this area there are other shapes (numbered 1 and 2 light blue color) that divide the

Error in getting table row value to be deleted/updated. String input as undefined

I am making a simple CRUD function for a bill management system. It uses Jquery AJAX JSON to communicate to the servlets. The update and delete functions are ac

How to display data from client service in ngx-wheel Angular

I want to display the ngx-wheel using api but I'm having trouble displaying the data. Here my Service : import { Injectable } from '@angular/core'; import { Htt

MediaSource never emit sourceopen event in React

I'm trying to stream a video file using Javascript's MediaSource API in a React custom hook. Here's the snippet of my code: const useMyHook = (videoRef: React.M

Angular 8 ERROR Error: Unable to find context associated with [object HTMLDivElement]

Just another day in the office, right? What once worked is no longer working. Yay! I am supporting an Angular 8 web application and attempting to kickstart loca

useQueries how to get response for a certain query

Is it possible to distinguish the response, we get from useQueries. For example const ids = ['dg1', 'pt3', 'bn5']; const data = useQueries( ids.map(id => (

ln-service (npm-package) [ 400, 'ExpectedLndToCreateNewInvoice' ]

I'm using ln-service package and I'm connected to a local instance of lnd node (created with polar). I'm using plain js. import lnservice from 'ln-service'; l

Failing tests -> Cannot read properties of undefined (reading 'rpc')

I was writing a test in TypeScript for Adding two numbers. I am receiving the following error: Adds two numbers: TypeError: Cannot read properties of undef

Why .getMinutes() output as :0 instead of :00 in JavaScript?

The .getMinutes() method only outputs one integer ‘0’ instead of two integers ‘00’. Why does it do this and is there a simpler way to fi

Custom place of filter input in react-bootstrap-table

I'm using react-bootstrap-table and I want to place the input filter of table columns in top of the table not on top/bottom on the column (default behavior). I

Multiple locales with date-fns in ReactJs

Using date-fns, i am trying to add multiple locales in my app, before i hade one only locale so the import was simply like this : import {fr as locale} from 'da

Adding a function to imports routes in app.use()

Hi everyone I have an API and I have made a function to check if a user is authenticated, if he is then the API redirects him to the home page else to the /logi

How to search for specific fields in an array of objects containing objects in a document and update them in firestore (firebase) (JS)

// Update the other user that current user has asked for revision export async function updateOtherUserForContractRevision(contractID : string, comments : any)

dynamic classes with tailwindcss and eleventy

I am using eleventy.js with tailwindcss and postcss. In my setup, postcss does not seem to recognise dynamic classes like md:pl-{{(loop.length-loop.index+1)*2}}

How to independently set a button click in react?

I am trying to figure out on how to set a button that can independently be disabled when using the .map function. So I created a state whenever the button is cl

canvas not adding image from url (base 64)

i am working on project where i want to create a min preview for canvas. so when any change happen to canvas eg: user added text to canvas , the canvas will be

Is there a way in Acrobat (ios or android) to send an email of a completed PDF form to an address that is entered in a field on the same form?

I have some javascript in an acrobat form PDF that works fairly well on a PC, but doesn't work on an ios device. My goal is to send an email to an address that

Files With A Tag in ObsidianMD

I'm trying to write a plugin that fetches the list of files containing a particular tag (like "#condition") in ObsidianMD for some downstream purposes. The buil

`puppeteer-page-proxy` with `https` has Error: net::ERR_FAILED or RFC 6066 error

I use puppeteer and puppeteer-page-proxy proxy. I don't have problem with use args: ['--proxy-server=socks5://127.0.0.1:9150',... with either http and https. I