- ALL
- java33
- linux32
- 工具17
- 其他15
- 数据库7
- ai5
- git5
- vue5
- nas5
- 前端5
- framework3
- windows3
- 脚本2
- app2
- docker2
- hexo2
- 智能家居2
- maven2
- 小程序2
- spring2
- api1
- 资源1
- mysql1
- markdown1
- 安全1
- question1
- python1
- 数据传输1
- 运维1
- 数据结构1
- nginx1
常用正则
一、常用正则表达式 24小时制时间(HH:mm:ss) 1/^((?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$)/ 12小时制时间(hh:mm:ss) 1/^(1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d$/ base64格式 1/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!&',()\*+;=\\-.\_~:@\\/?%\\s\]\*?)\\s\*/i 数字/货币金额(支持负数、千分位分隔符) 1/(^[-]?[1-9]\d{0,2}(∣(,d3)\*(|(,\\d{3})\*(∣(,d3)\*(|(\.\d{1,2}))))|((^\[0\](\\.\\d{1,2})?)|(^\[-\]\[0\]\\.\\d{1,2}))/ 数字/货币金额...
在CenterOS中搭建ftp服务
使用yum安装ftp服务 1yum install vsftpd ftp服务的开启与关闭命令 123456789# 开启service vsftpd start # 关闭service vsftpd stop # 设置为开机启动chkconfig vsftpd on 在linux中添加ftp用户,并设置相应的目录权限 1234567891011useradd -d /home/ftpuser ftpuser // 指定此用户的主目录即家目录。passwd ftpuser //为ftpuser 设置密码# 可更改主目录usermod -d /opt/FTP ftpuser //更改用户ftpuser的主目录为/opt/FTP# 更改用户相应的权限设置 # 限定用户ftpuser不能telnet,只能ftpusermod -s /sbin/nologin ftpuser # 当然如果想恢复为正常用户,可以执行以下命令:usermod -s /sbin/bash...
在CenterOS中安装rabbitmq
安装GCC GCC-C++ Openssl等模块 1yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel 安装ncurses 1yum -y install ncurses-devel 安装erlang环境 1234wget http://erlang.org/download/otp_src_18.2.1.tar.gztar xvfz otp_src_18.2.1.tar.gz ./configure make install 安装RabbitMQ,下载rabbitmq-server-3.6.9.tar.xz 1wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-generic-unix-3.6.9.tar.xz 对于下载xz包进行解压,首先先下载xz压缩工具: 1yum install xz 对rabbitmq包进行解压: 12xz -d...
在CenterOS中安装maven
下载软件包 1234# 20180921最新安装包版本3.5.4,下载二进制包,解压即可使用mkdir -p /server/toolscd /server/tools/wget https://mirrors.cnnic.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz --no-check-certificate 解压安装maven软件包 123456tar -xf apache-maven-3.5.4-bin.tar.gz mv apache-maven-3.5.4 /usr/local/maven# 与jenkins联合使用时,jenkins会到/usr/bin/下找mvn命令,如果没有回报错ln -s /usr/local/maven/bin/mvn /usr/bin/mvn ll /usr/local/maven/ll /usr/bin/mvn 配置环境变量 1234567echo " ">>/etc/profileecho "#...
mysql双机热备
1.服务器准备 主服务器:192.168.100.161 从服务器:192.168.100.162 2. 主服务器Master配置 2.1 创建同步用户 进入mysql操作界面,在主服务器上为从服务器建立一个连接帐户,该帐户必须授予REPLICATION SLAVE权限。 操作指令如下: 1grant replication slave on *.* to 'replicate'@'192.168.100.162' identified by '密码'; 密码按需求设置。 1flush privileges; 创建好同步连接帐户后,我们可以通过在从服务器(Slave)上用replicat帐户对主服务器(Master)数据库进行访问下,看下是否能连接成功。 在从服务器(Slave)上输入如下指令: 1mysql -h192.168.100.161 -ureplicate -p密码 登录成功,说明可以对这两台服务器进行双机热备进行操作。 2.2...
java根据模板导出word
根据一个word模板,在程序中替换模板中的参数,然后根据这个模板导出word文件。 引入POI对word操作的依赖 12345<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> ...
CenterOS下安装jenkins
1.安装 jenkins 通过下载镜像安装 123456789101112sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.reposudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.keyyum --disablerepo=pgdg94 install epel-release # repository that provides 'daemonize' yum --disablerepo=pgdg94 install java-11-openjdk-devel# 在线安装yum --disablerepo=pgdg94 install -y jenkins# 或 离线rpm安装https://github.com/jenkinsci/jenkins/releasesrpm -ivh jenkins-2.313-1.1.noarch.rpm 2....
搭建maven私库
前言 有三种比较流行的 Maven 仓库管理软件可以创建私服,Apache基金会的 Archiva,JFrog 的 Artifactory ,Sonatypec 的 Nexus 下载Nexus 下载 启动命令 1./nexus start 默认账号密码 帐号:admin,密码:位于登录页面提示文件夹 添加新的代理源 Cache统一设置为200天 288000 常用代理添加 12345678910111213141516171819201. aliyunhttp://maven.aliyun.com/nexus/content/groups/public2. apache_snapshothttps://repository.apache.org/content/repositories/snapshots/3. apache_releasehttps://repository.apache.org/content/repositories/releases/4....
在CenterOS中安装minio文件服务器
下载与启动 123wget https://dl.minio.io/server/minio/release/linux-amd64/miniochmod +x minio./minio server /home/data 启动后会打印出AccessKey和SecretKey等信息 后台运行 1nohup /usr/local/bin/minio server /home/minio/data > /home/minio/data/minio.log 2>&1 & 自定义MINIO_ACCESS_KEY和MINIO_SECRET_KEY 123export MINIO_ACCESS_KEY=miniouserexport MINIO_SECRET_KEY=123456789./minio server /home/data 自定义端口号 1234567891011121314151617# 启动./minio server --address IP:PORT /home/data# 文件夹路径export...
java8 lamdba使用示例
使用示例 首先将下方附录中json数据转换为List,使用的是hutool中的JSONUtil工具类 1List<Demo> personList = JSONUtil.toList(JSONUtil.parseArray(json), Demo.class); 主键 姓名 分数 课程名称 教师名称 1 张三 56 语文 语教一 2 张三 78 数学 数教一 3 李四 99 语文 语教一 4 李四 23 数学 数教二 5 王五 87 语文 语教一 6 王五 59 数学 数教一 7 王五 65 英语 英教一 条件过滤 12// 过滤分数大于60的学生List<Demo> filterPersonList = personList.stream().filter(a -> a.getScore() >...