1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
靜態函式只能被所屬的檔案使用,其它檔案無法呼叫。
舉例:檔案 a.c 有 static functionA, 但檔案 b.c 無法呼叫 functionA 使用。
要注意的是 C++ 和 Java 的靜態函式功用和靜態變數相同。
]]>And I noted the setup below.
Click Control Panel.
Create a new user account. (Example : git)
Create a new shared folder. (Example : Repository)
Select user git and on click Read/Write permission.
Click Package Center and install Git Server package.
Launch Git Server and allow user git to use.
Enable SSH srvices then save and reboot.
You need login NAS with root via ssh. (Linux can use ssh command and Windows can use putty.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Next, we will download moonlightbox project.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
HaHa. Done! :))))
]]>Oops. And it wasted me a lot of time to fix build error.
To avoid encountered the same problems.
I noted solutions here and hoped this can help you. :)
1 2 3 4 5 6 |
|
Modified PagerSlidingTabStrip / build.gradle.
1 2 |
|
Modified PagerSlidingTabStrip / gradle / wrapper / gradle-wrapper.properties
1 2 |
|
1
|
|
Modified PagerSlidingTabStrip / library / build.gradle
1
|
|
1
|
|
Modified PagerSlidingTabStrip / gradle.properties
1 2 3 4 5 6 |
|
Reference : Github PagerSlidingTabStrip Project
]]>So you can add .vimrc file in /YOUR_HOME_PATH/
1 2 |
|
Add below contents then save and exit.
1 2 3 |
|
Enjoy it.
Reference : vim 顯示多餘空白( trailing whitespace )
]]>So you can add .vimrc file in /YOUR_HOME_PATH/
1 2 |
|
Add below contents then save and exit.
1 2 3 |
|
Enjoy it.
]]>這些 Blog 的編輯排版非常麻煩,尤其是要貼 Code 的時候…WTF
所以後來有一大段時間沒在寫,但隨著年紀增長開始健忘XD
因此決定找一個好用的 Blog 來防呆…
找了許久終於找到好吃的 Octopress,
Markdown 語法解決了我最討厭的排版問題,
還可以用 Vim + Git 來編輯和發布文章,
整個就是超級符合我這個懶人的 Style。
不過網路上的安裝教學文章大多是 2012 年左右的,
而我在安裝過程中也遇到些問題折騰了不少時間,
為了不再重蹈覆轍,所以通通記錄下來。
Step0. 環境需求
我用的作業系統是 Lubuntu 14.04 64bit,Windows 的我就幫不上忙啦。
Step1. 建立自己的Github帳號
沒有帳號的人要先到 https://github.com/ 註冊,
接下來要 new 一個 repository 用來存放你的 Blog 資料,
Repository name 要填入 username.github.io
而 username 就是你剛剛申請的 Github 帳號名稱,
接著直接點網頁最下面的 Create Repository 按鈕。
Step2. 安裝Octopress
官方說明網頁:Octopress Setup
安裝 Git
1 2 3 4 5 |
|
安裝 Node.js (問題1)
1
|
|
安裝 Curl
1
|
|
安裝 rvm
1
|
|
安裝 Ruby 1.9.3
1 2 3 4 |
|
安裝 Octopress
1 2 3 4 5 |
|
Step3. 設定Octopress
官方說明網頁:Deploying
執行下列指令來設定 Github 的位置
1
|
|
接著輸入 git@github.com:username/username.github.io.git
username 一樣是剛剛申請的 Github 帳號名稱。
然後用 vim 編輯 _config.yml 設定網頁資訊,
下列是我修改的部份,其它的細節可以到官網看 Configuring Octopress。
1 2 3 4 5 6 7 |
|
接著執行產生網頁和發布網頁
1 2 3 4 5 |
|
接著打開瀏覽器輸入網址 http://username.github.io
等約10分鐘就可以看到 Octopress 的網頁 (問題2)。
Step4. 發布新文章
官方說明網頁:Blogging Basics
執行以下指令產生新文章
1
|
|
Octopress 會產生文章檔案在 source/_posts/ 底下,用 vim 編輯完成後存檔。
1
|
|
(因為 Octopress 使用 Markdown 語法,可以到 Markdown文件 學習。)
(不惜慣用 vim 編輯的人,推薦 real-time preview 的 ReText 編輯器,安裝方式如下。)
1
|
|
編輯完成後要先執行以下指令
1 2 3 |
|
打開瀏覽器輸入 http://localhost:4000 便可預覽文章,
確定沒問題後要再做一次發布網頁動作。
1 2 3 4 |
|
最後就是你現在看到的這篇文章啦~^^
問題1.
執行 $rake generate 時候會遇到 Could not find a JavaScript runtime,請安裝 nodejs 套件。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
問題2.
網頁發布後大約需要十分鐘後才能在 http://username.github.io 看到網頁,
我原本以為立刻可以看到文章…結果一直看到 404 page not found…囧,
害我一直以為有哪一個步驟錯了@@…嗯…多等個十分鐘吧!
]]>