摘要: /// summary /// 写一个函数处理字符串,比如输入”I am a girl”,输出”girl a am I” /// /summary /// param name="p"/param /// returns/returns private static string StringConvert(string p) { string convertion = null; Stack stack = new Stack(); int i = 0; int j = 0; for (int h = 0; h p.Length; h++) { if (p.Sub 阅读全文
posted @ 2010-04-10 22:03 GT_Andy 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 几道经典的SQL笔试题目(有答案)(1)表名:购物信息购物人 商品名称 数量A 甲 2B 乙 4C 丙 1A 丁 2B 丙 5……(其他用户实验的记录大家可自行插入)给出所有购入商品为两种或两种以上的购物人记录答:select * from 购物信息 where 购物人 in (select 购物人 from 购物信息 group by 购物人 having count(*) = 2);(2)表名:成绩表姓名 课程 分数 张三 语文 81张三 数学 75李四 语文 56李四 数学 90王五 语文 81王五 数学 100王五 英语 49……(其他用户实验的记录大家可自行插入)给出成绩全部合格 阅读全文
posted @ 2010-04-10 19:26 GT_Andy 阅读(905) 评论(0) 推荐(0) 编辑
摘要: 一个很简洁的算法:void Reverse(char s[]){ for(int i = 0, j = strlen(s) - 1; i j; ++i, --j) { char c = s[i]; s[i] = s[j]; s[j] = c; }}#关于a, b交换其它算法: a ^= b; b ^= a; a ^= b;一个五种解法的版本:转自:http://www.cnblogs.com/Mainz/articles/1164602.html这是网络流传的Microsoft的面试题目之一:“编写反转字符串的程序,要求优化速度、优化空间”。因为最近一直很多关注算法方面的实践和研究,因此 阅读全文
posted @ 2010-04-10 19:04 GT_Andy 阅读(3531) 评论(0) 推荐(0) 编辑
摘要: 【引用 《智能家电控制技术》帮助文档 这里有很是HTML版的,很实用好查,但就是不能下载成CHM版的,本地是不能用啊。】1.#operator not followed by macro argument name"#"运算符后无宏变元名。在宏定义中,"#"用于标志一宏变元是一个串,因此,在"#"后面必须要跟随一个宏变元名。2.'xxxxxxxx'not an argument'xxxxxxxx'不是函数参数。在原程序中将该表识符定义为一个函数,但他没有在函数表中出现。3.Ambiguous symbol 'xxxxxxxx'二义性符号'xxxxxxxx'。两个或两个以上结构的某一域名相同,但 阅读全文
posted @ 2010-04-10 18:49 GT_Andy 阅读(4288) 评论(0) 推荐(0) 编辑
摘要: A quick synopsis on the differences between 'const' and 'readonly' in C#:'const': Can't be static. Value is evaluated at compile time. Initiailized at declaration only. 'readonly': Can be either instance-level or static. Value is evaluated at run time. Can be initialized in declaration or by code in 阅读全文
posted @ 2010-04-10 15:59 GT_Andy 阅读(272) 评论(0) 推荐(0) 编辑