Sends for the fellow dear visitors:welcome to dongpad!


 Welcome to DongPad!

 msn


| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | > >> 预览模式: 普通 | 列表

VS2010 Beta1升级到Beta2?

This Article is Published by Live Writer。

先卸载Beta1吧,是不是很痛苦,更痛苦的是还需要ISO安装文件,Orz。

参见“VS2010 Beta 2 Installed on a Previous Beta 1 System

I had VS2010 Beta 1 installed. WhenBeta 2 came out today, I found I needed to uninstall Beta 1.Here are some things you have to watch out for:

  1. You have to, of course, uninstall any extras installed after the Beta 1 install. This includes MVC, which is now in the boix.
  2. The main uninstall of Beta 1 will ask you for a Beta 1 ISO, which is a real pain. The way to get around this is to do a manual install of the VS2010 TFS Object Model first and then it will be fine
  3. The main uninstall of VS2010 Beta 1 will NOT uninstall all associated stuff
  4. You must uninstall the VS2010 Beta 1 SDK by itself
  5. Myself, and at least two other Tweeters got a complete Beta 2 install but it failed Silverlight 3 install, *even* though the SDK and the developer runtime *were* installed. It seems to notice it but instead of skipping over it, fails that install. I manually uninstalled the two, re-booted, and then did a re-install of Beta 2 but it did not pick up that it now needed the Silverlight 3 install. I went do dir\WCU\silverlight and manually installed the two files after the fact and it was fine. Someone else was able to just do a Repair after, re-boot and be fine.

All in all, pretty smooth given how large Beta 1 and 2 are and how many complicated pieces there are. I never seem to do fresh installs :)

BTW, lots of things have changed in Windows Workflow from Beta 1 to 2. I could not even open the project files. The project types have changed andMatt Winkler has promised me a post on that.

Tags: DongPad

分类:C# | 固定链接 |评论: 1| 引用: 0 | 查看次数: 1515 | 返回顶部

要小心!

This Article is Published by Live Writer。

今天竟然追尾了,Orz!要小心小心再小心!

Tags: DongPad

分类:Life | 固定链接 |评论: 0| 引用: 0 | 查看次数: 1012 | 返回顶部

七个心理寓言

This Article is Published by Live Writer。

(一)成长的寓言:做一棵永远成长的苹果树
    一棵苹果树,终于结果了。
    第一年,它结了10个苹果,9个被拿走,自己得到1个。对此,苹果树愤愤不平,于是自断经脉,拒绝成长。第二年,它结了5个苹果,4个被拿走,自己得到1个。“哈哈,去年我得到了10%,今年得到20%!翻了一番。”这棵苹果树心理平衡了。
    但是,它还可以这样:继续成长。譬如,第二年,它结了100个果子,被拿走90个,自己得到10个。
    很可能,它被拿走99个,自己得到1个。但没关系,它还可以继续成长,第三年结1000个果子……
    其实,得到多少果子不是最重要的。最重要的是,苹果树在成长!等苹果树长成参天大树的时候,那些曾阻碍它成长的力量都会微弱到可以忽略。真的,不要太在乎果子,成长是最重要的。

(二)动机的寓言:孩子在为谁而玩
    一群孩子在一位老人家门前嬉闹,叫声连天。几天过去,老人难以忍受。
    于是,他出来给了每个孩子25美分,对他们说:“你们让这儿变得很热闹,我觉得自己年轻了不少,这点钱表示谢意。”
    孩子们很高兴,第二天仍然来了,一如既往地嬉闹。老人再出来,给了每个孩子15美分。他解释说,自己没有收入,只能少给一些。15美分也还可以吧,孩子仍然兴高采烈地走了。
    第三天,老人只给了每个孩子5美分。
    孩子们勃然大怒,“一天才5美分,知不知道我们多辛苦!”他们向老人发誓,他们再也不会为他玩了!

(三)规划的寓言:把一张纸折叠51
    想象一下,你手里有一张足够大的白纸。现在,你的任务是,把它折叠51次。那么,它有多高?
    一个冰箱?一层楼?或者一栋摩天大厦那么高?不是,差太多了,这个厚度超过了地球和太阳之间的距离。

(四)逃避的寓言:小猫逃开影子的招数
    “影子真讨厌!”小猫汤姆和托比都这样想,“我们一定要摆脱它。”
    然而,无论走到哪里,汤姆和托比发现,只要一出现阳光,它们就会看到令它们抓狂的自己的影子。
    不过,汤姆和托比最后终于都找到了各自的解决办法。汤姆的方法是,永远闭着眼睛。托比的办法则是,永远待在其他东西的阴影里。

(五)行动的寓言———螃蟹、猫头鹰和蝙蝠
螃蟹、猫头鹰和蝙蝠去上恶习补习班。数年过后,它们都顺利毕业并获得博士学位。不过,螃蟹仍横行,猫头鹰仍白天睡觉晚上活动,蝙蝠仍倒悬。

