I am using a firebase onSnapshot method to use realtime data in react native app and wrote a separate async function to listen to the firestore as given below, I am using useEffect to call this function and I want to return the subscriber method returning from the firestore as a cleanup function. I know that …
Swipe Event on HTML
Im trying to make a swipe event , on page 1 its can be swipe to the page 2 , but from page 2 its not working , what is wrong here ? its only works on page 1 , what shall i do ? (Page mostly code , i need more char) Im trying to make a swipe event
how to resize a HTML browser window with javascript using Chrome
I have a program where I place the element using CSS in % of window height and width. When opened in a monitor with different resolution (only if the ratio height-width is different), the elements are a little bit misplaced. My solution is limit the height of the window when open in Chrome, so I can keep the …
My Discord.js Bot welcome message suddenly stopped working
so I made a Discord bot, the welcome message was working for the first 3 months or so but suddenly it stopped working, can I asks why? I had been searching as to why it does not work but I couldn’t find why. Thank You before. Answer Hey there your issue is because of recent gateway changes of the Discor…
convert single array by two dimensional array by 6
I am trying to convert and merge my single array to two dimensional array. I use map for that but I can’t achieve the output I want. May I ask any suggestion on how to achieve this? The data is below: And now my expected output is: What I’ve done so far is https://jsfiddle.net/jc3v25bs/. I can dis…
How to use async/await to get input from user but wait till entire condition statement is read before resolving?
I created a function that prompts the user for a URL, then validates that the entered input is actually a URL. The issue is, when I call this function from my other function, I have been able to get it to wait for user input before but it doesn’t go through the entire condition statement before returnin…
Why is my iframe causing the rest of the page to go blank?
I’m trying to make an iframe that embeds on any web page where it only shows up as a button on the bottom right of a webpage and when clicked open an about 100px by 100px box that is also embeded on the web page in the bottom right corner. The issue is that every time I put the iframe
how to prevent sending data if captcha is not resolved successfully
I have an input and a google recaptcha and need to send input value only if the captcha is solved after page reload the value of grecaptcha.getResponse() is an empty string when captcha is resolved by a single click – the value is a long string – differ after each page load how to know what is the…
Translating JS crypto.createHmac to Xojo Crypto.HMAC
I am trying to translate this block in Javascript: Into Xojo: I am getting two different hashed strings, but expect they should be the same. Are these algorithms equivalent? Answer It turned out to be this:
How to get all data from a row as an object in cypress?
So, my web page has a table structure with multiple rows. I want to create a function which gets all the values from a row and creates an object with the header as the keys and the values. The kind of output I want: This is what I have tried: This is returning me an object with the index as