Category "javascript"

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

React-Tooltip not displaying until page is refreshed

Bit of a weird one here. My website is virtually done, there is just one issue. I've implemented tooltips, but they only display once I refresh the page! Here i

Variable not displaying on Screen

I've set condition for when a user enters numbers into a text box depending on what the numbers entered start with on screen it should display the name of the c

How to write custom select/checkmark logic for material-table, to include selected rows inside of detail panel nested material-table

I have a material-table component where I am rendering a nested materiel-table in the detail panel of each row. I would like to know if there is a way to includ

how to create a user in postgres to connect to nodejs?

It is my first time using postgres and I am trying to use it with node. I installed postgres in Ubuntu and created the user admin sudo -i -u postgres createuser

How to make an arrow function in react so that it executes only once and saves the data in sessionStorage

I am developing an application in react.js and I need to implement a request to Active directory to extract the information of the logged in user, through Micro

Javascript method to capitalize the first letter of every word and also every word after hyphen or dash

I need a JavaScript method to allows me to convert the first letter of every word in a string to a capital letter like this: mike tyson wayne to Mike Tyson Wayn

Chromium bug when input has focus and affects hyperlink text font weight on black background

I found a slight glitch in the hyperlink anchor tag text block. When you have a black background and have focus on an input and a hyperlink to the right or unde

Typescript error TS2583 Cannot find name 'Set'

I have just started learning Typescript today and when I run tsc app.ts I get 11 errors but I thought I would start with the first. Tried updating tsconfig.json