2012年12月20日 星期四

[PHP] The resources about calling windows programs in PHP

I've developed  one library about security and make as a .dll package. Now, I want to use the dll through PHP because my significant webdesign skill is PHP, not ASP.Net. The other reason is that I don't prefer to install two different web platforms in a non-enterprise server.

I've searched some tutorials about that how to use or develop dll in PHP. To my knowledge, there are at least two ways to apply.

Develop One Self-developed C/C++ .DLL File

The dll can be only written by C++. After completing .dll file, I just put the dll into the ext_dir of PHP and set some configurations in php.ini . There are some resources listed in below:
  1. Creating a PHP 5 Extension with Visual C++ 2005
  2. Win32 PHP extension development

Use COM/DOTNET Classes in PHP

The another way is that use COM/DOTNET classes built in PHP to call self-developed COM assembly objects.
  1. Calling a DLL with PHP
  2. The DOTNET class
  3. COM and .Net (Windows)


2012年12月16日 星期日

熱帶樂園的生動歷史


原文出自:http://goo.gl/WIbfx

[原文]
The tropical paradise of Truk Lagoon in the Federates States of Micronesia is considered one of the top wreck diving destinations in the world, along with Scapa Flow in Scotland’s Orkney Islands. Over the course of two bloody and smoke-filled days in 1944, more than 60 Japanese warships met their end during a battle here. The Japanese still pay their respects at the watery World War II gravesites each year, but for scuba divers, the site offers a chance to explore a piece of living history. The enormous wrecks that are scattered across 124sqkm of ocean – loaded with torpedoes, airplanes, tanks, bones and more – have become underwater museums, slowly claimed by the salty march of time. (Chris Jackson/SwellImages.com)
[翻譯]
熱帶樂園的現實歷史
在密克羅尼西亞的特魯克島,這座被譽為熱帶天堂的島嶼,被公認為是最危險潛水水域之一,其水域沿著蘇格蘭的奧可尼群島的Scapa Flow而下。
在歷經1944年為期兩天血腥且煙硝瀰漫的戰役後,超過60艘日本軍艦沉入海底。每年日本人仍會對這片歷經二次大戰的海域致敬,但是對於潛水員來說,此地提供一個瀏覽生動歷史的機會。為數眾多的殘骸散布在這個124立方公尺的海洋中遍布著魚雷、飛機、坦克、骨骸等,儼然成為一個水下博物館,隨著時間的流逝,慢慢地鹽化殆盡。(Chris Jackson/SwellImages.com)


編按:
1. 根據這篇文章的說法,Scapa Flow是位於接近蘇格蘭頂端的地方,在世界大戰時戰艦摧毀了那個地方,那個地方由於西非洋流帶上此地,所以這地方海域水溫比較溫暖很適合潛水和賞鳥。


本文單字
1.          Micronesia (n.) 密克羅西尼亞(赤道以北菲律賓以東的群島)
2.          Truk Lagoon (n.) 特魯克
3.          Scotland (n.) 蘇格蘭
4.          Orkney (n.) 奧克尼群島
5.          tropical (adj.) 熱帶的;酷熱的;茂密的
6.          paradise (n.) (通常大寫)天堂[U](通常大寫)伊甸園;極樂;
                       
至福[U];樂園, 像天堂一樣的地方[S]
7.          wreck (n.) 船難[U];毀壞;船難事故[C]
                   (
被毀車輛, 飛機, 房屋等的)殘骸[C]
             (vi.)
失事
             (vt.)
使失事
8.          diving (n.) 潛水、跳水
9.          warship (n.) 軍艦[C]
10.      gravesite (n.) 墓地
11.      scuba (n.) 水肺
12.      scuba diver (n.) 潛水員
13.      enormous (adj.) 巨大的、龐大的
14.      scatter (vi.) 消散; 分散; 潰散;零落地出現;(砲火等)散射
            (vt.)
使消散、使分散
15.      torpedo (n.) 魚雷、水雷[C]
16.      salty (adj.) 有鹽份的
17.      claim   (vi.) 提出要求[(+on/for)]
            (vt.) (根據權利)要求; 認領; 索取
                   (
疾病, 意外)奪去(生命) (根據權利)要求;
                   
認領; 索取;自稱, 聲稱;
                  
主張[Y][+to-v][+(that)];值得, 需要;
                   (
疾病, 意外)奪去(生命)

2012年12月15日 星期六

A paid internship at Docear

Docear is an very useful software I ever used for paper references. I've received one message about that they can offer paid internship for US, UK or Canda students to develop paper recommend system with their team. If anyone is living in one of the corresponding countries, read the following link, please.

http://www.docear.org/2012/12/06/bachelor-students-do-a-paid-internship-in-software-engineering-or-statistics-here-at-docear/

2012年12月14日 星期五

奈及利亞Ngozi Okonjo-lweala的母親從綁匪手中獲釋


