http://nodejs.org/api/buffer.htmlPure JavaScript is Unicode friendly but not nice to binary data. When dealing with TCP streams or the file system, it...
分类:
Web程序 时间:
2014-09-09 23:02:59
阅读次数:
491
如果你想向远程服务器发起HTTP 连接,Node 也是很好的选择。Node 在许多情景下都很适合使用,如使用Web service,连接到文档数据库,或是抓取网页。你可以使用同样的http 模块来发起HTTP 请求,但应该使用http.ClientRequest 类。该类有两个工厂方法:一个通用的方...
分类:
Web程序 时间:
2014-09-09 22:59:49
阅读次数:
275
# include
# include
# include
# include
# include
# define MAX 15
using namespace std;
typedef struct Trie_Node
{
bool flag;//是否有子树
struct Trie_Node *next[MAX];
}Trie;
void Insert(Trie *r...
分类:
其他好文 时间:
2014-09-09 20:11:09
阅读次数:
234
记录一些二叉树的基础算法二叉树节点结构:typedef struct TreeNode{ int val; struct TreeNode *left; struct TreeNode *right; }TreeNode,*Node;1.遍历前、中、后序递归遍历...
分类:
其他好文 时间:
2014-09-09 20:00:09
阅读次数:
129
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:
其他好文 时间:
2014-09-09 19:57:29
阅读次数:
237
【唠叨】与2.x相比,节点类Node的属性和功能做了大幅度的修改与增加。【Node】Node类是绝大部分类的父类(并不是所有的类,例如Director类是直接继承Ref类的),如Scene、Layer、Sprite以及精灵集合SpriteBatchNode等等等等的父类都是Node。Node类包含了一些基本的属性、节点相..
分类:
其他好文 时间:
2014-09-09 18:33:59
阅读次数:
290
child_process是node一个比较重要的模块,通过它可以实现创建多线程,来利用多核CPU。这个模块提供了四个创建子进程的函数。spawn、exec、execFile、fork。spawn是最原始的创建子进程的函数,剩下的三个是对这个函数不同程度的封装。spawn不支持回调函数。exec和e...
分类:
Web程序 时间:
2014-09-09 18:04:29
阅读次数:
354
雅虎官方博客宣布终止开发开源的JavaScript工具库Yahoo User Interface library (YUI)。 雅虎开发者解释说,行业趋势发生了改变。过去几年,Web平台经历了激烈变革,相比以前如今的JavaScript几乎是无处不在。Node.JS的出现 允许JavaScrip.....
分类:
编程语言 时间:
2014-09-09 17:57:59
阅读次数:
225
//给出的字符串在模式串中出现几次# include # include
# include
# include
using namespace std;
# define MAX 26
typedef struct Trie_Node
{
int count;//记录包含该结点的单词个数
int id;//最后一次经过此结点的商品的id
Trie_Node *nex...
分类:
其他好文 时间:
2014-09-09 16:14:48
阅读次数:
126
雅虎官方博客宣布终止开发开源的JavaScript工具库Yahoo User Interface library (YUI)。 雅虎开发者解释说,行业趋势发生了改变。过去几年,Web平台经历了激烈变革,相比以前如今的JavaScript几乎是无处不在。Node.JS的出现
允许JavaScript在服务器端使用, 以及新的包管理器如npm,构建工具如Grunt,应用程序框架,测试工具等的出现,...
分类:
编程语言 时间:
2014-09-09 16:10:28
阅读次数:
196