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 <string> | |
#include <cmath> | |
using namespace std; | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
int total = 0; | |
char buf[256]; |
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 <string> | |
#include <iostream> | |
#include <fstream> | |
#include <regex> | |
using namespace std; | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
string names; |
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 <random> | |
#include <iostream> | |
#include <unordered_map> | |
std::discrete_distribution<> dist({ | |
90, // 90% | |
9, // 9% | |
1, // 1% | |
}); |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Change input source to ENGLISH by left ctrl + command + E</name> | |
<identifier>private.change_input_source_to_english</identifier> | |
<autogen> | |
__KeyToKey__ | |
KeyCode::E, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L, | |
KeyCode::VK_CHANGE_INPUTSOURCE_ENGLISH, | |
KeyCode::VK_WAIT_100MS, |
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
#if _MSC_VER >= 1800 | |
template<typename T, typename ... TArgs> | |
void push(lua_State *L, T ret, const TArgs& ... args) { push(L, ret); push(L, args...); } | |
template<typename RVal, typename ... TArgs> | |
RVal call(lua_State* L, const char* name, const TArgs&... args) | |
{ | |
lua_pushcclosure(L, on_error, 0); | |
int errfunc = lua_gettop(L); |
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
case "${OSTYPE}" in | |
darwin*) | |
alias ls="ls -G" | |
alias ll="ls -lG" | |
alias la="ls -laG" | |
;; | |
linux*) | |
alias ls='ls --color' | |
alias ll='ls -l --color' | |
alias la='ls -la --color' |
NewerOlder