easyPHP下elgg本地安装调试手记

下载easyPHP和elgg,安装easyPHP在一个独立文件夹。elgg解压在easyPHP下www文件夹。同时在www下建一个data文件夹;

本地运行easyPHP,右键点击easyPHP图标,依次点击configuaration/phpMyAdmin,分别建立data和elgg数据库;

打开easyPHP/文网文/elgg/engine文件夹,重命名settings.example.php为settings.php, 用写字板打开该文件,改写以下各行:

// Database username
$CONFIG->dbuser = '{{CONFIG_DBUSER}}'; ==》$CONFIG->dbuser = 'root'
// Database password
$CONFIG->dbpass = '{{CONFIG_DBPASS}}';==>填入密码
// Database name
$CONFIG->dbname = '{{CONFIG_DBNAME}}';==》$CONFIG->dbname = 'elgg'
// Database server
// (For most configurations, you can leave this as 'localhost')
$CONFIG->dbhost = '{{CONFIG_DBHOST}}';
// Database table prefix
// If you're sharing a database with other applications, you will want to use this
// to differentiate Elgg's tables.
$CONFIG->dbprefix = '{{CONFIG_DBPREFIX}}';==>$CONFIG->dbprefix = 'elgg_';
Posted in CMS, elgg | Leave a comment

【旧文新刊】Love, O the Damned Human Love

Poets sing odes to it, philosophers contemplate over it, novelists dramatize it, holleywood massproduces it, businessmen make big bucks out of it. .   

Men and women talk it, even make it. They are dying for it, or they are reborn for it. They thrill at it, they groan for it. It flies them high on the zenith of the world, or throw them down into the abyss of despair.   

If you have a chance to see how a horse looks when he sees a mare, you will be awed by the power of 'love': he stands on his hind feets, throwing his front legs and head high into the sky, eyes reddened and bright, all the his hairs flying, and the whole world can hear his love  sonorous love song to his lover.   

(Un)fortunately, the human love goes beyond it. Scientists say ,at least, that human is the only animal who hugs and kisses when in love.   

Human love should be like the river of life. Love keeps man and women alive. The river of life runs dry without it. The pain of love is the pain of being alive: it is our perpetual wound.   

Love means the body, the soul, the life, the entire being. We feel love as we feel the warmth of our blood, we breathe love as we breathe air, we hold it in ourselves as we hold our thoughts. Nothing more exists for us.   

Love defies logic and reasoning. I wonder whether people who are sensible about love are capable of it. But it gives us a reason for leading a life in the world. I really can't see the difference between the human race and the animal kingdom were it not for love: love is the only answer to the problem of human existence.   

As someone says somewhere, love is the irresistible desire to be desired irresistibly. Only those who are driven crazy and desperate by love are entitled for tasting its sweetness.   

Love is a paradox. Love renders one the sweetest sweetness, but the most bitter bitterness as well. Love makes a tranquil heart beat wildly, it can also set a restless heart at peace. Love makes the wildest spirit tame, and the tamest spirit wild.   

Love englightens the fool, but blinds the wise.   

Love is much like a wild rose, beautiful and calm, but willing to draw blood in its defense.   

Love is much like a fire. The only difference is whether you intend to see its flames dancing in your hearth, or to see your house burned down by it. But a life without love can only see a heap of ashes with the fire deadand the light extinguished.   

I just wonder whether love is the grand gift god grants us, or is it the juju He pastes on human souls???

Posted in 信息技术 | Tagged | Leave a comment

【旧文新刊】夜观流星雨

