Problem Description输入n(nint main(){int n,i,temp,cnt,min;int str[100];while(scanf("%d",&n)!=EOF){if(n==0) return 0;else{for(i=1;i<=n;i++){scanf("%d",&s...
分类:
其他好文 时间:
2015-03-11 09:17:05
阅读次数:
186
常见的关键字有以下4种:1、与声明有关的关键字:class,deinit,enum,extension,func,import,init,let,protocol,static,struct,subscript,typealias,var2、与语句有关的关键字:break,case,continue,default,do,else,fallthrough,if,in,for,return,switch,return,where,while3、..
分类:
编程语言 时间:
2015-03-10 19:39:30
阅读次数:
144
转自:http://www.cnblogs.com/phoebus0501/archive/2011/05/16/2048126.html直接使用JDBC一个非常普遍的问题就是动态SQL。使用参数值、参数本身和数据列都是动态SQL,通常是非常困难的。典型的解决办法就是用上一堆的IF-ELSE条件语句...
分类:
数据库 时间:
2015-03-10 18:58:54
阅读次数:
251
root@debian:~/Workspace# awk ' { if(match($7,"/*\.php*")) { if(index($7,"?")) { print substr($7,0,index($7,"?")) } else { print $7; } } } ' access.log...
分类:
Web程序 时间:
2015-03-10 16:59:17
阅读次数:
130
n
Hn(x) =
n = 1 : 2x
n >= 2 : 2xHn-1(x) - 2(n -1)Hn-2(x)
#include
int hermite(int n, int x)
{
if(n <= 0)
return 1;
else if(1 == n)
return 2*x;
else
ret...
分类:
其他好文 时间:
2015-03-10 12:13:37
阅读次数:
135
闰年判断
【AC代码】:
#include
#include
using namespace std;
int main()
{
int y = 0;
cin >> y;
if (((0==y%4)&&(0!=y%100))||(0==y%400))
cout << "yes";
else
cout << "no";
}
01子串
【AC代码】:方法很多,最简单的。...
分类:
其他好文 时间:
2015-03-10 00:13:09
阅读次数:
246
在Java程序设计中,分支结构由条件语句(if语句)来完成。if语句既可以单独使用,也可以与else一起使用。以下是使用方法: if语句单独使用 if(条件表达式){ 目的; //这里是一段代码 } 与else一起使用 if(条件表达式){ 目的一; //这里是一段代码 }...
分类:
编程语言 时间:
2015-03-10 00:10:07
阅读次数:
169
1、依靠正则表达式: /2/1.html [1] => 2 [2] => 1 ) $type = $arr[1]; //参数赋值 $category = $arr[2]; //参数赋值} else { echo 'URL错误请检查';}2、WEB服务器rewrite配置 ? apa...
分类:
Web程序 时间:
2015-03-09 18:51:46
阅读次数:
166
//检测输入值是否为金额,否刚强制改为0.00function checkMoneyVlaue(th) { var v = th.value; if (v === '') { v = '0.00'; } else if (v === '0') { v =...
分类:
Web程序 时间:
2015-03-09 16:05:46
阅读次数:
179
手机号验证//验证11位手机号 1开头function CheckMobile(str) { var re = /^1\d{10}$/ if (re.test(str)) { return true; } else { return false; ...
分类:
Web程序 时间:
2015-03-09 16:00:13
阅读次数:
231