std::thread and std::mutex

std::thread #include <iostream> #include <thread> #include <chrono> void f1(int n) { for (int i = 0; i < 5; ++i) { std::cout << “function f1 executing\n”; ++n; std::this_thread::sleep_for(std::chrono::milliseconds(10)); } } void f2(int& n) { for (int i = 0; i < 5; ++i) { std::cout << “function f2 executing\n”; ++n; Read more…

Ignore Space When Use Git Merge Code

Git will show conflicts if there are many spaces in the same file. It can spend too much time to fix these conflicts if the spaces are too many. Use git help merge to refer to the manual page. ignore-space-change, ignore-all-space, ignore-space-at-eol, ignore-cr-at-eol Treats lines with the indicated type of Read more…

XOR Strings
: Input your strings, the tool can encrypt and decrypt them.

X