摘要: 统计出现的字符串 public static void main(String[] args) { String str ="我 a 爱中华 abc 我爱小苏 def"; // String str ="我 ABC 汉"; int num = 0; try { num = trimGBK(str.getByte... 阅读全文
posted @ 2018-12-11 19:47 冬马党 阅读(211) 评论(0) 推荐(0)
摘要: 一致性hash解决的问题 在解决分布式系统中负载均衡的问题时候可以使用Hash算法让固定的一部分请求落到同一台服务器上,这样每台服务器固定处理一部分请求(并维护这些请求的信息),起到负载均衡的作用。 但是普通的余数hash(hash(比如用户id)%服务器机器数)算法伸缩性很差,当新增或者下线服务器 阅读全文
posted @ 2018-12-11 17:38 冬马党 阅读(464) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-12-11 16:55 冬马党 阅读(612) 评论(0) 推荐(0)
摘要: 1,先安装npm https://www.cnblogs.com/goldlong/p/8027997.html 2,安装vue-cli 阅读全文
posted @ 2018-12-11 11:37 冬马党 阅读(298) 评论(0) 推荐(0)