??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲偷熟乱区亚洲香蕉av,92久久精品,不卡av在线播放 http://www.aygfsteel.com/ginew/archive/2006/11/17/81734.html无风之雨 无风之雨 Fri, 17 Nov 2006 04:15:00 GMT http://www.aygfsteel.com/ginew/archive/2006/11/17/81734.html http://www.aygfsteel.com/ginew/comments/81734.html http://www.aygfsteel.com/ginew/archive/2006/11/17/81734.html#Feedback 2 http://www.aygfsteel.com/ginew/comments/commentRss/81734.html http://www.aygfsteel.com/ginew/services/trackbacks/81734.html href="#" vs. href="javascript:void(0)"开发的时候有旉要用link(<a>)来触发一些javascript事gQ所以常常可以看到如下的代码Q?
<a href="javascript:void(0)" onclick="doSomething();return false ;" >Link</a> q是一个曾l被多次讨论q的问题Q长期以来,我也一直是q样写的。读?a href=”javascript:void(0);??avoid the void 之后Q我认同了作者的意见。下面的写法实更合理:
<a href="#" onclick="doSomething();return false ;" >Link</a> 或?
<script type="javascript" >
function doSomething() {
//doSomething
return false ;
}
</script>
<a href="#" onclick="return doSomething();" >Link</a> 以往大家不?#"的问题是Q这导致点击链接时面跛_面剙Q但通过 return false 语句得浏览器忽略链接的默认动作,从而避免了此问题?
youngpup 更有意思,他在How to Create Pop-Up Windows 中言辞激烈的倡导大家永远永远永远不要使用 javascript: 伪协议:
Never, ever, ever use the javascript: pseudo-protocol for anything, ever ever ever ever again. Please. Pretty please. 他的解决Ҏ是:
<a
href="http://google.com/"
onclick="window.open(this .href, 'popupwindow',
'width=400,height=300,scrollbars,resizable');
return false ;" > q样的好处就是可以保存到书签或者收藏夹Q可以左键单击,也可以右键用!
]]> resin使用security-manager的问?/title> http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html无风之雨 无风之雨 Fri, 09 Jun 2006 03:00:00 GMT http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html http://www.aygfsteel.com/ginew/comments/51636.html http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html#Feedback 2 http://www.aygfsteel.com/ginew/comments/commentRss/51636.html http://www.aygfsteel.com/ginew/services/trackbacks/51636.html 我们打算为用h讑֍独的虚拟L服务器,可以让企业自M传jsp、htm、php{程序。其中resin用来做jsp的容器?br /> ׃是用戯主通过FTP上传E序Q我们必L制这些程序可以执行的权限Q不能让用户随便览盘上的文gQ但又要能让resin可以正常q行。比如:/data/user_a目录中的E序Q只能在/data/user_a目录及其子目录中dQ如果想要访问其他目录,没有权限?br /> 通过研究resin的文档以及JAVA的机Ӟ我认实现以上构想Q可以通过使用java权限理器来构徏一个resin的沙来对java的具体操作进行授权?br />参考文档:http://www.caucho.com/resin-3.0/security/securitymanager.xtp Q?a >http://www.jscud.com/srun/news/viewhtml/3_2005_10/148.htm
当我认ؓ胜利在望的时候,发现resin好像不支持grant codeBase "file:xxxx ?br /> grant codeBase "file:/data/ftpdata/user01.test.com/-" { permission java.io.FilePermission "/data/ftpdata/user01.test.com/-", "read,write,delete"; }; 上面的语句,语法上没有问题,但就是不起作用。那个codebase目录下的文gQ对本目录没有Q何权限?br /> resin的官方论坛里面,有h?001q_针对resin1.2.5提Z和我一怸L疑问Q?a >http://www.caucho.com/support/resin-interest/0105/0106.htmlQ,作者发现问题是׃resin的classloader是非安全的,因此改了resin原文件后解决了问题(http://www.caucho.com/support/resin-interest/0105/0112.html Q,但是我看resin3的源代码Q里面已l基于java.security.SecureClassLoaderQ因此应该不是这个原因了?br /> 以下是我的resin.policy文gQ?/p>
grant codeBase "file:${java.home}/lib/-" { permission java.security.AllPermission; };
grant codeBase "file:${java.home}/jre/lib/-" { permission java.security.AllPermission; };
grant codeBase "file:${resin.home}/lib/-" { permission java.security.AllPermission; };
grant { permission java.util.PropertyPermission "*", "read"; permission java.io.SerializablePermission "enableSubstitution"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.lang.RuntimePermission "accessClassInPackage.*"; permission java.lang.RuntimePermission "getClassLoader"; permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.RuntimePermission "modifyThreadGroup"; permission java.lang.RuntimePermission "setContextClassLoader"; permission java.lang.RuntimePermission "setIO"; permission java.lang.RuntimePermission "stopThread"; permission java.lang.RuntimePermission "createClassLoader"; permission java.lang.RuntimePermission "getProtectionDomain"; permission java.lang.RuntimePermission "defineClassInPackage"; permission java.security.SecurityPermission "putProviderProperty.SunJCE"; permission java.security.SecurityPermission "insertProvider.SunJCE"; permission java.util.logging.LoggingPermission "control"; permission java.lang.RuntimePermission "getAttribute"; permission java.util.PropertyPermission "jaxp.debug", "read"; permission ognl.OgnlInvokePermission "invoke.*"; permission java.net.SocketPermission "localhost:3306","connect"; permission java.io.FilePermission "${resin.home}/-", "read"; permission java.io.FilePermission "${java.home}/-", "read"; permission java.io.FilePermission "/tmp/-","read,write,delete"; permission java.io.FilePermission "/tmp","read,write,delete"; permission java.io.FilePermission ".","read"; permission java.io.FilePermission "/home/apps/java/jdk/lib/tools.jar","read"; permission java.io.FilePermission "/bin/sh", "read,execute"; };
//以下语句没有M作用Q?data/ftpdata/user01.test.com/下的jsp对这个目录没有读的权?br />grant codeBase "file:/data/ftpdata/user01.test.com/-" { permission java.io.FilePermission "/data/ftpdata/user01.test.com/-", "read,write,delete"; };
]]>GPL协议q?/title> http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html无风之雨 无风之雨 Tue, 16 May 2006 08:50:00 GMT http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html http://www.aygfsteel.com/ginew/comments/46436.html http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html#Feedback 0 http://www.aygfsteel.com/ginew/comments/commentRss/46436.html http://www.aygfsteel.com/ginew/services/trackbacks/46436.html 原版的GPL协议Q因?GPL 无非交待了几个原则:保软g自始至终都以开放源代码形式发布Q保护开发成果不被窃取用作商业发售。Q何一套YӞ只要其中使用了受 GPL 协议保护的第三方软g的源E序Qƈ向非开发h员发布时QY件本w也p动成为受 GPL 保护q且U束的实体。也是_此时它必d放源代码? GPL 大致是一个左侧版权(CopyleftQ或译ؓ“反版权”、“版权属左”、“版权所无”、“版责”等Q的体现。你可以L所有原作的版权 信息Q只要你保持开源,q且随源代码、二q制版附?GPL 的许可证pQ让后h可以很明地得知此Y件的授权信息。GPL _N是Q只要软g在完整开?的情况下Q尽可能使用者得到自由发挥的I间Q软g得到更快更好的发展? 无论软g以何UŞ式发布,都必d旉上源代码。例如在 Web 上提供下载,必d二进制版本(如果有的话)下蝲的同一个页面,清楚地提供源代码下蝲的链接。如果以光盘形式发布Q就必须同时附上源文件的光盘? 开发或l护遵@ GPL 协议开发的软g的公司或个hQ可以对使用者收取一定的服务费用。但q是一句老话——必L偿提供Y件的完整源代码,不得源代码与服务做捆绑或Q何变相捆l销售? ]]> 最惌的R http://www.aygfsteel.com/ginew/archive/2006/05/14/46059.html无风之雨 无风之雨 Sun, 14 May 2006 03:28:00 GMT http://www.aygfsteel.com/ginew/archive/2006/05/14/46059.html http://www.aygfsteel.com/ginew/comments/46059.html http://www.aygfsteel.com/ginew/archive/2006/05/14/46059.html#Feedback 0 http://www.aygfsteel.com/ginew/comments/commentRss/46059.html http://www.aygfsteel.com/ginew/services/trackbacks/46059.html
]]> 关于IE无法打开INTERNET站点的错 http://www.aygfsteel.com/ginew/archive/2006/04/19/41975.html无风之雨 无风之雨 Wed, 19 Apr 2006 10:14:00 GMT http://www.aygfsteel.com/ginew/archive/2006/04/19/41975.html http://www.aygfsteel.com/ginew/comments/41975.html http://www.aygfsteel.com/ginew/archive/2006/04/19/41975.html#Feedback 6 http://www.aygfsteel.com/ginew/comments/commentRss/41975.html http://www.aygfsteel.com/ginew/services/trackbacks/41975.html q个问题我以前遇到过Q一直没有详l的LI原因,只是以ؓ是服务器关闭q接太快的原因。今天发现这个问题出的很频繁Q服务器斚w没有改什么,只是上传了新的页面程序而已Q应该不会和服务器有兟뀂在寚w面进行分析,q搜索了一下网上,发现原来是js在documentq没完全load完的时候就试图改变其值导致?br /> 因此对js做如下改变: 原jsQ?br /> window.settimeout("go()",500); function go(){ ....... } ҎQ?br /> var go_i=window.setInterval("go()",500); function go(){ if(document.readyState=="complete"){ window.clearInterval(go2_i); } else return; ........ } 目的是让他一定要在document完成后才执行那个操作 ]]>document.domain与域名的问题 http://www.aygfsteel.com/ginew/archive/2006/04/13/40850.html无风之雨 无风之雨 Thu, 13 Apr 2006 03:54:00 GMT http://www.aygfsteel.com/ginew/archive/2006/04/13/40850.html http://www.aygfsteel.com/ginew/comments/40850.html http://www.aygfsteel.com/ginew/archive/2006/04/13/40850.html#Feedback 3 http://www.aygfsteel.com/ginew/comments/commentRss/40850.html http://www.aygfsteel.com/ginew/services/trackbacks/40850.html 以前如果要iframe里面的脚本能讉Kparent的内容,但iframe和parent的二U域名相同,那一般都会在两者都写上document.domain="xxx.com" 以放宽访问权限?br /> 今天发现Q如果iframe和parent在同一个三U域名下Q比如都是aa.bb.comQ那设了document.domain反而会造成讉K拒绝?br /> 查了下MSDNQ有如下解释Q?br />
Remarks
The property initially returns the host name of the server from which the page is served. The property can be assigned the domain suffix to allow sharing of pages across frames. For example, a page in one frame from home.microsoft.com and a page from www.microsoft.com initially would not be able to communicate with each other. However, by setting the domain property of both pages to the suffix "microsoft.com", you ensure that both pages are considered secure and access is available between the pages.
When you set the domain property, use the domain name determined by the server rather than by the client browser.
All the pages on different hosts must have the domain property explicitly set to the same value to communicate successfully with each other. For example, the value of the domain property of a page on the host microsoft.com would be "microsoft.com" by default. It might seem logical that if you set the domain property of a page on another host named msdn.microsoft.com to "microsoft.com," that the two pages could communicate with each other. However, this is not the case unless you have also explicitly set the domain property of the page on microsoft.com to "microsoft.com".
Furthermore, this property cannot be used to allow cross-frame communication among frames with different domain suffixes. For example, a page in one frame from www.microsoft.com and a page in another frame from www.msn.com would not be able to communicate with each other even if the domain property of both pages was set to the suffix "microsoft.com".
Security Alert Using this property incorrectly can compromise the security of your Web site. Set the
domain property only if you must allow cross-domain scripting. Use a value determined on the server. Setting this property to a value determined on the client (like through the
location object) could expose your site to attack from another site through Domain Name System (DNS) manipulation. For more information, see
Security Considerations: Dynamic HTML .
For more information on domain security, see About Cross-Frame Scripting and Security .
]]> 域名和COOKIE的问?/title> http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html无风之雨 无风之雨 Tue, 11 Apr 2006 09:54:00 GMT http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html http://www.aygfsteel.com/ginew/comments/40505.html http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html#Feedback 0 http://www.aygfsteel.com/ginew/comments/commentRss/40505.html http://www.aygfsteel.com/ginew/services/trackbacks/40505.html ]]> 我认为最好的MYSQL备䆾方式 http://www.aygfsteel.com/ginew/archive/2006/04/11/40439.html无风之雨 无风之雨 Tue, 11 Apr 2006 04:47:00 GMT http://www.aygfsteel.com/ginew/archive/2006/04/11/40439.html http://www.aygfsteel.com/ginew/comments/40439.html http://www.aygfsteel.com/ginew/archive/2006/04/11/40439.html#Feedback 0 http://www.aygfsteel.com/ginew/comments/commentRss/40439.html http://www.aygfsteel.com/ginew/services/trackbacks/40439.html 我主张,另外找一台比较空闲的机器Q来做数据库的备份。这台机器作以下用途: 它是L据库带的slave数据库群里面的一収ͼ每天凌晨定时启动同步数据Q等q上bin-logq全部执行后Q停止同步,q用select * into outfile数据全部导出成文gQƈ且在每周的某一天,清除掉主数据库上已经同步好的bin-logQ以保盘I间不被log占满?br /> 为此Q我写了3个脚本,分别执行1、启动mysqlQ追logQ然后停止slaveQ?、导出全部数据库全部文g到文Ӟ3、删除主数据库的log --------------------------------------------------------------------------------------- #!/bin/bash #readMasterMysql.sh CHECK_MYSQL=0 /home/mysql/bin/mysqld_safe & until [ "$CHECK_MYSQL" = "1" ] do sleep 10 CHECK_MYSQL=`/home/mysql/bin/mysql -uroot -e"show slave status"|awk '{if($14==$21)print "1"}'|tail -n1` done /home/mysql/bin/mysql -uroot -e"slave stop" /home/script/backupMysql.sh /home/mysql/bin/mysqladmin shutdown WEEK=`date "+%w"` if [ $WEEK = "5" ] then /home/script/purgeLog.sh fi ------------------------------------------------------------------------------ #!/bin/bash #purgeLog.sh LOG_FILE=/home/mysql/data/master.info DB_SERVER=`sed -n '4p' $LOG_FILE` DB_USER=`sed -n '5p' $LOG_FILE` DB_PASS=`sed -n '6p' $LOG_FILE` DB_LOGFILE=`sed -n '2p' $LOG_FILE` /home/mysql/bin/mysql -h$DB_SERVER -u$DB_USER -p"$DB_PASS" -e"purge master logs to '$DB_LOGFILE'" ------------------------------------------------------------------------------ #!/bin/bash #backupMysql.sh database=$1 table=$2 MYSQL_CLIENT="/home/mysql/bin/mysql -uroot --default-character-set=gbk" MYSQL_DUMP="/home/mysql/bin/mysqldump -d -uroot --default-character-set=gbk" OUTPUT_PATH=/date/backup for databases in `$MYSQL_CLIENT -e "show databases"|grep -v Database` do if [ "$#" = "0" -o "$database" = "$databases" ] ; then mkdir -p -m777 $OUTPUT_PATH/$databases/ $MYSQL_DUMP $databases > $OUTPUT_PATH/$databases/$databases.sql for tables in `$MYSQL_CLIENT -e "show tables" $databases|grep -v Tables_in_` do if [ "$#" = "0" -o "$#" = "1" -o "$table" = "$tables" ] ; then mv -f $OUTPUT_PATH/$databases/$tables $OUTPUT_PATH/$databases/$tables.old $MYSQL_CLIENT -e "select * into outfile '$OUTPUT_PATH/$databases/$tables' from $tables" $databases fi done fi done ]]> 如何让referer和user-agent同时为空时记录日?/title> http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html无风之雨 无风之雨 Tue, 11 Apr 2006 04:25:00 GMT http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html http://www.aygfsteel.com/ginew/comments/40434.html http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html#Feedback 0 http://www.aygfsteel.com/ginew/comments/commentRss/40434.html http://www.aygfsteel.com/ginew/services/trackbacks/40434.html SetEnv log_flag=1 SetEnvIf Referer !"^$" log_flag=0 SetEnvIf user-agent !"^$" log_flag=0 ... 看字面上Q就是如果用两个非的或来代替?br />q样Q只要两个条件有一个不满Q就log_flag׃变掉Q只要它变掉了,p明不W合我屏蔽的规则?br />高手是高手Qؓ什么非要苛求一定要有“与”呢Q两个“非”的“或”,不一栯到要求? 学习了?br /> ]]> oracle到mysql的迁U,函数部分 http://www.aygfsteel.com/ginew/archive/2006/04/11/40429.html无风之雨 无风之雨 Tue, 11 Apr 2006 04:16:00 GMT http://www.aygfsteel.com/ginew/archive/2006/04/11/40429.html http://www.aygfsteel.com/ginew/comments/40429.html http://www.aygfsteel.com/ginew/archive/2006/04/11/40429.html#Feedback 0 http://www.aygfsteel.com/ginew/comments/commentRss/40429.html http://www.aygfsteel.com/ginew/services/trackbacks/40429.html to_date(?, 'YYYY-MM-DD HH24:MI:SS')" STR_TO_DATE('2003-15-10 00:00:00','%Y-%m-%d %H:%i:%s'); //格式不对Q会q回NULL
to_char(create_time,'yyyy-MM-dd') DATE_FORMAT(create_time,'%Y-%m-%d')
sysdate now()或者CURRENT_TIMESTAMP //'1997-12-15 23:50:26',的时候,timestampcd可以指定default CURRENT_TIMESTAMP
sysdate - 7 //7天前 now()-INTERVAL 7 DAY
select * from (select .... where rownum<end) where rownum>start limit [start,] length
substr(productInfor,1,20) SUBSTRING('Quadratically',5,6) //SUBSTRING(str,pos,len)
instr(str,substr,pos,index) instr(str,substr) 或?locate(substr,str,pos) // 没有相对应的语法Q但一般情况,q个是和substrl合h用的?br />//如果是str="2005-10-01"取中间的10q样的需要,oracle是substr(str,instr(str,'-',1,1)+1,instr(str,'-',1,2)-instr(str,'-',1,1)-1) 那在mysql里面Q可以试试这样SUBSTRING_INDEX(SUBSTRING_INDEX(str,'-',2),'-',-1),意思就是取W二?之前的str后(2005-10Q,再取倒数W一?之后的内?/p>
oracle的nvlQss,ddQ函数在mysql中怎么实现Q? {:ifnull(ss,dd)
]]>
վ֩ģ壺
|
ٹ |
|
̩ |
|
|
ߴ |
մ |
|
|
Զ |
|
ǭ |
|
|
ʯ¥ |
ǹ |
ڽ |
ﴨ |
Ϸ |
ƽ |
Զ |
Դ |
ʡ |
|
|
|
ũ |
|
|
|
|
٤ʦ |
ٷ |
|
|
ᶫ |
ɳƺ |
|
|
» |