Category "javascript"

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

How to programm a bit byte converter/ calculator with this table using javascript and this html code?

How to programm a bit byte converter/ calculator with this table using javascript and this html code <table> <tbody><tr><td class="uni

Create Close-up Half Circle in HTML CSS

I was ask to create half circle-like design for my project in html css , its look like this : Figma Design but it really ""zoomed"in. i tried to make it and the

avoid scrolling when interacting with canvas on mobile

I'm trying to allow drawing using touch on the HTML canvas, but it scrolls the window when I try to draw. I've tried using preventDefault() on the event functio

Hiding plain text URL in JS (Webhook URL)

I am working on an electron JS based app, and I have a a discord webhook that logs the happenings. When the ASAR is unpacked (which anyone with knowledge can do

Can not get Facebook email for React Login/Register

I can not get the Fb profile email for React Login/Reg and can not find how to solve it. I need to get data and post my other Api. Name, picture and id comes, b

how to spy on window.location functions?

i need to cover my code with some unit tests and in one of then i have the following situation. app.tsx async someMethod( . . . windo

Nested for loop through json object array does not work

I need to build a new array based on json array (Context) bellow. Unfortunately I never reach the outer Loop after passing by first run. Is there any mistake in

Uncaught TypeError: web3 is not a constructor. the blockchain website cannot connect to metamask

i have issue on web3.eth.defaultAccount = web3.eth.getAccounts(); below is the code. it said Uncaught (in promise) TypeError: Cannot read properties of undefine

Unable to positioned the webgl canvas while capturing image

I'm accessing the webcam and trying to take a picture. this is what it looks like before capturing the pic. But this is what I'm getting after taking the pictu

Module parse failed: The keyword 'interface' is reserved (5:0) File was processed with these loaders

It is my first time publishing package to NPM. I have published simple React + TypeScript component to NPM, but when I installed and tested it, I am getting the