The enormous sky over our head has been an inexhaustible source of astrological prophecy, romantic imagination, celestial reverence, legendary myths and unending mystery. Astrologists, the precursors of modern astronomers, were believed to possess the supernatural powers of getting the apocalyptical messages from the location and movements of the constellations. The most recent evidence was that, Nostradamus, possibly the best known astrologist in the world, has successfully foretold, as far back as 400 years ago, the terrorist air raid in New York city. Of course, as always, his equivocal and always ominous prophecy can only be explicated to us on an ex post hoc basis. The modern version of this ancient practice is simplified and accessible to general populace: one’s destiny and disposition are determined by “his or her” constellation, which can be effortlessly inferred by one’s date of birth. In Chinese folklore, the Milky Way epitomizes the insurmountable gap intervened by heavenly powers to separate two loving hearts while the pale and cool glows of moon has inspired endless poetic imaginations since antiquity.

  Modern science has unveiled the mysteries of the universe and freed man from irrational worship of the lifeless heaven. The galaxies and constellations proved to be nothing but the residue of a accidental big bang. When Galileo pointed his newly invented telescope to the moon, our closest neighbor, he found something frustrating and anticlimactic to the imaginative poets: it is merely “full of inequalities, uneven, full of hollows and protuberances, just like the surface of the Earth itself.” Had the two lovers across the Milky Way known that what is lying between them were not onrushing flood but clouds of stars, they would not have to wait, with burning yearnings and longings, for another 360 days to have their long-awaited and romantic meeting: They could meet everyday and take baths together in the ‘Silvery River’, if they like.

  However, modern science of astronomy and astrophysics is quite beyond the ken of the general laymen, who instead still cherish a ceaseless curiosity to the celestial bodies in the night sky. Each eclipses of the sun or the moon would allure millions of pairs of eyes thrown up at the sky. Whenever a comet orbits close to the earth, there would be a panic buying of astronomical telescopes. It is an astronomer’s lifelong dream to witness the rare occurrence of the planets in a special configuration, such as in the shape of a line or of a cross.

  I can hardly be ranked as an idolater of the stars, be they in the heavens or in our secular world. But last year when they said that they would be a star shower at midnight, I couldn’t help being seduced by its beautiful name:
  “ A star shower, huh?”
  “You would be remorseful if you miss it,” so I was told, “you will have to live one more hundred years to see it again.”
  So the cold midnight saw us two folded in blankets at the top of our building, drinking glasses of wine to keep warm, waiting for the astronomical spectacle to come. By the hour when the stars had been anticipated to shower, we looked long up in the sky.
  “You must stare at the sky long,” my friend told me in a knowledgeable way, “as the star shower will disappear in a split of second.”
  “Are you sure it comes at one o’clock,” my neck began to ache and sore, but I could only see the stars twinkling mockingly at us.
  “Scientists won’t make mistakes. Be patient, men.”
  My patience was running out and at two clock, we went back to sleep.
  The reason my friend gave me for the absence of the star shower was “ the moonlight was too bright”.

  That is why I did not show excessive enthusiasm when I was told there would be another Leonid meteor shower this November. “Sometimes scientists also make mistakes.” I was still browsing the net when there were hordes of university students marching to the playground to get ready for their observation.
  I was just about to go to sleep when there burst out sudden shrieks of ecstasy downstairs.
  “Why?! Does it really come? They say it comes around 1.” I asked myself while pulling on the clothes and dashing downstairs. After all, watching star showers is for me an unfulfilled dream.
  There were already hundreds of students gathering there. Some guys were really well equipped and well prepared: they took their beddings with them so that they might look into the sky while still lying in bed, saving themselves from the neck-soaring syndrome I experienced last year. Some also had telescopes in hand. Fortunately, the moon was still not in sight now.

  As this was only the initial stage of star shower, there were one or two stars occasionally fleeting across the night sky. Each would invariably evoked loud shouts of joys. As most of them vanished in a split of second, those who missed them would turn to their partner and inquired:
  “Where, where?”
  “There, there.”
  By the time the latter saw in the direction where the star was, it had gone. Only then did both of them feel their folly and they looked at each other, smiling.
  Nowhere have I felt a more harmonious relationship between man and nature than on this playground. The parent of the meteor shower was in fact a comet, the most inauspicious star in ancient astronomy. The presence of so many spectators on this playground seemed to be ridiculing the obsolescence of this old superstition. Instead, the rare astronomical spectacle was expected and embraced with enthusiasm.
  There burst out one after another wave of ecstatic shrieks when the stars began to ‘shower’ in bulks, in different directions, leaving behind them long and beautiful trails. At this moment, it occurred to me that I should make a wish. They say the wish made at this moment is most likely to come true. I stared at one star fleeting across the sky, crossed my hands before my chest, in a very prayerful way, and made the wish before its beautiful and greenish trail vanished. Why should I tell my wish to you? They say it won’t be effectual if it is uttered.
  Should I feel joyous or lamentable if my life was just like the star shower’s, colorful, beautiful, spectacular, but fleetingly brief, winning shouts of joys for me even though I became extinguished into nothingness immediately? So I asked myself on my way back room while the multitude on the playground is still thrilling behind.

Posted in 信息技术 | Tagged , | Leave a comment

【旧文新刊】重阳夜登高

最近突然发现自己是个很怀旧的人。以前写过一些东西,发在榕树下。今天去找,已经渺无踪迹。有些还存在自己的电脑里。只是现在已经没有哪种激情,或者才情写出来了。

