Category "javascript"

Java Script: How to check if value is number with typeof operator

How do I check in the if statement if _energyLevel is a number? I need to use the typeOf operator for that. Thanks for your help :) const robot = { _model: '1

Is there a built-in Three.js heightmap function?

I am currently working on a game in JavaScript, in Three.js. I am curious if I can add a height map to the walls that I have to make them more realistic (see im

Replace multiple strings from CMS in Javascript

This code currently gets 'dynamic words' from the CMS and changes those to span's, which get a eventlistener on it whereas you click on them, something happens.

Tone.js with ESM modules

I am trying to use tone.js on ESM modules. (I could use it without problems in “commonjs” with a bundler) In the html I have <script src="tests.j

Can't access my pages by URL, only by links in next js [duplicate]

I have an application built with next JS. It works fine in development, but when published to the internet, I have a problem. The only way I c

JQuery UI not applying custom style sheet

Not sure what is happening i have notice that our live site vs a dev enviroment the style sheet shows just fine in the head and in the network traffic - however

Display as much elements as it can fit in one line, and if not all of them can fit add additional element that represents number of remaining elements

I would like to align all tags for a given article in one line. If all the tags can fit in one line, then I want to display all of them, like this: But, if the

Why is it appearing for a split second? javascript

I'm new to coding and am trying to make a game for school, when i submit my name into a text box it is supposed to proceed to the next page but it only flashes

Convert deprecated @include with regular expression to @match in userscript

Tampermonkey has a deprecation warning in for the @include statement for my user scripts: // @include /https\:\/\/([a-z\.]*\.)?(((stackexchange|askubuntu|superu

How to ensure that a job is processed only once with Firebase

I am adding tasks as Docs in a Firestore collection. On the Backend, I have multiple NodeJs stateless instances that process these tasks. All the instances are

Return Array After For Loop

Having a hard time understanding for loops in arrays. Trying to create a Thank You card creator and these are the steps I'm trying to follow: Create a new, empt

how to create a discount removal link in shopify

I am trying to create a discount code form for my ajax cart and for that i am creating a discount code link that will add and remove the discount code in the ch

How to invoke awaiting js fuction in razor pages c#

I'm using SignalR. I want to send updating request by websocket for each elements in foreach to update timer. But i'm getting error.Maybe connection can not get

Hwo to change dynamically the last two parameteres?

I have the followng string https://picsum.photos/id/1025/4951/3301 I need to replace here the last two numbers 4951 and 3301 with 200 so at the end i will have

Replacing System.Windows.Forms.WebBrowser with Microsoft.Web.WebView2.WinForms.WebView2 in WinForms apps

I am upgrading a WinForms C# .NET 4.8 Framework application and replacing the embedded browser System.Windows.Forms.WebBrowser with Microsoft.Web.WebView2.WinFo

My timer in Reactjs is not working correctly with a delay

My timer in Reactjs is not working correctly with a delay... I noticed that over time, my timer starts to lag if I switch to another browser tab or window. Why

Firebase signInWithEmailAndPassword and onAuthStateChanged Realtime Database logging issue

I'm working on a webpage using HTML5 CCS etc, where it uses a authentication process using firebase for users. Its my first time ever working on firebase, so i

React difference of using value in state vs value in object in state

I am getting different behaviour depending on whether I am using a boolvalue on with useState, or whether I am using a bool value inside an object with useState

Extending Vuetify's VBtn component to create a reusable icon button component

I've been using the example Codepen (https://codepen.io/whoistobias/pen/yLNgjwy) to try to extend the Vuetify VBtn component to create a reusable Button Icon co

Minimize chrome ribbon button in python selenium

I have python selenium code to expand chrome button as mentioned below. button.click() And it expands button like this: Now I want to minimize button. Is ther