cookie:
1.添加一个cookie:addCookie(name,value,expiresHours)
该函数接收3个参数:cookie名称,cookie值,以及在多少小时后过期。这里约定expiresHours为0时不设定过期时间,即当浏览器关闭时cookie自动消失。该函数实现如下:
<script language="JavaScript" type="text/javascript">
<!--
function addCookie(name,value,expiresHours){
var cookieString=name+"="+escape(value);
//判断是否设置过期时间
if(expiresHours>0){
var date=new Date();
date.setTime(date.getTime+expiresHours*3600*1000);
cookieString=cookieString+"; expires="+date.toGMTString();
}
document.cookie=cookieString;
}
//-->
</script>
2.获取指定名称的cookie值:getCookie(name)
该函数返回名称为name的cookie值,如果不存在则返回空,其实现如下:
<script language="JavaScript" type="text/javascript">
<!--
function getCookie(name){
var strCookie=document.cookie;
var arrCookie=strCookie.split("; ");
for(var i=0;i<arrCookie.length;i++){
var arr=arrCookie[i].split("=");
if(arr[0]==name)return arr[1];
}
return "";
}
//-->
</script>
3.删除指定名称的cookie:deleteCookie(name)
该函数可以删除指定名称的cookie,其实现如下:
<script language="JavaScript" type="text/javascript">
<!--
function deleteCookie(name){
var date=new Date();
date.setTime(date.getTime()-10000);
document.cookie=name+"=v; expires="+date.toGMTString();
}
//-->
</script>
oracle cilent 卸载 :http://allytang314.iteye.com/blog/921105
http://104zz.iteye.com/blog/1683157
http://blog.csdn.net/furongkang/article/details/6886526
http://chaowen0668.iteye.com/blog/1068730
http://blog.csdn.net/wangtingshuai/article/details/8631835
http://104zz.iteye.com/blog/1683157
fanling.com
String version = getAppVersionName(this);
Log.e("Version", "version="+version);
updateManager = new UpdateManager(this);
updateManager.showDownloadDialog(downloadURL);
<a οnclick="window.activity.updatePackage('http://www.test/download/r.apk')">下载</a>
-----------------------------
//File directory = mContext.getFilesDir();
//File apkFile = new File(directory, "expert.apk");
//String dirPath = directory.getAbsolutePath();
//FileOutputStream fos = new FileOutputStream(apkFile,MODE_WORLD_WRITEABLE);
FileOutputStream fos = mContext.openFileOutput("expert.apk", mContext.MODE_WORLD_READABLE + Context.MODE_WORLD_WRITEABLE);
------------------------------------------------
app 分享 到微信
http://jingyan.baidu.com/article/63acb44ae5cd2f61fdc17e6e.html
shiro
http://www.360doc.com/content/14/0106/09/9297708_342970627.shtml
http://download.csdn.net/detail/dragon_fire/6040135(demo)
-- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 5.5.27 - MySQL Community Server (GPL)
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 8.0.0.4482
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- 导出 表 test.t_menu 结构
CREATE TABLE IF NOT EXISTS `t_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`pid` int(11) DEFAULT NULL,
`description` varchar(50) DEFAULT NULL,
`page_url` varchar(50) DEFAULT NULL,
`type` int(11) DEFAULT NULL,
`state` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 test.t_menu 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `t_menu` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_menu` ENABLE KEYS */;
-- 导出 表 test.t_role 结构
CREATE TABLE IF NOT EXISTS `t_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`pid` int(11) DEFAULT NULL,
`code` varchar(50) DEFAULT NULL,
`remark` varchar(50) DEFAULT NULL,
`state` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 test.t_role 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `t_role` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_role` ENABLE KEYS */;
-- 导出 表 test.t_role_menu 结构
CREATE TABLE IF NOT EXISTS `t_role_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) DEFAULT NULL,
`menu_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 test.t_role_menu 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `t_role_menu` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_role_menu` ENABLE KEYS */;
-- 导出 表 test.t_user 结构
CREATE TABLE IF NOT EXISTS `t_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`account` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表';
-- 正在导出表 test.t_user 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `t_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_user` ENABLE KEYS */;
-- 导出 表 test.t_user_role 结构
CREATE TABLE IF NOT EXISTS `t_user_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`role_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 test.t_user_role 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `t_user_role` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_user_role` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;