2015年11月29日 星期日

[python] list all objects attributes and method 列出物件所有屬性與方法


[python] list all objects attributes and method 列出物件所有屬性與方法 


使用 
obj.__dict__
可以列出所有的屬性跟方法與內容,回傳回來的會是一個dict。

for k,v in obj.__dict__.items():
    print k,v

或是使用

 dir(obj)

借出所有的 attributes 的keys

ex
=====
import tweepy
auth = tweepy.AppAuthHandler(consumer_key, consumer_secret)
api = tweepy.API(auth, wait_on_rate_limit=True,wait_on_rate_limit_notify=True)
if not api:
    print "Can't Authenticate"
    exit()

print 'lol'
q='#apple'
count='2'
tweets = api.search(q=q, count=count)
for t in tweets:
    print t.text
    print dir(t)

['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__getstate__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_api', '_json', 'author', 'contributors', 'coordinates', 'created_at', 'destroy', 'entities', 'favorite', 'favorite_count', 'favorited', 'geo', 'id', 'id_str', 'in_reply_to_screen_name', 'in_reply_to_status_id', 'in_reply_to_status_id_str', 'in_reply_to_user_id', 'in_reply_to_user_id_str', 'is_quote_status', 'lang', 'metadata', 'parse', 'parse_list', 'place', 'possibly_sensitive', 'retweet', 'retweet_count', 'retweeted', 'retweets', 'source', 'source_url', 'text', 'truncated', 'user']


2015年11月27日 星期五

DHH The day I became a millionaire 當我變成百萬富翁的那天



DHH  The day I became a millionaire  當我變成百萬富翁的那天

DHH 是我敬佩的一派新生活的佼佼者,生長在丹麥,因為要開發項目管理軟體Basecamp ,而順手完成了Ruby on Rails 這個網頁框架。這邊文章,主要講述DHH 的自我追尋與歷程,這是我很喜歡看他的書跟文章的地方。

其他由他們公司 37signals (後來改成最紅的項目管理軟體Basecamp同名) 的出版品


The day I became a millionaire — Medium
https://medium.com/@dhh/the-day-i-became-a-millionaire-55d7dc4d8293
Ruby on Rails發明人的告白:賣掉股票、變身百萬富翁的那天,我得到了什麼呢?
http://feed.wordcorp.net/blog/post/the-day-i-became-millionare 

"我能走到今天,是因為政府提供了生育補貼、幼教照顧、醫療保健、教育,以及資金協助。真要說什麼體悟的話,我發現真正讓我快樂的,其實是全心專注時所得到的寧靜與心流狀態(flow)。感覺就像我去把舞台上那百萬富翁的專屬布幕拉開了,才發現布幕後面最重要的東西,我早就擁有了。"

生長在那樣的地方,讓他有了生活的基本需求。
從這樣個過程中,他更加體認到兩件事情,

  • 第一個,就是只要保持基本的生活需求,其他的事情對於成功影響就小了。也就是,他沒有很好的環境都有追求成功的能力,那你呢?
(I got where I am thanks to government-sponsored maternity leave, child care, health care, education, and even cash assistance. I grew up in housing provided by AAB, a union-founded affordable housing association. 不過,是因為政府的社會福利保證了每個人追求夢想的基本需求。就像馬斯洛需求金字塔中提到的,最基本的需求,就是生存的需求。一個廉能的政府,有保證人過這樣生活的基本義務。)

  • 第二點,直到他真的成為百萬富翁後,他在自己承認並且欣賞這樣的事實。這個也就是他這篇文章所要講的。
從小的時候他就跟自己的兄弟玩著“What would you do if you won a million kroner?” game ,如果我成為百萬富翁,我將會做什麼?

在還沒有達成這麼目標之前,他總是能夠寫下很多的清單跟需求,他以為,他只要成為百萬富翁的那刻,一切一切就會得到滿足了。

Common fallacy of wealth: “I’ve never seen an unhappy person driving a Lamborghini”財富的謬誤:我從來沒有看過一個開藍寶堅尼而不開心的人。

他總想要的更多,得到更多的金錢來滿足自己的夢想清單。直到 2006年Amazon 的 Jeff Bezos 貝佐斯 對於 Basecamp 很感興趣,這個夢想終於實現。DHH 跟他的朋友各自賣出了一些股票給 Jeff Bezos 貝佐斯 ,並且各獲得了百萬美元。(雖然說 Basecamp 並不缺資金,這是 DHH 嚮往的 "公司" 型態,能夠做好一些事情,並且對世界做出改變,這樣足矣)

DHH 永遠記得他興奮的去檢查自己的銀行帳戶的情境,帳戶裡面的數字,就像做夢一樣。他終於美夢成真了。剛開始他興奮不已,他可以買下他的夢想清單上的東西跟完成一切他期望的事情。

另外一個好處,就是 "Never Having To Work Again." 永遠不必工作。像一直嚮往著悠閒的生活會隨之而來的永恆幸福。我自己想了很多,並且對些錢做了些計算,如果把他們投入在股票債券中的穩鏡投資組合,將會活的舒服跟舒適。如果不奢侈的揮霍,那麼將可以花到我手指都舉不起來的那一天。不斷的去思考有錢可以幹嘛幹嘛,在一整週內都感覺到滿滿的幸福。

隨之而來的是一種衝突,你會說現在有什麼不一樣了嗎?不,百萬富翁的這個事實依舊存在。
這一切都沒有錯,我可以在餐廳點餐而不用注意他的價格。這個感覺有點像是,有一部好電影,終於被炒翻,不會讓你失望,這一切終將遇見。"Expectations, not outcomes, govern the happiness of your perceived reality." 你的幸福感是由你的期望所決定,而不是由最後的果決定。

在剛開始的幾個月內,我很少去花那些錢。當然,我買了一個大螢幕的電視還有一些我可能看也看不玩的DVD。而這些我在之前也能夠做。一直到了那年年底,我才真正的揮霍的買了一台黃色的藍寶堅尼( A yellow Lamborghini )
















ref.
Ruby on Rails - 維基百科,自由的百科全書

2015年11月24日 星期二

[php][codeigniter] 不在codeigniter 資料夾內使用db model

如果有個程式,並不存放在 codeigniter 的資料夾內,但是要使用相關的db model與語法。

紅色兩行根據自己的目錄結構來擺放,主要是讓該php可以讀取到codeigniter的lib。


<?php
defined('DS') OR define('DS', DIRECTORY_SEPARATOR);
defined('EXT') OR define('EXT', '.php');
defined('ENVIRONMENT') OR define('ENVIRONMENT', 'development');
$dir_path = dirname(__FILE__) . DS;
defined('BASEPATH') OR define('BASEPATH', $dir_path . 'm/system' . DS);
defined('APPPATH') OR define('APPPATH', $dir_path . 'm/application' . DS);


function getDBConnector(){
    include_once(BASEPATH . "core/Common.php");
    include_once(BASEPATH . "core/Exceptions.php");
    require_once(BASEPATH . 'database/DB' . EXT);
    $conn = & DB();
    return $conn;
}  
$db = getDBConnector();
/*echo $db->get('vote_table')->result_array();
print_r($db->get('vote_table')->result_array());
*/
$query = $db->select('itemid, count(itemid) AS num')
              ->group_by('itemid')
              ->order_by('num', 'desc')
              ->get('vote_table', 24);
$r=$query->result();
print_r($r);
$votes=array();
?>

[php][codeigniter] stdClass how to get value 得到值

在使用 codeigniter 做,db query時,若是直接把 result 給 print_r 出來,會看到是stdClass。

stdClass object 可以使用 -> 去指定key 來取值。

例如
foreach ($r as $d ) {
  # code...
  echo 'item ';
  echo $d -> itemid ;
  echo $d -> num;
}

<?php
defined('DS') OR define('DS', DIRECTORY_SEPARATOR);
defined('EXT') OR define('EXT', '.php');
defined('ENVIRONMENT') OR define('ENVIRONMENT', 'development');
$dir_path = dirname(__FILE__) . DS;
defined('BASEPATH') OR define('BASEPATH', $dir_path . 'm/system' . DS);
defined('APPPATH') OR define('APPPATH', $dir_path . 'm/application' . DS);

function getDBConnector(){
    include_once(BASEPATH . "core/Common.php");
    include_once(BASEPATH . "core/Exceptions.php");
    require_once(BASEPATH . 'database/DB' . EXT);
    $conn = & DB();
    return $conn;
}  
$db = getDBConnector();
/*echo $db->get('vote_table')->result_array();
print_r($db->get('vote_table')->result_array());
*/
$query = $db->select('itemid, count(itemid) AS num')
              ->group_by('itemid')
              ->order_by('num', 'desc')
              ->get('vote_table', 24);
