摘要: 1.获取子串的substr(string, start[, count]): start指定开始位置;count表示提取的长度,如果没有指定,则表示提取到字符串的结尾。SQL> select substr('Hello, world!', 8, 5) from dual; SUBSTR('HELLO... 阅读全文
posted @ 2014-04-18 17:42 百里飞猫 阅读(183) 评论(0) 推荐(0)
摘要: 考虑下面的代码: 1 #include 2 #include 3 using std::cout; 4 using std::endl; 5 using std::string; 6 7 class Test 8 { 9 public:10 Test()11 {12 ... 阅读全文
posted @ 2014-04-14 01:24 百里飞猫 阅读(609) 评论(0) 推荐(0)
摘要: C++里有const成员函数,那是否有const非成员函数呢?试试看:void func(int i) const{ return;}尝试编译下:[tortoise@sea temp]$ g++ -o test test.cctest.cc:6:18: error: non-member function ‘void func(int)’ cannot have cv-qualifier void func(int i) const ^[tortoise@sea temp]$ 非成员函数不能有cv限定符! 阅读全文
posted @ 2014-04-12 14:17 百里飞猫 阅读(316) 评论(0) 推荐(0)
摘要: 代码如下,按理应该调用复制运算符啊,为何却是调用了复制构造函数: 1 #include 2 using std::cout; 3 using std::endl; 4 using std::string; 5 6 class Test 7 { 8 public: 9 Test()10 { 11 cout << "The default constructor is called!" << endl;12 } 13 14 Test(const Test &rhs)15 :strTest(rhs.strTest)16 { ... 阅读全文
posted @ 2014-04-10 00:18 百里飞猫 阅读(224) 评论(0) 推荐(0)
摘要: 以反斜线结尾时,会将下一行和当前行连接在一起,即使当前行是注释行:int main(){ int i = 0; // backslash test \ if(i > 0) { std::cout << "i is ... 阅读全文
posted @ 2014-04-09 09:22 百里飞猫 阅读(373) 评论(0) 推荐(0)
摘要: 1.输出指定长度的字符串,位数不够时以空格补充,默认右对齐:[tortoise@sea temp]$ awk '{printf "%50s\t%s\n",$1,$2}' test.txt fdsafdsafdsfdsfdsf f... 阅读全文
posted @ 2014-03-26 08:51 百里飞猫 阅读(143) 评论(0) 推荐(0)
摘要: Keywords:alignasalignofasmautoboolbreakcasecatchcharchar16_tchar32_tclassconstconstexprconst_castcontinuedecltypedefaultdeletedodoubledynamic_castelse... 阅读全文
posted @ 2014-03-23 23:54 百里飞猫 阅读(314) 评论(0) 推荐(0)
摘要: ADSL:Asymmetric Digital Subscriber Line,非对称数字用户线 AES:Advanced Encryption Standard,高级加密标准 AIX:Advanced Interactive ExecutiveAIX,操作系统 AJAX:Asynchronous 阅读全文
posted @ 2014-03-21 10:20 百里飞猫 阅读(719) 评论(0) 推荐(0)
摘要: 以下内容是根据网上的其他网页信息整理而来的:1.命令模式:fx:移动光标到当前行的下一个 x 处。x 可以是任意一个字母tx:移动到 x 的左边一个位置。x 可以是任意一个字母Fx:和 fx 类似,不过是往回找w:光标往前移动一个词b:光标往后移动一个词0:(数字0)移动光标到当前行首^:移动光标到... 阅读全文
posted @ 2014-03-21 09:28 百里飞猫 阅读(157) 评论(0) 推荐(0)