(六)放弃的寓言:蜜蜂与鲜花
玫瑰花枯萎了,蜜蜂仍拼命吮吸,因为它以前从这朵花上吮吸过甜蜜。但是,现在在这朵花上,蜜蜂吮吸的是毒汁。
蜜蜂知道这一点,因为毒汁苦涩,与以前的味道是天壤之别。于是,蜜蜂愤不过,它吸一口就抬起头来向整个世界抱怨,为什么味道变了?!
终于有一天,不知道是什么原因,蜜蜂振动翅膀,飞高了一点。这时,它发现,枯萎的玫瑰花周围,处处是鲜花。

(七)亲密的寓言:独一无二的玫瑰
    小王子有一个小小的星球,星球上忽然绽放了一朵娇艳的玫瑰花。以前,这个星球上只有一些无名的小花,小王子从来没有见过这么美丽的花,他爱上这朵玫瑰,细心地呵护她。
    那一段日子,他以为,这是一朵人世间唯一的花,只有他的星球上才有,其他的地方都不存在。
    然而,等他来到地球上,发现仅仅一个花园里就有5000朵完全一样的这种花朵。这时,他才知道,他有的只是一朵普通的花。
    一开始,这个发现,让小王子非常伤心。但最后,小王子明白,尽管世界上有无数朵玫瑰花,但他的星球上那朵,仍然是独一无二的,因为那朵玫瑰花,他浇灌过,给她罩过花罩,用屏风保护过,除过她身上的毛虫,还倾听过她的怨艾和自诩,聆听过她的沉默……一句话,他驯服了她,她也驯服了他,她是他独一无二的玫瑰。
    “正因为你为你的玫瑰花费了时间,这才使你的玫瑰变得如此重要。”一只被小王子驯服的狐狸对他说。

你能品出其中的寓意吗@_@点击这里查看相关点评

Tags: DongPad

分类:Life | 固定链接 |评论: 0| 引用: 0 | 查看次数: 872 | 返回顶部

如何不用翻墙访问wordpress.com

This Article is Published by Live Writer。

gfw

很奇怪,我们可以访问www.wordpress.com的网站,但是一旦建立了博客,用xxx.wordpress.com想访问自己的blog却是找不到服务器了。

其实我们ping下www.wordpress.com和xxx.wordpress.com就能发现不同的结果.

 1.C:Documents and SettingsAdministrator>ping www.wordpress.com

2.Pinging wordpress.com [76.74.254.126] with 32bytes of data:

3.Reply from 76.74.254.126: bytes=32 time=242ms TTL=49

4.Reply from 76.74.254.126: bytes=32 time=238ms TTL=49

5.Reply from 76.74.254.126: bytes=32 time=238ms TTL=49

6.Reply from 76.74.254.126: bytes=32 time=241ms TTL=49

而我们ping xxx.wordpress.com的结果却是

 1.C:Documents and SettingsAdministrator>ping zauc.wordpress.com

2.Pinging lb.wordpress.com [72.233.2.58] with 32bytes of data:

3.Request timed out.

4.Request timed out.

5.Request timed out.

6.Request timed out.

所以我们可以很容易发现自己单独域名的博客会全部会转到lb.wordpress.com这个域名下。但是这个IP明显是被GFW给屏蔽掉了。但是看这个域名就知道这个只是前端负载均衡设备的IP。但是其实一般真实设备的IP一般都是在这个真实IP的周围。

1.C:Documents and SettingsAdministrator>ping 72.233.2.59

2.Pinging 72.233.2.59 with 32 bytes of data:

3.Request timed out.

4.Ping statistics for 72.233.2.59:

5.Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),

6.Control-C

7.^C

8.C:Documents and SettingsAdministrator>ping 72.233.2.57

9.Pinging 72.233.2.57 with 32 bytes of data:

10.Reply from 72.233.2.57: bytes=32 time=226ms TTL=43

11.Reply from 72.233.2.57: bytes=32 time=226ms TTL=43

12.Reply from 72.233.2.57: bytes=32 time=227ms TTL=43

13.Reply from 72.233.2.57: bytes=32 time=227ms TTL=43

14.Ping statistics for 72.233.2.57:

15.Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

16.Approximate round trip times in milli-seconds:

17.Minimum = 226ms, Maximum = 227ms, Average = 226ms

找到可以PING通的IP了,windows系统指需要用记事本修改以下文件,指定下Hosts就可以了。

1.C:\WINDOWS\system32\drivers\etc\hosts

2.72.233.2.57 zauc.wordpress.com

那以后不需要使用代理服务器来访问自己的BLOG了。


Tags: DongPad GFW

分类:Life | 固定链接 |评论: 1| 引用: 0 | 查看次数: 1599 | 返回顶部

婚礼上的一百元

This Article is Published by Live Writer。

前日去参加一个婚礼、当牧师证婚词中用一张一百元纸钞作了个比喻,我自己听了,想跟大家分享一下。

牧师手持(里拿)一张新的百元钞票举起问大家,谁想要?

没人出声。

牧师又说不要怕羞,真的,谁想要就举手啦 ~~~

全场大约三分之一的人举手,牧师又将这张百元新钞揉成一团,再打开问现在还有谁想要?

仍然有人举手,但少了差不多一倍,牧师再将这张纸钞放在地上用力踩了几下,再捡起来打开,问大家那这样还有人要吗?

