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
標籤
  • js UNION A
  • ${91940214
  • 火狐
  • 62expr 952
  • C
  • cA2yeXPF
  • mssql
  • Reflected
  • data212112
  • export
  • en21211211
  • aJkc4exf
  • mod order
  • hhhh
  • 0KeeTeamex
  • 234
  • ORM
  • NxFRfXz6
  • table_moni
  • 網址
  • 220
  • -8430
  • 28
  • sing,
  • -2154 UNIO
  • chrome
  • 發行者
  • dttoexcel2
  • CS
  • WU
  • Line99999
  • 8385
  • login ORDE
  • html
  • GbciaVFI
  • 長時間
  • Image
  • 144
  • json
  • 724
  • 權限
  • CK,
  • utf8
  • Block21211
  • OUTPUT ORD
  • AD
  • blog
  • awstat
  • 460
  • ef
頁數 29 / 53 上一頁 下一頁
搜尋 C 結果:
history 操作 (pushState, replaceState, popstate, onpopstate)
1. 不要用 location.href 來重新定位,在 Chromwe 中,History 會增加一筆記錄。若此時再 pushState,History 中會有重覆的記錄。

2. "上一頁"的目標若是同一頁,document.ready 不會被觸發,但若是不同頁面,document.ready 會被觸發。

3. 上一頁時,Select 的內容會被複原,但 textbox 的內容會保留。
More...
Bike, 2015/1/6 下午 02:51:43
T-SQL 欄位為Empty或Null時取代成其它欄位
※ 當Nickname為空或為DBNull時, 內容改成抓欄位Name
SELECT COALESCE(NULLIF(Nickname ,''), Name) as Name2  from Employee


※ 如果Nickname為ntext時
SELECT COALESCE(NULLIF(CONVERT(NVarChar(30), Nickname),''), Name) as Name2  from Employee
 
More...
candice, 2015/1/5 下午 06:22:55
ThreadStart 未處理 Exception 造成網站Crash
最近把 shopunt 網站重啟的Log加上,發現網站有兩次時無預警的重啟
但是沒有exception log, 於是去看系統的 Event log, 發現出現以下的錯誤

應用程式: w3wp.exe
Framework 版本: v4.0.30319
描述: 處理序已終止,因為有未處理的例外狀況。
例外狀況資訊: System.Exception
堆疊:
於 UW.SQL.DTFromSQL(System.String, System.String)
於 UW.SQL.DTFromSQL(System.String, System.Data.SqlClient.SqlConnection ByRef, Boolean)
於 SHOPUNT.DB.Product.RebuildNotStopProducDT()
於 System.Threading.ExecutionContext.runTryCode(System.Object)
於 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
於 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
於 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
於 System.Threading.ThreadHelper.ThreadStart()

---------------------------------------------------------------------------------------------------------------------------------------

失敗的應用程式名稱: w3wp.exe,版本: 7.5.7601.17514,時間戳記: 0x4ce7afa2
失敗的模組名稱: KERNELBASE.dll,版本: 6.1.7601.18229,時間戳記: 0x51fb1677
例外狀況碼: 0xe0434352
錯誤位移: 0x000000000000940d
失敗的處理程序識別碼: 0x57c4
失敗的應用程式開始時間: 0x01d012faf33398f8
失敗的應用程式路徑: c:\windows\system32\inetsrv\w3wp.exe
失敗的模組路徑: C:\Windows\system32\KERNELBASE.dll
報告識別碼: 90ad2f4d-7f89-11e4-8ad2-e41f13b7d81e


原因是另開 Thread 以非同步取得非停售產品的資料時 產生 sql timeout,這時網站就整個 Crash 
約兩分鐘後才重新啟動,我想雙11網站一直Crash應該跟這個有關

改善方式:
1. RebuildNotStopProducDT 要 Try Catch 不要丟 exception 直接寄 mail 就好
2. 資料庫取得 "非停售產品" 有點沒有效率,不忙時至少要跑 4 秒,資料庫一忙就會Timeout,所以應該要把確定下架且不會販售的產品設定為停售 (Is_StopSell = 'Y'),這樣至少少了2000件產品的查詢,可以秒殺


另外 .NET 4.0 有新的物件叫做 Task 可以用來處理非同步程式,也可以處理 exception 狀況,有時間的話再來改看看
 
More...
darren, 2014/12/13 下午 05:44:05
資料前後端傳遞回顧
在做地址的時候用了一個套件(TWZIPCODE)
可以幫你產生下拉霸的郵遞區號選項
很方便(jQuery)
但是在控制他的資料及回傳
又不知道怎樣比較方便直觀了

首先目前也是文字控制的方式是
UWForUNT.WU.ReplaceStringInControl(Me.Page, "#Post_Code#", Post_Code)
直接用 #Post_Code#
再把她取代

直接讓前端讀到值

回傳時 若是用後端控制 不用再傳ajax 或是 塞到別的後端控制項
回傳的方式
UW.WU.GetValueFromQueryStringOrForm("Post_Code")

但是因為之後不讓 Page Load 再次改成預設值
可以加
If Not Me.IsPostBack Then
   UW.WU.GetValueFromQueryStringOrForm("Post_Code")
End If
才不會永遠是預設值
(            $('#twzipcode').twzipcode({
            zipcodeSel: '#Post_Code#', // 此參數會優先於 countySel, districtSel
            countySel: '台北市',
            districtSel: '大安區',
            zipcodeName: 'Post_Code'
            })
)

他如果有包在裡可以直接讀取

另外若是 有一些後端要傳給前端的資料 用response.Write("<script>XXX</script>")
可以直接寫入前端
More...
sean, 2014/11/27 下午 04:20:42
使用Linq取得CheckBoxList多選值
取得CheckBoxList多選值的方式:

【未使用Linq的寫法】

       Dim values = New List(Of String)()
       For Each item As ListItem In Me.CheckBoxList1.Items
             If item.Selected Then
                  values.Add(item.Value)
             End If
       Next

       Dim result = String.Join(",", values.ToArray(Of String)())
 

【使用Linq的寫法】

               Dim result = String.Join(",", Me.CheckBoxList1.Items.Cast(Of ListItem)() _
                                   .Where(Function(x) x.Selected) _
                                   .[Select](Function(x) x.Value).ToArray())

p.s. Linq需使用.NET Framework 3.5以上的版本
More...
candice, 2014/11/26 下午 04:57:30
自製 radio button & checkbox 的注意事項
自製input 的 radio button 和 checkbox 之前常見的做法是,在input旁邊加入:not(old)的選擇器,如下所例 (以下寫法為SCSS格式)

input[type="radio"]:not(old){
width:28px;
margin:0;
padding:0;
@include opacity(0);
}
input[type="radio"]:not(old) + label{
display: inline-block;
margin-left: -28px;
padding-left: 18px;
background: url("//www.shopunt.com/images/eng/btn/radio.png") no-repeat;
width:auto;
line-height: 12px;
}
input[type="radio"]:not(old):checked + label{
background: url("//www.shopunt.com/images/eng/btn/radio-r.png") no-repeat;
width:auto;
}


但是chrome的新版本(39版)後開始,不能直接在input旁邊加:not(old),這段語法,點擊後,會無法正常顯示,所以解決的方法有兩個
1. 要使用:not(old)這段語法,不能在input旁邊加,必須是在他的外層上加,如下所例

.r-btn:not(old){
    input[type="radio"]{
     width:28px;
     margin:0;
     padding:0;
     @include opacity(0);
    }
    input[type="radio"] + label{
     display: inline-block;
     margin-left: -28px;
     padding-left: 18px;
     background: url("//www.shopunt.com/images/eng/btn/radio.png") no-repeat;
     width:auto;
     line-height: 12px;
    }
    input[type="radio"]:checked + label{
     background: url("//www.shopunt.com/images/eng/btn/radio-r.png") no-repeat;
     width:auto;
    }
}


2. 不使用:not(old),改用:not(:checked)寫法,Selectors 4也建議使用此語法,如下所例
input[type="radio"]:not(:checked), input[type="radio"]:checked {
    position: absolute;
    left: -9999px;
}
input[type="radio"]:not(checked) + label{
display: inline-block;
margin-left: 4px;
padding-left: 18px;
background: url("//www.shopunt.com/images/eng/btn/radio.png") no-repeat;
width:auto;
line-height: 12px;
}
input[type="radio"]:checked + label{
background: url("//www.shopunt.com/images/eng/btn/radio-r.png") no-repeat;
width:auto;
}


 
More...
nelson, 2014/11/21 下午 07:04:21
在頁面上呈現 圓形圖片加外框的小技巧
HTML:

<ul class="aaa">
<li><img src="http://placehold.it/150x150" /></li>
</ul>

<ul class="bbb">
<li><div><img src="http://placehold.it/150x150" /></div></li>
</ul>


CSS:
.aaa li{
display: inline-block;
width: 160px;
}

.aaa li img{
width: 150px;
border: 5px solid #ececec;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}


CSS:
.bbb li{
display: inline-block;
width: 160px;
}
​.bbb li div{
width: 150px;
padding: 5px;
background: #ececec;
overflow: hidden;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}
.bbb li img{
width: 150px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}


​


Safari OUTPUT:

aaa:



bbb:




 
More...
nelson, 2014/11/10 下午 03:48:03
小心設定連線字串中的Connect Timeout
今天網站升到 .Net Framework 4.0 時,突然有幾個頁面一執行就會load不停,並且造成 w3wp.exe 的CPU飆高。

經查詢之後發現,問題發生在執行SQL時;會load不停的頁面所呼叫的連線字串中,都將屬性Connection Timeout=0

,因此將Connection Timeout=0拿掉就好了。

<add key="xxxxxx" value="server={server};database={DB};uid={uid};pwd={pwd};Max Pool Size={size};Connection Timeout=0"/>

http://msdn.microsoft.com/zh-cn/library/system.data.oracleclient.oracleconnection.connectiontimeout(v=vs.110).aspx

所以在設定連線字串時,應避免將Connection Timeout設成0,否則會無限期的等待連接。


p.s. 很神奇的事是,在 .Net Framework 2.0 是正常的,但升成 4.0 後才會load不停,不知道為什麼。
More...
candice, 2014/11/5 下午 06:56:48
例出 IIS 所有站台的 Process Id
%systemroot%\system32\inetsrv\APPCMD list wps
More...
Bike, 2014/11/5 上午 09:35:07
Fixing Windows 2008 R2 Activation Errors
http://lifeofageekadmin.com/fixing-windows-2008-r2-activation-errors/

​Location is at C:\windows\system32\Slmgr.vbs
/ckms = clear all KMS servers in cache and set to auto discover
/skms :  = Specify a KMS host server
/ipk  = Enter in a new license key
/ato = Activate the new key
/dlv = Display license information
First open a command prompt and try to register a license key. This example is for Windows 2008 R2 Enterprise Edition.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
If you receive activation successful you are complete. If you receive a 0xC004F074 error do the following.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ckms
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
If you receive activation successful you are complete. If you receive a 0xC004F074 error again or another error do the following.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /rilc
Reboot
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ckms
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
More information can be found at Configuring KMS Clients
More...
Bike, 2014/11/3 下午 04:49:25
|< …20212223242526272829… >|
頁數 29 / 53 上一頁 下一頁
~ Uwinfo ~