模板模式邮件模板方法模式(Template Method Pattern),是指定义一个算法的骨架,并允许子类为一个或多个步骤提供实现。模板模式使模板使用于以下场景: (1)一次性实现一个算法的不变部分,并将可变部分的行为留给子类类实现。 (2)各子类中公共的行为呗提取出来并集到一个公共的父类中,从 ...
分类:
其他好文 时间:
2020-05-14 01:53:25
阅读次数:
76
基本数据类型常用功能: 数字 int 字符串 str 布尔型 bool 列表 list 元祖 tuple 字典 dict # 查看对象的类,或对象所具备的功能 temp = "temp" chengbao = type(temp) print(chengbao) 1.ctrl + 类型 :查看方法, ...
分类:
编程语言 时间:
2020-05-14 01:24:53
阅读次数:
66
排序最关键的地方 1复杂度 (复杂度包括时间复杂度与空间复杂度) 2稳定性 3输入数据的特征是否会对复杂度造成影响即排序算法的复杂度和输入数据的特征有关系 插入排序法 我们只将大于temp的值向后移动,已经拍好序的元素不会直接交换位置,所以这个排序是是分稳定的 时间复杂度 1+2+3+4+……+n- ...
分类:
编程语言 时间:
2020-05-13 19:57:53
阅读次数:
65
输入 6 5 2 4 6 1 3 输出 1 2 3 4 5 6 代码 #include<iostream>using namespace std;void insertionsort(int a[],int n) { int i, j, temp; for (int i = 1;i < n;i++) ...
分类:
编程语言 时间:
2020-05-13 19:50:43
阅读次数:
50
经过调查是Linux系统磁盘满了,需要清理磁盘。 查看当前磁盘使用情况:df -h 可以看到上面/dev/vda1 de Use%=100%,然后看一下vda1是什么? 所以问题找到了,就是系统磁盘满了,满了,就清理掉无用数据,到根目录下使用命令du -sh * 查看各目录占用空间大小(du -ah ...
分类:
系统相关 时间:
2020-05-13 11:58:34
阅读次数:
296
1 CREATE function [dbo].[Split] 2 ( 3 @SourceString nvarchar(max), 4 @Separator nvarchar(max)=',' 5 ) 6 returns @temp table(split nvarchar(128)) 7 --实 ...
分类:
数据库 时间:
2020-05-13 09:47:34
阅读次数:
63
一 前言 公众号: 知识追寻者 知识追寻者(Inheriting the spirit of open source, Spreading technology knowledge;) pring为我们提供的缓存注解Spring Cache。Spring支持多种缓存技术:RedisCacheMana ...
分类:
编程语言 时间:
2020-05-13 09:19:12
阅读次数:
68
实现var a=add(2)(3)(4);//9 第一种方式: function add(a) { var temp = function (b) { return add(a + b); } temp.valueOf = function () { return a; } return temp; ...
分类:
其他好文 时间:
2020-05-12 20:36:08
阅读次数:
68
https://vjudge.net/contest/372814#problem/E n=15考虑状压dp #include <bits/stdc++.h> #define inf 2333333333333333 #define N 1000010 #define p(a) putchar(a) ...
分类:
Web程序 时间:
2020-05-12 20:24:13
阅读次数:
82
1.子查询(IF EXISTS) 用来判断某个表是否创建 eg:检测temp是否创建 drop table if exists temp; 语法:select..... from 表名 where EXISTS (子查询); 注意:(1)子查询后边的数据要与父查询一一对应 (2)子查询查到东西就会执 ...
分类:
其他好文 时间:
2020-05-12 16:57:53
阅读次数:
86