31
Mar

吉人自有天相

晚上收到消息,年迈的外婆近日病重,介于清醒和糊涂之间,怕是时日不多。

悄然毅然,有些事情还是默默的走到我们面前。老人家素来身体健康,胃口尚佳,但是时间还是以它的方式,无情的缓步向前推移。生老病死,本是无法避免之事,当发生或即将发生在自己亲近之人身上的时候,却总归会有那种挥之不去的哀愁涌上心头。

外婆以九十一之高龄,坚强的越过了二十一世纪,见证着诸多变迁,如今也算是安享天年,儿孙满堂(最大的重孙早已结婚,怕是重重孙也要呼之欲出)。倒是我这个最小的外孙,却还总让老人家惦记着。半梦半醒之间,病榻之上,仍不忘嘱咐我妈让我早点成家立业。如此关切,除了最疼爱自己的外婆,恐难再有出其右者。

人总要在生离死别的时刻,才忽然体会到逝去时光的珍贵。有些东西,真的离我们好近好近。

愿吉人自有天相。

26
Mar

Protected: Long term career plan

Enter your password to view comments

This post is password protected. To view it please enter your password below:


26
Mar

Some explanation

It’s a little bit hard for me to keep on and focus on the daily target these days, as everything is quite busy around, both working and life.

Recently I have made a long term plan for my job career, in another post (password protected), and some guidlines for my personal life as well, which is also private and confidential
:)

Anyway, I will still try my best and put some energy on the daily stuff intermittently, as which is the foundation of the above.

Good luck to me, and to you all concerned.

18
Mar

离职随想

最近一段时间,公司人员离职的情况较为频繁。

人各有志,抛开离职原因不谈,今天想说说离职前的最后那段时间的行为表现。

通常可以见到的情况会有:

  • 轻者:工作效率低,做事拖沓,延迟情况严重
  • 重者:不作为,不将责任范围内的任务完成
  • 请假较多,经常不在公司

有一些情况是某些公司可能不会把剩余的年假换算为薪资退给员工,所以第三条多少可以算是有点情有可原。
但是前两条可能就不太好了,越是到最后,越是体现出个人职业素养的时候。
如果把员工在公司的表现作为一条坐标系里头的曲线的话,最后的那部分斜率为负恐怕不是很好看,也有点得不偿失。

想了一想,列出了自己认为比较合适的做法,也欢迎各位看客补充:

  • 完成手头的模块或任务;如果比较大不可能全部完成,应与上级确认,到某个可衡量的状态为止
  • 确定工作交接内容,交接对象和最后交接时限
  • 整理电脑内的文档、资料,将平时积累的无关公司机密的材料备份到自己的信箱或移动硬盘
  • 发送farewell letter,留下常用联系方式
  • 删除电脑内与工作无关的一切其他数据,特别是私人数据
  • 办公室私人物品整理
  • 按公司章程办理离职手续
  • 有条件的话,请同事们吃个饭

暂时就想到这么多了。

18
Mar

[HowTo] Send smarty result page as attachment

Well I encounter this requirement while working on a small CMS. The customer wanna download the report page as attachment in MS-Excel format.

And here is the situation:

  • All the web pages are built with smarty.
  • The report page contains some logic that are already defined within the corresponding smarty template.
  • I have access to PEAR install

So here is the solution I figured out:

  1. Create a new excel file, insert some dummy data, typically with one header row and two data row, and also a row with special format for empty dataset.
  2. Save the file as “web pages”, i.e.: FILENAME.htm
  3. Open the htm file with your favorite text editor, you can see some html tags like “tr” and “td“, just like ordinary html files.
  4. Edit the file as you like, put your logic inside. The dummy data may help you out of some cycle, if/else condition.
  5. Build the page with smarty, following is some pseudo code:

    // some initial statement here, such as retrieving data ...

    ob_start();

    $smarty->assign(Smarty_Variable_In_Htm_File, $yourData);
    //...
    $smarty->display("FILENAME.htm“);

    $htmlResult = ob_get_contents();
    ob_end_clean();

    $dl = new HTTP_Download();
    $dl->setContentType(”application/vnd.ms-excel”);
    $dl->setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, “ResultReportFile_”.date(’Ymd’).”.xls”);
    $dl->setBufferSize(10 * 1024); // 100 K
    $dl->setData($htmlResult);
    $dl->setCache(false);
    $dl->send();

One thing more, you have to install the “HTTP_Download” package from pear.php.net, together with all of its required dependency.

That’s all.

18
Mar

Target 20080318

  • Finish the report download
  • -Y

12
Mar

Target 20080312

  • Finish the advanced search function
  • -Y

Do I supposed to plant a tree today? :P

11
Mar

Target 20080311

  • Do not open the damn computer tonight after returning home.
  • -Y

  • Get asleep before 11:00 PM.
  • -Y

06
Mar

Target 20080305

  • Finish ACL base management pages.
  • -Y

  • Do something helpful, in memory of LeiFeng
  • -N

03
Mar

奥运,奥运

不绝于耳的声音,老头老太闲聊都是这个话题,旅行社更改旅游线路追着火炬跑,新闻报道每天都是这个头条,似乎全中国就只剩下这点事了。

一窝蜂的事情,我们已经干的不少了,难道教训还不够么?真的有空,还不如研究研究如何关注民生、改善民生。