code forces two buttens代码*********************#include int main(){int s,g,r=0;scanf("%d%d",&s,&g);for(;s<g;r++){if(g%2)g++;else g/=2;}printf("%d\n",r+...
分类:
其他好文 时间:
2015-03-20 21:45:08
阅读次数:
125
$code, 'message'=>$message, 'data'=>$data ); if($type=="json"){ self::json($code,$message,$data);die; }else...
分类:
Web程序 时间:
2015-03-20 18:22:40
阅读次数:
145
windows 与 linux 的头文件区别:#if defined(WIN32) || defined(WIN64) #include using namespace stdext;#else #include using namespace __gnu_cxx;#endif编译出现警告...
分类:
编程语言 时间:
2015-03-20 15:53:29
阅读次数:
263
1.一般项目中我的NSLog会在Prefix.pch文件添加如下代码,已保证在非调试状态下NSLog不工作12345#ifdef DEBUG#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...)#endif2.在项目中如果没做任何处理...
分类:
移动开发 时间:
2015-03-20 12:31:11
阅读次数:
188
【思路】:递归的使用。
【AC代码】:
#include
#include
#include
#include
#include
using namespace std;
void fj(int n)
{
if (1 == n)
{
cout << char('A'-1+n);
}
else
{
fj(n-1);
cout << char('A'-1+n);
...
分类:
其他好文 时间:
2015-03-20 00:00:17
阅读次数:
338
--CASE函数用法:--1.相当于switch..case:,能够实现等值判断--语法:--case 字段/表达式 --判断指定折字段或者表达式的值,它不能判断null值,因为null不是一个具体的值-- when 值 then '自定义值'-- when 值 then '自定义...
分类:
其他好文 时间:
2015-03-19 23:51:26
阅读次数:
137
1.定义函数def max(x,y): if x>y: return x else: return y如果定义空函数(函数还没想好怎么编写,只是为了让整个代码能够运行起来)def max(x,y): pass2.函数的参数2.1可变参数顾名思义参数是可变的,既可以是1个参数,也可以...
分类:
编程语言 时间:
2015-03-19 23:37:19
阅读次数:
162
1) { foreach($arr as $k=>$v) if( ($k+1) % $m == 0) { array_shift($arr); } else { $...
分类:
Web程序 时间:
2015-03-19 23:34:33
阅读次数:
138
--IF ELSE--特点:--1.没有{},使用begin...end--2.有多重和嵌套--3.if必须有处理语句,如果只有一句,也可以不使用begin..end,只包含后面一句--4.没有true/false的概念,只能使用关系运算符的条件表达式--5.if后面的括号可以没有--计算offic...
分类:
数据库 时间:
2015-03-19 23:31:08
阅读次数:
273
select sum(case when t.lr_date > to_date('2013-12-12','yyyy-mm-dd') and 1=1 then 1 else 0 end) date1sum,sum(case when t.lr_date < to_date('2013-12-13'...
分类:
数据库 时间:
2015-03-19 21:46:01
阅读次数:
145