Category "javascript"

Spreading an array inside an object gives unexpected result - Javascript

I have two arrays of objects with the same keys and I want to combine them and create a new array of objects. I am able to get almost everything right, but the

Next.js - router.push without scrolling to the top

I am using router from next by importing useRouter from next/router. I am trying to find a solution which will not scroll to the top of the page when I change t

_enzymeAdapterReact.default is not a constructor when test jest

I'm having this issue when test react-native component with jest and enzyme TypeError: _enzymeAdapterReact.default is not a constructor Here is my dev dependen

Javascript directions service not working? DIRECTIONS_ROUTE: NOT_FOUND

In my Laravel blade file, I am trying to get directions to display between 2 markers when I select between 2 drop-down lists. However, whenever I select a dropd

Connecting OHIF viewer to Orthanc Pacs Server

Orthanc is running on port 8042. I have run the following commands to view the images in my Orthanc pacs, through the OHIF viewer which is running on port 3000

React Native and WalletConnect (Uncaught Error: null is not an object (evaluating 'RNRandomBytes.seed'))

I want to use WalletConnect on my ReactNative app. As the WalletConnect docs say, I'm using npx rn-nodeify --install --hack (for introducing support for Web3) i

How to connect Metamask based on the input wallet adress

When I type a wallet address and press the Save button I want to show a Metamask sign in popup to that wallet. for now, It's just randomly connects with the sel

Appending strings to JSON Files

consider the following code snippet: let proposals = JSON.parse(fs.readFileSync(proposalsFile, "utf8")) proposals[network.config.chainId!.toString()].push(propo

Nodejs and SQLite how create multiple tables?

I have question about creating multiple tables in one DB. I try to run for 2 tables, but seems after the first db.run(CREATE TABLE , second db.run(CREATE TABLE

I found 404 Not Found when I installed npm package from local directory even packege exist in nodemodules

I installed a npm package from a local directory. The package installed and is present in the node_modules directory. But when I access the package it’s s

Concatenate Object values with javascript

const person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"}; Im trying to concatenate firstName and lastName to get another object. const person

Error: PollingBlockTracker - encountered an error while attempting to update latest block: undefined

I'm trying to develop DApp on polygon blockchain. Basically I'm minting NFT but after few mints I get this error. It even happens when I don't mint NFT. Here is

Trading View API is not able to show the price on price-scale when it's small

Check my OHLC Data for Plotting Candlesticks with Trading View API. I am using this HTML and Script to Plot the Data : <!DOCTYPE html> <html> <he

Variable send from HTML form is undefined in Javascript

When i the variables i set in HTML can´t be found in the function in Javascript. The console.log only states "undefined". I think the Problem is, that "re

Recursively update nested object values for specific keys based on another object

*** UPDATED object structure *** I'd like to update recursively the property values of mainObject from the properties that exist in updatingObject. let mainObje

How to make Slick swipeToSlide vertically?

I'm trying to make a navigation vertical carousel compatible with IE11 i'm using slick library for the carousel, i'm having some issues with swipeToSlide option

how can i make og:url meta tags work in node js

I'm trying to share articles with facebook, this is my code: <!doctype html> <html> <head> <meta property="og:url"

Merkle Proof in python using Keccak256

I'm trying to create a whitelist for an NFT using a Merkle tree to save on gas costs. I saw a great implementation here, in javascript, but I would like to do

Cookies NodeJS not getting saved

Unable to set default cookies in nodejs working fine in contact can anyone see what I am doing wrong the call from front end is handled let handleSignInS u

React Context API - dispatch is not a function

Implementing a Log in system with React Context API. When submitted the form with user credentials, getting an error. Error: Unhandled Rejection (TypeError): di