- 博客(31)
- 资源 (7)
- 收藏
- 关注
原创 哲学家就餐问题
最近在看操作系统,研究并发处理方面的问题,试着用C#写了“哲学家就餐”问题,已测试。using System;using System.Diagnostics;using System.Threading;namespace Philosopher{ class Program { static void Main(string[] args
2015-03-02 15:59:54
887
原创 (C#)找出数组中最大子序列之和,分别以O(N^2),O(NlogN),O(N) 这3种时间复杂度求解
/* * 找出数组中最大子序列之和,分别以O(N^2),O(NlogN),O(N) 这3种时间复杂度求解 */using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace MaxSubSumPro{ class ArrayFactory {
2012-09-17 18:08:39
2424
原创 (C#)一道看似简单却很难答得完全正确的关于多态的问题
/*关于virtual,overried,new在方法和属性上以this,base形式输出的问题 *问主程序的输出是什么 */using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{ class Prog
2012-09-14 16:20:05
927
原创 (C#)数字反转
/*数字反转,如 12345->54321 */using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static int ReverseInt(i
2012-09-06 18:32:51
2722
转载 (C#)设计模式 之 观察者模式 (经典应用:猫叫,烧开水)
转自:http://www.cnblogs.com/panbbb/archive/2008/11/10/1330695.html/** 题目:* 猫叫了,所有老鼠开始逃跑,主人被惊醒,请用OO的思想描绘此过程* 1,老鼠跟主人是被动的* 2,要考虑联动性与扩展性*/using System;using System.Collections.Generic;using Syste
2012-09-03 18:31:40
3792
转载 (C#)设计模式 之 单例模式
转自:http://www.cnblogs.com/xun126/archive/2011/03/09/1970807.html 最近在学设计模式,学到创建型模式的时候,碰到单例模式(或叫单件模式),现在整理一下笔记。 在《Design Patterns:Elementsof Resuable Object-Oriented Software》中的定义是:Ensure a cla
2012-09-03 18:14:25
607
原创 2个堆栈实现自定义队列的入队出队方法 - 调用者定义2个栈的容量
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace MyQueue{ public class MyQueue2 { private int _bigStackFlag = 0; private int _b
2012-09-03 17:58:03
21186
原创 2个堆栈实现自定义队列的入队出队方法 - 栈容量默认自动扩充
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace MyQueue{ public class MyQueue { private bool _isStoredInLeft = true; private S
2012-09-03 17:55:58
1185
转载 解读微软SDET(Software Development Engineer in Test)
以下内容转自:http://zhidao.baidu.com/question/156694209.html关于微软SDET职位,是一个很有争议的话题。我不想说SDET多么多么好,也不想说它多么糟,这里我以一个微软(总部)SDET的身份来讲一下,给大家最真实第一手
2011-10-09 14:48:36
2029
转载 SQL CTE 递归游戏-你厉害吗,来过5关
转载SQL大牛的文章,CTE技术用于递归查询真是挺好用的,我也是刚接触这个。附CTE百度百科:http://baike.baidu.com/view/1013815.htm 转载地址:http://blog.youkuaiyun.com/jinjazz/article/detai
2011-09-28 16:33:33
2556
原创 (C#)重写分隔符分割字符串 - string.Split(char[] separator) (New)
修改了以前的同名文章里的方法并且增加了另一个方法实现string.Split(char[] separator)using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ConsoleApplication
2011-09-28 16:01:03
2253
原创 (C#)单链表和循环单链表的深浅拷贝及其测试
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace ConsoleApplication1{ class MyTest { static void Main(string[] args) {
2011-09-28 14:38:32
1113
原创 个税2011年9月1日调整比较
新旧个税法税率对比旧版(2008.3.1施行) 级数含税级距税率(%)速算扣除数1不超过500元502超过500元至
2011-09-01 14:11:38
525
转载 (C#)Singleton design pattern sample
转自:http://www.yoda.arachsys.com/csharp/singleton.html Implementing the Singleton Pattern in C#The singleton pattern is one of the best-known patterns in software engineering. Essentially, a single
2011-07-12 12:25:17
617
原创 (C#)实现时间复杂度为O(n)空间复杂度为O(1)的数组中奇偶数分离
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication4{ class Program { static void Main(string[] args) {
2011-07-05 23:35:16
998
原创 IP Regex
public const string strIPRegex = @"^([1-9]|([1-9]/d)|(1/d/d)|(2([0-4]/d|5[0-5])))/.(([0-9]|([1-9]/d)|(1/d/d)|(2([0-4]/d|5[0-5])))/.){2}([1-9]|([1-9]/d)|(1/d/d)|(2([0-4]/d|5[0-5])))$";
2011-01-12 10:46:00
878
原创 (C#)快速排序 Quicksort
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Algorithms{ public class Sort { public static void QuickSort(int[] arr)
2011-01-06 23:58:00
668
原创 (C#)插入排序 Insertion Sort
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Sort{ class Insert { public static void InsertSort(List list) { in
2011-01-06 23:57:00
655
原创 (C#)选择排序 Selection Sort
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Sort{ class Select { public static void SelectSort(List list) { in
2011-01-06 23:55:00
587
原创 (C#)冒泡排序 Bubble Sort
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Sort{ class Bubble { public static void BubbleSort(List list) { in
2011-01-06 23:54:00
675
原创 (C#)排序算法 Sort Algorithm
Sorting algorithmhttp://en.wikipedia.org/wiki/Sort_algorithm1. Bubble Sorthttp://en.wikipedia.org/wiki/Bubble_sort(C#)冒泡排序 Bubble Sort:http://blog.youkuaiyun.com/chenglin1986/archive/2011/01
2011-01-06 23:47:00
614
原创 (C#)汉诺塔
/* 当n=1时,将第一个圆盘由A柱移动到C柱,完成移动 当n>1时,移动方法如下: 1.将1至n-1个圆盘由A移动到B柱 2.将第n个圆盘由A柱移动到C柱 3.将1至n-1个圆盘由B柱移动到C柱*/using System;using System.Collections.Generic;
2011-01-06 15:02:00
3714
1
转载 (C#) WinForm SendKeys 代码表
<br />使用 SendKeys 将键击和组合键击发送到活动应用程序。此类无法实例化。若要发送一个键击给某个类并立即继续程序流,请使用 Send。若要等待键击启动的任何进程,请使用 SendWait。<br />每个键都由一个或多个字符表示。若要指定单个键盘字符,请使用该字符本身。例如,若要表示字母 A,请将字符串“A”传递给方法。若要表示多个字符,请将各个附加字符追加到它之前的字符的后面。若要表示字母 A、B 和 C,请将参数指定为“ABC”。<br />加号 (+)、插入符号 (^)、百分号 (%)、
2010-12-22 16:16:00
2982
原创 (C#)计算字符串排列组合数 如"abcd"组合数为24 "aabb"组合数为6
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { public static long GetA(int m, int n) {
2010-12-10 12:25:00
2357
原创 (C#)重写分隔符分割字符串 - string.Split(char[] separator)
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { public static string[] MyStringSplit(string input,
2010-12-08 17:18:00
1211
原创 (C#)单词反转 位置不变 e.g., Welcome to my blog! -> emocleW ot ym !golb
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { public static string ReverseString(string input)
2010-12-08 12:46:00
888
原创 (C#)字符串反转
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { public static string ReverseString(string input)
2010-12-08 12:26:00
657
原创 (C#)打印蛇形正方形矩阵
/* * (C#)打印蛇形正方形矩阵, 如: * 1 2 3 * 8 9 4 * 7 6 5 */using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program
2010-12-08 00:35:00
1958
原创 (C#)有一个10阶的楼梯 他有几种方式上去?("一次上一阶"和"一次上两阶")
/* * 一个人上楼梯 可以有两种方式 ‘一次上一阶’和‘一次上两阶’ * 问题: 有一个10阶的楼梯 他有几种方式上去? * 补充: 如果楼梯是1阶,他有一种上法(一次上一阶);如果楼梯是两阶他有2中上法(一次上一阶上2次和一次上2阶上一次);如果楼梯是3阶,他有3种上法(1+2,1+1+1,2+1).。。。 */using System;using System.C
2010-12-07 22:06:00
3094
原创 (C#)10进制转2进制 数字1的个数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { public static int getOneCount(int num) {
2010-12-07 22:03:00
1485
Red Gate's .Net Reflector
2011-04-11
MSDOS批处理应用与技巧
2010-12-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人