Category "javascript"

Adding Images from a image folder dynamically to a div box

I'm trying to create a random number generator where based on the number an image is chosen from the img folder that is on the same hierarchy as the CSS folder.

Chart.js Uncaught TypeError: Cannot read properties of undefined (reading 'options')

Edited the Details as I found a solution to display the Chart with the right datasets. Code Below will show the Two Charts, which visually looks great but butto

Getting error while verifying phone number in firebase (angular project)

I am working on an angular project, where I am adding MultiFactor Authorisation using firebase authentication, I am trying to verify phone number by firebase.au

JSF <f:websocket> connection fails (Jakarta EE9, JSF 3.0)

I am trying a simple websocket application using Jakarta EE9 and JSF 3.0 on a glassfish 6.2.5 server. When I run it, messages are not received, when the server

Get remaining days, hours, minutes, seconds to date with date-fns

I want to get remaining full countdown of next instance of weekday (for example next Thursday), I have two functions: FIRST: gets instance of next Thursday SECO

What does () mean if set as a interface property?

In the Vue.js source code (packages/reactivity/src/effects.ts), I found this: export interface ReactiveEffectRunner<T = any> { (): T effect: ReactiveE

Run setTimeout with changing time values

I have an array of objects containing a field duration that specifies the duration that the Object should stay visible. Each Object of array has it's own durati

ngSubmit not working (Following Traversy Media Angular Crash Course)

My ngSubmit is not working. The problem is that I am trying to follow Angular Crash Course this tutorial at 1:30:00 mark he tries to add in onSubmit alert and I

How to prevent WebGL from clipping outside bounds when drawing a wavy circle?

I have a shader that draws a bunch of instanced circles, and it works great! It works by basically drawing a bunch of rectangles at every given location, and th

How can I get the indexes of a filtered array items

I have this situation, I have an array and I need to filter it and get the indexes of the filtered items, like this example: var arr = ['2022-05', '2023-01', '2

Passing FormData/File Object from content script to background script in chrome extension with Manifest V3

I'm building a chrome extension where I get a file as input from the user and pass it to my background.js (service worker in case of manifest v3) to save it to

Telegram bot and google apps script not working

Good evening everyone, forgive the trouble, I tried to do a "search" on the site but I could not find the answer to my problem so I thought of opening a new dis

Stored Procedure Snowflake - time formatting issue

var get_end_time = "select CURRENT_TIME()"; var time_sql = {sqlText: get_end_time}; var time_create = snowflake.createStatement(time_sql); var time_exec_end = t

Display data after POST request without reloading page

I have this node.js app where you can post comments on teachers profiles. teacher.ejs <!-- Form --> <div class=""> <form id="commentsForm"

How to get unique client/device id

How to identify user of my website in IP non-based way? I'm looking for something like fingerprint2.js, but user identity should be the same no matter if user c

AWS Lambda@Edge 502 LambdaValidationError in CloudFront for redirect

I have a lambda function which performs 301 redirect if it has uri that is generated using regex. const redirects = { xyz: '/contact', abc: '/about', };

Custom Text in a href

Can someone help me how i can manage to support this to work with translation text option. <a href="{{url('account/my-review/delete/'.$value->id)}}"

How to get checked State in functional child component

I'm struggling with a simple problem in ReactJS. I'll have two functional components one parent component (list with elements of child) and one child component

Render between start and stop button in React Native

I wanna render between displaying a start and stop button based on pressing the buttons. That means if the start button gets pressed the stop button should be s

cannot call googleapis library inside html

I've been trying to call a simple function (uploadFile(test.txt)) inside an html but I can not call neither my app.js or googleapis library node.js gives this e