Posts

[轉錄] 開源授權術語

[ 原文 ] GPL:只要你用了任何该协议的库、甚至是一段代码,那么你的整个程序,不管以何种方式链接,都必须全部使用GPL协议、并遵循该协议开源。商业软件公司一般禁用GPL代码,但可以使用GPL的可执行文件和应用程序。 AGPL:即Affero GPL,是GPL的更严格版本。只要你用了任何该协议的库、甚至是一段代码,那么运行时和它相关的所有软件、包括通过网络联系的所有软件,必须全部遵循该协议开源。据律师说,它的要求范围连硬件都包括。所以,一般公司通常禁用任何AGPL代码。 LGPL:就是GPL针对动态链接库放松要求了的版本,即允许非LGPL的代码动态链接到LGPL的模块。注意:不可以静态链接,否则你的代码也必须用LGPL协议开源。 Apache:修改版本必须保持其原始版权声明;修改过的文件要标明改动。 BSD2:修改版本必须保持其原始版权声明。 BSD3:修改版本必须保持其原始版权声明。未经许可不得使用原作者或公司的名字做宣传。 MIT:修改版本必须保持其原始版权声明。 MPL:修改版本必须保持其原始版权声明。如果发布了编译后的可执行文件,那么必须让对方可以取得MPL协议下程序的源码。 MsPL:修改版本必须保持其原始版权声明。注意:不含商标授权。 另外,如果你违反了协议,不要以为改正错误就是好孩子,一旦被起诉,相关代码必须按许可协议的要求开源,不管是价值多少亿的商用软件。当然,如果是皮包公司,不在乎这个。

AR 枯木逢春

[ 原文  ] Augmented reality was touted as the next big thing when mobile apps started using the technology around five years ago, but it hasn’t fully come into mainstream usage. Juniper Research reports that AR apps attracted around 60 million unique users last year—but sees that number ramping up to 200 million by 2018. And with rising interest in immersive experiences, one of our 10 Trends for 2014, more marketers are experimenting with the technology. As The Wall Street Journal reported earlier this year, AR is gaining traction after years stuck in “new-tech purgatory, where ideas loll in the hope of finding mainstream applications.” 當行動 apps 自五年前開始興起時, AR 就被吹捧為下一個重要的技術, 但到目前為止它仍未成為主流. 根據 Juniper Research 研究指出 AR 到去年為止共有 6 千萬 UUs, 但估計到 2018 年才會有三倍成長. 而較為引起市場興趣的 Immersive experiences, 則成為 2014 年實驗的主流之一. WSJ 曾報導 AR 經歷了多年的 new-tech 煉獄, 等待著帶來希望的主流應用, 直到年前才又受到重視. Lego is generating some excitement around the upcoming launch of Lego Fusion , which allows users to move real-world...

sync openshift / github project

今天第一次在 openshift 上開了個 nodejs application, 不過在 clone 到本機端時總是出現  Permission denied (publickey,gssapi-keyex,gssapi-with-mic).  原因是因為 .ssh/ 下找不到叫作 id_rsa 的 private key 的檔名. 另外若同時想將該 application 在 github 開個 project, 作法如下: > 第一次submit   1. 先 create 一個 project, 取得 clone url   2. git remote add github <clone_url>   3. git push github master > 之後submit   1. git push github master 另外針對 openshift 上的 application 管理 指令 . 不過才兩天沒上, 剛更新好的 app 連上去 openshift 主機出現 「Service Temporarily Unavailable」, 過了三十分鐘了還不見起色, 是有沒有這樣脆弱啊紅帽兄... = = [補充] 後來發現原來是代碼本身的問題, 誤會 openshift 了 囧... > 疑點一:官網的 log-in 連結總是出現以下錯誤 , 後來發現是 chrome 瀏覽器 cache 的問題. We appear to be having technical difficulties You can try refreshing the page , if the problem is temporary. > 疑點二:本地端可以跑可是遠端卻無法. 先試著用 ssh 連線到 openshift 主機, 查看 logs . 或下 ctl_app status 看看程式是否還活著. 不過最後原因則是 用的 http module 在執行 createServer 時所帶的參數少了 ip... 原先 serv.listen( self.port, function(){} ); 需改為 self.s...

POI S4 將於 9/23 開播