Mountaineering is an art. There are different approaches to climbing different mountains. In some tourist destinations, I can see many people march into the mountains in such a haste as if they are going to the market for a dealing. For these people, mountain climbing is of course not an art. It can hardly even be a pleasure. It is a sort of race: they have only one goal in mind and the sole thing they care for is the destination, the top of the mountain. They don’t cease to feel gentle breeze in the mountain, or to listen to the singing flows of the streams, to communicate with gracious being.

  Some mountains are to be ascended alone, while some others, preferably with companions. Some calls for elaborate preparations, apparels while some others are to be ascended when you are nearly naked. You climb some mountains to view the spectacular sunrise, while for some others, you wish there would be no sunlight at all. You go to some mountains to see a specific species, while you go to some other mountains just to see a rare bamboo. Some mountains are to be climbed in the broad daytime, while others are to be ascended in the dim moonlight.

  North born and north bred, I rarely take the mountain at the back of my campus as a real mountain. It is even exaggerating to call it a hill: it is only about 300 meters in altitude. A hump of earth it is, actually. However, it is one of the best known tourist resorts in this city. That is why I sniffed at the idea when one of my fellows proposed an ascent of the ‘mountain’ in the first week of our arrival here.

  Then came the last weekend, he came into my room again:
  -It’s the local custom to climb the mountain today. You will be remorseful if you…
  -What makes today special, then?
  -It’s the Senior’s Day, the Double Ninth Day, as they call in the Chinese Lunar Calendar.
  -Gosh, really? Let’s go, then.

  It was six o’clock in the afternoon. And it turned out to be my least planned ascent: I only changed into my sports shoes and took a bottle of mineral water with me. There were four of us.

   We started out. It was so different from the image of a stereotypical mountain I had conjured up in my mind: it was too artificial. It does not even have the natural and zigzag paths one usually expects to take in the mountains. Actually, there is a highway broad enough to allow two cars to go abreast which leads from the foot to the top of the hill. Of course, some ingredients of the mountain are still there: On both sides, there are trees having grown for dozens or even hundreds of years. There is also no short of trickles of spring water or brooks.

  The city is still hot in this season. Most of the tourists were in their summer shorts. It was already dark and the tourists were starting their ascent in twos and threes. Apparently, their trip was better planned than ours. Some of them have balloons of all shapes while others have ornamental bracelets of all fluorescent colors. They were, of course, also armed with food, drinks, cameras and playing cards.

  At first, I just took it as a sort of exercise as there seemed nothing appealing. I even took the chance to give some calls back home all along the way, without noticing the views on both sides. As our ascent proceeded, I felt something fascinating and touching in this little mountain. Quite unlike other mountains, this one does not have much to see: no temples, no Buddha, no rare species, no floral attractions. But there were a lot to feel. The fresh air went straight into the heart and tranquilized it. The greenery had the smell of a peaceful music. Gentle breeze caressed the leaves and our faces. The moon was clear and bright, hanging at the top of the tree and splashing its light through their dense leaves upon the ground. You felt that you were just bathed in the milk-like moonlight.

  We took a break on a piece of meadows. There were already dozens of them scattering around. Young fathers and daughters, newly-weds, lovers, university students. They were chasing, singing, playing cards, relaxed and released. Had it not been for the lights from the buildings in the distance, one would feel s/he were right in another dimension of the world. What had seemed to be of the utmost importance in the daytime was thrown out of the mind. There were no struggle for fame and reputation; there were no competition and transaction. One was no longer afflicted with the status and wealth. One was free from the burdens and worries in their work and study. And even the evils were veiled in the beautiful guise of the night. At this time, at this hour, one was integrated with the nature. One was enjoying the offerings that the nature bestows on us. Everyone was joyous. Everyone seems to be the spoiled baby of the nature.

  And joys were infectious. We were actually so joyous that it was too late when we realized that we were making a detour. There were a shortcut to its top but we took another path, which took us an additional hour to go atop. The climax, of course, is always climactic. The tourists were at the peak of their joys. Everyone poked his/her head beyond the protective makeshift railings to have a good view of the city. They pointed in the direction where their dwellings were. They identified the landmarks of the city outlined and shaped by lights by them. The lovers, they seized the moments to experience the peak of love. The hugs and kisses in this altitude not only witnessed their love, but seemed to perpetuate it as well.

  My fellows were still arguing whether the additional detour was worthwhile when we were on our downhill . But I felt far more content than expected. I had all the elements that make a good outdoor trip. Actually, I had privately hoped the trip would last longer.

  At the foot of the mountain, throngs of tourists were still swarming into the mountain: they seemed to know better when to start their ascent. When I was back, it was already midnight. all exhausted. After I consulted the tourist directory, I realized that we had walked 20 kilometers in this 300-meter-high “hump of earth”.

  Tomorrow would be another day for the more earthly things: going shopping, visiting friends, smiling at your colleague and bowing at your boss: one is back to the world when s/he is back from his or her trip.

