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
標籤
  • UW
  • 6286
  • exception
  • gui order
  • GUI2121121
  • service un
  • GN.LinePa
  • HiddenFiel
  • udlgiichdd
  • cBbJFYKo
  • ICSharpCod
  • vb ORDER B
  • -4563
  • ie11
  • a
  • 15 ORDER B
  • 硬碟
  • 20131018
  • 3614
  • 498
  • cast order
  • SQLCACHE
  • 移
  • aHR0cDovL3
  • dm_exec_sq
  • 8
  • config
  • 8942121121
  • 複製自己
  • newid
  • image,
  • date order
  • 金鑰
  • SU
  • mysql
  • 712
  • PID
  • USER
  • [t]
  • background
  • 效能
  • 權限
  • 628
  • Cache
  • 858
  • 監控
  • Xml
  • server
  • contains
頁數 35 / 55 上一頁 下一頁
搜尋 [t] 結果:
開放備份資料庫的權限
想要讓特定 user 可以備份某個 DB ,但又不想把該 user 加入 sysadmin 時,可以用的。

use DBName
GRANT BACKUP DATABASE TO uasername

接下來該使用者的帳戶就可以執行
​
BACKUP DATABASE XXX TO DISK = 'D:\SQLBackup\XXXXX.bak'
More...
Bike, 2014/4/3 下午 04:07:47
tch刪除購物車裡的東西
一般而言~
加入購物車切未購矮的東西會在14天後進行刪除~
但是在測試的情況可能會加入有誤的商品~造成購物車出錯~
因此需要手動區資料庫清除某些項目~
http://www.shopunt.com/tch/shopping/CancelTempCart.aspx
上面這隻程式是刪除的參考程式~
內容是刪除
TempCart   MemberId 對到的資料 以及 ComputerId 對到的資料
More...
Doug, 2014/4/1 下午 04:59:28
Optional 參數使用 Date 格式所使用的預設值
VB.NET 時間類別因為沿襲自 VB,所以可以用 Date 型別宣告時間變數
實際上在 .NET 他等於 System.DateTime (C# 沒有 Date型別, 只有System.DateTime)
VB.NET 的 Date 可以設定常數,例如 #12/30/2014# (注意!格式是 MM/dd/yyyy, 用 #包起來),這是C#沒有的 
VB.NET 的 Date 也可以等於 Nothing (Nothing = #12:00:00 AM#)
C# 的 DateTime 可以指定為 default(DateTime) 但是不能 = null

由於 optional 參數必須指定預設值,因此當使用 Date 當作 optional 參數時就要設定以上說的值


Public Sub AddNewCustomer(customer As Customer, Optional dateAdded As Date = Nothing)
     If dateAdded = Nothing Then dateAdded = Now


// C# 4.0 以後的 function 已經可以使用 optional 參數
public void AddNewCustomer(Customer customer, DateTime dateAdded = default(DateTime))
     {
         if (dateAdded == default(DateTime)) dateAdded = DateTime.Now;
         ......


Public Sub AddNewCustomer(customer As Customer, Optional dateAdded As Date = #12/30/1899#)

 
More...
darren, 2014/4/1 下午 02:07:31
前台:具有潛在危險 request.querystring (validateRequest="false")
假如你現在在ASP.NET 4.0 的環境下的話,就算進行上述的設定,可能仍會出現驗證失敗的訊息(潛在危險Request.QueryString的錯誤訊息)
因為ASP.NET4.0與2.0版本在請求驗證的定義上已經有所不同:

這時為了避免這樣的問題,一樣在Web.Config中 <system.web>下加入下列語句
<httpRuntime requestValidationMode="2.0" />

http://www.dotblogs.com.tw/pin0513/archive/2010/10/22/18522.aspx
More...
Doug, 2014/3/28 下午 05:35:11
JS 效能測試工具
http://jsperf.com/
More...
瞇瞇, 2014/3/28 下午 12:23:19
新增Common.popUp2,傳物件丟到Common.popUp
因為原本的Common.popUp要丟的參數太多了~
目前有12個參數
於是多寫一個Common.popUp2
可以丟物件
傳到Common.popUp
這樣就不用參數一個一個打了~
舉例:
​Common.popUp2({Title:'Title1',OKText:'OKText2'})

第八行:文章太短不知道會不會被刪文~
第九行:包圍總統府看看~
第十行:自由、奮鬥、救咪咪~小雞腿~
More...
Doug, 2014/3/26 上午 10:35:45
List.Find - 找出 List 裡符合條件的資料
從 List<T> 找出符合條件的資料


        List<DB.Member> listOfMember = new List<DB.Member>()
                { new DB.Member(15), new DB.Member(20), new DB.Member(25), new DB.Member(30) };

        // Exists: 單純看有無符合條件的資料
        bool IsMemberExists = listOfMember.Exists(x => x.Email == "darren@acaciaco.com");
        // FindIndex: 找出第一個符合條件的 index,找不到傳回 -1
        int index = listOfMember.FindIndex(x => x.Email == "darren@acaciaco.com");
        // Find: return 第一個符合條件的object, 找不到傳回 null
        DB.Member objMember = listOfMember.Find(x => x.Email.Contains("acaciaco.com"));
        // FindAll: return 所有符合條件的objects
        List<DB.Member> listOfMember2 = listOfMember.FindAll(x => x.Email.Contains("acaciaco.com"));


VB

Dim listOfMember As New List(Of DB.Member)() From { _
    New DB.Member(15), New DB.Member(20), New DB.Member(25), New DB.Member(30) }

' Exists: 單純看有無符合條件的資料
Dim IsMemberExists As Boolean = listOfMember.Exists(Function(x) x.Email = "darren@acaciaco.com")
' FindIndex: 找出第一個符合條件的 index,找不到傳回 -1
Dim index As Integer = listOfMember.FindIndex(Function(x) x.Email = "darren@acaciaco.com")
' Find: return 第一個符合條件的object, 找不到傳回 Nothing
Dim objMember As DB.Member = listOfMember.Find(Function(x) x.Email.Contains("acaciaco.com"))
' FindAll: return 所有符合條件的objects
Dim listOfMember2 As List(Of DB.Member) = listOfMember.FindAll(Function(x) x.Email.Contains("acaciaco.com"))
More...
darren, 2014/3/26 上午 09:43:39
SQL Server log 檔案過大
參考來源:http://seasuwang.blogspot.tw/2009/09/sql-server-log.html

SQL Server 2008 Transcation log 檔案太大,導致SQL Server無法運作
將SQL Server的執行程序停止,手動刪除log實體檔案,再次啟動SQL Server的程序,資料庫沒辦法work

參考 Seasu Wang 說明把資料庫給救回來,步驟如下:
假設資料庫名稱為OhMyGod
1. 停止SQL Server, 將原mdf檔移走
2. 開啟SQL Server, 建立新的OhMyGod資料庫.
3. 停止SQL Server
4. 將損壞的mdf覆蓋回新建的mdf檔,並刪除新建的log檔
5. 開啟SQL Server
3. 設定OhMyGod資料庫狀態為EMERGENCY:
ALTER DATABASE OhMyGod SET EMERGENCY
4. 設定OhMyGod資料庫模式為"單一使用者":
sp_dboption 'OhMyGod', 'single user', 'true'
5. 檢查指定資料庫中所有物件的配置、結構和邏輯完整性:
DBCC CHECKDB (OhMyGod, REPAIR_ALLOW_DATA_LOSS)
6. 還原OhMyGod資料庫模式:
sp_dboption 'OhMyGod', 'single user', 'false'
7. 設定OhMyGod資料庫狀態為
ONLINE:ALTER DATABASE OhMyGod SET ONLINE
 
More...
Reiko, 2014/3/21 上午 11:52:10
分頁套件PageShift2

前台要引用
<!--AutoScripts S-->PageShift2<!--AutoScripts E-->
<!--AutoCSS S-->2013UI/PageShift<!--AutoCSS E-->

內文架構要有
<div id="PageShift2" class="page-index"></div>
<script>
        $('#PageShift2').PageShift2({
            PageIndex: 1,
            PageMAX: 10,
            TriggerEvent: ChangePage
        });
        function ChangePage(PageIndex) {
            console.log(PageIndex);
        }
</script>
More...
Doug, 2014/3/18 下午 06:32:41
jQuery Deep Copy
var test=["a","b","c"];
var arrClone=[];
$.extend(true,arrClone,test);
test[0]="3";
console.log(test); //["3","b","c"];
console.log(arrClone); //["a","b","c"];
More...
瞇瞇, 2014/3/17 下午 10:05:59
|< …26272829303132333435… >|
頁數 35 / 55 上一頁 下一頁
~ Uwinfo ~