显示标签为“job_kz”的博文。显示所有博文
显示标签为“job_kz”的博文。显示所有博文

2007-04-11

Firefox扩展:LiveHttpHeaders

Firefox数目众多,功能丰富的扩展真好。今天测试联邦档案馆会议记录的搜索功能时多亏有了LiveHttpheaders才发现我的问题在于提交request时,header里没有包括jessionid这个变量,所以搜索的结果分页问题不能解决。

另外在Tomcat的邮件列表中名为Christ写了一段很好的关于在搜索中使用jsessionid的问题:
> Is there anyway to create JSessionIDs per window rather than per browser?
> I am having the problem of when you open multiple tabs within
> a browser, and enter two simultaneous queries, the results returned are
> corrupted. Any suggestions? Thanks for the help.

I have an application that allows the user to perform searches and paginate through the results. Since the search really only needs to be performed once, pagination can be as simple as picking a segment of the results (stored in the session) and displayed on the screen.

I store the query that was performed as well as a "token" which is generated when the query is created. I place this token in all of the URLs on the page (most importantly, the ones involved with pagination).
If a request comes into the server including a token, I check the token against what I have in the session. If the tokens match, I skip the search. If they do not match, I re-run the search and re-set the token. Rinse, repeat.

In your case, you might want multiple simultaneous paginating queries, though I'm not exactly sure why. You could adopt a similar approach using a List of queries (using the same session key, I would imagine),
each with separate tokens for the windows.

The only problem with an implementation like this is that it is very hard to decide when you are "finished" with a query, and that it's okay to purge it from the session. That is left as an exercise for the reader
;)

Hope that helps,
-chris

2007-01-10

修改Webalizer的默认配置文件

在urts52上使用webalizer分析zope服务器日志时,发现生成的HTML页面是用utf-8编码的,而apche 2服务器配置文件中设置了默认编码为iso-latin1。我不是管理员,无法更改httpd.conf,只好自己从webalizer上想办法了。在webalizer的默认配置文件基础上添加了以下语句:

HTMLExtension php

生成的页面为PHP页面,不再是默认的HTML页面。

HTMLPre <?php header('Content-Type: text/html; charset=utf-8');?>

这样生成的PHP网页代码中第一行都包括这行内容,强制浏览器使用utf-8编码。

HTMLHead <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

在HTML页面的head部分添加编码设置,表明网页是用utf-8编码的。

2006-08-03

分析fud server的日志文件

Giesla想要一些关于fud server的统计数据,因此得简单处理fud server的日志文件。平时也就用用vi,grep之类的小工具,或者使用现成的工具。现在这个server log的格式不是标准格式,只好自己动手了。从简单的学习sed开始吧。

2006-07-31

Zope export outside zope/使用wget来导出zope文件

以前每次导出zope的某个文件夹都要进入到ZMI的web interface里,一直希望能有脚本在命令行下完成。今天在网上找到一个脚本,可以实现在命令行下导出的功能。

使用wget来导出:
wget -O 3urts96.zexp http://username:password@urts96.uni-trier.de:8080/Projects/2urts96/manage_exportObject?download%3Aint=1&submit=Export'

Code:

2006-06-16

Cocoon的sitemap引擎

Cocoon有两种不同的sitemap引擎,一种是编译(compiled)过的,另外一种是解释型(interpreted)的。两个都在Cocoon的配置文件$CATALINA_HOME/webapps/cocoon/cocoon.xconf里被定义,其中编译过的版本是cocoon默认的sitemap engine(check-reload和reload-method的值都为yes)。Cocoon监视sitemaps,当发现sitemaps发生变化时,Cocoon会重新加载配置文件。当Cocoon重新载入sitemap时,可以以同步或异步两种不同的方式来工作。

2006-05-31

Install cocoon 2.1.9 on apache-tomcat-5.5.17

Tomcat 5.5.17 已经事先安装在/opt/tomcat目录下。

