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
標籤
  • pdf
  • c
  • Shopee
  • Viewstate
  • index
  • sysconfig
  • .
  • 2217
  • There is
  • idictionar
  • @@casZ6
  • urlrewrite
  • reserve ap
  • 308
  • windows
  • net ORDER
  • code
  • Doug
  • data
  • 效能
  • nextTick
  • GN
  • ip
  • ef
  • gmail
  • 0
  • if
  • .net core
  • 20
  • 60
  • 1
  • 580
  • 圖片
  • line
  • HTTP 錯誤 40
  • 3991
  • list
  • 帳號
  • 174
  • html212112
  • @@S2efe
  • [U2]
  • deadlock
  • 刪除
  • 字串
  • unt
  • sp_
  • FortiGate
  • db
  • background
頁數 13 / 14 上一頁 下一頁
搜尋 . 結果:
SQL 2008 資料庫的復原
1. "有疑問"的 資料庫的修復:

ALTER DATABASE MyDB SET EMERGENCY;
DBCC checkdb('MyDB');
ALTER DATABASE MyDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DBCC CheckDB ('MyDB', REPAIR_ALLOW_DATA_LOSS);
ALTER DATABASE MyDB SET MULTI_USER;

其中 "DBCC CheckDB ('MyDB', REPAIR_ALLOW_DATA_LOSS)" 可能要多執行幾次。

2. Restore Differential Backup 用的 SQL:
​
RESTORE DATABASE [MyDB] FROM  DISK = N'D:\BACKUP_DB\MyDB_backup.bak' WITH  FILE = 1,  NORECOVERY,  NOUNLOAD,  REPLACE,  STATS = 10,
MOVE 'MyDB_Data' TO 'D:\SQLDB2008\MyDB.mdf', 
MOVE 'MyDB_Log' TO 'D:\SQLDB2008\MyDB.ldf'

RESTORE DATABASE [MyDB] FROM  DISK = N'D:\BACKUP_DIFF\MyDB_backup_2013_02_25_12.bak' WITH  FILE = 1,  NOUNLOAD, NORECOVERY,  STATS = 10

RESTORE DATABASE [MyDB] WITH RECOVERY (正在還原的資料庫也可以用這個指令來恢復成可使用的狀態)
More...
Bike, 2013/2/26 上午 10:58:40
使用 Drag Drop 將檔案放入網頁上傳檔案 (HTML5)
  • How to Use HTML5 File Drag & Drop
  • How to Open Dropped Files Using HTML5 and JavaScript
  • How to Asynchronously Upload Files Using HTML5 and Ajax
  • How to Create File Upload Progress Bars in HTML5 and JavaScript

這幾篇文章提到使用拖拉方式將檔案放到網頁裡面
然後在本地端預覽,然後ajax上傳,上傳時還有 progress bar
一整套運作模式說明,並附上sample code,挺棒的
附檔sample code

-------------------------------------------
測試後補充:
1. 範例中的 dragover event 要改成 dragenter 比較正確
然後 dragover 最好是做成 return false (ev.stopPropagation())
2. Server端不能用Requst.Files收檔案,要直接處理 Request.InputStream另存成檔案

 
More...
darren, 2012/10/7 上午 01:20:42
virtual directory 的執行權限
在 IIS 7.0 網站下掛入的 virtual directory 預設是可以執行指令碼的,所以若是使用者上傳了 aspx, 那該 aspx 就可以執行.. 這會是一個很大的安全問題. 要解決這個, 必需在該目錄的處理常式對應中,把指令碼的功能取消. 看來又要做一次大檢查了.

1. 處理常式對應:

 

2. 編輯功能權限,並且把指令碼拿掉。
 


More...
Bike, 2012/7/30 下午 12:02:17
Word 的多階層目錄編號
很久沒有用 Word 了, Word 2010 和以前的 Word 2000 實在差很多, 很多東西都找不到, 目錄即是一例, 做了兩次還是記不得, 乾脆做個記錄, 未來大家做 SA 文件時也可以用到.

1. 先在該行按右鍵, 選取樣式 -> 標題 1
 


2. 在常用標籤的地方找到階層式編號, 選擇要用的編號.

 

3. 讓所有的標題 1 都會自動編號, 一樣是用右鍵, 選樣式, 再選更新標題 1 以符合選取範圍.

  


 4. 設定標題 2, 一樣是用右鍵選樣式.

  


5. 最神奇的一步來了, 第二階的編號要用一般的編號, 不能用階層編號, 不然編號會重新開始. 今天就是在這裡搞了很久.

  


6. 一樣要讓編號套用到所有的標題 2 

  


7. 結果, 值得一提, 上面和左邊各有一個快捷工具可以使用.

  

8 最後, 要插入目錄, 它的位置是在 "參考資料" 裡.
 
  

More...
Bike, 2012/7/13 下午 07:03:26
網頁端不同時區之時間顯示

由於網站的user來自全世界各地,而我們網站產生的時間卻是Server的時間
因此需要使用javascript來做一些轉換,讓user看到是他當地的時間

1. Server端產生具有時區的時間字串,用特定的span + class把它包起來, 時間格式 DateTime.ToUniversalTime().ToString("r")
     
<span class="timeString">Fri, 31 Aug 2012 10:57:04 GMT</span>

