10 2020 档案

摘要:手写Spring 常用类 ApplicationContext 创建对象 将对象缓存到IoC容器中(Map) 执行依赖注入DI BeanDefinition:配置文件封装(yml、properties、xml、json) BeanDefinitionReader:读取配置信息(工具类) BeanWr 阅读全文
posted @ 2020-10-31 09:38 cxc1357 阅读(177) 评论(0) 推荐(0)
摘要:原因 无法连接到集群上的java 解决 方法一: 在右上角Edit Configurations中,添加一条环境变量JAVA_HOME,值为远程机器上的java安装路径 方法二: 直接在代码里写上JAVA_HOME import os os.environ['JAVA_HOME'] = '/root 阅读全文
posted @ 2020-10-30 01:06 cxc1357 阅读(1031) 评论(0) 推荐(0)
摘要:改名、删除或重启容器 参考 https://www.cnblogs.com/youxin/p/12993816.html 阅读全文
posted @ 2020-10-29 21:12 cxc1357 阅读(1462) 评论(0) 推荐(0)
摘要:安装 安装miniconda:bash Miniconda3-py37_4.8.2-Linux-x86_64.sh 启动虚拟环境:source /root/.bashrc 退出虚拟环境:conda deactivate conda镜像配置: conda config --add channels h 阅读全文
posted @ 2020-10-29 20:23 cxc1357 阅读(154) 评论(0) 推荐(0)
摘要:问题 在阿里云上装了个jupyter,服务正常启动了,但网页上无法访问 排查 安全组已经设置过了,7777端口 在宝塔面板查看,发现7777端口并没有开,打开就可以访问了 原来阿里云的安全组和防火墙是两码事,防火墙通过netstat命令查看 必须安全组和防火墙都开才可以访问 参考 https://b 阅读全文
posted @ 2020-10-29 19:11 cxc1357 阅读(363) 评论(0) 推荐(0)
摘要:参考 https://www.jianshu.com/p/5e230ef8a14d 阅读全文
posted @ 2020-10-29 16:21 cxc1357 阅读(139) 评论(0) 推荐(0)
摘要:参考 https://www.cnblogs.com/liupuLearning/p/6610307.html 少了创建hive数据库一步 阅读全文
posted @ 2020-10-28 15:53 cxc1357 阅读(217) 评论(0) 推荐(0)
摘要:原因 HDFS数据块丢失,需要删除丢失块的元信息 bin/hadoop fsck / -delete 参考 https://blog.csdn.net/lixgjob/article/details/91878170 https://blog.csdn.net/oppo62258801/articl 阅读全文
posted @ 2020-10-28 13:04 cxc1357 阅读(479) 评论(0) 推荐(0)
摘要:安装 root用户解压,修改配置文件 创建新用户es 修改文件权限:chown -R es:es /kkb/install/elasticsearch-6.7.0/ 用es用户启动ElasticSearch和kibana kibana启动:nohup bin/kibana >/dev/null 2> 阅读全文
posted @ 2020-10-28 13:02 cxc1357 阅读(114) 评论(0) 推荐(0)
摘要:关闭HDFS安全模式 hadoop dfsadmin -safemode leave 阅读全文
posted @ 2020-10-28 12:18 cxc1357 阅读(124) 评论(0) 推荐(0)
摘要:参考 https://jingyan.baidu.com/article/77b8dc7fd52c576174eab6f6.html 阅读全文
posted @ 2020-10-28 01:57 cxc1357 阅读(89) 评论(0) 推荐(0)
摘要:原因 分区空间不够,无法安装镜像 参考 https://www.cnblogs.com/elizwy/p/7722898.html https://blog.csdn.net/TinyJian/article/details/55006725 https://www.cnblogs.com/heru 阅读全文
posted @ 2020-10-28 01:25 cxc1357 阅读(4148) 评论(0) 推荐(0)
摘要:原因 删除容器时报错,元信息出错,需要修复 最后一个参数要改成自己docker元信息路径,如: thin_check --clear-needs-check-flag /var/lib/docker/devicemapper/devicemapper/metadata 参考 https://blog 阅读全文
posted @ 2020-10-28 01:21 cxc1357 阅读(158) 评论(0) 推荐(0)
摘要:原因 复制虚拟机,没有改网卡配置文件 参考 https://blog.csdn.net/dongfei2033/article/details/81124465 阅读全文
posted @ 2020-10-28 01:19 cxc1357 阅读(245) 评论(0) 推荐(0)
摘要:ES启动问题,内存不足 https://blog.csdn.net/qq_40907977/article/details/104499178 修改ES启动内存 https://blog.csdn.net/m0_51340928/article/details/108940705 阅读全文
posted @ 2020-10-27 21:46 cxc1357 阅读(145) 评论(0) 推荐(0)
摘要:参考 https://blog.csdn.net/weixin_44634893/article/details/89629399 阅读全文
posted @ 2020-10-25 22:32 cxc1357 阅读(666) 评论(0) 推荐(0)
摘要:要求 给定被测函数前后两次获得的时钟打点数,给出被测函数运行的时间 样例 输入样例: 123 4577973 输出样例: 12:42:59 思路 n表示运行的时间,n为(b-a)/100,因为常数CLK_TCK为100 题目要求不足1秒的时间四舍五入到秒,所以先给(b-a)加上50,这样如果(b-a 阅读全文
posted @ 2020-10-22 11:32 cxc1357 阅读(120) 评论(0) 推荐(0)
摘要:要求 科学计数法是科学家用来表示很大或很小的数字的一种方便的方法 满足正则表达式 [+-][1-9].[0-9]+E[+-][0-9]+ 数字的整数部分只有 1 位,小数部分至少有 1 位,该数字及其指数部分的正负号即使对正数也必定明确给出 现以科学计数法的格式给出实数 A,请编写程序按普通数字表示 阅读全文
posted @ 2020-10-22 11:00 cxc1357 阅读(138) 评论(0) 推荐(0)
摘要:要求 给定数字 0-9 各若干个。你可以以任意顺序排列这些数字,但必须全部使用 目标是使得最后得到的数尽可能小(注意 0 不能做首位) 例如:给定两个 0,两个 1,三个 5,一个 8,我们得到的最小的数就是 10015558 思路 将数字0、数字1、……数字9的个数分别保存在数组a[i]中 因为0 阅读全文
posted @ 2020-10-22 10:51 cxc1357 阅读(160) 评论(0) 推荐(0)
摘要:思路 jiawin、yiwin分别表示甲乙赢的次数 s和t分别表示每一次甲乙给出的手势 jia、yi记录获胜手势的次数 maxjia和maxyi分别表示甲乙获胜次数最多的手势所对应的下标(012分别表示BCJ) 枚举每一次甲乙手势的胜负结果,累加到jiawin和yiwin中,输出结果 #includ 阅读全文
posted @ 2020-10-22 09:30 cxc1357 阅读(108) 评论(0) 推荐(0)
摘要:思路 以字符串形式接收 遍历字符串,组装数据,输出结果 #include <iostream> using namespace std; int main() { string a, b; int da, db, pa = 0, pb = 0; cin >> a >> da >> b >> db; 阅读全文
posted @ 2020-10-22 09:29 cxc1357 阅读(97) 评论(0) 推荐(0)
摘要:思路 设t = A + B,将每一次t % d的结果保存在int类型的数组s中 然后将t / d,直到 t 等于 0为止 此时s中保存的就是 t 在 D 进制下每一位的结果的倒序 最后倒序输出s数组 #include <iostream> using namespace std; int main( 阅读全文
posted @ 2020-10-21 15:08 cxc1357 阅读(96) 评论(0) 推荐(0)
摘要:思路 创建10个元素数组,保存0到9出现的次数 输出非零项 #include <iostream> using namespace std; int main() { string s; cin >> s; int a[10] = {0}; for (int i = 0; i < s.length( 阅读全文
posted @ 2020-10-21 15:02 cxc1357 阅读(96) 评论(0) 推荐(0)
摘要:思路 根据月饼的总价和数量计算出每一种月饼的单价 用结构体存储月饼的数量,总价,单价;用结构体数组存储月饼结构体 将月饼数组按照单价从大到小排序 根据需求量need的大小,从单价最大的月饼开始售卖 将销售掉这种月饼的价格累加到result中,最后输出result #include <iostream 阅读全文
posted @ 2020-10-21 14:47 cxc1357 阅读(129) 评论(0) 推荐(0)
摘要:思路 以字符串接收数据 sort():数组排序,倒序排序,重新写比较函数 s.insert(0, 4 – s.length(), ‘0’):用来给不足4位的时候前面补0 do while语句,输入6174时也计算一次 #include <iostream> #include <algorithm> 阅读全文
posted @ 2020-10-21 14:33 cxc1357 阅读(128) 评论(0) 推荐(0)
摘要:参考 https://blog.csdn.net/zhanaolu4821/article/details/93622812 阅读全文
posted @ 2020-10-20 22:29 cxc1357 阅读(78) 评论(0) 推荐(0)
摘要:参考 https://www.cnblogs.com/brankoliu/p/10845491.html https://blog.csdn.net/qq_40087740/article/details/80897693 阅读全文
posted @ 2020-10-20 22:24 cxc1357 阅读(74) 评论(0) 推荐(0)
摘要:思路 在 Flink 中创建一张表有两种方法: 从一个文件中导入表结构(Structure)(常用于批计算)(静态) 从 DataStream 或者 DataSet 转换成 Table (动态) package com.kaikeba.mysql.demo import org.apache.fli 阅读全文
posted @ 2020-10-11 16:57 cxc1357 阅读(272) 评论(0) 推荐(0)
摘要:参考 https://www.geek-share.com/detail/2684728161.html 阅读全文
posted @ 2020-10-11 11:07 cxc1357 阅读(111) 评论(0) 推荐(0)
摘要:错误1 gciantispider.getchildlst does not exist 原因 getchildlst创建失败 解决 在mysql中设置mysqld中加上log_bin_trust_function_creators=1 错误2 org.hibernate.engine.jdbc.s 阅读全文
posted @ 2020-10-10 22:41 cxc1357 阅读(185) 评论(0) 推荐(0)
摘要:命令 mvn install:install-file -Dfile="E:\software\Apache\repository\org\apache\flink\flink-connector-redis\flink-connector-redis_2.11-1.1-SNAPSHOT.jar" 阅读全文
posted @ 2020-10-10 21:25 cxc1357 阅读(142) 评论(0) 推荐(0)
摘要:参考 http://www.javaear.com/question/28087228.html https://github.com/openresty/openresty.org/issues/18 阅读全文
posted @ 2020-10-09 01:45 cxc1357 阅读(386) 评论(0) 推荐(0)