没有想到很多事情挤到这段时间了,有n多的文档要写或填,还有2个PPT,真是密集的人生啊。参加的商业计划比赛,进入了semi-final,可郁闷的是现在BP都还没有成形,而且时间非常紧,下周一,死定了死定了!得加油!
得狠狠地忙一段时间了,郁闷,这些天忒想写代码,尤其想那种状态:安静的心,安静地写一个下午代码,一抬头已是夕照。sigh~~
没有想到很多事情挤到这段时间了,有n多的文档要写或填,还有2个PPT,真是密集的人生啊。参加的商业计划比赛,进入了semi-final,可郁闷的是现在BP都还没有成形,而且时间非常紧,下周一,死定了死定了!得加油!
得狠狠地忙一段时间了,郁闷,这些天忒想写代码,尤其想那种状态:安静的心,安静地写一个下午代码,一抬头已是夕照。sigh~~
Please do not use the .NET 2.0 HMACSHA512 and HMACSHA384 Classes
http://blogs.msdn.com/shawnfa/archive/2007/01/31/please-do-not-use-the-net-2-0-h
macsha512-and-hmacsha384-classes.aspx
We’ve recently discovered a bug in the HMACSHA512 and HMACSHA384 classes which
shipped in the .NET Framework 2.0.? This bug will cause these algorithms to
produce incorrect results which are not consistent with other implementations
of HMAC-SHA-512 and HMAC-SHA-384.? Unfortunately, we did not discover this bug
until recently, and the shipping .NET Framework 2.0 on all platforms is
affected by it.? The only two affected algorithms are the HMAC-SHA-512 and
HMAC-SHA-384; other HMAC algorithms do produce correct values.
The next service pack to the .NET Framework will contain a fix for this bug,
which will cause the HMACSHA384 and HMACSHA512 classes to produce correct HMAC
values.? However, this will cause their output to be inconsistent with the
output of the unserviced .NET Framework 2.0 classes.? In order to allow
applications running on serviced framework to interact with applications
running on the unserviced version, we will introduce two compatibility switches
in the service pack.
First, both the HMACSHA512 and HMACSHA384 classes will have a new Boolean
property, ProduceLegacyHmacValues.? By setting this property to true, the
object will produce values which match what the unserviced .NET Framework would
have produced.? You should set this property only once after you’ve created
your HMAC object, and you will need to reset your key afterwards:
??? public static void Test()
??? {
??????? HMACSHA512 hmac = new HMACSHA512();
??????? hmac.ProduceLegacyHmacValues = true;
??????? hmac.Key = // … get the hmac key
??????? // …
??????? // use the hmac algorithm
??????? // …
??? }
In order to help applications where it is expensive or impossible to change the
code, we’ve added a new configuration switch for the application’s
.exe.config file which will cause all HMAC objects created within the
application to use the unserviced calculation.
<configuration>
??? <runtime>
??????? <legacyHMACMode enabled=”1″ />
??? </runtime>
</configuration>
Finally, in order to help debug any issues that arise when upgrading to the
service pack, the first time an instance of either class is created, we will
log a warning message to the event log and to any attached debugger.? The
message text (which will hopefully help to point search engine results here as
well) will be:
“This application is using the HMAC-SHA-384 or HMAC-SHA-512 keyed hash
algorithm. The implementation of these algorithms were updated in service pack
1 of .NET Framework 2.0 and by default do not produce results consistent with
the unserviced versions of the classes. For more information about the changes
to the algorithms and how to disable this warning message please see the
release notes for service pack 1.”
This warning will only be produced the first time an instance of either object
is created in a process.? If the configuration switch to enable process-wide
legacy mode is set, then we will suppress the message.? We’ve also provided a
second configuration switch which will let you manually suppress the warning
message for your application.
<configuration>
??? <runtime>
??????? <legacyHMACWarning enabled=”0″ />
??? </runtime>
</configuration>
If you need a replacement class for HMACSHA512 before the next service pack
ships, then you can roll your own relatively easily.? Some code to do this
would look like this:
internal sealed class MyHmacSha512 : System.Security.Cryptography.HMAC
{
??? public MyHmacSha512(byte[] key)
??? {
??????? if (key == null)
??????????? throw new ArgumentNullException(”key”);
??????? HashName = “SHA512″;
??????? HashSizeValue = 512;
??????? BlockSizeValue = 128;
??????? Key = key;
??? }
}
Similarly, a substitute class can be derived for HMACSHA384:
internal sealed class MyHmacSha384 : System.Security.Cryptography.HMAC
{
??? public MyHmacSha384(byte[] key)
??? {
??????? if (key == null)
??????????? throw new ArgumentNullException(”key”);
??????? HashName = “SHA384″;
??????? HashSizeValue = 384;
??????? BlockSizeValue = 128;
??????? Key = key;
??? }
}
This change will start to appear in future CTPs.? Again, I personally, and the
CLR security team in general, are very sorry for any problems this may have
caused in your applications.? Please feel free to ask any questions in the
comments for this post, and I’ll make sure that they get answered as soon as
possible.
昨天是特别的一天,请了很多朋友腐败,一些人都几个月没见过了。昨天,收到很多朋友的祝福。生命有很多感恩,我或许给他们带来很不少麻烦,感谢所有人,感谢我的室友、同学、朋友,还有我在MSRA的mentor风、Xiaolong、Xingrong、Wujie、Leon、Jungang等等等等。
正在晚饭时,忽然手机响了,然后是Hélène特别的笑声,有嘈杂的环境声音中,分明还有其它熟悉的声音,wes?他们给我的,是天外的惊喜:“我们正在聚会,给你庆祝生日。”眼泪哗哗地,挚友真是再远也挂记。又有某人说“今天该你请,完了我们会把帐单寄给你。”额地神呀,顿时双眼就湿润了……他们在那边经常聚会,老开心的,kev一句“遍插茱萸少一人”,又是一阵感动……时光不能倒流啊。
晚上去练习游泳,浑身累散了。
两个消息:一、看来会有第3季;二、第2季在预报共22集,应该4月就结束了。
----------------
3月?? 周二??? 剧名
19集 3月6日? Sweet Caroline
停播? 3月13日 -
20集 3月20日 Panama
21集 3月27日 Fin Del Camino
----------------
顺便贴几个有趣的PB问题:
1.为什么Michael姓Scofield,而Lincoln姓Burrows?
答:Michael是母亲抚养长大的,随母亲的姓,母亲去世后他被寄养给别人。Lincoln则是随父亲的姓。
2.扮演Kim的演员是中国人吗?还是韩国人?
答:Kim的扮演者Reegie Lee,出生于菲律宾Quezon City,位于菲律宾吕宋岛,母语为Tagalog(他加禄语)。关于他的更多介绍可以参看他的官方网站
http://www.reggie-lee.com/index.html
3.Sucre是黑人吗?
答:不是。Sucre是波多黎各移民,属于拉丁人种。
4.Haywire为什么不用睡觉?
答:FOX官方网给出的说明是 has a neuroanatomy lesion which causes profound insomnia as well as diagnosed as schizo-affective with bi-polar tendencies
剧集中的解释是He got a neuroanatomic lesion which affecting his reticular activating system.
http://www.bmcc.com.cn/index/wsyyt/ws10086/
1、我如何查询已定制的SP服务并对不想保留的SP服务进行取消?
答:请您使用本手机编辑短信“0000”到“10086”进行梦网业务查询,编辑“00000”到“10086”可分类别退定所有梦网业务服务。同时您还可登陆我公司网站,在各品牌专区的“网上营业厅”栏目下的“梦网业务查询及退定”功能中进行查询及退定。
http://card.younet.com/forum/reply.php?BoardID=2&AreaID=2&id=634081&page=1
信息服务退订办法
业务类别
操作方法
1、联通在信
发送“114”到5133可以查询定制的联通在信信息服务,发送短信“0000”到服务提供
商的接入码可以退定定制的该服务提供商的全部信息服务;
通过手机拨打10109696,由联通客服人员协助退定联通在信信息服务;
2、互动视界
手机上网,进入“互动视界-已定业务”中,可看到定制过的全部互动视界信息服务,
并可进行退定;
拨打10010客服热线,由联通客服人员协助退定;
3、神奇宝典
使用定制业务时使用的手机和号卡,进入“神奇宝典-功能设置-软件设置”中列出已
经定购的业务菜单,点击该业务后,选择“取消定购”;
拨打10010客服热线,由联通客服人员协助退定;
4、炫铃
进入炫铃网站(ucalling.m165.com)退定:
手机拨打“10156600”电话退定;
拨打10010客服热线,由联通客服人员协助退定;
5、彩e
手机上网,进入“彩e-邮件设置-注册/注销帐号-注销”
手机上网,进入“互动视界-彩e信箱-用户注销”;
拨打10010客服热线,由联通客服人员协助退定。
|
第12条明显是说许知远,呵呵。确实很不喜欢外国名字,不过倒适合不愿透漏隐私的时候使用。在正式的场合,基本上用名字的中文拼音。尤其在某外资公司呆过后,越发珍惜中文名字和其背后的涵义历史。
英国《金融时报》中文网特约撰稿人 吴迪 |
| 2007年3月22日?星期四 |
我有以下这些社会身份:资深媒体人,外企高级经理,心理咨询师,专栏作家,电视节目嘉宾主持及策划,电视情景剧编剧,个个拿出来响当当。其实,我还有个很时髦的身份——海归。
别不信啊,我是如假包换的海归。本人1992年大学毕业,两个月后就去美国了,96年夏天回来的,十年的老海归了!我在美国休士顿呆了四年,那是美国第四大城市,靠石油发家,当年在中国没什么名气,如今因为姚明家喻户晓。我就读于休士顿大学,州立大学,不是名校,混了个商业管理的硕士,很多校友是火箭队的明星。
我到了外地,别人老说”你不像上海人”;我回国,别人老说”你不像海归”。我仔细检讨了一下,我为什么不像海归,原因如下:
唉,算了,我还是不要说我是海归吧。
I’m taking a course named American Society and Culture, taught by a
Mitchell. I attend the class to practise my English. Although?I watch Prison
Break and Desperate Housewives every week, it is different to listen to and speak
English face to face. A tip is that it’s much easy to speak English with native
speakers, and much difficult to do it with others. My experience with some
French speakers can testify it.
On the latest class, Mitchell asked an open question: Why do you always think
US is a young country? Mitchell is very pround of his country, and feels
frustrated that Chinese usually think USA is quite a young country. Here is the
dialog. Michell is the teacher and Frank is me.
?
Mitchell: Why? USA is established more than 300 years ago. But for China, as
far as I know, it was born in 1949.
Frank: Actually, when we say USA or China, we may express two different
concepts. One denotes the culture, which is obviously that China is elder thatn
USA. The other denotes the government, and apparently USA is not younger thatn
China.
Mitchell: Do you think that American culture is very young? Our culture had
developed thousands of years in European.
Frank: Yeah, American culture does has its root in Europe. But, cultures are
what differentiate you from other nations. Therefore, we call it American
culture. We don’t call it European culture. Right?
Mitchell: I don’t have the answer. I have been thining about it. You give me
a new perspective to review the question……
?
At least, both Chinese and American are pround of their cultures. It doesn’t
matter if?the culture young or old. I guess, Mitchell?concerns that young
sometimes visions a picture of teenagers.
几年前,数码相机到500万像素的,已经是很高端消费数码了。更早的时候,是200~300万像素的是主流消费DC。然而,今天的手机已经可以带300~500的相机了,虽然价格还很贵,但是未来价格降下来是必然的趋势。再看消费数码相机,主流的群体价格已经向1000元以内,一路高歌跌进!
而单反相机,则不断推出中低端的型号,如Nikon D40/D40X/D80、Canon 400D/350D等,它们的价格最低的已经要跌破4000元了,而传说D40在D40X大规模上市以后,价格将会稳定在3200左右。
简单地说,带数码相机的手机越来越强大,价格也越来越便宜,而且方便携带,不断压缩中低端消费数码相机的空间;而单反相机的价格也越来越低,而且不断加入一些方便消费型用途家庭用途的设计,压缩高端消费数码相机的空间。结论是,普通消费数码相机可能已经不再有很大增长空间了,虽然它们的用户基础群不会消失。
这些天在写一个程序,需要用到URL Rewriting。在ASP.NET 2.0中有内置的URL Mapping设置,能够满足一部分需求,我基本上就用它了。如果想编写更强大的URL重写,比如支持正则表达式,下面两篇文章应该足够参考了:
1. Tip/Trick: Url Rewriting with ASP.NET
2. A Complete URL Rewriting Solution for ASP.NET 2.0
调试的时候,发现一个问题是Cassini的对URL Rewriting支持的行为和IIS不一样,最大的区别是内置URL Mapping对目录重写的支持,Cassini是支持的,IIS要到Vista中的7.0时才可以~
最新评论