1、启动 Windows Error Reporting Service 服务
1、启动 Windows Error Reporting Service 服务
现今社会大家的消费水平都提高了不少,同时买东西被坑的概率也不少,我这边主要来分享一下安全购物心得,买东西不仅仅是买到手就完事了,还要保证自己得到应有的、便捷的售后服务。今天刚好去了一趟百脑汇,因为硬盘出问题了要维修。质保三年,现在才过了1年半,但之前的店铺竟然搬走了,没人负责了。不过,通过硬盘序列号在官网查到了还在质保期内,只能靠自己联系品牌售后了。
其实不同商品的售后服务保障也不一样,下面我来例举几种:
行车仪品牌:靓知渝
使用方法:
1、在有wifi的情况下,下载“慧车天下”APP,当然,如果手机流量充足,也是可以随时下载的。
//mongodb_demo.js
/**
cnpm install mongodb
*/
var MongoClient = require('mongodb').MongoClient;
var DB_CONN_STR = 'mongodb://test:123456@127.0.0.1:27017/test'; // 数据库为 test
var insertData = function (db, callback) {
先创建目录,创建log文件,然后启动服务
cd /d D:Program FilesMongoDBServer3.4in mongod.exe --dbpath d:datadb --logpath "D:datadbConfmongodb.log" --auth
Chrome浏览器清除js缓存方法虽然简单,但有些人还是不太会,有些人会去设置里面清除有时候没有用,这里写一下简单步骤,使用一次以后就会了,而且速度更快
后面的三个方法是加的,前面的经过压缩的是插件原来的内容。
一直以为Math.Round就是四舍五入,谁知道没加参数,得到的结果就是有问题
测试代码:
void Main() { string.Format("Round {0} = {1}",2.4M,Math.Round(2.4M,0)).Dump(); string.Format("Round {0} = {1}",2.5M,Math.Round(2.5M,0)).Dump(); string.Format("Round {0} = {1}",2.6M,Math.Round(2.6M,0)).Dump(); string.Format("Round {0} = {1}",3.4M,Math.Round(3.4M,0)).Dump(); string.Format("Round {0} = {1}",3.5M,Math.Round(3.5M,0)).Dump(); string.Format("Round {0} = {1}",3.6M,Math.Round(3.6M,0)).Dump(); }
输出内容:
我们知道程序中使用异步、多线程会提高程序的响应速度,但也不能无限使用多线程,这在高峰会造成系统cpu上升,系统卡顿,这就需要我们自己来控制开启的线程数,不多说看代码。
private static int threadCountByOrderId = 0; private static int maxThreadCountByOrderId = 30; public bool dealorder(int OrderId) { var threadNumber = Interlocked.Exchange(ref threadCountByOrderId, threadCountByOrderId); if (threadCountByOrderId > maxThreadCountByOrderId) { return OrderChangePushToBigDataImpService.PushOrderToBigData(OrderId, Logger); } else { Task.Factory.StartNew(() => { Interlocked.Increment(ref threadCountByOrderId); try { using (var context = MefInjectionProvider.CreateContext()) { var NewOrderChangePushToBigDataImpService = context.Value.GetExport<IOrderChangePushToBigDataImpService>(); NewOrderChangePushToBigDataImpService.PushOrderToBigData(OrderId, Logger); } } finally { Interlocked.Decrement(ref threadCountByOrderId); } }); return true; } }
这样就能控制线程数据了
Powered By Z-BlogPHP 1.7.3
Copyright 2024-2027 pukuimin Rights Reserved.
粤ICP备17100155号