自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(540)
  • 资源 (5)
  • 收藏
  • 关注

原创 LeetCode 报错解决 heap-buffer-overflow Heap-use-after-free Stack-buffer-overflow Global-buffer-overflow

文章目录前言Heap-buffer-overflowHeap-use-after-freeStack-buffer-overflowGlobal-buffer-overflow前言在做LeetCode题时发现一个有趣的事情。对于C语言来说,如果直接访问超出Index的数组,会报错:int main(int argc, char **argv) { int array [100];...

2019-03-24 12:20:38 55283 22

转载 GNS3安装和使用教程

使用 GNS3 软件模拟 IOS 指南2018 版(转载自浙江大学)一、 准备工作GNS3 软件支持虚拟机模式和物理机模式,我们建议使用虚拟机模式, 因此在正式安装 GNS3 软件前,请在你的电脑上准备好虚拟机软件。推荐使用 VMware 软件。Windows 环境下推荐安装 VMware Workstation 12 以上,Mac 环境下推荐安装 VMware Fusion 8 以上。...

2019-01-13 09:38:23 150208 31

原创 anaconda: import numpy报错:ImportError: DLL load failed: 找不到指定的模块。

我的numpy的版本是1.15.1,我使用的是anaconda环境。今天在导入numpy库时遇到了一个出乎意料的错误>>> import numpyTraceback (most recent call last): File "C:\Users\peter\AppData\Local\Continuum\anaconda3\lib\site-packages\nump...

2018-12-07 11:38:48 42618 23

原创 解决tensorflow报错ValueError: Variable conv1/weights already exists, disallowed.

早上在跑别人的tensorflow代码时报错:Traceback (most recent call last): File "<ipython-input-23-712e8e1f026f>", line 1, in <module> runfile('C:/Users/peter/Downloads/tensorflow

2018-11-03 11:54:22 21371 28

原创 分布式锁的使用与注意事项

此文首发于我的Jekyll博客:zhang0peter的个人博客此文是2021年第一篇博客,计划每2周写一篇博客。分布式锁的使用与注意事项分布式锁介绍最近项目需要用到分布式锁,在网上看了挺多写分布式锁的文章,于是打算写一篇关于分布式锁的文章。单机的服务不需要用分布式锁,多线程抢夺同一资源,在内存中使用锁就可以了。分布式锁适用于多台机器抢夺同一资源。多台机器抢夺同一资源一般有以下情况:1.微服务系统中,同一个接口同样的参数可能会被上游连续调用2次,想要保护自身系统的一致性和幂等性,在接口入口处

2021-01-15 23:07:49 1911

原创 IDEA-Java自动生成单元测试

此文首发于我的Jekyll博客:zhang0peter的个人博客最近在写单元测试,感觉写Mock写烦了,于是想看看有没有现成的spring项目的单元测试生成工具。网上找到了一个Java单元测试回答的集合:Automatic generation of unit tests for Java? - Stack OverflowSquaretest官网:Squaretest - Java Unit Test Generator for IntelliJ IDEA安装方法是从IDEA插件仓库中安装Sq

2020-08-06 08:10:39 10545 4

原创 Qt最新版5.14在Windows环境静态编译安装和部署的完整过程 VS 2019-Qt static link build Windows 32 bit/64 bit

文章目录为什么要静态编译(static link)1.源码下载/source code download2. 编译工具下载/compiler download编译环境选择:MinGW/MSVCPerlPythonRuby3.编译1.修改源码里的`qtbase\mkspecs\common\msvc-desktop.conf`文件2.配置config文件:3.make4.make install4....

2020-03-25 16:54:24 8575 15

原创 Java-JVM虚拟机内存垃圾回收机制gc入门:引用类型,对象标记算法,回收算法,常见的 garbage collector

文章目录GC的优缺点引用的四种类型对象标记算法引用计数法可达性分析法回收算法标记-清除算法(Mark-Sweep)复制算法标记-整理算法(Mark-Compact)分代收集算法常见的 GC collector后记此文首发于我的Jekyll博客:Java-JVM虚拟机内存垃圾回收机制gc入门:引用类型,对象标记算法,回收算法,常见的 garbage collectorGC的优缺点Java对比...

2020-02-13 16:38:34 835 1

原创 LeetCode 1242. Web Crawler Multithreaded--Java 解法--网路爬虫并发系列--ConcurrentHashMap/Collections.synchroni

此文首发于我的Jekyll博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Web Crawler Multithreaded - LeetCodeGiven a url startUrl and an interface HtmlParser, implement ...

2020-02-12 10:12:47 1659

原创 LeetCode 1195. Fizz Buzz Multithreaded--并发系列题目--Java 解法--AtomicInteger/CountDownLatch/CyclicBarrier

此文首发于我的Jekyll博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Fizz Buzz Multithreaded - LeetCodeWrite a program that outputs the string representation of numb...

2020-02-11 17:32:50 1345

原创 LeetCode 1188. Design Bounded Blocking Queue--并发系列--Java 解法--设计有界阻塞队列--使用ArrayBlockingQueue和LinkedLi

此文首发于我的Jekyll博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Design Bounded Blocking Queue - LeetCodeImplement a thread safe bounded blocking queue that has ...

2020-02-10 16:07:52 1366 1

原创 LeetCode 92. Reverse Linked List II--Python 解法--反转部分链表--笔试算法题

此文首发于我的个人博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Reverse Linked List II - LeetCodeReverse a linked list from position m to n. Do it in one-pass.Note...

2020-02-10 10:21:57 624

原创 nodejs报错解决:Error: Can only perform operation while paused. - undefined

此文首发于我的Jekyll博客:zhang0peter的个人博客下午在用nodejs进行调试时遇到报错:debug> nThrown:Error: Can only perform operation while paused. - undefined at _pending.<computed> (internal/deps/node-inspect/lib/...

2020-02-07 15:43:30 887

原创 Linux/ubuntu:Chrome报错解决: error while loading shared libraries: libnss3.so libXss.so.1 libasound.so.

此文首发于我的Jekyll博客:zhang0peter的个人博客下午在用nodejs在linux上操作puppeteer/chromium/chrome时报错如下:-> # node search.js count is 1(node:15360) UnhandledPromiseRejectionWarning: Error: Failed to launch the brows...

2020-02-07 15:11:39 10625

原创 Linux/Debian/Ubuntu报错解决:W: Target Packages (main/binary-amd64/Packages) is configured multiple times

此文首发于我的Jekyll博客:zhang0peter的个人博客今天在ubuntu上更新库(apt update)的时候遇到了报错:-> # apt update Hit:1 http://mirrors.zju.edu.cn/ubuntu bionic InReleaseHit:2 https://mirrors.aliyun.com/kuberne...

2020-02-07 14:15:07 19918 1

原创 Java数组排序: Array-ArrayList-List-Collections.sort()/List.sort()/Arrays.sort()

文章目录ArrayList/List 的排序:Collections.sort()/List.sort()Array 的排序:Arrays.sort()此文首发于我的Jekyll博客:zhang0peter的个人博客之前写了一篇博客:Java:获取数组中的子数组的多种方法现在在做LeetCode题目时想要对数组进行排序,于是想到Java中是否存在C++的标准库中的std::sort()。...

2020-02-07 10:02:07 699

原创 LeetCode 309. Best Time to Buy and Sell Stock with Cooldown--Java解法-卖股票系列题目

此文首发于我的Jekyll博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Best Time to Buy and Sell Stock with Cooldown - LeetCodeSay you have an array for which the ith ...

2020-02-06 10:49:33 398

原创 从LeetCode 679. 24 Game--C++ 解法--二十四点 到穷举24点所有可能性-24点大全

从LeetCode 679. 24 Game–C++ 解法–二十四点 到穷举24点所有可能性此文首发于我的个人博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:24 Game - LeetCodeou have 4 cards each containing a n...

2020-02-04 11:13:15 866

原创 Android studio 报错解决:Error:SSL peer shut down incorrectly

此文首发于我的Jekyll博客:zhang0peter的个人博客很久没用 Android studio 了,刚刚在打开一个项目的biuld过程中报错:SSL peer shut down incorrectly具体的报错内容放文章结尾处。这个报错很多人遇到,网上的一个解决方法是把配置文件gradle-wrapper.properties中的distributionUrl参数从https...

2020-02-03 20:10:16 11911

原创 免费视频转文字-音频转文字软件:网易见外工作台, Speechnotes, autosub, Speech to Text, 百度语音识别

百度语音识别API百度AI开发平台提供免费的语音识别API接口:百度智能云-管理中心注册后获得百度提供REST API和完整的SDK,其中REST API 仅支持整段语音识别的模式,即单段语音音频时长不超过60s;完整的SDK识别不限时长。本来想用linux-C+±SDK,下载:百度AI开放平台-全球领先的人工智能服务平台-百度AI开放平台但这个SDK只支持g++4.8和x64,无语了。...

2020-02-03 14:22:42 10576 1

原创 LeetCode 41. First Missing Positive--Python 解法--数学题-找到不存在的最小正整数-O(1)空间复杂度

此文首发于我的Jekyll博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:First Missing Positive - LeetCodeGiven an unsorted integer array, find the smallest missing posi...

2020-02-02 15:50:07 634

原创 LeetCode 399. Evaluate Division--Python-DFS解法

LeetCode 399. Evaluate Division–Python-DFS解法此文首发于我的个人博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Evaluate Division - LeetCodeEquations are given in the ...

2020-02-02 10:17:46 581

原创 k8s免安装-使用kubectl部署Pod, Deployment, LoadBalancer

此文首发于我的Jekyll博客:zhang0peter的个人博客如果你想要从零开始搭建自己的k8s集群参考我的这篇博客,预计花费时间为1天:从零开始在ubuntu上安装和使用k8s集群及报错解决自己搭建k8s集群的难点之一是需要3台ubuntu虚拟机,要求电脑至少10G内存:操作系统4G内存,3台虚拟机需要6G内存。另一个难度是对初学者来说,搭建太复杂了。如果你不想手动搭建集群,只想体验...

2020-02-01 18:58:04 1645 2

原创 Python-anaconda-Spyder使用matplotlib画图无法显示报错解决:Figures now render in the Plots pane by default. To mak

此文首发于我的Jekyll博客:zhang0peter的个人博客晚上在用anaconda的Spyder IDE,用 matplotlib 画图时不会显示图片在iPython终端中,报错如下:Figures now render in the Plots pane by default. To make them also appear inline in the Console, unche...

2020-01-31 20:24:22 31520 23

原创 从零开始在ubuntu上安装和使用k8s集群及报错解决

文章目录安装docker安装kubernetes配置k8s集群配置虚拟机网络配置Master节点的k8s网络拉取k8s需要的镜像启动 kubeadm 和 kubelet配置 node节点部署应用报错解决此文首发于我的个人Jekyll博客:zhang0peter的个人博客这几天在学习K8S的安装和使用,在此记录一下此文参考了视频教程:两小时Kubernetes(K8S)从懵圈到熟练——大型分...

2020-01-30 20:01:04 5125

原创 LeetCode 207. Course Schedule--有向图找环--面试算法题--DFS递归,拓扑排序迭代--Python

LeetCode 207. Course Schedule–有向图找环–面试算法题–DFS递归,拓扑排序迭代–Python此文首发于我的个人博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Course Schedule - LeetCodeThere are a ...

2020-01-29 14:16:13 1310 1

原创 数据结构线段树介绍与笔试算法题-LeetCode 307. Range Sum Query - Mutable--Java解法

此文首发于我的个人博客:zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结线段树(Segment Tree)常用于解决区间统计问题。求最值,区间和等操作均可使用该数据结构。线段树的最简单的实现是通过数组(通过数组是为了让查找单个元素可以在O(1)的时间内做到),就像最小堆可以用数组实现...

2020-01-28 15:12:15 473

原创 jekyll静态博客提升访问速度:内嵌CSS,异步加载js,压缩HTML

此文首发于我的个人博客:jekyll静态博客提升访问速度:内嵌CSS,异步加载js,压缩HTML — zhang0peter的个人博客在谷歌搜索的功能速度(实验性)中推荐使用工具PageSpeed Insights查看我的网页访问速度情况:PageSpeed Insights测试结果:PageSpeed Insights of zhang0peter.com分数很低,只有33分。优化建...

2020-01-27 16:02:45 1937

原创 用snap在ubuntu上构建 Microk8s,使用kubectl,部署应用

此文首发于我的个人博客:用snap在ubuntu上构建 Microk8s,使用kubectl,部署应用 — zhang0peter的个人博客最近在学习k8s,也就是Kubernetes的使用。在登录ubuntu的终端时出现了Microk8s的广告: * Overheard at KubeCon: "microk8s.status just blew my mind". http...

2020-01-27 16:00:00 2897 1

原创 GitHub-jekyll静态博客快速构建与优化--jekyll serve --incremental --profile

此文首发于我的个人博客:GitHub-jekyll静态博客快速构建与优化–jekyll serve --incremental --profile — zhang0peter的个人博客我的jekyll静态博客部署在GitHub上,平时自己本地测试的时候运行命令jekyll serve即可启动:C:\Users\peter\Documents\GitHub\zhang0peter.github...

2020-01-27 15:58:28 908

原创 Linux/ubuntu 服务器开启6010端口-X11服务-ssh连接

此文首发于我的个人博客:Linux/ubuntu 服务器开启6010端口-X11服务-ssh连接 — zhang0peter的个人博客晚上在检查我的Linux-ubuntu服务器的端口状况时发现开启了6010端口:-> # nmap -p 1-65535 127.0.0.1Starting Nmap 7.60 ( https://nmap.org ) at 2020-01-22 1...

2020-01-27 15:56:48 17280

原创 谷歌浏览器删除相同重复无效书签

此文首发于我的个人博客:谷歌浏览器删除相同重复无效书签 — zhang0peter的个人博客chrome在不同电脑间同步书签时会出现重复书签的问题,让人很烦。我在谷歌上搜索google chrome delete multi same bookmarks时,发现前面的几个网页全是无效的结果。用中文搜索反而能出来有用的结果,这很有趣:谷歌浏览器删除相同重复无效书签。使用插件Bookmark...

2020-01-27 15:55:45 7108 1

原创 Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/redis-server.

此文首发于我的个人博客:Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can’t open PID file /var/run/redis/redis-server.pid (yet?) after start: No such file or directory — zhang0peter的个人博客晚上在我的ubuntu 18.04的...

2020-01-27 15:53:53 13591 1

原创 caddy 获取SSL证书报错解决:failed to obtain certificate: acme: Error -> One or more domains had a problem

此文首发于我的个人博客:caddy 获取SSL证书报错解决:failed to obtain certificate: acme: Error -> One or more domains had a problem — zhang0peter的个人博客早上尝试使用caddy,启动HTTPS服务,并自动配置TLS证书,结果在自动配证书的过程中报错:-> # sudo system...

2020-01-27 15:52:31 15807

原创 LeetCode 22. Generate Parentheses--Python 解法--广度优先、深度优先解法

此文首发于我的个人博客:LeetCode 22. Generate Parentheses–Python 解法–广度优先、深度优先解法 — zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Generate Parentheses - LeetCodeGiven n pai...

2020-01-24 15:55:35 508

原创 程序员必备的20个软件

文章目录360压缩1PasswordAdGuardAnacondaDev-C++EverythingFirefoxf.luxFoxmailGitGitHub DesktopHoneyviewJetBrains 全家桶:JetBrains ToolboxMiKTeX我自己基本上每半年左右就要重装一次系统,所以我在这么多次的重装系统的过程中总结了如下这些在安装好Windows系统后必备的软件。36...

2020-01-23 16:30:44 7315 1

原创 LeetCode 31. Next Permutation-- Python 解法--数学题--比当前数大的最小的数

LeetCode 31. Next Permutation-- Python 解法–数学题–比当前数大的最小的数此文首发于我的个人博客:LeetCode 31. Next Permutation-- Python 解法–数学题–比当前数大的最小的数 — zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解文章集合LeetCode 所有题目总结:LeetCode...

2020-01-22 08:40:04 639

原创 LeetCode 11. Container With Most Water--Java 解法--困雨水简单版

LeetCode 11. Container With Most Water–Java 解法此文首发于我的个人博客:LeetCode 11. Container With Most Water–Java 解法–困雨水简单版 — zhang0peter的个人博客LeetCode题解文章分类:LeetCode题解LeetCode 所有题目总结:LeetCode 所有题目总结题目地址:Con...

2020-01-21 20:21:01 499

原创 anaconda-spyder-ipython终端控制台无法停止程序--问题解决

此文首发于我的个人博客:anaconda-spyder-ipython终端控制台无法停止问题解决 — zhang0peter的个人博客自从我使用anaconda的spyder作为PythonD的IDE开始,经常会出现一种情况,那就是调试代码或者运行程序的时候,点击终止按钮stop debugging无法停止程序,这让我很苦恼。后来我发现想要强行终止程序,可以直接关闭控制台console 1/...

2020-01-20 14:21:40 4998 2

原创 Python-PyCharm 报错解决:ImportError: cannot import name 'InteractiveConsole' from 'code'

此文首发于我的个人博客:Python-PyCharm 报错解决:ImportError: cannot import name ‘InteractiveConsole’ from ‘code’ — zhang0peter的个人博客早上在用PyCharm跑Python代码时遇到报错:Traceback (most recent call last): File "C:\Users\pete...

2020-01-20 10:37:27 5471 3

Cisco路由器IOS映像文件(3745)

Cisco路由器IOS映像文件(3745),GNS使用必备。该映像文件来自 Cisco 物理设备。

2019-01-27

Cisco路由器IOS映像文件(3725)

Cisco路由器IOS映像文件(3725),GNS使用必备。该映像文件来自 Cisco 物理设备。

2019-01-27

NFC Tools

NFC Tools是安卓手机上常用的NFC工具,有读卡模式等功能。

2018-10-31

MIFARE Classics Tools

MIFARE Classics Tools是一个安卓手机APP,是NFC专用的APP,有读标签和写标签的功能

2018-10-31

网络通讯协议关系图[中文珍藏版]

网络通讯协议关系图[中文珍藏版],详细描述了OSI7层模型及各层的具体通信协议

2018-10-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除