CSS Menu Generator
作者:Ahan 日期:2007-09-13 08:38
SQL Server處理Unicode字串時,前置詞"N"之使用
作者:Ahan 日期:2007-09-12 21:47
其實這個問題是SQL Server當初在設計時,在6.5版的時候不支援Unicode資料,因此為了後能與未來的版本相容,在日後修正時,為了在不改變系統核心的情況下,將Unicode字碼的轉換工作做在SQL Command底下,但前題是所使用的資料庫版本必須支援Unicode字碼集,也就是SQL Server 7.0以後的版本。
Example:
SELECT * FROM TABLE WHERE NAME LIKE N"%KeyWord%";
在 SQL Server 中處理 Unicode 字串常數時,必需為所有的 Unicode 字串加上前置詞 N
http://support.microsoft.com/kb/239530/zh-tw
使用SQL Server 2005 取得雜湊值
作者:Ahan 日期:2007-01-17 11:36
Returns the MD2, MD4, MD5, SHA, or SHA1 hash of its input.
HashBytes ( '<algorithm>', { @input | 'input' } ) <algorithm>::= MD2 | MD4 | MD5 | SHA | SHA1
Example:
DECLARE @HashThis nvarchar(max);
SELECT @HashThis = CONVERT(nvarchar,'dslfdkjLK85kldhnv$n000#knf');
SELECT HashBytes('SHA1', @HashThis);
GO
取得雜湊值是個二進位varbinary欄位,如要直接取其雜湊碼可利用SQL 2005 master 資料庫內建之 master.dbo.fn_varbintohexstr 預儲程序來進行轉換,使用方法以SHA1為例是
RIGHT(master.dbo.fn_varbintohexstr(HashBytes('SHA1', CONVERT(varchar,欲轉換的資料表欄位名稱))),40)
(.Net 1.1)SHA1與MD5雜湊函數的快速取得法
作者:Ahan 日期:2007-01-17 11:29
Using System.Web.FormsAuthentication.HashPasswordForStoringInConfigFile
Example:
FormsAuthentication.HashPasswordForStoringInConfigFile(password , passwordFormat )
參數
- password
- 要做雜湊演算的密碼。
- passwordFormat
- 要使用的雜湊演算。選擇為「sha1」或「md5」。
傳回值
傳回包含雜湊密碼的 String 。
備註
所支援的密碼演算法為 SHA1 和 MD5。.Net FrameWork 2.0 已支援更多密碼演算法。
CSS Properties To JavaScript Reference Conversion
作者:Ahan 日期:2006-12-06 15:11
| CSS Property | JavaScript Reference |
|---|---|
| background | background |
| background-attachment | backgroundAttachment |
| background-color | backgroundColor |
| background-image | backgroundImage |
| background-position | backgroundPosition |
| background-repeat | backgroundRepeat |
| border | border |
| border-bottom | borderBottom |
| border-bottom-color | borderBottomColor |
| border-bottom-style | borderBottomStyle |
| border-bottom-width | borderBottomWidth |
| border-color | borderColor |
| border-left | borderLeft |
| border-left-color | borderLeftColor |
| border-left-style | borderLeftStyle |
| border-left-width | borderLeftWidth |
| border-right | borderRight |
| border-right-color | borderRightColor |
| border-right-style | borderRightStyle |
| border-right-width | borderRightWidth |
| border-style | borderStyle |
| border-top | borderTop |
| border-top-color | borderTopColor |
| border-top-style | borderTopStyle |
| border-top-width | borderTopWidth |
| border-width | borderWidth |
| clear | clear |
| clip | clip |
| color | color |
| cursor | cursor |
| display | display |
| filter | filter |
| font | font |
| font-family | fontFamily |
| font-size | fontSize |
| font-variant | fontVariant |
| font-weight | fontWeight |
| height | height |
| left | left |
| letter-spacing | letterSpacing |
| line-height | lineHeight |
| list-style | listStyle |
| list-style-image | listStyleImage |
| list-style-position | listStylePosition |
| list-style-type | listStyleType |
| margin | margin |
| margin-bottom | marginBottom |
| margin-left | marginLeft |
| margin-right | marginRight |
| margin-top | marginTop |
| overflow | overflow |
| padding | padding |
| padding-bottom | paddingBottom |
| padding-left | paddingLeft |
| padding-right | paddingRight |
| padding-top | paddingTop |
| page-break-after | pageBreakAfter |
| page-break-before | pageBreakBefore |
| position | position |
| float | styleFloat |
| text-align | textAlign |
| text-decoration | textDecoration |
| text-decoration: blink | textDecorationBlink |
| text-decoration: line-through | textDecorationLineThrough |
| text-decoration: none | textDecorationNone |
| text-decoration: overline | textDecorationOverline |
| text-decoration: underline | textDecorationUnderline |
| text-indent | textIndent |
| text-transform | textTransform |
| top | top |
| vertical-align | verticalAlign |
| visibility | visibility |
| width | width |
| z-index | zIndex |
Usage
Internet Explorer
document.all.div_id.style.JS_property_reference = "new_CSS_property_value";
Older Netscape's (4.7 and earlier)
document.div_id.JS_property_reference = "new_CSS_property_value";
Netscape 6.0+ and Opera (and other Mozilla)
document.getElementById(div_id).style.JS_property_reference = "new_CSS_property_value";
Note the use of parentheses instead of square brackets in newer Mozilla's "getElementById()" reference.

