08 2018 档案
摘要:#include int main(){ const char *options[] = { "test1", "test2", "test1", "test2", NULL }; int i = 0; while(options[i]){ std::cout<<options[i]<<std::endl; i++; } return 0; }
阅读全文
摘要:总是难以达到真正的全面。如果想到全面,又没去实现它,怎么能保证想的是正确的呢?所以继续采用敏捷的开发
阅读全文
摘要:select /*! distinct cities.id from cities join countries on cities.id = countries.id limit 10 */;
阅读全文
摘要:create table t1_outerjoin(a int, b int , c int); create table t2_outerjoin(a int); create table t3_outerjoin(a int, b int); create table t4_outerjoin(a int); SELECT * FROM t1_outerjoin ...
阅读全文
摘要:explain extended select count(*) from (select id from states where country_id 10 and name='aaa')) t; +----+--------------+------------+-------+---------------+---------+---------+------+------+-----...
阅读全文
摘要:QUERY: explain extended select id from states where country_id 10) TRACE: { "steps": [ { "join_preparation": { "select#": 1, "steps": [ ...
阅读全文
摘要:mysql> explain extended select * from cities where id in (select phonecode from countries group by name); +----+-------------+-----------+--------+---------------+---------+---------+--------------...
阅读全文
摘要:explain select `countries`.`id` AS `id`,`countries`.`sortname` AS `sortname`,`countries`.`name` AS `name`,`countries`.`phonecode` AS `phonecode` from
阅读全文
摘要:bool Explain_join::explain_key_and_len() { if (tab->ref.key_parts) return explain_key_and_len_index(tab->ref.key, tab->ref.key_length, tab->ref.key_part...
阅读全文
摘要:从代码的角度来说,没有丝毫设计感,尤其是优化器部分。不过那些是常年累积的原因,一些新加较独立的部分,设计的就很舒服,真正的面向对象做法。
阅读全文
摘要:索引的 select * from innodb_index_stats where table_name='recordsInRangeTest'; 表本身的
阅读全文
摘要:有了基本思路后,如何以最简洁的方式去实现关键点,非常重要。 简洁意味着清楚、易理解、不易出错
阅读全文
摘要:/* C implementation QuickSort */ #include // A utility function to swap two elements void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } /* This function takes last element as pi...
阅读全文
摘要:// list::push_back #include #include class element{ private: int number; public: element(int number){ this->number = number; std::cout number = element_instance.number; ...
阅读全文
摘要:1、MySQL中List实现与C++库的List实现不同 2、类的关系不清楚,需要类图来理清 3、流程不是非常清晰,需要列出接口 4、探索性实现,先实现简要框架,对要完善的功能加上todo,以便记忆
阅读全文
摘要:假设在稳定的情况下,对比功能。 极大可能,私有实现没有全部的功能。
阅读全文
摘要:#include #include #include int main() { int n, r; n = 10; r = 2; std::vector v(n); std::fill(v.end() - r, v.end(), true); std::vector > sequence_vector; do { ...
阅读全文
摘要:有bug,比如 1,2,3 只能给出 1,2 2,3 但是看不到 1,3
阅读全文
摘要:mysql> select * from mysql.innodb_index_stats WHERE database_name='test' and table_name='recordsInRangeTest'; +---------------+--------------------+--------------+---------------------+-------...
阅读全文
摘要:#include #include using namespace std; double vals[] = {10.1, 12.6, 33.1, 24.1, 50.0}; double[]& setValues( int i ) { return vals; // return a reference to the ith element } // main fu...
阅读全文
摘要:// constructing sets #include #include #include bool fncomp (int lhs, int rhs) {return lhs first; // empty set of ints int myints[]= {10,20,30,40,50}; std::set sec...
阅读全文
摘要:c++智能指针是一种内存自动管理,这个pdf很赞 http://www.umich.edu/~eecs381/handouts/C++11_smart_ptrs.pdf
阅读全文