$r=$query->result();
?>


Array
(
   [0] => stdClass Object
(
  [itemid] => 14
  [num] => 1
)
)

2015年11月23日 星期一

[linux] apache 404 Page Not Found codeigniter on Ubuntu


使用 codeigniter 在撰寫 application 時,若是一直得到 404 Page Not Found 的訊息。
可以檢查


  • application 下的 .htaccess

是不是有寫rewrite 過

/var/www/ci
這樣網址可以直接打 http://localhost/ci/<view>

<IfModule mod_rewrite.c>
  RewriteEngine On
  # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
  #  slashes.
  # If your page resides at
  #  http://www.example.com/mypage/test1
  # then use
  # RewriteBase /mypage/test1/
  RewriteBase /ci/
 #RewriteRule ^index.php/(.*)$ /$1 [R=302,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond $1 !^(index\.php|images|robots\.txt|$)
  RewriteCond $1 !^(static|$)
  #RewriteRule ^(.*)$ index.php?/$1 [L]
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
  # If we don't have mod_rewrite installed, all 404's
  # can be sent to index.php, and everything works as normal.
  # Submitted by: ElliotHaughin
  ErrorDocument 404 /index.php
</IfModule>


  • /etc/apache2/apache2.conf


<Directory /var/www/ci>
    Options Indexes FollowSymLinks
    AllowOverride All
    #Require all granted
</Directory>     

2015年11月19日 星期四

[武術] 吳式太極拳 四隅推手 單練 大象搖頭 二十四式功法

 吳式太極拳 四隅推手 單練 

吳家太極拳有很多次第的訓練,其中一個基礎的訓練就是 四隅 推手

四隅顧名思義,就是四個斜向的推手,有別於四正手。

四隅推手單練

左腳左手先
左腳右手先

上步

右腳右手先
右腳左手先


大象搖頭 二十四式功法

大象搖頭 這個功法,就是在練習轉腰與鬆沉勁。





2015年11月18日 星期三

[mac] fatal error: 'assert.h' file not found #include

fatal error: 'assert.h' file not found
#include <assert.h> 問題

try 

xcode-select --install

[mac] brew update Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master


$brew update
error: Your local changes to the following files would be overwritten by merge:
README.md
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

解決方式
cd $(brew --prefix)
git reset --hard HEAD
brew update

2.

cd /usr/local && git reset --hard FETCH_HEAD
or if it fails
cd /usr/local && sudo git reset --hard FETCH_HEAD

2015年11月17日 星期二

[linux] 使用 sed 印出 奇數行 或 偶數行 print odd or even line using sed

[linux] 使用 sed 印出 奇數行 或 偶數行 print odd or even line using sed

有時候想要只印出文件的奇數行或是偶數行,可以使用 sed來達成

印出奇數行

sed -n 'p;n' file

印出偶數行

sed -n 'n;p' file


[ted] 東尼‧羅賓斯 安東尼.羅賓(Tony Robbins)談論為我們行為背後的動機與原因 Asks Why We Do What We Do 中文全文

東尼‧羅賓斯 安東尼.羅賓(Tony Robbins)談論為我們行為背後的動機與原因 Asks Why We Do What We Do





掌聲) 謝謝,我必須要告訴你們,我同感挑戰與興奮 我興奮的原因是:我能有回報的機會 我的挑戰是:我所舉辦最短的座談會通常是五十小時 (笑聲) 我並非誇大其詞。我會在週末進行,而我所作的... 我所作的甚至不僅於此,顯然地,訓練人群... 但我更相信沈浸式學習。因為你是怎麼學語言的? 你並不是只靠學習原則來學語言的。 你身置其中並經常使用,直至為真

我在這兒的原因的底線是,除了當個瘋狂的混蛋以外 是我真的正處於一個位置 我並不是來這邊激勵你們的。很顯然地,你們並不需要 很多時候那是大多人認為我會做的事情 但這卻是差最多的。真正發生的事情,是 人們告訴我:「我不需要任何激勵」 而我說:「噢!那可真是有趣!那不是我打算做的事情阿!」 我是「為什麼先生」,我想知道你行為背後的動機與原因。

你行為的動機是什麼? 是什麼驅使你,直至今日之斯?而非十年前的樣子 還是你不停在重複相同的模式?因為我相信 在內心啟動驅策的無形力量 是世界上最重要的事物 我在這裡,因為我相信情感是生命之力 在這裡的所有人都有偉大的心智 你知道嗎?我們大部份的人都有偉大的心智,對吧? 其他方面我不清楚,但是我們都知道如何思考 藉由我們的心智,我們能將任何事物合理化。 我們能讓任何事情發生!我們可以...我同意我在數天前所聽聞的 那個說大家都是為了自身利益而的工作的想法

但我們都知道,有時候這真是狗屁不通 你不會隨時隨地都為了你自身利益而工作 因為當你的情感到位時 就會以情感運作的方式來改變處理 對我們而言這是件多麼美妙的事,我們能有智慧的思考 關於世界的生命到底是怎麼回事,尤其 我們之中那些聰明人,能在腦中把這些事情完成 但我真的想知道的是,到底是什麼在驅策你

而我想要邀請你做的是 在我今天的演講之後,探索一下為何今天身置於此 有兩個原因。其一:因為可以奉獻更多。其二 我們希望能不只更了解其他人 而或許可以更欣賞其他人,創造某種連結 來阻止某些挑戰 我們今日在社會所面對的挑戰 這些挑戰只會越來越大 隨著連結我們的科技 讓我們產生更多交集,而這樣的交集 並不會總是產生這樣的觀點:「大家現在都更了解了解彼此 且大家都更欣賞彼此。」

所以, 基本上我著迷三十年了,而我著迷的事物一直是: 「是什麼造成人們生活品質的不同?」 「是什麼造成他們表現的不同?」 因為我就是靠這個賺錢的 所以我現在必須要產出成果 這是我做了三十年的事情。我會接到電話 那頭是在國家電視台上精疲力竭的運動員 他們領先五竿 而他們現在沒辦法回到賽道上 我就要馬上作點事情來產出成果 否則就沒差了。我會接到電話 那頭是想自殺的小孩 我就要馬上作點事情。在二十九年內 我很感激能告訴各位,在二十九年內,我成功救回了每一個 這並不表示我能一直維持不敗紀錄,但我過去還沒失手過 原因就是我了解他們的這些人性需求,也就是我想告訴你們的

所以,當我接到這些關於表現的電話時,這是一回事 你怎麼改變呢? 同時,我也在尋找,看看到底是什麼 在塑造這個人奉獻的能力 能作超越他們本身的事情。所以也許真正的問題是, 你知道的,我看著生命,說,有兩個重要的課題 其一是:成就背後是有科學的 幾乎每件事情都被作到了登峰造極的地步 第一個課題是:「你怎麼把無形的力量化為有形?」對吧 你怎麼讓你自己夢寐以求的事物成真? 不管是你的生意、對社會的貢獻、或是金錢? 不管對你來說是什麼 - 你的身體、你的家庭

但另外一個生命的課題,精通的人就少之又少了,就是自我實現的藝術 因為科學是簡單的,對吧? 你知道規則,寫好程式碼,跟隨... 然後就得到結果。只要你知道這遊戲的方式 你就,你知道的,你就會加碼,對吧! 但自我實現就是藝術了! 原因是,自我實現是欣賞 是奉獻。靠自己,你只能感覺到那些。 所以,我有個有趣的實驗室來回答這個問題。 這個問題中的問題,也就是這些人生命的差異到底在哪? 若你看著這些人 這些人是你所奉獻一切的人。就像是他們所聲稱 他們所需要的所有資源,你給他們的不只是百元電腦 而給他們最好的電腦。你給他們愛 給他們歡樂,你撫慰他們 而這些人經常,你知道的,至少我確定他們其中的一些 在餘生中帶著這些愛、教育、金錢 與其他背景,在戒護所中進出,揮霍餘生 之後你遇見經歷了極大痛苦的人 心理上、性上、心靈上、感情受創 雖然不總是如此,但經常是這樣,他們會變成 對社會貢獻最多的那群人之一

所以我們真的必須要問我們自己的問題是,到底是什麼? 到底是什麼在塑造我們?我們活在一個治療文化中 我們之中大部分的人都不會這樣作,但是我們的文化就是治療文化 而我這樣說的意思表示我相信我們都是過去的積累。 每個在這個房間的人,如果相信治療文化的理論 你就不會在這個房間裡了 但是,大部分的社會都認為一生中發生的事情是命定的 過去等同未來,當然是這樣若你這樣認為 但在這房間的人都知道 我們必須提醒我們自己 因為你有智識,知道一些事,你知道要作什麼 但沒有使用、沒有運用

