Category "javascript"

Javascript Transformation Missing Objects

Hi I am transforming objects I have write the following program to add newName in the array If you take a look resultedEvents, categoryName and name is missing

How to use nock in order to mock Firebase/Firestore in NodeJS?

I have a REST API which written in NodeJS. The REST API gets a file and information and then uploads the file to the drive and stores the information inside my

How to Create a Dropdown Menu with Static Items in Ember

I'm very new to JS/Ember and have been able to create a static dropdown menu that functions as desired however I've duplicated the static array of objects that

Simple counters - dataset not working properly

I am working on a site that has a lot of counters and I have a problem getting the [data-speed] to create different counter speeds depending on the number in th

ERR_BLOCKED_BY_RESPONSE.NotSameOrigin CORS Policy JavaScript

This is the image URL I got from an api https://scontent-jnb1-1.cdninstagram.com/v/t51.2885-15/e15/242204298_1728375270686500_5634415857798350440_n.jpg?_nc_ht=s

Bootstrap multi row selection from table data and post to Flask backend

What I want to do is to let my users select multiple rows in a table and them hit a button to send this data back. My JS script file looks has the following: &l

How to make interactive active line when clicked with react

I have 3 lists of a clickable links, so when you click one you go to that section and the line too. so this is my code : <div className="description-containe

ReactJS 17.0.2 seems to call function again when putting value into DOM

There is a strange behavior when running ReactJS 17.0.2. I have a function that generates a random number outside of a component. I assign the return value of t

Query to get most popular musician with an aggregated field sum

I have the following database schema: model Music { id Int @id @default(autoincrement()) createdAt DateTime @default(now()) updatedAt DateTime

Horizontal click and drag scroller for multiple sections help, works for only one

So I have a horizontal scrolling feature which works great in JS but only for one section with the classname, any other section that shares the same classname i

How to make the slider work in a BS collapse element?

So I am using Bootstrap to create my collapsable elements. I am also using a range selector cdn, and I'm thinking there might be some styles from the BS CSS, sp

What are the options for 'Date.toLocaleString()'?

According to the MDN documentation for Date.toLocaleString(), the second parameter is an options parameter: toLocaleString(locales, options) Which they use in

What is the equivalent of 'beforeselect' event for combobox in the ExtJs modern toolkit?

I am converting an 7.2 ExtJs application from classic to modern. In the conversion there is a classic combobox that has a 'beforeselect' event listener and it i

How to make a Post Request with XML using Axios?

I have a Network error with Axios, using the following code : const getXMLNS = (number) => { return ( '<soapen

How can I keep the text highlighted with JS?

I'm working on a conceptual project. Text reaveal on selection with highlight. I have to keep the text highlighted once it is selected. <div class="reveal" i

TypeORM error when trying to create migration in CLI

I'm trying to use the TypeORM CLI to create a migration. I followed their guide but when I run yarn run typeorm migration:generate I get the error: $ typeorm-ts

Sorting object property by values

If I have a JavaScript object such as: var list = { "you": 100, "me": 75, "foo": 116, "bar": 15 }; Is there a way to sort the properties based on

D3.js Heatmap colors based on variable value instead of value for the whole table

I want to create a heatmap which shows the heat/color based on the value of one variable over all groups but not over all variables. Currently I have the follow

Can't disable controls in a youtube video

I am running a content.js on a youtube page and i want it to disable the controls of the youtube video. I am getting the video by video=document.querySelector('

How to access a property inside an object and use in another method? javascript

I need to create a method to return a customers name and bank account value like so: *bank.printAccount('Sheldon'); // this should print 'Sheldon account is 0'*