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> | |
class Base { | |
public: | |
virtual ~Base() = default; | |
void test() { testInternal(); } | |
private: | |
virtual void testInternal() | |
{ | |
std::cout << __PRETTY_FUNCTION__ << std::endl; |
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
std::sort(data.begin(), data.end(), data_less()); | |
data.erase(std::unique(data.begin(), data.end(), data_equal()), data.end()); |
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
str.erase(std::remove(str.begin(), str.end(), '\n'), str.end()); |
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
# It’ll output all casks that no longer exist. One of those is causing your issue. | |
for cask in $(ls -1 "$(brew --prefix)/Caskroom"); do | |
if ! brew cask info "${cask}" &> /dev/null; then | |
echo "${cask}" | |
fi | |
done |
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
find -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 rm -R |
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
defaults write com.google.Chrome AutoSelectCertificateForUrls -array-add -string '{"pattern":"https://[*.]sap.corp/*","filter":{"ISSUER":{"CN":"SSO_CA"}}}' | |
defaults write com.google.Chrome AutoSelectCertificateForUrls -array-add -string '{"pattern":"https://[*.]sap.com/*","filter":{"ISSUER":{"CN":"SSO_CA"}}}' |
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
python3 -m http.server 8888 |
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
def count(filename, w): | |
f = open(filename) | |
x = f.readlines() | |
y = [word for word in (' '.join(x)).split() if word == w] | |
return len(y) |
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 <functional> | |
#include <iostream> | |
#include <memory> | |
#include <stdlib.h> | |
#include <string> | |
#include <thread> | |
class Greeting { | |
std::string message; |
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
/* | |
* 1) 디폴트 템플릿 파라미터는 템플릿 펑션 시그니처에 안들어감(그래서 typename = std::enable_if_t(condition, type))의 condition만 다른 두 함수를 만들 수 없음 | |
* 2) enable_if의 type이 int char등 넌 타입 템플릿에 올 수 있는 타입이여야 함.(더블 안됨) 그래야 typename int = 0형태인 넌 타입 템플릿 파라미터 형식으로 추론됨 | |
* 올수 이는 녀석은 nullptr, integral lvalue reference, pointer, enum 이라고 함 | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <type_traits> |
NewerOlder