C# - an example of comparing C# objects using generic lambda function
1 2 var comparer = Comparer<T>.Default; Func<T,T,T> minOf = (x, y) => comparer.Compare(x, y) < 0 ? x: y;
1 2 var comparer = Comparer<T>.Default; Func<T,T,T> minOf = (x, y) => comparer.Compare(x, y) < 0 ? x: y;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 public class ValueChangeData { public object oldValue; public object newV...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 struct Wanderer { explicit Wanderer(std::vector<std::function>& u...
1 2 3 4 5 6 7 8 9 10 11 12 13 CC=mpicxx CFLAGS=-c -Wall LDFLAGS= SOURCES=test.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=test all: $(SOURCES) $(EXECUTABLE) $(...
People like predictable events but reality is every moment and events are unpredictable. I think that main purpose of software engineering is to make unpredi...