起:C++98标准加入auto_ptr,即智能指针,C++11加入shared_ptr和weak_ptr两种智能指针,先从auto_ptr的定义学习一下auto_ptr的用法。template class
auto_ptr { // wrap an object pointer to ensure....
分类:
编程语言 时间:
2014-05-27 16:13:40
阅读次数:
440
不介绍背景,直接上例子首先我们创建这样的一张表,没有主键,添加下面的数据然后我们分别创建下面的连个连接查询查询1:SET TRANSACTION
ISOLATION LEVEL READ UNCOMMITTED--SERIALIZABLE--READ UNCOMMITTEDbegin tran pr...
分类:
其他好文 时间:
2014-05-26 19:18:04
阅读次数:
388
类似java的多行凝视!安装过程:1.前往GitHub下载project文件:VVDocumenter-Xcode2.用Xcode打开project,Command
+ BBuild成功后,能够在~/Library/Application Support/Developer/Shared/Xcode...
分类:
其他好文 时间:
2014-05-26 17:24:08
阅读次数:
390
条款18:让接口容易被正确使用,不易被误用
1,好的接口很容易被正确使用,不容易被误用。你应该在你的所有接口中努力达成这些性质。
2,“促进正使用”的办法包括接口的一致性,以及与内置类型的行为兼容。
3,“阻止误用”的办法包括建立新类型,限制类型上的操作,束缚对象值,以及消除客户的资源管理责任。
4,shared_ptr支持定制型删除器。这可以防范DLL问题,可以用来自动解...
分类:
编程语言 时间:
2014-05-25 18:22:08
阅读次数:
297
在AWR中定位到问题SQL语句后想要了解该SQL statement的具体执行计划,于是就用AWR报告中得到的SQL ID去V$SQL等几个动态性能视图中查询,但发现V$SQL或V$SQL_PLAN视图都已经找不到对应SQL ID的记录,一般来说这些语句已经从shared pool共享池中被替换出去了。
这个时候我们可以尝试使用DBMS_XPLAN.DISPLAY_AWR存储过程来将Oracle...
分类:
数据库 时间:
2014-05-25 16:24:32
阅读次数:
368
【题目】
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[ 7, 6, 5 ]
]
【题意】
给定整数n, 将1,2,3...nxn个数按螺旋旋转的方式填入n...
分类:
其他好文 时间:
2014-05-25 07:08:17
阅读次数:
235
对于已经安装sql server
的情况今天装SharePointFoundation遇到“未能启动数据库服务
MSSQL$Sharepoint”搜了下有如下解决办法“HKLM_Local_Machine/Software/Microsoft/Shared
Tools/Web ServerExten...
分类:
数据库 时间:
2014-05-25 03:19:48
阅读次数:
324
题目:
Given an array S of n integers, are there elements a, b, c in S such that a + b + c =
0? Find all unique
triplets in the array which gives the sum of zero.
Note:
Elements...
分类:
其他好文 时间:
2014-05-25 00:39:37
阅读次数:
343
【题目】
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
【题意】
螺旋输出MxN...
分类:
其他好文 时间:
2014-05-24 23:11:02
阅读次数:
279
题目描述If the difference between any two adjancent
elements in a sequence is not more than K, then we call this sequence is a
K-diff sequence. A subseque...
分类:
其他好文 时间:
2014-05-24 09:39:27
阅读次数:
340