python中的re模块常用函数/方法 0.正则表达式对象 (re.compile(pattern, flags=0)) 将正则表达式编译成正则表达式对象,该对象可调用正则表达式对象方法如:re.match(),re.search(),re.findall等。 1.匹配对象及方法 (Match.gr ...
分类:
编程语言 时间:
2019-01-05 00:15:12
阅读次数:
230
> startapp rbac models.py from django.db import models class User(models.Model): name=models.CharField(max_length=32) pwd=models.CharField(max_length= ...
分类:
其他好文 时间:
2019-01-03 21:37:43
阅读次数:
170
"Triple Fat Ladies" Pattern Matchers have been designed for various sorts of patterns. Mr. HKP likes to observe patterns in numbers. After completing ...
分类:
其他好文 时间:
2019-01-03 18:15:14
阅读次数:
220
自定义Filter public class MyFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { System.out.println... ...
分类:
编程语言 时间:
2019-01-03 16:46:48
阅读次数:
145
import re匹配字符串# pattern = re.compile(r'hello')# match = pattern.search('ni hello cxy61!') #全字符匹配字符串 .search()# search = pattern.match('ai hello') #只在开 ...
分类:
其他好文 时间:
2019-01-03 16:44:30
阅读次数:
192
更新缓存的Design Pattern有四种:Cache aside,Read through、Write through、Write behind caching、我们下面一一来看一下这四种Pattern。 1.Cache Aside Pattern 这是最常见最常用的pattern了,其具体逻辑 ...
分类:
其他好文 时间:
2019-01-03 15:39:55
阅读次数:
172
django的单元测试 指定测试范围: 指定运行某些测试文件./manage.py test --pattern="tests_*.py" -v 2 运行所有测试文件./manage.py test -v 2 # Run all the tests in the animals.tests modu ...
分类:
其他好文 时间:
2019-01-03 10:49:01
阅读次数:
481
在软件开发领域中,人们经常会用到这一个概念——“设计模式”(design pattern),它是一种针对软件设计的共性问题而提出的解决方案。在一本圣经级的书籍《设计模式:可复用面向对象软件的基础》(1991年,Design Patterns - Elements of Reusable Object ...
分类:
编程语言 时间:
2019-01-02 23:28:19
阅读次数:
238
sed[option]...‘script‘inputfile...script:地址命令opt:-n不输出模式空间内容到屏幕,即不自动打印-e多点编辑-r支持使用扩展正则表达式-i.bak备份文件并原处编辑?地址:(1)不给地址:对全文进行处理(2)单地址:#:指定的行,$:最后一行,/pattern/:被此处模式所能够匹配到的每一行(3)地址范围:#,#从#行到#行,#,+#,
分类:
其他好文 时间:
2019-01-02 22:17:25
阅读次数:
213