分类

‘程序人生’ 分类的存档

Apache反向代理IIS,配置成功啦,发文庆祝,哈哈

2010年8月23日

终于忍受不了IIS+PHP的模式了,最近,IIS进程经常占用90%的CPU,原因就是IIS上装了个Wordpress URL Rewirte的插件,搞的速度慢的要死。

终于,决定用APACHE了,嘿嘿。

但是,服务器上还跑了好几个ASP.NET的程序,IIS是必须的。所以,采用了APACHE的反向代理,对IIS进行了代理,经过2个小时的安装、配置, 终于圆满完工了,哈哈

[ more 阅读全文 ]

IIS, WEB资源, WP, mysql , , , ,

Asp.Net(C#)生成PDF详解(支持中文、水印、页眉、页脚、表格等)

2010年8月23日

Asp.Net(C#)生成PDF详解(支持中文、水印、页眉、页脚、表格等)

2010年8月19日

Asp.Net(C#)生成PDF详解(支持中文、水印、页眉、页脚、表格等)

2010年8月19日

每次开机都进行磁盘扫描的解决方法

2010年8月17日

如果你的电脑,每次开机都要进行磁盘扫描,但是,却没有任何问题发现,你会不会很烦呢

下面就说一下解决这个问题的方法:

  1. 开始 –> 运行,输入 regedit ,回车,打开注册表编辑器
  2. 定位到 HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/SessionManager
  3. 在右侧的窗格,找到 BootExecute ,把它的值清空,确定。
  4. 关闭注册表编辑器
  5. 重启,看看是否OK了呢

 

每次开机都磁盘扫描

[ more 阅读全文 ]

Windows Xp, 微软, 系统维护 , ,

Javascript操作Cookie的脚本 — CookieHelper

2010年8月16日

这是一个Javascript操作Cookie的功能封装,对于制作购物车之类的,还是比较实用的,功能包括 添加COOKIE,删除COOKIE,获取COOKIE的值

var HttpCookie = function (name, value, expires, path, domain) {
    if (name) this.Name = name;
    if (value) this.Value = value;
    if (expires) this.Expires = expires;
    if (path) this.Path = path;
    if (domain) this.Domain = domain;
};

HttpCookie.prototype =
{
    Name: '', Value: '', Expires: '', Path: '/', Domain: '',
    toCookie: function () {
        var NewCookie = this.Name + '=' + this.Value;
        if (this.Expires) NewCookie += (';expires=' + this.Expires);
        if (this.Path) NewCookie += (';path=' + this.Path);
        if (this.Domain) NewCookie += (';domain=' + this.Domain);
        return NewCookie;
    }
}

var CookieHelper = function () { };

CookieHelper.ConvertToUTCString = function (hourNumber) {
    if (!hourNumber || hourNumber == 0) return null;
    var Timestamp = (new Date().getTime() + (hourNumber * 1000 * 60 * 60));
    return new Date(Timestamp).toUTCString();
};

CookieHelper.Set = function (cookieName, cookieValue, expireHour, path, domain) {
    var HC =
    new HttpCookie
    (
        cookieName,
        escape(cookieValue),
        CookieHelper.ConvertToUTCString(expireHour),
        path,
        domain
    );

    document.cookie = HC.toCookie();
};

CookieHelper.Get = function (cookieName) {
    var regex = new RegExp(("(^| )" + cookieName + "=([^;]*)(;|$)"));
    var Matchs = document.cookie.match(regex);
    if (Matchs) return unescape(Matchs[2]);
    return null;
};

CookieHelper.Delete = function (cookieName, path, domain) {
    if (!CookieHelper.Get(cookieName)) return;

    var HC =
    new HttpCookie
    (
        cookieName,
        null,
        CookieHelper.ConvertToUTCString(-100)
    );

    document.cookie = HC.toCookie();
};

 

[ more 阅读全文 ]

Asp.Net, Javascript , , ,