Category "javascript"

How to refresh a select list in html

I have a drop-down list where depending on the selected value, the next drop-down list shows specific values. when changing the value of the first list and then

AWS authorizer returns 500, message: null, with AuthorizerConfigurationException error in response

I've spent the better part of today trying to make authorizers work, I've checked multiple examples and they all seem to be doing the same thing my code does. I

Map object not setting values after execution of function

I have a function below where the purpose is to parse multiple local csv files. For each parsed csv file, I then grab 1-5 random elements. Since the CSV parser

JavaScript - How to extract strings - keys/values from response using RegEx?

I am very new to regex, and I want to extract some data from API responses. I have a response from my API call: { server: 'nginx/1.21.0', date: 'Mon, 25 Apr

Is this Next.JS folder structure recommended?

We have resorted to this following project structure |- pages |- <page_name> |- index.js # To do a default export of the main com

Convert async function consul.kv.get to sync function with deasync

I am trying to convert an async function consul.kv.get to a sync version of the same function. Searching led me to deasync and it's documentation suggests I sho

How to toggle boolean state in React and TypeScript?

I am new to React and TypeScript. I want to toggle a boolean state (true/false) with a handler function. I've read other posts about how to do this in ES6 but

Why typescript keep giving me No inputs were found in config file error?

Why typescript keep giving me No inputs were found in config file error? When I use tsconfig.json in vscode, but when I try to build it, it gives me a 'No input

Cannot redefine property when trying change property of a global variable

How can we set custom getter/setter on already existing global variable? A straightforward approach fails: var myVar; { let _myVar = myVar; delete myVa

get folder directory from input type file - PHP

just a quick question, mission is to get a folder directory name. example: _C:\ThisFolder\myFolder_. and I've used html input type="file" but I'm only able to

How can I convert a windows path to posix path using node path

I'm developing on windows, but need to know how to convert a windows path (with backslashes \) into a POSIX path with forward slashes (/)? My goal is to conver

Get value from radio button Angular Material Dialog

I have Angular Material dialog , where I updating table clicking change status. I need to get value from radio button in my dialog Here is full working exampl

How do I check if a file name includes a variable in javascript?

So I am trying to make a save file system thing, and it creates a file with your username, but when you log in it checks the user saves file to see if theres a

getFieldDecorator rules for password to contain lower case upper case letters and numbers?

I am working on a react app and the views are built with Ant Design, I am validating a form and I don't know how to validate the password to contain chars of lo

Jest: ReferenceError: global is not defined

So I am writing unit test using "react-testing-library" on Jest and I have this error: Test suite failed to run ReferenceError: global is not defined

is there a way to prevent repeating code in html I'm using bootstrap 4 collapse like 20 times in one page

<div class="card" style> <div class="card-header" id="headingOne"> <h5 class="mb-0"> <button class="btn btn-lin

A-frame consitatnly animate gltf to go to position of camera A-frame

I am creating a vr scene using A-frame (https://aframe.io) and I am wondering how can I animate a gltf model to always follow the camera. For example, I would l

Getting error exponentiation operator for BigInt

When i am trying to do (BigInt(Generator) ** this.privateKey) % BigInt(Prime) i am getting error: Exponentiation cannot be performed on 'bigint' values unless

How to map more than one property from an array of objects

I have an array of Object as follows: var obj = [ {a: 1, b: 5, c: 9}, {a: 2, b: 6, c: 10}, {a: 3, b: 7, c: 11}, {a: 4, b: 8, c: 12} ]; I know about how

Visual Studio Code - How to display variable values inline during debugging?

When I debug Javascript code in VS code or visual studio code, I would like it to show me the values of the variables alongside the code. How to make VS code do