//写入 protected void Button1_Click(object sender, EventArgs e) { HttpCookie cookie=new HttpCookie("MyCook");//初使化并设置Cookie的名称 DateTime dt...
3.0版本中已经将urllib2、urlparse、和robotparser并入了urllib中,并且修改urllib模块,其中包含5个子模块,即是help()中看到的那五个名字。Python2中的urllib模块,在Python3中被修改为20.5. urllib.request — Extens...
分类:
编程语言 时间:
2014-10-29 12:47:18
阅读次数:
373
(1) 基本逻辑控制举例和编码风格规范1.while死循环2.for循环3.if,elif,else分支判断4.编码风格(官方建议)版本:Python3.41.while死循环>>> import time>>> i = 0>>> while 1:... i += 1... prin...
分类:
编程语言 时间:
2014-10-28 23:46:34
阅读次数:
228
《简明Python教程》是网上比较好的一个Python入门级教程,尽管版本比较老旧,但是其中的基本讲解还是很有实力的。Ch2–安装Python:下载安装完成后,在系统的环境变量里,在Path变量后面追加安装目录的地址,即可在cmd下使用Python;CH3–Python3中,print的语法改为了p...
分类:
编程语言 时间:
2014-10-28 21:22:04
阅读次数:
200
public string GetTime(DateTime dt) { Int64 retval = 0; DateTime st = new DateTime(1970, 1, 1); TimeSpan t = (...
分类:
编程语言 时间:
2014-10-28 17:18:48
阅读次数:
161
一、添加cookieC# 代码 复制//方式1:Response.Cookies["username"].value="gggg";Response.Cookies["username"].Expires=DateTime.MaxValue; //方式2:HttpCookie acookie = n...
分类:
Web程序 时间:
2014-10-28 17:12:23
阅读次数:
168
一、key与primary key区别CREATE TABLE wh_logrecord (logrecord_id int(11) NOT NULL auto_increment,user_name varchar(100) default NULL,operation_time datetime...
分类:
数据库 时间:
2014-10-28 17:05:04
阅读次数:
251
任何项目,难免会碰到DateTime的显示问题,.net框架虽提供丰富多样的显示方法,但我很少使用,因老忘记细节,每次都要纠结到底月份在前还是年份在前;日期分隔符到底是“/”,还是“\”,还是“-”等等。因此,每逢日期显示,我的写法通常类似下面代码所示,这样能根据需求取舍,随心所欲的控制显示格式、顺...
分类:
其他好文 时间:
2014-10-28 15:20:45
阅读次数:
120
//2008年4月24日 System.DateTime.Now.ToString("D"); //2008-4-24 System.DateTime.Now.ToString("d"); //2008年4月24日 16:30:15 System.DateTi...
分类:
其他好文 时间:
2014-10-28 13:50:09
阅读次数:
180
//今天 DateTime.Now.Date.ToShortDateString(); //昨天,也就是今天的日期减一 DateTime.Now.AddDays(-1).ToShortDateString(); //明天,同理,加一 DateTime.Now.AddDays(1).ToShortDa...
分类:
其他好文 时间:
2014-10-28 11:51:05
阅读次数:
220