ansible安装 让项目运行在一个独立的局部的 Python 环境中,使采用不同环境的项目互不干扰。 安装方式: yum安装: 安装EPEL源 yum install epel-release yum install ansible 编译安装: yum-y install python-jinja ...
分类:
其他好文 时间:
2020-02-08 18:04:51
阅读次数:
103
参考资料:https://www.runoob.com/docker/docker-install-redis.html 1. 查找Docker Hub上的Redis镜像 命令:docker search redis [root@localhost docker]# docker search re ...
分类:
其他好文 时间:
2020-02-08 17:46:34
阅读次数:
59
1.for循环 使用临时变量,将长度缓存起来,避免重复获取数组长度,当数组较大时优化效果才会比较明显。 1 2 3 for(j = 0,len=arr.length; j < len; j++) { } 2.foreach循环 遍历数组中的每一项,没有返回值,对原数组没有影响,不支持IE 1 2 3 ...
分类:
编程语言 时间:
2020-02-08 13:20:58
阅读次数:
83
Given a matrix, like this[[0, 0, 1, 1, 1][0, 1, 1, 1, 1][0, 0, 1, 1, 1][0, 0, 0, 0, 0]]each cell is either 1 or 0in each row, from left to right, when ...
分类:
其他好文 时间:
2020-02-07 13:14:09
阅读次数:
85
一. linux发行版本 red hat : 目前全球最大的 linux 发行厂商.(收费) ubuntu:免费版本.界面比较好 麒麟. Cent OS:免费.由 red hat 分支. 二. Linux系统目录 / 表示根目录 etc 存放系统配置目录 home所有用户默认在 home 下新建一个 ...
分类:
系统相关 时间:
2020-02-05 21:51:03
阅读次数:
85
rpm命令是RPM软件包的管理工具。rpm原本是Red Hat Linux发行版专门用来管理Linux各项套件的程序,由于它遵循GPL规则且功能强大方便,因而广受欢迎。逐渐受到其他发行版的采用。RPM套件管理方式的出现,让Linux易于安装,升级,间接提升了Linux的适用度。 rpm常见命令参数 ...
分类:
系统相关 时间:
2020-02-05 16:47:33
阅读次数:
86
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-02-05 13:42:39
阅读次数:
59
Sequence Sorting CodeForces - 1223D 题解:把它想象成单个数字的同等操作,需要移动次数是数据种类数-最长上升子序列长度,多个同理,所以记录每个数影响区间当成单个数做就行了 代🐎 #include <cstdio> #include <algorithm> #inc ...
分类:
其他好文 时间:
2020-02-05 12:04:32
阅读次数:
84
如果一个字符串包含很多需要转义的字符,对每一个字符都进行转义会很麻烦。为了避免这种情况,我们可以在字符串前面加个前缀 r ,表示这是一个 raw 字符串,里面的字符就不需要转义了。例如: print (r'\(~_~)/"\n"\(~_~)/') 运行结果 \(~_~)/"\n"\(~_~)/ 但是 ...
分类:
其他好文 时间:
2020-02-04 23:28:41
阅读次数:
97
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: The inpu ...
分类:
其他好文 时间:
2020-02-04 20:31:43
阅读次数:
96