- 博客(28)
- 收藏
- 关注
原创 ICMP协议
ICMP协议全称是Internet Control Message Protocol,互联网控制报文协议在复杂的网络环境中,数据包传输过程难免会出现各种各样的问题,导致包无法正常被发送或接收,这时候就需要有一种方式,让通信的双方知道通信发生了什么问题,以及问题的原因,这就是ICMP协议的作用ICMP报文是封装在IP数据包中,它工作在网络层,是IP协议的助手ICMP报文的具体结构如下:其中,ICMP头中的类型字段,大致可以分为两种类型:● 一种是用于查询状态的消息,叫做查询报文类型。
2025-07-16 14:43:30
785
2
原创 扩展k8s调度器
与之配合的是,我们需要在本地启动一个服务,监听127.0.0.1:8888这个端口,这个服务中运行的就是我们的自定义调度逻辑。在filter阶段,kube-scheduler会调用https://127.0.0.1:8888/predicate接口。● xxxVerb: 调度过程中每个阶段对应的动作名称,这个主要是用来让调度器在每个阶段找到对应的服务调用。要扩展调度器,实现自己的调度策略,这里我们主要关注Extender字段。没有在配置文件中指定的阶段,会走调度器的默认方法。● filter 过滤。
2025-07-15 14:25:09
354
原创 TCP协议详解
用于在网络中的两个主机之间进行可靠的数据传输。它是TCP/IP协议族中的核心协议之一,广泛用于Web、Email、FTP、SSH 等应用。
2025-06-26 11:44:16
618
原创 Socket——套接字
Socket 是操作系统提供给用户程序的一种“网络通信接口”,它就像一把钥匙,让你的程序能够安全、标准、受控地访问整个 TCP/IP 网络世界。
2025-06-20 15:58:24
444
2
原创 计算机网络学习笔记——IP地址详解
在中,我们已经知道了,在网络中两台设备之间要想完成信息交流,那两个设备就必须配置正确的网络地址,也叫IP地址。IP地址的主要作用就是实现不同子网之间设备的网络通信,具体是怎么实现的呢?我们慢慢来看,首先先要认识一下IP地址的格式(本文特指IPv4)
2025-06-05 15:09:48
1002
2
原创 踩坑记录——ActiveMQ僵尸进程问题
由于我对ActiveMQ并不了解,采用了这样的方式,试图将activemq起在后台,结果发现容器启动后发现activemq进程并没有正常运行,而是产生了一系列僵尸进程。
2025-05-23 16:22:48
331
原创 计算机网络入门(一)
本文介绍了计算机网络的基本概念和五层结构模型。网络是由多台计算机和设备通过物理介质连接而成的系统,用于共享资源和信息。网络协议是确保数据传输的规则和标准,解决数据转换、设备定位、应用程序区分和接口统一等问题。网络采用分层结构,通常使用五层模型(物理层、数据链路层、网络层、传输层和应用层)来简化复杂的网络通信过程。每层都有其特定功能,如物理层负责物理连接,数据链路层处理数据帧和MAC地址,网络层管理IP地址和子网络,传输层实现端口到端口的通信,应用层提供具体的网络服务。
2025-05-15 17:05:14
659
原创 数组异或操作
XOR Operation in an ArrayGiven an integer n and an integer start.Define an aray nums where nums[i] = start + 2*i (0-indexed) and n == nums.length.Return the bitwise XOR of all elements of nums.Example 1:Input: n = 5, start = 0Output: 8Explanation:
2021-05-07 16:57:12
788
原创 平方数之和
Sum of Square NumbersGiven a non-negative integer c, decide whether there’s two integers a and b such that a^2 + b^2 = c.Example 1:Input: c = 5Output: trueExplanation: 1 * 1 + 2 * 2 = 5Example 2:Input: c = 3Output: falseExample 3:Input: c =
2021-04-28 15:37:44
601
原创 组合总数IV
Combination Sum IVGiven an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.The answer is guaranteed to fit in a 32-bit integer.Example 1:Input: nums = [1, 2, 3], target = 4
2021-04-24 11:32:59
212
原创 解码方法
Decode WaysA message containing letters from A-Z can be encoded into numbers using the following mapping: ‘A’ -> “1” ‘B’ -> “2” … ‘Z’ -> “26”To decode the encoded message, all the digits must be grouped then mapped back into letters usin
2021-04-21 19:59:13
4472
2
原创 实现strStr()
implement strStr()Implement strStr()Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Clarification:What should we return when needle is an empty string? This is a great question to ask during an in
2021-04-20 11:52:19
138
原创 移除元素
Remove ElementGiven an array nums and a value val,remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.The orde
2021-04-19 21:55:00
214
原创 删除有序数组中的重复项
Remove Duplicates from Sorted ArrayGiven a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length.Do not allocate extra space for another array, you must do this by modifying the input array
2021-04-18 13:51:00
186
原创 二叉搜索树节点最小距离
Minimum Distance Between BST NodesGiven the root of a Binary Search Tree(BST), return the minimum difference between the values of any two different nodes in the tree.今天的题目是求二叉搜索树的节点之间的最小距离,即求树中任意两个节点差值的最小值。而我们知道,二叉搜索树的特点是,左子树一定小于根节点,右子树一定大于根节点,而且二叉搜索树
2021-04-13 21:01:55
296
原创 最大数
Largest NumberGiven a list of non-negative integers nums ,arrange them such that thry form the largest number.Note: The result may be very large, so you need to return a string instead of an integer.今天的题目依然是一道中等难度的题,题目要求一个非负整数数组能拼接出的最大数。即输入一个非负整数数组,返回这
2021-04-12 19:08:08
281
原创 搜索旋转排序数组II
Search in Rotated Sorted Array II There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being passed to your function, nums is rotated at an unknown pivot index k(0<=k<nums.length) such that
2021-04-07 14:41:03
224
原创 删除有序数组中的重复项II
Remove Duplicates from Sorted Array II Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra space for another array; you must do this by modifying the inp
2021-04-06 19:52:22
351
原创 笨阶乘
Clumsy Factorial Normally, the factorial of a positive integer n is the product of all positive integers less than or equal to n. For example, factorial(10) = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 . We instead make a clumsy factorial: using the intege
2021-04-01 08:45:18
195
原创 子集II
Subsets II Given an integer array nums that may contain duplicates, return all possible subsets(the power set). The solution set must not contain duplicate subsets. Return the solution in an order. 题目的输入是一个数组,其中可能含有重复的元素;要求的结果是这个数组的所有子集的集合,也就是幂集,且结果集
2021-03-31 16:01:51
111
原创 搜索二维矩阵
Search a 2D Matrix今天的每日一题是一道中等难度,题目描述如下:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first integer of each row if greater tha
2021-03-30 12:56:55
185
原创 删除有序链表中的重复节点II
Remove Duplicates from sorted list II #算法每日一题#今天的每日一题,它的题目描述是这样的:Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.解法一
2021-03-25 16:03:47
486
原创 log4net简单的配置以及在配置过程中遇到的问题
log4net简单的配置以及在配置过程中遇到的问题这一篇博客主要是为了记录我在初接触log4net,进行相关的配置时遇到的一个问题前面加了我自己做的学习log4net的学习笔记,写的比较粗略,不适用于做学习的参考,主要看最后一部分遇到的那一个问题希望能通过我的记录帮助到和我一样的学习者们实例配置样例(将日志写入回滚文件)在CS程序的App.config或者BS程序的Web.config里配置:<configSections> <section name="log4net" t
2020-10-23 20:09:33
325
原创 只交换相邻元素的条件下,排序数组需要的最小交换次数
只交换相邻元素的条件下,排序数组需要的最小交换次数今天刷到了这样一道算法题:在只交换相邻元素的条件下,求将数组排序好需要的最少的交换次数。看起来挺简单的一道题,首先我这个算法新手就想到了:既然只能交换相邻元素,那不就是冒泡排序吗?我只要在冒泡排序中加一个计数器就好了呀。于是我首先写出了如下方法: public static int Sort(int n, int[] value) { int sum = 0; for(int i = 0;i<n;i ++) { for(int
2020-09-20 18:04:10
3649
1
转载 钉钉接口学习笔记
接口说明格式请求方式:GET/POST(HTTPS)请求地址:https://oapi.dingtalk.com/user/get?access_token=ACCESS_TOKEN&userid=USERID请求包体: …SDK请求示例: …返回结果: …1)请求方式,标明接口调用的HTTP方法,区分HttpGet/HttpPost请求。所有的请求都为HTTPS协议。2)请求地址,接口的请求地址3)请求包体/参数说明,标明请求参数实例及说明,参数说明包括字段含义、取
2020-09-20 17:17:39
20790
原创 SQL学习笔记——基本语句
SQL基本语句use DATABASE;命令用于选择数据库SELECTSELECT语句用于从数据库中选取数据。结果被存储在一个结果表中,称为结果集。基本语法为:SELECT column_name,column_name FROM table_name;也可以省略column_name,写为:SELECT * FROM table_name;实例1:从Students表中选取“id”和“name”列SELECT id,name FROM Students;实例2:从St
2020-08-05 18:42:06
427
原创 Git基础(一)———Git的安装以及本地库的操作
Git基础(一)Git是什么?(为什么要学Git)Git的安装在linux上安装Git在Mac OS 上安装Git在Windows上安装Git创建版本库向版本库中添加文件Git的基本操作版本回退管理修改撤销修改删除文件Git是什么?(为什么要学Git)用最官方的话来说,Git是目前世界上最先进的分布式版本控制系统那么,究竟什么是版本控制系统呢?它有什么优越之处呢?我们一定或多或少有过这样的经历:对一个程序Program,我们想改动其中一段代码,但又怕改了之后功能不尽如人意,万一以后又想改回来怎么办
2020-08-03 20:04:52
624
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