2012年12月4日 星期二

Unable to retrieve metadata for 'MvcMusicStore.Models.Album'.

When you practice this Tutorials at MVC Music Store. You may got this error message when you create the StoreManagerController: "Unable to retrieve metadata for 'MvcMusicStore.Models.Album'."


You can change:
<add name="MusicStoreEntities" connectionString = "Data Source=|DataDirectory|MvcMusicStore.sdf" providerName="System.Data.SqlServerCe.4.0"/>

to:
<add name="MusicStoreEntities" connectionString="Server=(LocalDB)\v11.0; Integrated Security=true; AttachDbFileName=|DataDirectory|MvcMusicStore.mdf" providerName="System.Data.SqlClient"/>


2012年10月17日 星期三

Windows 8 Pre-order

1. $14.99 (no DVD, upgrade), If you buy a qualifying Windows 7 PC between 2 June 2012 and 31 January 2013, you can purchase a download of Windows 8 Pro at a special promotional price that varies by region.

2. $39.99 (no DVD, upgrade), if you want to wait until October 26th you will be able to upgrade online via Windows.com using the Windows 8 Upgrade Assistant. Upgrade from Windows XP SP3, Windows Vista, or Windows 7 to Windows 8 Pro.

3. $69.99 (packaged DVD, upgrade), Pre-order from now to October 26th.

4. $69.99 (no DVD, upgard), Pack Product Key only, Pre-order from now to October 26th.

5. $99.99 Windows 8 (Full Version).

6. $139.99 Windows 8 Professional (Full Version).


2012年8月30日 星期四

Retake an Microsoft Exam for Free


Retake an Exam for Free 

http://www.microsoft.com/learning/en/us/offers/secondshot.aspx

When you earn a certification from Microsoft, you prove to the world that you have knowledge and skills in the most current and specialized technologies and solutions. Passing the exams needed to demonstrate those skills can be tough, but for a limited time, you’ll get a free second chance to succeed.
In today's challenging economic times, how do you stand out from the crowd, stay up to date with relevant technologies, and get the top jobs? Becoming a part of the Microsoft Certification program is a great start.
Sign up today for your Second Shot exam or exam pack. You’ll save at least 15 percent on the cost of the single certification exams, and you’ll be able to retake any exam you don’t pass the first time, at no extra cost.

2012年6月1日 星期五

2012年5月31日 星期四

Windows Server 2012 RC 安裝 Hyper-V 後開不了機

這幾天把 Windows Server 2012 RC 後,看起來還滿正常,今天安裝 Hyper-V 之後,開機就一直停在 Windows 字樣的畫面。重裝幾次,發覺只要是安裝了 Hyper-V 就開不了機。後來在網站上看到有可能是 Gigabyte 主機板 USB 3.0 的關係,果然 Disable 後就可以開機了。


我的主機板是 Gigabyte GA-P55A-UD3,BIOS 版本升級到 F11,Disable 的方式如下:
1. 開機畫面時按下 [Del] 鍵。
2. 選擇 [Integrated Peripherals] --> [Onboard USB 3.0 Controller] --> [Disabled]。 
3. 按下 [F10] 鍵,Save 後重開機即可。

2012年5月15日 星期二

Microsoft Private Cloud Evaluation 安裝

前陣子收到 Private Cloud Evaluation 的 email ,全部下載完之後,一直到上周才有時間裝起來玩看看,安裝過程主要是參考 Microsoft Private Cloud Evaluation Guide 及 System Center 2012 Unified Installer。用 Unified Installer 安裝是很方便,但前提是要先把所有 Prerequisites 先準備好,光是準備這些就花了不少時間。全部大致步驟是:

1. 下載 Microsoft Private Cloud Evaluation Software。下載完後分別建立目錄,該解壓縮的,要先解壓縮。
2. 下載 Prerequisites。下載完後分別建立目錄,該解壓縮的,要先解壓縮。
3. 在 Hyper-V 建立 AD Server。
4. 在 Hyper-V 建立每台虛擬主機,Guide 上有說明。
5. 接下來就可以按照 Guide 的說明用  Unified Installer 安裝。

註:
1. 因為都是裝在 Hyper-V 上 RAM 最好要有 24 GB 以上。
2. 有時間也可以自行一台一台的安裝。

2012年4月7日 星期六

蘋果派


