This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs | |
# vim ~/.gitconfig | |
[alias] | |
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <atomic> | |
template<typename V> | |
class LockFreeList { | |
struct Node { | |
V value; | |
std::shared_ptr<Node> next; | |
Node(const V& value) : value(value), next(nullptr) {} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================== | |
template <typename T> | |
typename T::value_type levenshtein_distance(const T& src, const T& dst) { | |
const typename T::size_type m = src.size(); | |
const typename T::size_type n = dst.size(); | |
if (m == 0) { | |
return n; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif | |
int main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
gcc -shared -fPIC inspect.c -o inspect.so -ldl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "kvdb.h" | |
#include <cstring> | |
typedef struct TestStr { | |
int id = 0; | |
}TestStr; | |
int main() { | |
std::string fileName = "d://test_storage.dat"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested with UE 4.21 | |
1. Open your UE4 engine folder [Program files or something else you like]\Epic Games\UE_4.21\Engine\Source\Programs\UnrealBuildTool | |
2. Open file Epic Games\UE_4.21\Engine\Source\Programs\UnrealBuildTool\Platform\Windows\VCToolChain.cs | |
3. Find method void AppendCLArguments_CPP(CppCompileEnvironment CompileEnvironment, List<string> Arguments) | |
4. Add Arguments.Add("/std:c++17"); to begin of method | |
5. Open Epic Games\UE_4.21\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj in MSVS 2017 | |
6. Rebuild UnrealBuildTool | |
7. Open your project and rebuild it | |
8. Enjoy c++17 features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdio.h> | |
#include <sys/socket.h> | |
//#include <stdlib.h> | |
#include <netinet/in.h> | |
#include <string.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
//#include <unistd.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git merge --squash [branch] | |
git add . | |
git commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBoxManage setextradata "High Sierra" VBoxInternal2/EfiGraphicsResolution 1920x1080 |
OlderNewer