Love, and to be Loved.

我愛你,你是自由的。

正則表達式,一個十分古老而又強大的文本處理工具,僅僅用一段非常簡短的表達式語句,便能夠快速實現一個非常復雜的業務邏輯。熟練地掌握正則表達式的話,能夠使你的開發效率得到極大的提升。

正則表達式經常被用於字段或任意字符串的校驗,如下面這段校驗基本日期格式的JavaScript代碼:

var reg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2})$/; 
var r = fieldValue.match(reg);             
if(r==null)alert('Date format error!');

Read More...


There are many Python machine learning resources freely available online. Where to begin? How to proceed? Go from zero to Python machine learning hero in 7 steps!
By Matthew Mayo.

Getting started. Two of the most de-motivational words in the English language. The first step is often the hardest to take, and when given too much choice in terms of direction it can often be debilitating.

Read More...


昨天,我在Xebia印度辦公室發表了一個關於MapReduce的演說。演說進行得很順利,聽眾們都能夠理解MapReduce的概念(根據他們的反饋)。我成功地向技術聽眾們(主要是Java程序員,一些Flex程序員和少數的測試人員)解釋了MapReduce的概念,這讓我感到興奮。在所有辛勤的工作之後,我們在Xebia印度辦公室享用了豐盛的晚餐,然後我徑直回了家。

回家後,我的妻子(Supriya)問道:“你的會開得怎麼樣?”我說還不錯。 接着她又問我會議是的內容是什麼(她不是從事軟件或編程領域的工作的)。我告訴她說MapReduce。“Mapduce,那是什麼玩意兒?”她問道: “跟地形圖有關嗎?”我說不,不是的,它和地形圖一點關係也沒有。“那麼,它到底是什麼玩意兒?”妻子問道。 “唔…讓我們去Dominos(披薩連鎖)吧,我會在餐桌上跟你好好解釋。” 妻子說:“好的。” 然後我們就去了披薩店。

Read More...


Immanent Anxiety

“To be shown love is to feel ourselves the object of concern: our presence is noted, our name is registered, our views are listened to, our failings are treated with indulgence and our needs are ministered to. And under such care, we flourish.”
Alain de Botton, Status Anxiety

Read More...


Begin Again

Gretta (Keira Knightley) and her long-time boyfriend Dave (Adam Levine) are college sweethearts and songwriting partners who decamp for New York when he lands a deal with a major label. But the trappings of his new-found fame soon tempt Dave to stray, and a reeling, lovelorn Gretta is left on her own. Her world takes a turn for the better when Dan (Mark Ruffalo), a disgraced record-label exec, stumbles upon her performing on an East Village stage and is immediately captivated by her raw talent. From this chance encounter emerges an enchanting portrait of a mutually transformative collaboration, set to the soundtrack of a summer in New York City. Written by The Weinstein Company

Read More...


前言

之前均採用Octopress+GitHub框架來發布、管理Blog,但每次升級、重裝、切換操作系統的時候均需要對環境重新部署和調整,繁冗至極,於是,在比較了眾多Blog框架或技術之後,最終決定切換到Hexo+GitHub。
來自Hexo官網的介紹

超級快速

Node.js帶給您超級快的檔案產生速度,上百個檔案只需幾秒就能建立完成。

一鍵部署

您只需要一個指令就能把網站部署到 GitHub Pages, Heroku 或其他網站。

Markdown 支援

Hexo 支援所有 GitHub Flavored Markdown 的功能,您甚至能在 Hexo 使用大部份的 Octopress 外掛。

豐富的外掛

Hexo 有強大的外掛系統,您可安裝外掛讓 Hexo 支援 Jade, CoffeeScript。

Read More...


預備

  1. 申請Amazon AWS服務
  2. 進入AWS控制台,選擇亞太區東京的數據中心
  3. 在Compute下創建EC2實例,選擇Ubuntu-64位操作系統,下載SSH密鑰文件並保存好
  4. Security Group下除了默認的SSH的22端口打開,增加一個新的TCP端口1723,以建立PPTP服務
  5. 啟動實例
  6. 在Elastic IP下申請一個固定的IP地址,並與上述實例綁定(如果停止實例,一定要把Elastic IP解除綁定,否則將被計費)

    Read More...


本期數據新聞精選帶你踏上可視化之旅:普通人的數據新聞修養要怎麽修煉?英國大選報道有什麽可視化工具可以用?從地中海偷渡的移民,溺亡者有多少?最後,請你暫忘工具,用眼和心,探索100張前人繪制的時間地圖,細細體味可視化的“遠古時代”。

“了解數據可視化”:普通人的數據新聞修煉

Read More...


I Come, I Live, I Experience.