- 博客(128)
- 资源 (7)
- 收藏
- 关注
转载 MySQL mysqldump数据导出详解
在日常维护工作当中经常会需要对数据进行导出操作,而mysqldump是导出数据过程中使用非常频繁的一个工具;它自带的功能参数非常多,文章中会列举出一些常用的操作,在文章末尾会将所有的参数详细说明列出来。...
2022-06-10 16:49:10
11935
转载 给用户配置Sudo(免密)
错误日志We trust you have received the usual lecture from the local SystemAdministrator根本原因是mysql用户去执行脚本中的sudo命令时权限不够,所以我们需要为其配置sudo权限并加上免密配置。① 使用su命令切换超级用户(root用户)② 我们需要在sudoers配置文件中修改,所以先为该文件配置写权限:chmod u+w /etc/sudoers // 给/etc下的sudoers文件加上wri
2022-03-25 17:30:48
3392
2
原创 数值比率计算
1 long类型做除法 //计算比率 long etotal = 80L; long count = 100L; BigDecimal ecount = new BigDecimal(etotal); BigDecimal totalCount = new BigDecimal(count); BigDecimal divide = etotal.divide(totalCount,4, BigDecimal.ROUND_HALF_UP); doubl
2022-02-21 11:08:13
382
原创 ES笔记记录
根据查询条件修改字段:POST index_cat/_update_by_query{ "query": { "bool": { "must": [ { "match": { "iscat":2 } } ] } }, "script": { "source": "ctx._source['iscat']=0" }}参数设置PUT .
2022-01-28 18:55:04
1817
原创 Python批量替换目录下所有文件中的部分字符串
批量替换目录下所有文件中 的部分 字符串#!/usr/bin/python# -*-coding:utf-8-*-import os# 获取当前目录# files = os.listdir(os.getcwd())# 待处理目录dirs = "F:\文档\测试-V4\\"# 待替换文件名中的字符串oldStr = "3"# 将文件名中的字符串newStr = "4"files = os.listdir(dirs)for file in files: os.chdir
2021-12-07 10:54:34
883
原创 docker常用命令小记
See 'docker --help'.Usage(用法): docker [OPTIONS] COMMANDManagement Commands(管理命令): app* #Docker App (Docker Inc., v0.9.1-beta3) #Docker应用程序(Docker Inc.,v0.9.1-beta3) builder #Manage builds #管理构建
2021-11-25 10:02:57
732
原创 centos7mini 安装 docker 容器应用无法通过 IP+端口访问
第一步: 执行以下下面命令sysctl -w net.ipv6.conf.default.disable_ipv6=1sysctl -w net.ipv6.conf.all.disable_ipv6=1第二步: 执行以下操作[root@localhost ~]# vi /etc/postfix/main.cf将inet_interfaces = all 打开并且注释 #inet_interfaces = localhost以上内容仅仅为本人解决问题的方式。...
2021-11-24 14:58:23
2048
原创 neo4j常用cypher笔记(1)
1. apoc.path.expandConfig简单语法match (n) where id(n)=1call apoc.path.expandConfig(n,{minLevel:0,maxLevel:1,labelFilter:'a|b',relationFilter:'friend|friend_1',uniqueness:'RELATIONSHIP_GLOBAL'}) YIELD path WITH path return pathminLevel 最短路径maxL
2021-11-03 16:42:00
1115
原创 centos7 查看进程/链接IP/数组-循环-if/同一个用户多个组之间切换/修改目录下文件名/截取/md5/文件分割
查看进程树查看自己的进程查看进程运行目录2 查看当前机器的链接IP3 查看当前目录占用空间4 查看内存占用5 查看文件行数6 查看排序后的数据7 时间排序后查看8 同一个用户多个组之间切换9 修改目录所有者(及组)9.1 查询用户所属组9.2 用户组切换(非追加)9.3 查看组内用户10 scp文件传输例子11 字符替换11.1 删除文件第一行12 脚本后台运行(关闭窗口不停止)13 批量杀进程14 截取字符串(索引最后一个字符)...
2021-09-09 18:09:15
645
原创 linux笔记搜索grep
文本搜索 grep a a.txt文本搜索(反选) grep -v a a.txt文本搜索(行号) grep -n a a.txt文本搜索(显示匹配数) grep -c a a.txt
2021-08-18 11:21:53
95
原创 linux虚拟机快速配置IP用xshell链接-小记
[root@localhost ~]# cd /etc/sysconfig/network-scripts/[root@localhost network-scripts]# lsifcfg-enp0s3 ifdown-eth ifdown-isdn ifdown-sit ifup ifup-ib ifup-plip ifup-routes ifup-tunnel network-functions-ipv6ifcfg-lo .
2021-08-10 09:43:50
229
原创 记录一次JAVA-opencsv-读取文件(日期处理)
1 遇到问题:日期数据读取不到(原因注解使用错误)正确语法 @CsvBindByName(column = "valid since") @CsvDate("dd.MM.yyyy")2 官网截图http://opencsv.sourceforge.net/3 正确实体类定义 public class Employees { @CsvBindByName(required = true) private String username; @CsvBin
2021-07-08 18:41:17
1262
原创 idea辅助编码-快速生成-自用的部分整理
1、快速生成代码输出:sout ->System.out.println("111");变量定义:new Date().var ->Date date = new Date();实例化对象:Date.new ->new Date();main方法:psvm变量补全:“11”.var ->String s = "11";快速打印所有参数-方法:soutp ->System.out.println("args = " + Array
2021-06-26 10:48:28
191
1
原创 mysql将一列转成一行,字符串隔开
SELECT GROUP_CONCAT(CONCAT(’"’,id,’"’)separator ‘,’)from dual
2021-06-11 11:05:32
423
1
原创 nginx负载均衡配置错误记录
**错误配置**#user nobody;worker_processes 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events { worker_connections 1024;}http { sendfile on; tcp_nopush on
2021-06-10 17:48:01
485
原创 软考初级程序员背题记录
选择题-真题数据库系统中,构成数据模型的三要素是( 数据结构、数据操作、完整性约束 )下列传输介质中,带宽最宽、抗干扰能力最强的是( 光纤 )下列协议中,不属于TCP/IP协议簇的是( CSMA/CD )浏览器开启无痕浏览模式后,( 已下载文件 )依然会被保存下来下列网络互联设备中,工作在物理层的是( 集线器 )当出现网络故障时,一般应首先检查( 物理连通性 )在存储体系中,位于主存与CPU之间的高速缓存(Cache)用于存放主存中部分信息的副本,主存地址与Cach
2021-05-27 11:16:37
1165
原创 gbase语法迁移到达梦dm记录
TO_DATE(SYSDATE(),('yyyy-MM')) 代替 current year to monthTO_DATE(SYSDATE(),('yyyy')) 代替 current year to yearTO_DATE(SYSDATE(),('yyyy-MM-dd')) 代替 current year to dayTO_CHAR(SYSDATE(),('yyyy-MM')) 代替 current ...
2021-05-26 15:00:51
341
原创 Centos7排查异常CPU占用问题处理(似乎被拿来挖矿了)
1 定位问题top命令查看键入1查看2 排查异常进程id 我这边为54486lsof -p 54486ll /proc/54486/exe箭头后面是一个目录,里面放的是脚本3 排查定时任务注意:排查的时候排查执行 异常进程用户 的定时任务4 处理问题:第一:停掉定时任务,删除定时任务里面的内容(非自己定义的)第二:kill掉进程第三:删除定时任务中调用的文件...
2021-05-20 10:05:13
1208
原创 常见英语记录
It will respond with a JSON representation of a greeting, as the following listing shows它将用一个问候语的JSON表示来响应,如下清单所示You can customize the greeting with an optional name parameter in the query string, as the following listing shows您可以在查询字符串中使用可选的name参数自定义问候
2021-04-29 10:39:51
75
原创 解决centos7 上面部署springboot打包jar程序后 启动连接ORACLE经常报错问题
解决centos7 上面部署 jar程序后启动经常报错问题SolutionChange the setup for your application, so you add the next parameter to the java command:添加这一段 -Djava.security.egd=file:/dev/../dev/urandom启动命令改成nohup java -Xms512m -Xmx2048m -Dloader.path="lib/" -Djava.security
2021-04-23 11:12:39
450
原创 shell小工具-检查日志目录下log文件中err信息
1、创建check.sh#!/bin/bash#use: check log errif [[ ! -d "$1" ]]; then echo "folder is not exist!"else echo "结果如下:" result=$(grep "err" ${1}/*.log) if [ -z "$result" ]; then echo "备份成功" else
2021-04-16 10:26:49
704
原创 Plugin org.apache.maven.plugins:maven-clean-plugin:2.6.1 or one of its dependencies could not be res
报错信息记录Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project xxx: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean failed: Plugin org.apache.maven.plugins:maven-cl
2021-04-14 15:39:49
544
原创 简单http发送post请求,简化版,备忘
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.OutputStreamWriter;import java.net.HttpURLConnection;import java.net.URL;public class HttpHelp { /** * * @par
2021-04-09 14:31:21
226
原创 又忘记了springboot集成分页,记一下
好使的版本<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.5</version></dependency>不好使的版本<dependency> <groupId>
2021-04-06 10:59:31
77
原创 gitlab用户配置整理
1、清缓存删除保存在本地的git账户git credential-manager uninstall缓存账户git config --global credential.helper wincred删除保存在本地的git账户2、设置用户名git config --global user.name username3、设置邮箱 (注意:没有双引号)git config --global user.email aa@unissoft-grp.com4、存储信息git config --glo
2021-04-02 14:01:34
431
原创 java.lang.String.equals String为空测试记录
测试代码package com.util.common.test;public class EqualTest { public static void testOne(String str) { if ("Hello".equals(str)) { System.out.println("Yes"); } else { System.out.println("No"); } } public static void testTwo(String str) { i
2021-04-01 17:44:53
160
原创 ORACLE-12514遇到情况处理记录
1.切换用户su - oracle2.查看该实例的监听是否正常lsnrctl status3.切换到自己所用实例export ORACLE_SID=test4.在数据库安装机器登录dba用户sqlplus '/as sysdba'5.启动startup至此连接正常
2021-03-29 14:55:08
108
原创 并发笔记本
并发:多处理器编程的基本工具JAVA中并发特点:在顺序型语言的基础上提供对线程的支持案例多线程的应用:1…JAVA系统中的web库类,servlet;2…一个文件同时往多个目录拷贝3…作用:加快整个程序的执行速度...
2021-03-27 12:30:46
91
原创 java字符串处理最后一个符号(,)
public static void main(String[] args) { String str = "1,2,3,"; str = str.replaceAll(",$",""); System.out.println(str); String str1 = "1,2,3"; str1 = str1.replaceAll(",$",""); System.out.println(str1); }
2021-03-19 10:16:55
1850
原创 工作笔记(1)docker简单管理rabbit容器
创建容器docker run -d --hostname localhost --name rabbit2021 -p 5672:15672 rabbitmq:management启动docker start rabbitrabbit为容器名,有时候不好用,可以用容器IDdocker start c1972fea9c0b停止docker stop rabbitrabbit为容器名,有时候不好用,可以用容器IDdocker stop c1972fea9c0b查看日志docker
2021-03-15 17:06:44
101
原创 (面试笔记)hashCode和equals的区别
equals() 比较全面复杂,所以效率低hashCode() 只需要生成一个hash值就可以比较,效率高注意点:equals()相等的两个对象他们的hashCode()肯定相等,绝对可靠。hashCode()相等的两个对象他们的equals()不一定相等,不绝对可靠。...
2021-03-10 10:30:10
299
转载 springboot面试题收集(1)
1、什么是 Spring Boot?Spring Boot 是 Spring 开源组织下的子项目,是 Spring 组件一站式解决方案,主要是简化了使用 Spring 的难度,简省了繁重的配置,提供了各种启动器,开发者能快速上手。更多 Spring Boot 详细介绍请看这篇文章《什么是Spring Boot?》。2、为什么要用 Spring Boot?Spring Boot 优点非常多,如:独立运行 简化配置 自动配置 无代码生成和XML配置 应用监控 上手容易 …Spr
2021-03-09 09:54:25
99
原创 (MyBatis语法第2记) collection if foreach
<if test="stausValueList !=null and stausValueList.size > 0"> and d.value in <foreach item="item" collection="stausValueList" separator="," open="(" close=")" index=""> #{item} </foreach> </if...
2021-02-25 10:06:46
440
原创 Python小笔记_2_input函数
注意:下面代码中choice接收到的变量始终为 字符串案例choice = input('请选择:')if choice == '1' : print('欢迎您的到来') else: print('您可是被选中的人,不接受这个选择')
2021-01-25 12:24:13
111
原创 Python小笔记_1_类型转换
整数 int浮点数 float字符串 stra =1b = ‘1’c =1.0int 转 str:str(1)int 转 float :float(1)float 转 int:int(1.0)注意丢失精度float 转 str:str(1.0)str 转 int:int(‘1’)str 转 float:float(‘1.0’)**注意:字符串类型的浮点数转int 如 ‘1.3’ 转 int ,需要:int(float(‘..
2021-01-25 12:17:34
106
原创 EasyConnect使用后eclipse、idea连不上生产环境数据库及eureka问题
ECLIPSE**第三步的内容**:-Djava.net.preferIPv4Stack=true
2021-01-23 11:11:43
1882
3
freemarker版本Springboot-纯净版本
2020-07-17
rabbitmq离线安装必须rpm.zip
2019-11-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人