派皮的作法麵粉, 無鹽奶油250, , , 蘋果汁(無糖)
1.   麵粉2杯半
2.   2大茶匙 (tea spoon)
3.   (2.5ml) 一匙
4.   無鹽奶油250克切成小丁
將料1, 2, 3 ,4全部攪拌後用手抓至鬆散放入冰箱一小時

5.   另準備6大茶匙的無糖蘋果汁(如没有蘋果汁, 可用2匙白醋及4匙水代替), 放入冰箱一小時
6.   5加入攪拌後的麵粉,並揉成團
7.   將麵團滾成麵皮, 放入圓型烤盤, 底部要壓平, 外緣留大約一吋, 其餘的切除
8.   將蘋果舖放到麵皮裡,
9.   上層麵皮可作成條狀, 舖在蘋果上面, 將下層麵皮及上層麵皮折進烤盤裡.
10.  烤箱要預熱至350
11.  打一顆蛋, 放少許水及鹽後打散
12.  將上層麵皮塗上蛋汁
13. 放入烤箱烤1小時至蘋果餡起泡


內餡作法
 材料: 蘋果6, , 肉桂粉, 太白粉, 麵粉,
  1. 蘋果6, 去皮去核, 切成薄片
  2. 2分之一杯(1/2 cup)
  3. 肉桂粉2.5ML 一匙
  4. 太白粉一大茶匙
  5. 麵粉2大茶匙
  6. 鹽一半小匙
  7. 2-6的料全和蘋果攪伴放1小時等蘋果出水

2012年2月29日 星期三

Windows 8 Consumer Preview 初體驗

Windows 8 整個操作起來非常的平板,如果用過 Windows Phone,應該可以馬上就上手。

 [Win Key] 是非常重要的按鍵,可以在各個 Apps 切換。還有基本的操作像是滑鼠移到左下角,會出現 Start Window,滑鼠再往上移,可以選之前執行過的 Apps。 


滑鼠再移到右下角,會出現 [Search], [Share], [Start], [Devices] 及 [Settings],桌面上也會有時間跟日期。

按下 [Search]  可以看到有那些 Apps 可以用。

直接來看看幾個 Apps 的畫面:
1. Store 終於有東西可以下載了。

2. Xbox LIVE Games

3. Photos 可以同步好幾個帳號。

4. Calendar 會跟 Live 的帳號同步。


5. Messaging 像手機的對話模式。

6. People 可以整合數個帳號的聯絡人。

7. Weather 下雪了。

8. Finance

9. Reader 可支援的格式還不是太多。

當執行過一些 Apps 後,動態磚上就會顯示即時訊息,非常有用。 

感想:
1. 整體操作順暢,資訊簡潔清楚,可以包含多年齡層的使用者。(我不是說 iPad)
2. 未來的概念大概是所有資料都上雲端,各個設備間 (電腦、手機...) 的同步都會到雲端。(公有雲及私有雲)
3. 純粹猜想一下,如果所有電腦、筆電的螢幕都能觸控的時候,Windows 8 應該可以成長很快。

但是 (一定要有個但是),對於一些傳統使用者,或是每天坐辦公桌的人來說,只是要用用 Office,再到 ERP 打打單,不需要這些會分心的東西吧。不知道會不會有個簡潔的 Workstation 版本。

後記:
安裝完 Windows 8 之後,馬上把 Nokia Lumia 710 接上去看看有什麼事發生,結果什麼也沒發生,後來看了一下 PC settings 有找到 Lumia 710,但似乎出了什麼問題。
 再看一下 Action Center 的 Maintenance,原來還要另外裝 Zune,算了吧。





Windows 8 Consumer Preview 安裝 (一)

Windows 8 Consumer Preview 在二月底出來了,安裝體驗一下吧。


準備工作:
1. 安裝 VMware Player
2. 下載 Windows 8 Consumer Preview,請自行 Review 下載網頁的注意事項。
注意:非正式版本,不要裝在工作環境。


安裝電腦:
ThinkPad T410
OS : Windows 7 Pro
Memory : 8GB
HD : 500GB


安裝步驟:
1. VMware Player 安裝設定請參照 Windows 8 Developer Preview 安裝 (一) 步驟 1-8。
2. 開始安裝畫面,出現一條魚,跟 Developer Preview 不一樣了。


3. 這部分還是一樣,底色深了點,按 [Next]。 


4. 按 [Install now]。 


5. 這版本要輸入 product key,下載網頁有。


6. 瀏覽下 License terms,勾選 [ I accept the licence terms ],按下 [Next]。 


