2012年11月9日

链表与递归

摘要: 1 struct Node 2 { 3 int value; 4 Node *next; 5 }; 6 void readNode(Node *list) 7 { 8 if (list!=NULL) 9 {10 if (list->next!=NULL)11 {12 readNode(list->next);13 }14 printf("%d\t",list->value);15 }16 return;17 }18 void test()19 {20 ... 阅读全文

posted @ 2012-11-09 16:20 lianshisxq 阅读(132) 评论(0) 推荐(0) 编辑

2012年7月10日

shell中一些常用组合命令

摘要: ${var:-”default var”} 如,sed ${1:-25} 意思:显示参数$1表示的行数(默认为25)${var:=”default var”}${var:?”message”}${#var}${var#matcher}${var##matcher}${var%matcher}${var%%matcher}ls my_{finger,toe}soutput: my_fingers my_toes[]: test 命令的一个软链接$# :引用的变量总数(参数个数)$- :shell使用的当前选项$*:显示所有参数$!:最后一个后台运行的进程ID号$$ :当前shell脚本的进程.. 阅读全文

posted @ 2012-07-10 11:10 lianshisxq 阅读(321) 评论(0) 推荐(0) 编辑

2012年6月26日

正则表达式说明

摘要: 参考地址:正则表达式说明正则表达式全部符号解释 阅读全文

posted @ 2012-06-26 22:02 lianshisxq 阅读(148) 评论(0) 推荐(0) 编辑

2012年6月24日

bash echo去回车和翻译转义字符

摘要: 1、去掉回车$ echo -n "Enter your name:" //echo命令Enter your name:_ //提示输入2、转义$ echo -e "Enter your name:\c" //echo命令Enter your name:_ //提示输入其中,字符'_'表示光标 阅读全文

posted @ 2012-06-24 12:37 lianshisxq 阅读(190) 评论(0) 推荐(0) 编辑

Asp.Net FckEditor在web.config中的配置

摘要: 1、开发网站过程中fck配置:<appSettings> <add key="FCKeditor:BasePath" value="~/fckeditor/"/> <add key="FCKeditor:UserFilesPath" value="/[网站名,如:OsChina]/Files/"/></appSettings>2、发布网站时修改fck配置:<appSettings> <add key="FCKeditor:BasePath& 阅读全文

posted @ 2012-06-24 10:22 lianshisxq 阅读(143) 评论(0) 推荐(0) 编辑

Asp.Net后台打开窗口及禁止复制

摘要: 1、后台跳出框架,在当前选项卡打开网页Response.Write("<script>alert('new window');window.parent.location.href='./default.aspx';</script>");2、不涉及到框架Response.Write("<script>alert('new window');window.location.href='./default.aspx';</script>");3、 阅读全文

posted @ 2012-06-24 10:21 lianshisxq 阅读(243) 评论(0) 推荐(0) 编辑

参数化sql命令--来自SqlHelper

摘要: 1、数据库操作函数using System.Data.SqlClient;/// <summary> /// 连接数据库 /// </summary> /// <returns>返回SqlConnection对象</returns> public SqlConnection GetConnection() { //conn、ConnectionString在web.config //string myStr = ConfigurationManager.AppSettings["ConnectionString"].ToStr 阅读全文

posted @ 2012-06-24 10:21 lianshisxq 阅读(303) 评论(0) 推荐(0) 编辑

DataList分页,保存CheckBox控件状态

摘要: 1、DataList中嵌套CheckBox<asp:DataList ID="dlNews" runat="server"> <HeaderTemplate> <table cellpadding="0" cellspacing="0"><tr><td align="center">复选框</td></tr></table> </HeaderTemplate> <ItemTempla 阅读全文

posted @ 2012-06-24 10:16 lianshisxq 阅读(166) 评论(0) 推荐(0) 编辑

分页DataList增加自动编号列

摘要: <asp:DataList ID="dlNews" runat="server"> <HeaderTemplate> <table cellpadding="0" cellspacing="0"><tr><td align="center">Entry</td></tr></table> </HeaderTemplate> <ItemTemplate> <table ce 阅读全文

posted @ 2012-06-24 10:15 lianshisxq 阅读(167) 评论(0) 推荐(0) 编辑

重置SQL Server表中的自动编号ID为1

摘要: 开发一个网站,需要向数据库插入必要的数据以便测试,当操作一段时间后,数据库中具有自动编号的ID将是一串不连续的数字,可以通过命令:dbcc checkident(你的表名,reseed,0) 如:dbcc checkident(record,reseed,0)重置自动编号属性的字段,让其下个值从1开始执行成功:检查标识信息: 当前标识值 '2',当前列值 '0'。 DBCC 执行完毕。如果 DBCC 输出了错误信息,请与系统管理员联系。参考:百度 阅读全文

posted @ 2012-06-24 10:14 lianshisxq 阅读(303) 评论(0) 推荐(0) 编辑

导航