文件名类型有:http://localhost/code/loginfile/index.ini.php?username=aaaE:\xampp\php/login.phplogin.phpfunctionfile_extension($url)
{
//第一步:判断是否有问号"?"
$file="";//存储整个文件名称
if(strstr($url,"?")){
list($file)=explode("?",$url);
}
else
..
分类:
其他好文 时间:
2014-08-03 23:32:06
阅读次数:
316
/*#includeusing namespace std;int main(){ int n; while (cin >> n){ if (n == 0) break; else if (n > 0 && n > f[i]; max = min = f[0]; for (int i =...
分类:
其他好文 时间:
2014-08-03 23:05:46
阅读次数:
320
http://acm.hdu.edu.cn/showproblem.php?pid=3308
学到两点:
1、以区间端点为开始/结束的最长......似乎在Dp也常用这种思想
2、分类的时候,明确标准逐层分类,思维格式:
条件一成立:
{
条件二成立:
{
}
else
{
}
}
else
{
条件二成立:
{
}
else
{
}...
分类:
其他好文 时间:
2014-08-03 15:22:45
阅读次数:
238
13.7 流程控制13.7.1 分支 分支语句主要有if语句和switch语句。 if语句有三种形式: //第一种 if(条件) { } //第二种 if(条件) { } else {...
分类:
其他好文 时间:
2014-08-03 15:11:45
阅读次数:
217
深度优先(DFS)模板1:void DFS(int k) //处理第k步{ if (k==n) //已经处理到第n步,到达目的状态 输出结果 else//处理第k步 for (int i=1; iusing namespace std;int n,m, a[10];void DFS(int k).....
分类:
其他好文 时间:
2014-08-03 15:10:35
阅读次数:
194
1、case语法: case when 条件1 then 返回值1 when 条件2 then 返回值2 ... else 返回值N end;示例:declare i integer; str varchar2(20);begin i := 3; str := case when i =...
分类:
数据库 时间:
2014-08-03 12:38:35
阅读次数:
300
1.概述在软件开发过程中,应用程序可能会根据不同的情况作出不同的处理。最直接的解决方案是将这些所有可能发生的情况全都考虑到。然后使用if... ellse语句来做状态判断来进行不同情况的处理。但是对复杂状态的判断就显得“力不从心了”。随着增加新的状态或者修改一个状体(if else(或switch ...
分类:
其他好文 时间:
2014-08-03 12:28:35
阅读次数:
366
设计模式(十一)代理模式Proxy(结构型)1.概述 因为某个对象消耗太多资源,而且你的代码并不是每个逻辑路径都需要此对象, 你曾有过延迟创建对象的想法吗 ( if和else就是不同的两条逻辑路径) ? 你有想过限制访问某个对象,也就是说,提供一组方法给普通用户,特别方法给管理员用户?以上两种需.....
分类:
其他好文 时间:
2014-08-03 12:27:05
阅读次数:
412
bash之选择结构选择程序结构用于判断给定的条件,根据判断的结果判断某些条件,根据判断的结果来控制程序的流程。(关于shell脚本中选择结构的详细使用方法请查看帮助文档)if语句的几种结构(一)if判断条件;then命令fi(二)if判断条件;then命令else命令fi(三)if判断条件..
分类:
其他好文 时间:
2014-08-03 07:58:25
阅读次数:
221
#include int gcd(int m,int n){if(n==0) return m;else return gcd(n,m%n);}*************变形一int gcd(int m,int n) {if(m%n==0) return m; else return gcd(n,m...
分类:
其他好文 时间:
2014-08-02 20:40:13
阅读次数:
243