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

搜尋意見
文章分類-Bike
[所有文章分類]
  • ASP.NET (10)
  • ASP.NET2.0 (6)
  • ASP.NET4.0 (7)
  • JavaScript (11)
  • jQuery (9)
  • FireFox (0)
  • UW系統設定 (0)
  • SQL (10)
  • SQL 2008 (7)
  • mirror (0)
  • SVN (2)
  • IE (2)
  • IIS (9)
  • IIS6 (0)
  • 閒聊 (0)
  • W3C (0)
  • 作業系統 (1)
  • C# (0)
  • CSS (3)
  • FileServer (0)
  • HTML 5 (3)
  • CKEditor (2)
  • UW.dll (3)
  • Visual Studio (4)
  • Browser (2)
  • SEO (1)
  • Google Apps (0)
  • 網站輔助系統 (0)
  • DNS (0)
  • SMTP (1)
  • 網管 (1)
  • 社群API (0)
  • SSL (0)
  • App_Inventor (0)
  • URLRewrite (0)
  • 開發工具 (0)
  • JSON (0)
  • Excel2007 (0)
  • 試題 (3)
  • LINQ (0)
  • bootstrap (0)
  • Vue (0)
  • IIS7 (0)
  • foodpanda (0)
  • 編碼 (0)
  • 資安 (0)
  • Sourcetree (0)
  • MAUI (1)
  • CMD (0)
  • my sql (0)
