2017/08

    Priority Queue , 우선순위 큐

    #include #define MAX_SIZE 100int heap[MAX_SIZE];int heapSize = 0;int heapPush(int value){if (heapSize > MAX_SIZE){printf("queue is full!");return 0;}heap[++heapSize] = value;int current = heapSize;while (current > 1 && heap[current]

    자주 쓰는 Linux terminal terminator theme

    자주 쓰는 Linux terminal terminator theme terminator 설치 후~/.config/terminator/config에 설정 [global_config] title_transmit_bg_color = "#d30102" focus = system [keybindings] [profiles] [[default]] palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#586e75:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3" background_image = None cursor_color = "#eee8d5" foreground_color = "..

    Linux terminal cmd line에 branch name 넣기

    ~/.bashrc에 아래 스크립트 추가 # branch colorc_cyan=`tput setaf 6`c_red=`tput setaf 1`c_green=`tput setaf 2`c_sgr0=`tput sgr0` branch_color () { if git rev-parse --git-dir >/dev/null 2>&1 then color="" if git diff --quiet 2>/dev/null >&2 then color="${c_green}" if git status | grep 'Your branch is ahead of' > /dev/null then color="${c_cyan}" fi else color=${c_red} fi else return 0 fi echo -ne $color} if ..