這裡有扁平設計(Flat Design)、漸變陰影 (Gradient)、3D 按鈕等一應俱全喔 (^_^)
URL: http://fribly.com/2013/10/18/cool-buttons/
Find: <string name="
([A-Z0-9_\-.%@ ':]+)">(.*)</string>
Replace as: "\1"="\2";
Find: "([A-Z0-9_\-.%@ ':]+)"="(.*)";
Replace as: <string name="\1">\2</string>
| . | Matches any character |
| ( | This marks the start of a region for tagging a match; so what's inside ( ) you can use in "replace with" using \1, \2 etc. |
| ) | This marks the end of a tagged region. |
| \n | Where n is 1 through 9 refers to the first through ninth tagged region when replacing. For example, if the search string was Fred([1-9])XXX and the replace string was Sam\1YYY , when applied to Fred2XXX this would generate Sam2YYY . |
| \< | This matches the start of a word using Scintilla's definitions of words. |
| \> | This matches the end of a word using Scintilla's definition of words. |
| \x | This allows you to use a character x that would otherwise have a special meaning. For example, \[ would be interpreted as [ and not as the start of a character set. |
| [...] | This indicates a set of characters, for example, [abc] means any of the characters a, b or c. You can also use ranges, for example [a-z] for any lower case character. |
| [^...] | The complement of the characters in the set. For example, [^A-Za-z] means any character except an alphabetic character. |
| ^ | This matches the start of a line (unless used inside a set, see above). |
| $ | This matches the end of a line. |
| * | This matches 0 or more times. For example, Sa*m matches Sm , Sam , Saam , Saaam and so on. |
| + | This matches 1 or more times. For example, Sa+m matches Sam , Saam , Saaam and so on. |
== title == became = title =, you're done :-)31.12.97 became 97-12-31 and 14.08.05 became 05-08-14 and the IP address 14.13.14.14 did not change, you're done :-)dir /b/s >filelist.txt to the file filelist.txt and want to make local URLs out of them.file:/// in the beginning of all linesC:\!\aktuell.csv became file:///C:/!/aktuell.csv, you're done :-)translate(string,':',', ')
<xsl:template name="replace-string">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="with"/>
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$with"/>
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="with" select="$with"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:call-template name="replace-string"> <xsl:with-param name="text" select="'aa::bb::cc'"/> <xsl:with-param name="replace" select="'::'" /> <xsl:with-param name="with" select="','"/> </xsl:call-template>
'====================================
' MODULE: cASPString.asp
' AUTHOR: www.u229.no
' CREATED: May 2006
'====================================
' COMMENT: A fast string class for classic ASP.
'====================================
' ROUTINES:
' - Public Property Get NumberOfStrings()
' - Public Property Get NumberOfBytes()
' - Public Property Get NumberOfCharacters()
' - Private Sub Class_Initialize()
' - Public Sub Append(sNewString)
' - Public Function ToString()
' - Public Sub Reset()
'====================================
'====================================
Class ASPStringBuilder
'====================================
'// MODULE VARIABLES
Dim m_sArr '// Array holding the strings.
Dim m_lResize '// Factor for rezising the array.
Dim m_lStrings '// Number of strings appended.
'// PROPERTIES
Public Property Get NumberOfStrings()
NumberOfStrings = m_lStrings
End Property
Public Property Get NumberOfBytes()
NumberOfBytes = LenB(Join(m_sArr, ""))
End Property
Public Property Get NumberOfCharacters()
NumberOfCharacters = Len(Join(m_sArr, ""))
End Property
'------------------------------------------------------
' Comment: Initialize default values.
'------------------------------------------------------
Private Sub Class_Initialize()
m_lResize = CLng(50)
m_lStrings = CLng(0)
ReDim m_sArr(m_lResize)
End Sub
'------------------------------------------------------
' Comment: Add a new string to the string array.
'------------------------------------------------------
Public Sub Append(sNewString)
If Len(sNewString & "") = 0 Then Exit Sub
'// If we have filled the array, resize it.
If m_lStrings > UBound(m_sArr) Then ReDim Preserve m_sArr(UBound(m_sArr) + m_lResize)
'// Append the new string to the next unused position in the array.
m_sArr(m_lStrings) = sNewString
m_lStrings = (m_lStrings + 1)
End Sub
'------------------------------------------------------
' Comment: Return the strings as one big string.
'------------------------------------------------------
Public Function ToString()
ToString = Join(m_sArr, "")
End Function
'------------------------------------------------------
' Comment: Reset everything.
'------------------------------------------------------
Public Sub Reset()
Class_Initialize
End Sub
'====================================
End Class
'====================================
namespace MyObject
{
public class StringBuilderObject
{
public StringBuilder MyStringBuilder = new StringBuilder("");
public StringBuilderObject()
{
}
public void Append(string value)
{
this.MyStringBuilder.Append(value);
}
public void Remove(int startIndex, int length)
{
this.MyStringBuilder.Remove(startIndex, length);
}
public override string ToString()
{
return this.MyStringBuilder.ToString();
}
}
}
![]() |
| 匯出檔案到 E:\oooo網\ 這個 "網" 是中文字, 造成Error. |
CREATE TABLE [dbo].[webkitHtmlToken](
[id] [int] IDENTITY(1,1) NOT NULL,
[tokenID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_webkitHtmlToken_tokenId] DEFAULT (newid()),
[userid] [nvarchar](20) NOT NULL,
[siteid] [varchar](50) NULL,
[status] [char](1) NULL CONSTRAINT [DF_webkitHtmlToken_status] DEFAULT ('I'),
[sessionid] [int] NULL,
[createdDate] [smalldatetime] NULL CONSTRAINT [DF_webkitHtmlToken_createdDate] DEFAULT (getdate()),
CONSTRAINT [PK_webkitHtmlToken] PRIMARY KEY CLUSTERED
(
[tokenID] ASC
)
)
說明: 可能專案不同, 有可能需要多增加, 或刪除相關欄位.<wkhtmltopdf>
<path>C:\wkhtmltopdf\wkhtmltopdf.exe</path>
<tempFolder>C:\wkhtmltopdf\tempFolder</tempFolder>
</wkhtmltopdf>
'// purpose: 放入 session info 到 database, 取得 tokenid.
'// ex: ret = getWebkitHtmlTokenID(conn, session("userid"), session.sessionid, session("siteid"))
function getWebkitHtmlTokenID(byref conn, byval userid, byval sessionid, byval siteid)
...
...
end function
'// purpose: 輸出某一個 URL 到實體檔案.
'// call HtmlToPdfFile(pdfUrl, user_output_filepath)
function HtmlToPdfFile(byval pdfUrl, user_output_filepath)
...
...
end function
'// RegExp Test.
Function RegExpTest(byval patrn, byval str)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
RegExpTest = regEx.Test(str)
End Function
'// 檢查文字中是否有中文字
'// ex: ret = IsMatchChinese(str)
'// return:
'// True: find.
'// False: not found.
Function IsMatchChinese(byval str)
IsMatchChinese = RegExpTest("[一-龥]+",str)
End Function
Regex ex = new Regex("[一-龥]");
bool isMatched = ex.IsMatch("jjsss 中文 ksks");