<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.witmax.cn/styles/feedsky7.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.witmax.cn" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/witmax" type="application/rss+xml"></fs:self_link><lastBuildDate>Tue, 24 Jan 2012 07:28:09 GMT</lastBuildDate><title>枫芸志</title><description>记录成长路途上的点滴总结</description><link>http://witmax.cn</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Tue, 24 Jan 2012 07:28:09 GMT</pubDate><item><title>【Win7】设置常用保存位置（即资源管理器收藏夹）</title><link>http://witmax.cn/win7-explorer-favorites.html</link><content:encoded>&lt;p&gt;经常需要将文档保存到不同的几个地方的同学肯定会觉得每次切换文件夹是见很麻烦的事，这里就告诉你如何用资源管理器收藏夹来在保存窗口实现快速切换。&lt;/p&gt;
&lt;p&gt;1、在资源管理器中打开你要作为常用保存位置的文件夹&lt;/p&gt;
&lt;p&gt;2、在资源管理器左侧右键&lt;strong&gt;收藏夹&lt;/strong&gt;，选择&lt;strong&gt;将当前位置添加到收藏夹&lt;/strong&gt;；在收藏夹下面就会出现当前的文件名称，可以右键对它进行重命名&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1920&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/win7-explorer-favorites-1.png&quot; rel=&quot;lightbox[1920]&quot; title=&quot;将文件夹添加到资源管理器收藏夹&quot;&gt;&lt;img title=&quot;将文件夹添加到资源管理器收藏夹&quot; src=&quot;http://witmax.cn/img/win7-explorer-favorites-1.png&quot; alt=&quot;将文件夹添加到资源管理器收藏夹&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;将文件夹添加到资源管理器收藏夹&lt;/p&gt;&lt;/div&gt;
&lt;p&gt; 在Word等程序的保存窗口，就可以看到刚设置的常用文件夹了&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/win7-explorer-favorites-2.png&quot; rel=&quot;lightbox[1920]&quot; title=&quot;Word保存窗口&quot;&gt;&lt;img title=&quot;Word保存窗口&quot; src=&quot;http://witmax.cn/img/win7-explorer-favorites-2.png&quot; alt=&quot;Word保存窗口&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Word保存窗口&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;对于个别像FastStone Capture的保存窗口不是用Windows 7通用文件保存对话框实现的，则需要借助于&lt;a href=&quot;http://melloware.biz/download/warez/Placesbar.zip&quot; target=&quot;_blank&quot;&gt;PlaceBar Editor&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;参考：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://soft.yesky.com/475/30958975.shtml&quot; target=&quot;_blank&quot;&gt;找回躲猫猫的Win7资源管理器收藏夹&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sevenforums.com/tutorials/85487-common-file-dialog-box-customize-places-bar.html&quot; target=&quot;_blank&quot;&gt;Common File Dialog Box &amp;#8211; Customize Places Bar&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/599003556/witmax/feedsky/s.gif?r=http://witmax.cn/win7-explorer-favorites.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/win7-explorer-favorites.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>经常需要将文档保存到不同的几个地方的同学肯定会觉得每次切换文件夹是见很麻烦的事，这里就告诉你如何用资源管理器收藏夹来在保存窗口实现快速切换。 1、在资源管理器中打开你要作为常用保存位置的文件夹 2、在资源管理器左侧右键收藏夹，选择将当前位置添加到收藏夹；在收藏夹下面就会出现当前的文件名称，可以右键对它进行重命名  在Word等程序的保存窗口，就可以看到刚设置的常用文件夹了 对于个别像FastStone Capture的保存窗口不是用Windows 7通用文件保存对话框实现的，则需要借助于PlaceBar Editor。 参考： 找回躲猫猫的Win7资源管理器收藏夹 Common File Dialog Box &amp;#8211; Customize Places Bar&lt;img src=&quot;http://www1.feedsky.com/t1/599003556/witmax/feedsky/s.gif?r=http://witmax.cn/win7-explorer-favorites.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>软件技巧</category><category>Windows 7</category><pubDate>Tue, 24 Jan 2012 15:28:09 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/win7-explorer-favorites.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1920</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/win7-explorer-favorites.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/599003556/6370049</fs:itemid></item><item><title>【SQL】找不到存储过程 ‘dbo.aspnet_CheckSchemaVersion’的解决办法</title><link>http://witmax.cn/aspnet_checkschemaversion.html</link><content:encoded>&lt;p&gt;在C#中用Membership时遇到了这个问题，如下&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;找不到存储过程 &amp;#8216;dbo.aspnet_CheckSchemaVersion&amp;#8217;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;根据提示，通过数据库管理器建立这个存储过程就OK了，这个方法这里不提。但因为数据库是新建的，所以很可能有很多相关的存储过程都没有。于是找到了一下的方法：&lt;/p&gt;
&lt;p&gt;运行C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe ASP.NET SQL Server数据库安装向导来进行配置。&lt;/p&gt;
&lt;p&gt;通过配置对应的数据库即可，问题解决。&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/598735976/witmax/feedsky/s.gif?r=http://witmax.cn/aspnet_checkschemaversion.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/aspnet_checkschemaversion.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>在C#中用Membership时遇到了这个问题，如下 找不到存储过程 &amp;#8216;dbo.aspnet_CheckSchemaVersion&amp;#8217; 根据提示，通过数据库管理器建立这个存储过程就OK了，这个方法这里不提。但因为数据库是新建的，所以很可能有很多相关的存储过程都没有。于是找到了一下的方法： 运行C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe ASP.NET SQL Server数据库安装向导来进行配置。 通过配置对应的数据库即可，问题解决。&lt;img src=&quot;http://www1.feedsky.com/t1/598735976/witmax/feedsky/s.gif?r=http://witmax.cn/aspnet_checkschemaversion.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>SQL</category><category>程序开发</category><pubDate>Sun, 22 Jan 2012 19:36:09 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/aspnet_checkschemaversion.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1917</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/aspnet_checkschemaversion.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/598735976/6370049</fs:itemid></item><item><title>【SQL】找不到存储过程 ‘dbo.aspnet_Membership_GetUserByUserId’ 的解决办法</title><link>http://witmax.cn/aspnet_membership_getuserbyuserid.html</link><content:encoded>&lt;p&gt;C#用Membership功能时报了这么个错误&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;找不到存储过程 &amp;#8216;dbo.aspnet_Membership_GetUserByUserId&amp;#8217;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;根据提示，很显然数据库里缺少响应的存储过程，用数据库管理器打开对应的数据库执行以下sql语句即可。&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1913&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;brush: sql; title: ; notranslate&quot;&gt;SET QUOTED_IDENTIFIER OFF
GO

