UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-#Author#
[所有文章分類]
所有文章分類
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • Newtonsoft.Json.JsonConvert.DeserializeObject 失敗的情況
    test...more
  • dotnet ef dbcontext scaffold
    ...more
  • [ASP.NET] 利用 aspnet_regiis 加密 web.config
    ...more
  • IIS ARR (reverse proxy) 服務安裝
    ...more
  • [錯誤訊息] 請加入 ScriptResourceMapping 命名的 jquery (區分大小寫)
    ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • 線上客服 - MSN
    本人信箱被盜用以致資料外洩,是否可以請貴平台予以協助刪除該信箱之使用謝謝囉...more
  • 插入文字到游標或選取處
    aaaaa...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
標籤
  • 0
  • admin ORDE
  • IIS7
  • vs
  • monitor
  • en
  • filezilla
  • config ord
  • IDENTITY_I
  • certificat
  • -5615 orde
  • [u2]
  • 22
  • google
  • 6402-6385
  • win-acme
  • RSA
  • sp_
  • orm
  • let
  • ? ORDER BY
  • ping -n 25
  • [t]
  • SVN
  • 403 - forb
  • date[t]
  • -1948
  • SQL User
  • 874
  • aspnet_reg
  • setnumber
  • XHbB5sz4
  • 560
  • -3643
  • .
  • AjaxUpload
  • 114
  • FortiGate
  • PrintDocum
  • vb
  • dotnet
  • jq
  • dictionary
  • -9971 BnYT
  • db
  • 5009
  • URL Rewrit
  • 6100
  • Su
  • 12
頁數 7 / 15 上一頁 下一頁
搜尋 if 結果:
deferred jQuery 從 1.5 開始引進了 Deferred Object(延遲物件),可以更簡便地處理非同步程式在不同狀態的 callback。
http://blog.zhusee.in/post/48857667691/jquery-deferred-object

deferred.done(callback)  #=> 成功時執行
deferred.fail(callback)  #=> 失敗時執行
deferred.progress(callback)  #=> 還在跑,但是裡面的程式使用 `.notify` 方法通知進度
deferred.always(callback)  #=> 無論成功或失敗都會執行
deferred.when(filters)  #=> 在呼叫 callback 前先處理資料,後面解釋

當所有 Deferred 都完成後,註冊在 $.when() 下面的 callback 會拿到第一個 Deferred 物件傳給 callback 的參數

var d1 = $.Deferred(), d2 = $.Deferred(),
     w = $.when(d1, d2);

  w.done(function(msg) { console.log(msg) });

  d1.resolve("Part A done");
  d2.resolve("Part B done");

  #=> "Part A done"

 
More...
Doug, 2015/10/15 下午 12:23:54
UNT流量異常追蹤紀實
自從 8/1 起 shopunt 就呈現奇怪的現象



基本上是每日半夜12點流量暴增 (peak 到 80mb),然後逐漸下降,到了 5~6點又慢慢爬升,直到 10 點以後就驟降

基本上,網站沒有掛掉,沒有太多Exception,LB兩台server的流量很平均,Server Diff 查也沒有過多的Session
可以排除被攻擊的可能性

為了找問題,只好從 IIS Log著手......
1. 首先,查詢12點有甚麼網頁或網址異常多點擊數,並且比較 11 點與 12點兩者差異,結果都沒有任何異常
    卻意外發現有家廣告合作廠商半夜會來抓產品圖,只是這個流量不大,發生點也不是在12點整,不是兇手
2. 起先因為 IIS log 沒有設定 sc-bytes 這個屬性,只有 time-taken 屬性,發現有些圖片 load 的特別久,但還是無法確定問題,所以想說把 sc-bytes 加到 IIS log 再來觀察
3. 加了 sc-bytes 之後的 IIS log,才發現驚人的事實,有幾張圖片竟然高達好幾MB,最大張是放在周年慶的 landing 圖片,竟高達 7.8MB



光1小時,一張圖片吃掉 8.6GB 的量,換算平均值約 13 mb/sec , OMG!
趕緊請設計把圖片換掉

只是這樣,還是有一個奇怪現象,為何半夜12點流量暴增,早上 10 點流量驟減?


這是禍首最大張圖片的點擊數統計(時間是GMT,16是半夜12點, 15是晚上11點),
就跟流量圖一樣,00~10 點擊數很高,其他時間很低
下面是這張圖片所屬頁面的點擊數統計 (/tch/fixpage.aspx?id=689)



從圖片點擊數看來,我以為是 ISP 某種 transparent proxy cache 發揮作用 (半夜 00~10點關閉 所以流量增加),
但是看到 fixpage.aspx 的點擊數也是一樣的狀況,我就不知道該怎麼解釋了??
ISP transparent proxy 也會處理 *.aspx ?? 

還是回歸到最基本的原因,網站的廣告曝光量是 00~10點最高??

 
More...
darren, 2015/8/9 上午 11:00:45
HTML 的上標字與下標字
上標文字或符號,英文是 superscript ,下標文字或符號,英文是 subscript ,而在網頁 HTML 中即是 <sup> 與 <sub> 標籤。




