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; } 阅读全文
posted @ 2018-08-31 14:57 友哥 阅读(167) 评论(0) 推荐(0) 编辑
摘要:总是难以达到真正的全面。如果想到全面,又没去实现它,怎么能保证想的是正确的呢?所以继续采用敏捷的开发 阅读全文
posted @ 2018-08-30 17:51 友哥 阅读(147) 评论(0) 推荐(0) 编辑
摘要:select /*! distinct cities.id from cities join countries on cities.id = countries.id limit 10 */; 阅读全文
posted @ 2018-08-30 16:28 友哥 阅读(143) 评论(0) 推荐(0) 编辑
摘要:此路不通,还是需要按照顺序进行计算 阅读全文
posted @ 2018-08-28 21:11 友哥 阅读(74) 评论(0) 推荐(0) 编辑
摘要: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 ... 阅读全文
posted @ 2018-08-27 21:17 友哥 阅读(110) 评论(0) 推荐(0) 编辑
摘要:当然是在折腾了很长时间之后 阅读全文
posted @ 2018-08-27 20:37 友哥 阅读(185) 评论(0) 推荐(0) 编辑
摘要:explain extended select count(*) from (select id from states where country_id 10 and name='aaa')) t; +----+--------------+------------+-------+---------------+---------+---------+------+------+-----... 阅读全文
posted @ 2018-08-27 19:34 友哥 阅读(1877) 评论(0) 推荐(0) 编辑
摘要:QUERY: explain extended select id from states where country_id 10) TRACE: { "steps": [ { "join_preparation": { "select#": 1, "steps": [ ... 阅读全文
posted @ 2018-08-27 19:28 友哥 阅读(211) 评论(0) 推荐(0) 编辑
摘要:mysql> explain extended select * from cities where id in (select phonecode from countries group by name); +----+-------------+-----------+--------+---------------+---------+---------+--------------... 阅读全文
posted @ 2018-08-27 19:24 友哥 阅读(231) 评论(0) 推荐(0) 编辑
摘要:explain select `countries`.`id` AS `id`,`countries`.`sortname` AS `sortname`,`countries`.`name` AS `name`,`countries`.`phonecode` AS `phonecode` from 阅读全文
posted @ 2018-08-27 19:18 友哥 阅读(305) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2018-08-23 16:05 友哥 阅读(531) 评论(0) 推荐(0) 编辑
摘要:从代码的角度来说,没有丝毫设计感,尤其是优化器部分。不过那些是常年累积的原因,一些新加较独立的部分,设计的就很舒服,真正的面向对象做法。 阅读全文
posted @ 2018-08-22 16:56 友哥 阅读(289) 评论(0) 推荐(0) 编辑
摘要:多表自join,就会用到多个 阅读全文
posted @ 2018-08-22 15:46 友哥 阅读(397) 评论(0) 推荐(0) 编辑
摘要:10倍的速度差距 阅读全文
posted @ 2018-08-21 21:37 友哥 阅读(202) 评论(0) 推荐(0) 编辑
摘要:索引的 select * from innodb_index_stats where table_name='recordsInRangeTest'; 表本身的 阅读全文
posted @ 2018-08-20 17:38 友哥 阅读(221) 评论(0) 推荐(0) 编辑
摘要:巨大的结构体,终归要变成巨大 阅读全文
posted @ 2018-08-20 16:57 友哥 阅读(118) 评论(0) 推荐(0) 编辑
摘要:给点算法规格说明书,以最小的时间和空间复杂度去实现 阅读全文
posted @ 2018-08-19 20:43 友哥 阅读(114) 评论(0) 推荐(0) 编辑
摘要:原理、实现细节、复杂度证明 阅读全文
posted @ 2018-08-19 20:39 友哥 阅读(96) 评论(0) 推荐(0) 编辑
摘要:有了基本思路后,如何以最简洁的方式去实现关键点,非常重要。 简洁意味着清楚、易理解、不易出错 阅读全文
posted @ 2018-08-19 19:52 友哥 阅读(168) 评论(0) 推荐(0) 编辑
摘要:/* 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... 阅读全文
posted @ 2018-08-19 19:48 友哥 阅读(506) 评论(0) 推荐(0) 编辑
摘要:可以实现的描述单元 阅读全文
posted @ 2018-08-19 16:08 友哥 阅读(406) 评论(0) 推荐(0) 编辑
摘要:// list::push_back #include #include class element{ private: int number; public: element(int number){ this->number = number; std::cout number = element_instance.number; ... 阅读全文
posted @ 2018-08-18 18:25 友哥 阅读(127) 评论(0) 推荐(0) 编辑
摘要:1、MySQL中List实现与C++库的List实现不同 2、类的关系不清楚,需要类图来理清 3、流程不是非常清晰,需要列出接口 4、探索性实现,先实现简要框架,对要完善的功能加上todo,以便记忆 阅读全文
posted @ 2018-08-17 16:22 友哥 阅读(109) 评论(0) 推荐(0) 编辑
摘要:假设在稳定的情况下,对比功能。 极大可能,私有实现没有全部的功能。 阅读全文
posted @ 2018-08-17 12:20 友哥 阅读(136) 评论(0) 推荐(0) 编辑
摘要:#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 { ... 阅读全文
posted @ 2018-08-16 14:57 友哥 阅读(206) 评论(0) 推荐(0) 编辑
摘要:先使用,再看源码,再模仿 阅读全文
posted @ 2018-08-16 11:58 友哥 阅读(102) 评论(0) 推荐(0) 编辑
摘要:有bug,比如 1,2,3 只能给出 1,2 2,3 但是看不到 1,3 阅读全文
posted @ 2018-08-15 19:45 友哥 阅读(185) 评论(0) 推荐(0) 编辑
摘要:mysql> select * from mysql.innodb_index_stats WHERE database_name='test' and table_name='recordsInRangeTest'; +---------------+--------------------+--------------+---------------------+-------... 阅读全文
posted @ 2018-08-13 14:40 友哥 阅读(1354) 评论(0) 推荐(0) 编辑
摘要:感悟 精通数据结构 精通算法 精通工程工具 切合业务场景 阅读全文
posted @ 2018-08-12 12:37 友哥 阅读(130) 评论(0) 推荐(0) 编辑
摘要:貌似是给科学家用的数据库,暂不研究 阅读全文
posted @ 2018-08-12 11:26 友哥 阅读(140) 评论(0) 推荐(0) 编辑
摘要:这阵子忙完去实现。哈哈哈 阅读全文
posted @ 2018-08-10 16:54 友哥 阅读(105) 评论(0) 推荐(0) 编辑
摘要:#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... 阅读全文
posted @ 2018-08-09 17:18 友哥 阅读(376) 评论(0) 推荐(0) 编辑
摘要:// 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... 阅读全文
posted @ 2018-08-09 12:25 友哥 阅读(159) 评论(0) 推荐(0) 编辑
摘要:a->b->c 假如b是空指针,则容易造成运行错误 阅读全文
posted @ 2018-08-08 19:17 友哥 阅读(123) 评论(0) 推荐(0) 编辑
摘要:遍历器对各种运算符进行重载 阅读全文
posted @ 2018-08-08 17:36 友哥 阅读(1627) 评论(0) 推荐(0) 编辑
摘要:简直就是SQL中的语法分析 阅读全文
posted @ 2018-08-06 19:31 友哥 阅读(130) 评论(0) 推荐(0) 编辑
摘要:待理解 阅读全文
posted @ 2018-08-06 15:46 友哥 阅读(170) 评论(0) 推荐(0) 编辑
摘要:c++智能指针是一种内存自动管理,这个pdf很赞 http://www.umich.edu/~eecs381/handouts/C++11_smart_ptrs.pdf 阅读全文
posted @ 2018-08-05 18:06 友哥 阅读(133) 评论(0) 推荐(0) 编辑
摘要:越来越明确,越来越具体 阅读全文
posted @ 2018-08-02 21:29 友哥 阅读(132) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示