Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7577724 建立时间:2006年5月29日 |

| |
[TurboGears]Testing Multi-user TurboGears Applications 软件技术
lhwork 发表于 2007/2/16 12:06:49 |
Lately I’ve started to write many unit
tests for my secret turbogears project. My secret project, like many
other web 2.0 applications, can have a lot of users logged in at the
same time and the actions of one user can affect other users.
The current testing tools provided by TurboGears do not give “one
obvious way” to test multi-user scenarios. I came up last week with a
simple class that will emulate a browser session of a single user
against a cherry |
|
[TurboGears]How To Make IE Cache Less 软件技术
lhwork 发表于 2007/2/16 12:06:17 |
Internet Explorer is known to cache the
responses of GET calls. The problem occurs if your javascript functions
request the same url over and over again. Internet Explorer will cache
the response of the first call, and subsequent calls will automatically
return the same response, without actually contacting the server. There
are two approaches to solve this problem.
One approach could be to add a random part to the url (i.e.: /poll?random=f2dee8 |
|
[TurboGears]Tutorial: How To Implement Tagging With TurboGears and SQLAlchemy 软件技术
lhwork 发表于 2007/2/16 12:05:20 |
In this tutorial I’ll show you how to create a simple, yet powerful,
tagging system using SQLAlchemy with TurboGears. As the concept of
tags, and social tagging in particular, have become very popular,
clients now demand “tagging-enabled” applications. So, here’s a simple
way to get you started.
Our application will associate sites with tags (many to many
relationship), like delicious does, but in a much simplified manner.
For instance, delicious keeps tracks of which user gave |
|
[TurboGears]Filters 0.1 Released 软件技术
lhwork 发表于 2007/2/16 12:04:11 |
Filters is a Python package that provides shell-like data processing operators for generation of web content. Filters is designed to work together with a template-engine like Kid and Genshi.
What is a filter?
We’ll start with an example.
${ identity.is_anonymous() | tg.yesno() }
The output of this will be the value returned by is_anonymous() after being processed by th |
|
[TurboGears]Pumping Up Your Applications with Xapian Full-Text Search  软件技术
lhwork 发表于 2007/2/16 12:02:23 |
What good is an application—not matter how much information it contains—if the inability to easily search it renders it useless?
Xapian to the Rescue
Xapian is an excellent open
source (GPL) search engine library. It is written in C++ and comes with
bindings for Python as well as many other languages, and it supports
everything you’d expect from a modern search engine:
Ranked probabilistic search – The res |
|
[网站架构]建立一个带宽、线程可控的下载型WEB网 软件技术
lhwork 发表于 2007/2/11 19:55:53 |
一、前言
本人结合网上资料和个人的实践,利用一个下午的时间写出了这个适用于资源下载型网站的典型配置。这种配置的WEB网站初步实现了IP线程和线程流量的管
理,同时proftpd用于上传资源,ssh用于主机管理。无疑这样可以自己支配宝贵的网络带宽,文章后面有个简单的防火墙配置仅供参考,我用的
linux版本是redhat as 3.0。希望大家在看了这篇文章后多多和我交流, MAIL:LLZQQ@126.COM
二、软件版本
apache-1.3.29
mysql-4.0.16
php-4.3.4
proftpd-1.2.9
mo |
|
[网络与系统管理]使用mod_cband管理Apache 2带宽和流量 软件技术
lhwork 发表于 2007/2/11 19:54:32 |
mod_cband
是一个通过Apache 2模块来解决限制用户和虚拟主机带宽问题的应用,当前版本可以调整虚拟主机和用户带宽限额,最高下载速度(like in
mod_bandwidth),每秒访问请求速度和最高并发访问ip连接数(like in mod_limitipconn)。
"我告诉主机服务提供商使用mod_cband,想要限制他们用户数据传输,像“每月10
Gb流量”这样。但已有了mod_curb模块,可以限制流量,但无法工作在虚拟主机和Apache
2下,所以我写了自己的模块完全适合于Apache 2 API同时支持每用户和每虚拟主机带宽限制。"(此段翻译自官方网站)
FreeBSD |
|
[网络与系统管理]20种让你的Apache更安全的设置(翻译) 软件技术
lhwork 发表于 2007/2/11 19:53:33 |
原文来自: http://www.petefreitag.com/item/505.cfm
一. 确定你安装了最新的安全补丁.先把本文del.icio.us了,然后再回来看其他的。
二. 隐藏Apache的版本号,以及其他一些信息apache的默认设置公开了apache的版本号,操作系统,甚至还有已经安装了的apache组件。黑客们会利用这些信息更方便的去攻击你。并且,这些信息告诉了所有人:你的apache并没有经过配置
你可以在httpd.conf文件中,加上或者修改两条代码,隐藏信息。
ServerSignature Off
ServerTokens Prod
ServerSignature ap |
|
[Apache(jakarta)]Apache的ReWrite的应用 [超强] 软件技术
lhwork 发表于 2007/2/11 19:51:40 |
Apache的mod_rewrite是提供了强大URL操作的杀手级的模块,可以实现几乎所有你梦想的URL操作类型,其代价是你必须接受其复杂性,因
为mod_rewrite的主要障碍就是初学者不容易理解和运用,即使是Apache专家有时也会发掘出mod_rewrite的新用途。
换句话说:对mod_rewrite,或者是打退堂鼓永不再用,或者是喜欢它并一生受用。
ReWrite可以应用在以下方面或者解决以下问题:
URL的规划
规范的URL
说明:
在有些网站服务器上,一个资源会拥有多个URL,在实际应用和发布中应该被使用的是规范的URL,其他的则是简写或者是内部使用的。无论用户在请求中使用什么形式的URL,他最终看见的都应该是规范的URL。
方案:
对所有的不规范的URL执行一个外部的HTTP重定向,以改变它在浏览器地址栏中的显示及其后继的请求。下例中的规则集用规范的/u/user替换/~user,并修正了/u/user所遗漏的后缀的斜杠。
|
|
|