I have an angular app, where I need to check security groups on a machine (array of security_groups). I have a function that receives the serverId and checks array of machine details in the security groups attached on the server, that security group is an array of object. I tried to do this but with a map fun…
Unknown problem with (probably) POST method
This task is quite simple but I just can’t seem to get it to work. What the outcome should be is explained in the picture below. I guess that there is some kind of a problem with POST in php, but I’m not sure. Do you see what’s the problem that’s causing this not to work? Problem: No r…
How to make navbar change color on scroll?
I have a transparent nav bar which on scroll is transparent. This means that if i were to scoll to a place that did not have a solid background color it would clash with other elements such as text. I would like to transtition into a different color to make it stand out more (including making the logo and a
Remove and Modify key from object
I have following object I want to remove is_exchange and replace value of created_at to “2021-03-23” and get back the json representation of the object I tried like which is working but is not working Answer To remove a value from an object use the delete method. So, you could do delete obj.payloa…
filter value of select to do a partial sum
Having two classes professor and student: professor.ts student.ts To add up the scores of each student relative to his teacher I did: This is the HTML of the page: How can I do a partial sum of the selections, assuming for example that I have 5 professor with 1 student for every professor, and want to add onl…
How to select an option of a slim select with jquery
I have some concatenated selects that work fine. By the way, I would like to convert those selects into slim selects but I found some difficulties in doing that. For example, I have a select with ID level_incarico. When I select an option of level_incarico greater than zero other selects should appear. After …
Bootstrap 4 range slider percentage between two items
I’ve looked all over but couldn’t find the answer. I want to use Bootstrap 4.5’s range slider to split the % difference between Client and Company with a range from 1% – 100%. Can’t figure out the jquery/javascript to get it working. Thanks Answer Please have a look on the the be…
JavaScript grow and shrink “ball” object
started to learn a bit javascript and I ran into a mission to get a “ball” bigger and bigger when I am cliking it( the ball starts from 100 and grow by 50 each click). so when it’s getting too 400 its should shrink its size by 50 till the ball gets again to 100 and then he grow. so
How to listen to external variable changes in React
Hope you’re doing well 🙂 I’ve an “auth.js” file, with an aysnc function to get the userId and then store it in session storage. Here it is: Then I access this variable in all components that need it, in order to make other requests. Example in App.js: The problem is that, in the first …
Why won’t setMatrix([…matrix, [[x][y]]]) work?
I want to add the coordinates x and y (from the loop) to the state (matrix) like you can see in my example but it won’t work. Can someone help me? Answer The problem is in expression [x][y] which evaluates to undefined. [x] defines an array containing one element x [x][y] tries to index the [x] array, t…