- Yapache-Yahoo! Apache 的秘密
前一段时间, Yahoo! 架构软件组的技术经理 Michael J. Radwin 在 OSCON 2006 上作了一个题目为 Hacking Apache HTTP Server at Yahoo! 的报告,透露了很多关于 Yahoo! Apache 的技术信息。 - 聚焦Erlang
- [wapsso]无cookie session的实现[1]
PHP内置了一个功能,可以强制PHP通过url传递sid。 - 搜搜工具栏引发的问题——安装QQ时请小心
基于搜搜地址栏已经提供了卸载程序,再说它是流氓软件似乎有些理不直气不壮。但是从它的行为来看,又的确流氓气。 - 黄健翔说唱金属版
- 骑车应该戴头盔还是……
这个故事告诉我们, 以后要买个假发带上骑单车, 这样会比头盔有用得多…… - 一只MM玉手引发的BT……[图]
- Why the american media sucks
只要存在代表某方面利益的政权,就一定就存在代表某方面政权的传媒;即便号称自由国度的美利坚也是如此。 - UpdateProgress控件和AJAX活动图像动画
标签 ( Tags ) : apache
之前总结了下如何用 css 来实现 table 的 border + bordercolordark + bordercolorlight 的边框明暗效果,然后有网友问我为什么他写了一个类似的 css 样式,但只能在 Opera 下正常看到表格的边框效果, IE 下则什么也没有。
于是我跑去下了个 Opera9 一看,确实如此。原因倒也不复杂:因为在 IE 下( Firefox 似乎和 IE 一致)如果某个 td 的内容为空的话,即便你设置了高度和宽度,这个 cell 的边框样式也是不会被显示出来的; Opera 则不管是否有内容与否,一概应用样式来渲染。这个问题刚毕业那会就碰到了,当时部门的科长来问我,后来我跟他说:给每个空的 td 加上 就行了。以后每次碰到这个问题,我就统统采用这个简单粗暴有效的方式来解决了。
但今天卯足了劲研究了几下,从 Jiarry 那知道原来 css 语法是允许我们对这些缺省行为进行改变的:使用 border-collapse:collapse; 和 empty-cells:show; 就可以让消失的边框显现出来。
class="test1": 加 border-collapse:collapse;
.test1{
border:1px solid #999999;
border-collapse:collapse;
width:60%
}
.test1 td{
border-bottom:1px solid #999999;
height:28px;
padding-left:6px;
}
| class1 | 这儿有内容 | |||
| 这儿有内容 |
class="test2": 加 border-collapse:collapse; 和 empty-cells:show;
.test2{
border:1px solid black;
border-collapse:collapse;
width:60%
}
.test2 td{
border-bottom:1px solid black;
height:28px;
padding-left:6px;
empty-cells:show;
}
| class2 | 这儿有内容 | |||
| 这儿有内容 |
class="test3": 不加 border-collapse:collapse; 和 empty-cells:show; 的情况下
.test3{
border:1px solid #999999;
width:60%
}
.test3 td{
border-bottom:1px solid #999999;
height:28px;
padding-left:6px;
}
| class3 | 这儿有内容 | |||
| 这儿有内容 |
实践再次证明“永远不要轻易去升级系统”这句至理名言的正确性。然而原有系统的不稳定使得我们不得不尝试如此做。
继几个还算可以能够接受的升级后遗症之后,又发现一个用 c 写的服务程序出了异常。这个接受客户端连接请求的服务程序理论上来说 fork 出来的处理子进程不会超过个位数;但现在跑了一段时间后 fork 出来的进程会突然线性增加,直到资源耗尽。
本来以为是恶意程序在攻击端口,但查看日志并没有发现任何异常的ip连入。在找不到问题的情况下,只好在服务器上把源代码重新编译连接了一次,结果这个疯狂的 fork 居然就消失了!
虽然在这里很多人对于 “Each version of the kernel requires applications to be compiled specifically for it” 的说话嗤之以鼻,但我现在好像就碰到了类似的现象。谁来告诉我这是为什么?
- Introducing HInclude
HInclude makes one thing very easy; including other bits of HTML into your Web page, using the browser. - Reflection.js
allows you to add reflections to images on your webpages. It uses unobtrusive javascript to keep your code clean.
标签 ( Tags ) : javascript
最近重装服务器,顺便把系统换成了 CentOS 4.3 。结果发现终端登录的时候如果想 su 到 root 用户的时候会出现一段要求用户交互的文字:
$ su -
Password:
Your default context is root:system_r:unconfined_t.
Do you want to choose a different one? [n]
这是因为安装的时候启用了 SELinux ;而 CentOS 新版本对于 su 的处理除了要求输入 root 的密码之外,还要求确认 SELinux 的上下文信息。这句确认信息虽然基本上可以直接按回车忽略过去,但对于一些需要 su 的自动脚本来说就是不必要的麻烦了。
解决方法是修改 /etc/pam.d/su 文件,把其中的
session required /lib/security/$ISA/pam_selinux.so open multiple
这行改成
session required /lib/security/$ISA/pam_selinux.so open
也就是去掉 multiple 选项即可。当然如果觉得完全不需要 SELinux 提供的内核保护的话,也可以修改 /etc/selinux/config 配置文件,把 SELLINUX 参数改为:
SELINUX=disabled
该配置文件将被 init 读取,当你重启系统之后使用 getenforce 命令查看 SELinux 的状态应该就可以看到已经是 disabled 了。据说也可以把 SELINUXTYPE 参数改为 SELINUXTYPE=strict 来解决。
这个问题似乎在 CentOS 4 / RHEL4 的某些版本上都存在。之前用的老版系统则不需要修改任何配置。
附: Introducing SELinux , rhel4-tut , Think before deploying Security-Enhanced Linux in RHEL 4
PROPFIND Request Failed - Error 405 HTTP Method Not Allowed
This message comes in different flavours. You might be seeing this error when:
- PROPFIND Request Failed
You tried to browse the parent path of a repository instead of the repository itself using an older version of TortoiseSVN. Try appending the name of the repository you wish to access, or upgrade TortoiseSVN to 1.2.3 or newer. - PROPFIND Request Failed
You forgot to append a '/' slash to the end of the URL you entered. Older versions of TSVN requires that there be a '/' after the repository name. If you forget this, TSVN will strip the repository name from the URL and therefore try to access the parent directory. - Lock Request Failed
You tried to lock a file in your working copy which no longer exists in the repository. Update your working copy before trying to lock files.
For more information about what actually caused the error, seek out the Apache error log.
这是 TortoiseSVN 对于 PROPFIND Request Failed 错误的说明。 实际上,除了上面提到的几个与 TortoiseSVN 版本有关的原因之外,也可能是你根本就敲错了 repository 所在的路径。理论上来说返回的错误码如果是 404 Not Found 更容易让人理解一些,但确实就是返回 405 的错误。一个小小的键盘键入错误也许就会让你误以为是 svn 的服务器出了什么问题。。
标签 ( Tags ) : javascript,浮动层,源代码
标签 ( Tags ) : javascript,系统优化
