Category "javascript"

How to handle React props correctly

I posted this here because I am relatively new to React and didn't know what exactly should I google. In my React project, I have a kendo grid that has a custom

Discard audio before certain time from Hls.js stream

I am using Hls.js to live stream an audio feed into an audio element in my HTML. In my custom audio controls I limit the user to only be able to scroll back to

Generate chart in table cell according to json values

I need to create a bar or column chart inside a table cell of each row. i.e I need a graph to be populated for each category inside table cell. JSON: [ {

How can I add a cover image to a Discord Scheduled Event?

I have created an event through the Discord JS Library, and would like to add a user option to add a cover image. The code below is working fine, but the image

Add an opacity slider to a leaflet map generated in r

I would like to add an opacity slider to a leaflet map generated in r. It should change the opacity of the uppermost visible or all visible layers (either of th

How to .map around things inside another .map

I have a main array of options and inside it there are array of values, I am using vanilla js and want to map around the first array (options) and then inside t

Build a dynamic interface for Object in angular

I have an JSON Object received from an api call and the Object will have multiple values but all of type string. How to I write an Interface for such an Object

How to calculate a mouse position like 0 will return -8 and 1000 will return 8 number?

As I'm trying to get into animation using a mousemove event I encountered a problem on how to get the specific number with a limit in both left and right direct

How to global import a stylus file in vite

Now I'm try use vite to create a vue app. But have trouble to global import a stylus file in vite.config.js. I try the code from vite docs. export default defin

Why browser.downloads.dowload hits into "undefined is not an object" error for Safari extension?

While trying to port my extension to Safari (using xcrun safari-web-extension-converter) from Firefox add-on, the browser.downloads.download implementation in m

How to render specific array item to a different screen? React Axios

How can I display information of a specific array item in the different screen? The data is displayed from the backend on HomeScreen and upon clicking on one of

What do querySelectorAll and getElementsBy* methods return?

Do getElementsByClassName (and similar functions like getElementsByTagName and querySelectorAll) work the same as getElementById or do they return an array of e

Toasty does not autoclose or manual close after hook list

I modified the code to generate a toast stack into a ToastContainer dynamically as a notification system. Now the toast do not autoclose even in close button cl

Why is this variable from the Redux store not in the `this.props` on React page?

I have a variable that I believe is correctly written to my Redux store using a Redux action and reducer. But for some reason it never becomes part of the props

Sequelize query returning the wrong number of rows when models are included (findAndCountAll)

The following code should return 12 rows (req.query.limit = 12). This works fine if I don't include any associated rows, but when I include the related models i

How to tell the Highcharts renderer to make the viewport bigger?

In the past I have drawn tables below the chart based on the series. This works because I can tell Highcharts to vertically align the legend, move it to the le

Creating service in React Typescript using axios

There are two different ways to create a service and call from the required funtional component. 1. export const userProfileService = { ResetPassword: asyn

Differentiating custom Typescript Interfaces that have the same fields

I have a custom interface like this: interface Pointer<T> { id: string } id is a pointer to other data structures, but the id field doesn't contain inf

how to stop multiple notifications changing positions?

i have a small notifications problem, when i insert a element the position of first element is changing so i wanna make it when the element is inserted the firs

How to do a simple string token replacement in Azure pipelines?

In a YAML release pipeline, I need to do a simple replacement in the js files contained in the artifact coming from another pipeline. These files have a certain