1 bool fn(vector::iterator vi1,vector::iterator vi2,int i) 2 { 3 vector::iterator vi3=vi2-1; 4 if(vi1>vi3) 5 return 0; 6 else 7 ...
分类:
编程语言 时间:
2014-11-11 00:43:05
阅读次数:
202
#include
using namespace std;
int main()
{
double sum=0;
for(int i=0;i<6;++i)
{
if(i%2==0)
sum+=1;
else
{
sum=sum/2;
}
}
cout<<sum<<endl;
system("pause");
return 0;...
分类:
编程语言 时间:
2014-11-10 21:57:14
阅读次数:
273
if?(get_magic_quotes_gpc())?{
????$keyword?=?mysql_real_escape_string(stripslashes($keyword));?????
}else{
??$keyword?=?mysql_real_escape_string($keyword);??
} $_GET?=?stripsl...
分类:
数据库 时间:
2014-11-10 18:14:26
阅读次数:
190
/********函数指针***********/int max(int a, int b) { if (a > b) return a; else return b;}int main() { int max()(int a, int b); int (*pmax)(); int x, y, z;...
分类:
其他好文 时间:
2014-11-10 17:26:16
阅读次数:
168
set abc 123
zadd z 0 abc
eval "local c=redis.pcall('get', KEYS[1]) if (c.err) then return c.err else return c end" 1 abc
eval "local c=redis.pcall('get', KEYS[1]) if (c.err) then return c.err els...
分类:
其他好文 时间:
2014-11-10 12:11:24
阅读次数:
155
语法说明:方式一:CASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN result ...] [ELSE result] END方式二:CASE WHEN [condition] THEN result [WH...
分类:
数据库 时间:
2014-11-09 23:27:26
阅读次数:
245
概念类似于函数,就是把一段代码封装起来,当要执行这一段代码的时候,可以通过调用该存储过程来实现.在封装的语句体里面,可以用if/else, case,while等控制结构.可以进行sql编程....
分类:
数据库 时间:
2014-11-09 22:16:19
阅读次数:
331
1 2 First //第一页3 {if $pagerInfo.currentPage > 1} //如果当前页大于1,则有pre链接4 Pre5 {else}6 Pre7 {/if}8 index+1} //index从0开始计数10 {$pindex}11 {/section}12 {i...
分类:
其他好文 时间:
2014-11-09 20:44:40
阅读次数:
195
insert first when deptno=10 then into dept01(id) values(deptno) when deptno=20 then into dept02(id) values(deptno) else into d...
分类:
其他好文 时间:
2014-11-09 19:23:55
阅读次数:
139
一开始采用递归写,TLE。
class Solution {
public:
bool flag;
int n,m;
void dfs(int id0,const char *s,int id1,const char *p){
if(flag)return;
if(id0>=n){
if(id1>=m)flag=1;
else{
int j=0;
whi...
分类:
其他好文 时间:
2014-11-09 15:18:20
阅读次数:
225