所有文章分類
[Bike的分類]
  • 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
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ;;;;...more
  • 匯出 let's encryption的憑証
    1. win-acme 選擇 A: Manage renewals找到你要轉移的憑證名稱和密碼2. ...more
  • 資安問題 -- 存入 DB 後顯示內容
    伺服器隱碼問題1 寫入DB前不是當成字串就執行某些事情 (某些server 漏洞? 許功蓋?)2 寫...more
  • 匯出 let's encryption的憑証
    【注意】要打開 win-acme <<這個軟體匯出憑證...more
  • Swagger 的問題解決 (NSwag)
    DefaultController所產出的文建會讓Swagger讀不懂報錯[ApiExplorerS...more
  • 合併兩個 Expression -- Combining two expressions (Expression>)
    官方文件就有寫啊,這麼多方法不全部看個一遍說不過去吧~https://learn.microsoft...more
標籤
  • images
  • 276
  • let
  • StreamRead
  • identity
  • 508
  • 316
  • 864
  • 130
  • 636
  • 150
  • ti
  • 找到的組件資訊清單定
  • C
  • exten
  • xml2121121
  • load
  • 16
  • -1542
  • 復原
  • xml
  • 1
  • 6021211211
  • vs
  • 二元
  • windows
  • 3564
  • SQL accoun
  • Button
  • firewall
  • 28
  • �
  • Pay介接
  • MS8qKi9Bbk
  • IP
  • IE ESC
  • tuple
  • 3644
  • [U2],
  • -6311
  • checked
  • cahe
  • en
  • postMessag
  • -9971 bnyt
  • 交易記錄已滿
  • 66
  • a
  • server
  • 582
頁數 17 / 26 上一頁 下一頁
Windows server 2012 / 2008 遠端桌面解除單一連線的設定 (Remote Desk Top)
Steps
 

 

windows 2008 的位置有點不一樣:
 



 
 
More...
Bike, 2016/10/6 上午 11:19:27
在 PDF 加浮水印, 用 iTextSharp
找了兩三篇文章再加一點修正才組出來的,  記錄一下, 要用 iTextSharp 哦.

using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf;

---
 
            string oldFile = Server.MapPath("/Content/PDF/300000419_20160929162658862.pdf"); //"oldFile.pdf";
            string newFile = oldFile.Replace(".pdf", "_New11.pdf");

            // open the reader
            PdfReader reader = new PdfReader(oldFile);
            Rectangle size = reader.GetPageSizeWithRotation(1);
            Document document = new Document(size);
            int NumberOfPages = reader.NumberOfPages;

            // open the writer
            FileStream fs = new FileStream(newFile, FileMode.Create, FileAccess.Write);
            PdfWriter writer = PdfWriter.GetInstance(document, fs);
            document.Open();

            // the pdf content
            PdfContentByte cb = writer.DirectContent;

            string text = "Watermark...";

            string windir = Environment.GetEnvironmentVariable("windir");
            Chunk textAsChunk = new Chunk(text, new Font(BaseFont.CreateFont(windir + "\\Fonts\\mingliu.ttc,0", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED), 20, Font.NORMAL, new BaseColor(255,0,0)));

            // create the new page and add it to the pdf
            for (int i = 1; i<= NumberOfPages; i++)
            {
                if(i > 1)
                {
                    document.NewPage();
                }

                ColumnText.ShowTextAligned(cb, Element.ALIGN_LEFT, new Phrase(textAsChunk), 0, 0, 0);

                PdfImportedPage page = writer.GetImportedPage(reader, i);
                cb.AddTemplate(page, 0, 0);
            }

            // close the streams and voilá the file should be changed :)
            document.Close();
            fs.Close();
            writer.Close();
            reader.Close();

            Response.Write(newFile + "<br>");
            Response.Write(NumberOfPages + "<br>");
More...
Bike, 2016/9/29 下午 06:23:59
新的 SMTP 要記得改 FQDN (完全合格的網域名稱, fully-qualified domain name), 以免被擋信
如下圖.
 

另外還有一個地方要設定, 以免卡信.

 
More...
Bike, 2016/9/19 下午 05:05:36
一些抓取資料庫結構及述敍用的 SQL
--抓所有的 Table
Select * from INFORMATION_SCHEMA.TABLES

--抓所有的 COLUMNS
Select * from INFORMATION_SCHEMA.COLUMNS


--抓欄位的 Description
select 
    st.name [Table],
    sc.name [Column],
    sep.value [Description]
from sys.tables st
inner join sys.columns sc on st.object_id = sc.object_id
left join sys.extended_properties sep on st.object_id = sep.major_id
                                        and sc.column_id = sep.minor_id
                                        and sep.name = 'MS_Description'
where st.name = 'TableName'
and sc.name = 'ColumnName'

--修改欄位的 Description.
EXEC sp_updateextendedproperty 
@name = N'MS_Description', @value = 'Your description',
@level0type = N'Schema', @level0name = 'dbo', 
@level1type = N'Table',  @level1name = 'TableName', 
@level2type = N'Column', @level2name = 'Name';


EXEC sp_addextendedproperty 
@name = N'MS_Description', @value = 'Code description',
@level0type = N'Schema', @level0name = 'dbo', 
@level1type = N'Table',  @level1name = 'TableName', 
@level2type = N'Column', @level2name = 'ColumnName';



--新增 Table 的 extendedproperty
EXEC sp_addextendedproperty 
@name = N'Description', @value = 'Hey, here is TableName description!',
@level0type = N'Schema', @level0name = 'dbo',
@level1type = N'Table',  @level1name = 'TableName'
GO

--修改 Table 的 extendedproperty
EXEC sp_updateextendedproperty 
@name = N'Description', @value = 'Hey, here is my description! 123',
@level0type = N'Schema', @level0name = 'dbo',
@level1type = N'Table',  @level1name = 'TableName'
GO


--讀取 Extended Property
SELECT sys.objects.name AS TableName, ep.name AS PropertyName,
       ep.value AS Description
FROM sys.objects
CROSS APPLY fn_listextendedproperty(default,
                                    'SCHEMA', schema_name(schema_id),
                                    'TABLE', name, null, null) ep
WHERE sys.objects.name NOT IN ('sysdiagrams')
ORDER BY sys.objects.name

--讀取 Column 的 Description
SELECT objtype, objname, name, value  
FROM fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', 'TableName', 'column', default);  
GO

--讀取特定 Table 的 Description
SELECT *  
FROM fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', 'TableName', default, default);  
GO  

--讀取 所有 Table 的 Description
SELECT *  
FROM fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', default, default, default);  
GO  


--新增或修改資料表說明
IF not exists(SELECT * FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', '資料表名稱', NULL, NULL))  
           BEGIN  
            exec sp_addextendedproperty 'MS_Description', '資料表說明', 'user', 'dbo', 'table', '資料表名稱' 
           END  
ELSE 
           BEGIN  
            exec sp_updateextendedproperty 'MS_Description', '資料表說明', 'user', 'dbo', 'table', '資料表名稱' 
           END

--新增或修改欄位說明
IF not exists(SELECT * FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', '資料表名稱', 'column', '欄位名稱')) 
           BEGIN  
            exec sp_addextendedproperty 'MS_Description', '欄位說明', 'user', 'dbo', 'table', '資料表名稱', 'column', '欄位名稱' 
           END  
ELSE 
           BEGIN  
            exec sp_updateextendedproperty 'MS_Description', '欄位說明', 'user', 'dbo', 'table', '資料表名稱', 'column', '欄位名稱' 
           END
More...
Bike, 2016/6/29 下午 04:42:25
Reflected Cross-Site Scripting (XSS) Vulnerabilities
這是指網址列的參數未經處理直接丟回頁面造成的問題.

例如 a.aspx 中, 參數 R 會被丟回頁面, 則 <a href='http://yahoo.com/a.aspx?R=<script>...</script>'>Yahoo 大拍賣</a> 這種網址放在某人的 blog 中, 點選的人已登入 yahoo, 那就中奬了, script 中的程式可以把你的 cookie 丟到其它的網站去, 或是用你的身份做一些其它的事情..
More...
Bike, 2015/10/29 下午 07:58:03
無法連線到 SQL Server, (在 Windows 上遇到非常多 TIME_WAIT 連線時應如何處理)
某台主機無法連線到 SQL Server, 看了一下 TCP Connection, 發現如下:

 
找到 WWW 大神的文章: "在 Windows 上遇到非常多 TIME_WAIT 連線時應如何處理"

http://blog.miniasp.com/post/2010/11/17/How-to-deal-with-TIME_WAIT-problem-under-Windows.aspx

執行了以下指令:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "TcpTimedWaitDelay" /t REG_DWORD /d 30 /f

重開主機後, 目前 OK, 觀察中..



 
More...
Bike, 2015/9/15 上午 08:59:08
IOS 的 Mobile Device, 若是有 Hover 屬性, click event 會有問題.
IOS 的 Mobile Device, 若是有 Hover 屬性,  click event 會有問題. 會造第一個 click 觸發 hover 效果, 第二次才會觸發 click 的 event.

目前我在 RWD 的頁面中,判斷寬度,決定是否要把 Hover 的 class 拿掉..

http://stackoverflow.com/questions/2754546/can-i-disable-a-css-hover-effect-via-javascript

突然想到, 好像要拿 ipad 來試一下..
More...
Bike, 2015/5/22 下午 05:21:47
用 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
windows 8.1 的 IIS Setting 要匯回 Windows 7 的 IIS 時要刪除的東西
刪除 logFile 和 ftpServer 兩個區塊即可。
More...
Bike, 2015/5/8 下午 12:10:28
Chrome 修改彈出式視窗允許清單
設定 --> 隱私權 --> 內容設定 --> 彈出式視窗 --> 管理例外情況

 
 
More...
Bike, 2015/4/27 下午 08:13:52
|< …891011121314151617… >|
頁數 17 / 26 上一頁 下一頁
~ Uwinfo ~