所以我們真的要提醒我們自己 下決定才是最終的力量。就真的是這樣。 現在,當你問別人 「你曾經沒辦法達成某事嗎?」 「有多少人在生命中曾經 沒辦法達成重要的事情?」有的說「有」

群眾:「有」

東尼‧羅賓斯:謝謝你們的高度互動。 (笑聲)

但如果你問別人,為什麼你不去成就某件事情? 例如在你手下做事的人,或是工作夥伴 或甚至是你自己,當你沒辦法達成目標時 人們會給自己沒辦法達成的原因是什麼 他們會告訴你什麼?因為沒有...就是知道得不夠 沒有...知識。沒有...錢。 沒有...時間。沒有...技術。你知道的。 沒有對的經理人,沒有...

高爾:最高法院!(笑聲)

東尼‧羅賓斯:還有... (掌聲) 還有... (掌聲) 這些東西,包含最高法院在內,有什麼共同點? (笑聲) 這些事物都能聲稱你缺少資源,且可能是真確的! 你可能沒錢,也可能沒有最高法院 但是這不是關鍵因素! (掌聲) 糾正我!如果我錯了! 關鍵因素從來都不是資源,而是善用資源的能力! 我的意思是,讓我更精確的說 如果你有情感,人類的情感, 就像前日我從你身上體驗的一樣強烈 與我所經驗過的情感一樣深刻,而你曾用這樣的情感溝通過 我相信你一定能贏過他! (掌聲)

但是,對我來說告訴他應該作甚麼是多麼簡單的事情! (笑聲) 羅賓,你這笨蛋。但我知道當我們當時看這場辯論時 有情感阻絕了人們的能力 讓他無法得到他該有的智慧與能力 而在那天這場合讓一些人偶然碰上了 因為我知道一切人,他們本來想投你,但後來卻沒有 我對此不太高興。但,情緒在那裡,就在那裡! 有多少人知道我在說什麼?說:「有」

群眾:「有」

東尼‧羅賓斯:所以,就是情緒了。而如果我們有了正確的情緒 我們就能讓作成任何事情。我們能撐過去 如果你夠有創意、夠有玩興、夠有趣 你能跟所有人打成一片嗎?能不能?

群眾:能

東尼‧羅賓斯:如果你沒有錢,但你夠有創意與決心 你會找到方法,所以這就是終極的資源 但這不是大家告訴我們的,對吧? 大家告訴我們的是一堆不同的故事。 他們說如果我們沒有資源,但終究 如果你看看投影片,請抬頭,如果你願意的話 他們說,他們還沒完成的原因到底總共有哪些? 請換下一張。他打破了我的模式,那混蛋! (笑聲) 但我告訴你,我還是感謝他的活力 (笑聲)

決定你的資源的是什麼?我們說過決定會影響命運 這是我的重點。如果決定會影響命運,那會影響的 就是三個決定?你要把焦點放在哪邊? 現在,如果你要決定你要把焦點放在哪邊 在這秒鐘,不管有意識還是無意識地,當你決定要決定的那一分鐘 你就必須給你決定要聚焦的事物一個意義 而這個意義就會產生情緒 這是結束還是開始呢?神是在處罰我? 還是犒賞我呢?還是這就像是丟骰子一樣不確定? 之後某種情緒,就會創造我們的下一步或是行動

所以,想想你的人生 塑造你命運的決定 聽起來很沈重,但在過去五到十年 或十五年,你所下的決定造成了什麼樣的結果? 或是,若你當時的決定不同呢? 你的生命會完全不同嗎?有多少人能想出來? 說實在的,誰知道會比較好還是壞?說:「有」

群眾:「有」

東尼‧羅賓斯:所以這就是底線,或許這就是我們該開始下功夫的地方 或許是你過去碰見的人生摯愛 或是個生涯上的決定。我知道我在這兒看過的Google天才 我的意思是,我了解他們的決定 一開始是想要把他們的科技售出。如果他們做了這個決定 而不是建立他們自己的王國呢?世界會有什麼不同? 他們的人生會有什麼不同?他們的影響呢? 我們世界的歷史就是這些決定 當一個女人起身而說:「不,我不會坐到公車後頭」(譯按:指黑人女性拒絕移坐而引起種族意識抬頭的故事) 他並不只影響了他的生命。這個決定影響了我們的文化。 或是當有人站在坦克車前方,或是處於 藍斯·阿姆斯壯(Lance Armstrong)的處境,有人告訴你 「你得了睪丸癌」這對於任何男性都很難承受 尤其如果你是單車車手的話 (笑聲) 你腦子裡有了它,肺裡也有了它 但他決定聚焦的事物是什麼? 與大多數人不同。意思是什麼? 不是結束,而是開始。下一步我要作什麼? 他火力全開贏了七座冠軍。他之前從沒贏過 在他得癌症之前,但因為他有情緒調適的能力 心理的力量。那就是人與人之間的不同 我在我之前相處過約三百萬人中所見過的差異

因為這是我的實驗範圍。在過去的二十九年間我有過機會與 來自八十個國家的三百萬人互動 過了一陣子後,模式就很明顯了。 你看見南美與非洲 在某些方面上有所連結,對吧(指地圖上可以拼在一起,Gore於其影片中用過的段落)?其他人說 :「噢!那聽起來真荒謬!」簡單,那麼,是什麼決定蘭斯的? 是什麼決定你的?兩股無形的力量。很快談談。其一:狀態 我們都有過這樣的時刻 若你有過這樣的時刻:你在做了某事後,做完之後 你開始覺得,我真不敢相信我這麼說了 我真不敢相信我這麼做了,那真是有夠笨,有誰有過這種經驗的 說:「有」

群眾:「有」

東尼‧羅賓斯:你可曾作過些事情,做完之後你說:「這就是我!」 (笑聲) 對吧?這不是你的能力,這是你的狀態。 你的世界觀是長期型塑你的事物 你的世界觀是過濾器。形塑我們的東西 那就是讓人下決定的東西 當我們想影響他人,我們必須要知道 他們已經受了什麼影響 我相信這包含三部份 首先,你的目標是什麼?你追求的是什麼? 我相信,這跟你的欲望不同。 你可以有欲望或是目標。有多少人設立過目標 有過欲望或是想法的?大概就是這些吧? 有多少人有過?說:「有」

群眾:「有」

東尼‧羅賓斯:所以,我們有需求,我相信有六種人類需求 其次,一旦你知道驅策你的目標是什麼 而你真實的發現目標,不需要形成目標,發現就好 那你就會找到你的地圖是什麼 那就是你的信仰體系,告訴你如何得到那些需求 有些人覺得滿足那些需求要毀滅世界 有些人覺得要建造一些事物、創造一些事物,或是愛某人 所以你要選擇你的驅策力。很快帶過,六大需求。

讓我告訴你這些分別是什麼。其一:確定性。 現在所談的這些不是目標也不是渴望,是放諸四海皆準的 每個人都需要能夠避免痛苦的確定性 或至少能舒服的確定性。那要怎麼獲得呢? 控制他人?培養技能?放棄?抽根煙? 如果你能完全確定,很諷刺的 即便我們都需要 你若不確定你的健康、你的子女 你的金錢,你就不會想那麼多 你不確定天花板會不會掉下來 你不會聽任何講者說話 但當我們都以不同的方式獲得確定性,若我們得到完全的確定性後 我們會得到什麼?你若感覺確定時,你覺得如何? 你知道什麼會發生?何時會發生? 會如何發生?那你感覺會怎樣。 你會覺得無聊至極!所以,天阿,以她無窮盡的智慧。(譯按:玩笑話,因為應為男性「他」) (笑聲) 給我們第二個人類需求吧,也就是不確定性 我們需要變化,我們需要驚喜 在座多少人喜歡驚喜?說:「有」

群眾:「有」

東尼‧羅賓斯:胡說!你喜歡的是你想要的驚喜。 (笑聲) 你不想要的驚喜你稱之為問題,但你需要他們 所以,變化性是很重要的,你有租過你已經看過的 電影或是片子嗎?有人作過這種事嗎?真他媽的! (笑聲) 好,為什麼你會這樣作?因為你確信那不錯 因為你以前讀過、以前看過,但是你希望 因為過了好一陣子,你已經忘記了,而這就是變化的需求。

