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
// | |
// Created by 方朋 on 16/12/20. | |
// | |
#include <stdio.h> | |
#include "global.h" | |
/* | |
* ADT 栈(stack) |
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 <stdio.h> | |
#include "global.h" | |
/* | |
* ADT 栈(stack) | |
* InitStack(*S) // 初始化一个空栈S | |
* DestoryStack(*S) // 若栈存在则销毁 | |
* ClearStack(*S) // 将栈清空 | |
* StackEmpty(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
# coding=utf-8 | |
""" | |
线程池. | |
:copyright: (c) 2015 by fangpeng. | |
:license: MIT, see LICENSE for more details. | |
""" | |
import sys | |
import Queue | |
import threading |
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
// | |
// Created by 方朋 on 16/12/20. | |
// | |
#include <stdio.h> | |
#include "global.h" | |
// 数组要尽量建大点,这里假设链表最大长度1000 | |
#define MAXSIZE 1000 |
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
// | |
// Created by 方朋 on 16/12/20. | |
// | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "global.h" | |
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
// | |
// Created by 方朋 on 16/12/15. | |
// | |
#ifndef DATA_STRUCTURES_GLOBAL_H | |
#define DATA_STRUCTURES_GLOBAL_H | |
#define OK 1 | |
#define ERROR 1 | |
#define TRUE 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
set nocompatible " required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
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 <stdio.h> | |
int a[101], n; | |
void quicksort(int left, int right) | |
{ | |
int i, j, t, temp; | |
if (left > right) | |
return; |
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
/* | |
轻松实现并行机制,统计单词个数 | |
目录结构如下: | |
├── word_count.js | |
└── text | |
├── a.txt | |
├── b.txt | |
└── c.txt |
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
//Task 1. 判断rss文件是否存在 | |
//Task 2. 解析rss文件 | |
//Task 3. 发起网络请求 | |
//Task 4. 解析rss响应 | |
var fs = require('fs'), | |
request = require('request'), | |
htmlparser = require('htmlparser'), | |
rssPath = './rss.txt'; |