--判断数据库是否存在if exists (select * from sys.databases where name = '数据库名')drop database [数据库名]--判断表是否存在if exists (select * from sysobjects where id = obje...
分类:
数据库 时间:
2014-09-18 22:02:44
阅读次数:
276
题目:
Reverse digits of an integer.
Have you thought about this?
Here are some good questions to ask before coding. Bonus points for you if you have already thought through this!
If the inte...
分类:
其他好文 时间:
2014-09-18 18:52:54
阅读次数:
191
function getTmp(){ $file_name = 'orderTemp.xlsx'; $file_path = dirname(__FILE__); #判断一下文件是否存在 if(! file_exists($file_path. '/' .$file_name...
分类:
其他好文 时间:
2014-09-18 18:32:54
阅读次数:
141
比如在Northwind数据库中有一个查询为SELECT c.CustomerId,CompanyName FROM Customers cWHERE EXISTS(SELECT OrderID FROM Orders o WHERE o.CustomerID=c.CustomerID)这里面的EX...
分类:
数据库 时间:
2014-09-18 18:08:07
阅读次数:
213
系统:centos6.5今天,在重启网卡的时候发现了如下的问题[root@localhost~]#servicenetworkrestart正在关闭接口eth0:[确定]关闭环回接口:[确定]弹出环回接口:[确定]弹出界面eth0:Determiningifipaddress192.168.100.201isalreadyinusefordeviceeth0...[确定]开始以为是IP地..
分类:
Web程序 时间:
2014-09-18 03:16:43
阅读次数:
360
ob_start();setcookie("username","test",time()+3600);echo "the username is:".$HTTP_COOKIE_VARS["username"]."\n";echo "the username is:".$_COOKIE["username"]."\n";print_r($_COOKIE);?>访问该PHP文件时提示Warning:...
分类:
Web程序 时间:
2014-09-17 13:40:52
阅读次数:
229
<?php
functiondiffArray($arr1,$arr2){
$arrRet=array();
foreach($arr1as$key=>$value){
if($arr1[$key]!=$arr2[$key]){
if(array_key_exists($key,$arrRet)){
array_push($arrRet,$key);
}else{
$arrRet[]=$key;
}
}
}
return$arrRet;
}
$a..
分类:
Web程序 时间:
2014-09-16 19:12:21
阅读次数:
233
ERROR ITMS-9000: "Redundant Binary Upload. There already exists a binary upload with build version。。。...
分类:
其他好文 时间:
2014-09-16 15:58:50
阅读次数:
200
exists和in 干的事是一样的,那为什么还要弄两个呢,其实是效率问题
例如下面两个例子
1.select * from t1 where exists(select 'X' from t2 where t1.a=t2.a)
PS:这里的‘X'换成其他任意常亮都是可以的,例如数字字符etc。
2.select * from t1 where t1.a in(select t2.a fro...
分类:
其他好文 时间:
2014-09-16 15:57:20
阅读次数:
170
If you havem2einstalled and the project already is a maven project but the maven dependencies are still missing, the easiest way that worked for me wa...
分类:
系统相关 时间:
2014-09-16 14:05:00
阅读次数:
380