第三個需要:重要性。我們都需要感到 被重視、特別、獨一無二。你可以藉由賺更多錢達成 或是更具有靈性 你可以讓自己 有更多刺青或耳環,甚或在一般人不想知道的地方 不管代價為何,最快的方式是 如果你沒有背景、沒有文化、沒有信仰或資源 或是其他運用資源的能力,那就是暴力了。如果我拿把槍指著你的頭 而我又跟你住同一個社區,我馬上就有了重要性 0-10分,有多高呢?10分!我有多麼重要阿! 你要怎麼對我回應?10分!有多少不確定性? 誰知道接下來會發生什麼?蠻刺激的。 像是爬進洞穴後做做看這種事情 一路爬進去。完全是變化性與不確定性。 所以是重要的,是吧?如果你想冒生命的險 那就為什麼暴力總是在我們的周遭,且會一直持續下去 除非我們整個種族產生有意識的改變 現在,你可以有百萬種方式來得到重要性 但若要變得重要,你必須要獨一無二、與眾不同。

我們真的需要的是:愛與連結。也就是第四種需要。 我們都需要。大部分的人會定下來就是為了連結 因為愛太可怕了。不想要受傷 在這裡有在親密關係中受過傷的人嗎?說:「有」 (笑聲) 如果你不舉手,你也會有其他問題的!來吧! (笑聲) 如果你還要再被傷過一次 你難道不為今天來到了這個正向聚會而開心嗎? (笑聲) 事實是:我們需要它。我們可以經由親密實踐它。 或是經由友情、經由祈禱、經由在大自然中漫步 若什麼對你都沒效,養隻狗吧。別養貓。養隻狗。 因為只要你離開兩分鐘,感覺就像是你 已經離開了六個月一樣,即使你五分鐘後就出現了,對吧? (笑聲)

現在,這前四個需求,每個人都會找到滿足的方法 即使你欺騙自己,或是需要分裂個性 但是最後的兩個需求。前面的四個需求我們稱作 個性需求,我這樣稱呼 最後的兩個需求是靈性需求 這是實現感的來源。你沒辦法從前四個 得到實現感。你可以經由抽煙、喝酒、或是其他各式方法 來滿足前四者。但是最後的兩個:第五個 你必須要成長。我們都知道答案。 如果你不成長,那會怎麼樣呢?如果一段關係不成長? 如果一個事業不成長?如果你不成長? 不管你有多少錢 你有多少朋友,有多人愛你 你都會覺得像置身地獄一般。而我們成長的原因,我相信 是因為這樣我們才能給予他人有價值的事物

因為第六個需求是超出我們自己的奉獻 因為我們都知道,即便聽來已陳腔濫調 生活的秘密在於給予。我們都知道生命不是只是關於自己 而是關於群體。我們的文化知道,這房間裡的大家都知道。 而這是很刺激的。當你看到尼可拉斯(Nicholas)在台上談論 他的百元電腦,最熱情、刺激的事情是 他是個天才,但他聽到了呼召。 你可以感覺到他的不同,而那是美麗的。 而這樣的呼召可以感動他人,在我自己的生命中 我的生命當我在11歲時被感動,因為 感恩節:沒錢、沒食物,而我們將不會餓死 但我的父親完全搞砸了。我的母親讓他知道 他這次有多慘。有人來到了門前 給了我們食物。我的爸爸做了三個決定 簡短來說,我知道那些決定為何。他的焦點是:「這是慈善。 意義為何?我很沒用。我要作什麼? 我要離開這個家庭。」而他也真的離開了。那是我人生中 最為痛苦的經驗之一。我的三個決定則給了我不同的路走 我告訴我自己。「聚焦在有食物了」你知道,這是多麼了不起的概念 (笑聲)

其次,這是改變我生命的東西 這是形塑我生而為人的事物:「這是有人給我的禮物, 我甚至不知道他是誰。」我的父親總是說, 「沒人在乎」但突然間,有個我不認識的人 他們什麼都不要求,就只是給了我的家庭食物 看顧我們。這讓我相信了這個:「陌生人在乎我 對我來說的意義是什麼?而我的決定是, 如果陌生人在乎我與我的家庭,我也在乎他們。 我要作什麼呢?我要作點事 造成一些改變與不同。所以當我十七歲時,有天 我在感恩節時出門。這是我多年來的目標 有足夠的金錢來餵飽兩個家庭 最有趣的事情是我在我人生中作到了,這是最感人的一刻。 次年,我作到了四個家庭。我沒有告訴任何人我在做的事。 再次年,八個。我作這個並不是為了任何考績。 但八個之後,我想,媽的,我可以找人來幫忙。 (笑聲)

所以當然,我出去後我做了什麼呢? 我讓我的朋友加入這個計畫,開了公司 然後我有了十一個公司並建立了基金會 現在,十八年後,我很榮幸可以告訴各位,去年 藉由我們的基金會,我們餵養了在三十五個國家的兩百萬個人 都在假期期間:感恩節、聖誕節... (掌聲) 在世界各地各個不同的國家 真的很奇妙 (掌聲) 謝謝各位 (掌聲) 我告訴你們這事兒的目的不是為了自吹自擂。我告訴你們因為我身而為人 而引以為榮。因為當人體驗過為人群奉獻之後 每當有機會奉獻他們就會起而行,而非只是作而言

所以最後,我快用完我的時間了。形塑你的目標 人與人之間的不同是,我們有相同的需求 但是你是確定性需求特高的人嗎?那是你最重視的事物嗎? 或是不確定性呢?在這裡的這個人不可能是個對確定性需求特高的人 當他爬過那些洞穴時你就知道他不是了。你被重要性或是 愛所驅使嗎?我們都需要這六項,但是不管主要引領 你的系統為何,都會把你帶向不同的方向 當你往其中一個方向發展,你就有了目標或是命運 其二是規劃地圖,把他想成操作系統 他會告訴你怎麼到達目標,有人的地圖是: 「即便我為他人而死,我也要拯救生命」 他們是救火員,有人的是: 「我要藉著殺人來達成」他們試著滿足 相同重要性的需求,是吧?他們想要榮耀神 或是他們的家庭。但是他們有著不同的地圖。

而總共有七種不同的信仰。我沒辦法一一帶過 因為我要作結了。最後則是情緒 我會說地圖中的其中一塊像是時間。有人對於長時間的定義 是一百年,有人的則是三秒鐘 就像我的一樣 (笑聲) 最後我所提及的,向各位所提及的 如果你有目標,而且也有了地圖,那讓我們這樣說 我不能用Google因為我喜歡Macs,而他們在Mac上相關的應用 還不好,所以如果你用的是MapQuuest,有多少人有在使用 MapQuest的過程中犯過這個嚴重錯誤? (笑聲) 你用了這個東西而沒有抵達目的。想像 如果你的信念保證你永遠都無法抵達目的地? (笑聲)

最後一件事情是情緒 現在,我要告訴你關於情緒的事情是,情緒大概有6000種 我們在英語中都有相關對應的詞彙 若以語言的方式表現情緒,大概是這樣 也因此,這些情緒會被語言所改變。但如果你的主要情緒... 如果我有時間,我找了兩萬人或是一千人 我讓他們在平均一週內寫下他們所有所經歷過的情緒 他們多久我就讓他們寫多久 在其中一端他們寫下賦予他們力量的情緒 另一端則寫下剝奪他們力量的情緒 猜猜看這些人會經歷多少情緒?少於十二個。 而超過一半以上都讓這些人覺得糟透了。所以他們會有五或是六個 好的情緒,對吧?像是他們覺得:「快樂、快樂 興奮、不妙、挫折、挫折、受打擊、沮喪。」 有多少人認識那種不管發生什麼事情 都能不爽的人?有多少人認識這樣的人? (笑聲) 或者,也有那種不管發生什麼事情,都快樂、興奮的人 有多少人認識這種人?來吧!

當九一一發生時-讓我以這作結-我在夏威夷。 我與從四十五個國家來的兩千人在一起,我們正在為了 一個計畫翻譯,翻譯成為四種語言 計畫延續時間是一週。前一晚,我們稱為 「精通情緒」我起身,在無計畫的情況下我說 我們放了一堆煙火,且我說了很多瘋狂有趣的東西 然後在結尾我說,我計畫好要說這個 但我從不知道我要說什麼,忽然間我說 「人到底什麼時候真的開始活?當他們面對死亡的時候」 當我全部都說完後 如果你要離開這個島,如果九天後 你就要死了,你會打電話給誰,你會說什麼 你會作什麼?有個女人,那晚就是九一一發生的那晚 有個女人來了座談會,而當她來的時候 她的前男友被綁架並殺害了 她的朋友、她的新男友都想娶她,而她拒絕了