Person of Interest 在 7/26 的 Comic-Con 2014 上舉辦了 video teaser 與 cast panel (座談會). 這裡用的是 teaser 而非 trailer, 查了一下才知道 teaser 是 trailer 的剪輯(但也有可能是過去的回顧), 主要是提醒大家即將到來的影片; trailer 則是電影裡頭的橋段, 是正式廣告. 'Person of Interest' Season 4 video teaser and cast panel at Comic-Con 2014 在第三季結尾時劇情做了很大的改變, 所以到第四季相信跟以往會完全不同. 這是因為 POI裡頭的主要角色們除了 Fusco 其他都成了逃亡者, 完全改變原先的步調.  "Person of Interest" took a major turn at the end of its third season, and when it returns for Season 4 in September it will be a very different show. The protagonists are now fugitives hiding in plain sight, and that will change the show's tone significantly. 製片 Greg Plagman 在 San Diego的 Comic-Con 2014 的座談會上說了, 這是關於戰爭的一季. 這次是由另一台機器在主導, 而我們的隊員會發現自己面臨嚴峻的挑戰. "This season is about war," says executive producer Greg Plageman during the show's San Diego Comic-Con 2014 panel. "There's another machine in charge, and I think all of our guys will find themselves severely challenged." ...

關於 naive Bayes

在 machine learning in action 一書中提到了要談 native Bayes 得先了解 conditional probability. 他舉的例子很簡單,  但總老是忘記, 在此記錄. Total: 7 balls, 2 buckets [Bucket A] 2 gray, 2 black [Bucket B] 1 gray, 2 black conditional probability P(gray|B) 解釋為已知道選 bucket B的條件下, 是 gray的機率. 毫無疑問地, 是1/3. 又 \begin{align*} P(gray|B) = \frac{P(gray \mspace{2pt} and \mspace{2pt} B)}{P(B)} 可理解為 \frac{「是 gray 且是bucket B的機率 」}{「為bucket B的機率」}\end{align*} 只是這樣的解釋一時自己無法理解 P(B), 原來是還是要補上「 抽出一顆球 」. P(gray|B): 抽出一顆球, 在已知來自B的條件下, 是gray的機率.  1/3 P(B): 抽出一顆球是來自B的機率. 3/7 P(gray and B): 抽出一顆球,  是gray且來自B的機率 (or 是B中的gray的機率, 或許比較好理解). 1/7 \begin{align*} P(gray|B) = \frac{P(gray \mspace{2pt} and \mspace{2pt} B)}{P(B)} = \frac{1/7}{3/7}=\frac{1}{3}\end{align*} 不過通常要求的不會是 P(gray|B), 而是 P(B|gray). 利用 Bayes Rule (swap the symbol in a conditional probability statement): \begin{align*} P(gray|B) =  \frac{P(B)P(gray|B)}{P(gray)}\end{align*} \begin{align*} 通式: P(C|x) = \frac{P(C)P...

關於 iframe 上某個 element 的全螢幕顯示 (fullscreen)

馬的, 為了這個效果花了我一個晚上, 所以實在有必要來記錄一番. 問題:如何於網頁上針對某個 element 加入 fullscreen 效果 做法: server: node.js html: jade engine (1)透過 iframe 將 index.html 選定的分頁, 轉到 fstest.html. (2)由於 fullscreen 預設是 disable, 這時候需要加入 webkitAllowFullScreen, mozAllowFullScreen, allowFullScreen 等的屬性, 告訴 browser 啟用該功能. (連結一) (3) 參考連結二的 js (4) 加一個屬性在 jade, css 或 js 上看似都可以實現,  可時常 trace 源碼時要找某個功能卻不知道對方加在哪裡 or js 直接 import 可還是看不到效果花了一晚才知道原來是 iframe 在作怪, 而作者把這屬性的實現嵌在 css 裏. [參考] 連結一 [參考] 連結二 心得:web design 還是要有個 css designer 搭配會比較好 orz...

一年七個月又二十五天

似乎是因為現任總理盈拉被法院判定違憲任用親信下台, 軍方進而要求解散內閣成員成立新政府被拒絕後所引發的軍事政變. 我不是很懂這中間的曲折, 也不知道從何看起. 剛google後理解為泰國主要兩大黨 (為泰黨跟民主黨), 為泰黨代表人物是現任總理盈拉跟流亡的前前總理塔克辛(盈拉哥哥), 民主黨則是前總理阿披實. 前者支持者多為平民階級、後者則是皇室、權貴跟中產階級. 再者, 泰國的選舉制度, 總理是由500人的國會下議院決定, 而議員中375是全民選舉產生, 剩下125則是依各黨獲票比例分配席次. 從中不難看出其實泰國人民較傾向為泰黨, 差距有5~10%之多. 可這次出手的是軍方, 查一下發現泰國軍方干政的次數在80年內就發生18次之多, 這真不是件好事. 不知道泰國人對這事又是怎麼的看法. Yesterday, Thai's army announced a coup, declared to take over power of the government. Troops escorted and detained the political party leaders, and released a statement saying Prayuth now has powers to act as Prime Minster until a new one take office. In many ways, this is normal for Thailand. it's the 12th time that the government's power was taken over by military since Thailand became a constitutional monarchy in 1932.