跳到主要內容

發表文章

[JQuery] set Select Default

                        var el = $('#SelectID'); // Select the relevant option, de-select any others el.val("Man").attr('selected', true).siblings('option').removeAttr('selected'); // jQM refresh el.selectmenu("refresh", true);

Worklight Serve Install process

1.install Java 1.7.0 2.Install DB2 [Account] / [PWD]  3.Install Installation Manager 4.Install Websphere Liberty 5.Create Websphere Server >server create  WLserver 6.Start Service : IBM Secure Shell Server for Windows 7.Install IDM WorkLight Server IBM DB2 Driver for JDBC C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar 8.RUN Worklight Server Configuration Tool Create New Configuration console Settings [V] Install Worklight Console /worklightconsole JDBC C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar Create a default user admin /[PWD] 9. RUN Websphere Server [WLserver] >server start WLserver 10. open http://localhost:9080/appcenterconsole/console.html appcenteradmin /admin

Entity Framework Create Relation Object

我們見了兩個table   Parent table : Mall_product   Son table : Mall_Item    Mall_Product---> Mall_Item (1對多)  1.Create ADO.net Entity 2. Create  Association Mappings  /建立關連 3.設定關連    由於在DB設計時就已經把欄位都建好了   所以設定的時候 就不用「將外部索引鍵屬性加入至 Mall_item 實體中」 但要在Mall_Product建立「導覽屬性」。   這樣就建立物件之間的關連了   但我們還沒有設定好外鍵對映的屬性  所以 4. 點選關連    要設定主體跟相依的狀況    主體 Mall_Product    相依 Mall_Item    主體索引鍵 就是Mall_Product PK : Poid    相依的屬性 就是我們在DB設計的 Mall_Item FK: ProductPoid 5.最後在程式中 Dim db As New GalleryMaxEntities Dim p As New Mall_Product p.ProductID = "Product01" Dim i As New Mall_Item i.Price = 50 p.Mall_Items.Add(i) db.Mall_Product.Add(p) db.SaveChanges()

Disable oncontextmenu/ Ctrl+A / Copy /Cut /Past

Use js $('body').bind('copy paste',function(e) {     e.preventDefault(); return false;  }); $(function(){        $(document).keydown(function(objEvent) {                 if (objEvent.ctrlKey) {                       if (objEvent.keyCode == 65||objEvent.keyCode == 83) {                                          return false;             }                         }             }); });    Html Attrtibute [body oncontextmenu="return false" oncopy="return false" oncut="return false" onpaste="return false"]

開發工具清單

[Web] [JSON]Postman - REST Client (Chrome Plugin) Web Develope  Cookies(Chrome Plugin)  [.Net] VS2013 VS10x CodeMap Web Essentials 2014 SQL Server Compact/SQLite Toolbox AnkhSVN [SQLServer] SQL Server management Studio [MySQL] MySQL Workbench  [Other] Sublime text Database.NET TortoiseSVN Git Notepad ++ Memory Cleaner [code DOC] SandCastle [] Vega O-scan [JS]

[CSS3] let IE8 Support more CSS3 : CSS3 selectors for IE "selectivizr"

IE8 對於CSS3的支援沒有很好, 有些時候寫的CSS是無法在IE8上執行 這時候可以安裝 selectivizr.js 就可以改善這個問題 這是selectivizr.js專頁上的說明 selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8. Simply include the script in your pages and selectivizr will do the rest 詳細說明請見 http://selectivizr.com/

[VB.net] Linq Out Join

Dim petOwners = From pers In people Group Join pet In pets On pers Equals pet.Owner Into PetList = Group From pet In PetList.DefaultIfEmpty() Select pers.FirstName, pers.LastName, PetName = If(pet Is Nothing, String.Empty, pet.Name)