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
標籤
  • list
  • -9328
  • -5197
  • 804
  • 900
  • 394
  • 622
  • 7112
  • 276
  • 434
  • 196
  • 654
  • web
  • Contains
  • line
  • [t]
  • 複製21211211
  • domain
  • table_moni
  • plugin
  • a
  • ti
  • ef
  • 50
  • AD
  • sp_
  • 備份
  • 8
  • json212112
  • net
  • IP
  • sa
  • 494
  • response
  • ddd
  • IE
  • table
  • 橫
  • 852
  • code
  • VS
  • 8 UNION AL
  • 204
  • 壓力測試
  • List.where
  • hkscs
  • 98
  • EN
  • 20
  • -9829 UNIO
頁數 5 / 8 上一頁 下一頁
搜尋 HTML 結果:
embed flash 遮住 layer 的問題解法
發生原因 :  設計提供的Flash Embed 到 Html 後, 發現SWF 某部分會透過 HTML 層, 導致原本為深藍色變成淺藍色

Google 大師 :  
embed flash 遮住 layer 的問題解法
http://wbkuo.pixnet.net/blog/post/40354068-embed-flash-%E9%81%AE%E4%BD%8F-layer-%E7%9A%84%E5%95%8F%E9%A1%8C%E8%A7%A3%E6%B3%95

以上Darren 加進去後 , 發現沒反應 ..
最後其實加  Backgroup-color  就解決這樣問題了 .   

 
More...
Vicky, 2014/3/17 下午 06:38:46
[程式提醒][JS][html] 判斷頁面上某物件是否存在的方式

//判斷頁面上某物件是否存在的方式~
var str = "Hello Morse";
if (document.getElementById('Create_Menu')){
    document.getElementById('Create_Menu').innerHTML = str;
}else{
}

相關文件
http://localhost:2874/WWW20/scripts/Merge/Create_Menu.js
More...
Doug, 2014/2/25 下午 03:26:56
[程式提醒][JS][html] jQuery .html(' long string...') 失敗問題

有時候會用html去取代物件裡的內容,但是當取代的文字過長的時候,很可能會沒有錯誤訊息,但是卻又無法正常顯示,尤其是IE8
var str = "過長的文字";
$(".asdasd").html();
此時我們最好使用以下的方式
var str = "過長的文字";
document.getElementById('Create_Menu').innerHTML = str;
就可以正常執行了
相關參考
http://localhost:2874/WWW20/scripts/Merge/Create_Menu.js


darren 補充:
調整一下標題,讓他較符合發文內容
More...
Doug, 2014/2/25 下午 03:23:27
Send Mail by godaddy
Sub SendMail_godaddy(ByVal Subject As String, ByVal Body As String, ByVal FromMail As String, ByVal ToMail As String)
        Dim objMail As New System.Web.Mail.MailMessage()

        objMail.From = FromMail
        objMail.To = ToMail
        objMail.Subject = Subject
        objMail.BodyFormat = Mail.MailFormat.Html
        objMail.Priority = Mail.MailPriority.High
        objMail.Body = Body

        System.Web.Mail.SmtpMail.SmtpServer = UW.Mail.SMTP_SERVER_NAME
        System.Web.Mail.SmtpMail.Send(objMail)
    End Sub
More...
Reiko, 2014/1/17 下午 02:50:53
Send Mail By gmail SMTP
Sub SendMail_gmail(ByVal Subject As String, ByVal Body As String, ByVal FromMail As String, ByVal ToMail As String)
        Dim msg As New System.Net.Mail.MailMessage

        Dim client As New System.Net.Mail.SmtpClient
        Try

            msg.Subject = Subject
            msg.Body = Body
            msg.From = New System.Net.Mail.MailAddress(FromMail)
            msg.To.Add(ToMail)
            msg.IsBodyHtml = True

            client.Host = "smtp.gmail.com"
            Dim basicauthenticationinfo As System.Net.NetworkCredential = New System.Net.NetworkCredential("username@gmail.com", "password")
            client.Port = Int32.Parse("587")
            client.EnableSsl = True
            client.UseDefaultCredentials = False
            client.Credentials = basicauthenticationinfo
            client.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
            client.Send(msg)

        Catch ex As Exception
            UW.WU.DebugWriteLine(ex.ToString, True, True)
        End Try

    End Sub
More...
Reiko, 2014/1/17 下午 02:48:37
[程式片段][後台]VB懶惰版快取
        
