12 2011 档案

摘要:publicclassSBinaryTree{publicintValue;publicSBinaryTreeLeftChild;publicSBinaryTreeRightChild;publicSBinaryTree(intvalue,SBinaryTreeleft,SBinaryTreeright){Value=value;LeftChild=left;RightChild=right;}}//SBinaryTreem=newSBinaryTree(4,null,null);//SBinaryTreea=newSBinaryTree(4,m,null);//SBinaryTreeb=ne 阅读全文
posted @ 2011-12-18 18:07 xpwilson 阅读(326) 评论(0) 推荐(0)
摘要:题目:在数组中,数字减去它右边的数字得到一个数对之差。求所有数对之差的最大值。例如在数组{2, 4, 1, 16, 7, 5, 11, 9}中,数对之差的最大值是11,是16减去5的结果。publicclassMaxDiffer{/*Calculatethemaxvaluewhichisgeneratedbythenumbersubstract*thenumberwhichisintherightsideofthearray**/privateint[]arrayNumbers=null;publicMaxDiffer(int[]array){arrayNumbers=array;}publi 阅读全文
posted @ 2011-12-18 16:11 xpwilson 阅读(503) 评论(0) 推荐(0)
摘要:functionchoose_date_czw(date_id,objtd){if(date_id=="choose_date_czw_close"){document.getElementById("choose_date_czw_id").style.display="none";return;}if(objtd!=undefined){if(objtd=="choose_date_czw_empty"){document.getElementById(date_id).value="";} 阅读全文
posted @ 2011-12-14 17:51 xpwilson 阅读(305) 评论(0) 推荐(0)
摘要:1.Singleton:保持一个实例,多线程中要注意。需要lock(object);2.AbstractFactory:工厂的目的就是制造产品,在添加新产品的过程中如何更好的组织管理; 阅读全文
posted @ 2011-12-06 18:30 xpwilson 阅读(121) 评论(0) 推荐(0)
摘要:stringtimestr="";DateTimedt=DateTime.Now;timestr=dt.ToString(); //2011-12-0516:32:26timestr=dt.ToShortDateString(); //2005-11-5timestr=dt.ToShortTimeString(); //16:32timestr=dt.ToLongDateString(); //2011-12-05timestr=dt.ToLongTimeString(); //16:32:26timestr=string.Format("{0:yyyy-HH-d 阅读全文
posted @ 2011-12-06 17:31 xpwilson 阅读(152) 评论(0) 推荐(0)
摘要:Http定义了与服务器交互的不同方法,最基本的方法有4种,分别是GET,POST,PUT,DELETE。URL全称是资源描述符,我们可以这样认为:一个URL地址,它用于描述一个网络上的资源,而HTTP中的GET,POST,PUT,DELETE就对应着对这个资源的查,改,增,删4个操作。到这里,大家应该有个大概的了解了,GET一般用于获取/查询资源信息,而POST一般用于更新资源信息。 1.根据HTTP规范,GET用于信息获取,而且应该是安全的和幂等的。 (1).所谓安全的意味着该操作用于获取信息而非修改信息。换句话说,GET 请求一般不应产生副作用。就是说,它仅仅是获取资源信息,就像数据库.. 阅读全文
posted @ 2011-12-01 14:31 xpwilson 阅读(252) 评论(0) 推荐(0)