他說:「如果你想去夏威夷參加那活動,我們間就完了」 她說:「那就完了」當我當晚結束活動時,她打給了他 並留下個簡訊-這是真實故事-在世界貿易中心頂端 他所工作的地方,她說:「心愛的,我愛你,我只想讓你知道 我想嫁給你,我以前做的事情很笨。」她睡著了 因為對我來來說當時是凌晨三點,當他回電時 他從世貿中心頂樓說:「親愛的,我沒辦法告訴你這對我來說的意義。」 他說:「我不知道要怎麼告訴你 但是你給了我最棒的禮物,因為我就要死去了。」 而她把這段錄音放給當時在房間的我們聽。 她之後上了賴瑞‧金(Larry King)的專訪,他說:「你可能在想 這怎麼可能發生在你身上兩次。而他說 我能告訴你的是,這一定是神給你的訊息。 心愛的。從現在起,每一天都要付出你的全部,愛你的所有 別讓任何事物阻止你。」當她說完時,有個人站起來 他說:「我是從巴基斯坦來的(Pakistan),我是個回教徒。」 我想握著你的手說 我很抱歉,但是很老實的說,這是報復。我沒辦法把剩下的告訴你 因為我沒時間了 (笑聲) 最後十秒 (掌聲)

最後十秒,我只要十秒。我無意不尊重。只要十秒。 我想告訴你的是,我把這個人帶到舞台上。 跟一個從紐約來的,在世貿中心工作的人一起帶到台上。 因為在場大約有兩百個紐約人,超過五十個人 失去了他們整個公司、朋友、從他們的 Palm Pilots上劃掉紀錄-其中一個金融交易員,一個鋼鐵般堅強的女性,咆哮著 她從通訊錄上劃去了三十個死去的朋友 而我告訴他們的是:「我們要聚焦的是什麼?」 這個的意義為何?以及我們接下來要作什麼?

我讓這群人聚焦 如果你今天沒有失去一些人,你的焦點就會是 如何去服務另外一些人,有人是... 然後有個女人站了起來,她非常生氣,尖叫、大吼著 然後我發現她不是從紐約來的,她不是美國人 她不認識在場的任何一位,我說:「你總是生氣嗎?」 他說:「是的」罪人總會有罪,而傷心的人總會傷心 於是我把這兩個人抓在一起,並進行我所謂的間接談判 在受佔領土地上有家庭的猶太人,他在紐約 如果他當天要上班那他已經死了,而這個人 他想成為一個恐怖份子,且清楚表態 而整合的過程被我們拍下來了 我很樂意寄給你們看,你們就可以清楚看見 當真正發生時的狀況,而不是只聽我的口述說明 但這兩人不只和解了 更交換了他們對於這個世界的信念與道德觀 他們齊心協力,目前已共事了數年 在許多的清真寺與猶太廟堂中,傳達 如何創造和平的概念。他寫了一本書,叫做 「我的聖戰。我的和平之路。」所以,轉化真的是有可能的。

所以我邀請各位:拓展你的網路,這裡的網路是 需要、信仰、與控制你的情緒 為了兩個原因:因為你給的更多,成就就更多 我們都想要,不只是成就,更是給予 因為那才是真正讓你有實現感的事物。其次 你可以欣賞,不只是了解,心智 性靈,更欣賞到底是什麼驅策著人們 這是我們世界改變的唯一之道。願神保佑你們。 謝謝。我希望這能有所幫助。 (掌聲)


安東尼羅賓是個使用NLP的激勵大師,這場在 2006 TED 的talk 非常值得每隔一段時間來思考。
東尼‧羅賓斯(Tony Robbins)談論為我們行為背後的動機與原因。 | TED Talk | TED.com https://www.ted.com/talks/tony_robbins_asks_why_we_do_what_we_do/

[ted] Why We Do What We Do - Tony Robbins English full text  英文全文
http://peichengnote.blogspot.com/2015/11/ted-why-we-do-what-we-do-tony-robbins.html

[ted] Why We Do What We Do - Tony Robbins English full text

東尼‧羅賓斯 安東尼.羅賓(Tony Robbins)談論為我們行為背後的動機與原因 Asks Why We Do What We Do 英文全文

Thank you. I have to tell you I'm both challenged and excited. My excitement is: I get a chance to give something back. My challenge is: the shortest seminar I usually do is 50 hours.

(Laughter)

I'm not exaggerating. I do weekends -- I do more, obviously, I also coach people -- but I'm into immersion, because how did you learn language? Not just by learning principles, you got in it and you did it so often that it became real.

The bottom line of why I'm here, besides being a crazy mofo, is that -- I'm not here to motivate you, you don't need that, obviously. Often that's what people think I do, and it's the furthest thing from it. What happens, though, is people say to me, "I don't need any motivation." But that's not what I do. I'm the "why" guy. I want to know why you do what you do.

What is your motive for action? What is it that drives you in your life today? Not 10 years ago. Are you running the same pattern? Because I believe that the invisible force of internal drive, activated, is the most important thing. I'm here because I believe emotion is the force of life. All of us here have great minds. Most of us here have great minds, right? We all know how to think. With our minds we can rationalize anything. We can make anything happen.

I agree with what was described a few days ago, that people work in their self-interest. But we know that that's bullshit at times. You don't work in your self-interest all the time, because when emotion comes into it, the wiring changes in the way it functions. So it's wonderful to think intellectually about how the life of the world is, especially those who are very smart can play this game in our head. But I really want to know what's driving you.

What I would like to invite you to do by the end of this talk is explore where you are today, for two reasons. One: so that you can contribute more. And two: that hopefully we can not just understand other people more, but appreciate them more, and create the kinds of connections that can stop some of the challenges that we face today. They're only going to get magnified by the very technology that connects us, because it's making us intersect. That intersection doesn't always create a view of "everybody now understands everybody, and everybody appreciates everybody."

I've had an obsession basically for 30 years, "What makes the difference in the quality of people's lives? What in their performance?" I got hired to produce the result now. I've done it for 30 years. I get the phone call when the athlete is burning down on national television, and they were ahead by five strokes and now they can't get back on the course. I've got to do something right now or nothing matters. I get the phone call when the child is going to commit suicide, I've got to do something. In 29 years, I'm very grateful to tell you I've never lost one. It doesn't mean I won't some day, but I haven't yet. The reason is an understanding of these human needs.

When I get those calls about performance, that's one thing. How do you make a change? I'm also looking to see what is shaping the person's ability to contribute, to do something beyond themselves. Maybe the real question is, I look at life and say there's two master lessons. One is: there's the science of achievement, which almost everyone here has mastered amazingly. "How do you take the invisible and make it visible," How do you make your dreams happen? Your business, your contribution to society, money -- whatever, your body, your family.

The other lesson that is rarely mastered is the art of fulfillment. Because science is easy, right? We know the rules, you write the code and you get the results. Once you know the game, you just up the ante, don't you? But when it comes to fulfillment -- that's an art. The reason is, it's about appreciation and contribution. You can only feel so much by yourself.

I've had an interesting laboratory to try to answer the real question how somebody's life changes if you look at them like those people that you've given everything to? Like all the resources they say they need. You gave not a 100-dollar computer, but the best computer. You gave them love, joy, were there to comfort them. Those people very often -- you know some of them -- end up the rest of their life with all this love, education, money and background going in and out of rehab. Some people have been through ultimate pain, psychologically, sexually, spiritually, emotionally abused -- and not always, but often, they become some of the people that contribute the most to society.

The question we've got to ask ourselves really is, what is it? What is it that shapes us? We live in a therapy culture. Most of us don't do that, but the culture's a therapy culture, the mindset that we are our past. And you wouldn't be in this room if you bought that, but most of society thinks biography is destiny. The past equals the future. Of course it does if you live there. But what we know and what we have to remind ourselves -- because you can know something intellectually and then not use it, not apply it.

We've got to remind ourselves that decision is the ultimate power. When you ask people, have you failed to achieve something significant in your life?

Say, "Aye." Audience: Aye.

TR: Thanks for the interaction on a high level there. But if you ask people, why didn't you achieve something? Somebody who's working for you, or a partner, or even yourself. When you fail to achieve, what's the reason people say? What do they tell you? Didn't have the knowledge, didn't have the money, didn't have the time, didn't have the technology. I didn't have the right manager.

Al Gore: Supreme Court. TR: The Supreme Court.

(Laughter)

(Applause) (Cheering)

(Applause continues)

