Min and max value of input in angular4 application

I succeeded by using a form control. This is my html code : <md-input-container> <input type=”number” min=”0″ max=”100″ required mdInput placeholder=”Charge” [(ngModel)]=”rateInput” name=”rateInput” [formControl]=”rateControl”> <md-error>Please enter a value between 0 and 100</md-error> </md-input-container> And in my Typescript code, I have : this.rateControl = new FormControl(“”, [Validators.max(100), Validators.min(0)]) So, if we enter a value higher than … Read more

warning C4003 and errors C2589 and C2059 on: x = std::numeric_limits::max();

This commonly occurs when including a Windows header that defines a min or max macro. If you’re using Windows headers, put #define NOMINMAX in your code, or build with the equivalent compiler switch (i.e. use /DNOMINMAX for Visual Studio). Note that building with NOMINMAX disables use of the macro in your entire program. If you … Read more

Finding the max value in a map

You can use std::max_element to find the highest map value (the following code requires C++11): std::map<int, size_t> frequencyCount; using pair_type = decltype(frequencyCount)::value_type; for (auto i : v) frequencyCount[i]++; auto pr = std::max_element ( std::begin(frequencyCount), std::end(frequencyCount), [] (const pair_type & p1, const pair_type & p2) { return p1.second < p2.second; } ); std::cout << “A mode … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)