Category "javascript"

Retry react-query based on result

I want the query to retry until the expected result is met. How do I pass a condition into the function to decide if the query succeeded or not? export async fu

Ruby on Rails - javascript(s) folder and application.js missing

I'm new to Rails and trying to use some Javascript, but everywhere I go I see application.js mentioned, but it's nowhere to be found in my directories. I follow

jQuery timer function iterates through close and stop function

I have written a small timer function. The goal is that when the div is visible, the timer starts and when I hide the div, the timer stops. Problem now is that

Newbie - Google Sheets Web Form Debugging

Simple contact web form. I cannot figure out why it does not work as intended. On open sets up a menu, allows me to select a modal, non-modal or sidebar for for

make Hamburger Nav sticky on Scroll and responsive on all mobile media queries

I am trying to make the navbar Hamburger on mobile view responsive and sticky on scroll on 320px, 375px, and 425px screen sizes. I would like to have a solution

What is the definition of "parent component" in React?

What is the definition for "parent component" in React? eg. const A = () => { return ( <B> <C/> </B> ); } Is A the paren

Issue with getLastRow(), output includes the empty rows as well which I do not want

getLastRow() not working in my script. I am trying to return the last row that has data. But since the spreadsheet has empty rows below the rows filled with dat

Setting textures on a model (Maya or Blender) via Java?

My task is: after selecting the user settings in the web application, this application must create a 3D model according to its settings (this building model wit

Trying to make a magnifying glass for html canvas that views cgm images

I'm attempting to build a loupe for a cgm canvas viewing application. I am trying to draw the main canvas containing a cgm image onto a smaller canvas that is

Trouble with JavaScript 2D array and nested loop

Will you please explain what I'm missing? And possibly what I can do to fix it. I'm receiving the error: TypeError: Cannot set properties of undefined (setting

How to force AWS Timestream to always interpret a number as double in an IoTCore rule?

Sensor payload decoders are mostly provided as javascript code by the sensor manufacturers. As I'm using different sensor types, I want to use the original deco

This is confusing, is there any tips so I can understand this better? (OOP Inheritances)

I am having difficulties understanding what to do here. Please bear with me I'm new to JavaScript and this section is giving me a hard time understanding how I

Images disappear in production build of React because the wrong path is generated

this is my first time posting here. I am having a problem with how the production build paths to my images are generated when I run npm run build. I have some l

How to access element from html that is stored in variable?

I have HTML that is stored in a variable. I am trying to figure out how do I access it. Fo example if I want to get element values by id or class name or apply

How can I use the filter() function to filter this set of data from API?

API Call code: const settings = { "async": true, "crossDomain": true, "url": "https://v3.football.api-sports.io/fixtures?date=2021-04-07", "method": "GET", "hea

Need help using a node js state-machine-cat API

I'm working on a UML project and needed a tool to render State Machine Diagram on a website. I found this cool API but I don't understand how to use it, I'm ver

react native e-library app error-failed to resolve dependency 'firebase'

I am in the middle of creating a simple library app. Here, I am trying to use firestore database in firebase console. I am coding this on the expo snack editor.

How to get document after user has logged in using google auth in firebase?

I want to fetch user information stored in firestore after the user has logged in using google sign in. I am checking whether the user exists or not. If the use

How to access the error message using yup and react-hook-form through formState?

I'm trying to display the error message I set using yup validation - my schema for displayName looks like this: displayName: yup.string().required("Please ente

How do I make stacking cards with CSS and JS?

I created the effect I want below: const container = document.getElementById("container"); const boxes = document.querySelectorAll(".box"); const clearBtn =