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
/* | |
* Minimal C++ implementation of Functor, Monad and Maybe. | |
* | |
* Requires c++0x variadic templates and lambda expressions: | |
* | |
* g++ -std=c++0x main.cpp -o main | |
* | |
* fmap, monadic bind and return implementations for std::vector | |
* and Maybe. | |
* |
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 <sstream> | |
#include <vector> | |
#include <stack> | |
#include <algorithm> | |
using namespace std; | |
int str2int(const string& s) |
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 <sstream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
int max_path_weight(const vector<int>& tree, int index) | |
{ |
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 "function.h" | |
using namespace std; | |
Polynomial::Polynomial() | |
{ | |
greatestPower=0; | |
coefficients[0]=0; | |
} | |
Polynomial::Polynomial(const int N, const int C[51]) | |
{ |
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
#!/bin/bash | |
_script="$(readlink -f ${BASH_SOURCE[0]})" | |
_base="$(dirname $_script)" | |
log_dir="${_base}/log" | |
mkdir -p ${log_dir} | |
BLACK=$(tput setaf 0) | |
RED=$(tput setaf 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
BLACK="$(tput setaf 0; tput bold)" | |
RED="$(tput setaf 1; tput bold)" | |
GREEN="$(tput setaf 2; tput bold)" | |
YELLOW="$(tput setaf 3; tput bold)" | |
BLUE="$(tput setaf 4; tput bold)" | |
MAGENTA="$(tput setaf 5; tput bold)" | |
CYAN="$(tput setaf 6; tput bold)" | |
WHITE="$(tput setaf 7; tput bold)" | |
BOLD="$(tput bold)" | |
RESET="$(tput sgr0)" |
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" dependency " | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 1. neovim | |
" 2. python3 | |
" 3. pip install neovim | |
" 4. devicons: nerd font | |
" 5. clang-format: clang | |
" |
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" dependency " | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 1. neovim | |
" 2. python3 | |
" 3. pip install neovim | |
" 4. devicons: nerd font | |
" 5. clang-format: clang | |
" |
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 empty(glob('~/.vim/autoload//plug.vim')) | |
silent !curl -fLo ~/.vim/autoload//plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
endif | |
call plug#begin('~/.vim/plugged') | |
" Misc | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'mhinz/vim-startify' | |
Plug 'tpope/vim-surround' |
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 empty(glob('~/.vim/autoload//plug.vim')) | |
silent !curl -fLo ~/.vim/autoload//plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
endif | |
call plug#begin('~/.vim/plugged') | |
" Misc | |
Plug 'tpope/vim-sensible' | |
Plug 'jiangmiao/auto-pairs' | |
"Plug 'mhinz/vim-startify' | |
Plug 'tpope/vim-surround' |
OlderNewer