本文演示在Linux上安装NodeJS及Express开发框架...
分类:
Web程序 时间:
2014-07-30 17:35:34
阅读次数:
210
js中处理正则表达式的类:RegExp用法: var reg=new RegExp("express");或者: var reg=/express/;js中常用的6个方法: test():是否存在 exec():返回查询值 match():得到查询的数组 search():返回搜索的位置 rep.....
分类:
编程语言 时间:
2014-07-30 17:13:13
阅读次数:
282
Palindromes
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when t...
分类:
其他好文 时间:
2014-07-29 21:57:12
阅读次数:
308
在学习nodejs partials view时,怎么都不能运行成功。经过艰苦探索,终于成功了,分享一下。Cause: nodejs 的express 版本之间不是很兼容,各个版本差异很大,一般用npm 默认安装的都是最新版本的express。Solution:partials() 如果要直接在ej...
分类:
Web程序 时间:
2014-07-29 21:29:22
阅读次数:
443
linux 文件类型应用商店的小镜子我们在刚刚提到使用『ls -l』观察到第一栏那十个字符中,第一个字符为档案的类型。 除了常见的一般档案(-)(d),还有哪些种类的文件类型呢?· 正觃档案(regular file ): 就是一般我们在迚行存取的类型的档案,在由 ls -al 所显示出来的属怅方面...
分类:
系统相关 时间:
2014-07-29 13:30:08
阅读次数:
314
这里,准备从零开始用nodejs实现一个微博系统。功能包括路由控制、页面模板、数据库访问、用户注册、登录、用户会话等内容。将会介绍Express框架、MVC设计模式、ejs模板引擎以及MongoDB数据库的操作。准备工作使用http模块,Express框架,nodejs的抽象如此之差,把不该有的细节...
分类:
Web程序 时间:
2014-07-29 12:13:16
阅读次数:
362
1 npm -v #显示版本,检查npm 是否正确安装。2 npm install express #安装express模块3 npm install -g express #加上 -g 启用global安装模式4 npm list ...
分类:
其他好文 时间:
2014-07-28 21:21:54
阅读次数:
231
1. 反斜杠的困扰(The Backslash) 有时候需要匹配的文本带有'\',如'\python',因为正则表达式有些特殊字符有特殊意义,所以需要前面加上'\'来消除特殊意义,这里匹配的正则表达式是'\\python',这时候如果要编译这个正则表达式需要re.compile('\\\\pyth....
分类:
编程语言 时间:
2014-07-27 23:09:09
阅读次数:
308
1 $ node app.js2 connect.multipart() will be removed in connect 3.03 visithttps://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives4 con...
分类:
Web程序 时间:
2014-07-27 10:16:22
阅读次数:
246
I could also have called this "wildcard .NET mapping in IIS Express from web.config."I'm sure that, like, everyone out there but me has figured this o...
分类:
其他好文 时间:
2014-07-26 13:58:34
阅读次数:
239