上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 25 下一页
摘要: db.getCollections('students').update({},{$set:{}},{upsert:false,multi:false}) 更新单行,upsert为true时,更新不存在的数据,即为添加数据 db.getCollections('students').update({ 阅读全文
posted @ 2018-05-15 23:36 江山一族 阅读(149) 评论(0) 推荐(0) 编辑
摘要: db.getClloection('user').find().sort({'age':-1}).pretty() 2.自然排序,也就是插入的先后顺序 db.getClloection('user').find().sort({'$natural':-1}) 阅读全文
posted @ 2018-05-15 08:30 江山一族 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1、查询课程中包含math,chinese的课程 db.getCollection('student').find( { course:{$all:['math','chinese']} } ).pretty() 2.查询第二门课程是数学 db.getCollection('student').fi 阅读全文
posted @ 2018-05-14 23:34 江山一族 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1,在终端输入tmux命令进入tmux, control+b x,关闭tmux的初始化session 2,创建自己的session,然后进行分屏 阅读全文
posted @ 2018-05-10 09:14 江山一族 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1.redisclient.hgetall(keyVal) : 返回哈希表 key 中,所有的域和值 阅读全文
posted @ 2018-04-28 17:21 江山一族 阅读(883) 评论(0) 推荐(0) 编辑
摘要: 安装node: sudo ln -s /opt/node-v8.3.9-linux-x64/bin/node /usr/local/bin/node sudo ln -s /opt/node-v8.3.9-linux-x64/bin/npm /usr/local/bin/npm 安装gitbook: 阅读全文
posted @ 2018-04-26 18:01 江山一族 阅读(497) 评论(0) 推荐(0) 编辑
摘要: let x; let a = ['a','b','c'] let b = {name:'LIUNAN',age:19} for(x of a){ document.write(x) } for(x in a){ document.writeln(x+':'+a[x]) } for(x in b){ 阅读全文
posted @ 2018-04-23 22:21 江山一族 阅读(806) 评论(0) 推荐(0) 编辑
摘要: 直接进入命令行输入 1.连接远程redis: redis-cli -h 127.0.0.1 -p 3008 -a pIctur3 (a后是密码) 2.查看缓存;keys * 3.清除缓存:del key 4.清除redis数据库缓存 flushdb 5.清除所有缓存flushall 阅读全文
posted @ 2018-04-23 15:47 江山一族 阅读(962) 评论(0) 推荐(0) 编辑
摘要: 1. 情况: 当 本地需要测试,线上的项目也需要同时测试时,地址了输入还需要打开多个窗口,麻烦 点击圆圈部分 testForm是我新建的 输入请求的action名字 点击齿轮按钮: 地址栏填入方式; 黄色小点表示我们还没有保存,command+s保存 到我们第二个新建的文件 点击test.do文件夹 阅读全文
posted @ 2018-04-08 17:49 江山一族 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 1. const Promise = require('bluebird') const fs = Promise.promisifyAll(Promise.promisify(require('fs'))) 2.针对node npm部分模块,比如xml2js,不支持bluebird包装的形式,解决 阅读全文
posted @ 2018-04-08 17:27 江山一族 阅读(306) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 25 下一页