命令模式:将需要执行的流程封装成一个任务(命令),然后提交给执行器(命令执行者)执行。例如:JDK线程池里的Execultor就是采用了命令模式,Executor是命令执行者,Runnable是命令,Executor里的execute方法传入的参数就是Runnable,如下:Runnable负责定义任务的流程,Execultor负责执行任务命令。模式分析:1、命令模式和策略模式,我觉得完全可以作为
原创 2021-05-23 20:55:10
815阅读
策略模式:针对不同的情况和场景,使用相应的处理策略。不同的策略,处理的逻辑各不相同。例如;在JDK的线程池配置参数里面,就有一个拒绝策略的参数。这个拒绝策略是线程池最后保险机制,一旦线程池处理请求达到饱和就会触发拒绝策略,而线程池默认的拒绝策略就是丢弃策略(AbortPolicy),除此之外还有另外三种策略,如下图:这四种拒绝策略实现RejectedExecutionHandler接口,该接口定义
原创 2021-05-07 22:42:26
130阅读
git clone 报错:解决方法:1.查找网站IP2. 打开hosts文档并修改3.再次运行
原创 2022-12-27 12:32:45
586阅读
今天在使用git pull的时候出现了下面的错误:➜ bert_img git:(main) ✗ git pullfat
原创 2022-08-11 17:16:00
295阅读
文章目录项目场景:
原创 2021-11-30 14:09:42
3172阅读
正克隆到 ‘/Users/xxx/.oh-my-zsh’…fatal: 无法访问 ‘https://github.com/ohmyzsh/ohmyzsh.git/’:Failed to connect to 127.0.0.1 port 10
原创 2022-07-11 10:46:53
851阅读
不一定成功,但请先试试
原创 2022-03-28 16:17:40
564阅读
出现错误:unable to access 'https://github.com/xxx/xxx.git: Failed to connect to github.com port 443‘原因是没有输入指定用户名和密码:打开终端,切换到git目录(我的是/home/steven/.git)sudo gedit config把url = https://github.com/xxx/xxx.gi
原创 2023-03-05 06:49:53
3481阅读
rsync: failed to connect to 192.168.2.19: Connection refusedrsyn
原创 2022-11-22 00:13:18
310阅读
报错:rsync: failed to connect to x.x.x.x: Connection refused (111)解决:服务端(被同步端的rsync没有开启)# ps -ef|grep rsync(发现没有服务)# rsync --daemon(即可)
原创 2016-08-04 17:07:44
7175阅读
在Kubernetes环境中,如果出现"nginx connect() failed"的错误,通常是由于Nginx服务无法连接到其他服务导致的。这可能是由于网络配置不正确、服务未正常启动、端口被占用等问题引起的。为了解决这个问题,我们可以通过一系列步骤来排查和修复。 首先,让我们来看一下整个解决问题的流程: | 步骤 | 操作 | |------|------| | 1 | 检查网络配置
原创 2024-05-07 10:05:16
352阅读
今天整理github,初次使用,很多都不懂,所以遇到了克隆失败的问题,研究了大半天,后来。。。。。 打开Git Bash,克隆已有工程到本地: $ git clone https://github.com/zh-ya-jing/learn_robotium.gitCloning into 'lear
转载 2024-03-26 12:55:07
216阅读
> git pull --tags origin mainfatal: unable to access 'https://github.com/......git/': Failed to conne
原创 2022-07-04 21:09:47
537阅读
git 克隆报链接拒绝
原创 2023-07-09 18:30:21
1450阅读
咋啥也不知道,莫名就出现了 Failed to connect to github.com port 443: Timed out 于是我果断百度,发现如下解决办法 git config --global http.proxy http://127.0.0.1:1080 git config --g ...
转载 2021-07-23 14:35:00
10000+阅读
2评论
今天在git push东西的时候发现超时了,找了好多办法也解决不了,后面发现配置一下hosts就行了,所以分享一下
原创 2022-08-11 17:12:25
560阅读
操作流程st@stdeMacBook ~ % sh -
原创 2022-09-13 12:37:59
939阅读
response = requests.post(url, json=input) try: result = response.json() return result except requests.exceptions.RequestException: response.raise_for_status()import
原创 2024-04-28 16:12:02
0阅读
输出 关闭安卓端Wi-Fi,重新打开连接即可
转载 2018-11-26 16:17:00
1062阅读
1.连接超时,首先找到git的安装目录,找到/etc/ssh/ssh_config文件Host github.comUser
原创 2022-11-04 09:52:01
385阅读
  • 1
  • 2
  • 3
  • 4
  • 5