上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 35 下一页
摘要: A reader lives a thousand lives before he die... The man who never reads lives only one. 阅读全文
posted @ 2017-02-21 16:02 zslm___ 阅读(139) 评论(0) 推荐(0) 编辑
摘要: public static class JsonHelper { static JsonHelper() { Newtonsoft.Json.JsonSerializerSettings setting = new Newtonsoft.Json.JsonSerializerSettings(); Jso... 阅读全文
posted @ 2017-02-21 09:48 zslm___ 阅读(8252) 评论(1) 推荐(1) 编辑
摘要: 静态方法是同步方法:自动加锁,锁的对象是类对象 阅读全文
posted @ 2017-02-15 17:38 zslm___ 阅读(372) 评论(0) 推荐(0) 编辑
摘要: com.google.code.gson gson 2.8.0 import com.google.gson.Gson; import com.google.gson.GsonBuilder; class JsonHelper { public sta... 阅读全文
posted @ 2017-02-14 18:21 zslm___ 阅读(1269) 评论(0) 推荐(0) 编辑
摘要: Life is a journey. What we should care about is not where it's headed but what we see and how we feel. Convention over Configuration(约定优于配置) 阅读全文
posted @ 2017-02-09 17:17 zslm___ 阅读(237) 评论(0) 推荐(0) 编辑
摘要: public sealed class JsonSerializer { public static byte[] Serialize(object message) { return Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(message)); } ... 阅读全文
posted @ 2017-02-05 19:28 zslm___ 阅读(1703) 评论(0) 推荐(0) 编辑
摘要: var cts = new CancellationTokenSource(); Thread t = new Thread(new ThreadStart(() => { Console.WriteLine(string.Format("{1}线程Id:{0}开始运行", Thread.C... 阅读全文
posted @ 2017-02-05 18:16 zslm___ 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 命令行 注意选择 程序包源 阅读全文
posted @ 2017-01-05 18:44 zslm___ 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 调用如下 有意思的是假如:当前日期是 2016.12.29日,起始日期是2016.7.30 得到的结果与 起始日期是 2016.7.31号一样,都是 "4 月, 4 周, 1 天" 这是因为11月没有31号 为了避免出现 1.31号加1个月变成2.28,而2.28加1个月变成 3.28这种狗血事情, 阅读全文
posted @ 2016-12-29 14:19 zslm___ 阅读(364) 评论(0) 推荐(0) 编辑
摘要: using Newtonsoft.Json; 之前拼接两个json串,是用的这样的代码 虽然效率挺高的,但是代码很丑啊 字符串操作的缺陷: 1)不优雅 2)不通用 3)没有办法替换原有的值 后来想起可以用dynamic类型来实现 如 原来是用的 d111.c=d112.c,但是这又相当 不通用,而用 阅读全文
posted @ 2016-11-22 11:43 zslm___ 阅读(4836) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 35 下一页