全场只有三、四个人举手。

牧师请了一位男士上台,把一百元给了这位男士,说这位男士是三次都举手的,当全场大笑时,牧师示意大家安静,并向新郎说你今天迎娶的这位心爱的女士,就如同一张新版的百元钞票,岁月加上辛劳,就如同残破的一百元钞票一样,令起初宠爱的人,变了心,事实上,这张一百元钞票仍然是一百元,它的价值全没有改变的,希望你可以像这位男士一样,懂得真正的价值和意义, 不要让外表带领你走人生路!

这个故事虽短,但当中却颇有启发。

以上数据由呵呵笑话网提供

Tags: DongPad

分类:Life | 固定链接 |评论: 0| 引用: 0 | 查看次数: 937 | 返回顶部

Difference between StaticResource and DynamicResource in WPF

This Article is Published by Live Writer。

A StaticResource will be resolved and assigned to the property during the loading of the XAML which occurs before the application is actually run. It will only be assigned once and any changes to resource dictionary ignored.

A DynamicResource assigns an Expression object to the property during loading but does not actually lookup the resource until runtime when the Expression object is asked for the value. This defers looking up the resource until it is needed at runtime. A good example would be a forward reference to a resource defined later on in the XAML. Another example is a resource that will not even exist until runtime. It will update the target if the source resource dictionary is changed.

from stackoverflow.com by Phil Wright

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 1086 | 返回顶部

Quote of the Day:Get Started!

This Article is Published by Live Writer。

“It's the job that's never started that takes the longest to finish.” - J.R.R. Tolkien

Tags: DongPad

分类:Life | 固定链接 |评论: 0| 引用: 0 | 查看次数: 1019 | 返回顶部

ZT-Silverlight Documentation Refresh

This Article is Published by Live Writer。

The documentation for a published product periodically receives corrections and bug fixes in a refresh update that publishes many of the changes at once. On occasion there may even be new content added that was produced since the last release.

Silverlight 3 recently had a documentation refresh to fix bugs, but what I noticed first was that an offline documentation collection was being kept in sync with the changes to the MSDN documentation. I like having an offline copy of the documentation because of the speed and responsiveness when browsing through the documentation locally.

Here's the documentation collection for Silverlight 3 compiled into a help file if you also like having access to documentation offline.

from:Nicholas Allen's Indigo Blog


Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 935 | 返回顶部

Net体系结构图

This Article is Published by Live Writer。

image

原文地址

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 1298 | 返回顶部

Applications = Code + Markup读书笔记(2)

This Article is Published by Live Writer。

1.由RGB三原色组成的颜色空间也叫sRGB颜色空间,sRGB空间将显示点阵图像的做法正式化
The RGB color space implied by byte values of red, green, and blue primaries is sometimes

known as the sRGB color space, where s stands for standard. The sRGB space formalizes

common practices in displaying bitmapped images from scanners and digital cameras on

computer monitors. When used to display colors on the video display, the values of the sRGB

primaries are generally directly proportional to the voltages of the electrical signals

sent from the video display board to the monitor.

2.引入了scRGB的概念,也被称为sRGB64
关于scRGB的Wikipedia: http://en.wikipedia.org/wiki/ScRGB

3.sRGB三原色存储类型为byte,scRGB三原色存储类型为float,由于scRGB可以大于1或小于0,所以scRGB颜

色空间更大

4.Brush体系结构
Object
└─DispatcherObject (abstract)
   └─DependencyObject
      └─Freezable (abstract)
         └─Animatable (abstract)
            └─Brush (abstract)
               ├─GradientBrush (abstract)
               │ ├─LinearGradientBrush
               │ └─RadialGradientBrush
               │
               ├─SolidColorBrush
               │
               └─TileBrush (abstract)
                  ├─DrawingBrush
                  ├─ImageBrush
                  └─VisualBrush

5.关于Brush的动态事件机制,如上结构图,Brush继承自Freezable,而Freezable实现了changed事件,所以

只要Brush改变,都会通知事件的订阅者,该示例中就是通知Window来重绘窗体了,这一点需要和Winform进

行区分,Winform中除非人为处理,否则更改颜色不会触发窗体绘制
Obviously somebody is redrawing the client area every time the brush changes, but it's all

happening behind the scenes. This dynamic response is possible because Brush derives from

the Freezable class, which implements an event named Changed. This event is fired whenever

any changes are made to the Brush object, and this is how the background can be redrawn

whenever a change occurs in the brush.

This Changed event and similar mechanisms are used extensively behind the scenes in the

implementation of animation and other features in the Windows Presentation Foundation.

6.Brushes.PaleGoldenrod和new SolidColorBrush(Colors.PaleGoldenrod)虽然得到的是相同的brush,

但是在使用的时候要考虑到前者不允许被修改,因为前者是一个静态只读属性,还需要注意到Frozen的相关概念
The SolidColorBrush objects returned from the Brushes class are in a frozen state, which

means they can no longer be altered

7.LinearGradientBrush及RadialGradientBrush的一些属性和示例应用

活学活用,切勿读死书 @_@

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 961 | 返回顶部
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | > >>