搜尋

搜尋結果

德威航空飛首爾MOP1933
激安優惠
OHChance 旅遊誌・2015-11-27

價錢測試: 12月澳門飛首爾來回 德威航空新出一次小優惠,澳門-首爾來回連稅MOP1,933,價錢比之前貴左200幾銀!買德威航空記得要分開兩個單程買(即分開澳門-首爾、首爾-澳門兩個單程咁來買),咁樣回程首爾飛澳門就唔使俾燃油附加費!(註:德威目前以韓圜計價,加埋的總價是KRW279,630,上面個葡紙價只供參考) 提提大家,德威航空的票價已包10KG手提行李,以及15KG託運行李額,行李額無法額外加購,超重只能在counter 罰錢,罰金為MOP80/KG 或KRW9,000/KG。 ****** 注意: 之前的經驗是德威航空的付款系統對非韓國發出ge 信用卡好似有d 水土不服,付款失敗機率比其他航空公司高。且由於德威航空暫時港澳都沒有辦事處,請自行考量購買出問題後,要花時間處理的風險。如果碌卡後出現error且銀行send 信息話己過數,可以打去銀行問問是否確實已過數或只是開了授權,如果是後者,可以請銀行取消返個授權再重新買過;如是前者,則可以問銀行拿交易編號,然後跟德威航空聯絡。 ****** 【促銷公司】德威航空(T’way Airline) 【搭乘日期】11月28日至2016年3月26日 【販賣時間】已開賣,至11月29日00:59 【最長停留】沒有 【航班限制】沒有 【預訂網址】http://ohchance.info/ref/tway 編輯聲明====================================== 相關連結:http://ohchance.info/?p=3543 來源:OH!Chance!澳燦旅行資訊 |FaceBook:Oh!Chance! 經版權持有人授權CyberCTM.com發表。 ======================================

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

在Linux底下,crontab是一個最簡單建立Schedule Job的方法。大家用crontab -e 就可以進入設定。 # crontab -e */1 * * * * /opt/run.sh 其中每個星號,順序代表的是分、時、日、月、星期。上面的例子就是不論何月何日何時,只要每一分鐘就執行一次/opt/run.sh Singleton Job 問題是,實際情況下,你想執行程式的時間都不一定會少於1分鐘。所以你總是有機會上一個job未跑完,下一個job就開始了。為了保障自已,需要一些參考機制,去決定是否讓job開始跑。 有些情況,可能你會想用job server去做監管,但若只為單線執行的工作,起一個job server還是會增加管理上的複雜性。 最簡單的做法,就是根據不同的程式語言,使用file lock(鎖上)的機制,先上鎖,再做事。但要注意考慮有沒有出現異常情況,令你自己反鎖自己。即是你的process死了,但不懂自己解鎖,這樣以後你也不能再執行了。 在Linux Bash Shell下,就有一個很簡單的做法,就是使用flock指令。用它的最大好處,就是從OS層面下,去鎖上。只要process結束了,不論正常還是不正常結束,都會自動解鎖。 以下例子就是在執行/opt/run.sh前,先要取得/tmp/run.lockfile的鎖。如果沒法取鎖,就自動放棄執行後面的指令。 flock -n /tmp/run.lockfile /opt/run.sh # crontab -e */1 * * * * flock -n /tmp/run.lockfile /opt/run.sh Timeout 引入singleton的概念後,其實會引發另一個問題。因為異常的情況,還有機會是不生不死,process hang。所以我們還需要設定一個最大的執行時間,讓你的process在異常的情況下,被強行清走。 例如,ping指令在linux預設是永遠不會自動停止的,可以模擬process hang的情況。如果我們想定時從外部收走ping process,就可以使用timeout指令。以下指令就是2分鐘後殺指ping process。 # in file /opt/run.sh timeout 2m ping localhost # to check process id, you could use # > ps aux | grep ping # you will see two different id for ping and timeout 配合errorcode使用,你可能還會在想在timeout時送出一個email通知自已。 # in file /opt/run.sh timeout 2m ping localhost exitCode=$? if [[ $exitCode -eq 124 ]]; then echo "timeout" # enter email alert with timeout elif [[ $exitCode -gt 0 ]]; then echo "exit with error" # enter email alert with timeout else echo "exit normal" 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 /opt/run.sh timeout --signal=SIGINT 10s docker container run --rm pingtest -c 20 exitCode=$? if [[ $exitCode -eq 124 ]]; then echo "timeout" # enter email alert with timeout elif [[ $exitCode -gt 0 ]]; then echo "exit with error" # enter email alert with timeout else echo "exit normal" 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 boyfriend/girlfriend. 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 it’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 boyfriend/girlfriend 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 girl’s cheek. On the opposite side, being reconciled will be not easy if the girl wrangling with her boyfriend far away. It’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 couldn’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 boy/girl 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 other’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 “secure” people are not only self-confident, 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 it’s best to arrange regular date with your boyfriend/girlfriend so that you could not to miss him/her 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時後) 熊神進:澳門 853-66618785 Facebook: 熊神進(澳門風水師) 公共微信: macaumasterxiong 淘寶風水法器店:http://macauhung.taobao.com