for(iterator it = begin(); it != end(); ++it)此处的 begin()《==》this->begin() 或者for(iterator it = begin(); it != end(); it++) 区别是什么呢?? 对于两种方式来说:for(itera....
分类:
其他好文 时间:
2014-08-09 06:59:30
阅读次数:
226
mysql 事务处理(表的引擎必须是 innodb / BDB)主要是两种两法:推荐用第一种1.用 begin,rollback,commit 来实现begin 开始一个事务rollback 事务回滚commit 事务提交2.直接用 set 来改变 mysql的自动提交模式,系统默认是自动提交的se...
分类:
数据库 时间:
2014-08-08 20:56:46
阅读次数:
274
declare @sql varchar(8000) begin set @sql='' --初始化变量@sql select @sql=@sql+',['+ convert(varchar(10),CreateDate,120)+']' from vwStationYield wh...
分类:
其他好文 时间:
2014-08-08 17:26:36
阅读次数:
229
grant execute on dbms_lock to USERNAME; dbms_lock.sleep(time)参数单位为秒 create or replace procedure initdata is num number := 0; begin for ...
分类:
数据库 时间:
2014-08-07 18:42:42
阅读次数:
486
1、日期区间内的日期列表(天):1 public function dateExtent($begin,$end){2 $begin = strtotime($begin);3 $end = strtotime($end);4 ...
分类:
Web程序 时间:
2014-08-07 18:04:05
阅读次数:
223
一、要删除容器中有特定值的所有对象
1、如果容器是vector、string或deque,则使用erase-remove习惯用法。例如:
vector c;
c.erase(remove(c.begin(),c.end(),1963),c.end());//删除值是1963的元素
下面讲一下算法remove:
template
ForwardIterat...
分类:
其他好文 时间:
2014-08-07 00:48:37
阅读次数:
371
使用return返回 --create?pro
USE?yfb
go
create?proc?cwqi_test_pro(
?@newName?varchar(20)?out,
?@oldName?varchar(20)?in
?)
as
begin
??set?@newName=@oldName
??return?1
end
--run?pro...
分类:
数据库 时间:
2014-08-06 19:36:12
阅读次数:
582
# include
# include
# include
# include
# include
using namespace std;
int main()
{
string s,t;
int flag;
mapq;
while(cin>>s&&s!="XXXXXX")
{
t=s;
sort(s.begin(),s.end());
q[t]=s;
}
w...
分类:
其他好文 时间:
2014-08-06 11:56:21
阅读次数:
184
今天遇到MySQL的分表问题,可以采用脚本方式循环建立新的表,也可以使用sql建立。下面以建立player_0到player_9的语句为例。 delimiter // CREATE procedure create_table() BEGIN DECLARE `@i` int(11); DECLARE...
分类:
数据库 时间:
2014-08-06 02:07:00
阅读次数:
365
1. hoare划分 1 int hoare_partition(int a[], int begin, int end) 2 { 3 int pivot = a[begin]; 4 int ini = begin; 5 int ter = end; 6 ...
分类:
其他好文 时间:
2014-08-06 01:51:00
阅读次数:
213