上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 48 下一页
摘要: 快速清空数据库内指定表内容的SQL语句.速度也是最快的,比Delete删除方式快非常多 很简单,SQL语句如下 TRUNCATE TABLE '表名' 这样就利用SQL语句清空了该数据表,而不保留日志。 1.TRUNCATE 只能用来清除整个表的数据,而 DELETE 可以根据条件删除某些记录。 2.delete删除其实并没有释放空间的~truncate释放空间,也就是彻底找不回来了~ 没事少... 阅读全文
posted @ 2013-08-29 20:47 helloweworld 阅读(205) 评论(0) 推荐(0) 编辑
摘要: DELIMITER $$CREATE PROCEDURE InsertValueWithWhile()BEGIN declare _End int default 0; while (_End < 100) do INSERT INTO emp(empName) VALUES( _End ); set _End = _End +1; end while;END... 阅读全文
posted @ 2013-08-29 20:42 helloweworld 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1.在当前目录下创建a b c三个目录. mkdir –p {a,b,c} 2.在当前目录下创建father目录,并在father目录下创建child1 child2 child3三个子目录。 mkdir -p father/{child1,child2,child3} 3.在当前目录下创建father1 father2两个目录,并在这两个目录下分别创建child1 child2 child3... 阅读全文
posted @ 2013-08-29 20:36 helloweworld 阅读(1429) 评论(0) 推荐(0) 编辑
摘要: 1. uname -a 2.file /sbin/init 3.getconf LONG_BIT 阅读全文
posted @ 2013-08-29 20:16 helloweworld 阅读(682) 评论(0) 推荐(0) 编辑
摘要: 1234567891011121314151617181920 classBase{public: inta; charb;};classDerived : publicBase{public: chard;};intmain(){ cout << sizeof(Base) << endl; //8 cout << sizeof(Derived) << endl; //12 return... 阅读全文
posted @ 2013-07-25 12:01 helloweworld 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 先调用基类构造函数,再调用派生类构造函数 123456789101112131415161718 classBase{public: Base() { cout << "Base()" << endl;}};classDerived : publicBase{public: Derived() { cout << "Derived()" << endl;}};intmain(){ Der... 阅读全文
posted @ 2013-07-23 16:04 helloweworld 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: EFfective C++和More Effective C++中有讲解。“条款23: 必须返回一个对象时不要试图返回一个引用”“条款31: 千万不要返回局部对象的引用,也不要返回函数内部用new初始化的指针的引用”为什么要返回引用呢——为了实现链式操作。返回一个对象不行吗?为什么有时要返回引用呢?主要是为了实现链式操作。看一个例子就明白了:1234567891011121314151617181920MyString& MyString::operator =(constMyString &other) { /*if (this != &other) { size = 阅读全文
posted @ 2013-07-23 15:19 helloweworld 阅读(634) 评论(0) 推荐(0) 编辑
摘要: http://blog.sina.com.cn/s/blog_6022bf2d0100fz89.html http://www.cnblogs.com/BLoodMaster/archive/2010/03/01/1675856.html 我们按照模式所关心的主要问题可以把模式大致分为三类:1.创建模式(此类模式主要关注对象的产生因此我们把它们分为一类)2.结构模式(此类模式主要关心类和对象的组合... 阅读全文
posted @ 2013-07-20 21:20 helloweworld 阅读(174) 评论(0) 推荐(0) 编辑
摘要: C_C++_XY_05.四则运算表达式求值 题目描述: 实现一个正整数加、减、乘、除四则混合运算求值方法 条件限定: 1、 输入的四则运算式由'+','-','*','/'运算符及正整数组成; 2、 无需考虑特殊字符,及除不尽的情况; 3、 无需考虑运算符的优先级,加减乘除优先级一样,仅按照自左至右的顺序依次计算; 4、 当遇到除数为0时,即刻返回当前已计算结果。 要求实现函数:... 阅读全文
posted @ 2013-07-19 19:55 helloweworld 阅读(1173) 评论(0) 推荐(0) 编辑
摘要: void vConvertMsg(char *pInputStr, long lInputLen, char *pOutputStr); 1.pOutputStr无需在函数中申请内存。 2.注意pOutputStr最后要加'\0'. 3.可以再func.cpp中再添加其他子函数。 4.lInputLen在函数中并不必须被使用,可以使用'\0'判断pInputStr是否到达字符串尾。 5.... 阅读全文
posted @ 2013-07-19 16:42 helloweworld 阅读(342) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 48 下一页