2008年11月文章归档:

吕的部落格唯女子与小人为难养也近之则不孙远之则怨

2008年11月文章归档

在以前的使用jQuery自动缩图片
中实际上有BUG,其结果是导制width和heigt失去原来的比例,修正版如下,问题在哪有兴趣的朋友可以对比代码看看。
另外发现许多朋友“转载”这篇文件或COPY这个文章的代码都有选择性的删除我的博客链接,甚至于把我的博客链接换成自己的链接,再不怎么说都不应该这样做吧。

/*

自动缩略一些大图的小JS
    吕 lvjiyong@Gmail.com
    http://www.lvjiyong.com/tag/jquery/
    更新:2007.9.22

更新2007.9.28 

更新2008.11.27 修正长宽比例失调问题

*/


jQuery.fn.ImageAutoSize = function(width, height) {
    $("img", this).each(function() {
        var image = $(this);
        var sWidth = image.width() ;
        if (sWidth > width) {


            image.height(width / sWidth * image.height());
            image.width(width);
        }
        var sHeight = image.height();
        if (sHeight > height) {

            image.width(height / sHeight * image.width());
            image.height(height);
        }

    });
};

调用:先引用上面的脚本或将上页的脚本放入自己的JS库,然后只要再加

$(function(){ $("图片组所在的容器").ImageAutoSize(限制最大宽,限制最大高);});

 全文完
评论(0) 引用(0) 标签:无

超级大富翁介绍

超级大富翁是一个虚拟的企业买卖、城市建造游戏
你需要在“购买企业”里面购买企业,每10分钟企业价格变化一次,然后观察“我的企业”里面你所购买的企业是否升值,如果升值就出售,你就可以赚取中间的差价,您的总资产就会上升,往复循环,寻找企业的规律或者价格变化幅度来掌握购买的多少!
等你的现金达到100亿元以上时你就可以创建自己的城市了,超级城市也可以帮助你提升自己的总资产。

超级大富翁 游戏规则

1,企业价格10分钟变换一次;
2,自我保护每半个小时方可使用一次(包括开启、关闭);
3,道具使用的时间间隔请看道具商场中各道具的说明;
4,企业盈利的个人所得税是盈利的10%;

5,赠送企业的要求是您的资产总额要达到5亿以上;
6,等级累计规则是,每在线半个小时累计一次,等级计算公式为:h=5n(n+1) [h为总在线时间(单位;小时),n为等级];

7,资产总额=城市价值+城市开通费+企业资金+现金;

8,自我保护开关在“我的资产”页面,头像下面;
9,如果发现你的企业资金不正确,请点击“我的资产”页面中的修复按钮;
10,关于慈善的一点说明:慈善不仅仅积累等级、解除购买建筑点数限制,还应该有一点社会责任感;

超级城市 简介

1,超级城市给大家提供了又一个赚钱的方式,你可以更合理的安排房子使之为你赚钱,注意:如果你没有100亿,建议不要建立城市;
2,超级城市的建筑每24小时可以结算一次;
3,拆除建筑只能得到房价的20%;

 阅读全文...
最近真正统一了台州博客的通行证。这其中包括ASP(原旧博客站点),与ASP.NET(通行证让点),第二天更发生了用户不能登录的问题(中文ID),一直提供MD5值错误(通行证使用MD5混合校验)。第一想到的就是ASP的GB2312编码和ASP.NET的UTF-8编码对中文MD5的问题,但最后才确认真正的问题不是页面编码,而是MD5加密编码的问题。找了很多资料,很多人都说歉容中文,但偶就是不行(前提是保持页面编码不变),最后突然想到URL编码后再加密,但效果是URL编码也分文字编码的。呵呵,不过最后还是用unicode编码搞定。
ASP
function chinese2unicode(str)
   dim hexValue
   dim one
   for i=1 to len(str)
     one=Mid(str,i,1)
     hexValue=hexValue & Hex(asc(one))
   next
   chinese2unicode=hexValue
end function


.NET
        string Create16BitMd5Password(string password)
        {


            System.Text.Encoding gb = System.Text.Encoding.GetEncoding("gb2312");
            byte[] temp = gb.GetBytes(password);
            System.Text.StringBuilder result = new System.Text.StringBuilder();
            foreach (byte one in temp)
            {
                result.Append(one.ToString("X"));
            }


            return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(result.ToString(), "MD5").ToLower().Substring(8, 16);

        }


ASP 16位与32位 MD5

.NET 16位与32位 MD5

 全文完
评论(0) 引用(0) 标签:MD5

原文:http://blogs.msdn.com/alexgor/archive/2008/10/27/microsoft-chart-control-for-net-framework-released.aspx

I glad to announce the release of Microsoft Chart for .NET Framework 3.5 SP1, which includes the ASP.NET and Windows Forms Chart Controls. Our Data Visualization team in SSRS worked really hard to deliver those controls! 

Chart samples 

Here is where you can download it:

  1. Microsoft Chart Controls for Microsoft .NET Framework 3.5 – This installs the ASP.NET and Windows Forms Controls.  The assemblies will be installed in the GAC as well as in the “%Program File%\Microsoft Chart Controls\Assemblies” folder.  If you build an application using the controls, your setup and deployment should add MSChart.exe installer as a pre-requisite. 
  2. Microsoft Chart Controls for Microsoft .NET Framework 3.5 Language Pack – This installs the language pack for the Chart Controls.  It is available in 23 .NET Framework languages.
  3. Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008 – This installs the IntelliSense file in English for the controls and also adds the controls to the toolbox for ASP.NET and Windows Forms.
 Where to find more information?
  1. Microsoft Chart Forum
 Alex. 全文完
评论(0) 引用(0) 标签:Microsoft,Chart
记录:4项 页码:1/1
  • 1