顯示具有 Google 標籤的文章。 顯示所有文章
顯示具有 Google 標籤的文章。 顯示所有文章

2012年12月5日 星期三

Announcing Google Drive Site Publishing


Would you like to programmatically publish some web content? Or let your users do so in the context of your Drive app?
This is possible now with Google Drive. Your app can now insert static web assets in a publicly shared folder, and then serve those files directly to users via file names in a relative path. Google Drive site publishing supports JavaScript, so it's even possible to run a JavaScript Drive app directly from Drive.
Publishing from Drive is a simple, two-step dance: create a public folder and use a link to the root folder — the webViewLink — to publish its contents. You can refer to the Drive SDK documentationfor full detail on how to work with public folders and content links, but basically the requirements are:
  • The folder containing site assets must be public. Assets added to public folders must also be public on the web.
  • Link to the files contained in the folder using the webViewLink (included in the folder’s JSON representation).
It’s important to emphasize the added simplicity provided by a webViewLink: using this link as a starting point, you can extend the path to any web asset in any subfolder without worrying about retrieving the exact file ID. What used to look like 0B2Gk2F2ImIBiaUkwY3JNX1JMaTg is now a recognizably cute path such as images/kittens.jpg. For the root path to the folder, we’ll display a list of files in the folder, or, if you have an index.html file in your folder we’ll load that as expected.
To see Google Drive site publishing in action, check out this example site served from Google Drive at https://googledrive.com/host/0B716ywBKT84AcHZfMWgtNk5aeXM.
The ability to publish files this way opens lots of possibilities for Drive app developers. Writing a blogging tool, creating a process to publish updates to shared docs, outputting images in a folder in a gallery page — any Drive use case that involves presenting a file in a browser can benefit from site publishing.

2012年7月3日 星期二

Android 4.1 加入安全模式功能


  如果你是 Windows 的使用者,應該都知道安全模式有什麼作用,它能夠不載入第三方程式的情況下啟動設備,是修復系統錯誤的專用模式。而來到新一代 Android 4.1,Google 也將原有的「安全模式」開放給一般用戶使用,只要如常按電源鍵關機,接著在「關機」一欄長按就會出現進入「安全模式」的提示視窗,同樣地,所有已安裝的第三方應用程式會停用,雖然表面上看來是針對開發人員和進階用戶而設,不過如果在手機沒電的情況下,接下來的工作只是上網或收發電郵,進入 安全模式相信可節省不少電力。

2010年12月14日 星期二

Google 在 CR-48 影片中暗藏玄機

上面這張圖就是從 CR-48 的廣告影片中截出來的畫面。X = G / CxHxRxOxM-3,但這又是什麼意思呢?第一個解出來的人 Sylvain Zimmer 獲得了一台 CR-48,雖然說現在再解出來已經來不及了,但有沒有人想試著解解看的呢?

答案在繼續閱讀裡。
G = 90091
C x H x R x O x M -3 = 191605050401140404051920181525

Sylvain 解釋說他一始就看穿了 90091 = goo.gl,Google 的縮網址服務(我光這一點就敗了 orz),所以後面的一串數字一定是 http://goo.gl/ 之後的東西。他試了不少種方法,最後發現應該將數字拆開成兩個兩個一組:19, 16, 05, 05... etc.,再把這個數字依照字母順位換成英文字母 19=s、16=p、05=e...,就能得到一個字串「speedanddestroy」了。

當他用顫抖的手輸入網址後,進去的網頁通知他「恭喜您是第一位解開這個題目的人。我們將送你一台 CR-48!」可以想見他有多高興了 XD。下次看 Google 的廣告影片要看仔細喔!天知道 Google 還藏了什麼好康的在裡面...