2. Client端利用jQuery於網頁load的時候將所有時間轉換成當地時間
    這個地方我用了  date.format.js 來轉換成當地時間 (參考  http://blog.stevenlevithan.com/archives/date-time-format  )
   

     $(".timeString").each(function () {
            var content = $(this).text();
            var d = new Date(content);
            if (!isNaN(d)) $(this).text(d.format("yyyy-mm-dd hh:MM tt"));
        }); 
   

這樣user看到的時間就不會錯了
More...
darren, 2012/6/19 下午 04:14:57
把 Data 轉為 SQL Script (SQL 2008 的功能)
1. 在要匯出的 DB 上, 按右鍵, 選取工作 -->  產生令碼.

 

2. 歡迎頁

 


 3. 選取資料庫
 

4. 設定選項, 記得要選取 "編寫資料的指令碼"
 

5. 選取資料表
 

6. 選擇要匯出的資料表
 

7. 指定 Script 要儲存的位置
 

8. 檢視摘要
 

9. 完工
More...
Bike, 2012/6/19 上午 11:11:33
VS2010 中, 在方案總管和編輯的檔案同步 (在方案總管中追蹤現用項目)
有時 VS2010 會不知原因的方案總管不會自動移到目前編輯的檔案的位置, 有點不方便. 要改回同步, 可以勾選 "在方案總管中追蹤現用項目", 如下圖:

要重開 Visual Studio 才會生效。

More...
Bike, 2012/6/14 下午 04:42:37
global.asax 的事件
從 http://blog.ie-soft.de/post/2007/12/globalasax-events.aspx  抄來的. 留作參考

HttpApplication Events:

Application_AcquireRequestState
Occurs when ASP.NET acquires the current state (for example, session state) that is associated with the current request. 

Application_AuthenticateRequest
Occurs when a security module has established the identity of the user. 

Application_AuthorizeRequest
Occurs when a security module has verified user authorization. 

Application_BeginRequest
Occurs as the first event in the HTTP pipeline chain of execution when ASP.NET responds to a request. 

Application_Disposed
Adds an event handler to listen to the Disposed event on the application. 

Application_EndRequest
Occurs as the last event in the HTTP pipeline chain of execution when ASP.NET responds to a request. 

Application_Error
Occurs when an unhandled exception is thrown. 

Application_PostAcquireRequestState
Occurs when the request state (for example, session state) that is associated with the current request has been obtained. 

Application_PostAuthenticateRequest
Occurs when a security module has established the identity of the user. 

Application_PostAuthorizeRequest
Occurs when the user for the current request has been authorized. 

Application_PostMapRequestHandler
Occurs when ASP.NET has mapped the current request to the appropriate event handler. 

Application_PostReleaseRequestState
Occurs when ASP.NET has completed executing all request event handlers and the request state data has been stored. 

Application_PostRequestHandlerExecute
Occurs when the ASP.NET event handler (for example, a page or an XML Web service) finishes execution. 

Application_PostResolveRequestCache
Occurs when ASP.NET bypasses execution of the current event handler and allows a caching module to serve a request from the cache. 

Application_PostUpdateRequestCache
Occurs when ASP.NET completes updating caching modules and storing responses that are used to serve subsequent requests from the cache. 

Application_PreRequestHandlerExecute
Occurs just before ASP.NET begins executing an event handler (for example, a page or an XML Web service). 

Application_PreSendRequestContent
Occurs just before ASP.NET sends content to the client. 

Application_PreSendRequestHeaders
Occurs just before ASP.NET sends HTTP headers to the client. 

Application_ReleaseRequestState
Occurs after ASP.NET finishes executing all request event handlers. This event causes state modules to save the current state data. 

Application_ResolveRequestCache
Occurs when ASP.NET completes an authorization event to let the caching modules serve requests from the cache, bypassing execution of the event handler (for example, a page or an XML Web service). 

Application_UpdateRequestCache
Occurs when ASP.NET finishes executing an event handler in order to let caching modules store responses that will be used to serve subsequent requests from the cache. 

Application_Init
This method occurs after _start and is used for initializing code. 

Application_Start
As with traditional ASP, used to set up an application environment and only called when the application first starts.

Application_End
Again, like classic ASP, used to clean up variables and memory when an application ends.

Session Events:

Session_Start
As with classic ASP, this event is triggered when any new user accesses the web site.

Session_End
As with classic ASP, this event is triggered when a user's session times out or ends. Note this can be 20 mins (the default session timeout value) after the user actually leaves the site.

Profile Events:

Profile_MigrateAnonymous
Occurs when the anonymous user for a profile logs in.

Passport Events:

PassportAuthentication_OnAuthenticate
Raised during authentication. This is a Global.asax event that must be named PassportAuthentication_OnAuthenticate.
 

Possibly more events defined in other HttpModules like:

System.Web.Caching.OutputCacheModule
System.Web.SessionState.SessionStateModule
System.Web.Security.WindowsAuthentication
System.Web.Security.FormsAuthenticationModule
System.Web.Security.PassportAuthenticationModule
System.Web.Security.UrlAuthorizationModule
System.Web.Security.FileAuthorizationModule
System.Web.Profile.ProfileModule

More...
Bike, 2012/6/9 上午 08:55:08
一個有趣的 Cut 圖的網站
先記在這, 有空再來研究一下它的程式碼. 看樣子 HTML 5 有很多值得研究的東西.

http://www.pasteshack.net/
More...
Bike, 2012/6/6 下午 04:02:22
把 Hashtable 的 Keys 轉為 String Array
有點笨的問題, 但每次遇到都忘了要怎麼定義字串陣列 :P 在這裡記錄一下.. 以下的 HT 是一個 Hashtable
Dim arrKeys(HT.Count - 1) As String
HT.Keys.CopyTo(arrKeys, 0)
More...
Bike, 2012/6/6 下午 03:58:21
|< …45678910111213… >|
頁數 13 / 14 上一頁 下一頁
~ Uwinfo ~