I’m new to mongo and prisma in javascript. This is a mongo query using prisma’s aggregateRaw method. The cond should do a case-insensitive string comparison. For example if $$property.property_name is “The Brough”, a regex /the br/i should be true. Prisma throws an error it doesn’…
Tag: javascript
Unsure as to why conditional rendering is not working in react
I’m trying to have something conditionally rendered based on the length of the array I receive from the backend which contain objects. If the length is 0, then I want it to say something like “no projects” and if the length is > 0 then I want it to just display the projects on the screen.…
Regex validation string 4th and 6th special character optional validations
I am trying to make a regex validation and the condition is that, whatever I have typed in 4th character it should same as 6th character from special character(- .) dash or dot So if I have typed 4th character as – then 6th also must be – and if dot then should be dot. Also these character can be
GET request with axios (using await) returning undefined
I’m using axios to get data and then handle 401 error and so far it works, but there is a problem when I try to import my axios function and use it I got undefiend but not the actual response. Btw I have seen simillar questions and didn’t find answear. axios function code the fetching part what I …
WebGL gl.triangle make square
This is some portion of the code ( the code is too long to fit ) so I will put these part where I’m curious about why it didnt draw a square but still a triangle? I know that I used gl.Triangle but I want to try using gl.Triangle to draw a square which I’m not sure which part of
How to limit the number of multiple characters in an input value?
I want to limit the number of letters at the beginning and end of the input value (e.g. QQ23F and SG21G) through JavaScript but I found that only one {} can be written in a pattern. Thanks for any help. Here is my incorrect code: Answer You need to add the begging ^ and end $ signs And for everyone’s
i want the below javascript program to give the output in array format, how can i do that?
I wrote this javascript program to find sum of array elements, also i got the answer, but i want the answer to be in array format , how i can do that ? here is the output i am getting this is the output i want Answer
Get geometry and material of 3D Model – Three.js
I am attempting to make one 3D model orbit another, but as soon as I change my mesh from a wireframe box to a 3D Model’s geometry it disappears. What am I doing wrong? I get no errors, I have a feeling it may be to do with the scale of the 3D model but I’m unsure. Am I getting
Extract the assignment of from this expression with sonarQube
when I launch a sonar control I find myself with a smells code for the following function: I get the following sonar alert: Extract the assignment of “item.media” from this expression. What would be the solution to avoid this sonar message? Answer
Bootstrap-table: doesn’t work creating table from JavaScript
I’m creating a table from my index.js for the index.ejs to show some data from the database (SQL Server) but in the view the table doesn’t show any data or some error. The function from ‘api/pedidos’ does return me the query in JSON format. I think the problem is in how a create the Ta…