下载cocoon的源文件cocoon-2.1.9-src.tar.gz,下载地址为:
http://mirrorspace.org/apache/cocoon/cocoon-2.1.9-src.tar.gz

解开该文件并进入cocoon-2.1.9目录执行build.sh,在cocoon-2.1.9目录下会生成一个build目录。Build目录包含cocoon和webapp两个目录。

关掉tomcat server,执行命令/opt/tomcat/bin/catalina.sh stop 。

2006-05-23

恢复windows 2000管理员密码

今天下午把germa58这台电脑从DM 330楼移到了A 423。由于这台电脑很久没人用了,想使用SUS更新一下,可是不知道管理员密码。用香山红叶版本的windows PE启动后用ERD 2003想重置管理员密码,结果程序报告无法打开密码数据库文件,只好用其他的办法。一个简单的办法是删掉%Windir%\System32\Config\文件夹下的Sam文件,然后重新启动计算机。这样就可以Administrator身份登录系统,此时密码为空。


Windows NT/2000/XP中对用户账户的安全管理使用了安全账号管理器(Security AccountManager,SAM)的机制,安全账号管理器对账号的管理是通过安全标识进行的,安全标识在账号创建时就同时创建,一旦账号被删除,安全标识也同时被删除。安全标识是惟一的,即使是相同的用户名,在每次创建时获得的安全标识都是完全不同的。因此,一旦某个账号被删除,它的安全标识就不再存在了,即使用相同的用户名重建账号,也会被赋予不同的安全标识,不会保留原未的权限。


安全账号管理器的具体表现就是%SystemRoot%\system32\config\sam文件。SAM文件是WindowsNT/2000/XP的用户账户数据库,所有用户的登录名及口令等相关信息部会保存在这个文件中。

2006-05-12

解决在bibliography folder下导入bibtext的错误

今天在Plone环境下想在bibliography folder下导入bibtext文件,可是在点击导入时总得到错误:



Es ist ein Fehler aufgetreten. Die Fehlermeldung lautet:
Fehlertyp
RuntimeError
Fehlerwert
CMFBibliographyAT/skins/bibliography/getImportReports.py has errors.

在goole上查到有人提交的这个Bug,原来是因为skin目录下有些python文件是在windows下编写的,导致换行符号与在unix下的不一样而造成了这个错误。要修改的文件包括:getImportReports.py 和 getLastImportReport.py。


cat getLastImportReport.py | col -b > getLastImportReport.py
或者
dos2unix getLastImportReport.py > getLastImportReport.py, 只是如果没有dos2unix这个小程序还得先安装一下。

2006-05-05

使用CMFBibliographyAT

也许是使用CMFBibliographyAT的人太少了,它的文档实在是太差了,没有FAQ,也没有Howto。出错之后在google上查找相关的结果都很少。看着让人摸不着头脑的出错提示根本不知如何下手,只好一个人来回反复试。费了一个多小时终于有点眉目,如何使用。
先建立一个CMF site或者Plone site,然后在CMF/Plone site里添加一个CMFBiblographyAT content,然后选择“LargeBibliographyFolder“,添加完BibliographyFolder后才可以在里面添加其他类型的CMFBiblographyAT content。此前不知道,所以一上来就添加“BookReference“,结果总是得到出错提示:
Unauthorized: You are not allowed to access 'aq_explicit' in this context。
相信这句话会让Plone的新手借助google找到这儿:)

2006-05-04

zMySQL DA连接字符串的格式

