2012年8月21日 星期二

[Python] 算複利小程式

"""Compound Interest"""

max_month = 20 * 12;
curr_month = 0;
money = 58390;
saving = 0;
rate = 0.05 / 12;

while (curr_month < max_month):
    curr_month += 1;
    saving = saving * (1 + rate);
    saving += money;

print(saving);

[Perl] 算複利小程式

#!/perl
use strict;
use warnings;

my $max_month = 20 * 12;
my $curr_month = 0;
my $money = 58390;
my $saving = 0;
my $rate = 0.05 / 12;

while ($curr_month < $max_month) {
    $curr_month++;
    $saving = $saving * (1 + $rate);
    $saving += $money;
}

print "$saving\n";

2012年8月17日 星期五

Anímate y habla

1. Laura levantó a las ocho en punto.
2. Laura lavó las manos a las ocho y cinco.
3. Laura desayunó a las ocho y veinte.
4. Laura salió de casa a las ocho y treinta y cinco
5. Laura saludó a su estudiante de español a las ocho y cincuenta.
6. Laura deció adiós a su estudiante de español a las dos de la tarde.
7. Laura comió a las dos y media.8. Laura trabajó a las siete y quince.
9. Laura cenó las nueve de la noche.
10. Laura fue a dormir a las once y media de la noche.

2012年8月15日 星期三

[News] Deaths spotlight Taiwan's 'overwork' culture

20 March 2012 Last updated at 00:54 GMT

Deaths spotlight Taiwan's 'overwork' culture
By Cindy Sui
BBC News, Taipei

Taiwanese labour activists rallied at the Council of Labour Affairs in Taipei last year

Working hard is ingrained in Taiwanese society. But recent deaths attributed to overwork are leading people to question the culture for the first time.

The deaths of nearly 50 workers last year were blamed on working more overtime than allowed by law. This figure was as much as four times higher than the previous year, according to the Council of Labor Affairs (CLA).

There have been many high-profile cases over the past two years. They include:
  • Hsu Shao-pin, 29, an engineer at Nanya Technology, who worked 99 hours of overtime monthly, six months before he died. His parents found him slumped over his desk at home in 2010. He had died from a heart attack.
  • Chiang Ding-kuo, 29, a security guard for Chien Hsiang Security Service, suffered a stroke while working in 2010. In the nine years before he died, he worked 288 to 300 hours a month.
  • Hsieh Ming-hung, 30, an engineer for smartphone maker HTC, died in his dormitory in February. He worked an average of 68 hours of overtime monthly.

Investigators tasked by the government to look into what caused deaths related to overwork found that the victims generally had congenital conditions, especially heart problems. They also had high-risk factors, such as being overweight and being a smoker, which had been aggravated by too much work.

Many of them were in their late 20s to 40s.

'Finding loopholes'

The companies generally do not dispute the CLA's findings. They are only obliged to pay a relatively small fine for violating overtime laws. The labour insurance bureau compensates the victims' families for up to 3.75 years of their salary.

We've had these cases all along, including migrant workers who died from overwork. But in the past, some people thought it was just a regular heart attack.”Sun Yu-lianSecretary-general, Taiwan Labor Front

"We've had these cases all along, including migrant workers who died from overwork. But in the past, some people thought it was just a regular heart attack," said Sun Yu-lian, secretary-general of Taiwan Labor Front.

"What's different about the recent cases is that the families dare to speak out."

Although Taiwan's labour law mandates that workers should not do more than 46 hours of overtime a month, some could be exempted from this if they agree to it.

"There are laws, but there are problems with the laws being followed. It has to do with the local culture," said Peng Feng-me, a specialist at the CLA's labour safety and health department.

"Taiwan's employers don't follow the laws. They find loopholes because they think no one will check."

Based on CLA data, the number of overwork cases is disproportionately low compared to Taiwan's work force and to similar economies like Japan and South Korea, leading many to believe the problem is under-reported.

Hotline

