Category "javascript"

get the variable $i from counter in text

I just don't know how to make this work. I got this Javascript $(".email").on("keyup change", function() { if ($(this).val().match(/@gmail/i)){ $(".groupa").sho

Duplicate Encoder JavaScript, try to use indexOf but the output is still incorect

convert a string to a new string where each character in the new string is "(" if that character appears only once in the original string, or ")" if that charac

Find nth week recurrence on week days with moment js

I have just started moment js, I'm trying to generate recurrence for every nth week for defined week days I have tried this code so far but not getting True for

Remove the values from array1 by referring to array2

I have two arrays and I want to remove the values from array1 by referring to array2. The expected result is ["b", "c",]; array1 = ["aa", "bb", "b", "c",]; ar

Performance improvements for split screen with scroll overflow

Edit: Turns out the performance problems only happen during development. Once Gatsby builds the project, everything runs well. I'd be curious to hear if anyone

Add a function on focus and remove it on blur

I'm trying to set a simple script where, whenever you focus on an input and press Enter, something happens. Just like in those searchboxes on webpages and forum

Cannot shallow render a component using IntlProvider

I have the following component, using Flow: //@flow import React, { type Node } from 'react'; import { useIntl } from 'react-intl'; type Props = { balance: Ob

get a list of locations for indoor routing

I'm trying to add indoor routing to our HERE map. I'm trying to use the example from the sample site to start with. However I don't know the longitude and latit

Use Browser Search (Ctrl+F) through a button in website?

I have created a website and have added a button and lot of text. What I want is to use the browser search (Ctrl+F), when I press the button which I added in we

Nuxt 3 package import specifier "#internal/nitro" is not defined

I tried installing the new version of Nuxt.js with command: npx nuxi init nuxt-app Then tried just run and project in Nuxt 3 works fine. But when I tried run t

What's the error "Objects are not valid as a React child (found: object with keys {_id, name, img, des, price, quantity, sName})."

I don't understand why I'm getting this error. I want to understand what's wrong with the following code. const Book = ({ book }) => { const navigate

window not defined build error on react-editor-js

As mentioned in title I'm facing the error when I'm trying to build. When I run npm run on my machine with below fix, I get the editor working, but when I'm try

Why does `navigator.clipboard.writeText` not copy text to clipboard if it is proceeded by alert() on android

When trying to copy some text on chrome for android with navigator.clipboard.writeText() it works as long as I don't show an alert afterwards. The moment I show

How to get attribute of dynamically generated element ASP.NET

I know there are tons of questions on this topic and I've tried many of them to no avail. If anyone has any suggestions, it would be greatly appreciated. I'm tr

How can I access and process nested objects, arrays or JSON?

I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For examp

TurfJS: Efficiently locate the nearest point on a line string

Edit: The quicksort algorithm isn't actually working...😳 CODESANDBOX SITUATION I have a line string with up to 2000 points. I am trying to find the near

Google Picker API - showing only files user can share

I would like to use the Google Picker to choose a specific file from Drive, get its id and then share it with some other accounts using Drive API. The problem i

correctly create object with data

I have a loop where i iterate over the pixel data received from the method getImageData(). There I find the coordinates for each pixel (coordX and coordY). Then

Parse/Display nested JSON array with Jquery

I am looking to pull data from a job board API. I'd like to have headings for the departments (pulled from JSON level 1) and under each department the current o

Adding new line for image id to Crowd Elements Json output result

I'm creating an annotation-tool using the Crowd HTML Elements that let users annotate images with the bounding box format. The form looks like this:https://code