摘要: 移动端主要的事件有:touchstart、touchmove、touchend、touchcancel、gesturestart、gesturechange、gestureend 前四者为触摸事件,后者为手势事件,其中需要注意的是touchstart -> touchmove -> touch... 阅读全文
posted @ 2014-09-25 17:05 秋尘 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 在日常运用中,经常遇到点击按钮/菜单的时候,选中了文本,为了避免这种情况,可以使用纯css来解决这个问题(IE10+),对于旧版本的就只能用js:onselectstart = 'return false;'这种方式。以下介绍一下-prefix-user-select:Formal syntax... 阅读全文
posted @ 2014-09-25 10:20 秋尘 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 先要生成一个公钥,使用命令:$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/user/.ssh/id_rsa):Enter passphrase ... 阅读全文
posted @ 2014-09-18 14:22 秋尘 阅读(602) 评论(0) 推荐(0) 编辑
摘要: 1、安装node-inspector 命令: npm install -g node-inspector 2、nodemon --debug xxx.js启动项目(如果使用--debug-brk 就会在程序第一行代码处debug,进入即debug),再新开一个命令窗口,启动node-inspe... 阅读全文
posted @ 2014-09-15 11:06 秋尘 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 1.在MongoDB官网下载最新版本,并且安装 2.解压后在MongoDB文件目录下创建data文件夹和log文件夹,并且在log文件夹中新建mongodb.log文件 3.新建一个配置文件mongo.cfg##数据存储的位置dbpath=D:\Developments\MongoDB\da... 阅读全文
posted @ 2014-09-12 09:30 秋尘 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Express 4.x 默认将启动模块分离到了./bin/www中,直接使用 supervisor/nodemon 无法正常监控应用,使得开发过程中的调试非常不方便。所以我们直接把./bin/www中的监听拖到app.js即可var debug = require('debug')('expre... 阅读全文
posted @ 2014-09-11 10:52 秋尘 阅读(1295) 评论(1) 推荐(1) 编辑
摘要: 初学nodejs,折腾过用handlebars做模板,后来隔了一段重新学习,用了jade,真心简洁……记录一些学习笔记,以备复习。 jade是基于缩进的,所以tab与space不能混用; 属性的设置:link(rel='stylesheet', href='/stylesheets/styl... 阅读全文
posted @ 2014-09-10 14:38 秋尘 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 最近在做微信app,需要用到分享功能,横观文档,压根没有提过分享功能自定义的事情……后来在搜索中找到一些前辈的文章,使用WeixinJSBridge这个接口实现,但是,我非常非常好奇,这是什么渠道透露出来的 ||_||var options = { "appid": '', //可以不设... 阅读全文
posted @ 2014-09-01 10:18 秋尘 阅读(2916) 评论(2) 推荐(0) 编辑
摘要: 国内镜像,飞一般的感觉!编辑 ~/.npmrc 加入下面内容 registry = http://registry.cnpmjs.orgnpm config set registryhttp://registry.cnpmjs.org使用supervisor提高nodejs调试效率(免去重复启动关闭... 阅读全文
posted @ 2014-08-26 10:10 秋尘 阅读(402) 评论(0) 推荐(0) 编辑
摘要: backgroundbackground:(1)url(image1.png) right bottom,(2)url(image2.png) center,(3)url(image3.png) (4)rgba( 0,0,0,0.35)(1)The first background image. T... 阅读全文
posted @ 2014-08-25 16:26 秋尘 阅读(204) 评论(0) 推荐(0) 编辑