EventEmitter是nodejs核心的一部分。很多nodejs对象继承自EventEmitter,用来处理事件,及回调。api文档地址:http://nodejs.org/api/events.html#events_class_events_eventemitterEvent:Many ob...
分类:
Web程序 时间:
2014-09-03 22:39:07
阅读次数:
312
/usr/share/info/coreutils.info.gzFile: coreutils.info, Node: touch invocation, Prev: chmod invocation, Up: Changing file attributes13.4 `touch': Chang...
分类:
系统相关 时间:
2014-09-03 19:45:07
阅读次数:
492
往我们在开发php程序调试的时候,每修改一次,可以直接去浏览器浏览,不需要重启服务。但是在开发nodejs程序,调试的时候,无论你修改了代码的哪一部分,都需要重启服务才能生效。这是因为 Node.js 只有在第一次引用到某部份时才会去解析脚本文件,以后都会直接访问内存,避免重复载入。。Node.js...
分类:
Web程序 时间:
2014-09-03 19:44:57
阅读次数:
224
复习一下链表反转#include
#include
typedef int ElemType;
typedef struct Node {
int data;
struct Node* next;
}Node, *List;
//用数组arr来初始化链表中数据;此例中链表无头点
int InitList(List *list, ElemType* arr, int num)
{
int...
分类:
其他好文 时间:
2014-09-03 18:09:26
阅读次数:
168
//函数满足凸函数性质,于是三分
# include
# include
# include
# include
using namespace std;
struct node
{
double x;
double w;
};
struct node a[50010];
int n;
double cal(double xi)
{
double res=0;
...
分类:
其他好文 时间:
2014-09-03 16:53:50
阅读次数:
236
1:npm install express -g2:express express_example 这里的(express_example 可以是随意的名字)3:cd express_example4:npm install5:node app.js6:在地址栏输入 127.0.0.1:3000
分类:
Web程序 时间:
2014-09-03 16:28:56
阅读次数:
168
题目链接:HDU 1160 FatMouse's Speed
题意:求体重越重,反而速度越慢的例子,并输出对应的编号。
对speed进行从大到小排序,再求weight的最长上升序列,并输出路径。
AC代码:
#include
#include
#include
using namespace std;
struct Node
{
int weight;
int spee...
分类:
其他好文 时间:
2014-09-03 15:00:16
阅读次数:
214
基于node.js+Express.js+Jade+MongoDB开发Web即时聊天系统课程讲师:幻星课程分类:前端开发适合人群:初级课时数量:36课时更新程度:完成用到技术:Node.js NPM、 Express、NoSQL,MongoDB涉及项目:匿名聊天网站系统node.js视频教程:htt...
分类:
数据库 时间:
2014-09-03 14:51:06
阅读次数:
244
相对于传统的线程模型,Node.js开发与传统模型之间的主要区别是围绕着事件模型。相对于传统的线程模型,框架在基于事件的程序设计中管理的是控制流。在传统模型里,开发者必须在控制流中仔细处理模型中的流程,主动编写控制流向及返回的代码,要完全了解任务执行完后应该如何继续下面的流程。而对循环进行完全控制的...
分类:
Web程序 时间:
2014-09-03 14:34:06
阅读次数:
272
1、问题
define a class for a linked list and write a method to delete the nth node.
2、算法
template
struct Node{
C content ;
Node* next ;
}
template
class List{
private:...
分类:
其他好文 时间:
2014-09-03 13:10:36
阅读次数:
189