im trying to do an easter egg in my website, and i want to detect if the user has typed some words in sequence and in 30sec. The words wont be typed in any textarea or input, it will be just like you land on the page and start typing the words ”hello im Darius”, or you are on the
Regex Extraction – Mixed Decimal seperator
I am currently trying to write a regex in js that would extract the decimal numbers from a mixed string. Example strings are following My desired output is following If I run the following regex it doesnot return any match when the decimal point is followed by a single digit.Eg. following cases I am not sure …
Multiplying inputs with dynamic add
I have 3 fields with inputs: Multiply rate_basic by qty_basic with js: It works fine, but I have a button that add a row with the same inputs and the same id, but the calculation only works with the first row. How to make it work with all inputs? thanks Add function to row: Answer You should add dynamic id
Merging an array property with the same key within an object
If I want to append to an existing property that’s an array, what’s the cleanest solution? It instead overwrites the index of access with the last assignment. Answer You can simplify logic
send data file to another computer with RTCPeerConnection?
how can I change the code so that the computer1 code connects to the code of computer 2(computer1 and computer2 are not the same computers but on the same network). It works locally but not when it’s two different computers computer 1 and computer2 code that is used for the connection is defined below t…
Can I do a binary search on an array of objects?
I am currently learning how to use searching and sorting algorithms and I am running into issues with a binary search on an array of objects of customers’ data. The array of customers is sorted by first and last name. The goal is to find a customer’s email and return the index. The data looks like…
How to include mburger.js in mmenu
I try to include an animated hamburger in my mmenu. Documentation here: https://mmenujs.com/mburger/ I downloaded all the Files from gitHub, but I can not find where to include the mburger.js file. Can somebody help me? Thank you Answer I found it in the documentation: for css in “Tutorial CSS” fo…
Get AWS S3 Upload URL – NodeJs AWS-SDK
I’m pretty sure I’m missing something very obvious here, but: I’m uploading a file to an s3 bucket using aws-sdk as follows: I’m able to log the upload url successfully, however the awsURL returned is an array, not the data.Location value – shouldn’t the data.Location be re…
How to convert a value fetched from json file to a list in javascript
I have a string with comma separated values in json file and want to convert it to a list to iterate through for loop and click on each element.Please help me on this ! testdata.json : code: output : Answer I think the easiest way is to do it by parts, you can first remove the – using the split
Webpack fails with no error due to import keyword
I’m receiving a weird error npm ERR! code 1 when trying to launch the dev server or run a build. I’ve researched this problem for a while with no success whatsoever. The problem manifests itself when I try to import an image in a js file from the src folder. Or when I try to import sass partials f…