2)视图函数创建好后,要和url对应,要有路由规则,在urls.py中,先导入views模块from . import views 然后设置urlpatterns(patterns 模式),在里边增加一条路由,用path()方法:path('index/',) 第一个参数的字符串是路由,前边不能加/ ...
分类:
其他好文 时间:
2019-02-20 09:59:05
阅读次数:
166
题目链接:https://cn.vjudge.net/contest/283743#problem/D 题目大意:给你n个数,然后问你出现m次的最长子串的长度。 具体思路:和上一篇博客的内容差不多,这个是可重复的,就不需要考虑sa的问题了,每一次还是二分答案,判断出现的最长前缀就可以了。注意二分的时 ...
分类:
其他好文 时间:
2019-02-17 10:51:20
阅读次数:
174
Reference [1] https://refactoring.guru/design-patterns/adapter 1. Adaptor Design Pattern 适配器模式 Adapter is a structural design pattern, which allows in ...
分类:
其他好文 时间:
2019-02-01 23:01:10
阅读次数:
168
题目描述 Farmer John has N cows that need to be milked (1 <= N <= 10,000), each of which takes only one unit of time to milk. Being impatient animals, som ...
分类:
其他好文 时间:
2019-01-17 21:17:25
阅读次数:
147
LPB算子的定义参见维基百科:https://en.wikipedia.org/wiki/Local_binary_patterns,考察LBP算子的定义可知,一个LBP算子可以产生多种二进制模式(p个采样点)如:3x3邻域有p=8个采样点,则可得到2^8=256种二进制模式;5x5邻域有p=24个 ...
分类:
其他好文 时间:
2019-01-17 15:21:17
阅读次数:
209
1. Introduction to Design Patterns 2. One Instance to Rule Them All - Singletons 3. Creating Flexibility with the Component Object Model 4. Aritificia ...
分类:
其他好文 时间:
2019-01-15 00:57:01
阅读次数:
123
在软件开发领域中,人们经常会用到这一个概念——“设计模式”(design pattern),它是一种针对软件设计的共性问题而提出的解决方案。在一本圣经级的书籍《设计模式:可复用面向对象软件的基础》(1991年,Design Patterns - Elements of Reusable Object ...
分类:
编程语言 时间:
2019-01-07 17:42:55
阅读次数:
202
"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
在软件开发领域中,人们经常会用到这一个概念——“设计模式”(design pattern),它是一种针对软件设计的共性问题而提出的解决方案。在一本圣经级的书籍《设计模式:可复用面向对象软件的基础》(1991年,Design Patterns - Elements of Reusable Object ...
分类:
编程语言 时间:
2019-01-02 23:28:19
阅读次数:
238
抽象工厂模式包含如下角色: AbstractFactory:抽象工厂 ConcreteFactory:具体工厂 AbstractProduct:抽象产品 Product:具体产品 https://design-patterns.readthedocs.io/zh_CN/latest/creation ...
分类:
编程语言 时间:
2018-12-22 22:42:40
阅读次数:
312