摘要: JQ: $(document).ready(function () { $firstPara = $('p').eq(1); $firstPara.hide(); $('.lianjie').click(function () { $firstPara.animate({ opacity: 'toggle', height: 'toggle' }, 1500); ... 阅读全文
posted @ 2012-12-27 14:01 消沉 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 打开[SQL Server 配置管理器](如果是MSSQL2005,在运行中输入SQLServerManager.msc回车)(如果是MSSQL2008或R2,在运行中输入SQLServerManager10.msc回车)-->点击[SQL Server]服务-->重启SQL Server 服务 阅读全文
posted @ 2012-12-26 16:40 消沉 阅读(396) 评论(0) 推荐(0) 编辑
摘要: //随机红球protected void Button1_Click(object sender, EventArgs e) { Random rnd = new Random(); ArrayList list=new ArrayList (); int big = 6; for(int i=0;i <big;i++) { int num= rnd.Next(1,34); if (!list.Contains(num)) ... 阅读全文
posted @ 2012-12-26 15:32 消沉 阅读(325) 评论(0) 推荐(0) 编辑
摘要: private bool fileUpLoad() { if (txtFup.HasFile) { string fileContentType = txtFup.PostedFile.ContentType;//获取客户端上传文件的类型 if (fileContentType == "image/gif" || fileContentType == "image/pjpeg")//文件类型如果为gif或者jpg的话,条件为true { ... 阅读全文
posted @ 2012-12-26 11:33 消沉 阅读(398) 评论(0) 推荐(0) 编辑
摘要: private void BindDropDownList(DropDownList drop,List<Model.City>list){ for(int i=0;i <list.count;i++) { drop.Items.Add(new listitem(list[i].name,list[i].Id)); } }//默认选中某一项,作为当前项private void DropDwonListIndex_Bind(DropDownList drop,string name){for (int i=0;i<drop.items.count;i++){ if(dro 阅读全文
posted @ 2012-12-26 09:45 消沉 阅读(808) 评论(0) 推荐(0) 编辑
摘要: <script> $(document).ready(function () { $("#Button1").click(function () { $(":text").each(function () { $(this).val(""); }); }); }); </script> 阅读全文
posted @ 2012-12-25 15:04 消沉 阅读(237) 评论(0) 推荐(0) 编辑
摘要: foreach(Control control in this.form1. Controls){ if(control is TextBox) { TextBox tb=(TextBox)control; tb.Text=string.Empty; }} 阅读全文
posted @ 2012-12-25 14:52 消沉 阅读(145) 评论(0) 推荐(0) 编辑
摘要: private int sort(){ int sum=0;bool flag=true; for(int i =1;i<=100;i++) { if(flag==true) sum=sum+1; else { sum=sum-i; } flag=!flag; }return sum;} 阅读全文
posted @ 2012-12-25 14:43 消沉 阅读(1600) 评论(0) 推荐(0) 编辑
摘要: int [] arr= new int [100];ArrayList mylist=new ArrayList();Random rnd=new Random();while(mylist.count<100){ int num=rnd.next(1,101); if(!mylist.contains(num)) { mylist.add(num); }}for(int i=0;i<mylist.count,i++){ arr[i]=mylist[i];} 阅读全文
posted @ 2012-12-25 14:26 消沉 阅读(191) 评论(0) 推荐(0) 编辑
摘要: private void Fool(int i){ if(i<=0) return 0;if(i==1||i==2) return 1; return Fool(i-1)+Fool(i-2);} 阅读全文
posted @ 2012-12-25 14:01 消沉 阅读(199) 评论(0) 推荐(0) 编辑