CREATE PROCEDURE dbo.aspnet_Membership_GetUserByUserId
    @UserId               uniqueidentifier,
    @CurrentTimeUtc       datetime,
    @UpdateLastActivity   bit = 0
AS
BEGIN
    IF ( @UpdateLastActivity = 1 )
    BEGIN
        UPDATE   dbo.aspnet_Users
        SET      LastActivityDate = @CurrentTimeUtc
        FROM     dbo.aspnet_Users
        WHERE    @UserId = UserId

        IF ( @@ROWCOUNT = 0 ) -- User ID not found
            RETURN -1
    END

    SELECT  m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
            m.CreateDate, m.LastLoginDate, u.LastActivityDate,
            m.LastPasswordChangedDate, u.UserName, m.IsLockedOut,
            m.LastLockoutDate
    FROM    dbo.aspnet_Users u, dbo.aspnet_Membership m
    WHERE   @UserId = u.UserId AND u.UserId = m.UserId

    IF ( @@ROWCOUNT = 0 ) -- User ID not found
       RETURN -1

    RETURN 0
END

GO&lt;/pre&gt;
&lt;p&gt;参考：&lt;a href=&quot;http://docs.imis.com/15.1/Schema/Programmability/Stored_Procedures/aspnet_Membership_GetUserByUserId.html&quot; target=&quot;_blank&quot;&gt;[dbo].[aspnet_Membership_GetUserByUserId]&lt;/a&gt;&lt;/pre&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/598715394/witmax/feedsky/s.gif?r=http://witmax.cn/aspnet_membership_getuserbyuserid.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/aspnet_membership_getuserbyuserid.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>C#用Membership功能时报了这么个错误 找不到存储过程 &amp;#8216;dbo.aspnet_Membership_GetUserByUserId&amp;#8217; 根据提示，很显然数据库里缺少响应的存储过程，用数据库管理器打开对应的数据库执行以下sql语句即可。 参考：[dbo].[aspnet_Membership_GetUserByUserId]&lt;img src=&quot;http://www1.feedsky.com/t1/598715394/witmax/feedsky/s.gif?r=http://witmax.cn/aspnet_membership_getuserbyuserid.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>SQL</category><category>程序开发</category><pubDate>Sun, 22 Jan 2012 17:54:12 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/aspnet_membership_getuserbyuserid.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1913</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/aspnet_membership_getuserbyuserid.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/598715394/6370049</fs:itemid></item><item><title>【Discuz】开启邀请注册功能</title><link>http://witmax.cn/discuz-invite-register-settings.html</link><content:encoded>&lt;p&gt;对于封闭论坛来说不希望陌生用户注册进来，那么就可以关闭开发注册，而采用邀请注册的方式。具体设置如下：&lt;/p&gt;
&lt;p&gt;管理员后台》全局》注册与访问》允许新用户注册》选择“只开放邀请注册”，如下图：&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1907&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 464px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/discuz-invite-register-1.png&quot; rel=&quot;lightbox[1907]&quot; title=&quot;开启邀请注册设置&quot;&gt;&lt;img title=&quot;开启邀请注册设置&quot; src=&quot;http://witmax.cn/img/discuz-invite-register-1.png&quot; alt=&quot;开启邀请注册设置&quot; width=&quot;454&quot; height=&quot;552&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;开启邀请注册设置&lt;/p&gt;&lt;/div&gt;
&lt;p&gt; 回到论坛，在注册中心可以看到邀请注册链接，点击后打开如下：&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/discuz-invite-register-2.png&quot; rel=&quot;lightbox[1907]&quot; title=&quot;邀请注册界面&quot;&gt;&lt;img title=&quot;邀请注册界面&quot; src=&quot;http://witmax.cn/img/discuz-invite-register-2.png&quot; alt=&quot;邀请注册界面&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;邀请注册界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt; 如没有看到购买邀请码的界面，说明用户所属的用户组没有邀请码购买权限，需要通过以下方法设置。&lt;/p&gt;
&lt;p&gt;管理员后台》用户》管理组/用户组》编辑某一用户组》注册相关》进行相关的设置&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/discuz-invite-register-3.png&quot; rel=&quot;lightbox[1907]&quot; title=&quot;允许用户组购买邀请码设置&quot;&gt;&lt;img title=&quot;允许用户组购买邀请码设置&quot; src=&quot;http://witmax.cn/img/discuz-invite-register-3.png&quot; alt=&quot;允许用户组购买邀请码设置&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;允许用户组购买邀请码设置&lt;/p&gt;&lt;/div&gt;
&lt;p&gt; 再次回到个人中心的邀请注册，此时可以看到邀请码购买界面了，搞定！&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/597239794/witmax/feedsky/s.gif?r=http://witmax.cn/discuz-invite-register-settings.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/discuz-invite-register-settings.html/feed</wfw:commentRss><slash:comments>2</slash:comments><description>对于封闭论坛来说不希望陌生用户注册进来，那么就可以关闭开发注册，而采用邀请注册的方式。具体设置如下： 管理员后台》全局》注册与访问》允许新用户注册》选择“只开放邀请注册”，如下图：  回到论坛，在注册中心可以看到邀请注册链接，点击后打开如下：  如没有看到购买邀请码的界面，说明用户所属的用户组没有邀请码购买权限，需要通过以下方法设置。 管理员后台》用户》管理组/用户组》编辑某一用户组》注册相关》进行相关的设置  再次回到个人中心的邀请注册，此时可以看到邀请码购买界面了，搞定！&lt;img src=&quot;http://www1.feedsky.com/t1/597239794/witmax/feedsky/s.gif?r=http://witmax.cn/discuz-invite-register-settings.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Discuz</category><category>站点建设</category><pubDate>Mon, 16 Jan 2012 13:08:22 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/discuz-invite-register-settings.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1907</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/discuz-invite-register-settings.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/597239794/6370049</fs:itemid></item><item><title>【C#】class与struct的区别</title><link>http://witmax.cn/csharp-class-vs-struct.html</link><content:encoded>&lt;p&gt;class和struct语法几乎相同，但其本质却截然不同：class是引用类型，struct是值类型，也就是说在内存中存储方式有别，由此产生的一系列差异性。&lt;/p&gt;
&lt;p&gt;class(类)是面向对象编程的基本概念，是一种自定义数据结构类型，通常包含字段、属性、方法、构造函数、索引器、事件等。在.NET中，所有的类都继承自System.Object类，是一种引用类型，也就是说，当我们new出一个类的实例时，对象保存了该实例实际数据的引用地址，而对象的值保存在托管堆中。&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1898&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;struct(结构)是一种值类型，用于将一组相关的信息变量组织成为一个单一的变量实体。所有的结构都继承自System.ValueType类，是一种值类型，我们可以像使用int和char一样去使用struct。struct实例分配在线程的堆栈上，它本身存储了值，而不是指向该值的指针。&lt;/p&gt;
&lt;p&gt;了解了class和struct的本质，我们可以通过分析和实验来总结二者的区别：&lt;/p&gt;
&lt;p&gt;（1）关于实质：class是引用类型，struct是值类型&lt;/p&gt;
&lt;p&gt;（2）关于职能：class是行为的封装，用来表述对象，而struct是数据的封装，用来储存数据&lt;/p&gt;
&lt;p&gt;（3）关于继承：class支持继承自类和接口；而struct只能支继承接口。struct不能从class继承，也不能作为class的基类。&lt;/p&gt;
&lt;p&gt;（4）关于构造函数：class可以声明无参构造函数，可以声明析构函数；而struct只能声明带参数构造函数，且不能声明析构函数。&lt;/p&gt;
&lt;p&gt;（5）关于实例化：class要使用new关键字；而struct可以不使用new关键字，struct在声明时就进行了初始化过程，所有的成员变量均默认为0或null。&lt;/p&gt;
&lt;p&gt;（6）关于抽象：class可以实抽象类(abstract)，可以声明抽象函数；而struct不能。&lt;/p&gt;
&lt;p&gt;（7）关于重载：class可以声明protected成员、virtual成员、sealed成员和override成员；而struct不可以，但是值得注意的是，struct可以重载System.Object的3个虚方法，Equals()、ToString()和GetHashTable()。&lt;/p&gt;
&lt;p&gt;（8）关于比较：两个class的比较有Equals和==两种，即值相等和引用相同；而两个struct可以直接通过==来判断。&lt;/p&gt;
&lt;p&gt;（9）关于销毁：class实例由垃圾回收机制来保证内存的回收处理；而struct变量使用完后立即自动解除内存分配。&lt;/p&gt;
&lt;p&gt;（10）关于参数传递：class变量是以按址方式传递；而struct变量是以按值方式传递的。&lt;/p&gt;
&lt;p&gt;既然class几乎可以完全替代struct来实现所有的功能，那么struct还有存在的必要吗？至少在以下情况下，我们应该考虑使用struct来代替class：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;实现一个用于存储数据的结构时，可以考虑struct。&lt;/li&gt;
&lt;li&gt;考虑与某些非托管代码通信的兼容性问题时，可以考虑struct。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;原文：&lt;a href=&quot;http://www.cnblogs.com/tangself/archive/2009/12/10/1621416.html&quot; target=&quot;_blank&quot;&gt;NET中class与struct的区别简析&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;P.S. 附一篇《&lt;a href=&quot;http://hi.baidu.com/liaidongyinhu/blog/item/85fe0cc6d66acaa48326ac43.html&quot; target=&quot;_blank&quot;&gt;C#中虚函数和抽象函数的区别&lt;/a&gt;》&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/596237828/witmax/feedsky/s.gif?r=http://witmax.cn/csharp-class-vs-struct.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/csharp-class-vs-struct.html/feed</wfw:commentRss><slash:comments>3</slash:comments><description>class和struct语法几乎相同，但其本质却截然不同：class是引用类型，struct是值类型，也就是说在内存中存储方式有别，由此产生的一系列差异性。 class(类)是面向对象编程的基本概念，是一种自定义数据结构类型，通常包含字段、属性、方法、构造函数、索引器、事件等。在.NET中，所有的类都继承自System.Object类，是一种引用类型，也就是说，当我们new出一个类的实例时，对象保存了该实例实际数据的引用地址，而对象的值保存在托管堆中。 struct(结构)是一种值类型，用于将一组相关的信息变量组织成为一个单一的变量实体。所有的结构都继承自System.ValueType类，是一种值类型，我们可以像使用int和char一样去使用struct。struct实例分配在线程的堆栈上，它本身存储了值，而不是指向该值的指针。 了解了class和struct的本质，我们可以通过分析和实验来总结二者的区别： （1）关于实质：class是引用类型，struct是值类型 （2）关于职能：class是行为的封装，用来表述对象，而struct是数据的封装，用来储存数据 （3）关于继承：class支持继承自类和接口；而struct只能支继承接口。struct不能从class继承，也不能作为class的基类。 （4）关于构造函数：class可以声明无参构造函数，可以声明析构函数；而struct只能声明带参数构造函数，且不能声明析构函数。 （5）关于实例化：class要使用new关键字；而struct可以不使用new关键字，struct在声明时就进行了初始化过程，所有的成员变量均默认为0或null。 （6）关于抽象：class可以实抽象类(abstract)，可以声明抽象函数；而struct不能。 （7）关于重载：class可以声明protected成员、virtual成员、sealed成员和override成员；而struct不可以，但是值得注意的是，struct可以重载System.Object的3个虚方法，Equals()、ToString()和GetHashTable()。 （8）关于比较：两个class的比较有Equals和==两种，即值相等和引用相同；而两个struct可以直接通过==来判断。 （9）关于销毁：class实例由垃圾回收机制来保证内存的回收处理；而struct变量使用完后立即自动解除内存分配。 （10）关于参数传递：class变量是以按址方式传递；而struct变量是以按值方式传递的。 既然class几乎可以完全替代struct来实现所有的功能，那么struct还有存在的必要吗？至少在以下情况下，我们应该考虑使用struct来代替class： 实现一个用于存储数据的结构时，可以考虑struct。 考虑与某些非托管代码通信的兼容性问题时，可以考虑struct。 原文：NET中class与struct的区别简析 P.S. 附一篇《C#中虚函数和抽象函数的区别》&lt;img src=&quot;http://www1.feedsky.com/t1/596237828/witmax/feedsky/s.gif?r=http://witmax.cn/csharp-class-vs-struct.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>CSharp</category><category>程序开发</category><pubDate>Thu, 12 Jan 2012 21:51:11 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/csharp-class-vs-struct.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1898</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/csharp-class-vs-struct.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/596237828/6370049</fs:itemid></item><item><title>数据库范式解析（1NF 2NF 3NF BCNF）</title><link>http://witmax.cn/database-normal-form.html</link><content:encoded>&lt;p&gt;数据库设计范式是关系型数据库的设计准则。其目的在于通过规划设计使得数据库结构合理，尽量减少数据冗余，消除存储异常，方便数据的插入、更新和删除操作。目前常用范式包括1NF（第一范式）、2NF（第二范式）、3NF（第三范式）和BCNF（鲍依斯-科得范式）。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1NF 第一范式&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;如果一个关系模式R的所有属性都是不可分的基本数据项，则R∈1NF。&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;也可表述为：&lt;em&gt;数据库表中的字段都是单一属性的，不可再分。&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;比如“地址”属性应该拆分为“城市”、“区县”、“具体地址”便于使用。&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1896&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2NF 第二范式&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;若关系模式R∈1NF，并且每一个非主属性都&lt;/em&gt;&lt;em&gt;完全函数依赖&lt;/em&gt;&lt;em&gt;于R的码（多个主属性字段的组合），则R∈2NF&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;也可表述为：&lt;em&gt;数据库表中不存在非关键字段对任一候选关键字段的部分函数依赖（部分函数依赖指的是存在组合关键字中的某些字段决定非关键字段的情况），也即所有非关键字段都完全依赖于任意一组候选关键字。&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;比如选课关系表(学号, 姓名, 年龄, 课程名称, 成绩, 学分)，码为组合关键字(学号, 课程名称)，因为存在如下决定关系：&lt;/p&gt;
&lt;p&gt;这个数据库表不满足第二范式，因为存在如下决定关系：(课程名称) → (学分) 和 (学号) → (姓名, 年龄)，即存在码中的部分字段决定非关键字的情况，所以不符合2NF。应修改为一以下三个表：&lt;/p&gt;
&lt;p&gt;学生：Student(学号, 姓名, 年龄)；&lt;/p&gt;
&lt;p&gt;课程：Course(课程名称, 学分)；&lt;/p&gt;
&lt;p&gt;选课关系：SelectCourse(学号, 课程名称, 成绩)。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3NF 第三范式&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;关系模式&lt;/em&gt;&lt;em&gt;R&amp;lt;U，F&amp;gt; 中若不存在这样的码X、属性组Y及非主属性Z（Z  Y）, 使得X→Y，Y→Z，成立，则称R&amp;lt;U，F&amp;gt; ∈ 3NF。&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;也可表述为：&lt;em&gt;在第二范式的基础上，数据表中如果不存在非关键字段对任一候选关键字段的传递函数依赖则符合第三范式。所谓传递函数依赖，指的是如果存在”A → B → C”的决定关系，则C传递函数依赖于A。因此，满足第三范式的数据库表应该不存在如下依赖关系：关键字段 → 非关键字段x → 非关键字段y&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;比如：学生关系表为Student(学号, 姓名, 年龄, 所在学院, 学院地点, 学院电话)关键字段为“学号”，存在以下决定关系(学号) → (姓名, 年龄, 所在学院, 学院地点, 学院电话)，符合2NF；但存在(学号) → (所在学院) → (学院地点, 学院电话)，不符合3NF。应改为：&lt;/p&gt;
&lt;p&gt;学生：(学号, 姓名, 年龄, 所在学院)；&lt;/p&gt;
&lt;p&gt;学院：(学院, 地点, 电话)。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BCNF 鲍依斯-科得范式&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;设&lt;/em&gt;&lt;em&gt;关系模式&lt;/em&gt;&lt;em&gt;R&amp;lt;U，F&amp;gt;∈1NF，如果对于R的每个函数依赖X→Y，若Y不属于X，则X必含有候选码，那么R∈BCNF。&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;也可表述为：在第三范式的基础上，数据库表中如果不存在任何字段对任一候选关键字段的传递函数依赖则符合第三范式。&lt;/p&gt;
&lt;p&gt;比如：仓库管理关系表为(仓库ID, 存储物品ID, 管理员ID, 数量)，且有一个管理员只在一个仓库工作；一个仓库可以存储多种物品。这个数据库表中存在如下决定关系：&lt;/p&gt;
&lt;p&gt;　　(仓库ID, 存储物品ID) →(管理员ID, 数量)&lt;/p&gt;
&lt;p&gt;　　(管理员ID, 存储物品ID) → (仓库ID, 数量)&lt;/p&gt;
&lt;p&gt;所以，(仓库ID, 存储物品ID)和(管理员ID, 存储物品ID)都是表的候选关键字，表中的唯一非关键字段为数量，它是符合第三范式的。但是，由于存在如下决定关系：&lt;/p&gt;
&lt;p&gt;　　(仓库ID) → (管理员ID)&lt;/p&gt;
&lt;p&gt;　　(管理员ID) → (仓库ID)&lt;/p&gt;
&lt;p&gt;即存在关键字段决定关键字段的情况，所以其不符合BCNF范式。数据表应修改为：&lt;/p&gt;
&lt;p&gt;　　仓库管理：(仓库ID, 管理员ID)；&lt;/p&gt;
&lt;p&gt;　　仓库：(仓库ID, 存储物品ID, 数量)。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;四种范氏之间的关系&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;每一个范氏都是进一步约束的关系，如下图：&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 295px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/database-normal-form.gif&quot; rel=&quot;lightbox[1896]&quot; title=&quot;四种范式之间的关系&quot;&gt;&lt;img title=&quot;四种范式之间的关系&quot; src=&quot;http://witmax.cn/img/database-normal-form.gif&quot; alt=&quot;四种范式之间的关系&quot; width=&quot;285&quot; height=&quot;187&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;四种范式之间的关系&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;参考：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://jacki6.iteye.com/blog/774866&quot; target=&quot;_blank&quot;&gt;数据库范式（1NF 2NF 3NF BCNF）详解一&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jacki6.iteye.com/blog/774889&quot; target=&quot;_blank&quot;&gt;数据库范式（1NF 2NF 3NF BCNF）详解二&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.163.com/clevertanglei900@126/blog/static/111352259201131133326275/&quot; target=&quot;_blank&quot;&gt;SQL范式&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.cnblogs.com/kissknife/archive/2009/10/26/1590029.html&quot; target=&quot;_blank&quot;&gt;细说数据库范式&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/596237829/witmax/feedsky/s.gif?r=http://witmax.cn/database-normal-form.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/database-normal-form.html/feed</wfw:commentRss><slash:comments>4</slash:comments><description>数据库设计范式是关系型数据库的设计准则。其目的在于通过规划设计使得数据库结构合理，尽量减少数据冗余，消除存储异常，方便数据的插入、更新和删除操作。目前常用范式包括1NF（第一范式）、2NF（第二范式）、3NF（第三范式）和BCNF（鲍依斯-科得范式）。 1NF 第一范式 如果一个关系模式R的所有属性都是不可分的基本数据项，则R∈1NF。 也可表述为：数据库表中的字段都是单一属性的，不可再分。 比如“地址”属性应该拆分为“城市”、“区县”、“具体地址”便于使用。 2NF 第二范式 若关系模式R∈1NF，并且每一个非主属性都完全函数依赖于R的码（多个主属性字段的组合），则R∈2NF 也可表述为：数据库表中不存在非关键字段对任一候选关键字段的部分函数依赖（部分函数依赖指的是存在组合关键字中的某些字段决定非关键字段的情况），也即所有非关键字段都完全依赖于任意一组候选关键字。 比如选课关系表(学号, 姓名, 年龄, 课程名称, 成绩, 学分)，码为组合关键字(学号, 课程名称)，因为存在如下决定关系： 这个数据库表不满足第二范式，因为存在如下决定关系：(课程名称) → (学分) 和 (学号) → (姓名, 年龄)，即存在码中的部分字段决定非关键字的情况，所以不符合2NF。应修改为一以下三个表： 学生：Student(学号, 姓名, 年龄)； 课程：Course(课程名称, 学分)； 选课关系：SelectCourse(学号, 课程名称, 成绩)。 3NF 第三范式 关系模式R&amp;#60;U，F&amp;#62; 中若不存在这样的码X、属性组Y及非主属性Z（Z  Y）, 使得X→Y，Y→Z，成立，则称R&amp;#60;U，F&amp;#62; ∈ 3NF。 也可表述为：在第二范式的基础上，数据表中如果不存在非关键字段对任一候选关键字段的传递函数依赖则符合第三范式。所谓传递函数依赖，指的是如果存在”A → B → C”的决定关系，则C传递函数依赖于A。因此，满足第三范式的数据库表应该不存在如下依赖关系：关键字段 → 非关键字段x → 非关键字段y 比如：学生关系表为Student(学号, 姓名, 年龄, 所在学院, [...]&lt;img src=&quot;http://www1.feedsky.com/t1/596237829/witmax/feedsky/s.gif?r=http://witmax.cn/database-normal-form.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>SQL</category><category>程序开发</category><pubDate>Mon, 09 Jan 2012 20:53:40 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/database-normal-form.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1896</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/database-normal-form.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/596237829/6370049</fs:itemid></item><item><title>【Javascript】利用document.domain解决子域跨域访问问题</title><link>http://witmax.cn/js-cross-subdomain.html</link><content:encoded>&lt;p&gt;根据浏览器安全策略，不同域名（比如witmax.cn和www.witmax.cn）、不同协议（比如http://witmax.cn和https://witmax.cn）、不同端口（比如http://witmax.cn和http://witmax.cn:8088）之间的页面不能相互访问，包括XMLHTTPRequest方式和Javascript的页面访问。&lt;/p&gt;
&lt;p&gt;有一个例外是：&lt;strong&gt;在相同根域、相同协议、相同端口的情况下，可以利用设置document.domain方式来解决不同子域的跨站访问问题。&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;举个例子，想在witmax.cn中，访问www.witmax.cn域名下的内容，需要以下几步来完成：&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1890&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;在主页面（位于witmax.cn中）通过隐藏的iframe嵌套子页面（内容位于www.witmax.cn）&lt;/li&gt;
&lt;li&gt;在主页面中设置document.domain=”witmax.cn”;&lt;/li&gt;
&lt;li&gt;在子页面中设置document.domain=”witmax.cn”;&lt;/li&gt;
&lt;li&gt;在主页面和子页面中可以相互访问内容了；需要跨域访问其他内容，可以通过在对应页面上发请求完成取回数据然后进行对应操作&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;P.S. 补充几点：&lt;/p&gt;
&lt;p&gt;1、document.domain可以由子域&lt;a href=&quot;http://www.witmax.cn&quot;&gt;www.witmax.cn&lt;/a&gt;修改为主域witmax.cn，而不能由witmax.cn修改为&lt;a href=&quot;http://www.witmax.cn&quot;&gt;www.witmax.cn&lt;/a&gt;（不是所有浏览器都支持）。&lt;/p&gt;
&lt;p&gt;2、不同根域、或不同协议、或不同端口之间的跨域访问只能通过服务器断的代理程序来解决了。&lt;/p&gt;
&lt;p&gt;3、详细的示例见参考文档：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://dancewithnet.com/2007/07/22/solve-cross-sub-domain-ajax-with-document-domain/&quot; target=&quot;_blank&quot;&gt;用document.domain解决Ajax跨子域&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://js8.in/443.html&quot; target=&quot;_blank&quot;&gt;用document.domain+iframe实现Ajax跨子域&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://lixinlixin2008.iteye.com/blog/515352&quot; target=&quot;_blank&quot;&gt;设置 iframe document.domain杂谈&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/596237830/witmax/feedsky/s.gif?r=http://witmax.cn/js-cross-subdomain.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/js-cross-subdomain.html/feed</wfw:commentRss><slash:comments>2</slash:comments><description>根据浏览器安全策略，不同域名（比如witmax.cn和www.witmax.cn）、不同协议（比如http://witmax.cn和https://witmax.cn）、不同端口（比如http://witmax.cn和http://witmax.cn:8088）之间的页面不能相互访问，包括XMLHTTPRequest方式和Javascript的页面访问。 有一个例外是：在相同根域、相同协议、相同端口的情况下，可以利用设置document.domain方式来解决不同子域的跨站访问问题。 举个例子，想在witmax.cn中，访问www.witmax.cn域名下的内容，需要以下几步来完成： 在主页面（位于witmax.cn中）通过隐藏的iframe嵌套子页面（内容位于www.witmax.cn） 在主页面中设置document.domain=”witmax.cn”; 在子页面中设置document.domain=”witmax.cn”; 在主页面和子页面中可以相互访问内容了；需要跨域访问其他内容，可以通过在对应页面上发请求完成取回数据然后进行对应操作 P.S. 补充几点： 1、document.domain可以由子域www.witmax.cn修改为主域witmax.cn，而不能由witmax.cn修改为www.witmax.cn（不是所有浏览器都支持）。 2、不同根域、或不同协议、或不同端口之间的跨域访问只能通过服务器断的代理程序来解决了。 3、详细的示例见参考文档： 用document.domain解决Ajax跨子域 用document.domain+iframe实现Ajax跨子域 设置 iframe document.domain杂谈&lt;img src=&quot;http://www1.feedsky.com/t1/596237830/witmax/feedsky/s.gif?r=http://witmax.cn/js-cross-subdomain.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>网页设计</category><category>Javascript</category><pubDate>Sun, 08 Jan 2012 16:46:03 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/js-cross-subdomain.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1890</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/js-cross-subdomain.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/596237830/6370049</fs:itemid></item><item><title>开心网X世界攻防物品统计工具</title><link>http://witmax.cn/x-world-statistics.html</link><content:encoded>&lt;p&gt;针对开心网X世界制作的一个辅助工具，用于统计游戏战斗中攻防模式下所使用的物品，方便玩家了解拥有物品的攻防情况，便于选择更好的装备物品进行收集。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;工具功能：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;统计攻防汇总数据&lt;/li&gt;
&lt;li&gt;统计攻防用到的装备、服饰、交通物品&lt;/li&gt;
&lt;li&gt;保存统计结果为文件&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;工具效果截图：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1884&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 543px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/x-world-statistics.png&quot; rel=&quot;lightbox[result]&quot; title=&quot;统计结果截图&quot;&gt;&lt;img title=&quot;统计结果截图&quot; src=&quot;http://witmax.cn/img/x-world-statistics.png&quot; alt=&quot;统计结果截图&quot; width=&quot;533&quot; height=&quot;591&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;统计结果截图&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;工具用法：&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;在IE或IE内核的浏览器中登陆开心网&lt;/li&gt;
&lt;li&gt;使用同一浏览器打开统计工具的网页文件，点击统计&lt;/li&gt;
&lt;li&gt;点击保存结果可将统计结果保存为文件&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;工具下载：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;点击&lt;a class=&quot;downloadlink&quot; href=&quot;http://witmax.cn/downloads/49&quot; title=&quot;版本：v1.2 已下载1次&quot; target=&quot;_blank&quot;&gt;开心网X世界攻防物品统计工具&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/596237831/witmax/feedsky/s.gif?r=http://witmax.cn/x-world-statistics.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/x-world-statistics.html/feed</wfw:commentRss><slash:comments>2</slash:comments><description>针对开心网X世界制作的一个辅助工具，用于统计游戏战斗中攻防模式下所使用的物品，方便玩家了解拥有物品的攻防情况，便于选择更好的装备物品进行收集。 工具功能： 统计攻防汇总数据 统计攻防用到的装备、服饰、交通物品 保存统计结果为文件 工具效果截图： 工具用法： 在IE或IE内核的浏览器中登陆开心网 使用同一浏览器打开统计工具的网页文件，点击统计 点击保存结果可将统计结果保存为文件 工具下载： 点击&lt;img src=&quot;http://www1.feedsky.com/t1/596237831/witmax/feedsky/s.gif?r=http://witmax.cn/x-world-statistics.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>酷软搜索</category><pubDate>Sun, 08 Jan 2012 14:09:46 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/x-world-statistics.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1884</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/x-world-statistics.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/596237831/6370049</fs:itemid></item><item><title>《HTML5设计原理》笔记</title><link>http://witmax.cn/html5-design-principles-notes.html</link><content:encoded>&lt;p&gt;花了个把小时完整阅读了一遍《HTML5设计原理》，一篇讲HTML5发展历史和设计原理的文章，讲得透彻，做点记录&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;伯斯塔尔法则（Postel’s Law）设计原理&lt;/strong&gt;：&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;发送时要保守；接收时要开放.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt; 发送给浏览器的数据尽量格式严谨；而浏览器接受数据时尽量做到容错，保持开放。&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1874&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML5设计原理&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;HTML5由W3C HTML5工作组与WHATWG工作组（Web Hypertext Applications Technology Working Group）同心协力共同完成，在合作过程中遵循以下设计原理：&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;避免不必要的复杂性：简化代码输入和记忆&lt;/li&gt;
&lt;li&gt;支持已有的内容：考虑到浏览器厂商实现功能时需要向下兼容&lt;/li&gt;
&lt;li&gt;解决现实的问题：如允许将把段落中的文本放在链接里&lt;/li&gt;
&lt;li&gt;求真务实&lt;/li&gt;
&lt;li&gt;平稳退化：渐进增强&lt;/li&gt;
&lt;li&gt;最终用户优先：一旦遇到冲突，最终用户优先，其次是作者，其次是实现者，其次标准制定者，最后才是理论上的完满&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;参考了一些经典的设计原理&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Drupal界面的设计原理：&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;简化最常见的任务，让不常见的任务不至于太麻烦。&lt;/li&gt;
&lt;li&gt;只为80%设计。&lt;/li&gt;
&lt;li&gt;给内容创建者最大的权利。&lt;/li&gt;
&lt;li&gt;默认设置智能化。&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;微格式设计原理：&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;首先为人类设计，其次为机器设计。&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Mozilla的设计原理：&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Internet作为一种公共资源，其运作效率取决于互通性（协议、数据格式、内容）、变革及全球范围内的协作。&lt;br /&gt;
基于透明社区的流程有助于增进协作、义务和信任。&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Web设计原理：&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;大多数人的意见和运行的代码。&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;原文：&lt;a href=&quot;http://www.cn-cuckoo.com/2010/10/21/the-design-of-html5-2151.html&quot; target=&quot;_blank&quot;&gt;HTML5设计原理&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/596237832/witmax/feedsky/s.gif?r=http://witmax.cn/html5-design-principles-notes.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/html5-design-principles-notes.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>花了个把小时完整阅读了一遍《HTML5设计原理》，一篇讲HTML5发展历史和设计原理的文章，讲得透彻，做点记录 伯斯塔尔法则（Postel’s Law）设计原理： 发送时要保守；接收时要开放.  发送给浏览器的数据尽量格式严谨；而浏览器接受数据时尽量做到容错，保持开放。 HTML5设计原理 HTML5由W3C HTML5工作组与WHATWG工作组（Web Hypertext Applications Technology Working Group）同心协力共同完成，在合作过程中遵循以下设计原理： 避免不必要的复杂性：简化代码输入和记忆 支持已有的内容：考虑到浏览器厂商实现功能时需要向下兼容 解决现实的问题：如允许将把段落中的文本放在链接里 求真务实 平稳退化：渐进增强 最终用户优先：一旦遇到冲突，最终用户优先，其次是作者，其次是实现者，其次标准制定者，最后才是理论上的完满 参考了一些经典的设计原理 Drupal界面的设计原理： 简化最常见的任务，让不常见的任务不至于太麻烦。 只为80%设计。 给内容创建者最大的权利。 默认设置智能化。 微格式设计原理： 首先为人类设计，其次为机器设计。 Mozilla的设计原理： Internet作为一种公共资源，其运作效率取决于互通性（协议、数据格式、内容）、变革及全球范围内的协作。 基于透明社区的流程有助于增进协作、义务和信任。 Web设计原理： 大多数人的意见和运行的代码。 原文：HTML5设计原理&lt;img src=&quot;http://www1.feedsky.com/t1/596237832/witmax/feedsky/s.gif?r=http://witmax.cn/html5-design-principles-notes.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>网页设计</category><category>HTML</category><pubDate>Thu, 05 Jan 2012 19:26:06 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/html5-design-principles-notes.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1874</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/html5-design-principles-notes.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/596237832/6370049</fs:itemid></item><item><title>四款简单实用的便签软件试用比较</title><link>http://witmax.cn/four-note-software.html</link><content:encoded>&lt;p&gt;网上到处找各种便签软件，结果没找到相关的比较文章，所以自己来体验了一下百度出来的几款。&lt;/p&gt;
&lt;p&gt;先上软件介绍，后面是我的试用总结。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;小孩桌面便签&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;软件功能：除基本的便签功能外，支持便签分组、定时提醒、便签置顶显示、更换模板&lt;/p&gt;
&lt;p&gt;软件官网：&lt;a href=&quot;http://www.notesmaker.com/bbs&quot;&gt;http://www.notesmaker.com/bbs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-1863&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;软件截图：&lt;/p&gt;
&lt;p&gt;便签显示&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 438px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-xiaohai-1.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;小孩桌面便签界面&quot;&gt;&lt;img title=&quot;小孩桌面便签界面&quot; src=&quot;http://witmax.cn/img/notes-xiaohai-1.png&quot; alt=&quot;小孩桌面便签界面&quot; width=&quot;428&quot; height=&quot;235&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;小孩桌面便签界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;管理器界面&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-xiaohai-2.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;小孩桌面便签管理器界面&quot;&gt;&lt;img title=&quot;小孩桌面便签管理器界面&quot; src=&quot;http://witmax.cn/img/notes-xiaohai-2.png&quot; alt=&quot;小孩桌面便签管理器界面&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;小孩桌面便签管理器界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;PNotes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;软件功能：开源，多语言，功能强大；除基本的便签功能外，还有分组、日程提醒、多样皮肤、同步备份、搜索、加密、收藏、置顶等功能。&lt;/p&gt;
&lt;p&gt;软件官网：&lt;a href=&quot;http://pnotes.sourceforge.net/&quot;&gt;http://pnotes.sourceforge.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;软件截图：&lt;/p&gt;
&lt;p&gt;便签显示&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 475px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-pnotes-1.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;PNotes界面&quot;&gt;&lt;img title=&quot;PNotes界面&quot; src=&quot;http://witmax.cn/img/notes-pnotes-1.png&quot; alt=&quot;PNotes界面&quot; width=&quot;465&quot; height=&quot;233&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;PNotes界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;管理器界面&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-pnotes-2.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;PNotes管理器界面&quot;&gt;&lt;img title=&quot;PNotes管理器界面&quot; src=&quot;http://witmax.cn/img/notes-pnotes-2.png&quot; alt=&quot;PNotes管理器界面&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;PNotes管理器界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Sticker&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;软件功能：除基本的便签功能外，支持便签的鼠标穿透、日程提醒、插入截图，附加了屏幕锁和通讯录功能。&lt;/p&gt;
&lt;p&gt;软件官网：&lt;a href=&quot;http://www.onnow.cn/contents/104/702.html&quot;&gt;http://www.onnow.cn/contents/104/702.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;软件截图：&lt;/p&gt;
&lt;p&gt;便签显示&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 548px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-stiker-1.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;Sticker界面&quot;&gt;&lt;img title=&quot;Sticker界面&quot; src=&quot;http://witmax.cn/img/notes-sticker-1.png&quot; alt=&quot;Sticker界面&quot; width=&quot;538&quot; height=&quot;241&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Sticker界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;管理器界面&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-sticker-2.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;Sticker管理器界面&quot;&gt;&lt;img title=&quot;Sticker管理器界面&quot; src=&quot;http://witmax.cn/img/notes-sticker-2.png&quot; alt=&quot;Sticker管理器界面&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Sticker管理器界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;URNotes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;软件功能：1.28stable版除基本的便签功能外，支持便签分组、便签标题图标、鼠标穿透、便签顶层显示、便签底层显示、日程提醒、内容备份等功能；在1.32beta版之后新增了更换模板、部分文字字体设置等，beta版目前只能在论坛下载&lt;/p&gt;
&lt;p&gt;软件官网：&lt;a href=&quot;http://www.ywliao.com/&quot;&gt;http://www.ywliao.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;软件截图：&lt;/p&gt;
&lt;p&gt;便签显示&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 507px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-urnotes-1.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;URNotes界面&quot;&gt;&lt;img title=&quot;URNotes界面&quot; src=&quot;http://witmax.cn/img/notes-urnotes-1.png&quot; alt=&quot;URNotes界面&quot; width=&quot;497&quot; height=&quot;413&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;URNotes界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;管理器界面&lt;/p&gt;
&lt;div class=&quot;wp-caption aligncenter&quot; style=&quot;width: 510px&quot;&gt;&lt;a href=&quot;http://witmax.cn/img/notes-urnotes-2.png&quot; rel=&quot;lightbox[1863]&quot; title=&quot;URNotes管理器界面&quot;&gt;&lt;img title=&quot;URNotes管理器界面&quot; src=&quot;http://witmax.cn/img/notes-urnotes-2.png&quot; alt=&quot;URNotes管理器界面&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;URNotes管理器界面&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;#####################################################&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;试用点评：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;四款软件都包括了基本的便签功能，能满足最基本便签需求；不同之处主要体现在外观展示、扩展功能及使用体验上的差异。&lt;/p&gt;
&lt;p&gt;外观显示方面，默认情况下PNotes显示效果最好，采用了微软雅黑字体加上合适的行间距和便签背景色，看起来很舒服；扩展的模板功能也能使得外观看起来更不一样。小孩桌面便签其次，默认的模板看起来更像便签，把字体改成微软雅黑后看起来会更舒服些；同样支持模板，但模板不及PNotes美观。Sticker在显示样式不算美观，简单没有修饰，不支持模板。URNotes 1.28版不支持模板，在1.32beta版新增加模板功能。&lt;/p&gt;
&lt;p&gt;扩展功能方面，四款软件除Sticker不支持便签置顶功能外都支持了实用的日程提醒和便签置顶功能。在此之外，PNotes增加了同步备份、搜索、加密、收藏功能，Sticker增加了通讯录和屏幕锁功能，锦上添花。&lt;/p&gt;
&lt;p&gt;使用体验方面，PNotes和URNotes 1.32beta版在便签内容编辑上支持了文字样式，操作方便；Sticker同样支持便签内容文字样式，不过操作界面不太美观；小孩桌面便签和URNotes 1.28版只支持最简单的便签内容编辑，使用起来很简便。但在便签管理和显示方面，URNotes使用上稍显复杂。&lt;/p&gt;
&lt;p&gt;综上所述，最值得推荐的便签软件是PNotes，界面美观，功能强大，基本操作便捷，附加功能操作略显复杂。其次是小孩桌面便签，功能简单，使用简便，界面美观，对于只需要最简单的功能用户来说，小孩桌面便签会是您的最佳选择。从美观程度和操作上来说，个人并不太推荐Sticker和URNotes，不过萝卜青菜各有所爱，大家各取所好吧。喜欢URNotes的朋友建议到官网论坛下1.32beta版，更加美观易用。&lt;/p&gt;
&lt;p&gt;p.s. 在使用小孩桌面便签时遇到了点问题，作者很快做出了反馈，这里表示下感谢，也祝愿软件越做越好。&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/596237833/witmax/feedsky/s.gif?r=http://witmax.cn/four-note-software.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://witmax.cn/four-note-software.html/feed</wfw:commentRss><slash:comments>4</slash:comments><description>网上到处找各种便签软件，结果没找到相关的比较文章，所以自己来体验了一下百度出来的几款。 先上软件介绍，后面是我的试用总结。 小孩桌面便签 软件功能：除基本的便签功能外，支持便签分组、定时提醒、便签置顶显示、更换模板 软件官网：http://www.notesmaker.com/bbs 软件截图： 便签显示 管理器界面 PNotes 软件功能：开源，多语言，功能强大；除基本的便签功能外，还有分组、日程提醒、多样皮肤、同步备份、搜索、加密、收藏、置顶等功能。 软件官网：http://pnotes.sourceforge.net 软件截图： 便签显示 管理器界面 Sticker 软件功能：除基本的便签功能外，支持便签的鼠标穿透、日程提醒、插入截图，附加了屏幕锁和通讯录功能。 软件官网：http://www.onnow.cn/contents/104/702.html 软件截图： 便签显示 管理器界面 URNotes 软件功能：1.28stable版除基本的便签功能外，支持便签分组、便签标题图标、鼠标穿透、便签顶层显示、便签底层显示、日程提醒、内容备份等功能；在1.32beta版之后新增了更换模板、部分文字字体设置等，beta版目前只能在论坛下载 软件官网：http://www.ywliao.com 软件截图： 便签显示 管理器界面 ##################################################### 试用点评： 四款软件都包括了基本的便签功能，能满足最基本便签需求；不同之处主要体现在外观展示、扩展功能及使用体验上的差异。 外观显示方面，默认情况下PNotes显示效果最好，采用了微软雅黑字体加上合适的行间距和便签背景色，看起来很舒服；扩展的模板功能也能使得外观看起来更不一样。小孩桌面便签其次，默认的模板看起来更像便签，把字体改成微软雅黑后看起来会更舒服些；同样支持模板，但模板不及PNotes美观。Sticker在显示样式不算美观，简单没有修饰，不支持模板。URNotes 1.28版不支持模板，在1.32beta版新增加模板功能。 扩展功能方面，四款软件除Sticker不支持便签置顶功能外都支持了实用的日程提醒和便签置顶功能。在此之外，PNotes增加了同步备份、搜索、加密、收藏功能，Sticker增加了通讯录和屏幕锁功能，锦上添花。 使用体验方面，PNotes和URNotes 1.32beta版在便签内容编辑上支持了文字样式，操作方便；Sticker同样支持便签内容文字样式，不过操作界面不太美观；小孩桌面便签和URNotes 1.28版只支持最简单的便签内容编辑，使用起来很简便。但在便签管理和显示方面，URNotes使用上稍显复杂。 综上所述，最值得推荐的便签软件是PNotes，界面美观，功能强大，基本操作便捷，附加功能操作略显复杂。其次是小孩桌面便签，功能简单，使用简便，界面美观，对于只需要最简单的功能用户来说，小孩桌面便签会是您的最佳选择。从美观程度和操作上来说，个人并不太推荐Sticker和URNotes，不过萝卜青菜各有所爱，大家各取所好吧。喜欢URNotes的朋友建议到官网论坛下1.32beta版，更加美观易用。 p.s. 在使用小孩桌面便签时遇到了点问题，作者很快做出了反馈，这里表示下感谢，也祝愿软件越做越好。&lt;img src=&quot;http://www1.feedsky.com/t1/596237833/witmax/feedsky/s.gif?r=http://witmax.cn/four-note-software.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>酷软搜索</category><pubDate>Tue, 03 Jan 2012 00:31:12 +0800</pubDate><author>晴枫</author><comments>http://witmax.cn/four-note-software.html#comments</comments><guid isPermaLink="false">http://witmax.cn/?p=1863</guid><dc:creator>晴枫</dc:creator><fs:srclink>http://witmax.cn/four-note-software.html</fs:srclink><fs:srcfeed>http://witmax.cn/feed</fs:srcfeed><fs:itemid>feedsky/witmax/~8266865/596237833/6370049</fs:itemid></item></channel></rss>
