>>> def fn(): ... print("ok") ... >>> fn() ok >>> fn.s=123 >>> fn.s 123 >>> fn.ss Traceback (most recent call last): File "", line 1, in AttributeErro... ...
分类:
编程语言 时间:
2019-02-26 13:46:18
阅读次数:
169
在微服务开发过程中,随着服务的增加,日常需要在各个服务之间切换,这样idea 的 Open Recent 功能就显得特别有用,但是过多的最近打开记录中包括已经删除的工程或者无用的工程导致影响开发时切换查找特定的微服务工程,接下来就需要管理Open Recent并删除无用服务名称: 一、管理Open ...
分类:
其他好文 时间:
2019-02-20 13:03:32
阅读次数:
372
This is a recent and more detailed solution for Windows users.Make sure the last version of TeXstudio is downloaded from its website.Download the Engl... ...
分类:
其他好文 时间:
2019-02-18 14:38:20
阅读次数:
252
1、错误描述 >>> a=1; >>> b=1; >>> for i in range(1,21): print('121d %121d' % (a,b)); if(i%3==0): a=a+b ; b=a+b; Traceback (most recent call last): File "<p ...
分类:
其他好文 时间:
2019-02-16 13:19:46
阅读次数:
205
1、错误描述 >>> def fun(arg): pass; >>> fun(1,arg=3); Traceback (most recent call last): File "<pyshell#15>", line 1, in <module> fun(1,arg=3); TypeError: ...
分类:
其他好文 时间:
2019-02-14 13:43:26
阅读次数:
419
Python(三) PIL, Image生成验证图片 安装好PIL,开始使用。 在PyCharm中新建一个文件:PIL_Test1.py 运行结果: 插曲: 中间出现编译错误: Traceback (most recent call last): File "E:/python_pycharm/PI ...
分类:
编程语言 时间:
2019-02-05 23:49:10
阅读次数:
251
Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 48370 Accepted: 23775 Description Due to recent rains, water has pooled in va ...
分类:
其他好文 时间:
2019-02-05 22:23:45
阅读次数:
210
(py27) [root@test SimpletourDevops]# python manage.py makemigrationsTraceback (most recent call last): File "manage.py", line 10, in <module> execute_ ...
分类:
移动开发 时间:
2019-02-01 16:27:23
阅读次数:
538
2.4 切片 在 Python 里,像列表(list)、元组(tuple)和字符串(str)这类序列类型都支持切片操作,但是实际上切片操作比人们所想象的要强大很多。 在我个人的使用经历来看,在算法实践中切片用的还以比较多的。 首先我们先来简单的温习一下切片的使用。 一、 Python可切片对象的索引 ...
分类:
编程语言 时间:
2019-01-31 19:11:45
阅读次数:
213
1, FIFO 先进先出,底层是利用双向链表,新来的数据放到链表的尾部,如果链表塞满了就删除头部的。 2, LFU 最近最少使用算法。思路就是如果一个数据在最近一段时间内使用次数最少,那么将来一段时间使用的可能性也很少。 LFU 是基于访问次数的。 实现:两个HASHMAP, 一个是用来存储数据的, ...
分类:
其他好文 时间:
2019-01-30 00:27:12
阅读次数:
213