js调试函数
参考php的debug函数修改了一下JS版的。 firebug 下使用控制台 ie使用 alert弹出
/**
* 内部调试
**/
function debug(v){
if(window.console && window.console.log){
window.console.log(v);
}else{
alert(v);
}
}
【全球号召】拯救MySQL!
作为MySQL的多年忠实用户,并且个人也非常喜欢MySQL,看到了MySQL创始人发出的号召,毫不犹豫的
参加了签名活动,希望大家也能参加!(希望大家转发此文,共同参与)
马上参加“拯救MySQL”签名活动!
MySQL 创始人请求帮助邮件:http://www.cnbeta.com/articles/102517.htm
国内媒体报道:http://tech.sina.com.cn/it/2010-01-04/21153736195.shtml
改变系统hosts的软件(PYTHON写的)
做前端,测试,程序开发需要不停的转换系统hosts文件。
用批处理与EDIT在集成测试时比较麻烦,所以写下这个软件
FOR XP
改变系统hosts工具-XP
FOR WIN7
改变系统hosts工具-windows7
其他平台没有试过。
使用 python2.5 + wxpython2.8 + py2exe
功能比较简单。
回车关闭弹出层
//按回车关闭按钮事件
//需要在页面的body加个事件
function key_layer_close_v31(e){
var isie = (document.all) ? true : false;
var key = isie ? window.event.keyCode : e.which ;
if(key==13){
if(document.getElementById('phishing').style.display=='block' && document.getElementById('read_complete').disabled == false ){
UED.layer31.close();
}
}
return false;
}
清除IE6在HTTPS安全提示问题
1. 检查所有的iframe中是否有为空的或者引用其他地方(如果有为空的,需要设计为 JAVASCRIPT:FALSE)
2. 不能引用外部的HTTP相关内容(可以使用HTTPS引用,图片样式与脚本)
访问GOOGLE相册
1. win+r
notepad.exe C:\WINDOWS\system32\drivers\etc\hosts
2. 增加
203.208.39.99 lh1.ggpht.com lh2.ggpht.com lh3.ggpht.com lh4.ggpht.com lh5.ggpht.com lh6.ggpht.com lh7.ggpht.com
203.208.39.99 lh8.ggpht.com
重启浏览器
同事提供的题目(Taobao)
alert(toRGB("#0000FF")); //返回rgb(0,0,255)
alert(toRGB("#00F")); //返回rgb(0,0,255)
alert(toRGB("#FF0000")); //返回rgb(255,0,0)
alert(toRGB("taobao")); //返回rgb(taobao)
alert(toRGB("#G00")); //返回rgb(#G00)
function toRGB(color){
//第有一字符有#号
if(color.indexOf('#')==0){
//判断长度
if(color.length==4){
//取出字母
r = color.match(/([\da-z])/ig);
}else{
//取出字母
r = color.match(/([\da-z]{2})/ig);
}
//返回
return 'rgb('+formatHEX(r) +')';
}else{
return 'rgb('+color+')';
}
}
//转化色彩数组转为10进制
function formatHEX(x){
var html=[];
for(i in x){
html[i] = parseInt(x[i], 16);
if(isNaN(html[i])){
return '#'+x.join('');
}
}
return html.join(',');
}
window server2008 开启无线支持
1. start -> administrarot tools -> server manager
2. 选中左边中的 features -> 右边增加 ad features
3. wireless lan service -> installl
sqliteadmin非常好的sqlite3客户端
开源免费, 还很好用, 最重要的还有中文!
http://download.orbmu2k.de/files/sqliteadmin.zip
没有理由不用啊.