摘要: 1 class Mem 2 { 3 public int i; 4 public Mem(int i) 5 { 6 this.i = i; 7 System.out.println("create Mem: " + i); 8 } 9... 阅读全文
posted @ 2015-04-15 23:28 挨踢淫才 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 判断数据库是否有某条记录:select 1 from xxx where xxx (效率:1> colname > *)清空表记录: truncate table xxx > delete from xxx多表查询: select * from xxx A left join xxx B on A.... 阅读全文
posted @ 2015-04-13 16:18 挨踢淫才 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 一元加号唯一的作用是将较小类型的操作数提升为int。比较运算符不适用于boolean类型,因为boolean值只能为true或false, "大于"和"小于"没有实际意义。java中增加了一种"无符号"右移位操作符(>>>),它使用"零扩展": 无论正负,都在高位插入0。这一操作符是C或C++中所没... 阅读全文
posted @ 2015-04-07 14:36 挨踢淫才 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 在算数表达式中,不要使用char或bool,只有在存放字符或布尔值时才使用它们。因为类型char在一些机器上是有符号的,而在另一些机器上又是无符号的,所以如果使用char进行运算特别容易出问题。如果你需要使用一个不大的整数,那么明确指定它的类型是signed char或者unsigned cha... 阅读全文
posted @ 2015-03-06 11:08 挨踢淫才 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 1.) def.cpp1 // const int age = 32; --------------- error !!!! 只能在当前文件中访问,属于局部变量 --------------2 extern const int age = 32;2.) defTest.cpp 1 #include... 阅读全文
posted @ 2015-01-29 13:40 挨踢淫才 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 1 注释:请始终将正斜杠添加到子文件夹。假如这样书写链接:href="http://www.w3school.com.cn/html",就会向服务器产生两次 HTTP 请求。这是因为服务器会添加正斜杠到这个地址,然后创建一个新的请求,就像这样:href="http://www.w3school.co... 阅读全文
posted @ 2014-11-24 22:01 挨踢淫才 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.) 开发阶段, 项目不放入tomcat目录,配置server.xml或者在con/Catalina/localhost下新建[项目名.xml]xml内容如下:1 2 6 若在server.xml的host节点中配置,Context还需配置path属性2.) 项目发布阶段, 在META-I... 阅读全文
posted @ 2014-11-14 10:44 挨踢淫才 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1 #ifndef TREE_H_ 2 #define TREE_H_ 3 4 #include 5 #define STRSIZE 32 6 #define TREEMAX 10 7 8 typedef struct item 9 {10 char petname[STRSIZE]... 阅读全文
posted @ 2014-10-17 11:28 挨踢淫才 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 1 #ifndef QUEUE_H_ 2 #define QUEUE_H_ 3 4 #include 5 #define QUEUEMAX 10 6 7 typedef int Item; 8 9 typedef struct node10 {11 Item item;12 ... 阅读全文
posted @ 2014-10-14 15:30 挨踢淫才 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1 #ifndef LIST_H_ 2 #define LIST_H_ 3 4 #include 5 #define TSIZE 45 6 7 typedef struct film 8 { 9 char title[TSIZE];10 int rating;11 } Ite... 阅读全文
posted @ 2014-10-11 13:47 挨踢淫才 阅读(427) 评论(0) 推荐(0) 编辑