1、oop的意义:oop就是代码的重用:分解代码,最小化代码的冗余以及对现存的代码进行定制来编写程序。而不是实地的修改代码,或者从头开始2、继承搜索在那里查找属性:继承搜索会先在实例对象中寻找属性,然后
才是创建实例的类,之后是所有较高的超类,由对象树底端到顶端,并且至右侧。当属性首次找到时,搜索就...
分类:
编程语言 时间:
2014-04-29 22:06:05
阅读次数:
664
1. Modulus operator (%)The modulus operator
works on integers and yields the remainder when the first operand is divided by
the second. In Python, the...
分类:
其他好文 时间:
2014-04-29 22:00:56
阅读次数:
495
[leetcode]Word Ladder II @
Python原题地址:http://oj.leetcode.com/problems/word-ladder-ii/参考文献:http://blog.csdn.net/doc_sgl/article/details/13341405
ht...
分类:
编程语言 时间:
2014-04-29 21:42:30
阅读次数:
590
---恢复内容开始---说起lazy_object,首先想到的是django
orm中的query_set、fn.Stream这两个类。query_set只在需要数据库中的数据的时候才 产生db
hits。Stream对象只有在用到index时才会去一次次next。例子: f = Stream(.....
分类:
编程语言 时间:
2014-04-29 21:27:01
阅读次数:
676
逻辑运算符python不用&& ||
!表示与或非,用andornot,优先级是not > and > or。bool类型:True 和 False条件语句if expression1:
;elif expression2: ;else: ;字符串函数word = raw_inpu...
分类:
编程语言 时间:
2014-04-29 21:12:45
阅读次数:
492
package com.opensymphony.xwork2;import
com.opensymphony.xwork2.config.Configuration;import
com.opensymphony.xwork2.config.ConfigurationException;impor...
分类:
其他好文 时间:
2014-04-29 19:12:40
阅读次数:
729
package org.apache.struts2.dispatcher;import
com.opensymphony.xwork2.ActionInvocation;import
com.opensymphony.xwork2.Result;import com.opensymphony.xw...
分类:
其他好文 时间:
2014-04-29 18:55:17
阅读次数:
415
package com.szy.service;import
android.app.IntentService;import android.content.Intent;import
android.util.Log;public class ExampleIntentService exten...
分类:
其他好文 时间:
2014-04-29 18:02:50
阅读次数:
432
问题描述: Python基础篇 参考资料:
(1)http://www.cnblogs.com/octobershiner/archive/2012/12/04/2801670.html
(2)http://www.cnblogs.com/itech/archive/2010/06/20/17603...
分类:
编程语言 时间:
2014-04-29 17:29:59
阅读次数:
610
//// ViewController.m// mapdemo001//// Created by
apple on 14-4-28.// Copyright (c) 2014年 apple. All rights reserved.//#import
"ViewController.h"#...
分类:
移动开发 时间:
2014-04-29 17:02:06
阅读次数:
529