sailing

Everything...

2007年1月28日

bubble sort

摘要: // BubbleSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void BubbleSort(int* a, int iLen); void PrintArray(int a[], int iLen); int _tmain(int ar... 阅读全文

posted @ 2007-01-28 21:29 乌生鱼汤 阅读(138) 评论(0) 推荐(0) 编辑

shell sort

摘要: // ShellSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void ShellSort(int* a, int iLen); void PrintArray(int a[], int iLen); int _tmain(int argc... 阅读全文

posted @ 2007-01-28 21:11 乌生鱼汤 阅读(264) 评论(0) 推荐(0) 编辑

直接插入排序 direct insertion sort

摘要: #include "stdafx.h" #include #include "stdio.h" void DirectInsertSort(int a[], int iLen); void PrintArray(int a[], int iLen); int _tmain(int argc, _TCHAR* argv[]) { // the first element of th... 阅读全文

posted @ 2007-01-28 20:12 乌生鱼汤 阅读(172) 评论(0) 推荐(0) 编辑

c++解决汉诺塔,显示每一步的碟子情况 C++ hanoi with trace of every step

摘要: #include "stdafx.h" #include #include void StartHanoi(int n); void Hanoi(int length, std::stack* source, std::stack* middle, std::stack* destination); void PrintStack(); void PrintAStack(std... 阅读全文

posted @ 2007-01-28 18:47 乌生鱼汤 阅读(565) 评论(0) 推荐(0) 编辑

2007年1月20日

remove duplicate element in an array

摘要: demonstrates an O(n2) method to remove the duplicated elements in an array// caution: 1. don't try to return int[] array from a function, c++ doesn't support this, though c# does it well.// ... 阅读全文

posted @ 2007-01-20 22:48 乌生鱼汤 阅读(371) 评论(0) 推荐(0) 编辑

2006年12月23日

保持ipod与itunes同步时播放顺序不变

摘要: 问题:要与ipod同步,需要1 在itune里面建立一个播放列表2 把新建立的播放列表加入到ipod里面但是,通常在把排好序得播放列表加入ipod里面时候顺序会突然变乱。解决办法是进入ipod的播放列表界面,单击名字列旁边的数字列,让ipod的播放列表按序号排列,(如下图)。这样,我们每次排好序同步到ipod的时候顺序就可以保持不变了。 阅读全文

posted @ 2006-12-23 19:13 乌生鱼汤 阅读(1779) 评论(2) 推荐(0) 编辑

2006年12月17日

鼠标移动的加速算法(MOUSEEVENTF_MOVE)

摘要: Relative mouse motion is subject to the effects of the mouse speed and the two-mouse threshold values. A user sets these three values with the Pointer Speed slider of the Control Panel's Mouse Propert... 阅读全文

posted @ 2006-12-17 22:58 乌生鱼汤 阅读(3339) 评论(1) 推荐(0) 编辑

在vs2005里面使用regular expression 进行 find and replace操作

摘要: 模式 {public const uint [^ ]+}( +){[^ ]+}可把#define VK_BROWSER_BACK 0xA6替换成public const uint VK_BROWSER_BACK = 0x10注意这个对话框里面的{}是用作匹配标记的,匹配结果可在"replace with"里面用从1开始的顺序号来引用(\0表示匹配的整个字符串), 和.net fram... 阅读全文

posted @ 2006-12-17 03:23 乌生鱼汤 阅读(387) 评论(0) 推荐(0) 编辑

2006年11月26日

Asp.net cache 简述

摘要: Asp.net支持三种类型的cache 想写一个技术快速概述,可能写得太多了。技术概略的目的是以最快最简单的方式描述出技术要点,也是我希望的最有效率的知识传播方式。 1. 页面/控件cache 2. 应用程序级cache 3. 浏览器客户端cache 从实现方式来看,页面/控件cache和应用程序级cache都是存放在服务器内存里面的,随着内存的紧张程度,这些内容有可能在失效之前被提... 阅读全文

posted @ 2006-11-26 17:52 乌生鱼汤 阅读(2953) 评论(1) 推荐(0) 编辑

2006年7月29日

atlas - 综合运用 update panel xmldatasource treeview

摘要: ... 阅读全文

posted @ 2006-07-29 23:59 乌生鱼汤 阅读(413) 评论(0) 推荐(0) 编辑

导航