Posted in 信息技术 | Tagged , | Leave a comment

Google Wave的简单教程

Google Wave在Gfans中激起了一股狂潮。但其复杂得让人容易迷失其中的界面又让人望而生畏。也难怪,Google的工程师在Google IO 2009上花了88分钟才把这个东东解释清楚(或者是,让人更加糊涂!,不过,我劝英文较好的朋友都过去看看,至少可以看看Google的工程师们的样子。)

网上虽然已经有了很多教程,但一个比一个复杂, 如这个,还有这个。我发现他们有一个共同点:不是说服别人去使用Google Wave,而是吓唬别人不要去碰它。所以,我想写一个比较简单一些的教程,帮助那些初次体验GW的潮人们。

首先,Google Wave是什么?

对GW最好的说明还是来自Google Wave首页上的那句话:

所以,最简单的说,GW是一个实时交流和写作工具。

第二个问题:GW像什么?

我的回答,GW像混搭。它将很多实时交流/协作服务的特征放在一起,是一个All-in-one服务。它是IM,是Twitter,是Email,是Forum。你怎么用它,它就是什么?其秘诀就在于它是一个平台,用户可以凭借它巨大的开放性,随心所欲地使用通过其开放的API提供的各种服务。(未完待续)

Posted in 信息技术 | Tagged | Leave a comment

Google Book (search)惹谁了?

在我每天都阅读的Google Reader 订阅源中,有很多有关国际互联网最新动态的新闻。要不是时不时出现的这个或那个互联网服务又被东篱把酒黄昏后墙了的消息,很少听到来自我的祖国的消息。不过,China这个词,在这几天的国际互联网新闻中,绝对是一个高频词。ForbesWall Street等一干世界知名媒体都把好奇而错愕的目光投向了中国。

事情的起因是一帮文人,不是因为他们获得了诺贝尔文学奖,二是因为他们不满Google Book  Search数字图书馆在他们不知情的情况下,收录他们的著作。可是,中国作家并不好对付,所以谷歌提出和解。

这则和解声明通过中国文著协贴到中国作协官网“中国作家网”上。在这份谷歌最新的表态上,他们把条款分为“同意和解”和“不同意”两类。同意者,每人每本书可以获得“至少60美元”作为赔偿,以后则能获得图书在线阅读收入的63%。但这赔偿需要本人提出“申请”,2010年6月5日之后还没有申请,则视为自动放弃权利。如果不同意,则请提出诉讼,但不得晚于2010年1月5日。

中国文人们的反应是激烈,而(至少在我看来)很不专业的:

“60美元就想把人打发了?他们做梦去吧!”上海作家陈村显得很生气。

我甚至怀疑这位我曾经很喜爱的阅读能力,至少他看上去没有看完这个和解条款的全文;我甚至怀疑这位精明的上海人以前是否知道Google book search,或者上过google的数字化图书馆去看看自己的书。

在中国这么一个最不重视版权的国家,突然向一个重视版权的互联网公司发难(在中国人下载的所有网上音乐中,只有Google music提供的音乐是支付了版权费用的),全世界人民都笑了。

谁让满大街兜售盗版书籍的小贩们看上去没有google这个冤大头那么有钱呢?

Google黑板报昨天非正面对这一纠纷作出了回应:

与指南针、火东篱把酒黄昏后药、造纸术一样,印刷术是中国的四大发明之一,它的出现对人类社会产生了深远的影响,大大增强了人们获取信息的机会并彻底改变了知识的传播方式。

今天,数字化也为人们提供了类似的机会,而且更进一步:它使任何人可以在任何地点、任何时间获取世界图书海洋中存储的浩瀚知识。此外,它还提供了一个巨大的机遇,使我们能够跨越国界宣扬和传播中华民族的悠久传统和文化。

正是基于这样一个远大的理想, 2004 年,我们启动了谷歌图书搜索 (Google Book Search) 项目。我们与世界各地的出版社、图书作者和图书馆一起对世界范围内的图书进行数字化,让人们能够更加容易地查找到他们所需的书籍。

