Skip to content

Tag: javascript

Regex with double asterisk javascript

I need two regular expressions, one to get ** at the beginning of a string, and one at the end. For example: With an expression obtain the ** of the beginning and with another those of the end. There may be many more repetitions. I have tried the following: Thanks a lot It should mark all the words that conta…

how can i use variable declared inline in vue js?

I’m working with Vue.js (version 3) and I wanted to do something like this: but Vue returns the error: Since, as I suppose, he’s looking for item in data, where I created the Vue app. Is there anyway to solve this issue? Maybe some workaround to obtain the same effect? Answer It’s not recomm…

Why is my useEffect function called only once?

I am rendering a list of Trips objects inside a FlatList. So I have a screen named Network where I have FlatList which represents each of the trips. My render method: Inside my Trip component is the trip information. Trip’s name AND trip’s geo locations. From those geolocations I want to get the t…

UTC issue on formatting date

I have this react typescript/js code: but it’s not working properly. It changes fromDate to the next day when I run it late at night. So I tried on 6/30/2022 at 11pm and it changed it to 7/1/2022. My attempted fix is to use date-fns format function: My question is will this resolve the utc issue? Maybe …