Easter79 Easter79
4年前
springboot整合netty实现TCP服务端
1、导入依赖_<!https://mvnrepository.com/artifact/io.netty/nettyall_<dependency\<groupId\io.netty</groupId\<artifactId\nettyall</artifact
Easter79 Easter79
4年前
springmvc与fastjson集成
1.导入maven依赖<dependency<groupIdcom.alibaba</groupId<artifactIdfastjson</artifactId<version1.2.20</version</dependency2.springmvc.xml配置
Wesley13 Wesley13
4年前
java 获取路径
1、利用System.getProperty()函数获取当前路径:System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径2、使用File提供的函数获取当前路径:FiledirectorynewFile("");//设定为当前文
LinMeng LinMeng
4年前
v-on绑定多个方法
von绑定多个方法触发机制不同语法如下:<divvon"{click:getSome,mousemove:MouseClick}"von绑定多个方法</div一个事件绑定多个函数触发机制相同,较少<div@click"getA(),getB()"一个事件绑定多个函数</div
Stella981 Stella981
4年前
React中使用echarts
1.安装相关的依赖:cnpmireactforechartsScnpmiechartsS2.使用方法:页面引入:importReactEchartsfrom'echartsforreact';1).使用组件方式classEchartsTestextendsComponent{
Wesley13 Wesley13
4年前
4.python
一编写一个函数判断输入的三个数是否能构成三角形我写的函数defis_triangle(a,b,c):if(abcandabs(ab)<c)or(acbandabs(ac)<b)or(bcaandabs(bc)<a):return
Wesley13 Wesley13
4年前
ubuntu 安装apache2,php7
(1)更新aptget源 aptgetupdate(2)安装addaptrepository命令依赖aptgetinstallsoftwarepropertiescommon(3)添加php源addaptrepositoryppa:ondrej/php(4)更新aptget源 
Wesley13 Wesley13
4年前
JavaMelody,来一发
1、引入依赖包:  项目pom.xml文件中加入JavaMelody组件。<! javamelodycore <dependency<groupIdnet.bull.javamelody</groupId<artifactIdjavamelodycore</artifactId
Stella981 Stella981
4年前
Linux编译安装python3
1.解决编译环境的,依赖环境,必须保证这里正确安装,方可执行后续步骤yuminstallgccpatchlibffidevelpythondevelzlibdevelbzip2developenssldevelncursesdevelsqlitedevelreadlinedeveltkdevelgdbmde
Ceph的crush算法与一致性hash对比介绍
一致性hash的基本思想是,有一个hash函数,这个hash函数的值域形成了一个环(收尾相接:thelargesthashvaluewrapsaroundtothesmallesthashvalue),然后存储的节点也通过这个hash函数随机的分配到这个环上,然后某个key具体存储到哪个节点上,是由这个key取hash函数对应到环的一个位置,然后沿着这个位置顺时针找到的第一个节点负责这个key的存储。这样环上的每个节点负责和它前面节点之间的这个区间的数据的存储。