TR: And --

(Applause)

What do all those, including the Supreme Court, have in common?

(Laughter)

They are a claim to you missing resources, and they may be accurate. You may not have the money, or the Supreme Court, but that is not the defining factor.

(Applause) (Laughter)

And you correct me if I'm wrong. The defining factor is never resources; it's resourcefulness. And what I mean specifically, rather than just some phrase, is if you have emotion, human emotion, something that I experienced from you the day before yesterday at a level that is as profound as I've ever experienced and I believe with that emotion you would have beat his ass and won.

Audience: Yeah!

(Applause) (Cheering)

How easy for me to tell him what he should do.

(Laughter)

Idiot, Robbins. But I know when we watched the debate at that time, there were emotions that blocked people's ability to get this man's intellect and capacity. And the way that it came across to some people on that day -- because I know people that wanted to vote in your direction and didn't, and I was upset. But there was emotion there. Do you know what I'm talking about?

Say, "Aye." Audience: Aye.

TR: So, emotion is it. And if we get the right emotion, we can get ourselves to do anything. If you're creative, playful, fun enough, can you get through to anybody, yes or no?

If you don't have the money, but you're creative and determined, you find the way. This is the ultimate resource. But this is not the story that people tell us. They tell us a bunch of different stories. They tell us we don't have the resources, but ultimately, if you take a look here, they say, what are all the reasons they haven't accomplished that? He's broken my pattern, that son-of-a-bitch.

(Laughter)

But I appreciated the energy, I'll tell you that.

(Laughter)

What determines your resources? We've said decisions shape destiny, which is my focus here. If decisions shape destiny, what determines it is three decisions. What will you focus on? You have to decide what you're going to focus on. Consciously or unconsciously. the minute you decide to focus, you must give it a meaning, and that meaning produces emotion. Is this the end or the beginning? Is God punishing me or rewarding me, or is this the roll of the dice? An emotion creates what we're going to do, or the action.

So, think about your own life, the decisions that have shaped your destiny. And that sounds really heavy, but in the last five or 10 years, have there been some decisions that if you'd made a different decision, your life would be completely different? How many can think about it? Better or worse. Say, "Aye."

Audience: Aye.

So the bottom line is, maybe it was where to go to work, and you met the love of your life there, a career decision. I know the Google geniuses I saw here -- I mean, I understand that their decision was to sell their technology. What if they made that decision versus to build their own culture? How would the world or their lives be different, their impact? The history of our world is these decisions. When a woman stands up and says, "No, I won't go to the back of the bus." She didn't just affect her life. That decision shaped our culture. Or someone standing in front of a tank. Or being in a position like Lance Armstrong, "You've got testicular cancer." That's pretty tough for any male, especially if you ride a bike.

(Laughter)

You've got it in your brain; you've got it in your lungs. But what was his decision of what to focus on? Different than most people. What did it mean? It wasn't the end; it was the beginning. He goes off and wins seven championships he never once won before the cancer, because he got emotional fitness, psychological strength. That's the difference in human beings that I've seen of the three million I've been around.

In my lab, I've had three million people from 80 countries over the last 29 years. And after a while, patterns become obvious. You see that South America and Africa may be connected in a certain way, right? Others say, "Oh, that sounds ridiculous." It's simple. So, what shaped Lance? What shapes you? Two invisible forces. Very quickly. One: state. We all have had times, you did something, and after, you thought to yourself, "I can't believe I said or did that, that was so stupid." Who's been there? Say, "Aye." Audience: Aye.

Or after you did something, you go, "That was me!"

(Laughter)

It wasn't your ability; it was your state. Your model of the world is what shapes you long term. Your model of the world is the filter. That's what's shaping us. It makes people make decisions. To influence somebody, we need to know what already influences them. It's made up of three parts. First, what's your target? What are you after? It's not your desires. You can get your desires or goals. Who has ever got a goal or desire and thought, is this all there is?

Say, "Aye." Audience: Aye.

It's needs we have. I believe there are six human needs. Second, once you know what the target that's driving you is and you uncover it for the truth -- you don't form it -- then you find out what's your map, what's the belief systems that tell you how to get those needs. Some people think the way to get them is to destroy the world, some people, to build, create something, love someone. There's the fuel you pick. So very quickly, six needs.

Let me tell you what they are. First one: certainty. These are not goals or desires, these are universal. Everyone needs certainty they can avoid pain and at least be comfortable. Now, how do you get it? Control everybody? Develop a skill? Give up? Smoke a cigarette? And if you got totally certain, ironically, even though we need that -- you're not certain about your health, or your children, or money. If you're not sure the ceiling will hold up, you won't listen to any speaker. While we go for certainty differently, if we get total certainty, we get what? What do you feel if you're certain? You know what will happen, when and how it will happen, what would you feel? Bored out of your minds. So, God, in Her infinite wisdom, gave us a second human need, which is uncertainty. We need variety. We need surprise. How many of you here love surprises? Say, "Aye."

Audience: Aye.

TR: Bullshit. You like the surprises you want. The ones you don't want, you call problems, but you need them. So, variety is important. Have you ever rented a video or a film that you've already seen? Who's done this? Get a fucking life.

(Laughter)

Why are you doing it? You're certain it's good because you read or saw it before, but you're hoping it's been long enough you've forgotten, and there's variety.

Third human need, critical: significance. We all need to feel important, special, unique. You can get it by making more money or being more spiritual. You can do it by getting yourself in a situation where you put more tattoos and earrings in places humans don't want to know. Whatever it takes. The fastest way to do this, if you have no background, no culture, no belief and resources or resourcefulness, is violence. If I put a gun to your head and I live in the 'hood, instantly I'm significant. Zero to 10. How high? 10. How certain am I that you're going to respond to me? 10. How much uncertainty? Who knows what's going to happen next? Kind of exciting. Like climbing up into a cave and doing that stuff all the way down there. Total variety and uncertainty. And it's significant, isn't it? So you want to risk your life for it. So that's why violence has always been around and will be around unless we have a consciousness change as a species. You can get significance a million ways, but to be significant, you've got to be unique and different.

Here's what we really need: connection and love, fourth need. We all want it; most settle for connection, love's too scary. Who here has been hurt in an intimate relationship? If you don't raise your hand, you've had other shit, too. And you're going to get hurt again. Aren't you glad you came to this positive visit? Here's what's true: we need it. We can do it through intimacy, friendship, prayer, through walking in nature. If nothing else works for you, don't get a cat, get a dog, because if you leave for two minutes, it's like you've been gone six months, when you come back 5 minutes later.

These first four needs, every human finds a way to meet. Even if you lie to yourself, you need to have split personalities. I call the first four needs the needs of the personality. The last two are the needs of the spirit. And this is where fulfillment comes. You won't get it from the first four. You'll figure a way, smoke, drink, do whatever, meet the first four. But number five, you must grow. We all know the answer. If you don't grow, you're what? If a relationship or business is not growing, if you're not growing, doesn't matter how much money or friends you have, how many love you, you feel like hell. And I believe the reason we grow is so we have something to give of value.

Because the sixth need is to contribute beyond ourselves. Because we all know, corny as that sounds, the secret to living is giving. We all know life is not about me, it's about we. This culture knows that, this room knows that. It's exciting. When you see Nicholas talking about his $100 computer, the most exciting thing is: here's a genius, but he's got a calling now. You can feel the difference in him, and it's beautiful. And that calling can touch other people.

My life was touched because when I was 11 years old, Thanksgiving, no money, no food, we were not going to starve, but my father was totally messed up, my mom was letting him know how bad he messed up, and somebody came to the door and delivered food. My father made three decisions, I know what they were, briefly. His focus was "This is charity. What does it mean? I'm worthless. What do I have to do? Leave my family," which he did. It was one of the most painful experiences of life. My three decisions gave me a different path. I set focus on "There's food." What a concept!

(Laughter)

But this is what changed my life, shaped me as a human being. Somebody's gift, I don't even know who it is. My father always said, "No one gives a shit." And now somebody I don't know, they're not asking for anything, just giving us food, looking out for us. It made me believe this: that strangers care. And that made me decide, if strangers care about me and my family, I care about them. I'm going to do something to make a difference. So when I was 17, I went out on Thanksgiving, it was my target for years to have enough money to feed two families. The most fun and moving thing I ever did in my life. Next year, I did four, then eight. I didn't tell anybody what I was doing, I wasn't doing it for brownie points. But after eight, I thought I could use some help.

So I went out, got my friends involved, then I grew companies, got 11, and I built the foundation. 18 years later, I'm proud to tell you last year we fed 2 million people in 35 countries through our foundation. All during the holidays, Thanksgiving, Christmas, in different countries around the world.