7. 新安裝,選 [Custom: Install Windows only (advanced)]。 


8. 按下 [Next]。 


9. 開始自動安裝。


接續 Windows 8 Consumer Preview 安裝 (二) 安裝設定。
PS. 如果出現需要 ProductKey 的畫面,請參照 Windows 8 Developer Preview 安裝時需要 ProductKey 問題

Windows 8 Consumer Preview 安裝 (二)

接續 Windows 8 Consumer Preview 安裝 (一) 


10. 選擇背景顏色,輸入 PC name,按下 [Next]。


11. 看看有什麼可以設定的,按下 [Customize]。 


12. 選擇 [Yes, turn on sharing and connect to devices]。 


13. 可以自行設定或直接按 [Next]。 


14. 自行設定 On/Off,然後按下 [Next]。(有一項不能改)


15. 自行設定 On/Off,然後按下 [Next]。(第一項不能改)


16. 如果有 Windows Live Account 可以直接輸入,可以跟該帳戶同步資料,也可以直接按下 [Next]。


17. 個人化設定中。


18. 不到一小時就安裝完了,速度滿快的。

2012年2月24日 星期五

OpenCart Canada Taxes Setting

Taxes reference from Sales taxes in Canada.
Note : 
1. OpenCart won't calculate cumulative tax. I use the effective tax rate.
2. This article for OpenCart Tax setting SAMPLE only. 

0. Backup website and database.

1. Create [Geo Zones]
    Canada GST Zone --> Canada / Alberta, British ColumbiaManitoba, Northwest Territories, Nunavut, Quebec, Saskatchewan, Yukon Territory
    BC PST Zone --> Canada / British Columbia
    MB PST Zone --> Canada / Manitoba
    NB HST Zone --> Canada / New Brunswick
    NL HST Zone --> Canada / Newfoundland and Labrador
    NS HST Zone --> Canada / Nova Scotia
    ON HST Zone --> Canada / Ontario
    PEI HST Zone  --> Canada / Prince Edward Island
    QC QST Zone --> Canada / Quebec
    SK PST Zone --> Canada / Saskatchewan

2. Create [Tax Rates]
    GST (5%) --> Tax Rate: 5, Type: Percentage, Customer Group: check all, Geo Zone: Canada GST Zone
    PST (7%) --> Tax Rate: 7, Type: Percentage, Customer Group: check all, Geo Zone: BC PST Zone
    PST (7%) --> Tax Rate: 7, Type: Percentage, Customer Group: check all, Geo Zone: MB PST Zone
    HST (13%) --> Tax Rate: 13, Type: Percentage, Customer Group: check all, Geo Zone: NB HST Zone
    HST (13%) --> Tax Rate: 13, Type: Percentage, Customer Group: check all, Geo Zone: NL HST Zone
    HST (15%) --> Tax Rate: 15, Type: Percentage, Customer Group: check all, Geo Zone: NS HST Zone
    HST (13%) --> Tax Rate: 13, Type: Percentage, Customer Group: check all, Geo Zone: ON HST Zone
    HST (14%) --> Tax Rate: 14, Type: Percentage, Customer Group: check all, Geo Zone: PEI HST Zone
    QST (9.975%) --> Tax Rate: 9.975, Type: Percentage, Customer Group: check all, Geo Zone: QC QST Zone
    PST (5%) --> Tax Rate: 5, Type: Percentage, Customer Group: check all, Geo Zone: SK PST Zone

3. Create [Tax Class]
    Canadian Tax Class --> Add Tax Rates which according to your website location. Based On select [Shipping Address].

4. Select [Canadian Tax Class] on products' [Tax Class].

5. Make an order and check the [Total].

2012年2月23日 星期四

OpenCart 新增 Modules 自訂頁面

OpenCart Modules 裡面的模組可以豐富網站內容,如果要增加一個完全可以自定義內容的模組,該如何做呢?可以直接拿 [Welcome] 的相關檔案來改。


0. 備份網站,備份 Database。 


1. 複製以下檔案:
    catalog/controller/module/welcome.php
    --> catalog/controller/module/customize.php
    catalog/language/english/module/welcome.php
    --> catalog/language/english/module/customize.php 
    catalog/view/theme/default/template/module/welcome.tpl
    -->  catalog/view/theme/default/template/module/customize.tpl 
    admin/controller/module/welcome.php
    --> admin/controller/module/customize.php
    admin/language/english/module/welcome.php
    --> admin/language/english/module/customize.php
    admin/view/template/module/welcome.tpl
    --> admin/view/template/module/customize.tpl

