会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
江山一族
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
25
下一页
2020年3月28日
mongodb删除指定字段
摘要: db.getCollection('geoServer').update({},{$unset:{longitude:null,latitude:null}},{ multi: true}) 实测有效,拿去吧
阅读全文
posted @ 2020-03-28 18:10 江山一族
阅读(1273)
评论(0)
推荐(1)
2020年3月20日
nodejs地理坐标转换
摘要: //国测局坐标(火星坐标,比如高德地图在用),百度坐标,wgs84坐标(谷歌国外以及绝大部分国外在线地图使用的坐标)var coordtransform=require('coordtransform');// //百度经纬度坐标转国测局坐标// var bd09togcj02=coordtrans
阅读全文
posted @ 2020-03-20 10:48 江山一族
阅读(964)
评论(0)
推荐(0)
2020年1月14日
nodejs 公私钥文件加密解密
摘要: 详情参考 http://nodejs.cn/api/crypto.html, http://nodejs.cn/api/buffer.html 利用 openssl 生成公钥私钥 生成公钥: openssl genrsa -out privateKey.pem 1024 生成私钥: openssl
阅读全文
posted @ 2020-01-14 14:40 江山一族
阅读(1953)
评论(0)
推荐(0)
2020年1月5日
mysql基础知识
摘要: 一 、String 类 1. mysql 常用函数 length, concat, substr, upper, lower, trim,ifnull,isnull; 如果中文字段乱码: set names gbk; 2. 其他函数 (1) lpad, 左边用 \* 号填充, 总字符串为长度为 10
阅读全文
posted @ 2020-01-05 17:25 江山一族
阅读(218)
评论(0)
推荐(0)
2020年1月4日
nodejs 连接mysql 集群,开启事务,事务回滚封装
摘要: mysql.js const mysql = require("mysql"); const poolCluster = mysql.createPoolCluster({ removeNodeErrorCount: 1, // Remove the node immediately when co
阅读全文
posted @ 2020-01-04 09:34 江山一族
阅读(1832)
评论(3)
推荐(0)
2019年11月30日
pm2 启动eggjs,
摘要: 1.启动eggjs pm2 start npm --name eggjs -- run dev 修改代码,无需重启
阅读全文
posted @ 2019-11-30 15:41 江山一族
阅读(2160)
评论(0)
推荐(0)
2019年11月7日
js身份证验证,二代身份证,大陆,权重验证,正规
摘要: 话不多说,直接复制即用。。。 function regIdCard(idcode) { const weight_factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; const check_code = ['1', '0',
阅读全文
posted @ 2019-11-07 15:53 江山一族
阅读(262)
评论(0)
推荐(0)
2019年11月2日
nodejs限制IP一段时间内的访问次数
摘要: const Redis = require('ioredis'); const {getmac)= require(' getmac'); getmac();//获取mac地址 const cache = new Redis({ port: 6300, // Redis port host: "19
阅读全文
posted @ 2019-11-02 09:23 江山一族
阅读(3342)
评论(1)
推荐(0)
2019年9月23日
nodejs链接mysql集群,nodejs PoolCluster : Error: Too many connections
摘要: const mysql = require('mysql'); const config = require('../config/config'); const poolCluster = mysql.createPoolCluster({ removeNodeErrorCount: 1, //
阅读全文
posted @ 2019-09-23 18:31 江山一族
阅读(606)
评论(0)
推荐(0)
2019年9月19日
nodejs,mysql语句in的写法
摘要: exports.findTest = async()=>{ const ids = ['b3bc6e3dbb2a420aa8d569d70283e4ed', '6fa0671fd75d418398b5ab4a35bfe21d'] const sql = `select id,pay_type fro
阅读全文
posted @ 2019-09-19 18:28 江山一族
阅读(2010)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
25
下一页
公告