Profil雅客居PhotosBlogListes Outils Aide

Blog


3 décembre

Google 快讯 - allinurl:password user site:ebscohost.com

EBSCO Publishing Service Selection Page
EBSCOhost Support & Training. CHELTENHAM HIGH SCHOOL. EBSCOhost Web. NoveList Readers Advisory. History Reference Center EBSCOhost Espanol Professional Development Collection. Novelist K-8. EBSCOhost Text Only ...



26 novembre

洋洋的第一篇日记

洋洋咳嗽,不能出去玩 咳嗽很厉害,可是妈妈不知到哪里去了。 等了妈妈很久,都不回来。 只有爸爸陪我在电脑里写字。 爸爸说给我在电脑里玩两分钟,可是爸爸说给我玩两分钟爸爸说话都不算数。

洋洋的第一篇日记

洋洋咳嗽,不能出去玩 咳嗽很厉害,可是妈妈不知到哪里去了。 等了妈妈很久,都不回来。 只有爸爸陪我在电脑里写字。 爸爸说给我在电脑里玩两分钟,可是爸爸说给我玩两分钟爸爸说话都不算数。

ajax 实在强大。

原来XMLHttpRequest还可以发送header,也就是说可以发送cookie。 酷呆了。 今天练习一下ajax.
16 novembre

prolog学习笔记

超星阅读终于搞定.可以开心看书了. 搞定一堆资源放在那里,还不如不搞,可以省下好多时间用于别的事情. 还不清楚检索到底是一件好事还是坏事,但是在特定的时间和特定的环境,检索有关的思想,方法,技巧还是可以解决很多问题的.手里拿着枪在好多时候是必需的. 连搜索google也受到了诸多的限制,在一个虚拟的世界中尚且如此艰难,何况在现实生活中. 所不相同的是,虚拟世界中就技术而言,还是比较公平的.只要你有足够的技术,可以突破很多限制. 我希望的是,自己决定什么信息是对的,什么是错的,而不是由别人挑拣信息然后决定什么是我该看到的,什么是我不该看到的.以后的方向应该是越来越开放. 网友b13指出超星涉嫌非法使用GPL代码, zhangchn提供了更简单的证据.回想起dancefire分析麒麟涉嫌抄袭FreeBSD,上海交大陈进的汉芯造假,现在的方舟3号搁浅,再看看现在cnki上面的期刊,有多少是有价值的呢? 也不发牢骚了,先学习一下prolog语言. 虽然感觉lisp可能更好,但是prolog也不错. 感觉perl+prolog还是不错的应用.
10 novembre

dynamed

http://dynamed101.epnet.com/AlphaBrowse.aspx?Letter=A DynaMed is a medical information database with nearly 2,000 clinical topic summaries. Designed for use at the point-of-care, providing best available evidence and updated daily. 确实好东西。 放一个连接在这里。 http://search.ebscohost.com/Community.aspx?lp=login.asp&ref=&authtype=ip&ug=7E36393631563D563E52322330&return=y

javascript

javascript 语言在浏览器中就可以运行,有它的强大之处。 也是应该好好学习。

powered by performancing firefox

28 octobre

数据库的充分利用

基本上,该有的数据库全有了。 也不必再追求太过。需要充分利用数据库。 医学应该没有问题。pubmed,emabase,然后链接到全文。有电子版本的,数据库获取。没有的,图书馆传递服务。 其他的比如我最常用的计算机技术方便的,看了一下,proquest,firstsearch里面有不少东西。 不知道还有什么其他数据库更好一些。 需要看看外文报纸,还是选择proquest。基本上报纸是同步的。 没有时间看很多内容的,只是养成阅读的习惯罢了。 实际上如果可以,还是看google新闻方便。 cnki支持firefox了。search.cnki.net使用起来蛮好的,极好的工具。 超星图书馆真得很好。太多太多书了。读书人的最爱。 当然,外文好,或者搞顶尖技术,netlibrary也不错。 看外文文章还不够快速,还需要加强。

powered by performancing firefox

stardict.org 网站分析

访问stardict界面,使用起来实在很酷。 网络上的介绍: 现在StarDict推出了在线词典StarDict.org,继承了原软件的所有特色,包括词典 主界面是仿Google的,不过Ajax查词界面就十分强大了,几乎和软件一样了 更是省去了你的硬盘空间,还支持选中直接显示解释。 界面是英文的,完全可以hack一下。 先看看源代码 script language="javascript" type="text/javascript" src="js/x_core.js"> wget -m http://www.stardict.org/ 到本地来仔细研究研究 首先是ajax.js function createXMLHttpRequest() { var xmlHttp = false; if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } return xmlHttp; } 不错,使得创建xmlhttp兼容了ie和firefox.

