Ray's playground

 

12 2009 档案

Item 11: Handle assignment to self in operator=(Effective C++)
摘要:Make sure operator= is well-behaved when an object is assigned to itself. Techniques include comparing addresses of source and target objects, careful statement ordering, and copy-and-swap.Make sure... 阅读全文

posted @ 2009-12-27 13:31 Ray Z 阅读(169) 评论(0) 推荐(0)

Item 10: Have assignment operators return a reference to *this(Effective C++)
摘要:Have assignment operators return a reference to *this. 阅读全文

posted @ 2009-12-27 10:31 Ray Z 阅读(179) 评论(0) 推荐(0)

Item 9: Never call virtual functions during construction or destruction(Effective C++)
摘要:Don't call virtual functions during construction or destruction, because such calls will never go to a more derived class than that of the currently executing constructor or destructor. 阅读全文

posted @ 2009-12-27 09:43 Ray Z 阅读(204) 评论(0) 推荐(0)

Item 8: Prevent exceptions from leaving destructors(Effective C++)
摘要:Destructors should never emit exceptions. If functions called in a destructor may throw, the destructor should catch any exceptions, then swallow them or terminate the program.If class clients need ... 阅读全文

posted @ 2009-12-26 15:44 Ray Z 阅读(267) 评论(0) 推荐(0)

Item 7: Declare destructors virtual in polymorphic base classes(Effective C++)
摘要:Polymorphic base classes should declare virtual destructors. If a class has any virtual functions, it should have a virtual destructor.Classes not designed to be base classes or not designed to be use... 阅读全文

posted @ 2009-12-26 13:22 Ray Z 阅读(213) 评论(0) 推荐(0)

Item 6: Explicitly disallow the use of compiler-generated functions you do not want(Effective C++)
摘要:To disallow functionality automatically provided by compilers, declare the corresponding member functions private and give no implementations. Using a base class like Uncopyable is one way to do this. 阅读全文

posted @ 2009-12-26 12:09 Ray Z 阅读(211) 评论(0) 推荐(0)

Python Challenge 3
摘要:http://www.pythonchallenge.com/pc/def/equality.html[代码] 阅读全文

posted @ 2009-12-25 18:16 Ray Z 阅读(253) 评论(0) 推荐(0)

Python Challenge 2
摘要:http://www.pythonchallenge.com/pc/def/ocr.html[代码] 阅读全文

posted @ 2009-12-25 18:02 Ray Z 阅读(224) 评论(0) 推荐(0)

Python Challenge 1
摘要:http://www.pythonchallenge.com/pc/def/map.html1Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1>>>s="gfmncwmsbgblrrpylqjyrcgrzwfylb.rfyrqufy... 阅读全文

posted @ 2009-12-16 21:48 Ray Z 阅读(289) 评论(0) 推荐(0)

My first flex app
摘要:[代码] 阅读全文

posted @ 2009-12-15 22:54 Ray Z 阅读(211) 评论(0) 推荐(0)

Python Challenge 0
摘要:http://www.pythonchallenge.com/pc/def/0.html[代码] 阅读全文

posted @ 2009-12-15 22:08 Ray Z 阅读(174) 评论(0) 推荐(0)

Rule 14: Make Ajax Cacheable(Chapter 14 of High performance Web Sites)
摘要:Make sure your Ajax requests follow the performance guidelines, especially having a far future Expires header. 阅读全文

posted @ 2009-12-14 20:56 Ray Z 阅读(327) 评论(0) 推荐(0)

Rule 13: Configure ETags13(Chapter 13 of High performance Web Sites)
摘要:Entity tags (ETags) are a mechanism that web servers and browsers use to validatecached components.Before jumping into the details of ETags, let’s review how componentsare cached and validated. ... 阅读全文

posted @ 2009-12-14 20:47 Ray Z 阅读(428) 评论(0) 推荐(0)

Rule 12: Remove Duplicate Scripts(Chapter 12 of High performance Web Sites)
摘要:Duplicate Scripts Hurt Performance 阅读全文

posted @ 2009-12-14 20:21 Ray Z 阅读(157) 评论(0) 推荐(0)

Rule 11: Avoid Redirects(Chapter 11 of High performance Web Sites)
摘要:A redirect is used to reroute users from one URL to another.There are different kindsof redirects—301 and 302 are the most popular.Redirects are usually done forHTML documents, but they may also... 阅读全文

posted @ 2009-12-13 13:56 Ray Z 阅读(231) 评论(0) 推荐(1)

Rule 10: Minify JavaScript(Chapter 10 of High performance Web Sites)
摘要:The savings from minifying CSS are typically less than the savings from minifyingJavaScript because CSS generally has fewer comments and less whitespace than Java-Script.The greatest potential for siz... 阅读全文

posted @ 2009-12-12 10:42 Ray Z 阅读(287) 评论(0) 推荐(0)

导航