2014年7月8日 星期二

mongoDB使用config檔,與捷徑參數

作業系統:windows7
mongodb:2.6.3


1.   請先至mongoDB官網下載windows 64版。  下載頁 。

2.  下載完後執行安裝 。     
  • 如果下載是msi就執行安裝,預設會安裝在
    C:\Program Files\MongoDB 2.6 Standard\bin
  • 如果下載是zip解開就可以。
3.  建立  .conf  檔在你想要的路徑下
  • 例如:C:\Users\hua\mongodb

2014年7月7日 星期一

Bitbucket and TortoiseGit 使用方式

Bitbucket提供線上版本控管Server,具有私有不公開的Git。

1. 至 Bitbucket 申請使用帳號。

2. 按下導覽列中的Create > Create Repository 來建立一個版本控管空間。




  • Name                       版本控管空間名稱
  • Description               描述
  • Access level             存取級別
  • Forking                    允許追蹤的選項
  • Repository type        版控Server,選Git。
  • Project management
            issue tracking   如bug追蹤之類的
            Wike               知識庫 
  • Langage                   開發的語言
 填好後按下  Create repository

2014年7月1日 星期二

IE 條件註解 (IE Conditional comment)

人客呀!看到這種註解,別亂砍,會害網頁走山阿!

IE Conditional Comment  只對IE瀏覽器有效,其他瀏覽器會當成註解。

Example:

<!--[if IE]>
    只要是IE,該區塊會運作。
<![endif]-->

<!--[if IE 7]>
  如果是IE7,該區塊會運作。
<![endif]-->

2014年6月28日 星期六

壓力測試文章與效能調校文章收集

以下收集文章是關於壓力測試:



關於前端加速文章:

nodejs auto less to css

nodejs可以配置模組使web環境在http連線近來時會將less編譯成css。

要達到此功能需要

  • less        (編譯核心,能在command line中下命令將less檔轉為css檔)
  • less-middleware  (此middleware提供自動轉譯功能)



example  use eclipse :

Eclipse 需要安裝nodejs plugin才能開發nodejs專案,沒有的話要使用command line來建立專案。

eclipse install nodejs plugin  please reference  here

Step1. Create nodejs express project (建立nodejs express專案)

  • File > New > Node.js Express Project 


install nodejs expreee

在網頁開發上
  • Java  環境有 Servlet + jsp
  • Ruby 環境有 Rails
  • Nodejs 官方則推薦使用 express 來做網頁開發

express 在 template engines (viwer)部分還能選擇使用 ejs 或是 jade等樣板引擎。

express請參考:
  • http://expressjs.com/guide.html        (英文指南)
  • http://expressjs.jser.us/guide.html     (中文指南)
  • https://www.npmjs.org/package/express   (npmPackage)
  • https://github.com/visionmedia/express

express 安裝前需先安裝好nodejs


Install Express  (安裝  Express):
Step1.  open  nodeJs command line  (打開nodeJs 命令操作環境)
  •  Click   Start  (開始 ) ->  Node.js Folder  -> Node.js Command Prompt

Step2.  install  express (安裝express)
  •  npm install express

Install  Express-generator (安裝 Express-generator):

Step3.  install  express-generator 
  •  npm install -g express-generator (使用-g 全域安裝,在機器上任何地方都可用)

PS.express-genrator 是web專案結構產生工具


Express Command  (Express 命令):

  • express --help
Usage: express [options]

Options:

  -h, --help          output usage information
  -V, --version       output the version number
  -e, --ejs           add ejs engine support (defaults to jade)
  -H, --hogan         add hogan.js engine support
  -c, --css   add stylesheet  support (less|stylus|compass) (defaults to plain css)
  -f, --force         force on non-empty directory

Create Web Projet  (建立web專案):

Step4.  create web project (建立nodejs web 專案)
  • express  --css less --ejs mytest





















當然也能使用eclipse整合環境來開發nodejs,請參考:
在eclipse上安裝nodejs plugin即可直接用eclipse開啟nodejs web project。

2014年6月26日 星期四

Eclipse install nodejs plugin

讓Eclipse 支援 nodejs

需先安裝好nodeJs

IDE:  




Step1.  open  nodeJs command line  (打開nodeJs 命令操作環境)
  •  Click   Start  (開始 ) ->  Node.js Folder  -> Node.js Command Prompt
Step2. install Nodeclipse  CLI  

  • npm install -g nodeclipse

Step3. install Express 

  • npm install -g express-generator
  • npm install -g express

Step4. install nodeclipse (安裝nodeclipse)

  • select Help > Install New Software
  • Enter the update site URL into the Work with text box: (在work with中輸入)
    http://www.nodeclipse.org/updates/
  • click add  (點擊 add)





PS.
  1.可加裝javascript 編輯器方便javascript開發

  • JSDT   or  VJET      (可使用Eclipse中的 Help > Eclipse Marketplace...  安裝)
    在搜尋欄中可輸入JSDT


參考文件:
  • http://www.nodeclipse.org/updates/    (nodeclipse)
  • http://www.oschina.net/project/tag/148?lang=28    (各種javascript plugin)