Taiwan ranks among the top countries with the longest working day, based on statistics.

On average, Taiwanese employees work about 2,200 hours annually - that is 20% more than Japan and the US, 30% more than the UK and 50% more than Germany, according to government data.

A government study in 2010 found that 80% of the big Taiwanese tech companies being investigated violated overtime laws.

But some officials say that conditions have improved.

"In recent years, we've made changes in the law to let workers have more recreation time," said Lo Chih-chiang, who until recently was a spokesman for the president's office.

Most workers now get two days off a week. The government has also threatened to increase fines and even jail employers. It also set up a hotline for violation reports and even lowered the maximum work hours for certain occupations.

But many still see 12-hour work days as the norm, with some managers even giving up annual holidays.

Working hard in Taiwan is important to economic development, employers maintain

Susan Tai, who juggles 10-hour working days with caring for a baby, said leaving work early was not an option. "My colleagues would resent me and my boss would think I don't have enough work to do," she said.

Too late

Many also argue that Taiwan has to work so much to stay competitive.

Lin Bing-bin, who heads a business association, said that working hard in Taiwan is important to economic development.

"We, employers, agree we should raise workers' benefits, but we should not forget the hard-working attitude is a very important, basic factor of a country's economic development," said Mr Lin.

"The laws can be revised to be more strict and complete, but they shouldn't be too inflexible. If they are too strict, it could hurt Taiwan's economic development."

Trade unions are nearly non-existent or too weak to help pursue financial compensation. Many are also doubtful that the government will severely punish violators.

The problem with existing laws is the penalties are too light, analysts say. "Stepping up fines or jailing is too late - the worker has already died," Taiwan Labor Front's Mr Sun said.

But some companies, especially those with reported overwork-related deaths, are beginning to take notice. HTC banned employees from working past midnight after an engineer died, local media report. Nanya Technology now requires workers to get permission to work overtime, said vice-president Pei Lin Pai.

Mr Lo from the president's office said that as Taiwan seeks to "create a knowledge and innovation-based economy", "working hard will take on a new meaning". This means that long hours may not necessarily be the norm, but having time to recharge and be more creative should be factored in.

But while the prevailing culture continues, more workers have been reporting violations anonymously.

[Perl] Subroutines

順講檔案處理:
sub subroutine()
{
    die '[ERROR] &subroutine should get exactly one argument file' 
        if (@_ != 1);

    my $file = $_[0];
    die '[ERROR] File not found: '. $file unless (-f $file);
    
    open(FILE, '<' . $file);
    while (my $line = <FILE>) {
        chomp ($line);
        # ...
    }
    close(FILE);
}

網路上不乏優良文章。

為了避免寫爛CODE,盡早培養好習慣才是 ((請搜尋 good practice))

2012年8月13日 星期一

Rafa Nadal Facebook Message

Antes de ir a dormir, os dejo una foto de esta tarde. Después del entreno matinal, en la playa con mis primos.

Before going to sleep, I would like to share a photo taken this afternoon. After this morning training session, on the beach with my cousins.

  • antes de hacer algo > before doing sth
    • antes de salir del coche, asegúrese de que están las ventanillas cerradas > before you get o before getting out of the car, make sure that the windows are closed
  • después de (con sentido temporal) after;
    • lo saludé después del funeral > I said hello to him after the funeral
((下禮拜考試))

十大容易吃到的美食

