1 class Women(): 2 def __init__(self,name): 3 # 名字 4 self.name = name 5 6 # 年龄 7 self.__age = 18 8 9 def __secret(self): 10 print("%s的年龄是:%d... ...
分类:
其他好文 时间:
2019-08-13 15:15:11
阅读次数:
68
1113 Integer Set Partition (25 分) 1113 Integer Set Partition (25 分) 1113 Integer Set Partition (25 分) Given a set of N (>) positive integers, you are ...
分类:
其他好文 时间:
2019-08-11 12:49:05
阅读次数:
97
Implement a trie with insert, search, and startsWith methods. Example: Note: You may assume that all inputs are consist of lowercase letters a-z. All ...
分类:
其他好文 时间:
2019-08-10 09:32:47
阅读次数:
67
题目: 输入一个函数,输入一个二叉树,该函数输出它的镜像 代码: ...
分类:
其他好文 时间:
2019-08-10 09:28:58
阅读次数:
69
题目: 输入两棵二叉树A和B,判断B是不是A的子结构 思路: 分为两步: (1)在树A中找到和B的根节点的值一样的节点R (2)判断树A中以R为根节点的子树是不是包含和树B一样的结构 ...
分类:
其他好文 时间:
2019-08-09 23:22:05
阅读次数:
88
1121 Damn Single (25 分) 1121 Damn Single (25 分) 1121 Damn Single (25 分) "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. Y ...
分类:
其他好文 时间:
2019-08-09 13:11:19
阅读次数:
68
文件描述符是和文件的输入、输出相关联的 非负整数 ,Linux内核(kernel)利用文件描述符( "file" descriptor)来访问文件。打开现存文件或新建文件时,内核会返回一个文件描述符。读写文件也需要使用文件描述符来指定待读写的文件。常见的文件描述符是 stdin 、 stdout 和 ...
分类:
系统相关 时间:
2019-08-07 22:14:50
阅读次数:
140
@property装饰器虽然我们不建议将属性设置为私有的,但是如果直接将属性暴露给外界也是有问题的,比如我们没有办法检查赋给属性的值是否有效。我们之前的建议是将属性命名以单下划线开头,通过这种方式来暗示属性是受保护的,不建议外界直接访问,那么如果想访问属性可以通过属性的getter(访问器)和setter(修改器)方法进行对应的操作。如果要做到这点,就可以考虑使用@property包装器来包装ge
分类:
编程语言 时间:
2019-08-07 21:00:26
阅读次数:
110
Tired of doing the same job? Get your hands on HP0-M45 exam It is the nature of the human being that he/she will get tired of doing the same task over ...
分类:
其他好文 时间:
2019-08-07 20:49:54
阅读次数:
101
hibernate的主键生成器: generator元素:表示了一个主键生成器,它用来为持久化类实例生成唯一的标识 新建项目进行测试 1.新建实体 Student.java Worker.java 配置对应实体的映射文件 Student.hbm.xml Worker.hbm.xml hibernat ...
分类:
Web程序 时间:
2019-08-03 10:36:30
阅读次数:
102