Loading

邢栋博客

数据结构之数组和链表

数组 1.在内存中,数组是一块连续的区域 2.数组需要预留空间,在使用前需要提前申请所占内存的大小 3.在数组起始位置处,插入数据和删除数据效率低 -插入数据时,待插入位置的元素和它后面的所有元素都需要向后搬移 -删除数据时,待删除位置后面的所有元素都要向前搬移 4.随机访问速度效率很高,时间复杂度可以到达O(1) 因为数组的内存是连续的,想要访问那个元素,直接从数组的首地址向后偏移就可以访问到了 5.数组开辟的空间,在不够使用的时候需要扩容,扩容的话,就会涉及需要把旧数组的所有数据向新数组中搬移 6.数组的空间是从栈分配的 数组的优点 随机访问性强,查...

centos7下gcc升级

下载地址 https://ftp.gnu.org/gnu/gcc/ 下载gcc和相关依赖 wget https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.gz tar -zxvf gcc-5.4.0.tar.gz cd gcc-5.4.0 ./contrib/download_prerequisites //相关依赖 建立存放编译文件的文件夹+编译 mkdir gcc-build-5.4.0 cd gcc-build-5.4.0/ ../configure --prefix=/usr/local/gcc5...

centos7查看开机启用服务列表以及启用禁用相关服务

查看开机启动服务列表 systemctl list-unit-files systemctl list-unit-files |grep php 加入启动 systemctl enable postfix 启动 systemctl start postfix 停止 systemctl stop postfix 禁用 systemctl disable postfix 状态 systemctl status postfix

centos7下安装gitlab问题总结

问题:执行 systemctl start postfix Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details. 解决方法 vim /etc/postfix/main.cf myhostname = mail.flycoder.cn mydomain = fl...

centos7下安装gitlab并修改访问端口

官网安装说明 https://about.gitlab.com/install/#centos-7 1.第一步 sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld 2.第二步 sudo yum install post...

springboot2.X集成es5.5

pom.xml修改 1.修改内容 <properties> <java.version>1.8</java.version> <elasticsearch.version>5.5.2</elasticsearch.version> </properties> 2.修改内容 <!-- ES elasticsearch --> <dependency> <groupId>org.elasticsearch.client</groupId&g...

windows和mac下安装java并配置路径

进入 https://www.oracle.com/technetwork/java/javase/downloads/index.html 下载对应的平台+版本的安装包 WINDOWS平台下 公用JRE 不用安装 我的电脑--属性--高级系统设置 --环境变量 配置环境遍历 JAVA_HOME D:\Program Files\Java\jdk1.8.0_201 PATH 加入 D:\Program Files\Java\jdk1.8.0_201\bin CLASSPATH .;D:\Program Files\Java\jdk1.8.0_201\li...

Elasticsearch的基本用法(增删改查)

基础概念 索引--含有相同属性的文档集合 类型--索引可以定义一个或者多个类型,文档必须属于一个类型 文档--文档是可以被索引的基础数据单位 分片--每个索引都有多个分片,每个分片是一个Lucence索引 备份--拷贝一份分片就完成了分片的备份 基本用法 RESTFul API API基本格式 http://ip:port/索引/类型/文档id; 常用HTTP动词 GET/PUT/POST/DELETE 创建索引 1.非结构化创建 查看索引信息mappings为空{} 2.结构化创建 利用elasticsearch-head创建 复合查询 http:/...

Elasticsearch的单实例以及分布式安装

单实例安装 1.下载地址 https://www.elastic.co/cn/downloads/elasticsearch&nbsp; 2.下载完解压后 Run bin/elasticsearch (or bin\elasticsearch.bat on Windows) bin/elasticsearch -d 后台启动 Run curl http://localhost:9200/ or Invoke-RestMethod http://localhost:9200 with PowerShell 3.视图插件安装 https://git...

WINDOWS下elasticsearch-head创建索引后显示Unassigned/yellow问题

查询各种资料后说是硬盘剩余空间过少的原因,我的硬盘容量使用已经快大于90%了 通过这个链接可以查看 http://localhost:9200/_cat/allocation?v 1.调整硬盘利用率 http://localhost:9200/_cluster/setting 发送put请求,可以利用postman软件 { "transient":{ "cluster.routing.allocation.disk.watermark.low": "90%" } } 2.或者更高数据保存路径 p...