昨天听了Phil Haack在PDC2008上面的Session: ASP.NET MVC: A New Framework for Building Web Applications,获益匪浅,开始关注MVC的东西(有点儿太后知后觉了,呵呵 )。其间Haack一直focus在一个站点上,,个人甚是感兴趣,并且它的作者Jeff Atwood竟然是甚是喜欢的CoddingHorror的博主,真是喜出望外。

Stack Overflow is a programming Q & A site that's free. Free to ask questions, free to answer questions, free to read, free to index, built with plain old HTML, no fake rot13 text on the home page, no scammy google-cloaking tactics, no salespeople, no JavaScript windows dropping down in front of the answer asking for $12.95 to go away. You can register if you want to collect karma and win valuable flair that will appear next to your name, but otherwise, it's just free. And fast. Very, very fast.

Stack Overflow是一个专注于“编程知识QA”的站点。就像是网站的介绍,非常简单的想法,简单的网站,快速的响应,简单地注册,自由问问题,没有那么多废话跟矫情。我也废话少说,去看一下吧。

顺便提一下,在国内有一个山寨版,名为Chagel曾经发过一篇“你可能不知道的C#语言特性”,他介绍说其主要分类整理于此篇提问。对应的在Stack Overflow上面也有一篇相对应"”Hidden Features of C#”,很不错。

posted @ 2009-02-19 15:43 PureEviL 阅读(29) | 评论 (0)编辑

题目: 有时候大家会很奇怪,为啥电话的键盘上会有ABC...这样的字母,尤其是在手机诞生之前就已经存在了。其实这些字母除了再发短信时有用,还有另一个作用是使电话号码容易记忆,这在美国比较的流行,比如拨打310-GINO便可向GINO订购比萨,其中GINO对应的就是4466。GINO_PIZZA

哈,好玩吧。现在问题是这样的给定一个电话号码,比如123-4567或12345678,问其所有的字母组合。

比如:给定23,所有组合就是ad, ae, af, bd, be, bf, cd, ce, cf。

571px-Telephone-keypad2.svg

解答:

自己写了个递归实现。

大体思想是:

1. 建一个Mapping表,用于查找数字对应的字符。

2. 如果是一个数字,返回所有可能性的组合。

3. 如果多个数字,返回最后一个数字对应的组合跟前面已生产的字符串进行组合(笛卡尔乘积)

我的递归实现

等有时间写个非递归实现。

posted @ 2009-02-18 18:33 PureEviL 阅读(105) | 评论 (0)编辑
     摘要: This is a little trick picked up from book "Prctical Javascript DOM Scripting and Ajax Projects".  阅读全文
posted @ 2007-09-24 16:34 PureEviL 阅读(28) | 评论 (0)编辑

Stuff about IE7: new feature, incompatibility, Bug etc. (Updating...)
1. IE7 newly supports the 'title' attribute of select and option

<select title="I'm a select">
  
<option title="I'm option 1">option 1</option1>
  
<option title="I'm option 2">option 2</option1>
  
<option title="I'm option 3">option 3</option1>
</select>

   Demo: Please review in IE 7
2.Div can now mark onto a select control. IE6- doesn't.
3.Newly support position:fixed.
4.Star html selector hack(bug) is fixed in IE7. star html hack (Tan hack)
    

posted @ 2007-04-27 14:56 PureEviL 阅读(46) | 评论 (0)编辑
     摘要: Javascript Tips
1.判断一个object的类型
2. javascript中的字符串连接  阅读全文
posted @ 2007-04-11 19:23 PureEviL 阅读(72) | 评论 (0)编辑
     摘要: ASP.NET 2.0 life cycle  阅读全文
posted @ 2007-04-09 09:41 PureEviL 阅读(134) | 评论 (1)编辑
innerText 跟 innerHTML是两个非DOM标准的方法
其区别如图所示:
(图中应该为innerText)


在IE中 innerText 跟 inner HTML 两个方法都能正常运行

但是FF里面的innerText不可用,但是有一个替代方法: textContent

IE: oDiv.innerText = aString; oDiv.innerHTML = aString;
FF: oDiv.textContent = aString; oDiv.innerHTML = aString;

Ajax in action 的作者之一Eric 用正则表达式 实现了 一个兼容方法,比较有趣
Hope this helps

http://radio.javaranch.com/pascarello/2005/01/14/1105721395000.html
posted @ 2007-04-05 11:27 PureEviL 阅读(236) | 评论 (0)编辑
     摘要: 切换鼠标左右键的小程序  阅读全文
posted @ 2007-04-04 17:19 PureEviL 阅读(116) | 评论 (0)编辑
     摘要: 实现多个版本IE共存  阅读全文
posted @ 2007-04-04 13:47 PureEviL 阅读(371) | 评论 (6)编辑

近来用MS的网络,终于可以访问Wikipedia了。。。

前日搜索AVL树, 在Wiki找到不错的解释
http://zh.wikipedia.org/wiki/AVL%E6%A0%91

后来发现,百度百科,也有AVL树
http://baike.baidu.com/view/414610.htm

哇靠,果然是一摸一样啊!

这玩意儿,存活着还有必要吗?
貌似是有,因为中国一般都上不了Wikipedia

posted @ 2007-04-02 15:52 PureEviL 阅读(107) | 评论 (0)编辑