Category "javascript"

How to scrape a data from a dynamic website containing Javascript using Python?

I am trying to scrape data from https://www.doordash.com/food-delivery/chicago-il-restaurants/ The idea is to scrape all the data regarding the different resta

After Effects Scripting - Set ease() for slider

I have an Audio Amplitude layer in After Effects and I want to programmatically add the following expression to the "Both Channels" slider: ease(value, 40, 55,

openlayers map.updateSize when the width of the map changes

when displaying a side panel, I would like the proportion of the map to be kept inside the new div width (or height). There it is simply reduced, which affects

paste image in Whatsapp chat using js in chrome extension

I want to paste image from my clipboard to whatsapp chat from clipboard i tried using document exec command with different parameters like insertHTML , insertIm

Flask-SocketIo always using Polling

I have made an web app with flask and implemented socket-io in it using Flask-SocketIO but it is continuously using Polling method instead of Web Sockets. My JS

Not able to load image using img element in ReactJS

Api: http://api.openweathermap.org/data/2.5/weather?q=Canberra,Australia&appid=8d2de98e089f1c28e1a22fc19a24ef04&units=metric Image Source I want to load

Binding button with keypress in Vue3.0

I am trying to trigger the button when mouse clicked it or a key is pressed and I get confused about communication between components. How should I call pressDo

Unable to catch Network Error when sending request using Inertia + Vue

While sending a this.$inertia.patch request I'm unable to catch a Network Error. I'm turning off the backend server to emulate a lost connection. The console sh

Javascript swiper not defined

var swiper = new Swiper('.swiper-container', { navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }); I have gotten the co

Is there a way to handle number inputs instead of string with React Native?

I have a react context state for my multi form input values: const [formValues, setFormValues] = useState({ sex: "male", unitSystem: "metric", hei

How can I remove the last comma from a map?

I have, { mydata.map(({ name }) => ( <p style = {{ display: "inline" }} > { " " } { name }, </p>)) } How can I remove the last c

Cursor is going at the start automatically in contentEditable

I am creating a website builder. For Text edit, I m using contentEditable and to capture its state I m using the onInput event. but I don't know why every time

How to add module aliases to Jest testing in Next.js?

Currently I am using automatic imports in my Next.js project, configured by jsconfig.json in the root directory: { "typeAcquisition": { "include": ["jest"

Discord.JS Avatar Command using User ID

I want to use the avatar command using user id's/mentions. I was able to use mentions, however I am unable to use the user ids. Here is my current code: const D

react-video-js-player "No compatible source was found for this media"

I am working on a product that takes a file from API and read as a blob. But pressing the play button on the video does not work. I have tried using tried using

When I try to install material ui icon dependency face this error

npm i @material-ui/icons npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected]

Custom cypress commands is not assignable to parameter of type 'keyof Chainable<any>

In a .ts file I create a test to try and access a custom created command from command.js, createInbox function is underlined with red with the following message

How do I read a file and change every line in it?

I need to read a multiline txt file and do some manipulations with each line. I'm trying to use readline but I can't figure out how to use the lines it reads. H

How to throw "expressive" / console friendly exceptions in JavaScript?

JavaScript noob here... I'm exploring various options for throwing exceptions. Throwing a string / primitive value This seems to be bad practice for several rea

Datatable undefined error obtaining row data

I'm having an error getting the data of a row in Datatables and I can't figure it out why it's happening. Reading the Docs, getting the row data it's as simple