码迷,mamicode.com
首页 > 全部
(三)STL剖析——Vector
Vector.h#pragmaonce #include"Alloc.h" #include"Uninitialized.h" #include<assert.h> //vector采用的数据结构就是线性连续空间 template<classT,classAlloc=alloc> classVector { public: //嵌套型别 typedefT*Iterator; typedefTValueType; typedefT*Poi..
分类:其他好文   时间:2016-08-12 06:49:40    阅读次数:205
(四)STL剖析——List
List.h#ifndef__List__ #define__List__ #include"Iterator.h" #include"Alloc.h" #include"Construct.h" //STL对于区间前闭后开 //List的节点 template<classT> structListNode { typedefListNode<T>*Node_p; Node_p_prev; Node_p_next; T_data; ListNode..
分类:其他好文   时间:2016-08-12 06:49:51    阅读次数:185
centos7下面yum安装zabbix3
centos7下面yum安装zabbix31、安装zabbix的yum源#yuminstallhttp://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm或者rpm-ivhzabbix-release-3.0-1.el7.noarch.rpm2、安装zabbix各组件#yuminstall-yzabbix-agentzabbix-getzabbix-java-gatewa..
分类:其他好文   时间:2016-08-12 06:47:06    阅读次数:169
SSH系列:(14)系统异常处理
当在JSP页面中发送了请求,请求被系统处理时可能会出现错误。如果没有处理在请求过程中出现的异常(错误),那么返回给用户的则是后台的异常信息页面;为避免直接将报错的页面呈现给用户,可对报错进行处理。1、分层异常在系统中的后台处理有一般分为3个层,分别是action、serv..
分类:其他好文   时间:2016-08-12 06:48:55    阅读次数:171
leetCode 189. Rotate Array 数组
189.RotateArrayRotateanarrayofnelementstotherightbyksteps.Forexample,withn=7andk=3,thearray[1,2,3,4,5,6,7]isrotatedto[5,6,7,1,2,3,4].Note:Trytocomeupasmanysolutionsasyoucan,thereareatleast3differentwaystosolvethisproblem.题目大意:将数组整体向右移动k位,多..
分类:编程语言   时间:2016-08-12 06:49:30    阅读次数:211
leetCode 283. Move Zeroes 数组
283.MoveZeroesGivenanarraynums,writeafunctiontomoveall0‘stotheendofitwhilemaintainingtherelativeorderofthenon-zeroelements.Forexample,givennums=[0,1,0,3,12],aftercallingyourfunction,numsshouldbe[1,3,12,0,0].Note:Youmustdothisin-placewithoutmakingacopyofthea..
分类:编程语言   时间:2016-08-12 06:46:29    阅读次数:143
leetCode 217. Contains Duplicate 数组
217.ContainsDuplicateGivenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct.题目大意:在数组中找到任意字符出现次数大于等于2次就返回true,..
分类:编程语言   时间:2016-08-12 06:47:19    阅读次数:147
leetCode 219. Contains Duplicate II 数组
219.ContainsDuplicateIIGivenanarrayofintegersandanintegerk,findoutwhethertherearetwodistinctindicesiandjinthearraysuchthatnums[i]=nums[j]andthedifferencebetweeniandjisatmostk.题目大意:找到数组中两个相同元素,如果这两个元素的距离小于等于k,则返回true。如果..
分类:编程语言   时间:2016-08-12 06:49:08    阅读次数:238
IOS 学习资料
IOS学习资料 - 逆天整理 - 精华无密版【最新】【精华】 无限互联3G学院 iOS开发视频教程UI 极客学院IOS ...
分类:移动开发   时间:2016-08-12 06:45:18    阅读次数:139
《Numerical Methods》-chaper4-一元非线性方程的解
在许多生产时间问题中,我们根据已知条件往往会列出一个一元非线性方程,一个最典型的例子就是银行存款的问题,由于其利息需要基于前一年的本息和,因此列出来的方程x的指数往往是高次的。还有物理问题当中一系列用微分方程导出的一元非线性方程。因此如何求解一元非线性方程,是计算数学要解决的重要问题之一。 牛顿法: ...
分类:其他好文   时间:2016-08-12 06:45:33    阅读次数:152
Linux下的网络管理工具—OpenNMS
1、 OpenNMS安装准备 环境:CentOS 7.2 更新源: 官方网站:http://www.opennms.org/en 官方wiki:http://wiki.opennms.org/wiki/Installation:Yum 卸载opennms源:https://yum.opennms.o ...
分类:系统相关   时间:2016-08-12 06:46:19    阅读次数:217
程序员如何快速上手一个自己不太熟悉的新项目
在知乎上看到的,由作者Jim Jin(奔四老码农,只想做点有意义的事情)写的。 原文出处:http://www.zhihu.com/question/38865497/answer/78625125 作者:Jim Jin链接:http://www.zhihu.com/question/3886549 ...
分类:其他好文   时间:2016-08-12 06:44:40    阅读次数:114
[Practical Git] Diagnose which commit broke something with git bisect
Sometimes you find a bug in your project that has been around for a while without being noticed; it can be hard to track down where that bug was intro ...
分类:其他好文   时间:2016-08-12 06:45:47    阅读次数:185
[Practical Git] Clean up commits with git rebase
Sometimes its nice to clean up commits before merging them into your main code repo; in this lesson, we go over using git rebase to squash commits tog ...
分类:其他好文   时间:2016-08-12 06:45:58    阅读次数:152
《A First Course in Probability》-chaper5-连续型随机变量-随机变量函数的期望
在关于离散型随机变量函数的期望的讨论中,我们很容易就得到了如下的等式: 那么推广到连续型随机变量,是否也存在类似的规律呢? 即对于连续型随机变量函数的期望,有: 这里给出一个局部的证明过程,完整的证明过程书中留在了理论习题当中。 ...
分类:其他好文   时间:2016-08-12 06:44:58    阅读次数:120
关于context你必须知道的一切
转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/40481055,本文出自:【张鸿洋的博客】 本文大多数内容翻译自:http://www.doubleencore.com/2013/06/context/ 我重新组织了下内容以及结构 ...
分类:其他好文   时间:2016-08-12 06:46:30    阅读次数:179
【POJ 1679】The Unique MST(次小生成树)
找出最小生成树,同时用Max[i][j]记录i到j的唯一路径上最大边权。然后用不在最小生成树里的边i-j来替换,看看是否差值为0。 wa了好几发,原因是,s初始化为ans,而如果ans本身就是0的话,应该是唯一的最小生成树。 ...
分类:其他好文   时间:2016-08-12 06:43:07    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!