Skip to content

how to auto generate id like AB22020001 in nodejs

i want auto generate id like “DC” + yaer + mounth + 4 digit in nodejs. I am using node js to create an api to connect to the database which I use phpmyadmin I want to create an id like AB22020001 But now all I can do is create an ID like AB2202. I don’t know how to make

Regex match any js number

So as an exercise I wanted to match any JS number. This is the one I could come up with: This however doesn’t match the new syntax with underscore separators (1_2.3_4). I tried a couple of things but I couldn’t come up with something that would work. How could I express all JS numbers in one regex…

Function parameter is not defined in callback

I am trying to get the location of the user and using that I am trying to get the city. I don’t why but when I call the query function, the city parameter is having some value but it is not reflected in the callback function’s if condition. However, if I replace the city variable in the If conditi…

How to type a generator function with typscript

I would like to send a value back to the generator function using next which seems to complicate typing this function DEMO In my VSCODE I get the following error for Line A And In Stackblitz/demo I get an error for Line B So my question is, how can I type the value I provide with next? Answer TypeScript 3.6

fleissner grille javascript

Can I use a function that allows me to get the hidden message? If so, could you enlighten me, how can I do it? Using fleissner grille 6 x 6, decipher the hidden message: “lróaon. sg sdersoildsu.:.cc kiomamii”. For this, it must be rotated 90° clockwise. The open grids are at positions [1,1],[4,1],…