This file contains hidden or 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
' | |
' ASP/VBScript Dynamic Object Generator | |
' Author: WangYe | |
' For more information please visit | |
' http://wangye.org/ | |
' This code is distributed under the BSD license | |
' | |
' UPDATE: | |
' 2012/11/7 | |
' 1. Add variable key validator. |
This file contains hidden or 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 | |
// For more information please visit http://wangye.org/blog/archives/706/ | |
var RawCache = function() { | |
this.setItem = function(key, value) { | |
Application.Lock(); | |
Application.Contents(key) = value; | |
Application.Unlock(); | |
}; | |
this.getItem = function(key, defvalue) { |
This file contains hidden or 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
import sqlite3 | |
# *************************************************** | |
# * | |
# * Description: Python操作SQLite3数据库辅助类(查询构造器) | |
# * Author: wangye | |
# * Website: http://wangye.org | |
# * | |
# *************************************************** |
This file contains hidden or 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
import re | |
import datetime | |
# *************************************************** | |
# * | |
# * Description: 非标准的日期字符串处理 | |
# * Author: wangye <pcn88 at hotmail dot com> | |
# * Website: http://wangye.org | |
# * | |
# *************************************************** |
This file contains hidden or 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 | |
' For more information please visit | |
' http://wangye.org/blog/archives/591/ | |
' | |
Option Explicit | |
Dim hasMatchCase | |
Dim hasRecursion |
This file contains hidden or 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
Class FileOperation | |
Private AxFile | |
Private Sub Class_Initialize() | |
Set AxFile = WSH.CreateObject("Scripting.FileSystemObject") | |
End Sub | |
Private Sub Class_Terminate() | |
Set AxFile = Nothing | |
End Sub |
This file contains hidden or 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
<?php | |
// http://wangye.org/blog/archives/4/ | |
// 定义你自己的URL路由表 | |
// 比如下面的路由表将会把 | |
// read.php?paramA=1¶mB=2¶mC=3 | |
// 变成 | |
// /post/1/2/3/ | |
$router = array( | |
'read.php'=>'/post/' | |
); |
This file contains hidden or 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 | |
' For more information please visit | |
' http://wangye.org/blog/archives/250/ | |
' | |
Function PathRemoveFileSpec1(strFileName) | |
' 将类Unix路径 / 替换为 \ | |
strFileName = Replace(strFileName, "/", "\") | |
Dim iPos |
This file contains hidden or 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 | |
Const HKEY_LOCAL_MACHINE = &H80000002 | |
Const REG_DWORD = 4 | |
Function VBMain() | |
Dim strComputer, strKeyPath, lngValue, Registry | |
strComputer = "." | |
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion" |
This file contains hidden or 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 | |
' For more information please visit: | |
' http://wangye.org/blog/archives/267/ | |
' | |
Class cObjectManager | |
Public IsPersist | |
Private objHost | |
Private objDict | |