随笔分类 -  c#

摘要:原文:https://medium.freecodecamp.org/learning-go-from-zero-to-hero-d2a3223b3d86 Learning Go — from zero to hero Let’s start with a small introduction to 阅读全文
posted @ 2019-01-15 12:12 英雄饶命啊 阅读(294) 评论(0) 推荐(0)
摘要:如下代码,修改成只支持oracle: 阅读全文
posted @ 2017-12-09 17:32 英雄饶命啊 阅读(2038) 评论(0) 推荐(1)
摘要:过滤webservice的请求日志,做权限验证功能等。 1. 2.在服务端的公开方法增加特性 3. 4. 5.client 6.web.config配置 阅读全文
posted @ 2017-05-15 14:43 英雄饶命啊 阅读(1981) 评论(0) 推荐(0)
摘要:原文地址:http://www.cnblogs.com/shanyou/p/6676357.html。 微软在Visual Studio 2017 正式发布的时候也上线了一个参考应用https://github.com/dotnet/eShopOnContainers , 最近微软给这个参考应用写了 阅读全文
posted @ 2017-04-07 09:11 英雄饶命啊 阅读(260) 评论(0) 推荐(0)
摘要:原文地址:http://blog.csdn.net/rdhj5566/article/details/50646599 一、背景 我们实际系统中有很多操作,是不管做多少次,都应该产生一样的效果或返回一样的结果。 例如: 1. 前端重复提交选中的数据,应该后台只产生对应这个数据的一个反应结果。 2. 阅读全文
posted @ 2017-04-06 10:29 英雄饶命啊 阅读(238) 评论(0) 推荐(0)
摘要:public class RPCServer { public static void Test() { var factory = new ConnectionFactory() { HostName = "localhost" }; using(var conn = factory.CreateConne... 阅读全文
posted @ 2016-04-08 10:39 英雄饶命啊 阅读(364) 评论(0) 推荐(0)
摘要:启动mq服务:rabbitmq-service.bat 阅读全文
posted @ 2016-04-06 15:11 英雄饶命啊 阅读(209) 评论(0) 推荐(0)
摘要:/// /// 注意 只有在构造器没有副作用的时候才能使用这个技术 /// class Singleton { private static Singleton _value = null; private Singleton() { ... 阅读全文
posted @ 2016-01-14 09:57 英雄饶命啊 阅读(153) 评论(0) 推荐(0)
摘要:原文:http://www.dotnetperls.com/optimizationGenerally, using the simplest features of the language provides the best performance. For example, using the... 阅读全文
posted @ 2016-01-13 10:37 英雄饶命啊 阅读(281) 评论(0) 推荐(0)
摘要:原文:http://stackoverflow.com/questions/573872/what-is-the-best-workaround-for-the-wcf-client-using-block-issue/573917#573917方便使用的一种方式:public static cla... 阅读全文
posted @ 2016-01-12 10:44 英雄饶命啊 阅读(181) 评论(0) 推荐(0)
摘要:原文:https://msdn.microsoft.com/en-us/library/jj155757.aspxusing System;using System.Collections.Generic;using System.Diagnostics;using System.IO;using ... 阅读全文
posted @ 2015-09-04 00:32 英雄饶命啊 阅读(235) 评论(0) 推荐(0)
摘要:原文: http://www.newtonsoft.com/json/help/html/Performance.htmTo keep an application consistently fast, it is important to minimize the amount of time t... 阅读全文
posted @ 2015-07-28 09:13 英雄饶命啊 阅读(289) 评论(0) 推荐(0)
摘要:public class JsonpResult : JsonResult { object _data = null; public JsonpResult() { } public JsonpResult(object data) ... 阅读全文
posted @ 2015-06-25 11:21 英雄饶命啊 阅读(397) 评论(0) 推荐(0)
摘要:原文:https://msdn.microsoft.com/en-us/data/dn456843.aspxPrior to EF6 Entity Framework insisted on opening the database connection itself (it threw an ex... 阅读全文
posted @ 2015-06-25 09:03 英雄饶命啊 阅读(355) 评论(0) 推荐(0)
摘要:老赵写的文章,原文:http://blog.zhaojie.me/2009/09/i-made-a-mistake-can-you-figure-it-out-answer.htmlpublic static class MyClass{ public static readonly Guid... 阅读全文
posted @ 2015-06-19 14:17 英雄饶命啊 阅读(254) 评论(0) 推荐(0)
摘要:public static string RsaEncrypt(string publickey, string content) { RSACryptoServiceProvider rsa = new RSACryptoServiceProvi... 阅读全文
posted @ 2015-06-02 14:37 英雄饶命啊 阅读(242) 评论(0) 推荐(0)
摘要:原文:http://lvasquez.github.io/2014/11/18/EntityFramework-MySql/For the Entity Framework 6 support we need to have this requirementsMySQL Connector/Net ... 阅读全文
posted @ 2015-05-23 14:14 英雄饶命啊 阅读(358) 评论(0) 推荐(0)
摘要:原文: http://stackoverflow.com/questions/7888880/what-is-redis-and-what-do-i-use-it-forRedis = Remote Dictionary ServiceTL;DR: If you can map a use case... 阅读全文
posted @ 2015-04-13 17:57 英雄饶命啊 阅读(277) 评论(0) 推荐(0)
摘要:在设计应用程序时,应该尽可能地避免进行线程同步。为此,要避免使用一些共享数据,比如静态字段。线程用new操作符构造一个对象时,new操作符会返回对新对象的一个引用。在这个时刻,只有构造对象的线程才有对它的引用;其他任何线程都不能访问那个对象。如果你能一直避免将这个引用传给可能同时使用对象的另外一个线... 阅读全文
posted @ 2015-04-13 16:17 英雄饶命啊 阅读(212) 评论(0) 推荐(0)
摘要:Pausing for a Period of TimeProblem:You need to (asynchronously) wait for a period of time. This can be useful when unittesting or implementing retry ... 阅读全文
posted @ 2015-03-15 19:38 英雄饶命啊 阅读(633) 评论(0) 推荐(0)