谷歌图书搜索使找书就像找网页一样容易。只要访问 books.google.cn,您就可以对成千上万本图书的内容进行检索,无论这些图书的内容新旧与否、无论是它们是文学典籍还是流行小说。

我几乎是从Google book一开始时,就注意到这款产品(当时叫Google Print)。今天去看了一下,我已经Google的我的图书馆里收藏了223本书了,为我的研究提供了非常大的便利。所以,从内心来讲,我希望这个庞大的计划能真正推动人类知识和文明的传承,而不是因为所谓的版权问题而终止。

Posted in google | Leave a comment

【分享】互联网新鲜事

算起来,已经有半年没有在这里写个字了。所以,这里写的所有的新鲜事都是陈旧的流水帐。但这些都是我目前关注的领域。

一是全世界都关注的Google Wave发布了。这注定是一个 ** 互联网交际方式的工具,使得不同用户、小组之间的工作流和信息流更加顺畅。

二是Microsoft的Office Web Apps预览版发布了,这将是Google Docs乃至Google Apps的直接竞争对手。凭借Office套件的庞大用户群,Office web apps可以将Google Apps远远甩在身后。其中,最重要的原因,就是微软的office已经成为事实上的办公软件的行业标准。

三是Google发布的translate toolkit 发布了,这也反映了google在自然语言处理领域里已经远远超越于对手。不仅智能程度很高,更重要的是定制性和协作性都很强。是翻译人员的福音,但也是外语行业的噩耗。

Posted in 信息技术, 随笔 | Leave a comment

Google 的识别技术

这个题目几乎很少有人谈过,但我已经注意了很久了。我相信Google在识别技术上已经远远走在竞争对手的前面了。

Google能识别什么呢?

Google可以识别OCR文字

Google先是宣布了Google Docs的OCR文字识别功能,之后又宣布了搜索结果里用Google Docs的PDF快速查看功能,PDF快速查看里,也内置了OCR文字识别功能。那些扫描而成的PDF里的文字,都可以导出为HTML,就得到了识别后的文字。

Google可以识别人脸,这个功能显示在picasaweb里出现(目前中国大陆无法访问),后来在新版的picasa软件里也具备了这个功能。相册中同一个人物在不同的照片中的“人脸”会被自动地搜索出来。

Google似乎 还可以识别Youtube中的声道文件,然后可以用文字搜索。这一技术已经移植到Google手机中。

我以为,这一系列都是围绕着Google的核心业务--搜索来进行的。在我看来,google已经不满足于仅仅通过在搜索框里输入文字来搜索文本,google更想通过搜索框来返回多种媒体的结果。

Posted in google, 信息技术 | Leave a comment

搜书--求人不如求自己

做研究的一大部分时间不得不花在找资料上。对于非重点、非名牌、非211、非985学校的老师尤其如此。

我以为,掌握搜书的方法,比求别人给你提供书籍,更加重要。

经过长期摸索,我这里有一些心得。与大家分享。

百度文件搜索:http://file.baidu.com。 直接搜,但我们需要的东西往往很少。
google 文件搜索:Google没有独立的文件搜索引擎。但可以在搜索框里输入filetype命令,可以达到与百度搜索同样的效果。例如:filetype:pdf "corpus linguistics"就可以搜到语料库语言学相关的pdf文件。要搜ppt,doc后缀的文件,只需要将pdf替换为doc或ppt即可。注意:需要用英文冒号,并且在冒号与pdf, doc, ppt之间不能有空格

利用文件搜索引擎:有一些文件搜索引擎很好用,可以用来搜E书或论文。个人觉得最好用的是γFiles

http://www.gammafiles.com

另外,我还自制了一个专门用来搜索语言学文件和书籍的搜索引擎。喜欢的朋友可以收藏下来,以备不时之需。
http://tinyurl.com/c6zofq

Posted in 随笔 | Leave a comment

我建立的两个个性化搜索引擎

google的个性化自定义搜索引擎推出已经很久了。但以前很少用过。最近,因为要经常搜索电子书,才想起来完全可以自建一个电子书专用搜索引擎。经过使用,效果觉得还不错。另外,我很不满意China Daily网站自带的搜索引擎,顺便也为他们做了一个,算是小小地满足了一下虚荣心。

电子书搜索引擎效果如下。喜欢的朋友可以收藏到美味书签

Posted in google | 3 Comments