(Applause)

Thank you. I don't tell you that to brag, but because I'm proud of human beings because they get excited to contribute once they've had the chance to experience it, not talk about it.

So, finally -- I'm about out of time. The target that shapes you -- Here's what's different about people. We have the same needs. But are you a certainty freak, is that what you value most, or uncertainty? This man couldn't be a certainty freak if he climbed through those caves. Are you driven by significance or love? We all need all six, but what your lead system is tilts you in a different direction. And as you move in a direction, you have a destination or destiny. The second piece is the map. The operating system tells you how to get there, and some people's map is, "I'm going to save lives even if I die for other people," and they're a fireman, and somebody else says, "I'm going to kill people to do it." They're trying to meet the same needs of significance. They want to honor God or honor their family. But they have a different map.

And there are seven different beliefs; I can't go through them, because I'm done. The last piece is emotion. One of the parts of the map is like time. Some people's idea of a long time is 100 years. Somebody else's is three seconds, which is what I have. And the last one I've already mentioned that fell to you. If you've got a target and a map -- I can't use Google because I love Macs, and they haven't made it good for Macs yet. So if you use MapQuest -- how many have made this fatal mistake of using it? You use this thing and you don't get there. Imagine if your beliefs guarantee you can never get to where you want to go.

(Laughter)

The last thing is emotion. Here's what I'll tell you about emotion. There are 6,000 emotions that we have words for in the English language, which is just a linguistic representation that changes by language. But if your dominant emotions -- If I have 20,000 people or 1,000 and I have them write down all the emotions that they experience in an average week, and I give them as long as they need, and on one side they write empowering emotions, the other's disempowering, guess how many emotions they experience? Less than 12. And half of those make them feel like shit. They have six good feelings. Happy, happy, excited, oh shit, frustrated, frustrated, overwhelmed, depressed. How many of you know somebody who, no matter what happens, finds a way to get pissed off?

(Laughter)

Or no matter what happens, they find a way to be happy or excited. How many of you know somebody like this?

When 9/11 happened, I'll finish with this, I was in Hawaii. I was with 2,000 people from 45 countries, we were translating four languages simultaneously for a program I was conducting, for a week. The night before was called Emotional Mastery. I got up, had no plan for this, and I said -- we had fireworks, I do crazy shit, fun stuff, and at the end, I stopped. I had this plan, but I never know what I'm going to say. And all of a sudden, I said, "When do people really start to live? When they face death." And I went through this whole thing about, if you weren't going to get off this island, if nine days from now, you were going to die, who would you call, what would you say, what would you do? That night is when 9/11 happened.

One woman had come to the seminar, and when she came there, her previous boyfriend had been kidnapped and murdered. Her new boyfriend wanted to marry her, and she said no.

He said, "If you go to that Hawaii thing, it's over with us." She said, "It's over." When I finished that night, she called him and left a message at the top of the World Trade Center where he worked, saying, "I love you, I want you to know I want to marry you. It was stupid of me." She was asleep, because it was 3 a.m. for us, when he called her back, and said, "Honey, I can't tell you what this means. I don't know how to tell you this, but you gave me the greatest gift, because I'm going to die." And she played the recording for us in the room. She was on Larry King later. And he said, "You're probably wondering how on Earth this could happen to you twice. All I can say is this must be God's message to you. From now on, every day, give your all, love your all. Don't let anything ever stop you." She finishes, and a man stands up, and he says, "I'm from Pakistan, I'm a Muslim. I'd love to hold your hand and say I'm sorry, but frankly, this is retribution." I can't tell you the rest, because I'm out of time.

(Laughter)

Are you sure?

(Laughter)

10 seconds!

(Laughter and applause)

10 seconds, I want to be respectful. All I can tell you is, I brought this man on stage with a man from New York who worked in the World Trade Center, because I had about 200 New Yorkers there. More than 50 lost their entire companies, friends, marking off their Palm Pilots. One financial trader, woman made of steel, bawling -- 30 friends crossing off that all died. And I said, "What are we going to focus on? What does this mean and what are we going to do?"

And I got the group to focus on: if you didn't lose somebody today, your focus is going to be how to serve somebody else. Then one woman stood up and was so angry, screaming and yelling. I found out she wasn't from New York, she's not an American, doesn't know anybody here. I asked, "Do you always get angry?" She said, "Yes." Guilty people got guilty, sad people got sad. I took these two men and I did an indirect negotiation. Jewish man with family in the occupied territory, someone in New York who would have died if he was at work that day, and this man who wanted to be a terrorist, and I made it very clear. This integration is on a film, which I'd be happy to send you, instead of my verbalization, but the two of them not only came together and changed their beliefs and models of the world, but worked together to bring, for almost four years now, through various mosques and synagogues, the idea of how to create peace. And he wrote a book, called "My Jihad, My Way of Peace." So, transformation can happen.

My invitation to you is: explore your web, the web in here -- the needs, the beliefs, the emotions that are controlling you, for two reasons: so there's more of you to give, and achieve, too, but I mean give, because that's what's going to fill you up. And secondly, so you can appreciate -- not just understand, that's intellectual, that's the mind, but appreciate what's driving other people. It's the only way our world's going to change.

God bless you, thank you. I hope this was of service.

(Applause)
[ted] 東尼‧羅賓斯 安東尼.羅賓(Tony Robbins)談論為我們行為背後的動機與原因 Asks Why We Do What We Do 中文全文 - peicheng note http://peichengnote.blogspot.com/2015/11/ted-tony-robbins-asks-why-we-do-what-we.html


2015年11月16日 星期一

google adsense 廣告個數上限 可以放幾個廣告

google adsense 廣告個數上限 可以放幾個廣告

每頁的廣告數量上限
按造目前的資訊(15.11.16)

目前,AdSense 發佈商在每個網頁上可放置:
最多 3 個 AdSense 內容廣告單元
最多 3 個連結單元
最多 2 個搜尋框

發佈商在每個網頁上可放置最多 1 個「大型」廣告單元。就我們的定義,凡是大小與我們的 300x600 格式相似的廣告單元,都算是「大型」廣告單元。舉例來說,300x1050 和 970x250 格式、750x200 和 580x400 區域性格式,以及大小相似的任何其他自訂大小廣告,都包含在內。

不過請注意,網頁中如果插入數量達到上限的廣告單元,可能會顯得雜亂無章。如需廣告刊登位置訣竅,請參閱最佳化指南。如需自訂大小廣告單元訣竅,請參閱這個介紹自訂大小廣告單元的網頁

上述廣告限制也適用於行動網站。此外,在行動網站中,畫面上不得一次出現兩則 (含) 以上的 AdSense 廣告。 其他可以加用 Google DFP 來解決這個上限

2015年11月14日 星期六

[python] disable This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.


InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

 

使用 python requests 若是會出現 SSL fails 但是又想忽略的話
可以使用
requests.get('https://kennethreitz.com', verify=False)
還有
requests.packages.urllib3.disable_warnings()  


這樣就是可以 Disable  掉這些訊息

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:768: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

2015年11月11日 星期三

倒數第二次戀愛 插曲 音樂 Yael Naim


倒數第二次戀愛 插曲 Yael Naim 

由 Yael Naim 演唱的歌曲
婭埃勒·納伊姆 - 維基百科,自由的百科全書
https://zh.wikipedia.org/wiki/%E5%A8%85%E5%9F%83%E5%8B%92%C2%B7%E7%BA%B3%E4%BC%8A%E5%A7%86

婭埃勒·納伊姆希伯來語יעל נעים,1978年),以色列歌手、作曲人。
納伊姆出生於法國巴黎一個猶太家庭,四歲時隨全家遷至以色列拉馬特沙龍
2008年1月蘋果公司執行長史蒂夫·賈伯斯選擇納伊姆的歌曲《純潔心靈(New Soul)》作為新產品MacBook Air的廣告曲,納伊姆因此一舉成名。
歌曲連結
Far Far - Yael Naim - YouTube https://www.youtube.com/watch?v=HKWE5m_2wug
Yael Naim - Go To The River - YouTube https://www.youtube.com/watch?v=1zZxXiA4geY


2015年11月10日 星期二

TensorFlow Google 開源機器學習與深度學習套件 Library

Google open source 了 Google Brain 團隊使用的 機器學習(machine learning) 套件



TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well.

從 Tutorials & Examples 來看提供滿多樣的機器語言(Machine Learning)與深度學習(Deep Learning)的例子

