一、故事总有其背景年末将至,很多闲适的时间,于是刷刷微博,接触各种纷杂的信息——美其名曰“学习”。运气不错,遇到了一个新名词,uglifyjs. 据说是用来压缩JS文件的,据说还能优化JS,据说是基于node的,还据说比Google Closure Compiler更带感,哦?激起了我的好奇心。百之...
分类:
Web程序 时间:
2014-07-06 22:36:27
阅读次数:
247
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?判断一...
分类:
其他好文 时间:
2014-07-06 18:10:33
阅读次数:
145
解释清楚DOM原理并不是一件容易的事,但是任何一个前端工程师,都必须牢牢掌握它。DOM整体架构:图解:DOM,即针对XML文档的应用程序编程接口(API).通俗一点说,HTML属于XML的一种,先将HTML映射成节点树,然后对节点树提供一套增删改查的方法。DOM1 Core:图解: 1. Node:...
分类:
其他好文 时间:
2014-07-05 16:56:03
阅读次数:
386
1、用express开发站点时,怎么定义通用的头部和尾部
方案1:用类似asp时代的include添加,如ejs模板:
这里是内容。
注:..表示header.ejs在上一级目录,ejs扩展名可以去掉,直接写:include ../header
方案2:用类似于MVC的layout模板,这个要安装一个模块: npm install express-partials
...
分类:
Web程序 时间:
2014-07-04 07:15:24
阅读次数:
419
#400/500错误重试
#
#当服务返回400/500状态且当前pool中有存活的node重置http请求,并重新选择pool中的node。
#直到返回正常代码或者轮询完所有存活node后,接受新的http请求
whenCLIENT_ACCEPTED{
setretry0
}
whenHTTP_REQUEST{
sethttp_request[HTTP::request]
}
wh..
分类:
其他好文 时间:
2014-07-04 00:48:07
阅读次数:
681
Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL.
分类:
其他好文 时间:
2014-07-03 23:46:37
阅读次数:
389
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-07-03 20:34:46
阅读次数:
193
Express 4.x的学习笔记,4.x和3.x的版本有了很多不同。看了官网上资料,也翻了很多博客。
分类:
Web程序 时间:
2014-07-03 20:16:02
阅读次数:
548
1、使用node-xlsx包var xlsx = require('node-xlsx'); 只支持xlsx格式2、解析的Excel文件格式如下:3、程序如下: var obj = xlsx.parse('D:/test.xlsx'); //第一个工作表的数据 var data = o...
分类:
Web程序 时间:
2014-07-03 20:14:12
阅读次数:
357
安装Node.js安装过程
1、下载Node.js相关的node-v0.10.29-x86.msi
2、双击“node-v0.10.29-x86.msi”
3、进入Node.js安装界面
4、单击“Next”,接受协议
5、继续“Next”,选择安装路径,若不修改,就选默认路径
6、安装核心的Node.js...
分类:
Web程序 时间:
2014-07-03 16:26:13
阅读次数:
202