powered by performancing firefox

13 octobre

Hacking PDF & Javascript for fun and profit

Hacking PDF & Javascript for fun and profit
A
LEXANDER
K
LINK
alech@pdftracker.de
http://www.pdftracker.de
01.09.2005
Introduction
Using Javascript embedded in PDFs and recent Adobe products, HTTP requests can be
sent without user interaction. This is not actually breaking news, but has been known
for quite a while. There are even some commercial companies that use these “features”
to provide PDF tracking services. After some research, I found out that PDF tracking is
not that complicated and tried to implement it. Thus, www.pdftracker.de was born, a
site that enables users to embed Javascript code into their documents and track them
using a web interface.
If you are interested to see that it works and what is possible, please visit pdftracker.de
and see for yourself. As an example you can see who has viewed this document at
http://www.pdftracker.de/cgi/view.cgi?documentid=pdftracking. In the following sec-
tion, I will present some of the more technical implementation details. I assume that the
reader has some knowledge of HTTP, CGI and Javascript.
Implementation
Starting the Javascript code
So you might have guessed that Javascript is mostly used with PDF forms. There, calcu-
lations can be made, data can be checked or animations can be played. But then there
is always a trigger, like clicking on a button or entering a form field. So how do you
start some Javascript code when opening the document? Luckily, there is a way to start
a Javascript function without user interaction. Since quite a while, there are so-called
additional-actions dictionaries defined in the PDF standard for various PDF objects, such
as annotations, pages, forms or even for the entire document. These allow the PDF
1
writer to specify actions that are taken when an event occurs. For the document, one
can define triggers for document opening, closing, printing, saving, etc. On a page level,
one can define triggers for opening and closing. This is how pdftracker does it at the
moment: once the first page is opened, a Javascript function is called that does all the
work. Adding a trigger for document printing or opening would be interesting as well,
but this seems to be more difficult to achieve using pdfL
A
T
E
X.
Sending off the data, one by one
Javascript can be used to submit PDF forms, even if none are embedded in the document.
The Javascript function this.submitform() is your friend. Called with a URL, it sends
a POST request to the server with the form data (in our case, none at all) embedded
into an FDF (Form Definition File Format) file. So POST seems to be useless to transfer
the data. But we can still use the URL and thus use GET to send information away. Why
one by one? Because somehow the clients don’t like huge URLs and pop up an error
message if the URL is too big (I’d guess that the limit is probably 255 chars, but I have
not verified this). We can send away all the data we can get using Javascript, which is
quite a lot – see for yourself in the Javascript reference or have a look what pdftracker
sends away at the moment at pdftracker.de.
Say cheesecakeWcookie!
One interesting feature I was not aware of before is that one can make Javascript vari-
ables persistent over application sessions. The client saves them in a special Javascript
file which is interpreted at client startup. In this way, a client can be traced over different
documents and different networks, similar to the way done with HTTP cookies.
Email for me
Nicely enough, this.submitform() also accepts a mailto:-URL. Using a session ID and
a persistent ID, one can construct an email address where mail is shipped to. This gives
us the user’s email-address as well as his mail header, which may contain interesting
information as well. Doing this without any user interaction works probably only under
Unix, where some of the MUAs don’t pop up a GUI.
The magic HTTP answer
Once the HTTP request is sent, the server should probably provide an answer. Creating
an answer that does not cause the client to do something turned out to be quite tricky.
Depending on whether it runs in a browser or not, the behaviour is different. In a
browser, the viewer actually loads the returned page in a browser window. HTTP 204
2
No-Content proved usable there, but created some problems with a stand-alone viewer.
The stand-alone viewer does not care that there is “no content” but goes on to read the
header, stumbles over a “Content-type: text/html” line and complains that it can not deal
with it. Interestingly enough, the only way that it does not complain is when it receives
a HTTP 500 response, even though HTML was send back in this case as well. But it
looked way to inelegant to distinguish between the different types and act accordingly.
Fortunately, the already mentioned FDF files can also be used to update data in a PDF
form. So the idea arose to send back an empty FDF file and hope that the client does
not do anything with it. This works fine once you have figured out that the form URL
has to end with “#FDF” to enable this feature (even though the “#FDF” is not part of
the request the viewer sends away). If you leave it out, the client downloads the file and
asks for the document for which this data update is, thus alerting the user of something
going on.
Providing regular updates
Nicely enough, Javascript provides a function that enables you to call a function every
few milliseconds – app.setInterval(). Using this function, you can send out informa-
tion every few seconds, for example the current page number.
Glueing it all together using pdfL
A
T
E
X, Perl & friends
But how does pdftracker actually create the documents? This is where my favourite
typesetting system comes into play – T
E
X. Using the insdljs package from the AcroT
E
X
bundle for pdfL
A
T
E
X, one can insert document-level JavaScript, and using pdfpages one
can insert PDFs. I also had a look at PDF::Reuse for a while, which seems quite nice
but I could not figure out how to insert the additional actions dictionary, so I stuck with
what I knew best.
The interface and all the rest is a matter of glue, i.e. HTML, Perl, procmail, SQLite, etc.
Conclusion
So what do we learn from this? Javascript in PDFs is evil, disable it or delete the plug-
in directory. Of couse it provides some nice features as well, but its usage is far less
widespread then on the web, so disabling should cause little harm.
Note that the warning pop up that is embedded in the documents from pdftracker.de
is completely optional – somebody could have been doing this all along without you
noticing it. Use an alternative viewer whenever possible.
10 octobre