'更新
        If UW.WU.IsNonEmptyFromQueryStringOrForm("Refresh") Then
            System.Web.HttpContext.Current.Cache.Remove(CacheName)
        End If
        '快取部分
        If obj Is Nothing Then
            Dim SQL As String = ""
            SQL = "select * from Product with (nolock)"
            obj = UW.SQL.DTFromSQL(SQL)

            Dim AC As New AggregateCacheDependency

            Dim DepArray() As CacheDependency = { _
                 New SqlCacheDependency(UW.SQL.sqlCacheDependencyName, "Product"), _
                 New SqlCacheDependency(UW.SQL.sqlCacheDependencyName, "Product_Category") _
            }

            AC.Add(DepArray)
            Dim FD As New CacheDependency(UW.Template.TemplateRoot & "2013UI\Product\DirectBuyAllProduct.html")
            AC.Add(FD)

            System.Web.HttpContext.Current.Cache.Insert(CacheName, obj, AC)

        End If
More...
Doug, 2014/1/15 下午 02:12:27
IndexOf 效能問題
一直覺得 UW.Template 應該還有改善的空間,因為網站大量使用這個物件
只要有一些些效能調教,對於整體效能應該有很大的幫助

昨天發現切版的程式 UW.Template => GetTemplateFromString
在使用 IndexOf 去尋找 <!--Key S--> 及 <!--Key E--> 時,
<!--Key E--> 可能有一些問題,因為他是從第0個位置開始找
而實際上他應該是從 <!--Key S--> 後面開始找比較對
所以後者的 IndexOf 要加個 StartIndex 參數值比較對


    StartP = StartP + StartKey.Length
    Dim EndP As String = Source.IndexOf(EndKey, StringComparison.OrdinalIgnoreCase)
    ' 應該修改為以下寫法 =>
    StartP = StartP + StartKey.Length
    Dim EndP As String = Source.IndexOf(EndKey, StartP, StringComparison.OrdinalIgnoreCase)    


另外 我也針對 StringComparison 做一些測試 
然後以一個 20KB 的 html 去抓出 <!--Content E--> 的位置
測試結果如下 (StartP 是 <!--Content S--> 後的起始位置)


0.0005085 No StartP
0.0002082 with StartP
0.0000157 StringComparison.Ordinal with StartP
0.0002768 StringComparison.OrdinalIgnoreCase, No StartP
0.0001105 StringComparison.OrdinalIgnoreCase with StartP
0.0002116 StringComparison.CurrentCulture with StartP
0.0002085 StringComparison.CurrentCultureIgnoreCase with StartP


結論: 
1. IndexOf 預設是以 StringComparison.CurrentCulture 方式尋找字串
2. 對於大塊字串,請盡量用 StartP 去找結束標籤位置,這樣速度會快很多,因為少爬了一段文字,此範例是差了2.5倍
3. 對於大塊字串,除非大小寫都要找,不然盡量用 StringComparison.Ordinal 來尋找字串,速度差了7~8倍

微軟對於.NET字串處理 有一篇建議文章,請大家拜讀一下
http://msdn.microsoft.com/zh-tw/library/vstudio/dd465121(v=vs.100).aspx
More...
darren, 2014/1/14 下午 03:18:14
[程式提醒][Ajax][html] jQuery 做 HTML本文做取代時要注意 Javascript
當使用Ajax做回應的時候~
有時候會將HTML本文做取代
例如:$(e).html(回應文)、$(e).replaceWith(回應文)
但是回應文中若是包含Javascript可能會執行,但是並不會顯示在Html裡面
注意:會執行、但不一定會顯示
More...
Doug, 2014/1/10 上午 10:45:00
[程式片段][前台]HTML預設

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--Header S-->
    <!--<title>{Title}</title>
    <meta name="description" content="{Description}" />
    <script type="text/javascript" src="{UNTJS}"></script>-->
    <!--AutoScripts S--><!--AutoScripts E-->
    <!--AutoCSS S--><!-- AutoCSS E-->
    <!--Header E-->
</head>
<body>
    <!--Content S-->
    <!--FinalScript S-->
    <script type="text/javascript">
        $(document).ready(function () {
        })
    </script>
    <!--FinalScript E-->
    <!--Content E-->
</body>
</html>
More...
Doug, 2014/1/6 下午 12:21:03
使用 ajax 傳送有 textarea 資料時要注意處理斷行符號
最近常使用 jQuery ajax form 處理表單,意外發現使用ajax form 傳送的 textarea 資料斷行符號只會有 vbLf (\n)
而非我們一般認知的 vbCrLf (\r\n)

原因在於 javascript 變數處理 string 資料,斷行文字只有 \n 不會是 \r\n
ajax form 物件在轉換 form data 到 XHR 的 post data 時,自然就把 \r 給濾掉了
所以 Server 會端收到僅有 \n 的斷行符號

這樣使用 UW.TextFns.ContentToHtml 就不會產生 "<br>" 了
因為這支程式是使用 vbCrLf 去取代成 <br>

 
More...
darren, 2014/1/3 下午 07:39:47
|< 12345678 >|
頁數 5 / 8 上一頁 下一頁
~ Uwinfo ~