万兽猫最高

老猫伏地,志在吃鱼。
随笔 - 95, 评论 - 560, 引用 - 8

导航

关于

猫年快乐

 

标签

每月存档

最新留言

广告

C# Performance Quiz

Considering these three options:

Option 1:

sw.WriteLine(subject + ": " + message);

Option 2:

sw.WriteLine("{0}: {1}", subject, message);

Option 3:

sw.Write(subject);
sw.Write(": ");
sw.WriteLine(message);

Answer these questions:

Q1. Which of these choices offers the best performance?
Q2: Can you characterize the memory usage of each of these?
Q3: Which would the performance team generally recommend, and why?
Q4: What special factors might alter this recommendation?
Q5: What did you have do assume about "sw" to answer the question?

Eric Gunnerson 的blog 链接过去的,原文在这里

看之前,自己先想想吧,那家伙的问题后面紧跟着他的答案的说,而我不幸是从后往前看的 吐舌笑脸

感觉Q1回答起来应该不算困难。后面几个....

呵呵

 

posted on 2004-03-17 12:15:00 by zee  评论(3) 阅读(1885)

My H1B Visa Issued yesterday

      昨天去面试的,运气比较好,碰到了一个手很松的VO,准备的材料什么也没有用上,花了几Mins 问了我2个Question 就Pass了。
     预计4月初左右去米国,工作地点是在LA,各位朝圣的同志如果有去LA 玩的,也许咱们能碰上。  :)

posted on 2004-03-12 11:32:00 by zee  评论(19) 阅读(2063)

Good news

不仅仅对MS是好消息。

Eolas专利被认定无效 微软或可免5亿美元赔偿

 

posted on 2004-03-06 17:24:00 by zee  评论(3) 阅读(1387)

Interesting Xml Namespace in .Net

 你们猜这段代码的执行结果是 True Or False?

   System.Xml.XmlDocument doc = new XmlDocument();
   doc.LoadXml("<root><a/></root>");
   System.Xml.XmlNamespaceManager nsm = new XmlNamespaceManager(doc.NameTable);
   nsm.AddNamespace("a","DAV");
   MessageBox.Show(nsm.HasNamespace("a").ToString());

posted on 2004-03-06 17:05:00 by zee  评论(2) 阅读(1380)

Exchange SDK bug?

    现在手头的项目,一直没有写用WebDAV的MKCOL 在Exchange 2K里创建Folder的方法,现在要用上了,今天准备补上。

   照SDK里的Sample,Create了一个如下的Request:

MKCOL /pub2/folder1/folder2/ HTTP/1.1
Host: hostname
Content-Type: text/xml
Content-Length: XXX

<?xml version="1.0"?>
<g:propertyupdate xmlns:g="DAV:" >
    <g:set>
        <g:prop>
            <g:displayname>value</g:displayname>
        </g:prop>
        <g:prop>
            <f:myprop xmlns:f="urn:schemas-mydomain-tld:">Test</f:myprop>
        </g:prop>
    </g:set>
</g:propertyupdate>

但是却没有得到预期的Http Status 201 Created,Response Status Code 是 403 Forbidden

研究了半天,才发现原因是不能在MKCOL的时候设置DAV:displayname 属性,顺手换了个属性,改成:


<?xml version="1.0"?>
<a:propertyupdate xmlns:a="DAV:" xmlns:b="urn:schemas:exchange:solutions:MySolution:">
 <a:set>
  <a:prop>
   <b:title>MySolution</b:title>
  </a:prop>
 </a:set>
</a:propertyupdate>

就OK了。

难道Exchange SDK里的Sample 是没有经过测试的?奇怪的说。

 

posted on 2004-03-04 16:49:00 by zee  评论(4) 阅读(1586)

帮飞鸟吱一声:Dev-Club Site 迁移中

Now, We need use http://202.101.18.235 to visit it. and, Good luck for 豆腐,希望他明天面试顺利。

posted on 2004-03-03 13:28:00 by zee  评论(6) 阅读(1352)

Powered by: Joycode.MVC引擎 0.5.2.0