![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
其他
没有分类的专栏
代码手艺人老羊
闲鱼程序员
展开
-
chrome 模拟发送POST请求和GET请求
浏览器模拟POST和GET请求原创 2022-12-14 15:22:24 · 4271 阅读 · 1 评论 -
Linux Shell 定时删除某几天前文件夹下文件
脚本#!/bin/shecho '清除文件开始';find /tmp/email -mtime +1 -name "*.*" -exec rm -Rf {} \;echo '清除文件结束';命令解释/tmp/email:准备要进行清理的任意目录-mtime:标准语句写法+1:查找1天前的文件,+7表示查找7天前的文件"*.*":希望查找的数据类型,"*.doc"表示查找扩展名为doc的所有文件,"*"表示查找所有文件-exec:固定写法rm -rf:强制删除文件,包括原创 2022-02-17 14:10:45 · 2499 阅读 · 1 评论 -
windows升级之后,任务栏特别卡及原因分析
原因分析如果电脑出现任务栏特别卡,重启也不管用的情况下,把网络断掉,任务栏恢复正常,则说明:任务栏有问题,多半是windows10升级导致的,原因很可能是由于任务栏加载资讯请求不到网络,导致任务栏卡死的。解决办法在断网的情况下,在任务栏右键,把资讯和兴趣关闭掉。总结别瞎升级,也别瞎重装系统,没招了再重装系统,尤其你的办公电脑。...原创 2022-01-19 09:25:04 · 2618 阅读 · 0 评论 -
nginx常用location配置
直接转发location / { proxy_pass http://ip+端口;# 转发的上游地址 proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; client_max_body_size 1原创 2022-01-04 15:45:19 · 709 阅读 · 0 评论 -
曲率以及曲率半径推导
原创 2021-10-29 13:49:48 · 1443 阅读 · 0 评论 -
Linux解压安装Nginx
1、下载nginxhttps://nginx.org/download/如:nginx-1.9.9.tar.gz2、安装依赖yum -y install gcc pcre-devel zlib-devel openssl openssl-devel3、解压安装nginx-1.9.9.tar.gz解压tar -zxvf nginx-1.9.9.tar.gz进入nginx目录cd nginx-1.9.9配置./configure --pref原创 2021-10-11 15:48:29 · 1114 阅读 · 0 评论 -
国产网关apisix安装
1、安装相关依赖安装openrestya、添加官方源仓库yum install -y yum-utilsyum-config-manager --add-repo https://openresty.org/package/centos/openresty.repob、安装openrestyyum install -y openresty2、安装yum方式安装apisixsudo yum install -y https://github.com/apache/apis原创 2021-08-11 10:07:05 · 272 阅读 · 0 评论 -
centos7安装docker
1、安装dockeryum install docker2、docker服务启动systemctl start docker.service3、docker开启启动systemctl enable docker.service原创 2021-08-09 14:45:21 · 121 阅读 · 0 评论 -
Linux中java与系统时间相差8个小时
可以验证一下系统的时间是否和本地区的时间一致:echo "时间是:`date '+%Y-%m-%d %H:%M:%S'`"如果是对的,可以执行以下脚本timedatectl set-timezone Asia/Shanghai原创 2021-06-24 15:33:22 · 525 阅读 · 0 评论 -
nginx 启动、重启、配置重新加载
1.首先利用配置文件启动nginx。命令:nginx-c/usr/local/nginx/conf/nginx.conf或重启服务service nginx restart或nginx2.快速停止或关闭Nginx:nginx -s stop3. 正常停止或关闭Nginx:nginx -s quit4. 配置文件修改重装载命令:nginx -s reload...原创 2021-05-14 14:05:35 · 9057 阅读 · 0 评论 -
Git配置多个SSH-Key
背景当有多个git账号时,比如:a. 一个gitee,用于公司内部的工作开发;b. 一个github,用于自己进行一些开发活动;背景当有多个git账号时,比如:a. 一个gitee,用于公司内部的工作开发;b. 一个github,用于自己进行一些开发活动;1、生成一个公司用的SSH-Keyssh-keygen -t rsa -C 'xxxxx@company.com' -f ~/.ssh/gitee_id_rsa2、生成一个github的SSH-Keyssh-ke原创 2021-05-14 09:18:01 · 143 阅读 · 0 评论 -
gitlab仓库代码转移到新的分组
代码仓库地址codeA已经存在于一个分组中比如groupA,现在需要转移到分组groupB:1、groupB新建一个仓库比如:codeB2、进入原来本地代码仓库地址cd existing_repo3、执行命令git remote rename origin old-origin4、指定新的仓库git remote add origin git@仓库地址自己替换/codeB.git5、推送代码git push -u origin --allgit push ...原创 2021-03-29 09:30:17 · 4481 阅读 · 0 评论 -
Windows10下安装Git
Git是一个开源的分布式版本控制系统,可以有效、高速的处理从很小到非常大的项目版本管理。具体安装步骤如下:第一步:先从官网下载最新版本的Git官网地址:https://git-scm.com/downloads点击上图中表示的地方进行下载,得到Git-2.17.1.2-64-bit.exe文件。如果你的系统是32位的,可以通过如下方式下载:第二步:双击下载好的git安装包,...转载 2020-02-16 13:21:43 · 537 阅读 · 0 评论 -
git常用命令
1. git 仓库clone#仓库clonegit clone git@github.com:15902124763/go-learning.git2. 查看当前分支#高亮显示的是当前分支,Linux 是分支前带*git branch3. 从本地master切分支#feature_demo_20191226是切出的新的分支名称git branch feature_d...原创 2019-12-26 11:09:43 · 167 阅读 · 0 评论 -
git 删除本地提交文件夹如.idea
$ git --help# 帮助命令$ git pull origin master# 将远程仓库里面的项目拉下来$ dir# 查看有哪些文件夹$ git rm -r --ca...原创 2019-08-24 10:46:43 · 2157 阅读 · 0 评论 -
maven常用配置
1. setting.xml中配置默认jdk:在profiles标签中加入<profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> &...原创 2019-12-05 17:43:51 · 113 阅读 · 0 评论 -
maven打包编GBK码报错
mvncleanpackage报错:[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ ipay-service ---[INFO] Changes detected - recompiling the module![WARNING] File encoding has not been set, usi...原创 2019-12-04 17:13:09 · 368 阅读 · 0 评论 -
maven 多个模块指定一个模块打包
mvn clean package install -pl 指定的模块名 -am这个不仅install 到target目录下也会install到本地仓库。mvn clean package -pl 指定的模块名 -am这个打包到target目录下...原创 2019-08-22 10:04:05 · 6759 阅读 · 2 评论 -
httpclient中文乱码返回Unicode解决方法之一(参考)
发现用EntityUtils用toString方法utf-8编码并不起作用,最后用JSONObject.parseObject试了一波ok了Apache httpclient乱码返回entity,解决方法:用 org.apache.http.util包下的EntityUtils类entity = EntityUtils.toString(response.getEntity(), "...原创 2019-05-24 18:13:55 · 9752 阅读 · 9 评论 -
基于golang发送Post和Get请求
1. http的服务端可以参照之前写的文章https://blog.csdn.net/HelloWorldYangSong/article/details/1042651242. 发送POST和Get请求package httpimport ( "bytes" "encoding/json" "io" "io/ioutil" "net/http" "time")...原创 2020-02-11 16:37:40 · 1014 阅读 · 0 评论 -
基于HttpClient的http请求封装(含json格式)
1.依赖 <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.5</version> </d...原创 2019-11-22 17:37:51 · 2394 阅读 · 5 评论 -
golang、java和php实现32位md5加密
php版本如下<?php$str = "Shanghai";echo md5($str);?>java版本如下:package com.yarm.task.common.utils;import org.apache.commons.lang3.StringUtils;import java.security.MessageDigest;import j...原创 2019-08-18 12:59:26 · 1596 阅读 · 1 评论 -
springboot基于quartz实现的定时任务
用quartz实现定时任务的好处是:1、quartz做了大量的封装;2、便于任务的管理;3、可以基于其api对任务随时启动和关闭、或修改执行任务的时间。一、设计思路通过JobInit类的run()方法初始化任务,如下图任务的实现,通过实现job接口,如下图在实现方法execute中写业务逻辑二、数据库设计1、新建数据库:库名:boot-task...原创 2019-08-11 20:12:07 · 583 阅读 · 0 评论 -
Linux中kafka和zookeeper安装
kafak的安装需要安装zookeeper。一、zookeeper安装1、下载https://zookeeper.apache.org/2、解压sudo tar -zxvf apache-zookeeper-3.5.5-bin.tar.gz -C /usr/local/3、进入加压目录重命名zookeepercd /usr/local/sudo mv apache...原创 2019-08-11 13:46:08 · 941 阅读 · 0 评论 -
golang连接数据库报错
golang连接数据库报错:unknown driver \"mysql\" (forgotten import?)]第一步:go get github.com/Go-SQL-Driver/MySQL第二步:go install github.com/Go-SQL-Driver/MySQL原创 2019-07-31 14:02:06 · 612 阅读 · 0 评论 -
go之基础-常量、for、while、if、switch
一、常量常量的声明与变量类似,只不过是使用 const 关键字。常量可以是字符、字符串、布尔值或数值。常量不能用 := 语法声明。如下:package mainimport "fmt"const King = "I am King"func main() { const INT_CONST = 11 fmt.Println("数值", INT_CONST) fmt....原创 2019-04-11 11:47:55 · 519 阅读 · 0 评论 -
go之基础-go包引入、函数、变量
一、go的包引入go的引入通过import关键字引入如:import ( "fmt" "math")或import "fmt"import "math"go的包引入,在调用方法或者变量时,需要首字母大写才可被调用,如package mainimport "fmt"import "math"func main() { //以下代码不可执行,供参考...原创 2019-04-02 13:25:38 · 1266 阅读 · 0 评论 -
springboot 通过screw生成数据库文档
引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.sp.原创 2020-09-24 16:24:00 · 399 阅读 · 0 评论 -
Springboot基于Aop日志拦截接口
依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency>...原创 2020-01-15 18:06:01 · 641 阅读 · 0 评论 -
Springboot AOP自定义注解方式和日志应用demo
1.引用依赖基于springboot <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> <...原创 2019-10-31 18:10:26 · 195 阅读 · 0 评论 -
springboot基于elasticsearch(es)做搜索
es的安装我这里不做详细介绍了,我是通过logstash将mysql的数据导入到es中的,具体怎么做的话后续会写相应的博客。以下是具体的代码实现SpringBoot和es的整合。第一步、导入maven依赖:springBoot的版本 <parent> <groupId>org.springframework.boot</grou...原创 2019-01-17 21:54:12 · 2106 阅读 · 2 评论 -
VUE v-if 和v-else-if页面加载出现闪现解决方法
vue中v-if 和v-else-if在页面加载的时候,不满足条件的标签会加载然后再消失掉,如果要解决这个问题,案例如下:vue html代码块:<div id="divApp"> <div v-if="type === 'A'" v-cloak> A </div> <div v-else-if="type...原创 2018-09-07 17:44:38 · 8505 阅读 · 3 评论 -
java实现希尔排序
希尔排序概念不做介绍,数据结构之类的书上都有,或者Google百度。以下是代码:package com.yarm.test;public class ShellSortTest { /** * 希尔排序 * 时间复杂度:O(n^2) * @param a */ public static <AnyType extends Comparable<? s...原创 2018-08-01 11:47:08 · 149 阅读 · 0 评论 -
SpringBoot和hadoop组件Hive的集成(填坑)
说实话,SpringBoot和Hive的集成还是有不少坑的,最主要的坑就是jar包冲突的问题,这个坑我这里添了我遇到的坑,我提供了源码,放在后边的链接中,以下是部分的代码。1.上maven依赖,如下:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSche...原创 2018-07-26 17:19:30 · 9514 阅读 · 15 评论 -
Spring 学习,看松哥这一篇万余字干货就够了!
1. Spring 简介我们常说的 Spring 实际上是指 Spring Framework,而 Spring Framework 只是 Spring 家族中的一个分支而已。那么 Spring 家族都有哪些东西呢?Spring 是为了解决企业级应用开发的复杂性而创建的。在 Spring 之前,有一个重量级的工具叫做 EJB,使用 Spring 可以让 Java Bean 之间进行有效的解耦,而这个操作之前只有 EJB 才能完成,EJB 过于臃肿,使用很少。Spring 不仅仅局限于..转载 2020-06-22 14:20:38 · 341 阅读 · 2 评论 -
Spring源码分析笔记之读取配置文件加载bean
1. Spring版本:5.2.5.RELEASE2. 引入依赖直接下载spring的源码看的比较累,这是实话,spring的源码量实在是太大了,看了好多大神写的spring源码的博客,如果一行行的啃源码还是蛮辛苦,虽然源码的目录结构非常的清晰,但是还是想通过引入spring的依赖,通过单元测试走debug的模式,阅读起来相对轻松一点,也免得枯燥、也更有成就感。 <dep...原创 2020-04-29 14:27:39 · 262 阅读 · 0 评论 -
spring源码下载用gradle编译
1.安装gradle地址:https://gradle.org/releases/环境变量:GRADLE_HOME=D:\develop\tools\gradle\gradle-6.3path=%GRADLE_HOME%\bin成功:2.源码地址官方地址:https://spring.io/projects/spring-framework#learn点击下方G...原创 2020-04-24 15:54:19 · 492 阅读 · 0 评论 -
SpringBoot和Mybatis整合
主要介绍springBoot如何整合Mybatis,其实很简单最重要的是引入maven的依赖和一个扫描注解:@MapperScan("com.yarm.mybatis.mapper")这个扫描mapper的包名。1.引入依赖<!--Mybatis--><dependency> <groupId>org.mybatis.spring.b...原创 2018-07-25 16:43:04 · 397 阅读 · 0 评论 -
SpringBoot和Redis整合
主要介绍用SpringBoot和Redis整合,这里先介绍,单个节点redis整合方式,redis集群可依次类推,但需要自己增加部分代码。1.引入maven依赖<!--这个必不可少--> <parent> <groupId>org.springframework.boot</groupId> <artifactId&...原创 2018-07-25 16:14:25 · 237 阅读 · 0 评论 -
多线程“死锁”之“哲学家就餐”代码实现
死锁:就是两个或者两个以上的线程相互占用对方的需要的资源,而不进行释放,导致彼此都在等待对方释放资源,产生了无限制的等待的现象。“哲学家就餐”的问题不在赘述,可以自行百度或者Google,以下是代码。package com.yarm.test;/** * * @ClassName: DeadLock * @Description: 死锁模拟 * @Company:小松鼠课堂...原创 2018-07-22 12:15:03 · 648 阅读 · 0 评论