MNIST For ML Beginners
Deep MNIST for Experts
TensorFlow Mechanics 101
Convolutional Neural Networks
Vector Representations of Words
Recurrent Neural Networks
Sequence-to-Sequence Models
Mandelbrot Set
Partial Differential Equations
MNIST Data Download


之前的系統相比 TensorFlow更快

TensorFlow更快、更智能,也更靈活,所以,它更容易為新款產品和研究所用。這是一個具有高擴展性的機器學習系統,小到一部智能手機、大到數千台數據中心服務器的各種設備,都可以運行。我們將TensorFlow用於Google應用程序的語音識別功能、Inbox能智回复功能、Google Photos搜索功能等等,無所不包。該系統允許我們進行神經網絡的構建和訓練,速度比第一代機器學習系統高出五倍之多,因而可以用於產品完善,使之大幅提速。
Home — TensorFlow
http://tensorflow.org/
tensorflow/tensorflow
https://github.com/tensorflow/tensorflow
TensorFlow: open-source library for machine intelligence | Hacker News
https://news.ycombinator.com/item?id=10532957
TensorFlow:更智能的机器学习,为所有人而生 http://googlechinablog.blogspot.tw/2015/11/tensorflow.html



Cipher 的意思 一個無用之人


Cipher 的意思 一個無用之人

主要出自時代雜誌評論 馬英九 的詞

不只bumbler!時代雜誌以「loser、cipher」形容馬 - Yahoo奇摩新聞
https://tw.news.yahoo.com/%E4%B8%8D%E5%8F%AAbumbler%EF%BC%81%E6%99%82%E4%BB%A3%E9%9B%9C%E8%AA%8C%E4%BB%A5%E3%80%8Closer%E3%80%81cipher%E3%80%8D%E5%BD%A2%E5%AE%B9%E9%A6%AC-034450865.html

It’s Going to Take a Lot More Than a Historic Handshake to Fix China’s Relations With Taiwan | TIME
http://time.com/4104494/china-taiwan-relations-summit/


but, after the island’s elections for the presidency and legislature on Jan. 16, Ma will be a cipher. Even some in his own party regard him as a loser.
挺有趣的一篇

cipher : a person who has no power or is not important


[電影] [雷] 007 惡魔四伏 spectre



007:惡魔四伏》(英語Spectre)是一部2015年英國動作間諜片,為永世製作公司第24部詹姆士·龐德電影。由山姆·曼德斯執導,丹尼爾·克雷格克里斯多夫·華茲蕾雅·賽杜莫妮卡·貝魯奇安德魯·斯科特戴夫·巴蒂斯塔雷夫·范恩斯娜奧米·哈里斯班·維蕭主演,約翰·羅根勞勃·韋德傑斯·巴特沃斯編劇。電影講述龐德首次接觸全球犯罪組織魔鬼黨,這是該組織自1971年電影《金剛鑽》以來首度登場。本片成本高達3億美元,成為史上第二高成本的電影[5][6]
影片於2015年10月26日舉行全球首映禮;並於同日在英國和愛爾蘭上映;美國於11月6日上映。至於大中華地區,香港,台灣於11月5日上映,中國大陸於11月13日上映。


007:惡魔四伏 - 維基百科,自由的百科全書
https://zh.wikipedia.org/wiki/007%EF%BC%9A%E6%83%A1%E9%AD%94%E5%9B%9B%E4%BC%8F


剛好有個機會拿到了一張單人票,就前往觀賞。
雖然,挺多人都說,這集不比上一集。可是,我卻覺得有過之而無不及。

007 電影該有的元素真的是一個都不少,驚險的場面,殺不死的詹姆士龐德,漂亮的龐德女郎,不免還有些超現代的科技。

場景與劇情跟流程都快速的在流動

此次加了不少飛車系列的速度感

一些美麗遼闊的場景,龐德的拳拳到肉與飛身,美艷的龐德女郎,加上007的性格與堅持,這樣也就足矣了。

2015年11月9日 星期一

[travel] 汐止 新山夢湖



夢湖是個名字很美妙的地方,據說就是冬天會雲霧繚繞,起了霧的時候跟在夢境一樣。

這是個地主的私人地,旁邊有個湖畔咖啡,據說就是以前挖來的儲水的湖。
這次去好像遇到老闆娘,正在解說,當初他跟他先生認識時,這裡還沒被開發成這樣,後來才整理一番。

夢湖的湖水頗為清澈,可以環湖。算是台北市市郊不高又可以到達的地方。旁邊的新山也才海拔也才499公尺。

倒是上山的產業道路,對於開車的新手可能有點不易。某些路段只有單向通車,但是整體來說,之前別人文章所說的泥巴路,可能換成這次上山的新柏油了。

一路往汐萬路走,唯一要注意的叉路就是一邊往五指山一邊往新山夢湖的產業道路了。
整路都有指標指示,其實還算好早。

此次剛好遇上pm2.5 紫爆,導致天空一片霧霾霾的。

停完車後,往販賣小吃的小販裡面走,走不到十分鐘,就會到達夢湖了。









交通方式
a

2015年11月8日 星期日

[日記] 幾年後的你,你認得是你嗎?



差一點就不認得那是我了

昨天晚上在看到這篇,時間 2010/10/20 Wed 16:04:52
過了五年就要說當年了...

心境的轉變上,確實隨著時間的遞嬗。

但是,卻有一種昨天之我與今日之我的感觸。

peicheng note: [回應]Re: 大家說 賊賊 休學 好嗎?
http://peichengnote.blogspot.tw/2010/10/re.html


我想封閉的內心的自己,隨著眾多的枷鎖,把自己封印起來了。

當年那個天不怕地不怕,滿回衝勁跟熱血的小伙子。
今日,也不復存在。

但是,我想的是找出當初的那股熱情與生命力,投注於其中。


2015年11月5日 星期四

[java] Intellij Idea: Importing Gradle project - getting JAVA_HOME not defined yet



Intellij Idea: Importing Gradle project - getting JAVA_HOME not defined yet

先查看一下 java home的位置


$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home

在 welcome page 裡面,

Configure > Project Defaults > Project Structure

可以設定 Java_home的位置

2015年11月4日 星期三

[linux] find move specific file to new directory 使用 find ,xargs 搬移特定檔案到新資料夾



使用了

asciidoc gen 了某個資料夾樹狀結構下的所有 asciidoc 成 html 檔案。


find ./ -name "*.asciidoc" | xargs -n 1 asciidoc


$ tree -d ./
./
├── aggregations
│   ├── bucket
│   └── metrics
├── docs
└── query-dsl

看了一下他們目錄結構

想要把產生的html 檔都移到同樣結構下的資料夾去

1.先建立起對應的資料夾

find ./java-api -name "*.html" | xargs -n 1 dirname | sort -u | xargs -I d echo java-api_html/d | xargs -n 1 mkdir -p

 java-api_html 這是我要集中放置 html 檔案的資料夾
xargs -I  是接一個replstr 一個替代後面參數使用的字串

-I replstr
             Execute utility for each input line, replacing one or more occurrences of replstr in up to replacements (or 5 if no -R flag is
             specified) arguments to utility with the entire line of input.  The resulting arguments, after replacement is done, will not be
             allowed to grow beyond 255 bytes; this is implemented by concatenating as much of the argument containing replstr as possible, to
             the constructed arguments to utility, up to 255 bytes.  The 255 byte limit does not apply to arguments to utility which do not con-
             tain replstr, and furthermore, no replacement will be done on utility itself.  Implies -x.


2. 搬移檔案到已經建立好的資料夾去

find ./java-api -name "*.html" | xargs -I f mv f ./java-api_html/f


這樣就大功告成了

2015年11月3日 星期二

[note] 如何使用網路 大眾銀行 領取 gogole adsense 西聯匯款



可以去辦理大眾銀行的帳戶,活存美元帳戶。
要使用線上網銀的西聯功能,需要在分行使用過一次西聯匯款,然後你有申請過線上西聯,
就可以在家使用了。


申請西南匯匯款需要備妥下面資料,這些可以在 google adsense的付款那邊看到。


付款金額:$
匯款處理編號 (MTCN):
政府核發的身分證件 (護照、駕照、身分證等)
您的付款處理商:Google Asia Pacific Pte. Ltd., Singapore, 新加坡

值得注意的是之前還是ireland Google
現在改成了 Google Asia Pacific Pte. Ltd., Singapore

這算是目前最便利的請款方式了。




2015年11月2日 星期一

[travel] 東海大學 iMac donut



東海一別,也將近兩年沒去了。

這次趁著系友會的機會,跑了回去。


東海大學 iMac donut