This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
' *************************************************** | |
' * | |
' * Description: 计算年龄 | |
' * Author: wangye <pcn88 at hotmail dot com> | |
' * Website: http://wangye.org | |
' * | |
' * Paramters: | |
' * ByVal datetime 出生日期或者要比较的日期1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' | |
' Description: VBScript/VBS open file dialog | |
' Compatible with most Windows platforms | |
' Author: wangye <pcn88 at hotmail dot com> | |
' Website: http://wangye.org | |
' | |
' dir is the initial directory; if no directory is | |
' specified "Desktop" is used. | |
' filter is the file type filter; format "File type description|*.ext" | |
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' | |
' Description: VBScript/VBS/VBA | |
' split single word document | |
' to multi-documents by pages | |
' Author: wangye <pcn88 at hotmail dot com> | |
' Website: http://wangye.org | |
' Copyright by author | |
' | |
Const PrevPage = 0 | |
Const NextPage = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: wangye | |
# For more information please visit: | |
# http://wangye.org/ | |
# 请在使用本脚本前做好测试工作,脚本功能仅供参考, | |
# 对于可能的潜在问题造成损失,本人不承担责任。 | |
MYSQL_USERNAME="mysql-username" | |
MYSQL_PASSWORD="mysql-password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: wangye | |
http://wangye.org/ | |
*/ | |
static const char sel[] = { | |
'B','C','D','F','G', | |
'H','J','K','M','P', | |
'Q','R','T','V','W', | |
'X','Y','2','3','4', | |
'6','7','8','9', '\0'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Description: Base24 encode and decode | |
// Author: wangye <pcn88 at hotmail dot com> | |
// Website: http://wangye.org | |
// | |
public static class Base24 | |
{ | |
private static string sel = "BCDFGHJKMPQRTVWXY2346789"; | |
public static string Encode(string Text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' | |
' Description: Base64 encode and decode | |
' Author: wangye <pcn88 at hotmail dot com> | |
' Website: http://wangye.org | |
' | |
Class CBase64 | |
Private objXmlDom | |
Private objXmlNode | |
' GetObjectParam() 这个函数实现参考了开源项目PJBlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Base64 to Hex or Hex to Base64 encode and decode | |
' Website: http://wangye.org | |
' Base64转16进制 | |
Function B64ToHex(ByVal strContent) | |
Dim i,strReturned, b64pad, _ | |
b64map, chTemp, intLocate, k , slop | |
strReturned = "" : k = 0 | |
b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZ" &_ | |
"abcdefghijklmnopqrstuvwxyz0123456789+/" | |
b64pad="=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Description: C# Reflection MD5/SHA1 Hash | |
// Author: wangye <pcn88 at hotmail dot com> | |
// Website: http://wangye.org | |
// For more information please visit: | |
// http://wangye.org/blog/archives/134/ | |
// | |
using System; | |
using System.Text; | |
using System.Security.Cryptography; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Check File Name | |
Function IsAcceptableFileName(fileName) | |
Set objRegExp = New RegExp | |
objRegExp.IgnoreCase = True | |
objRegExp.Global = False | |
objRegExp.Pattern = _ | |
"^(?!^(PRN|AUX|CLOCK\$|CONFIG\$|" & _ | |
"NUL|CON|COM\d|LPT\d|\..*)" & _ | |
"(\..+)?$)[^\x00-\x1f\\?*:\"";|/]+$" | |
IsAcceptableFileName = objRegExp.Test(fileName) |
OlderNewer