搜尋

搜尋結果

【不丹。遊記】到達不丹的第一感覺
走遍世界
原來世界這樣大・2018-03-20

接觸一個新地方,第一印象大多是抵達機場後的感覺。由曼谷開往四、五小時後,飛機正式降落不丹。落機後見到的一望無際的藍天、連綿不斷的山脈,捱夜睡機場的倦意立即消失不見,心中是萬千的興奮。 前方的小屋是機場的入境處,整個Paro International Airport 真是「一眼睇晒」,面積小得實在無法跟香港國際機場相比,但不丹的機場就是擁有這樣的古雅建築風味。從行李帶運送出來的除了是行李外,還有一部又一部的50吋大電視,平日去完日本後在行李帶上總是一箱二箱的手信,這次行李帶上的「手信」是大電視,令我們感到很意外。我們在想:「乜不丹冇電視買㗎咩?做咩個個都帶部電視返不丹做手信? 後來問導遊才知道為了不想資金向外地流走,不丹內是沒有國際品牌的店舖。國民們要是想買品牌旗下產品有兩個方法:一就是空郵到不丹,但要付上很重的税,二就是叫朋友坐飛機來的時候帶回來。相比之下,第二個方法較便宜也較多人用,這也就是在機場看到行李帶上的大電視包裹了。 別説是電子品牌或是衣物服飾的大牌子,就連麥當勞、711便利店等等連鎖店也沒有,只有本地品牌和小店。在不丹,真真正正地可以買到「Made in Bhutan」的貨品。對於拒絕國際品牌在不丹進駐,可以說是封閉,也可以説這是保護人民的方法,令市鎮上的小店持續發展,使經濟可以維持自給自足。

美高梅推出「颱風『天鴿』受災中小企援助計劃」
專題報導
LifeMag Editor・2017-09-07

美高梅推出「颱風『天鴿』受災中小企援助計劃」 美高梅今天推出「颱風『天鴿』受災中小企援助計劃」,協助受災之本地中小企業盡快恢復正常營運並持續發展,計劃屬美高梅中國控股有限公司、美高梅國際酒店集團與何超瓊女士支持風災後澳門重建工作的一部分。 颱風過後,美高梅亦預料其中小企供應商之業務將會一定程度受到風災的影響,因此迅速展開問卷調查,瞭解及評估企業的受災情況。該調查訪問了公司超過220家中小企供應商,全部是「小微企」、「澳門製造」和「青年創業」三個範疇的企業,因爲他們是較容易受影響的一群。 美高梅中小企業委員會舉行了特別會議,審核及分析調查結果,並制定了「颱風『天鴿』受災中小企援助計劃」,旨在紓緩受災中小企的營運壓力,以及提供持續性的支援。會議中,各委員分享了不同行業受災情況的進展,並且提出了多項建議讓中小企能夠受惠。 計劃涵蓋全方位的援助措施,以全力解決中小企的短、中、長期需要,當中包括加快付款程序及預付貨款以減輕流動現金壓力、物流支援,以及從輕微損失以至嚴重受災的補助等。 美高梅中國控股有限公司首席執行官及執行董事簡博賢先生表示:「透過調查,我們瞭解到是次風災讓公司超過60%的中小企供應商的業務構成損失。政府經已立即回應本澳中小企的迫切需求,但由於重建需時,我們的捐款會為本地中小企提供額外援助。這項中小企援助計劃不單止解決中小企的燃眉之急,更重要的是提供後續中期至長期的支援方案,讓他們能夠盡快復原並長遠發展。」

排程執行任務 | Linux Schedule Job
科技新知
MacauYeah・2023-09-07