奈及利亞Ngozi Okonjo-lweala的母親從綁匪手中獲釋
Delta州州長Emmanuel Uduaghan告訴BBC記者,奈及利亞財務部長Ngozi Okonjo-lweala的母親自從被綁匪綁架後,已於五天前獲釋。
他說,獲釋的Kamene Okonjo,目前為退休教授,她於離她奈及利亞南部的家不遠處的主要道路被送下車。
綁票案在奈及利亞南部很常見,屬於高報酬型的專業犯罪。
目前尚不清楚這位高齡82歲的Okonjo女士,由警方還是財政部保護。
Uduagnhan州長說,綁票案嫌犯應是礙於壓力下,決定釋放她。
他告訴BBC於非洲的駐點記者Focus說,「軍方與警方已經掌握他們的行蹤,並展開一連串的搜捕行動。」
在此搜索Okonjo女士的行動中,已有數十名人士於本周四被提報拘留。
本周稍早時,財政部發言人Paul Nwabuikwu說,部長近日備感威脅。
他證實Okonjo女士獲釋的消息,但是並沒有透露進一步的消息。AP新聞處如是說。
主謀已被逮捕
目前不清楚是否已付贖金。政府官員表示,付贖金並非政策之一,但是其家人有時私下與綁匪斡旋。
「就本案件的政府立場而言,我們堅持不會付任何贖金也不會與綁匪談判」,他說。
Okonjo女士在大約當地時間10:30 (格林威治時間09:30),目前正在安然入睡,稍晚會回答她這幾天以來的煎熬,發言人如是說。
他接著說,一名釋放她的年輕人已遭到逮捕,目前正在接受詢問。
BBC位於奈及利亞的特派員Will Ross說,綁匪案在這個國家很常見,但是很少像這樣子刊登於頭版版面。
在南部近幾個月以來,已有許多商人、足球員與學者遭到綁架勒贖。
但在過去,只有國外的石油工作人員會成為綁架的目標。
現年58歲的Okonjo-lweala 財政部長,是一位受到國際推崇的經濟學家,她帶領奈及利亞杜絕貪污腐敗,特別是在受爭議的燃料津貼一案。
她拖延燃料進口商的津貼,並尋求更好的津貼替代方案。
獲釋的Okonjo女士,擁有醫學博士學位,並從Nsukka的奈及利亞大學的社會學系退休。她的丈夫Obi Chukwuka Okonjo Agbogidi,也是一名退休的經濟系教授,同時也是位於Delta洲的Ogwashi-Uku王室成員之一。
今年春天,Okonjo-Iweala財政部長曾是接管世界銀行的熱門人選之一。她曾是機構的常務董事,但最後敗給韓裔美籍的Jin Yong Kim

本文單字
1.          kidnap (vt.) 綁架、劫持
2.         lucrative (adj.) 賺錢的, 有利可圖的
3.          financial (adj.) 財政的、金融的
4.       drop off (ph.) ...下車
5.       arrest (vt.) 逮捕、拘留
      (n.)
逮捕、拘留
6.       correspondent (n.) 通訊者、特派員
             (adj.)
符合的、一致的
7.       ransom  (n.) 贖金 [C]
8.       high profile (ph.) 高姿態、明確立場
9.       fuel  (n.) 燃料
10.    corruption  (n.) 腐敗、墮落
11.    controversial  (adj.) 有爭議的
12.    subsidy (n.) 津貼
13.    sociology (n.) 社會學
14.    take over (ph.) 掌管
15.    institution's  (n.) 機構
16.    managing-director  (n.) 常務董事


[Mood] Restart, or not?


Could I restart the period over the very long duration of my life?
I'm very very very very sad when I know the score of English certificate.
And, somethings disturb me again and again.

What's wrong with me?
I just want to find the identification in the duration.
Why I can't find the small encouragement during these days?

I find everything I ever did is just do nothing. I hate someone nailed their strange eyes on me after knowing I study this degree. It seems to tell that you are just a student and do't earn money to raise your family. Is this my fault? I seldom get no money from my family as I study this degree. All the everything I want to do best...Why blame me for these ridiculous reasons? Further, I crazily gaze at the unfair Taiwanese media posts and provide some suitable opponent opinions. Why despise me seriously for anti-socialization, anti-government?

The major meaning is that discover the interesting things of studying. But, during these long and rough days, the major encouragement is coming from my family and my girl. Meanwhile, I want to get good results in the period. However, I owe much more expectations to them ( family, teachers, friends and my deeply loved girl....)

Is it my fault to study this degree or make these decisions?

Indeed, if there's God, I want to see him and ask him the reason.

2012年12月13日 星期四

手機成癮症造成的一些問題

在找一些研究素材時,湊巧找到的一篇文章。內容蠻容易閱讀的,就隨手翻譯了一下。
原文出自:http://thestar.com.my/news/story.asp?file=/2012/2/12/nation/10723793&sec=nation


