I need help to accomplish the use cases of this regex: https://regex101.com/r/HmDQHJ/3/ Right now, my issue is that I need to match this: But also fail on this: Can someone help me to accomplish this? Thank you! More context: We have an old crawler that goes project source and looks for usage of a function ca…
Tag: javascript
Dynamic change of global variables in react native
I have an mqtt client inside my react native app and it constently receives data from a broker. This data is being used in many different screens/components differently (I have 1 class which extends React.Component per screen). For example I show the data I receive from topic x on screen 1 while I show the da…
Uncertainty with the !! operator (double negation)
I saw in a pull request that the double negation operator (!!) is used for the focus attribute of a text field as follows: As far as I know, the operator converts everything to a boolean. If it was falsy (for example 0, null, undefined,..), it will be false, otherwise, true. In my case, i.e. if value = 0, the
angular is not detecting change in input field
we are making an extension that scans the input field and fills some data into it. I am using the .value operator to fill the data. The problem is, it works in almost every case except the angular material input. I am able to set the value of the input, it displays in the field but somehow angular is unable
TypeScript destructure array of objects, both first object and a value within it
I have an array of objects I want to destructure, retrieving both the first object and a value within it: In Javascript this works; but in TypeScript this returns I’m trying to figure out how to type that in order to avoid the error. Answer As firstObjectInArray isn’t part of your declaration (it&…
How to order bootstrap panels in a grid when a new value is added?
I have a grid based on bootstrap 3 with col / rows inside each col there is a panel with a value, the values are got from DB yet ordered but the user could add a new panel manually and i would be able to set it ordered correctly.. like my grid could contain 1 2 3 + when +
JavaScript: how can I merge these two arrays of incomplete objects and make an array of complete objects
I have two arrays of objects I need to write a function to output an array with objects with the same name being merged into one. As you can see here, objects that share the same name are merged into one object with a few exceptions: if type field is missing, we would need to add it and make it
position charts on html page
Im building a basic dashboard and using google charts to do so. I have successfully embedded my gauge charts on the webpage. I am now trying to position them. I have read that this needs to be done using css positioning. My question is if this is the solution , how can I use this within my code. Im trying
How to close mask
I have created a hamburger menu that opens with the mask in the background (mask opens after 4ms). Next, on closing the hamburger menu, I want that mask to close with it (means after 4ms). But instead, according to my code, my mask is not closing after my hamburger menu closes. JS: I just want that mask to di…
Why does my program think that 72 is larger than 500?
I’m trying to make a program that takes three numbers from the user and gives them the biggest and smallest, but sometimes the numbers are flipped (The biggest is switched with the smallest), and …