Lisp之根源

引文:http://daiyuwen.freeshell.org/gb/lisp.html
刚开始学Lisp的时候,走了一些弯路。 我试图从自己学过的语言里(象C或Perl) 找出Lisp中的对应物。 比如for循环的写法、do和while的写法,等等。 这其实陷 入了这种思维: Lisp只不过是另一种平常的语言,和其它语言不同的只是语法。 如果Lisp能做到的,C和Perl都能做到,学Lisp好象没有什么理由。 因此,了解了 Lisp的一些语法之后,一直没有什么长进。 直到我看到了Paul GrahamOn LispThe roots of Lisp, 才明白Lisp是一种多么奇特的语言。 我同时感到优 秀的书籍是多么可贵, 许多Lisp的书只是介绍一下语法, 没有把Lisp的实质点出 来。

我把The roots of Lisp翻译成了中文 本文的 版权属于原著者Paul Graham。
您还可以下载ps文档dvi文档,或TeX源文档。 欢迎寄patch给我。

Paul Graham的另一本著作Ansi Common Lisp写得也非常 好,从仅能看到的头两章,我确信此书一定写得很精彩。 很遗憾国内没有译本或影 印本。 我把此书的第一章第二章也翻译成中文了。 注意本文的版权属于Paul Graham。
您还可以下载第一章的ps文档第一章的dvi文档,或第一章的TeX源文档
您还可以下载第二章的ps文档第二章的dvi文档,或第二章的TeX源文档。 欢迎寄patch给我。

Peter Radocchia看到此网页后,主动与我联系,热心地把Ansi Common Lisp借给 我阅读。 在此表示感谢!

我再介绍一本学习Lisp的名著:Structure and Interpretation of Computer Programs。 它是MIT计算机学科的必修教材。请注意虽然书里用的是scheme语言 (lisp的变种), 它的目的并不是教你学习scheme,而是教你如何思考和编程,scheme只不过是一种能很 方便地表达编程思想的工具。 我认为不管你用什么语言写程序,这本书都值得一读。

我把Paul Graham的另一篇文章Taste for Makers 也翻译成中文了。 他在文中 表达了自己对美的看法, 值得软件行业的人一读。 由于其中提到了Lisp,就把它 放在这儿吧。

 
看了一遍<<Lisp之根源>>,大彻大悟,豁然开朗。

原来lisp是这样来的,那些怪异的操作符也可以理解了。

lisp其实很好理解,出发点也很简单明了。
为什么以前看的资料没有引导我入门的?


学习一门语言,入门至关重要。入门以后,再慢慢深入,不会一头雾水。






8 octobre

stardict 字典

看到介绍,stardict字典添加了金山词霸,去http://stardict.sourceforge.net/Dictionaries_PowerWord.php查看了一下,下载一个小的打开看看,里面有信息:description=Dwing破解,胡正制作。很久以前就看到作者说过Dwing了金山词霸,没有看到放出来程序。google一下Dwing破解,果然查到金山词霸的DIC词典导出程序,再查询,居然在网络上到处开花了。


