2016年3月15日 星期二

EF6,exception: The data reader returned by the store data provider does not have enough columns for the query requested.

「The data reader returned by the store data provider does not have enough columns for the query requested.」
解法
在原來的stored procedure中,應該是以 Return @result做傳回值的動作,
 改為select @result的方式傳回即可解決這個問題
參考這裡

2016年3月10日 星期四

for javascript,模擬F11將目前頁面開為全螢幕模式或是關閉全螢幕模式

=============================================================
function cancelFullScreen(el) {
           var requestMethod = el.cancelFullScreen || el.webkitCancelFullScreen || el.mozCancelFullScreen || el.exitFullscreen;
           if (requestMethod) { // cancel full screen.
               requestMethod.call(el);
           } else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
               var wscript = new ActiveXObject("WScript.Shell");
               if (wscript !== null) {
                   wscript.SendKeys("{F11}");
               }
           }
       }

       function requestFullScreen(el) {
           // Supports most browsers and their versions.
           var requestMethod = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;

           if (requestMethod) { // Native full screen.
               requestMethod.call(el);
           } else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
               var wscript = new ActiveXObject("WScript.Shell");
               if (wscript !== null) {
                   wscript.SendKeys("{F11}");
               }
           }
           return false
       }

       function toggleFull() {
           var elem = document.body; // Make the body go full screen.
           var isInFullScreen = (document.fullScreenElement && document.fullScreenElement !== null) || (document.mozFullScreen || document.webkitIsFullScreen);

           if (isInFullScreen) {
               cancelFullScreen(document);
           } else {
               requestFullScreen(elem);
           }
           return false;
       }
=============================================
參考來源在此
但,注意,如果你已經在Chrome的設定中指定全螢幕模式的話(如下圖)


上述的語法是會沒動作的,請小心