function StringBuilder() { this._strings_ = new Array;}StringBuilder.prototype.append = function (str) { this._strings_.push(str);};StringBuilde...
分类:
Web程序 时间:
2014-07-07 00:46:42
阅读次数:
248
上次看到这个有点晕了,其实这个vector保存的是std::vector#include #include using namespace std;int main(){ std::vector > num; std::vector a(10, 5); num.push_back(...
分类:
其他好文 时间:
2014-07-02 20:14:53
阅读次数:
182
在使用git时,使用git pull,或git push,每次都要我输入用户名和密码,比较麻烦.git有个参数可以解决这个问题。修改./git/config文件,增加[credential] helper = store问题解决。
分类:
其他好文 时间:
2014-07-02 19:33:23
阅读次数:
187
8086CPU出栈入栈都是以字为单位进行的。push ax 由一下两步完成1、SP=SP-22、将ax中的内容送入SS:SP指向的内存单元pop ax1、将SS:SP指向的内存单元中的内容送入ax2、SP=SP+2push 寄存器pop 寄存器push 段寄存器pop 段寄存器push 内存单元po...
分类:
其他好文 时间:
2014-07-02 00:52:34
阅读次数:
302
方法说明Concat()连接2个或多个数组,并返回结果Push()向数组末尾添加一个或多个元素,并返回新的长度Reverse()颠倒数组中元素的顺序Sort()对数组的元素进行排序Slice()从某个已有的数组返回数组选定的元素toString()把数组转换成字符串Join()连接toLoc...
分类:
其他好文 时间:
2014-07-02 00:29:20
阅读次数:
295
原文地址:http://developer.android.com/design/wear/principles.html
本篇设计原则提供了一些关于应该怎样规划和评估你的Android Wear应用程序设计的简单思路。
Focus on not stopping the user and all else will follow(专注于不打算用户并让一切后续跟随上来)
...
分类:
移动开发 时间:
2014-07-01 11:28:20
阅读次数:
309
class Solution {public: vector > generate(int numRows) { vector > res; if (numRows row(1, 1); res.push_back(row); ...
分类:
其他好文 时间:
2014-06-30 21:46:08
阅读次数:
256
1 什么是redis
redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)和zset(有序集合)。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的。在此基础上,redis支持各种不同方式的排序。与memcached一...
分类:
其他好文 时间:
2014-06-30 20:25:48
阅读次数:
205
①push_heap算法
下面是push_heap算法的实现细节。该函数接收两个迭代器,用来表现一个heap底部容器(vector)的头尾,并且新元素已经插入到底部的最尾端。
template
inline void push_heap(RandomAccessIterator first,RandomAccessIterator last)
{
//注意,此函数被调用时,新...
分类:
其他好文 时间:
2014-06-30 09:25:57
阅读次数:
239
题目链接:http://poj.org/problem?id=2442
题目大意:给出一个m*n的矩阵,从每一行中取出一个数相加,能得到n^m个不同的结果,要求输出其中前n项。
建立一个以n元数组为底层数组的堆,在这里,利用stl中的make_heap,pop_heap,push_heap等函数解决。
1.将第一组数据输入arr1数组,升序排序。
2.将接下来的数据输入到arr2数组中,并...
分类:
其他好文 时间:
2014-06-29 23:25:31
阅读次数:
259