库的标准实现和私有实现的选择
假设在稳定的情况下,对比功能。极大可能,私有实现没有全部的功能。
c++ combination by next_permutation
#include<iostream>#include<algorithm>#include<vector>intmain(){intn,r;n=10;r=2;std::vector<bool>v(n);std::fill(v.end()-r,v.end
算法需要加强
先使用,再看源码,再模仿
索引组合算法原型
//next_permutationexample#include<iostream>//std::cout#include<algorithm>//std::next_permutation,std::sortintmake_combination(intmyints[],
innodb_index_stats
mysql>select*frommysql.innodb_index_statsWHEREdatabase_name='test'andtable_name='recordsInRangeTest';+---------------+--------------------+--------
感悟
感悟精通数据结构精通算法精通工程工具切合业务场景
scidb
貌似是给科学家用的数据库,暂不研究
想到一个异常低的代价去实现一个极好的功能
这阵子忙完去实现。哈哈哈
c++返回引用
#include<iostream>#include<ctime>usingnamespacestd;doublevals[]={10.1,12.6,33.1,24.1,50.0};double[]&setValues(inti){returnvals;//retur
c++ class as sort function
//constructingsets#include<iostream>#include<set>#include<string.h>boolfncomp(intlhs,intrhs){returnlhs<rhs;}structclasscomp{boolo
指针级联容易错误
a->b->c假如b是空指针,则容易造成运行错误
c++ list_iterator demo
#include<iostream>#include<list>usingnamespacestd;typedeflist<int>IntegerList;intmain(){IntegerListintList;for(inti=1;i<=10;++i)i
模板元编程例子
#include<iostream>#include<string>usingnamespacestd;template<intN>classPow3{public:staticconstintresult=3*Pow3<N-1>::result;};
utf8字符串分区间
待理解
c++智能指针
c++智能指针是一种内存自动管理,这个pdf很赞http://www.umich.edu/~eecs381/handouts/C++11_smart_ptrs.pdf
感受
越来越明确,越来越具体
数据库层次发现
1、石破天惊的理论,很少,参考前三个数据库领域获得图灵奖的伙伴2、将原创性理论转换为系统性实践的,参考第四个在数据库领域获得图灵奖的伙伴3、抄第二类的实现或者在一到两个点应用了新的算法,宣称国内一流。参考互联网的一线大厂。4、抄第三类的实现,宣称业界对标。参考互联网二线中厂5、毫无追求
MySQL源码中的String
适用于离开作用域就销毁的字符串。
优化器最新战报
已经懂得了优化器的套路。解析出信息,根据这些信息去简化SQL,往已有的执行模型里去靠,并注意性能。虽然实现不优雅,但是功能还是可以的。
欲望
FUCKIT