<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[clingingboy的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/clingingboy</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; clingingboy]]></copyright><item><title><![CDATA[属性,构造函数,枚举]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5662733</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5662733</guid><author>clingingboy</author><pubDate>Thu, 10 Jun 2010 23:08:00 +0800</pubDate><description><![CDATA[<br /><br />如下示例类public class People
{
    public bool View { get; set; }

    public bool Create { get; set; }

    public bool Edit { get; set; }

    public bool Delete { get; set; }
}<br /><br />1.以属性填充方式进行<br />public void Test1()
{
    Peo]]></description><category></category></item><item><title><![CDATA[.net 4.0新特性-CountDownEvent]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5662734</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5662734</guid><author>clingingboy</author><pubDate>Thu, 10 Jun 2010 12:08:00 +0800</pubDate><description><![CDATA[<br />也称为反Semaphore 作用:统计其他线程结束工作,监听计数为0时,触发操作.<br />与Semaphore形成对比,Semaphore有最大资源数,当计数为0时(即资源不够用时)则阻塞线程<br />1.Semaphore<br />初始化时,资源为0,调用Release方法释放资源using System;
using System.Threading;

public class Example
{
    // A semaphore that simulates a l]]></description><category></category></item><item><title><![CDATA[.net 4.0新特性-自旋锁(SpinLock)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5662735</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5662735</guid><author>clingingboy</author><pubDate>Thu, 10 Jun 2010 10:08:00 +0800</pubDate><description><![CDATA[<br />概念:<br />http://baike.baidu.com/view/1250961.htm?fr=ala0_1_1<br />http://blog.youkuaiyun.com/wzhwho/archive/2009/05/15/4190090.aspx<br />参考:<br />http://msdn.microsoft.com/zh-cn/library/dd460716.aspx<br />http://www.cnblogs.com/lengleng3898/archive/2010/04]]></description><category></category></item><item><title><![CDATA[.net 4.0新特性-延迟初始化:Lazy(转),ThreadLocal&lt;T&gt;]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5659806</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5659806</guid><author>clingingboy</author><pubDate>Wed, 09 Jun 2010 22:09:00 +0800</pubDate><description><![CDATA[<br />感谢作者<br />http://www.cnblogs.com/anytao/archive/2009/10/29/must_net_33.html<br />http://www.cnblogs.com/me-sa/archive/2010/05/25/lazy-initialization-fx4.html<br />.net也有ThreadLocal了<br />http://www.cnblogs.com/tmrcp/archive/2009/07/17/1525506.html<br]]></description><category></category></item><item><title><![CDATA[.net 4.0新特性-并行编程(转)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5659807</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5659807</guid><author>clingingboy</author><pubDate>Wed, 09 Jun 2010 19:09:00 +0800</pubDate><description><![CDATA[<br />感谢作者，辛苦:)<br />.NET 4 并行（多核）编程系列之一入门介绍<br />.NET 4 并行（多核）编程系列之二 从Task开始<br />.NET 4 并行（多核）编程系列之三 从Task的取消<br />.NET 4 并行（多核）编程系列之四 Task的休眠<br />.NET 并行(多核)编程系列之五 Task执行和异常处理]]></description><category></category></item><item><title><![CDATA[.net 4.0新特性-tuple]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5659808</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5659808</guid><author>clingingboy</author><pubDate>Wed, 09 Jun 2010 17:09:00 +0800</pubDate><description><![CDATA[<br />功能:动态返回数据结构,可当临时数据结构class Program
{
    static void Main(string[] args)
    {
        //Before
        new People() {Name = "Terry", Age = 24};
        //Now,Create Dynamic struct
        var data = Tuple.Create("Terry", 24);
    }
}
public]]></description><category></category></item><item><title><![CDATA[Win32 Api(显示程序系统菜单)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5605980</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5605980</guid><author>clingingboy</author><pubDate>Tue, 18 May 2010 14:09:00 +0800</pubDate><description><![CDATA[		 即在程序标题栏上右键时弹出的菜单此菜单会根据窗体的状态而不同,如最大化状态时则如上图1.GetSystemMenuThe GetSystemMenu function allows the application to access the window menu (also known as the system menu or the control menu) for copyin]]></description><category></category></item><item><title><![CDATA[WPF技巧(5)元素的加载与卸载(Loaded and Unloaded)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5602418</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5602418</guid><author>clingingboy</author><pubDate>Mon, 17 May 2010 12:08:00 +0800</pubDate><description><![CDATA[		    FrameworkElement有两个初始化和一个卸载事件  还是以代码来示例一.Initialized触发条件(元素拥有容器,并初始化)当元素实例化以后并被加入到逻辑树中时会触发此事件,此事件可以获取到元素的初始值public Demo1(){    InitializeComponent();    panel = new StackPanel();    Bu]]></description><category></category></item><item><title><![CDATA[如何用PV原语实现进程间的互斥与同步(转载)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5596436</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5596436</guid><author>clingingboy</author><pubDate>Sat, 15 May 2010 18:07:00 +0800</pubDate><description><![CDATA[		  PV原语的含义　　P操作和V操作是不可中断的程序段，称为原语。PV原语及信号量的概念都是由荷兰科学家E.W.Dijkstra提出的。信号量sem是一整数，sem大于等于零时代表可供并发进程使用的资源实体数，但sem小于零时则表示正在等待使用临界区的进程数。　　P原语操作的动作是：　　（1）sem减1；　　（2）若sem减1后仍大于或等于零，则进程继续执行；　　（3）若sem减1后小于零]]></description><category></category></item><item><title><![CDATA[读写锁操作(ReaderWriterLockSlim)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5588872</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5588872</guid><author>clingingboy</author><pubDate>Thu, 13 May 2010 15:09:00 +0800</pubDate><description><![CDATA[		     (1)static void WriterMethod(object writer){    Console.WriteLine("Writer {0} acquired the lock", writer);    for (int i = 0; i < items.Count; i++)    {        items[i]++;        C]]></description><category></category></item><item><title><![CDATA[非递归遍历]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5588873</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5588873</guid><author>clingingboy</author><pubDate>Thu, 13 May 2010 13:09:00 +0800</pubDate><description><![CDATA[		class Program{    static void Main(string[] args)    {    }        //TreeNode node1 = new TreeNode();        //node1.Name = "a";        //IList list = new List();        //for ]]></description><category></category></item><item><title><![CDATA[WPF技巧(4)使用Visual元素]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5568687</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5568687</guid><author>clingingboy</author><pubDate>Fri, 07 May 2010 15:09:00 +0800</pubDate><description><![CDATA[		     Visual继承自DependencyObject,属于WPF所有控件类的基类,其大多数以Visual开头的属性均受保护. Visual无法直接使用,可以看到Panel添加的元素最低级别为UIElement. 添加Visual对象必须使用AddVisualChild方法等一系列方法,(与FrameworkElement区分开来)]]></description><category></category></item><item><title><![CDATA[WPF技巧(3)监测属性变更]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5568688</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5568688</guid><author>clingingboy</author><pubDate>Fri, 07 May 2010 14:09:00 +0800</pubDate><description><![CDATA[		public Window1(){    InitializeComponent();    this.TargetUpdated += new EventHandlerDataTransferEventArgs>(Window1_TargetUpdated);    this.SourceUpdated += new EventHandlerDataTransferEve]]></description><category></category></item><item><title><![CDATA[WPF技巧(2)绑定到附加属性]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5568690</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5568690</guid><author>clingingboy</author><pubDate>Fri, 07 May 2010 11:09:00 +0800</pubDate><description><![CDATA[		Button Content="{Binding Path=(DockPanel.Dock),ElementName=Element_ListBox,Mode=TwoWay}"> 是可以绑定附加属性的,记得给两侧加括号]]></description><category></category></item><item><title><![CDATA[WPF技巧(1)异步绑定]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5532046</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5532046</guid><author>clingingboy</author><pubDate>Mon, 26 Apr 2010 22:07:00 +0800</pubDate><description><![CDATA[		    与大家共勉 当属性值填充好后,与该属性绑定的界面才会开始加载(属性绑定优于控件加载) 这个技巧很简单,但却影响着运行的速度.以下为测试 1.定义一个集合属性private IListstring> _list;public IListstring> List{    get    {        if (_list == null)        { ]]></description><category></category></item><item><title><![CDATA[wpf单容器中的Chrome]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5501848</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5501848</guid><author>clingingboy</author><pubDate>Wed, 07 Apr 2010 12:56:00 +0800</pubDate><description><![CDATA[		Chrome有点类似于用GDI+画图一般,除了模板,也可以使用DrawingContext对象来画图. WPF内置的很多控件都是如此实现的,虽然麻烦了一些,可能是为了提升性能考虑. 其方式与定义样式模板差不多,只不过换成代码形式了. 1.先定义控件不同状态下的颜色,如private static SolidColorBrush CommonDisabledBackgroundOverlay]]></description><category></category></item><item><title><![CDATA[wpf 控件开发基础(6) -单一容器(Decorator)]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5501849</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5501849</guid><author>clingingboy</author><pubDate>Tue, 06 Apr 2010 23:56:00 +0800</pubDate><description><![CDATA[		   其实这部分的文章已经很多了,写下来方便自己查询. wpf内置提供了很多容器(Panel),容器分为多容器和单容器.下面介绍单容器.内置的单容器,大家最熟悉的如Border,其作用用于装饰容器内的元素,单一容器继承自Decorator,下面来看一个未使用装饰器的例子.  Window x:Class="WPFControlTutorialPart6_WPFApp.Window1" ]]></description><category></category></item><item><title><![CDATA[中序线索二叉树算法]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5501850</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5501850</guid><author>clingingboy</author><pubDate>Wed, 31 Mar 2010 13:56:00 +0800</pubDate><description><![CDATA[		参考:http://www.cnblogs.com/yuchen198112/archive/2007/01/02/610058.html   理解下面两句话 （1）若上次访问到的结点的右指针为空，则将当前访问到的结点序号填入，并置右标志为1。（2）若当前访问到的结点的左指针为空，则将上次访问到的结点序号填入，并置左标志为1。 先将中序列算出来 DBHEIAFCG 先理解第一句话 1.若上]]></description><category></category></item><item><title><![CDATA[nhibernate 抓取策略]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5383731</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5383731</guid><author>clingingboy</author><pubDate>Mon, 15 Mar 2010 11:08:00 +0800</pubDate><description><![CDATA[		三种方式   1. 默认策略 select,即默认的延迟加载,一条一条的取(记得设置lazy为ture,不然很惨,有几条数据就会执行几条sql语句)   2.join 连接表,一句话搞定,但速度慢   3.subselected子表查询,使用in来查询   4.batch-size 批次抓取  即一次自定语取一定数据 ]]></description><category></category></item><item><title><![CDATA[Caliburn v2 变更-Presenter-&gt;Screen]]></title><link>https://blog.youkuaiyun.com/clingingboy/article/details/5358497</link><guid>https://blog.youkuaiyun.com/clingingboy/article/details/5358497</guid><author>clingingboy</author><pubDate>Mon, 08 Mar 2010 15:08:00 +0800</pubDate><description><![CDATA[		    这个变动影响全局(作者就是很喜欢改名字…后面还有)参考此http://www.cnblogs.com/Clingingboy/archive/2009/12/28/1634054.html      原命名空间Caliburn.PresentationFramework.ApplicationModel 现命名空间Caliburn.PresentationFramework.Scr]]></description><category></category></item></channel></rss>