题目: https://leetcode-cn.com/problems/is-unique-lcci/ 实现一个算法,确定一个字符串 s 的所有字符是否全都不同。 示例 1: 输入: s = "leetcode"输出: false 示例 2: 输入: s = "abc"输出: true限制: 0 ...
分类:
其他好文 时间:
2020-03-01 14:14:40
阅读次数:
71
2020/02/29 单例模式(Singleton):用来创建独一无二的,只能有一个实例的对象的入场券。 单例模式是所有模式的例图中最简单的! 使用单例模式的场景 线程池(threadpol)、缓存(cache)、对话框、处理偏好设置和注册表(registry)对象、日志对象、充当打印机、显卡等设备 ...
分类:
其他好文 时间:
2020-02-29 12:50:45
阅读次数:
63
*探索性数据分析:用于初步检验数据的质量,需计算各类数据特征指标。 本文框架: 探索数据分布(Exploratory Data Distribution,EDD) 缺失率(Missing Rate) 重复值(Duplicate Value) 单一值(Unique Value) 其他数据质量检查(Qu ...
分类:
其他好文 时间:
2020-02-28 18:33:00
阅读次数:
89
幂等性:一个请求,不管重复来多少次,结果是不会改变的。 每个消息都会有唯一的消息 id。1)、先查再保存每次保存数据的时候,都先查一下,如果数据存在了那么就不保存。这个情况是并发不高的情况。 2)、业务表添加约束条件如果你的数据库将来都不会分库分表,那么可以在业务表字段加上唯一约束条件(UNIQUE ...
分类:
其他好文 时间:
2020-02-26 01:53:14
阅读次数:
119
$$ \texttt{Preface} $$ 赛时,把 " 任意时刻 " 理解成 " 整数时刻 " 了,看起来一脸不可做的亚子,还各种推式子。 ~~话说我为什么觉得 E 比 F 还难。~~ $$ \texttt{Description} $$ 一个坐标轴 $OX$ 上有 $n$ 个点,第 $i$ 个 ...
分类:
其他好文 时间:
2020-02-25 12:32:36
阅读次数:
108
(一)线段树 1.E - Lost Cows N (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neig ...
分类:
其他好文 时间:
2020-02-25 00:34:58
阅读次数:
174
```cpp #include #include #include //auto ptr //shared_ptr //unique_ptr //weak_ptr class Parent; //采用前置声明 using ParentPtr = std::shared_ptr; typedef st... ...
分类:
编程语言 时间:
2020-02-24 21:03:42
阅读次数:
90
```cpp #include #include #include class Object; typedef std::unique_ptr UniqueObjectPtr; using ObjectPtr = std::shared_ptr; void print(const UniqueObj... ...
分类:
编程语言 时间:
2020-02-24 20:24:28
阅读次数:
73
常用国内镜像地址: 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云 https://mirrors.aliyun.com/pypi/simple/ 豆瓣 https://pypi.douban.com/simple/ 中国科学技术大学 https ...
分类:
其他好文 时间:
2020-02-23 16:40:24
阅读次数:
89
权限和分组 登录、注销和登录限制 1. 登录 在使用authenticate进行验证后,如果验证通过了,那么就会返回一个user对象,拿到user对象之后,可以使用django.contrib.auth.login进行登录,部分示例代码如下: 2. 注销: 注销、或者是退出登录,我们可以通过djan ...
分类:
其他好文 时间:
2020-02-23 16:39:05
阅读次数:
168