2011年5月9日

WCF RESTful 4.0 Service级别的异常处理(WCF RESTful 4.0 Service level Exception Handling)

摘要: 众所周知, WCF RESTful 4.0目前没有全局的异常处理方法. 也就是说, 你不能捕获所有的异常. 在ASP.NET里, 你可以在Global.asax.cs的Application_Error事件中捕获并处理所有之前没有被捕获的异常: http://stackoverflow.com/questions/747011/how-do-i-create-a-global-exception-handler-for-a-wcf-services 1: public class Global : HttpApplication 2: { 3: protected void Applicati阅读全文

posted @ 2011-05-09 18:08 BFL 阅读(149) 评论(0)  编辑

2011年4月26日

Let 32 bit of .NET 4.0 Web Application run on 64 bit IIS 6.0(Win2003 x64)

摘要: I assume that you have installed both .Net Framework 2.0 and 4.0, and IIS 6.0 is running under 64 bit mode. Recently, I have to deploy a 32 bit .NET web application onto IIS 6.0 which is running under...阅读全文

posted @ 2011-04-26 18:52 BFL 阅读(81) 评论(0)  编辑

2011年4月25日

Building .NET 4 Websites with MSBuild(without VS2010)

摘要: refer: http://alandjackson.wordpress.com/2010/10/13/building-net-4-websites-without-vs2010/ This post is based on my another one: 使用MSBuild自动编译发布你的ASP.NET应用程序, I assume you have basic knowledge about how to build a Visual Studio .sln solution with MSBuild. Step 1: Install .Net Framework 4.0, downloa阅读全文

posted @ 2011-04-25 14:39 BFL 阅读(139) 评论(0) 编辑

2010年8月6日

设计异常解决方案的几点注意事项

摘要: “要……”描述的是总要遵循的规范(但特殊情况下,可能需要违反)。“考虑……”描述的是一般情况下应该遵循的规范,但如果完全理解规范背后的道理,并有很好的理由不遵循它时,也不要畏惧打破常规。“不要……”描述的是一些几乎绝对不该违反的规范。“避免……”则没有那么绝对,它描述的是那些通常并不好,但却存在一些已知的可以违反的情况。× 不要返回错误码。前面第1节已经讨论了异常的种种好处,所以还是把异常作为报告...阅读全文

posted @ 2010-08-06 16:52 BFL 阅读(47) 评论(0) 编辑

2009年9月5日

JavaScript file referring/JavaScript 文件引用

摘要: Modern web developing languages such as ASP.NET, PHP even CSS have the syntax of importing other code files to current one. ASP.NET: <!--#include file="inc_footer.aspx"-->PHP: <?php include...阅读全文

posted @ 2009-09-05 03:09 BFL 阅读(1213) 评论(0) 编辑

2009年8月21日

Caclulate Weekdays between two dates

摘要: A way to calculate how many weekdays are there between two dates. 1: public static int GetWeekDays(DateTime startDate, DateTime endDate) 2: { 3: startDate = startDate.Date; 4: endDate = endDate.Date; ...阅读全文

posted @ 2009-08-21 15:59 BFL 阅读(117) 评论(0) 编辑

2009年8月13日

Use your own file compare tool in Visual Studio

摘要: Which file compare software are you using for comparing files and folders? How do you like it?I ever tried several ones, include: WinDiff: comes along with the Windows SDK, I think it is the build in ...阅读全文

posted @ 2009-08-13 12:47 BFL 阅读(2065) 评论(10) 编辑

2009年7月21日

一万个无序数查找两个重复数, 异或查找法

摘要: 今天看到园子里的类似本文标题的文章, 答案中没有使用异或的. 按位异或运算符: ^ 两个相同的数按位异或结果为0 任何数和零按位异或结果为这个数本身 根据按位异或的以上特性, 我们可以为下面这首题目给出一个简便的算法: 有一个长度为10000的数列, 存放着1-10000的自然数, 连续, 不重复, 但数列并不是有序的 现在随机选取1-10000之间的某个自然数, 加入到这个数列中, 要求用简便...阅读全文

posted @ 2009-07-21 23:58 BFL 阅读(494) 评论(3) 编辑

2009年7月17日

[FW]:Javascript的匿名函数

摘要: 原文: Javascript的匿名函数 一、什么是匿名函数? 在Javascript定义一个函数一般有如下三种方式: 函数关键字(function)语句: function fnMethodName(x){alert(x);}函数字面量(Function Literals): var fnMethodName = function(x){alert(x);}Function()构造函数: var...阅读全文

posted @ 2009-07-17 17:40 BFL 阅读(47) 评论(0) 编辑

[FW]: A JavaScript Module Pattern

摘要: A JavaScript Module PatternJune 12, 2007 at 12:28 pm by Eric Miraglia | In Development | 97 Comments Eric Miraglia is an engineering manager for the YUI project at Yahoo. Eric has been at Yahoo since ...阅读全文

posted @ 2009-07-17 16:42 BFL 阅读(166) 评论(0) 编辑

http://www.cnblogs.com/BFLForever/