2. 更改以下檔案:
   catalog/controller/module/customize.php 
  --> 1. 更改 Class 名換成 ControllerModuleCustomize
      2. 用 replace 的方式將檔案中 welcome換成 customize
  catalog/language/english/module/customize.php
  --> 自行修改適合文字
   catalog/view/theme/default/template/module/customize.tpl
  -->  自行修改或維持原狀。
   admin/controller/module/customize.php 
  --> 1. 更改 Class 名換成 ControllerModuleCustomize
      2. 用 replace 的方式將檔案中 welcome 換成 customize
   admin/language/english/module/customize.php 
  --> 自行修改適合文字
   admin/view/template/module/customize.tpl  
  --> 用 replace 的方式將檔案中 welcome 換成 customize


3. 在後台 [Extensions] --> [Modules] 就可以看到新增的 Customize Module,點選 [Install] --> [Edit] 後,就可以放入自己想要的內容。

2012年2月22日 星期三

OpenCart 新增 Shipping Method

OpenCart Shipping Method 預設有 [Per Item] 的項目,但是如果想再增加 Express 的運費要如何做呢?可以直接拿 [Per Item] 的相關檔案來改。


0. 備份網站,備份 Database。 


1. 複製以下檔案:
    catalog/language/english/shipping/item.php
    --> catalog/language/english/shipping/itemex.php
    catalog/model/shipping/item.php
    --> catalog/model/shipping/itemex.php
    admin/controller/shipping/item.php
    --> admin/controller/shipping/itemex.php
    admin/language/english/shipping/item.php
    --> admin/language/english/shipping/itemex.php
    admin/view/template/shipping/item.tpl
    --> admin/view/template/shipping/itemex.tpl

2. 更改以下檔案:
  catalog/language/english/shipping/itemex.php
  --> 自行修改適合文字
  catalog/model/shipping/itemex.php
  --> 1. 更改 Class 名換成 ModelShippingItemEx
      2. 用 replace 的方式將檔案中 item 換成 itemex
  admin/controller/shipping/itemex.php
  --> 1. 更改 Class 名換成 ModelShippingItemEx
      2. 用 replace 的方式將檔案中 item 換成 itemex
  admin/language/english/shipping/itemex.php
  --> 自行修改適合文字
  admin/view/template/shipping/itemex.tpl
  --> 用 replace 的方式將檔案中 item 換成 itemex


3. 在後台 [Shipping Method] 就可以看到新增的 Express 運費項目,點選 [Install] --> [Edit] 後,輸入費用及相關設定,前台 [Check out] 之後就可以看到了。



Lumia 710 好玩的 Games

Xbox LIVE
Minesweeper
Shuffle Party
Xbox LIVE Extras


B
Basketball
BBB: App-ocalypse


C
Crazy Casino


D
Duck Hunt


H
Hearts


L
Logic Games


N
Naval War Free


R
Reversi Pro Free


S
Shoot Bubble
Shuriken Ninja
Solitaire

Lumia 710 好用的 Apps

A
Adobe Reader


C
Connectivity Shortcuts
Cool Tools


D
Dictionary.com


F
Facebook


G
GasBuddy


M
Mobiletag
MoHoo Reader


R
REALTOR.ca


S
Scientific Calculator
SketchPad
SkyDrive
SkyMap Free
Skype
SoundHound


T
TripAdvisor


W
Weather
WhatsApp
WinPhone Info Free


唐詩
有道辭典
書中聖

2012年2月21日 星期二

使用 Dreamweaver 編輯 tpl 檔案

目前有些 MVC 架構的 View 用的附檔名為 .tpl。基本上這個檔案也是用 PHP + Html 來寫的。Dreamweaver 預設並沒有加上這個附檔名,所以要手動自己設定一下。

1. 開啓 MMDocumentTypes.xml 檔案,若沒改安裝目錄的話,位於 C:\Program Files\Adobe\Adobe Dreamweaver CS5\configuration\DocumentTypes 下。

2. 加上 tpl 在這行  <documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3,php4,php5,phtml,tpl" macfileextension="php,php3,php4,php5,phtml,tpl" file="Default.php" writebyteordermark="false" mimetype="text/html"> ]

3. 關閉 Dreamweaver 後,再開啓即可。