Category "javascript"

React useCallback() not working as expected

I'm trying to understand useCallback() a bit better by creating a simple React app and playing around with it. I tried wrapping handleClick function in useCallb

Take full screenshot in Chrome

I developed a little chrome extension, which takes a screenshot from the current page. The Problem is, when a part of the current area is covered by e.g. the in

React Native update component

I'm pretty new to react-native. When I click the stop sleep or info button I send patch requests to the users.json file to change the status. My JSON file conta

Display text (flexbox) when hover over image

I want to hover over the rotating circle to display the 4 "about" texts. But the issue is that I am using flexbox and when I enter the cursor into the area cove

"Uncaught SyntaxError: Cannot use import statement outside a module" when importing ECMAScript 6

I'm using ArcGIS JSAPI 4.12 and wish to use Spatial Illusions to draw military symbols on a map. When I add milsymbol.js to the script, the console returns err

Convert a string to number with parseInt does not work as expected [duplicate]

A quick maybe simple question : We are trying to parse a string into number , the sample number is "1928433000460244141" so when we try to par

cloud function triggering delay and retry

I have a firebase trigger function with failurePolicy: true (the function will automatically retry if fails). I avoid infinite retry loops as described here : h

I am not able to implement recordrtc

I am not able implement recordrtc. I took the following code from the site: https://medium.com/@coolchoudharyvijay/use-mic-in-angular-to-record-audio-simplified

Apollo-Server display errors in a clean mannor

I'm pretty sure that the question is self explanatory. I'm using 'apollo-server-core' 3.6.5 Errors I want to get { "errors": [ { "messa

Javascript window.load events not triggering without using setTimeout

This question pertains to a shopify cart page. I am trying to manipulate a page on load with Javascript. 'DOMContentLoaded' was not reliable enough so I am usin

How to add bootstrap 5 and other global packages to a SvelteKit project?

I installed bootstrap using NPM In a normal svelte project I usualy add bootstrap and other packages, which are used project wide, in the App.ts file. However,

Parsing & Checking Condition Expression in Javascript

I have string that have variable conditions in it, like this: (@IS_VERIFIED = 'True' OR @CONFIRMATION_NEEDED != 'True') AND @REQUEST_LIMIT != '0' This is jus

Javascript + PHP /// read barcode

I want to read a barcode using a library to barcode decoder or read by javascript or PHP? I browse many sources but can't reach find one to read the barcode

Blogger Conditional Tag If a Post has Spesific Label

im trying to Execute some Javascript code like this <b:if cond='data:blog.pageType == "item"'> <script type='text/javascript'> //<![CDATA[

How to re-run multiple functions in JS on button click?

In the snippet below, I'm generating random parts of a URL and that spits out an image from placeimg.com. However, I'm trying to re-run the functions that gener

VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders

Im working on a react-native project and what I'm trying to do is for the user to have the possibility to select phone numbers in his contact list. When the use

Dropdowns and filters not applied with REACT

I'm not able to display my menus (_ids.name) that match my filters from the 2 dropdowns (MyNorm1,...MyNorm6) and (Classification1,...Classification6). For examp

How to use class style components in nuxt.js?

I setup a nuxt3 project. and I want to use class style components but when I am installing vue-property-decorator, I am getting below error. Can anyone have ide

Automatic letterbox scaling HTML5 Canvas

In Construct 2 engine there is an automatic letterbox scaling for the game canvas. I've tried to do this in my Javascript game, but i couldn't get the same resu

How to draw Genogram relationship tree using ReactJs?

I'm looking for a simple Javascript Library (SVG) for the ReactJs module that allows me to draw family tree relationships. I've already referred GoJs Genogram.