2009年11月3日
摘要: Selection sort is also asorting algorithm, specifically anin-place comparisonsort. It has O(n2) complexity, making it inefficient on large lists, and generally performs worse than the similarinsertion... 阅读全文
posted @ 2009-11-03 16:35 lantionzy 阅读(255) 评论(0) 推荐(1) 编辑
摘要: Insertion sort is a simple sorting algorithm, a comparison sort in which the sorted array (or list) is built one entry at a time. It is much less efficient on large lists than more advanced algorithms... 阅读全文
posted @ 2009-11-03 16:21 lantionzy 阅读(295) 评论(0) 推荐(1) 编辑
摘要: Here are two strings, my task is to compare these two str1 and str2, and get if the occurences of each character of them are equal.  As we know, we can get the ASCII code of a character, so I use an a... 阅读全文
posted @ 2009-11-03 15:26 lantionzy 阅读(375) 评论(0) 推荐(1) 编辑
摘要: Here is a way to find the k-th largest number from an ayyay based on the theory of quick sort with an algorithmic complexity of O(n).  First we find a base element from the array randomly, and then re... 阅读全文
posted @ 2009-11-03 14:31 lantionzy 阅读(646) 评论(0) 推荐(1) 编辑
摘要: The quick sort is an in-place, divide-and-conquer, massively recursive sort. Typically, quicksort is significantly faster in practice than other Θ(nlogn) algorithms, because its inner loop can be... 阅读全文
posted @ 2009-11-03 13:26 lantionzy 阅读(339) 评论(0) 推荐(1) 编辑
摘要: The bubble sort is the oldest and simplest sort in use. Unfortunately, it's also the slowest.   The bubble sort works by comparing each item in the list with the item next to it, and swapping them if ... 阅读全文
posted @ 2009-11-03 10:32 lantionzy 阅读(371) 评论(1) 推荐(1) 编辑
  2009年11月1日
摘要: First, we take some time to have a look at these words: "The String object is immutable. Every time you use one of the methods in the System.String class, you create a new string object in memory, whi... 阅读全文
posted @ 2009-11-01 17:16 lantionzy 阅读(254) 评论(1) 推荐(1) 编辑
  2009年10月30日
摘要: WebRequest is a request to send messages to a URI to send messages, URI as a parameter is passed to Create () method. And we take WebResponse class as data obtained from the server. The method WebRequ... 阅读全文
posted @ 2009-10-30 18:18 lantionzy 阅读(307) 评论(0) 推荐(1) 编辑
摘要: This archive is from scott's blog http://weblogs.asp.net/scottgu    To help illustrate this intellisense improvements coming with VS 2010, let’s start by doing a simple scenario in VS 2008 where... 阅读全文
posted @ 2009-10-30 11:39 lantionzy 阅读(2494) 评论(0) 推荐(1) 编辑
  2009年10月29日
摘要: Now, we are talking something aboutOffice Access(2007)operationusing C#. And I will show you how to create a access db file, including creating new table, insert and update data item. Before we start ... 阅读全文
posted @ 2009-10-29 23:47 lantionzy 阅读(832) 评论(0) 推荐(1) 编辑
摘要: A game of ten-pin bowling is divided into ten rounds (called "frames"). In a frame, each player is given two opportunities to knock down the skittle targets (called "pins"). The player rolls the first... 阅读全文
posted @ 2009-10-29 18:33 lantionzy 阅读(1281) 评论(1) 推荐(1) 编辑
摘要: Indexers allow instances of a class or struct to be indexed just like arrays. Indexers resemblepropertiesexcept that their accessors take parameters.In the following example, a generic class is define... 阅读全文
posted @ 2009-10-29 00:27 lantionzy 阅读(334) 评论(0) 推荐(0) 编辑
  2009年10月28日
摘要: I findEnglish is more and more important in my job, so I will drive myself to write blog using English.  I hope I can stick to it, and of course I will get back to Chinese one day   Come on!! 阅读全文
posted @ 2009-10-28 23:21 lantionzy 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 加上 N 代表存入数据库时以 Unicode 格式存储。 N'string' 表示string是个Unicode字符串 Unicode 字符串的格式与普通字符串相似,但它前面有一个 N 标识符(N 代表 SQL-92 标准中的国际语言 (National Language))。N 前缀必须是大写字母。例如,'Michél' 是字符串常量而 N'Michél' 则是 Unicod... 阅读全文
posted @ 2009-10-28 13:08 lantionzy 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 一、OBJECT_ID ---- 返回架构范围内对象的数据库对象标识号 语法  OBJECT_ID(  '[ database_name . [ schema_name ] .| schema_name . ]  object_name'[ ,'object_type' ] ) 参数   'object_name': 要使用的对象。object 的数据类型为 char 或 nchar。如果 obj... 阅读全文
posted @ 2009-10-28 11:03 lantionzy 阅读(772) 评论(0) 推荐(1) 编辑
  2009年10月27日
摘要: 留个记录,以作备份:http://baike.baidu.com/view/94238.htm?fr=ala0 http://bbs.51cto.com/thread-536605-1.html 阅读全文
posted @ 2009-10-27 15:15 lantionzy 阅读(190) 评论(0) 推荐(0) 编辑
  2009年10月23日
摘要: 这两天整理了一下使用C#对word的操作,这里和大家分享:  1、新建Word文档[代码]  2、给word文档添加页眉页脚[代码]  3、设置文档格式并添加文本内容、超链接[代码]  4、添加图片[代码]  5、表格处理(插入表格、设置格式、填充内容、表格中加图片)[代码]  6、把Word文档转化为Html文件[代码]可以从这里下载整个类(包含更多内容)WordOperate cs file转... 阅读全文
posted @ 2009-10-23 10:09 lantionzy 阅读(11340) 评论(12) 推荐(9) 编辑
  2009年10月21日
摘要: 在命名空间using System.Net.Mail中提供方法根据指定的smtp服务器来发送邮件。下面说说如何实现:  1、首先要发送邮件,需要有一个邮箱帐号,比如网易邮箱、新郎邮箱、qq邮箱等,我以网易的163邮箱为例。然后我们需要知道163邮箱的smtp服务器地址:smtp.163.com。一般常用的Smtp服务器地址为:   网易126:smtp.126.com   网易163:smtp.1... 阅读全文
posted @ 2009-10-21 13:54 lantionzy 阅读(1638) 评论(7) 推荐(1) 编辑
  2009年10月20日
摘要: 在实际开发中,有时候为了使自己的应用程序更有意思或添加更多功能,会想要在界面上添加一个可以显示时间并且可以实时更新的控件。废话不多说,下面将一步步教你如何实现:  1、新建一个Winform程序(Windows Forms Application -- Visual C#),命名为TestTimer。  2、在Design模式下,使用Toolbox添加一个label,调整label和Form1大小... 阅读全文
posted @ 2009-10-20 19:10 lantionzy 阅读(2533) 评论(0) 推荐(0) 编辑
  2009年10月19日
摘要: 关系数据库的设计构筑在实体和关系的概念之上。一个实体一般依赖于一个“父”表。通常,对于正在描述的实体的每个实例,表中有且仅有一个行与之对应。然而一个实体或许需要多个其他表来提供额外的描述信息。关系是对两个实体相互之间如何逻辑相关的一种表达。  从实践的观点看,有三种规范形式:  1、第一范式(1NF)全部是为了消除重复的数据组以及保证原子性的。在较高水平上,第一范式是通过下... 阅读全文
posted @ 2009-10-19 18:01 lantionzy 阅读(362) 评论(4) 推荐(2) 编辑