下载了本来想自己转一下,放到pda上用。突然想起mdict有个转换stardict的工具,可以直接把stardict词典转换过来,方便。

可以把医学的集合成一个字典,还好sd卡比较便宜。




powered by performancing firefox

web 页面开发

再次访问妖光linux网站,发现作者已经毕业,而且开发了一个网站,http://www.stardict.org/ajax.php
功能不错。
我最喜欢的是ajax,界面很好。看源代码,好像是基于javascript的。极好,可以借鉴。

我可以开发一个药物说明书类似的。






powered by performancing firefox

5 octobre

医学电子书制作

买掌上电脑很久了,总是没有称心的中文工具书。
药物字典倒是自己打造了,举世无双,市面上还没有见到超越的。

重新看看,前次下载的作为健康教育的电子书还可以,范围较广。

垃圾文章日出不穷,连一本有分量的中文医学工具书也不见流传,想不通。

炒新读秀出了文本的,一定要移植一些过来。





powered by performancing firefox

4 octobre

mplayer

下载mpui后,播放rm格式还需要下载codecs。

http://www1.mplayerhq.hu/MPlayer/releases/codecs/?C=S;O=A
下载codecs解压缩到mpui目录下,改目录名codecs。

看mplayer 和 kmplayer,codecs基本应该是差不多。

codecs 里面可以添加codecs里面的部分虑镜。估计大部分已经内部注册了。

播放效果,感觉不出来哪个优秀一点。

 








powered by performancing firefox

kmplayer

老友说kmplayer不错。
我前次碰到一个下载的rm格式的电影老是跳出广告,下载了N个播放器也解决不了问题。
回忆起linux下的mplayer好像有移植到ms windows 下,搜索一下,发现一个mpui用起来不错。
当时看到过kmplayer的介绍,说是“Kmplayer是一款来自韩国的媒体播放工具”,就不感冒了。
今天下载用了一下,确实不错,界面很好。

心中就有个问题,kmplayer好像同linux下的kmplayer不一样。仔细查询了一下,软件说明里面提到kmplayer非商业使用免费,并不开源。论坛里面提到kmplayer起初也是参考了mplayer的源代码。

不过,我怀疑,kmplayer除了界面,核心代码估计同mplayer八九不离十,按照
GNU General Public License.协议也是应该开源的。









powered by performancing firefox

1 octobre

google cookie 突破

msn终归是太慢,还是google强大。
看看能否在cookie上欺骗google,毕竟google不过是电脑系统罢了。
根据以往的经验,这样的工作肯定有牛人做过,我的任务是如何通过google搜索到方法。
查看google的cookie,javascript:document.write(document.cookie),显示PREF=ID=, 检索google
pref id google hack cookie

可以看到一下信息,http://www.google-watch.org/cgi-bin/cookie.htm
  http://www.imilly.com/google-cookie.htm#anon
介绍的很好。

通常的cookie形式是
PREF=ID=1ee1349b174cd530
TM=1157559460
LM=1157559460
S=aR-VHdIQD3E7dOv5

TM=1157559460 means 2006-09-06 16:17:40 GMT -- the time when you first got this cookie.

LM=1157559460 means 2006-09-06 16:17:40 GMT -- the last time you set some preferences.

We believe the S= is a checksum to insure data integrity.



看到一个解决的方法,就是设立一个公用的cookie。

PREF=ID=0000000000000000:LD=en:TM=1115409441:LM=1129104254:S=kSuablMgN8pP9-91

看来其中的
LD=en:可以去掉。


不过很奇怪,今天用google.cn搜索了很久,一点问题也没有。
换上新的cookie
PREF=ID=0000000000000000:LD=en:TM=1115409441:LM=1129104254:S=kSuablMgN8pP9-91
搜索搜索,看看,马上就有问题了。晕死。

还是用google.cn吧。

PREF=ID=592cad39b7a6cbaf:LD=zh-CN:NR=100:NW=1:TM=1159676082:LM=1159676218:S=dPUdDErWJ70hvU9j

LD 应该是语言
NR 因该是每页显示数目
NW是
开启新视窗以显示查询结果

有得玩。
实在不甘心,把google.cn改成google.com

        $url="http://www.google.com/search?q=$query&num=$num&hl=zh-CN&lr=&newwindow=1&c2coff=1&start=$i&sa=N";
马上就出问题。

厉害。


难道google.cn是适应了中国国情的执行不同策略的有着不一样的智能的(智能低下)的?
或者是服务器放在中国了就变得低能了?