摘要: python编码总结: 1).首先python有两种格式的字符串,str和unicode,其中unicode相当于字节码那样,可以跨平台使用。 str转化为unicode可以通过unicode(),u,str.decode三种方式 unicode转化为str,如果有中文的话,一般通过encode的方 阅读全文
posted @ 2016-04-10 12:07 xingyezhi 阅读(9530) 评论(0) 推荐(1) 编辑
摘要: 1.link 标签 -- 当在文档中声明使用外接资源(比如CSS)时使用此标签 link标签是单独出现的引用网址:http://www.dreamdu.com/xhtml/tag_link/属性 href -- 指定需要加载的资源(CSS文件)的地址URImedia -- 媒体类型rel -- 指定链接类型rev -- 指定链接类型title -- 指定元素名称type -- 包含内容的类型,一般使用type="text/css"示例<head> <link rel="stylesheet" type="text/css&qu 阅读全文
posted @ 2012-06-14 02:03 xingyezhi 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 先发一篇文章转自:http://tech.163.com/05/0823/11/1RR94CAS00091589.html引言 指针是C/C++语言的特色,而数组名与指针有太多的相似,甚至很多时候,数组名可以作为指针使用。于是乎,很多程序设计者就被搞糊涂了。而许多的大学老师,他们在C语言的教学过程中也错误得给学生讲解:"数组名就是指针"。很幸运,我的大学老师就是其中之一。时至今日,我日复一日地进行着C/C++项目的开发,而身边还一直充满这样的程序员,他们保留着"数组名就是指针"的误解。 想必这种误解的根源在于国内某著名的C程序设计教程。如果这篇文章能够纠 阅读全文
posted @ 2012-04-08 02:00 xingyezhi 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目:CollisionsTime Limit: 10000ms, Special Time Limit:25000ms, Memory Limit:65536KBTotal submit users: 10, Accepted users: 7Problem 12264 : No special judgementProblem descriptionIdentical small balls are located on a straight line and can move along this line only. Each ball moves with a constant v. 阅读全文
posted @ 2012-03-13 16:28 xingyezhi 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1.cout<<x&(-x)<<endl;可以输出x的二进制从右边数起第一位为1的数的大小,树状数组很有用 阅读全文
posted @ 2012-03-11 19:41 xingyezhi 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题目:Gluttonous robotTime Limit: 10000ms, Special Time Limit:25000ms, Memory Limit:65536KBTotal submit users: 11, Accepted users: 9Problem 12263 : Special judgeProblem descriptionSecret laboratory of Fatown has developed a new gluttonous robot which moves on stripe consisting of n+1 cells. Cells are n 阅读全文
posted @ 2012-03-11 13:12 xingyezhi 阅读(324) 评论(0) 推荐(0) 编辑