除去家人煮的食物後,以下是推薦名單。不得不否認台北地雷蠻多的,搞得我只能固定幾家。
  1. 豚馬 (http://www.tunuma.com/),跟老闆新開的大業鍋物
  2. 高雄鳳山小陽春牛肉麵
  3. 雲林四湖上禮拜吃的辦桌
  4. 今天中午吃的丹堤簡餐
  5. MOS BURGER
  6. 台北公館蕭家乾麵的豬腳飯、控肉飯
  7. 高雄立林鐵板燒
  8. 正忠排骨飯 ((配清心青茶,當兵很愛這味))
  9. Pizza Hut ((其他種 pizza 都普普通通))
  10. 茄子咖哩

我媽煮的青蛙湯很好吃,煎魚也很棒,但沒辦法推薦給大家吃,美食除了要好吃,還要「容易」吃,不容易吃到的美食,只能在腦海中回憶。師大吃來吃去,還是台北滷味最好吃,不過朋友說味道稍鹹。公館的話,就是蕭家乾麵跟台大二活的茄子咖哩最好吃。士林勉強可以吃涼麵,味道還不錯。景美可以吃蛋包飯、羊肉炒麵、鐵板燒、三媽臭臭鍋,都還不錯。

2012年8月7日 星期二

101年7月消費者物價指數

普通新聞稿,許多媒體以颱風總結,其實下什麼結論都無所謂,我也不會當真。媒體沒義務教導大家什麼是 CPI,CPI 對民眾有什麼意義,講太多反而失焦 (某方面的焦)。我們最終會幫 CPI 找到她的位置。
  1. 7月份消費者物價總指數(CPI)為109.68(95年=100),較上月漲0.38%(經調整季節變動因素後漲0.25%),較上年同月漲2.46%,1-7月平均,較上年同期漲1.61%。
  2. 月份躉售物價總指數(WPI)為110.24(95年=100),較上月跌0.08%(經調整季節變動因素後漲0.13%),較上年同月跌1.71%,1-7月平均,較上年同期漲0.18%。

此外,所得層級別消費者物價指數變動分析表顯示
  • 可支配所得最低20%家庭:2.76%
  • 可支配所得中間60%家庭:2.48%
  • 可支配所得最高20%家庭:2.26%

這也不難想像,食衣住行樣樣不能少,誰用的「比率」最多,被影響的「比率」就越多。當然,若以總金額來看,高所得家庭的支出勢必增加最多。這給我們什麼啟示?咬緊牙關撐下去?我想大家都知道原因,知道改善並不容易,因此願意克勤克儉,先撐過再說。我也曉得,多數人若這樣想,情況只會越來越糟,當勞動多了抱怨,自找的靠杯,自找的低薪,自找的無薪假,又怎能甘心領薪水?

與其說工作賺錢,不如說找罪受,換取冤獄賠償。鬼島,你能期待什麼?



好。

扯完了,心情並沒有平復。

工作時,我常陷入自我的狀態,自私的以為別人按照我的邏輯運轉。最後往往發現,如此簡單的設計限制,32-bit 可以 64-bit 不可以,居然也能討論一天。

登山杖自有他的用處,但在登山杖前面裝魚標,企圖當捕魚工具,我就很感冒了。雖然登山杖可以這樣用,但我不會捕魚,抓不到魚,不能怪登山杖抓不到魚咩。聽起來很像推卸責任,但如果能用登山杖抓魚,我也會傾巢而出教你怎麼抓魚。但xxx我不會抓魚!怎麼說都聽不進去,不免讓人有挫折感。是不是自己太差?亦或溝通能力不好?



好。

因為捕魚的事,原本熟悉搭帳篷的工作被耽誤了,很好,大家都不要睡,繼續研究怎麼用登山杖捕魚。我對工作並不熱衷 ((還有其他要事要做)),但也沒那麼冷感。我只是想好好搭帳篷。好啦,是有那麼擺老不耐煩。雖然有些事那麼屎,有些事很有趣,就算再怎麼難過,早上至少有摸,這樣就足夠了!

2012年8月6日 星期一

堀田一都

『不要說話,老師!』

然後,堀田冷不防地抓住我夾克的衣襟,把我拉過去。

當我察覺堀田的臉靠向我時,她的嘴巴已經堵住了我的嘴。


((先幫大家打預防針,本篇依舊是廢文))


原本預期會有更刺激的情節,結果只有親嘴而已,大失所望,老鼠不夠壞,呦。暖暖甜甜,精神衰弱,高中少女,快節奏神話現實交錯,晚上一不小心,就翻完了。令人想起百年孤寂的另一端,輕鬆。題材可輕可重,劇情可簡可繁,若能一口氣屏住讀者呼吸,那就是好小說。


鹿男做到了嗎?


((許多變身故事,主角多半選擇返回正常人。一旦回到正常人,整個就結束了,不管是書本頁數,還是腦中幻想。鹿男短暫逃離現實,躲到半夜兩點,還是得思量早起上班。若要永遠逃離現實,說不定精神耗弱是唯一解。與其說逃離現實,不如講減少外界刺激,外面那麼多垃圾刺激,少接收比較好))


當我跟貓咪說話,我不是精神衰弱。我真的懂貓語,鹿男可以幫我作證。

結屎

以為週末去的了龜山島,沒想到蕁麻疹又來做亂,肚子紅紅一塊一塊,手臂冒出許多紅點,有點生氣,它不應該在那麼奇怪的時間點出來,特別是抗組織胺、類固醇的藥快吃光的時候。結屎。不過再多抱怨也沒有用,就是癢,很難忍住不抓,怕抓破皮,只能輕輕的抓呀抓,而且紅點會飄移,抓再大力也沒用,白了工。與其說搔不到癢處,不如說癢處全身亂飄。

((可以開一星期的藥量擋急嗎?))

上週整個被蕁麻疹擊垮,據說是對摸不敬得到報應。這報應未免也太慘重了吧!好久沒能安心睡覺。為此,再次整理房間,好好洗一次床單,然後就沒事了?最好那麼簡單,這頂多排除塵璊過敏的可能。摸說抵抗力變差,或許吧,太久沒爬山,身體整個在抗議了,我也不想莫名其妙的滑下去,莫名其妙的生龍活虎走出醫院,實際上腳稍微動很大力就會動,那種感覺很差,但也不想整天賴在椅子上不走路。

不過比起雞芭的蕁麻疹,我寧可選腳痛,抓全身超像變態,而且腳痛畢竟會好,蕁麻疹想來就來,完全不理會我的心情,我的睡眠狀態,唉。剛問麻麻小時候有沒有蕁麻疹,果然有,也跟摸說的一樣,抵抗力變差。以前生活比現在還墮落,怎麼可能現在會中咧?之前天天爬山耶!真是見鬼了!該不會變老了吧?

雖然不想承認,但二字頭快沒了,可怕。時間教我好多事情,也奪走我的生命。

((我還是二十九歲!!!))

2012年8月5日 星期日

[Introduction to Commutative Algebra] Exercise 1.1

作者:Atiyah & Macdonald

複習一下交換代數,宅在家太無聊。但也因為心情愉快,較能專心算數學。雖然自己不善解人意,容易惹她生氣,她也真的生氣,但她也夠包容了,不去計較我的愚蠢。每次低潮都是向上的勇氣,如果做了後悔的事,那就不要繼續後悔。「這裡什麼都沒有,就算你再害羞、再沒自信,也沒有地方躲,現在你們只要相信曾經流過的汗水。」

Exercise 1.1: Let x be a nilpotent element of a ring A. Show that 1+x is a unit of A. Deduce that the sum of a nilpotent element and a unit is a unit.
Proof: x^n = 0 for some n > 0. So (-x)^n = 0 for that n. It means 1 - (-x)^n = (1 - (-x))(1 + (-x)^2 + ... + (-x)^{n-1}) = (1 + x)(1 + (-x)^2 + ... + (-x)^{n-1}) = 1. That is, 1 + x is a unit of A.

Next, all we need to do is to prove u+x is a unit where u is a unit and x is a nilpotent. It is trivial since u+x = u(1+u^{-1}x). u^{-1}x is nilpotent. Also, a unit multiplies by a unit is also a unit. ((uv)(v^{-1}u^{-1}) = 1.)

很多時候,常常需要回到原點。數學已經離我很遠,但那曾經的感動,還是耐人懷念。至於人間「溝通」兩三事,又是另種藝術值得學習與玩味。兩個字「溝通」,也要流過汗水。

2012年8月4日 星期六

pantalla

screen (de cine, televisión, ordenador)
  • la pequeña pantalla -> the small screen, television
  • la pantalla grande -> the big screen
  • mostrar en pantalla -> to show on the screen
  • una estrella de la pantalla -> a TV/movie star
  • pantalla (acústica) -> baffle
  • pantalla de cristal líquido -> liquid crystal display
  • pantalla gigante -> big screen
  • pantalla plana -> flat screen
  • pantalla de radar -> radar screen
  • pantalla táctil -> touch screen

Pantalla bloqueada (bloquear = to block)
Pantalla de inicio (inicio = start; beginning)
Ambas (= both)
Cancelar

iPhone 桌布設定西語教學。

2012年8月3日 星期五

走過的山林

2012年
2012-07-27 大屯主峰
2012-07-07 ~ 09 閂山 (#17)、鈴鳴山 (#18)、無明山西峰 (永生難忘,唉)

2012-06-28 ~ 29 畢祿山 (#15)、羊頭山 (#16) 鋸齒連峰、石門山、合歡主峰
2012-06-23 北插天山水源地 (摸摸行)
2012-06-17 棚集山
2012-06-03 大屯主峰、面天山、向天山 (龍頭教官地圖課)

2012-05-26 ~ 27 桃山、品田山 (#14) (公司雜事煩心)
2012-05-19 劍潭山、文間山、剪刀石山、金面山 (公司系統上線)
2012-05-07 松羅湖 (眼鏡蛇)

2012-04-20 檜山 (見到死去的青蛇,好久沒走新的中級山)
2012-04-14 ~ 15 合歡北峰、合歡西峰 (#13) 下華崗
2012-04-08 北插天山
2012-04-04 七星山南峰、主峰

2012-03-24 劍潭山
2012-03-17 ~ 18 郡大山 (#11)、望鄉山、西巒大山 (#12)
2012-03-11 大屯主峰

2012-02-26 ~ 2012-03-01 馬來西亞婆羅洲神山 (神奇)
2012-02-19 七星山主峰
2012-02-11 北插天山水源地 (摸摸行)
2012-02-05 北插天山水源地 (摸摸行)
2012-02-01 石碧潭山、中坑山、牛欄窩山、下橫坑山、雞寮坑山、南何山、南何山南峰、沙坑山、二確山、大肚山 (飛沙縱走)

2012-01-28 七星山主峰
2012-01-15 八仙山、佳保台山
2012-01-07 ~ 08 華崗上合歡主峰 (#10)(刺激) 



2011年
2011-12-31 ~ 2012-01-01 北大武山 (#9)
2011-12-17 ~ 18 奇萊北峰 (#7)、奇萊主峰 (#8)
2011-12-11 深按頭山 (大咖家後院)
2011-12-02 ~ 04 桃山 (#5)、詩崙山、喀拉業山 (#6)

2011-11-29 南插北峰(上宇內山)、南插天山、魯培山
2011-11-19 金面山、剪刀石山
2011-11-12 桃源谷下草嶺古道
2011-11-06 天母古道
2011-11-05 露門山西北稜縱走波露山東轉東北稜 

2011-10-29 ~ 30 立鷹山、三角山、櫻櫻山、合歡北峰 (#4)、武法奈尾山
2011-10-23 多崖山、北插天山(滿月圓瀑布、小樂佩、傳統路O形)(摸摸行)
2011-10-16 七星山主峰
2011-10-15 鳶嘴山連走稍來山
2011-10-08 ~ 09 東模故山東北稜 (可怕)

2011-09-24 ~ 25 波露山東轉東北稜
2011-09-17 ~ 18 露門山西北稜、大保克山北稜
2011-09-10 滿月圓山、北插天山西北稜、多崖山

2011-08-27 七星山主東峰
2011-08-19 ~ 22 雪山主峰 (#3)、雪山東峰 (#2) 訪翠池
2011-08-14 竹篙山
2011-08-13 卡保山、逐鹿山
2011-08-07 拉卡山
2011-08-06 組合山、樂佩山
2011-08-03 象山六巨石

2011-07-27 南勢角山
2011-07-24 七星山主東峰
2011-07-23 外鳥嘴山、蓮包山
2011-07-16 逐鹿山
2011-07-09 七星山主東峰

2011-06-26 東眼山
2011-06-25 新山夢湖 (未至新山)
2011-06-24 獅仔頭山前峰
2011-06-18 逐鹿山、卡保山
2011-06-14 仙跡岩
2011-06-05 石筍尖
2011-06-04 夫婦山

2011-05-29 面天山、向天山、向天池
2011-05-28 天母古道
2011-05-21 塔曼山
2011-05-14 小獅山

2011-04-23 猴山岳
2011-04-03 北插天山 (人生第一次爬中級山,也是一個人自己爬)

2011-03-05 大屯主南西峰



2010年
2010-12-18 七星山主峰
2010-07-18 草嶺古道
2010-03-07 石門山 (#1)(莫名其妙開始爬百岳)

台北市土石流雷區

來源:清晨土石流 興隆路寶來社區 急撤離 ((自由時報 – 2012年8月3日 上午4:38))
  • 台北市文山區興隆路三段寶來社區一百五十多名住戶
  • 木柵路五段象頭埔老聚落十六戶居民進行撤離
  • 指南路三段四十巷也因山坡土石滑落至馬路
新北市有空再搜集資料。

2012年8月2日 星期四

df - display free disk space

$ df -g
Filesystem    1G-blocks Used Available Capacity iused    ifree %iused  Mounted on
/dev/disk0s2        112   19        92    18% 5055819 24356549   17%   /
devfs                 0    0         0   100%     628        0  100%   /dev
map -hosts            0    0         0   100%       0        0  100%   /net
map auto_home         0    0         0   100%       0        0  100%   /home

還算乾淨的 MacBook Air 128G 硬碟使用狀況大約如此,還有 92G-blocks。

2012年8月1日 星期三

癢斃了

2012-08-01

全身過敏,癢斃了,越抓越癢,洗澡仍不見改善。

蕁麻疹是一種紅、腫又非常癢的皮膚反應。它會突然發作、有時一二個鐘頭就消失,有時會持續長達二十四小時。它的特色是在身體的不同部位發作,有時一邊消失了,另一邊又長出來。

下午屁股癢就該留意,傍晚轉移到手臂,誤以為被蚊子咬。回家整隻手臂都是,洗澡才發現超慘的,肚子一半正常,ㄧ半紅通通,噁心。現在手、腳,特別是臀部,癢斃了。可能是台北雨太髒,或對摸摸口出惡言得到報應。發作部位不斷轉換,真像空中的雲隨人聯想,蟾蜍醜背、融為ㄧ片、轉移漂浮、發紅變燙。

癢。


2012-08-02

躺到早上六點才睡著,下午三點起來,跟變態一樣全身摸來摸去。癢到不想寫了,撤。晚上看醫生((天主教耕莘醫院永和分院皮膚科張富程醫師)),打針。


2012-08-03

不禁感佩醫生跟科學家的付出與奉獻。


2012-08-04

晚上又來了,磨到四點,今天龜山島也泡湯了。

post-mortem

Now, a few words on looking for things. When you go looking for something specific, your chances of finding it are very bad. Because, of all the things in the world, you're only looking for one of them. When you go looking for anything at all, your chances of finding it are very good. Because, of all the things in the world, you're sure to find some of them.

Almost a century ago, Werner Heisenberg formulated one of the great principles of quantum physics, which describes the behavior of particles at atomic and smaller scales: one can accurately determine the position of a particle OR one can accurately determine its motion, but one cannot determine both accurately at the same time.

Reference: http://www.porcupine.org/forensics/forensic-discovery/chapter1.html