自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (3)
  • 收藏
  • 关注

转载 named capture groups

const pattern = /(?\d{4})-(?\d{2})-(?\d{2})/u;const result = pattern.exec('2017-12-15');// result.groups.year === '2017'// result.groups.month === '12'// result.groups.day === '15'参考文献:https

2017-12-30 10:22:56 350

原创 安装nginx同时安装redis2-nginx-module模块

安装rediswget http://download.redis.io/releases/redis-3.2.9.tar.gztar xzf redis-3.2.9.tar.gzcd redis-3.2.9make下载nginx及其redis模块wget -c https://nginx.org/download/nginx-1.10.1.tar.gz  接下...

2017-12-26 16:33:16 3666

转载 判断横竖屏的一个小方法

var mql = window.matchMedia("(orientation: portrait)");function onMatchMeidaChange(mql){    if(mql.matches) {        // 竖屏    }else {        // 横屏    }}onMatchMeidaChange(mql);mql.ad

2017-12-20 10:14:15 345

转载 // Error: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on

// Error: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about

2017-12-11 12:45:18 211

原创 mongodb的aggregate实例1

好不容易写的,得记录一下,免得找不到了[ { $match: { "from": 'h5player', 'code': {$in: ['init']} } }, { $group: { "_id": { code: '$code', 'cost': { $switch:

2017-12-06 18:34:27 262

原创 迁移mongodb数据库 版本3.0.6

因为a服务器要关闭了,但是上面有个mongodb,要把他迁移到b服务器上。两个机器上的moongodb版本都是3.0.6假设a的ip和端口是是a.a.a.a:a  ,要迁移的a的数据库中的一个是jscss在b服务器上执行下面的命令1、./mongodump -h  a.a.a.a:a -d jscss -o /abc/bak     这句话就把a上面的jscss数据库备份到了b的/

2017-12-06 10:52:54 380

转载 closures and variables

There is one notable side effect of this scope-chain configuration. The closure always gets the last value of any variable from the containing function.Remember that the closure stores a reference to

2017-12-04 18:42:27 135

转载 closures

Closures are functions that have access to variables from another function's scope. This is often accomplished by creating a function inside a function:function createComparisonFunction(propertyName

2017-12-04 17:53:34 237

转载 execution context and scope

The concept of execution context, referred to as context for simplicity, is of the utmost importance in JavaScript. The execution context of a variable or function defines what other data it has acces

2017-12-04 15:34:21 193

转载 the constructor pattern

function sayName(){alert(this.name);}function Person(name,age){this.name=name;this.age=age;this.sayName=sayName;}var person1=new Person('nic',29);To create a new instance of Pers

2017-12-04 11:12:57 125

原创 内部使用的解析require

RegExp.escape = function (s) {return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');};let hh=['','-','=','+',"{",'[','(','*',"~","/","%",">","var fs = require('fs');var file = './code.js';var

2017-12-01 16:27:42 317

原创 chrome64的Local Overrides

这个功能就是为了对付在开发者工具中修改了东西后一刷新什么都没了的尴尬,这么操作:以调试youku的代码为例:在开发者工具中打开下面的面板:sources-->overrides-->setup overrides选择完了本地的存放目录后还需要把下面的这个勾选上才能起作用选择一个一个文件,然后修改一下,之后得按下ctrl+s

2017-12-01 12:05:13 3246

百叶窗默认打开第一个

一个百叶窗的demo,是我从一个原本的demo修改而来的

2014-09-03

jquery.easydrag.js

之前下载了一个,但是在设置setHandler的时候有问题,后来在网上找到这个,与大家共享!

2014-05-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除