在Linux底下,crontab是一個最簡單建立Schedule Job的方法。大家用crontab e 就可以進入設定。 # crontab e 1 optrun.sh 其中每個星號,順序代表的是分、時、日、月、星期。上面的例子就是不論何月何日何時,只要每一分鐘就執行一次optrun.sh Singleton Job 問題是,實際情況下,你想執行程式的時間都不一定會少於1分鐘。所以你總是有機會上一個job未跑完,下一個job就開始了。為了保障自已,需要一些參考機制,去決定是否讓job開始跑。 有些情況,可能你會想用job server去做監管,但若只為單線執行的工作,起一個job server還是會增加管理上的複雜性。 最簡單的做法,就是根據不同的程式語言,使用file lock(鎖上)的機制,先上鎖,再做事。但要注意考慮有沒有出現異常情況,令你自己反鎖自己。即是你的process死了,但不懂自己解鎖,這樣以後你也不能再執行了。 在Linux Bash Shell下,就有一個很簡單的做法,就是使用flock指令。用它的最大好處,就是從OS層面下,去鎖上。只要process結束了,不論正常還是不正常結束,都會自動解鎖。 以下例子就是在執行optrun.sh前,先要取得tmprun.lockfile的鎖。如果沒法取鎖,就自動放棄執行後面的指令。 flock n tmprun.lockfile optrun.sh # crontab e 1 flock n tmprun.lockfile optrun.sh Timeout 引入singleton的概念後,其實會引發另一個問題。因為異常的情況,還有機會是不生不死,process hang。所以我們還需要設定一個最大的執行時間,讓你的process在異常的情況下,被強行清走。 例如,ping指令在linux預設是永遠不會自動停止的,可以模擬process hang的情況。如果我們想定時從外部收走ping process,就可以使用timeout指令。以下指令就是2分鐘後殺指ping process。 # in file optrun.sh timeout 2m ping localhost # to check process id, you could use # gt; ps aux grep ping # you will see two different id for ping and timeout 配合errorcode使用,你可能還會在想在timeout時送出一個email通知自已。 # in file optrun.sh timeout 2m ping localhost exitCode=$ if $exitCode eq 124 ; then echo quot;timeoutquot; # enter email alert with timeout elif $exitCode gt 0 ; then echo quot;exit with errorquot; # enter email alert with timeout else echo quot;exit normalquot; fi 配合docker使用,你可能需要考慮signal怎樣傳遞。 在筆者測試的環境中,似乎SIGTERM會被擋,也有可能是SIGTERM太強,它只把前景的docker container run收走,但其內的ping process還在docker daemon中行走。所以最後改用SIGINT,讓docker container run可以好好地把SIGINT傳入其內。 # It seems that docker captured the SIGTERM. Send SIGINT instead # in file optrun.sh timeout signal=SIGINT 10s docker container run rm pingtest c 20 exitCode=$ if $exitCode eq 124 ; then echo quot;timeoutquot; # enter email alert with timeout elif $exitCode gt 0 ; then echo quot;exit with errorquot; # enter email alert with timeout else echo quot;exit normalquot; fi Full demo, github repo cronjobWithDocker

How could we keep a long distance relationship alive?
玄學星相
熊神進・2016-04-27

How to keep alive of a long distance relationship It really depends on how much you trust your boyfriendgirlfriend. Lyrics in a Cantonese folk song are written like this, being separated far away lovers, as long as you trust and understand one another, your love will not fade away. As we all know that itrsquo;s hard for long distance relationship to get happy ending, since love is inversely proportional to distance. For those couples who stay together every day, they could easily to forgive their boyfriendgirlfriend once they have had conflict, because sensing and intuition would do a great favour to making it up, for example, seeing tears falling down your girlrsquo;s cheek. On the opposite side, being reconciled will be not easy if the girl wrangling with her boyfriend far away. Itrsquo;s said that distance makes heart grow fonder, but in love, it might turns into a high wall between you and your lover. The mutual feelings will certainly get unromantic if a couple of lover couldnrsquo;t meet up often enough because of the too far away geographic distance between them. In reality, too far away geographic distance might lead to drifting your boygirl apart in psychological distance. Generally speaking, without great affection, long distance relationship is like a fragile glass, besides concerning their lovers, people might distrust their partners or worry about whether they have did anything disloyal. To sustain a long distance relationship, it needs to pay more cost. In my point of view, people in long distance relationship are much happier than ever before over the past decade because of the advanced internet technology and convenient transportation. Instead of talking face to face, we could hear the otherrsquo;s voice and watch their faces via telephone, internet and Skype, etc. All those kinds of contact ways could help with in making you feel better in lovesickness to a certain degree, and the more important is effective communication and mutual understanding could be achieved. Many of my clients are in long distance relationship, once people could accept a lover far away from them, it reflects that they are mentally mature and independent, which means their attachment styles are secure. The ldquo;securerdquo; people are not only selfconfident, but also they feel rather confident in their partners. An ideal relationship should be composed of understanding, sense and trust, however, long distance relationship misses out on the element of sense. So, in order to establish long distance relationship, the key point is keeping smooth communication, and itrsquo;s best to arrange regular date with your boyfriendgirlfriend so that you could not to miss himher too much. I used to introduce a method to people in long distance relationship, which was talking to your partner everyday and talking about everything in your life. Just express your feeling timely for making the other side clear that you are doing best to keep the relationship work.    如有任何問題,歡迎聯絡: 林小姐 13726267799晚8時後 熊神進:澳門 85366618785 Facebook 熊神進澳門風水師 公共微信 macaumasterxiong 淘寶風水法器店:httpmacauhung.taobao.com