我在使用bash的时候通常会利用它的自动补全功能来看看文件夹下的内容(连按两下 键),例如: 说明Music文件夹下有这三个文件,我也就不需要提前用 命令来确定了。 但是最近我在查看当前shell(bash)的文件描述符时时却碰见一个“怪事”,当我用bash的自动补全功能查看时,显示为有0, 1, ...
分类:
其他好文 时间:
2017-12-31 22:24:02
阅读次数:
570
unittest是展开自动化测试的基础——这个框架很重要! 我们先自己写一个测试类: 1、被测试类 Widthget.py: # coding: utf-8class Widthget: def __init__(self, size=(10, 10)): self._size = size def ...
分类:
编程语言 时间:
2017-12-31 15:27:31
阅读次数:
256
1 class PageHelper: 2 def __init__(self, count, page, per_num=10, show_page=11): 3 # 总数 4 self.count = count 5 # 当前的页码 6 self.page = page 7 # 每页的个数 ..... ...
分类:
其他好文 时间:
2017-12-31 13:35:40
阅读次数:
99
一、what is red-black tree A red–black tree is a kind of self-balancing binary search tree in computer science. Each node of the binary tree has an extr ...
分类:
其他好文 时间:
2017-12-31 12:56:54
阅读次数:
242
1 class Person(): 2 def __init__(self, name): 3 self.name = name 4 5 6 def print_name(self): 7 print(self.name) 8 9 p = Person('Li') 10 import types 1... ...
分类:
编程语言 时间:
2017-12-30 22:43:04
阅读次数:
173
class Solution(object): def merge(self, nums1, m, nums2, n): """ :type nums1: List[int] :type m: int :type nums2: List[int] :type n: int :rtype: vo... ...
分类:
其他好文 时间:
2017-12-30 22:40:35
阅读次数:
220
@weakify _weak _weak @weakify(self); // RAC _weak的self_weak_变量 解决循环引用 问题: weakSelf是弱引用,会被释放 问题: weakSelf是弱引用,会被释放 循环引用的分类 父子对象关系 父子对象关系 当block和闭包包含在类的 ...
分类:
其他好文 时间:
2017-12-30 22:36:31
阅读次数:
126
class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ tmp=head while tmp: while tmp.n... ...
分类:
其他好文 时间:
2017-12-30 21:33:29
阅读次数:
149
一、程序的分层 1、界面层: 某种类型的应用程序 a、DOS(控制台运行) b、桌面应用程序--独立安装,独立运行 c、web类型--现在流行的 单机版:电脑上要安装,程序升级之后,电脑上也要升级--桌面应用程序 网络版:电脑上不装,输入一个url地址,直接用--web类型 2、业务逻辑层:数据访问 ...
分类:
Web程序 时间:
2017-12-30 18:07:19
阅读次数:
195
function is_submitxiugai(value){ if(value==1){ var password=prompt("请输入您的密码",""); if(password!=null &&password == '${sessionScope.self.user_pwd... ...
分类:
其他好文 时间:
2017-12-30 12:40:56
阅读次数:
148