可能要先删除已经安装的vim:
sudo apt-get remove vim vim-runtime gvim
ubuntu12.04上可能还要删除以下包:
sudo apt-get remove vim-tiny vim-common vim-gui-common
然后安装依赖:
| ➜ YouCompleteMe git:(master) ✗ pwd | |
| /Users/xuelang/.vim/bundle/YouCompleteMe | |
| ➜ YouCompleteMe git:(master) ✗ ls | |
| CONTRIBUTING.md README.md cpp install.sh python | |
| COPYING.txt autoload doc plugin style_format.sh | |
| ➜ YouCompleteMe git:(master) ✗ git submodule update --init --recursive |
可能要先删除已经安装的vim:
sudo apt-get remove vim vim-runtime gvim
ubuntu12.04上可能还要删除以下包:
sudo apt-get remove vim-tiny vim-common vim-gui-common
然后安装依赖:
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| original_sequence = raw_input("Enter the sequence: ") | |
| sequence_str = original_sequence.split() | |
| sort_sequence = [] | |
| for number_str in sequence_str: | |
| sort_sequence.append(int(number_str)) | |
| count = len(sort_sequence) |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| original_sequence = raw_input("Enter the sequence: ") | |
| sequence_str = original_sequence.split() | |
| sort_sequence = [] | |
| for number_str in sequence_str: | |
| sort_sequence.append(int(number_str)) | |
| count = len(sort_sequence) |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| def quick_sort(sequence, start_index, end_index): | |
| # print sequence | |
| if start_index < end_index: | |
| main_element = partition(sequence, start_index, end_index) | |
| # print main_element | |
| quick_sort(sequence, start_index, main_element-1) |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| class Trie_tree(): | |
| def __init__(self): | |
| # node = [father, child, keep_char, is_word] | |
| self._root = [None, [], None, False] | |
| def insert(self, word): |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # This is a Stack implementing in list. | |
| class Stack(): | |
| def __init__(self): | |
| self._content = list() | |
| def __len__(self): |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # This is a Queue implementing in list. | |
| class Queue(): | |
| def __init__(self): | |
| self._content = list() | |
| def __len__(self): |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from functools import wraps | |
| def fib_direct(n): | |
| assert n > 0, 'invalid n' | |
| if n < 3: |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| class Trie_tree(): | |
| def __init__(self): | |
| # node = [father, child, keep_char, is_word] | |
| self._root = [None, [], None, False] | |
| def insert(self, word): |