KZ使用zope web server,使用zMySQL Data Adapter建立与数据库的连接。以前总搞不清  Connection String的格式。这次把urts52的项目都导出到urts96上,数据库连接的字符串得改写,终于搞清楚了。
database[@host[:port]] [user [password [unix_socket]]
例如:
databasename@host username password

这个格式个人认为有点怪,用空格来分隔主机名,用户名和密码。

2006-05-02

安装CMFBibliography

Thomas要在zope上使用CMFBibliography让我安装。按照产品文档说明在确保安装了组件ArcheTypes的情况下把文件复制到zope的Products目录下,并重启zope server。可是CMFBibliography却没有出现在Products列表中。察看event.log发现缺少一个名为“ATExtensions”的模块,安装该模块后,CMFBibliography就自动安装了。

2006-02-04

一个轮循日志的工具

cronolog is a simple filter program that reads log file entries from standard input and writes each entry to the output file
specified by a filename template and the current date and time. When the expanded filename changes, the current file is closed and a new one opened.

cronolog is intended to be used in conjunction with a Web server, such as Apache, to split the access log into daily or monthly logs. For example the Apache configuration directives:

2006-01-25

Löschen der servergespeichterten Benutzerpofile beim Abmelden des Benutzers an der Arbeitstation

应用组策略解决当域用户注销时删除用户在本地的profile文件。
执行gpedit.msc
在win xp pro上按下列顺序找到Delete cached copies of roaming profiles选项,激活:
computerconfiguration -> Administrative Vorlagen -> System -> User Profiles ->Delete cached copies of roaming profiles

在windows 2000上位置有所不同:
computerkonfiguration -> Administrative Vorlagen -> System -> Anmeldung -> zwischengespeicherte Kopien von servergespeicherten Profile löschen

2005-09-29

为FuD设置CVS服务器

以前在nu01上为FuD设置了CVS服务器,后来因为硬盘坏了,便没有再设置而把这事搁置一边了。今天抽空在germa93这台机器上设置了个CVS服务器。原本想省事安个rpm包,可惜cvs的rpm包还要求好多perl的包。安装完Active的perl的rpm,还是报告缺很多模块,后来干脆从cvs的源代码编译安装了。

2005-09-01

升级机房DM 330的杀毒软件

今天下午抽空把DM 330里6台电脑的杀毒软件全部升级到McAfee 8.0。在其中一台安装时总是得到错误,说McAfee的Framwork的服务不能启动。网上查了一下,暂时没有找到解决问题的办法,等我考完试再去处理它。

2005-08-24

服务器与客户端时间不同步

今天帮Marco的电脑(windows 2000)以本地管理员的身份设置了一下打印机。设置完毕推出后当,Marco以域用户的身份再次登陆时却得到错误:Es gibt Zeitunterschied zwischen Server und Client. Sie können Sich nicht anmelden.
重新启动电脑后再次登陆还是同样的出错提示。

2005-08-11

继续处理打印问题

今天在物理连接的打印机上测试发现,连续打印并不会让程序失去响应。可是如果打印到虚拟的打印机上,程序还是会常常失去响应。另外把程序发给Tamara测试,发现不能打印。我和Qi Jin折腾半天才发现是由于windows下的command在转换目录时当前目录并不会随之切换:
C:\Documents and Settings\jia>;cd D:\Downloads

C:\Documents and Settings\jia>
就是这样一个很小而不起眼的问题费了两个小时的时间。MS在这点上跟linux相比实在太差了。

2005-08-10

打印功能存在的问题

我们实现的打印功能存在一个问题,第一次打印时正常,可是当第二次打印时,程序总是失去相应。查看windows的日志报告,发现问题与netevent.dll有关,总是得到System级别的错误:

Ein Treiberpaket, das vom E/A-Teilsystem empfangen wurde, war ungültig. Die Daten sind das Paket.
Ereigniskennung: 6004


查看微软的知识库,发现了这篇文章提到引起该问题多是因为网卡的MAC地址中存在非法字符,并且涉及到的操作系统为windows NT系列,windows XP根本不在列。看来我们这个问题毫不相干。

2005-07-20

change password

记得以前为Linux用户帐户和Samba用户帐户同步的问题曾在论坛问过,没有得到有效的解决办法,后来在sourceforge找到changepassword这个小程序可以实现两个账户同步。试用后很方便,只是要注意安全性使用加密的传输。

Requirements

To use changepassword you will need to have: