maximum

c# - easy way to get maximum window x/y bounds?

I have a custom styled transparent window and i've seen a lot of issues handling min/max/resize behavior when you use transparency and "WindowStyle=None". When I tell my window to change it's windowstate to maximized it doesn't get it right so I want to override the logic there. It gets the width right but the height is all messed up an...

Finding max_element of a vector where a member is used to decide if its the maximum.

Consider a class A having a member x and a std::vector< A >. Now its a common task to search for the maximal x among all elements inside the vector. Clearly I can only use std::max_element if there is an iterator on the x's. But I must write one by my own, or I just make a simple for loop. maxSoFar = -std::numeric_limits< double >::max(...