码迷,mamicode.com
首页 >  
搜索关键字:capacity    ( 831个结果
Java基础知识强化38:StringBuffer类之StringBuffer的构造方法
1. StringBuffer的构造方法:(1)StringBuffer():(2)StringBuffer(CharSequence seq):(3)StringBuffer(int capacity):(4)StringBuffer(String str):2. 案例演示: 1 package ...
分类:编程语言   时间:2015-09-19 21:09:47    阅读次数:153
C 栈
// seqstack.h#ifndef _MY_SEQSTACK_H_#define _MY_SEQSTACK_H_typedef void SeqStack;SeqStack* SeqStack_Create(int capacity);void SeqStack_Destroy(SeqStac...
分类:其他好文   时间:2015-09-15 20:10:02    阅读次数:184
Java HashMap、LinkedHashMap
一。HashMap1.HashMap构造函数public HashMap(int initialCapacity, float loadFactor) { if (initialCapacity MAXIMUM_CAPACITY) initialCapacity = MAXIM...
分类:编程语言   时间:2015-09-15 17:55:21    阅读次数:204
storm metrics
判断storm的一个topology性能如何,主要关注capacity指标。官方对此有一段描述:The "capacity" metric is very useful and tells you what % of the time in the last 10 minutes the bolt ...
分类:其他好文   时间:2015-09-15 16:28:36    阅读次数:164
std::vector扩容机制,.按1.5倍取整扩容,如下。
#include #include using namespace std;/* * 结论: * capacity = 1, newcapacity = 2; * capacity > 1, newcapacity = (int)(capacity * 1.5); */int main(){ ...
分类:其他好文   时间:2015-09-15 10:42:52    阅读次数:217
C++ _数据结构 _线性表的顺序存储
#ifndef __MY_SEQLIST_H__ #define __MY_SEQLIST_H__typedef void SeqList;typedef void SeqListNode;//链表 创建SeqList* SeqList_Create(int capacity);//链表 销毁vo....
分类:编程语言   时间:2015-09-12 21:35:02    阅读次数:210
USACO 1.4 Mother's Milk
Mother's MilkFarmer John has three milking buckets of capacity A, B, and C liters. Each of the numbers A, B, and C is an integer from 1 through 20, in...
分类:其他好文   时间:2015-09-10 01:49:15    阅读次数:182
You Have to Understand Hardware,Too
?You Have to Understand Hardware,TooKamal WickramanayakeFoR MAny SoFTWARE ARCHiTECTS, hardware capacity planning is a topic that lies beyond their comfort zone, yet it remains an important part of the...
分类:其他好文   时间:2015-09-01 10:50:03    阅读次数:158
这里想经过一个小程序研究标准库为 vector 对象提供的内存分配策,因为vector容器比list和deque容器用的很多,而且它的存储方式是连续的
我写一个简单的程序来区分vector容器size()和capacity()函数,这里capacity函数就是为vector容器预留了空间,不需要每次增添元素就要重新分配内存,这样效率上提高了很多,我通过一个间的小程序来研究,下面是程序和运行结果,比较简明可以看出capacity的大小都会比size大,因为size 指容器当前拥有的元素个数;而 capacity 则指容 器在必须分配新存储空间之前...
分类:其他好文   时间:2015-08-21 15:48:39    阅读次数:123
HashMap源码分析
/** * The default initial capacity - MUST be a power of two. */ static final int DEFAULT_INITIAL_CAPACITY = 16; /** * The maximum ca...
分类:其他好文   时间:2015-08-17 23:35:28    阅读次数:175
831条   上一页 1 ... 62 63 64 65 66 ... 84 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!