摘要: 每个开发人员现在应该下载的十种必备工具发布日期: 7/20/2004|更新日期: 7/20/2004本文自发布以来已经增加了新信息。请参阅下面的编辑更新。本文讨论:•用于编写单元测试的 NUnit•用于创建代码文档资料的 NDoc•用于生成解决方案的 NAnt•用于生成代码的 CodeSmith•用于监视代码的 FxCop•用于编译少量代码的 Snippet Compiler•两种不同的转换器工具:ASP.NET 版本转换器和 Visual Studio .NET 项目转换器•用于生成正则表达式的 Regulator•用于分析程序集的 .NET Reflector本文使用了下列技术:.NET、 阅读全文
posted @ 2012-04-08 13:51 ScottGu 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 中文翻译: 弥合对象/关系之间的鸿沟 O/RM技术可以简化数据访问,但也需要注意到引入这个新的抽象层来的挑战。 克雷格·罗素 发表于: Queue杂志 ——对象-关系映射 第6卷 第3期, 五月/六月 2008 现代的应用程序使用两种截然不同的技术构建而成:面向对象编程用于业务逻辑部分; 关系型数据 阅读全文
posted @ 2012-04-08 10:52 ScottGu 阅读(1324) 评论(0) 推荐(1) 编辑
摘要: private static void PrintSpiral () { int number = 3; int[,] spiralArr = Spiral(number); for (int i = 0; i < number; i++) { for (int j = 0; j < number; j++) { Console.Write(spiralArr[i, j] + " ... 阅读全文
posted @ 2012-03-29 19:40 ScottGu 阅读(235) 评论(0) 推荐(1) 编辑
摘要: SQLServer中字符串型和Unicode字符串型的区别标签:sqlserver数据库分类:SqlServer看书时感觉字符串型(varchar等)和Unicode字符串型(nchar等)很让人费解;花了一点时间,以下是网摘和书摘的整理:例如 varchar 和 nvarchar :nvarcha... 阅读全文
posted @ 2011-11-27 13:29 ScottGu 阅读(3175) 评论(0) 推荐(0) 编辑
摘要: View Code 1 public class PLINQ 2 { 3 static int[] arr = Enumerable.Range(654321, 101010).ToArray(); 4 5 public static int _computeTimes = 0; 6 7 public static void Test () 8 { 9 Utils.Measure("Sequential", () =>10 {11 ... 阅读全文
posted @ 2011-11-16 21:20 ScottGu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 先看一段代码:View Code 1 internal class ThrowAndThrowEx 2 { 3 public static void Test () 4 { 5 Class1.DoSomething(); 6 } 7 } 8 9 10 public class Class111 {12 public static void DoSomething ()13 {14 try15 {16 ... 阅读全文
posted @ 2011-11-10 15:07 ScottGu 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 我在面试.NET/C#程序员时会提出的问题2011-03-03 07:38by 老赵, 14861 visits说起来我也面试过相当数量的.NET(包括C#,后文不重复)程序员了,有的通过电话,有的面谈。后来发现,其实提的问题来来回回也就那么几个。这些问题有的已经有十年历史了,至少也有三年。我想对于一个“不错”的.NET程序员来说,在简单的提示下绝大部分问题应该可以“对答如流”。可能您也会觉得这些太细节,真要追究起来似乎也大都不是必须的,无视这些照样可以写程序,做网站,赚工资,但是我不会满足于成为(包括招聘)这样的程序员,暂时也懒得解释掌握这些东西的益处和重要性。 每个人都有自己的看法, 一切 阅读全文
posted @ 2011-11-10 14:39 ScottGu 阅读(787) 评论(0) 推荐(0) 编辑
摘要: Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.处理方法,删除网站子文件夹web.config中urlMapping标签 阅读全文
posted @ 2011-11-02 16:49 ScottGu 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 最近做一个仿微博的项目,需要用到类似微博中的微博分享;用户分享一个视频页面的链接(优酷、土豆、酷6等);系统要根据这个链接,向视频网站的api请求视频的基本信息,得到诸如视频swf文件地址、视频缩略图、视频时长、描述、标题等等信息;看完下面文章http://www.cnblogs.com/leoo2sk/archive/2009/06/17/di-and-ioc.html仿照着做了点设计:通过一个反射工厂:VideoFactory 得到符合IVideoSite接口的具体服务类,具体的api操作都在具体服务类中IVideoSite用来封装不变的方面也就是对视频的操作方法,变化的是视频的提供网站反 阅读全文
posted @ 2011-10-31 20:56 ScottGu 阅读(668) 评论(0) 推荐(1) 编辑
摘要: //用正则表达式从网页里面提取视频地址//获得一个页面地址,拿到页面html,然后正则表达式去匹配视频地址//详细的看注释吧。 1///<summary> 2 /// 网页视频处理类 3 ///</summary> 6 ///<history> 7 /// 8 ///</history> 9 public class WebVideo 10 { 11 ///<summary> 12 /// 优酷、酷6、土豆等视频页面地址 13 ///</summary> 14 private string _pageUrl; 15 ... 阅读全文
posted @ 2011-10-31 20:32 ScottGu 阅读(4784) 评论(5) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 取单个汉字的拼音声母 3 /// </summary> 4 /// <param name="c">要转换的单个汉字</param> 5 /// <returns>拼音首字母</returns> 6 public string GetPYChar(string c) 7 { 8 try 9 {10 byte[] array = new byte[2];11 ... 阅读全文
posted @ 2011-10-21 16:54 ScottGu 阅读(513) 评论(0) 推荐(0) 编辑
摘要: this.lstViewEventDetail.Items.Clear(); string selectedItem = this.lstBoxCtrlEventType.SelectedItem.ToString().Trim(); EventLog... 阅读全文
posted @ 2011-10-21 16:48 ScottGu 阅读(954) 评论(0) 推荐(0) 编辑
摘要: 从C#的Singleton设计模式实现看.NET Framework特性对开发者的重要性 近来,我在学习如何在C#语言中使用设计模式中读到一些资料,其中有关Singleton设计模式引起了我的注意。学过设计模式的开发者都知道Singleton模式。我想简要地解释一下这个设计模式是为那些尚未学习过设计... 阅读全文
posted @ 2011-10-21 16:46 ScottGu 阅读(2035) 评论(0) 推荐(0) 编辑
摘要: class PublicFun { } /// <summary> /// calculate the distance /// </summary> public struct EarthPoint { //equatorial radius:WGS84 standard major semi-axis of the earth(unit:m) public const double Ea = 6378137; public const double Eb = 6356725; // 极半径 public readonly double Long... 阅读全文
posted @ 2011-10-21 16:23 ScottGu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 当页面滚动到低端时,执行ajax方法从web service获取更多微博,并加载到页面上GetMicroblogs.js/// <reference path="../Scripts/jquery-1.4.1-vsdoc.js" />$(function () { var i = 0; $(window).bind("scroll", function (event) { //滚动条到网页头部的 高度,兼容ie,ff,chrome var top = document.documentElement.scrollTop + document. 阅读全文
posted @ 2011-10-21 15:58 ScottGu 阅读(4929) 评论(4) 推荐(2) 编辑
摘要: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'D:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more info 阅读全文
posted @ 2011-10-10 13:50 ScottGu 阅读(235) 评论(0) 推荐(0) 编辑