本篇文章讲express的安装与创建express项目。 一、安装express 执行命令 : npm install -g express; 安装express到npm-module,在express4.0之后,还需要安装express-generator 来完成express项目的创建, 执行命...
分类:
Web程序 时间:
2014-10-09 00:24:17
阅读次数:
211
【代码】
#include
#include
using namespace std;
typedef struct Node{
char key;
struct Node *lchild, *rchild;
}*Tree, TNode;
void PreOrder(Tree T) //先序遍历
{
if (T == NULL)
return;
TNode *curr = T...
分类:
其他好文 时间:
2014-10-08 17:35:05
阅读次数:
199
写在前面:如果此文有幸被某位朋友看见并发现有错的地方,希望批评指正。如有不明白的地方,愿可一起探讨。实验拓扑图安装ansible#yum-yinstallansible修改/etc/ansible/hosts配置文件#vim/etc/ansible/hosts[hbhosts]
172.16.115.101
172.16.115.102
172.16.115.103由于ansibl..
分类:
其他好文 时间:
2014-10-08 15:23:15
阅读次数:
206
第一种思路是用一个vector存所有的Node*
之后再用两个指针将链表拼接出来
void reorderList(ListNode *head) {
vector content;
ListNode * cur = head;
while (cur)
{
content.push_back(cur...
分类:
其他好文 时间:
2014-10-08 03:15:24
阅读次数:
277
安装Node.js环境 sudo apt-get install nodejs
sudo apt-get install npm 对于不同环境依赖 的node_module可以采用以下命令来重新生成 rm -rf node_modules
npm cache clean
npm install 如果...
分类:
Web程序 时间:
2014-10-08 01:45:24
阅读次数:
272
二分图解决这个问题的思路#include #include #include #include #include #include using namespace std;class Node{public:string name;vector adj;bool visited;int groupI...
分类:
其他好文 时间:
2014-10-08 01:24:14
阅读次数:
298
使用双向链表+map,实现O(1)时间内的get和set
需要注意的是:
1. set时更新tail
size为0时更新头部
size为capacity时删除头部并且更新头部
2. get时更新节点到tail的位置,同时如果是节点是头部的话要更新头部
附上代码:
class LRUCache{
struct Node{
int key;
int...
分类:
其他好文 时间:
2014-10-08 01:04:54
阅读次数:
274
#include #include using namespace std;class Expr_node{ //friend ostream& operatoruse==0)delete p; }};class Int_node: public Expr_node{ friend cl...
分类:
编程语言 时间:
2014-10-08 00:23:24
阅读次数:
216
还可以接受的dp题 如果没有那个工资的话 一般是问到m可以安排的最多节目数 一般是用贪心解决的 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int size = 110; 7 struct node 8 ...
分类:
其他好文 时间:
2014-10-07 22:32:04
阅读次数:
200
// 说明 Node API 版本为 v0.10.31。 中文参考:http://nodeapi.ucdok.com/#/api/本段为博主注解。目录● 定时器 ○ setTimeout(callback, delay, [arg], [...]) ○ clearTimeout(timeoutO.....