统计

留言簿(1)

DB

Others

QA

Tech Website

阅读排行榜

评论排行榜

#

【转】Android 2.1 源码结构分析

     摘要:   阅读全文

posted @ 2011-07-09 09:37 XXXXXX 阅读(237) | 评论 (0)编辑 收藏

Android Coding for Life-Battery Life

关于Android编程中如果省电的讲解

可以作为开发者的参考 :)

posted @ 2011-07-08 09:37 XXXXXX 阅读(1546) | 评论 (0)编辑 收藏

【转】Java学习的30个目标以及系统架构师推荐的书

     摘要: 2.你需要学习JAVA语言的基础知识以及它的核心类库 (collections,serialization,streams,networking, multithreading,reflection,event,handling,NIO,localization,以及其他)。  阅读全文

posted @ 2011-06-18 15:25 XXXXXX 阅读(669) | 评论 (1)编辑 收藏

学习Python的好网站

1)http://www.pythonchallenge.com/
  提供了不同level的Python题目,非常有趣的题目。做完一题后,把URL中的pc改为pcc可以看到上一题的答案

2)http://projecteuler.net/
  里面有200多道题目,不要要求提交代码,只要最终答案,提供用各种语言来解决问题。这里(http://dcy.is-programmer.com/posts/8750.html)有部分题目的答案

非常好玩,有兴趣的朋友,快来试试吧

看看 project euler 的第一道题:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.

用 python 语言写出来是:

 

print sum(i for i in xrange(11000if i % 3 == 0 or i % 5 == 0)

 


 

posted @ 2011-06-17 20:26 XXXXXX 阅读(4365) | 评论 (2)编辑 收藏

Dom4j解释XML示例

     摘要:   阅读全文

posted @ 2011-06-15 17:53 XXXXXX 阅读(348) | 评论 (0)编辑 收藏

【转】《InfoQ Explores: REST》介绍

This is the first edition of what is expected to become a recurring series on InfoQ. The idea behind this minibook is that a number of InfoQ articles and interviews which deal with a particular topic (in this case, REpresentational State Transfer, or REST) are combined together to provide a detailed exploration suitable for both beginners and advanced practitioners.

Read More: http://www.infoq.com/minibooks/emag-03-2010-rest;jsessionid=1E2375E822D980824403DAD46588FAFE

posted @ 2011-06-15 12:39 XXXXXX 阅读(233) | 评论 (0)编辑 收藏

Python中的Closure


#定义:如果在一个内部函数里,对在外部作用域(但不是在全局作用域)的变量进行引用,那么内部函数就被认为是闭包(closure)
分解来说,包含下面3个条件:
1) 需要函数嵌套, 就是一个函数里面再写一个函数.
2) 外部函数需要返回一个内部函数的引
3) 外部函数中有一些局部变量, 并且, 这些局部变量在内部函数中有使用
一些概念:
1)自由变量: 外部函数中定义的局部变量, 并且在内部函数中被使用
2) 闭包: 那个使用了自由变量并被返回的内部函数就称为闭包

#支持闭包的语言有这样的特性:
1)函数是一阶值(First-class value),即函数可以作为另一个函数的返回值或参数,还可以作为一个变量的值
2)函数可以嵌套定义,即在一个函数内部可以定义另一个函数

#代码示例

 1def counter(start_at=0):
 2    count = [start_at]
 3    def incr():
 4        count[0] += 1   #对局部变量的引用
 5        return count[0]
 6    return incr  #返回一个函数对象
 7
 8
 9if __name__ == '__main__':
10    c = counter(3)
11    print type(c)
12    print c()
13    print c()
14


 

posted @ 2011-06-15 07:31 XXXXXX 阅读(1291) | 评论 (0)编辑 收藏

Trie Tree

     摘要: #Trie Tree的基本特点
1)根节点不包含字符,除根节点外每个节点只包含一个字符
2)从根节点到某一个节点,路径上经过的字符连接起来,为该节点对应的字符串

3)每个节点的所有子节点包含的字符串不相同
  阅读全文

posted @ 2011-06-14 16:57 XXXXXX 阅读(1062) | 评论 (0)编辑 收藏

Bloom Filter

     摘要: The Bloom filter, conceived by Burton Howard Bloom in 1970, is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set.False positivesare possible, but false negatives are not. Elements can be added to the set, but not removed (though this can be addressed with a counting filter). The more elements that are added to the set, the larger the probability of false positives
  阅读全文

posted @ 2011-06-12 23:58 XXXXXX 阅读(282) | 评论 (0)编辑 收藏

【转】How Google Tests Software - A Brief Interlude

     摘要: These posts have garnered a number of interesting comments. I want to address two of the negative ones in this post. Both are of the same general opinion that I am abandoning testers and that Google is not a nice place to ply this trade. I am puzzled by these comments because nothing could be further from the truth. One such negative comment I can take as a one-off but two smart people (hey they are reading this blog, right?) having this impression requires a rebuttal. Here are the comments:  阅读全文

posted @ 2011-06-06 16:03 XXXXXX 阅读(296) | 评论 (0)编辑 收藏

仅列出标题
共8页: 上一页 1 2 3 4 5 6 7 8 下一页