-
Windows系统下自带计算文件散列值的方法,来自这里。
certutil -hashfile yourfilename.ext MD5 certutil -hashfile yourfilename.ext SHA1 certutil -hashfile yourfilename.ext SHA256
-
Node 中发起http2请求时忽略服务器TSL问题,来自这里。
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
-
Node 中发起http2的例子,注意参考自[这里]。(http://www.cnblogs.com/wonglu/archive/2015/12/04/5018351.html)
var https = require('https'); var zlib = require('zlib'); var post_data="………………";//请求数据 var reqdata = JSON.stringify(post_data); var options = { hostname: '10.225.***.***', port: '8443', path: '/data/table/list', method: 'POST', rejectUnauthorized: false, requestCert: true, auth: 'admin:123456************', headers: { 'username': 'admin', 'password': '123456************', 'Cookie': 'locale=zh_CN', 'X-BuildTime': '2015-01-01 20:04:11', 'Autologin': '4', 'Accept-Encoding': 'gzip, deflate', 'X-Timeout': '3600000', 'Content-Type': 'Application/json', "Content-Length":reqdata.length } }; var req = https.request(options, function (res) { }); req.write(reqdata); req.on('response', function (response) { switch (response.headers['content-encoding']) { case 'gzip': var body = ''; var gunzip = zlib.createGunzip(); response.pipe(gunzip); gunzip.on('data', function (data) { body += data; }); gunzip.on('end', function () { var returndatatojson= JSON.parse(body); req.end(); }); gunzip.on('error', function (e) { console.log('error' + e.toString()); req.end(); }); break; case 'deflate': var output = fs.createWriteStream("d:temp.txt"); response.pipe(zlib.createInflate()).pipe(output); req.end(); break; default:req.end(); break; } }); req.on('error', function (e) { console.log(new Error('problem with request: ' + e.message)); req.end(); setTimeout(cb, 10); });
http2 还有这个可以看。
VS版本 | VC++版本 |
---|---|
VS 6.0 | VC 6.0 |
VS 2002 | VC 7.0 |
VS 2003 | VC 7.1 |
VS 2005 | VC 8.0 |
VS 2008 | VC 9.0 |
VS 2010 | VC 10 |
VS 2012 | VC 11 |
VS 2013 | VC 12 |
VS 2014 | VC 13 |
VS 2015 | VC 14 |
Webstrom卡顿:
找到WebStorm.exe.vmoptions这个文件,路径如下
webstorm安装主目录>bin>WebStorm.exe.vmoptions
更改为:
第二行:-Xms526m
第三行:-Xmx1024m
(ps:这里-Xms最大值不能超过1024,否则webstorm将无法打开)
最后重启即可。
-
MySQL全局模拟自增变量
CREATE TABLE test(id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)) ENGINE = MyISAM; REPLACE INTO test() VALUES (); SELECT LAST_INSERT_ID();
-
JavaScript 去除所有空格
function removeAllSpace(str) { return str.replace(/\s+/g, ""); }