12 2016 档案

摘要:MongoDB查询转对象是出错Element '_id' does not match any field or property of class 解决方法: 1、在实体类加:[BsonIgnoreExtraElements] 2、或者定义public ObjectId _id { get; set; } 例子: [BsonIgnoreExtraElements] public... 阅读全文
posted @ 2016-12-28 17:12 94cool 阅读(4433) 评论(0) 推荐(1) 编辑
摘要:var srcTbl = "20161226"; var destTbl = "20161226-bak"; 方式一: MongoClient client; MongoServer server; MongoDatabase db; MongoClientSettings setting = new MongoClientSettings(); settin... 阅读全文
posted @ 2016-12-28 14:17 94cool 阅读(2068) 评论(0) 推荐(0) 编辑
摘要:class Program { static string mongodb = "mongodb://127.0.0.1:27017"; static string database = "dbCardInfo"; static string tblName = "fcd1"; static Mon 阅读全文
posted @ 2016-12-22 09:16 94cool 阅读(1073) 评论(0) 推荐(0) 编辑
摘要:c# (ENUM)枚举组合类型的谷歌序列化Protobuf,必须在序列化/反序列化时加上下面: RuntimeTypeModel.Default[typeof(Alarm)].EnumPassthru = true; [ProtoContract] class LbsItem { [ProtoMember(1)] pub... 阅读全文
posted @ 2016-12-21 16:09 94cool 阅读(2270) 评论(0) 推荐(0) 编辑
摘要:必须JobManager初始化 方式1: public void Start() { JobManager.AddJob(() => FetchingData(), schedule => { schedule.ToRunEvery(1).Days().At(10, 8); ... 阅读全文
posted @ 2016-12-20 10:22 94cool 阅读(2241) 评论(0) 推荐(0) 编辑
摘要:from:http://www.data321.com/shujuku/20160514417/addToSetQianMianBuXuYaoJinXing 插入文档: SQL语句: INSERT INTO 表名 (列名.......) VALUES(对应的列值.........); MongoDB语句: db.集合名.insert({键:值,键:值,键:值.......... 阅读全文
posted @ 2016-12-16 11:54 94cool 阅读(2018) 评论(0) 推荐(0) 编辑
摘要:1、EF生成的sql语句,用 parameter 进行传值,所以不会有sql注入问题 2、EF下有涉及外部输入参数传值的,禁止使用EF直接执行sql命令方式,使用实体 SQL 参考: https://msdn.microsoft.com/zh-cn/library/cc716760(v=vs.110).aspx 防范 SQL 注入式攻击。 应用程序经常接受外部输入(... 阅读全文
posted @ 2016-12-14 16:31 94cool 阅读(2637) 评论(0) 推荐(0) 编辑
摘要:部署: 1、安装vc_redist.x64vc_redist.x64 2、安装DotNetCore.1.0.0.RC2-WindowsHosting 3、安装DotNetCore.1.0.0-SDK.Preview2-x64 4、控制台命令执行:dotnet -version,确认是否执行成功。成功则Net.Core安装完成 5、发布参考:IIS上部署Net.Core 阅读全文
posted @ 2016-12-13 15:09 94cool 阅读(1882) 评论(0) 推荐(0) 编辑
摘要:c# 调用C++的dll报错 Attempted to read or write protected memory: 原因是:c# 传递Null的string值导致的,将Null改为string.empty即可 阅读全文
posted @ 2016-12-06 09:07 94cool 阅读(1414) 评论(0) 推荐(0) 编辑
摘要:最近我们介绍了LinkedIn的即时通信,最后提到了分型指标和读回复。为了实现这些功能,我们需要有办法通过长连接来把数据从服务器端推送到手机或网页客户端,而不是许多当代应用所采取的标准的请求-响应模式。在这篇文章中会描述在我们收到了消息、分型指标和读回复之后,如何立刻把它们发往客户端。 内容会包含我们是如何使用Play框架和Akka Actor Model来管理长连接、由服务器主动发送事件的。我... 阅读全文
posted @ 2016-12-06 08:28 94cool 阅读(998) 评论(0) 推荐(0) 编辑
摘要:from:http://www.linuxidc.com/Linux/2013-07/88032.htm 1.首先,对于精度比较高的东西,比如money,我会用decimal类型,不会考虑float,double,因为他们容易产生误差,numeric和decimal同义,numeric将自动转成decimal。 DECIMAL从MySQL 5.1引入,列的声明语法是DECIMAL(M,D)。在... 阅读全文
posted @ 2016-12-01 14:30 94cool 阅读(7131) 评论(1) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示