优化后 # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for ...
分类:
其他好文 时间:
2020-06-16 18:41:29
阅读次数:
65
1,在hdfs-site.xml 中配置多目录,提前配置好,以免以后要配置时,需要重启集群。 2,namenode 有一个工作线程池,用来处理不同的datanode的并发心跳和客户端访问并发请求。配置dfs.namenode.handler.count=20 * log2(Cluster Size) ...
分类:
其他好文 时间:
2020-06-16 13:33:15
阅读次数:
64
服务器层面优化(了解) 将数据保存在内存中,保证从内存读取数据 设置足够大的innodb_buffer_pool_size,将数据读取到内存中。 建议innodb_buffer_pool_size设置为总内存大小的3/4或者4/5。 怎样确定innodb_buffer_pool_size足够大,数据 ...
分类:
数据库 时间:
2020-06-16 10:25:15
阅读次数:
83
在程序中出加入计数器来计算两者在执行过程中需要的插入次数 通过比较时间复杂度来比较效率 int shell(int a[],int n,int gap) { int count=0; int key=a[n]; while(n>=gap&&a[n-gap]>key) { a[n]=a[n-gap]; ...
分类:
编程语言 时间:
2020-06-16 00:57:10
阅读次数:
56
1 """ptyhon对象转json字符串""" 2 3 4 import json 5 6 persons = [ 7 {'username': '张三', 'age': 18, 'country': 'china'}, 8 {'username': 'lisi', 'age': 20, 'cou ...
分类:
Web程序 时间:
2020-06-15 22:36:43
阅读次数:
71
一:字段和方法的信息YEAR 字段:public static final int YEAR ;指示年的 get 和 set 的字段数字。这是一个特定于日历的值;get 方法:public int get(int field) ;返回给定日历字段的值。在 lenient 模式下,所有日历字段都被标准 ...
分类:
编程语言 时间:
2020-06-15 20:47:31
阅读次数:
73
import MySQLdb #查询数量 def Count(cur): count=cur.execute('select * from Student') print ('there has %s rows record' % count) #插入 def Insert(cur): sql = ...
分类:
数据库 时间:
2020-06-15 17:54:50
阅读次数:
78
Django 模板标签1变量 view:{"HTML变量名" : "views变量名"}HTML:{{变量名}}:def runoob(request): views_name = "菜鸟教程" return render(request,"runoob.html", {"name":views_n ...
分类:
编程语言 时间:
2020-06-15 17:43:17
阅读次数:
58
空间相交是gis中常用的功能,一般就是使用分析库进行相交就可以了,但是多数据时这样产生笛卡尔积计算效率低下,这时可以考虑使用索引,本文中要介绍的是r-tree的使用。 R树是一棵平衡树。树上有两类结点:叶子结点和非叶子结点。每一个结点由若干个索引项构成。对于叶子结点,索引项形如(Index,Obj_ ...
分类:
其他好文 时间:
2020-06-15 13:59:50
阅读次数:
67