摘要: 下面是stackoverflow网站上网友针对你看到过的最好的代码注释是什么样的?这个问题给出的回答的前10条:1.// 亲爱的维护者:// 如果你尝试了对这段程序进行‘优化’,// 并认识到这种企图是大错特错,请增加// 下面这个计数器的个数,用来对后来人进行警告:// 浪费在这里的总时间 = 39h2./** * 致终于来到这里的勇敢的人:你是被上帝选中的人,英勇的、不辞劳苦的、不眠不修的来修改我们这最棘手的代码的编程骑士。你,我们的救世主,人中之龙,我要对你说:永远不要放弃,永远不要对自己失望,永远不要逃走,辜负了自己。永远不要哭啼,永远不要说再见。永远不要说谎来伤害自己。 */3.Ex 阅读全文
posted @ 2011-11-28 22:43 琥珀光 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Preloading imagesPreloading images is useful: Instead of loading an image when the user request it, we preload them in the background so they are ready to be displayed. Doing so in jQuery is very simple, as shown below:(function($) { var cache = []; // Arguments are image paths relative to the cur.. 阅读全文
posted @ 2011-11-28 00:30 琥珀光 阅读(179) 评论(0) 推荐(0) 编辑