Suppose
abcd
1234
wxyz
7890
For now third …
Category: Questions
Regex to match string in a sentence
I am trying to find a strictly declared string in a sentence, the thread says: Find the position of the string “ten” within a sentence, without using the exact string directly (this can be avoided in many ways using just a bit of RegEx). Print as many spaces as there were characters in the origina…
How to sum duplicated values inside array in order
I need some help to sum values inside an array in order I have two arrays: I’m using this code below to remove the duplicated values inside array1: What I need is to sum the values of array2 using the order of array1, so I will have this result: So the final result would be this: Any suggestion ? thank
Cursor trail algorithm for p5.js
I found this little coding exercise on Processing’s website (https://processing.org/examples/storinginput.html) and decided to make a p5.js version of it. The part that I do not understand about this algorithm is how the ellipses drawn (in the trail) shrinks when variable i, which is used as the scale o…
How to filter list of objects that doesn’t match some condition in another list of objects
I have an array of objects of optional working hours of some business (5 min jumps). In addition, I have an array of objects of appointments. I want to filter the optional working hours if there is an existing appointment between those hours. I tried this solution with moment.js library: Current result: Dupli…
How do I delete a list item that has been given a unique id when created, in React + Firebase?
I am creating a Todo list using React and Firebase. So far, I have already created the AddToDo functionality, however, now I am having trouble with the delete functionality. I believe this is where my problem lies. For example, when I try and click the delete icon that I set up, I get an error: This is the co…
function to find an element inside the array [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question I wrot…
Rails action cable, Input doesn’t get cleared after POST
I had this code and was working fine, just notices that the ‘event.keyCode’ is depricated as VScode saying so i chagnged it to so the problem i face now with the both options above is that the input doesn’t get cleared after i press the button or clear press enter if use this and press enter…
countDocuments() is not working in api call
I am trying to get a count of products using api calls but in postman its keep loading without async and await also its not working I try to catch the error and i got this error in postman code to catch error: Answer I think in Mongoose operations you want to either await or provide a callback, but not
use a custom number format for money in HTML
i have an interactive report in my apex page with numbers (money) in it, the default money format is U.S which is like this : ###,###,###,###.## what i need is this : ### ### ### ###,## is there a …