The k-means algorithm captures the insight that each point in a cluster should be near to the center of that cluster. It works like this: first we cho ...
分类:
其他好文 时间:
2020-07-17 21:58:52
阅读次数:
87
算法: 快速排序是一种分治的排序算法。它将一个数组分成两个子数组,将两部分独立地排序。快速排序和归并排序是互补的;归并排序将数组分成两个子数组分别排序,并将有序的子数组归并以将整个数组排序;而快速排序将数组排序的方式则是当两个子数组都有序时整个数组也就自然有序了。在第一种情况中,递归调用发生在处理整 ...
分类:
编程语言 时间:
2020-07-17 19:48:16
阅读次数:
60
主要内容:小目标:掌握for语句主要内容:for,break,continue,while与if使用1.for语句基本语法:foriteminiters:代码1for语句主要用于在迭代对象中取数据,直到取完。基本理解:1:每次从iters中取一个对象,2:将取出对象赋值给item,3:执行代码14:继续重复1,直到items中值取完。来看一个例子:foriteminrange(10):print(
分类:
编程语言 时间:
2020-07-17 19:30:42
阅读次数:
74
主要内容:小目标:掌握while语句主要内容:while,break,continue,while与if使用1.while语句基本语法:while表达式:代码1while语句说明:while:关键字表达式:一条语句while语句执行说明:先判断表达式值是否为真,为真执行代码1,否则不执行使用场景:循环做一件事情关键点:注意退出条件,不要死循环尝试下死循环:whileTrue:print(‘666‘
分类:
编程语言 时间:
2020-07-17 16:30:57
阅读次数:
86
1、流程控制 通过控制代码的执行顺序来实现我们完成的功能,js中流程控制有三种结构 顺序结构:按照代码的先后顺序,依次执行 分支结构:根据不同的条件执行不同的代码,如:if和switch... ...case语句 循环结构:while、do.. ...while、for、break、continue ...
分类:
Web程序 时间:
2020-07-17 13:35:06
阅读次数:
81
设置 config set slowlog-log-slower-than 10000(微秒) //查看redis时间超过上面设置的阀值的key slowlog len 有几个key slowlog get 获取详情 ...
分类:
其他好文 时间:
2020-07-16 21:08:48
阅读次数:
58
Find Right Interval (M) 题目 Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than ...
分类:
其他好文 时间:
2020-07-16 12:10:10
阅读次数:
63
1.问题:docker : Error response from daemon: Conflict. The container name "***" is already in use原因:容器名占用解决办法:(1)给容器换一个名字, 比如说 docker run -it --name=myce ...
分类:
其他好文 时间:
2020-07-15 23:57:58
阅读次数:
96
语法: switch(表达式){ //表达式为 int、short、byte、char、枚举、String类型 case常量1: //计算表达式的值 语句; //如果等于常量1 break; case常量2: 语句; //如果等于常量2 break; …… default: 语句; //如果没有找到 ...
分类:
其他好文 时间:
2020-07-15 23:56:21
阅读次数:
96
单行: white-space:nowrap; overflow:hidden; text-overflow:ellipsis; 多行: word-break: break-all; text-overflow: ellipsis; overflow: hidden; display: -webki ...
分类:
Web程序 时间:
2020-07-15 22:46:33
阅读次数:
93