Category "javascript"

Display distance to marker in AR.js

I'm trying to display the distance to text markers (underneath the markers) in AR.js; according to the docs, distanceMsg is a custom attribute from gps-entity-p

Discord oauth2 /users/@me/guilds error 401

It is supposed to get all the guilds a user is joined in. It gets the bearer auth right, but it always errors with code 401. When using a external API (https://

wallet-connect importKey error when uploaded to test server, but local server it works fine

I was trying out wallet-connect for my nft market place app . i have mostly everything set up from my end . Just that my wallet-connect works perfectly in local

Combining 2 arrays into their own arrays React

I have 2 arrays that I used the map() function to add to an array, but the problem I'm having is they are being grouped by name and grouped by review but I want

Try...catch not working as expected in Google Apps Script

[Edited to include a minimal reproducible example as suggested by T.J. Crowder.] I'm working on a simple function using Google Apps Script that is supposed to

Are TemplateObject arrays for tagged template literals weakly referenced by their realm?

while (c) { tag`str0 ${e} str1` } The JavaScript runtime creates a frozen array like Object.freeze(['str0 ', ' str1']) but with an additional .raw property.

Does React keep the order for state updates?

I know that React may perform state updates asynchronously and in batch for performance optimization. Therefore you can never trust the state to be updated afte

Rebuilding e.namedValues in Index Order, Pushing to Document in Google Apps Script

I have a Google Form that has many different branches; as a result, out of ~100 questions in total, any given response only includes about 20 answers. I'm tryin

Disable pinch / zoom in IOS Safari while being in fullscreen

I have a webgl game working fine on iPad Safari I can disable system pinch / zoom actions with usual solutions (like this one: disable viewport zooming iOS 10+

Javascript print function not working inside a modal

I want to print data from a pop-up modal on my website, so in the footer of the modal, I added a print button. (The extra divs at the end are from code above):

Functions are not valid as a React child. This may happen if you return a Component instead of from render

I have written a Higher Order Component: import React from 'react'; const NewHOC = (PassedComponent) => { return class extends React.Component {

JS - How can I open a url and then redirect to another url after 3 seconds in the same tab

I have a little issue with javascript. I have a page and this page is abc.com (page A) then i have a link in this page, redirecting to def.com (page B) and when

Properly Convert Lamports to SOL

Testing out devnet and airdrops. Below is my code for a basic wallet with a 2 sol airdrop. I am trying to convert Lamports back into SOL by dividing LAMPARTS_PE

Use a class as a selector for particles.js

I have the following code which adds particles.js to a element by its id (fixed-back-canvas) but I can't seem to set it to select a class rather than id. Adding

How to implement functions from PHP openssl_pkey_get_private, openssl_sign on NodeJS?

I write code according to the documentation, where the examples are shown in PHP $data = json_encode([...]); $key = openssl_pkey_get_private( file_get_c

Electron auto updater setup with own server (generic provider)

I have my own server where I uploaded app installer via FTP. Its name is quickmargo Setup 1.0.0.exe and it's available at https://quickmargo.pl/dist/download/

check if items in array of unknown size all have the same property value

I have an array of undefined size that holds objects with the same propertynames. What I am looking for, is a clean way to check if all of these items have the

Swiper Slider - continue to next slide when video ends

I'm using Swiper Slider on my platform, I know how to set each slide timings differently but when it comes to video slides the matter is a tad more complicated.

Puppeteer - Opening Discord Profile Popup

I am building a web application for a project and I would like to send a message in a discord server via Puppeteer without using the Discord.js library. I have

Delphi and FireMonkey WebBrowser Callback using file://

I am using 10.2.2 Tokyo Enterprise and FireMonkey's TWebBrowser in an App. I wish to receive a callback response, but I don't receive a URL back when the Should