/** * 页面重定向 * @param $location */function urls_redirect( $location ) { if( !headers_sent() ) { header( "Location: $location" ); } else { ...
分类:
其他好文 时间:
2014-09-26 19:48:18
阅读次数:
151
项目中遇到一个问题,需要设置序号排序,而该字段中的默认值为空,使用普通排序,空值就会在最前边。可以使用如下语句: 其中 col 为 排序的字段名称。 then 0 else 1 代表先空值,后数字then 1 else 0 则代表空值在后
分类:
数据库 时间:
2014-09-26 10:35:08
阅读次数:
263
UtopianTree#include<iostream>
usingnamespacestd;
intheight(intn){
if(n==0)
return1;
else
{
if(n%2==0)
returnheight(n-1)+1;
else
returnheight(n-1)*2;
}
return0;
}
intmain(){
intT;
cin>>T;
while(T--){
intn;
cin>>n;
cout<<height(n)&l..
分类:
其他好文 时间:
2014-09-26 00:40:08
阅读次数:
188
#includeint yanghui(int m,int n){int r=0;if(n==1)return 1;else{r=yanghui(m,n-1)*(m-n+1)/(n-1);return r;}}int main(){int n;while (scanf("%d",&n)==1){fo...
分类:
其他好文 时间:
2014-09-25 23:38:27
阅读次数:
195
密码强度检测效果
//CharMode函数
//测试某个字符是属于哪一类.
function CharMode(iN){
if (iN>=48 && iN
return 1;
if (iN>=65 && iN
return 2;
if (iN>=97 && iN
return 4;
else
return 8; //特殊字符
}
//bitTotal函数
/...
分类:
其他好文 时间:
2014-09-25 11:51:08
阅读次数:
200
判断条件:能ping通即在线#!/bin/bash
fornin`seq254`
do
ping-c210.0.0.$n>/dev/null2>&1
if[$?-eq0]
then
echo"10.0.0.$nisup">>uplist.log
else
echo"10.0.0.$nisdown">>downlist.log
fi
done
分类:
其他好文 时间:
2014-09-25 03:56:38
阅读次数:
192
一.方式case of:;:;else;end;例1:case a of1:语句1;2:语句2;end;例2:case a of1:语句1;2:语句2;else语句n;end;例3:case a of1,2,3:语句1;2:语句2;end;一.方式一.方式一.方式case of:;:;else;.....
分类:
其他好文 时间:
2014-09-25 01:09:37
阅读次数:
205
$dirname="./runtime";
functionfordir($dirname){
$dir=opendir($dirname);
readdir($dir);
readdir($dir);
while(false!==($file=readdir($dir))){
$file=$dirname.‘/‘.$file;
if(is_dir($file)){
echo"目录:{$file}<br>";
}else{
echo"..
分类:
其他好文 时间:
2014-09-24 18:55:27
阅读次数:
170
function is_SSL(){ if (!isset($_SERVER['HTTPS'])) return FALSE; if ($_SERVER['HTTPS'] === 1){ //Apache return TRUE; } else if ($_SERVER['HTTPS'] ==...
分类:
Web程序 时间:
2014-09-24 18:12:07
阅读次数:
203
要静心下来作一件事,认真做好,日积月累,成浩瀚星空! 今天是2014/9/24,想来从大学毕业到现在,工作有1年3个月,回想来,似乎自己积累的东西不多,其实就是不多。从第一次写if else,到今天似乎最能拿的出手的就是if else了。 想来不是自己不想学,实在是没有一颗持之以恒之心,看的...
分类:
其他好文 时间:
2014-09-24 17:10:27
阅读次数:
136