五名年輕人坐在桌子旁喝飲料,但彼此並無交談。相反地,他們的眼睛各自緊盯著手機,上網瀏覽或用手指頭在文字訊息間滑動。
這是智慧型手機成癮症,而且此類症狀已成現今主要問題。
許多父母常常抱怨自從讓他們小孩拿智慧型手機後,小孩花在手機上的心思比他們還要多。
同時,很多配偶也常在抱怨他們的另一半自從有了手機,就像是走丟了一樣。
MCA 公共服務與訴怨部門的主任Datuk Seri Michael Chong表示,他已經接獲許多因智慧型手機成癮而導致婚姻觸礁的案例。
「很多女士找我尋求第三方協助」,他說。
Chong接著說:「大部分女士發現她們的伴侶花很多時間在手機上,並頻繁地確認其他女人傳來的簡訊與電子郵件。」
此外,此一現象還造成其他問題。許多整天使用智慧型手機在打字、線上聊天的小孩,可能無法好好處理現實生活。另外,這也涉及了健康議題。
根據馬來西亞通訊及多媒體委員會的報告指出,截至2010年九月底止,智慧型手機服務的訂閱數,已從兩千八百多萬,成長至三千三百多萬。
此份報告還指出,樂於使用一支手機的人占了71.5%,使用兩支手機的人占了23.9%,而使用超過兩支手機的人則占了4.6%
臨床心理學家Serena Sinniah說,過度依賴智慧型手機,且整天泡在上面的App,易造成朋友或是愛人之間的人際關係失調。
她說:「當你全神貫注在使用智慧型手機時,可能會透露給你身旁的人一個訊息:『他們對你來說似乎沒那麼重要』。」這也會讓你停止使用肢體語言,進而導致溝通失敗。
Serena說,青少年傾向使用文字訊息來跟他們的父母談論一些敏感議題,此舉讓他們感到輕鬆。她進一步說,智慧型手機在這案例中,是個用來幫助青少年辨別他們的個體與狀態的社交工具。
然而,她進一步說,「因為花太少時間在培養人際關係與面對面交談,使得這層社群網路變得沒那麼穩固」。
「這或許會導致缺乏危機感與自我控制的敏感度,而且青少年或許無法學到如何有效處理現實生活中遇到的種種問題。」Serena說道。
「而這會造成在他們邁入成人時期,社交技能下降。」她說。
家庭關係顧問Yvonne Lee說,頻繁使用智慧型手機的人,因為時常花太多時間關注在虛擬世界中,反而易導致與愛人之間關係破滅的風險。
「若你時常花時間用你的手機在打字、打電話,你身旁的人或許會感到不舒服,因為你花時間在跟電話那一頭的人聯繫,而不是在跟他()談話」,她說。
Lee說,時常掛在智慧型手機的父母,或許也無法處理他們家庭的問題,反而在傳訊跟線上聊天會讓他們感到舒適,而不處理他們的伴侶甚至是小孩的事務。
「妥善安排時間在你愛的人身上。當你身旁有親友在場時,若有人試圖透過手機與你聯繫,你可以稍後再跟他聯絡。」,她說。
Lee說,她諮詢過一位女士, 該女士當時的另一半正與其他女子糾纏不清。「當一些人家庭不睦時,藉由智慧型手機與他人線上聊天,容易對他感到舒適。」她進一步說:「但是花太多時間在這上面,易導致感情問題。」
這些線上的愛慕之情,會導致他()的配偶,認為有其他人比他()更了解其另一半。她說。
同時,眼科醫學顧問 Wong Jun Shyan博士指出,花太多時間注視在智慧型手機上亦造成眼壓上升。
他補充說明:「我們通常會把手機拿得比我們看書時還要近。因此,眼睛瞪久了易使眼睛缺乏水分」

Themes for Drupal 7.

I've found these interesting themes which may be suitable for my projects I encountered.

  1. http://drupal.org/project/boldy
  2. http://drupal.org/project/adaptivetheme
  3. http://drupal.org/project/corporateclean
  4. http://drupal.org/project/journalcrunch

And, there are some major companies which have expertise in Drupal theme design I focused:

  1. http://www.siliconinfo.com/drupal-web-development-developer/detroit-metro-drupal-programmer-drupal-web-developer.html
  2. http://kaolti.com/
If anyone wants to find Drupal Theme, go to Drupal Themes and find what you want.

[Hadoop] Hadoop 安裝與國網中心Hadoop實作

在中部某科大上課,教到Hadoop,就把一些教材更正的釋出。
Hadoop單機安裝
這份跟國網中心提供的單機安裝教學有些不同,差異性在於Hadoop 0.22.x啟動方法跟如何安裝JDK 1.7。
請點此觀看

在國家高速網路中心Hadoop下實作
教到如何在國家高速網路中心上使用Hadoop叢集,順便把這一份教材釋出。

請點此觀看