參考來源:http://www.phd.com.tw/knowledge/html/text/
More...
Reiko, 2015/7/22 下午 05:46:36
C# 下拉選單AutoPostBack後Button點擊沒反應
改用javascript送出
<asp:Button ID="BtnSubmit" runat="server" Text="修改" OnClick="BtnSubmit_Click" OnClientClick="return formSubmit('true');" />


<script type="text/javascript">
                function formSubmit(val) {
                    if (val== "true")
                    {
                        form1.submit();
                    } else {
                        return false;
                    }
                }
            </script>


相關專案: 光寶
More...
Reiko, 2015/6/29 下午 03:49:57
Server 2008R2 安裝 .net 3.5
這是假設 server 已經先安裝 .net 4.0 
首先,不需從網路下載 .net framework3.5
必須從 "伺服器管理員" 去新增功能加入

安裝完之後,跑 NET 4.0 網站會錯誤
[IIS] IIS出現[無法從組件 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 載入型別 'System.ServiceModel.Activation.HttpModule'。] 錯誤訊息排解

若要正常使用必須要再跑以下指令
以 "系統管理員" 開啟 cmd.exe
執行
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
More...
darren, 2015/6/8 下午 11:59:15
用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
若是最簡單的方式來設定 cookie 時, 
document.cookie = "name=value";
, 會使用目前網頁所在的 Path 做為預設的 Path,所以若是從另一個目錄的網頁來讀 cookie 時, 有可能會讀不到。 

解決的辨法是指定 Path 為 "/" 如下, 
document.cookie = "name=value;path=/";
More...
Bike, 2015/5/9 下午 12:50:54
jQuery 之 event.originalEvent
有時候用 jQuery 使用 event 物件時,會發現有些特殊事件的 property 抓不到 (undefined)
例如
mousewheel --> event.wheelDelta 
drop --> event.dataTransfer
touchstart --> event.touches[0].pageX
原因是 jQuery 的 event 只會包裝一般的屬性,特別的屬性要使用 event.originalEvent 去抓
event.originalEvent 是瀏覽器原生的 event

It's also important to note that the event object contains a property called originalEvent, which is the event object that the browser itself created. jQuery wraps this native event object with some useful methods and properties, but in some instances, you'll need to access the original event via event.originalEvent for instance. This is especially useful for touch events on mobile devices and tablets.

所以開發時當有些特殊屬性抓不到時,可以考慮用 event.originalEvent 去抓看看

    // 這是用滾輪放大縮小圖片 (此範例firefox不支援)
    $("#imgProductBig").bind("mousewheel", function (ev) {
        var delta = ev.originalEvent.wheelDelta > 0 ? 1 : -1;
        if (delta > 0 && zoomValue < 150) {
            zoomValue += 10;
        }
        else if (delta < 0 && zoomValue > 50) {
            zoomValue -= 10;
        }
        $(this).css("zoom", zoomValue + '%');
        return false;
    });


 
More...
darren, 2015/4/21 下午 12:03:35
C# difference between `==` and .Equals()
這可能是老問題了,但還是提醒一下
當用  (Object == Object) 比較時,是用 System.Object.ReferenceEquals
所以即使兩個值是一樣的,因為 reference 是不同物件, 他還是會回傳 false
http://stackoverflow.com/questions/814878/c-sharp-difference-between-and-equals

例如要比較一個 datarow 兩個欄位值

row["SDate"] = "2015-04-01";
row["EDate"] = "2015-04-01";

(row["SDate"] == row["EDate"]) ==> false
(row["SDate"].Equals(row["EDate"])) ==> true
(row["SDate"].ToString() == row["EDate"].ToString()) ==> true
More...
darren, 2015/4/14 下午 03:16:40
跨 domain iframe 網頁的 javascript 互通API
這是一個老問題,當開啟的網頁是另一網站時,javascript 是不能互通呼叫的 
因此 W3C 制訂的 HTML5 Web Message 規格,讓跨站網頁可以互通訊息
http://www.w3.org/TR/webmessaging/
https://html.spec.whatwg.org/multipage/comms.html#web-messaging

Can I Use 查詢發現幾乎所有瀏覽器都支援了, Good!
http://caniuse.com/#search=postMessage

Youtube 就依此標準做出工具,讓砍入 iframe Youtube 影音的網頁可以互動
例如上層網頁就可以控制 iframe 裡的影音的音量、暫停等
https://developers.google.com/youtube/iframe_api_reference
More...
darren, 2015/3/26 下午 03:25:24
如何將 Mydata 的 restoring state 取消

錯誤訊息:
ALTER DATABASE is not permitted while a database in in the Restoring state.

ALTER DATABASE statement failed. (Microsfot SQL, Error 5052).


RESTORE DATABASE [資料庫名稱]
WITH RECOVERY;

 

More...
Reiko, 2015/3/19 下午 04:28:59
|< 12345678910… >|
頁數 7 / 15 上一頁 下一頁
~ Uwinfo ~