12 2019 档案

摘要:/** * 注意使用Retention,只有指定Retention为RetentionPolicy.RUNTIME * 时在运行时才能获得注解信息 */ @Retention(value = RetentionPolicy.RUNTIME) public @interface Test { Stri 阅读全文
posted @ 2019-12-26 11:13 decq! 阅读(98) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/52mm/p/p15.html 阅读全文
posted @ 2019-12-23 15:45 decq! 阅读(206) 评论(0) 推荐(0) 编辑
摘要:目标:被动投资,追踪某一指数,取得同样的收益率 关键:样本股、股本数 阅读全文
posted @ 2019-12-23 13:05 decq! 阅读(157) 评论(0) 推荐(0) 编辑
摘要:参考教程:BiliBili AV54819146 ETF=Exchange Traded Fund(交易所交易基金) 正式全称:交易型开放式指数证券投资基金 是一种被动型、跟踪某一指数的基金 投资的标的是证券:股票、债券、黄金 是一种开放式基金,可随时申购赎回,但散户很难参与 可以在交易所交易 是一 阅读全文
posted @ 2019-12-23 13:02 decq! 阅读(234) 评论(0) 推荐(0) 编辑
摘要:https://mp.weixin.qq.com/s?__biz=MzU5OTMyODAyNg==&mid=2247484122&idx=1&sn=fe2d5607dd8dd7180d290db118534030&scene=21#wechat_redirect 阅读全文
posted @ 2019-12-22 10:52 decq! 阅读(201) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/zyuze/p/7726582.html 阅读全文
posted @ 2019-12-22 10:35 decq! 阅读(128) 评论(0) 推荐(0) 编辑
摘要:源码: https://mp.weixin.qq.com/s?__biz=MzU5OTMyODAyNg==&mid=2247484132&idx=1&sn=53ba07b1dcfc5dbfada3fcef96fb190b&scene=21#wechat_redirect 阅读全文
posted @ 2019-12-22 09:58 decq! 阅读(168) 评论(0) 推荐(0) 编辑
摘要:这篇文章解释得不错 https://baijiahao.baidu.com/s?id=1605691070613344469&wfr=spider&for=pc 阅读全文
posted @ 2019-12-20 11:02 decq! 阅读(90) 评论(0) 推荐(0) 编辑
摘要:StringBuffer 方法 以下是 StringBuffer 类支持的主要方法: 序号方法描述 1 public StringBuffer append(String s) 将指定的字符串追加到此字符序列。 2 public StringBuffer reverse() 将此字符序列用其反转形式 阅读全文
posted @ 2019-12-20 10:57 decq! 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Java Vector 类 Vector 类实现了一个动态数组。和 ArrayList 很相似,但是两者是不同的: Vector 是同步访问的。 Vector 包含了许多传统的方法,这些方法不属于集合框架。 Vector 主要用在事先不知道数组的大小,或者只是需要一个可以改变大小的数组的情况。 Ve 阅读全文
posted @ 2019-12-20 10:54 decq! 阅读(814) 评论(0) 推荐(0) 编辑
摘要:1 public final class String 2 3 implements java.io.Serializable, Comparable<String>, CharSequence { 4 5 /** The value is used for character storage. * 阅读全文
posted @ 2019-12-20 10:40 decq! 阅读(126) 评论(0) 推荐(0) 编辑
摘要:除了由Vector定义的所有方法,自己也定义了一些方法: 序号方法描述 1 boolean empty() 测试堆栈是否为空。 2 Object peek( ) 查看堆栈顶部的对象,但不从堆栈中移除它。 3 Object pop( ) 移除堆栈顶部的对象,并作为此函数的值返回该对象。 4 Objec 阅读全文
posted @ 2019-12-20 10:37 decq! 阅读(226) 评论(0) 推荐(0) 编辑
摘要:查看集群信息:kubectl cluster-info 查看node: kubectl get node kubectl get deployment kubectl get pod 阅读全文
posted @ 2019-12-17 14:22 decq! 阅读(107) 评论(0) 推荐(0) 编辑
摘要:论文原文 https://www.jianshu.com/p/c7ae21809197 深入浅出理解版 https://my.oschina.net/u/150175/blog/2992187 腾讯开源实现 https://github.com/Tencent/phxpaxos/blob/maste 阅读全文
posted @ 2019-12-16 18:46 decq! 阅读(93) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/longl/p/9460810.html 阅读全文
posted @ 2019-12-11 21:18 decq! 阅读(428) 评论(0) 推荐(0) 编辑
摘要:博文: 全文搜索引擎 Elasticsearch 入门教程 阮一峰 http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html 阅读全文
posted @ 2019-12-09 16:48 decq! 阅读(251) 评论(0) 推荐(0) 编辑
摘要:kafka是一个分布式的基于发布/订阅模式的消息队列(Message Queue),主要用于大数据实时处理领域。 消息队列两种模式:点对点模式,发布/订阅模式 Kafka是由follower到leader上拉取数据的方式进行同步的。 架构: 生产者、消费者、kafka集群 kafka-重点内容(数据 阅读全文
posted @ 2019-12-08 14:53 decq! 阅读(485) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/sv2008337/article/details/81735810 https://www.cnblogs.com/xiaobaozi-95/p/9214307.html Logstash-运行错误解决 https://www.jianshu.com/p 阅读全文
posted @ 2019-12-07 21:52 decq! 阅读(187) 评论(0) 推荐(0) 编辑
摘要:zookeeper已经弄了好久,遇到的bug很多,一怒之下卸载重装了,为避免重走弯路,将环境搭建的过程记录下来: 1.下载 从国内的镜像源下载,速度快很多。 链接:https://www.apache.org/dyn/closer.cgi/zookeeper/ 这里下的是这个版本,稳定版apache 阅读全文
posted @ 2019-12-07 15:50 decq! 阅读(474) 评论(0) 推荐(0) 编辑
摘要:zoo.cfg各个属性的配置说明: https://blog.csdn.net/asty9000/article/details/80216691 阅读全文
posted @ 2019-12-07 14:34 decq! 阅读(423) 评论(0) 推荐(0) 编辑
摘要:https://segmentfault.com/a/1190000018876282 阅读全文
posted @ 2019-12-07 13:35 decq! 阅读(70) 评论(0) 推荐(0) 编辑
摘要:题目描述 在一个字符串(0<=字符串长度<=10000,全部由字母组成)中找到第一个只出现一次的字符,并返回它的位置, 如果没有则返回 -1(需要区分大小写). #include <map>class Solution {public: map<char,int> mp; int FirstNotR 阅读全文
posted @ 2019-12-06 18:36 decq! 阅读(99) 评论(0) 推荐(0) 编辑
摘要:转载 https://blog.csdn.net/shuzfan/article/details/53115922 阅读全文
posted @ 2019-12-06 17:04 decq! 阅读(187) 评论(0) 推荐(0) 编辑
摘要:题目描述 把只包含质因子2、3和5的数称作丑数(Ugly Number)。例如6、8都是丑数,但14不是,因为它包含质因子7。 习惯上我们把1当做是第一个丑数。求按从小到大的顺序的第N个丑数。 主要问题在于超时,这不是因为循环太多而造成的,而是因为复杂度太大造成的,应该使用更为巧妙的方法。 clas 阅读全文
posted @ 2019-12-06 16:36 decq! 阅读(115) 评论(0) 推荐(0) 编辑
摘要:string初始化为空:string s = ""; 其他类型转换成string:to_string()函数 stirng转换成int:int a = atoi(s.c_str()); substr substr(a,b) a起始位置,b长度 阅读全文
posted @ 2019-12-06 15:12 decq! 阅读(85) 评论(0) 推荐(0) 编辑
摘要:题目描述 求出1~13的整数中1出现的次数,并算出100~1300的整数中1出现的次数?为此他特别数了一下1~13中包含1的数字有1、10、11、12、13因此共出现6次,但是对于后面问题他就没辙了。ACMer希望你们帮帮他,并把问题更加普遍化,可以很快的求出任意非负整数区间中1出现的次数(从1 到 阅读全文
posted @ 2019-12-06 15:01 decq! 阅读(112) 评论(0) 推荐(0) 编辑
摘要:HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学。今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。但是,如果向量中包含负数,是否应该包含某个负数,并期望旁边的正数会弥补它呢?例如:{6,-3,-2,7,-15,1,2,2} 阅读全文
posted @ 2019-12-06 14:55 decq! 阅读(83) 评论(0) 推荐(0) 编辑
摘要:题目描述 输入n个整数,找出其中最小的K个数。例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,。 解答: 用最简单的方法,优先队列 #include <queue> class Solution { public: vector<int> GetLeastNumb 阅读全文
posted @ 2019-12-06 14:21 decq! 阅读(206) 评论(0) 推荐(0) 编辑
摘要:++i 阅读全文
posted @ 2019-12-06 14:16 decq! 阅读(112) 评论(0) 推荐(0) 编辑
摘要:emplace操作是C++11新特性,新引入的的三个成员emlace_front、empace 和 emplace_back,这些操作构造而不是拷贝元素到容器中,这些操作分别对应push_front、insert 和push_back,允许我们将元素放在容器头部、一个指定的位置和容器尾部。 两者的区 阅读全文
posted @ 2019-12-06 14:11 decq! 阅读(417) 评论(0) 推荐(0) 编辑
摘要:转载 https://blog.csdn.net/weixin_36888577/article/details/79937886 阅读全文
posted @ 2019-12-06 13:46 decq! 阅读(90) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/c63816fb17ae https://www.jianshu.com/p/41a506acc643 阅读全文
posted @ 2019-12-06 11:40 decq! 阅读(171) 评论(0) 推荐(0) 编辑
摘要:转载自: http://www.ruanyifeng.com/blog/2011/09/curl.html 阅读全文
posted @ 2019-12-06 11:23 decq! 阅读(85) 评论(0) 推荐(0) 编辑
摘要:配置主要是通过yml文件进行的,主要参数如下: (1)字段解释 paths:指定要监控的日志,目前按照Go语言的glob函数处理。没有对配置目录做递归处理,比如配置的如果是: /var/log/* /*.log 则只会去/var/log目录的所有子目录中寻找以".log"结尾的文件,而不会寻找/va 阅读全文
posted @ 2019-12-06 10:10 decq! 阅读(2728) 评论(0) 推荐(0) 编辑
摘要:cat:一次查看所有内容,不过文本行数过多,不能全部显示 less:查看长文本时候使用,可以翻页 head:查看文件开始,默认10行 tail:查看文件结尾,默认10行 而对于tail也可以一直查看文件结尾,类似于top命令 用tail -f 用于实时查询linux下的日志文件 Filebeat的可 阅读全文
posted @ 2019-12-06 10:03 decq! 阅读(475) 评论(0) 推荐(0) 编辑
摘要:后台形式启动kafka ./bin/kafka-server-start.sh -daemon /usr/local/kafka/config/server.properties 查询当前所有 topic ./bin/kafka-topics.sh --list --zookeeper localh 阅读全文
posted @ 2019-12-05 23:19 decq! 阅读(192) 评论(0) 推荐(0) 编辑
摘要:curl http://127.0.0.1:9200/_cat/health?v 集群的状态(status):red红表示集群不可用,有故障。yellow黄表示集群不可靠但可用,一般单节点时就是此状态。green正常状态,表示集群一切正常。节点数(node.total):节点数,这里是2,表示该集群 阅读全文
posted @ 2019-12-05 22:34 decq! 阅读(12618) 评论(0) 推荐(0) 编辑
摘要:kafka: 1.Connection to node -1 could not be established. Broker may not be available. (1)因为配置文件中的端口跟请求的端口不同。 比如一个consumer请求,在consumer.properties配置文件中设 阅读全文
posted @ 2019-12-05 21:51 decq! 阅读(468) 评论(0) 推荐(0) 编辑