当前位置: 首页 > news >正文

重庆璧山网站制作公司电话/seo公司资源

重庆璧山网站制作公司电话,seo公司资源,局域网怎么做网站,网站建设对企业的帮助链表总结 增加表头元素倒数节点,使用快慢指针环形链表(快慢指针)合并有序链表,归并排序LRU缓存 算法题 删除链表元素 删除链表中的节点 LeetCode237. 删除链表中的节点 复制后一个节点的值,删除后面的节点&#x…

在这里插入图片描述

链表总结

  1. 增加表头元素
  2. 倒数节点,使用快慢指针
  3. 环形链表(快慢指针)
  4. 合并有序链表,归并排序
  5. LRU缓存

算法题

删除链表元素

删除链表中的节点

LeetCode237. 删除链表中的节点

复制后一个节点的值,删除后面的节点(1->5->3->4,删除5的话,先调整为1->3->3->4,再删除第二个3的节点)

class Solution {public void deleteNode(ListNode node) {node.val = node.next.val;node.next = node.next.next;}
}
删除链表的倒数第 N 个结点

LeetCode19. 删除链表的倒数第 N 个结点

快慢节点,使用虚拟节点,删除节点

当fast的next节点到了链表外,slow的next节点是第n个节点。找到slow的next节点,删除。

class Solution_LC19 {public ListNode removeNthFromEnd(ListNode head, int n) {ListNode dummy = new ListNode(-1);dummy.next = head;ListNode slow = dummy;ListNode fast = dummy;for (int i = 0; i < n; i++) {fast = fast.next;}while (fast.next != null) {fast = fast.next;slow = slow.next;}slow.next = slow.next.next;return dummy.next;}}
删除排序链表中的重复元素

LeetCode83 删除排序链表中的重复元素

和当前节点比较值,相同则删掉,不同则下一个节点

class Solution_LC83 {public ListNode deleteDuplicates(ListNode head) {ListNode cur = head;while (cur != null) {int val = cur.val;if (cur.next != null && cur.next.val == val) {cur.next = cur.next.next;} else {cur = cur.next;}}return head;}
}
删除排序链表中的重复元素 II(**)

LeetCode82. 删除排序链表中的重复元素 II

定义两个节点。cur节点是用来比较的节点,pre节点是用来删除的。找到cur节点,该节点和next节点不一致,pre.next=cur,等于是删除了pre和cur之间的元素。

class Solution {public ListNode deleteDuplicates(ListNode head) {ListNode dummy = new ListNode(-1);dummy.next = head;ListNode pre = dummy;ListNode cur = head;while (cur != null && cur.next != null) {int x = cur.val;if (cur.next.val == x) {while (cur != null && cur.val == x) {cur = cur.next;}pre.next = cur;} else {cur = cur.next;pre = pre.next;}}return dummy.next;}
}

旋转链表

反转链表

LeetCode206. 反转链表

头插法。pre和cur不断向后移动,直到cur为空,pre为最后一个节点(遍历顺序的最后一个)。

class Solution {public ListNode reverseList(ListNode head) {ListNode pre = null;ListNode cur = head;while (cur != null) {ListNode next = cur.next;cur.next = pre;pre = cur;cur = next;}return pre;}
}
K 个一组翻转链表

LeetCode25. K 个一组翻转链表

  • 获取k个节点一组的链表

  • 翻转链表

  • pre的后面一个节点是start,end的最后一个节点是next。

class Solution {public ListNode reverseKGroup(ListNode head, int k) {ListNode dummy = new ListNode(-1);dummy.next = head;ListNode pre = dummy;ListNode end = dummy;while (end.next != null) {for (int i = 0; i < k&&end!=null; i++) {end = end.next;}if (end == null) {break;}ListNode next = end.next;ListNode start = pre.next;end.next = null;pre.next = reverse(start);start.next = next;pre = start;end = start;}return dummy.next;}private ListNode reverse(ListNode head) {ListNode pre = null;ListNode cur = head;while (cur != null) {ListNode next = cur.next;cur.next = pre;pre = cur;cur = next;}return pre;}
}
LeetCode61. 旋转链表

LeetCode61. 旋转链表.

  • 获取链表的尾结点

  • 尾结点连接头节点

  • 找到切割点(切割点的前一个节点)

  • 切割。获取next节点,将当前节点的next置为空,切断。

class Solution {public ListNode rotateRight(ListNode head, int k) {if (k == 0 || head == null || head.next == null) {return head;}ListNode cur = head;int n = 1;while (cur.next != null) {cur = cur.next;n++;}int add = n - k % n;if (add == n) {return head;}cur.next = head;while (add > 0) {cur = cur.next;add--;}ListNode next = cur.next;cur.next = null;return next;}
}

交换链表节点

LeetCode24. 两两交换链表中的节点(⭐️高频)

LeetCode24. 两两交换链表中的节点

定义虚拟头结点

获取可以交换的节点,进行节点操作

将node1节点置为前置结点,进行下一轮操作

class Solution {public ListNode swapPairs(ListNode head) {ListNode dummy = new ListNode(-1, head);ListNode cur = dummy;while (cur.next != null && cur.next.next != null) {ListNode node1 = cur.next;ListNode node2 = node1.next;ListNode next = node2.next;cur.next = node2;node2.next = node1;node1.next = next;cur = node1;}return dummy.next;}
}

环形/相交/回文链表

LeetCode141. 环形链表(腾讯)

LeetCode141. 环形链表(腾讯)

使用快慢指针,如果快指针最后到达慢指针,则存在环。

public class Solution {public boolean hasCycle(ListNode head) {ListNode fast = head;ListNode slow = head;while (fast != null && fast.next != null) {fast = fast.next.next;slow = slow.next;if (fast == slow) {return true;}}return false;}
}
LeetCode142. 环形链表II

LeetCode142. 环形链表II.

快慢指针

a+b+n(b+c)=2(a+b) --> a=(n-1)(b+c)+c

public class Solution {public ListNode detectCycle(ListNode head) {ListNode fast = head;ListNode slow = head;while (fast != null && fast.next != null) {fast = fast.next.next;slow = slow.next;if (slow == fast) {ListNode node1 = head;ListNode node2 = fast;while (node1 != node2) {node1 = node1.next;node2 = node2.next;}return node1;}}return null;}
}
LeetCode160.相交链表

160. 相交链表

要进行临界值判断

相交的链表后面一段是公共的,a+b+c=c+b+a。

public class Solution {public ListNode getIntersectionNode(ListNode headA, ListNode headB) {if (headA == null || headB == null) {return null;}ListNode p1 = headA;ListNode p2 = headB;while (p1 != p2) {p1 = p1 == null ? headB : p1.next;p2 = p2 == null ? headA : p2.next;}return p1;}
}
LeetCode234. 回文链表

234. 回文链表

寻找中间节点,并反转前面列表

pre是反转链表的头结点,slow是后面链表的头结点。比较节点的值,判断是否回文

class Solution {public boolean isPalindrome(ListNode head) {//1-2-3-2-1ListNode fast = head;ListNode slow = head;ListNode pre = null;while (fast != null && fast.next != null) {fast = fast.next.next;ListNode next = slow.next;slow.next = pre;pre = slow;slow = next;}if (fast != null) {slow = slow.next;}while (pre != null && slow != null) {if (slow.val != pre.val) {return false;} else {slow = slow.next;pre = pre.next;}}return true;}
}

链表合并

LeetCode2: 两数相加

LeetCode2: 两数相加

对应数位的值相加,计算当前节点以及向上的值。

class Solution {public ListNode addTwoNumbers(ListNode l1, ListNode l2) {ListNode dummy = new ListNode(-1);ListNode cur = dummy;int carry = 0;while (l1 != null || l2 != null || carry != 0) {int sum = (l1 == null ? 0 : l1.val) + (l2 == null ? 0 : l2.val) + carry;carry = sum / 10;ListNode tmp = new ListNode(sum % 10);cur.next = tmp;cur = tmp;l1 = l1 == null ? null : l1.next;l2 = l2 == null ? null : l2.next;}return dummy.next;}
}
LeetCode445: 两数相加II

LeetCode445: 两数相加II

使用堆栈,用于顺序相反获取值

链表的拼接和上一题不同。上一题是不断往链表后面添加元素;这一题是不断往前面添加元素。

class Solution {public ListNode addTwoNumbers(ListNode l1, ListNode l2) {Stack<Integer> stack1 = new Stack<>();Stack<Integer> stack2 = new Stack<>();while (l1 != null) {stack1.push(l1.val);l1 = l1.next;}while (l2 != null) {stack2.push(l2.val);l2 = l2.next;}int carry = 0;ListNode cur = null;while (!stack1.isEmpty() || !stack2.isEmpty() || carry != 0) {int sum = (stack1.isEmpty() ? 0 : stack1.pop()) + (stack2.isEmpty() ? 0 : stack2.pop()) + carry;carry = sum / 10;ListNode tmp = new ListNode(sum % 10);tmp.next = cur;cur = tmp;}return cur;}
}
LeetCode21: 合并两个有序链表

21. 合并两个有序链表

挨个遍历比较大小,是最容易想到的方案

使用递归。当l1.val < l2.vall1.next = mergeTwoLists(l1.next, l2);

class Solution {public ListNode mergeTwoLists(ListNode list1, ListNode list2) {ListNode dummy = new ListNode(-1);ListNode cur = dummy;while (list1 != null && list2 != null) {if (list1.val < list2.val) {cur.next = new ListNode(list1.val);cur = cur.next;list1 = list1.next;} else {cur.next = new ListNode(list2.val);cur = cur.next;list2 = list2.next;}}if (list1 != null) {cur.next = list1;} else {cur.next = list2;}return dummy.next;}
}
LeetCode23: 合并K个排序链表

23. 合并 K 个升序链表

挨个遍历处理

class Solution {public ListNode mergeKLists(ListNode[] lists) {ListNode ans = null;for (int i = 0; i < lists.length; i++) {ans =mergeTwoLists(ans, lists[i]);}return ans;}public ListNode mergeTwoLists(ListNode list1, ListNode list2) {if (list1 == null || list2 == null) {return list1 == null ? list2 : list1;}ListNode dummy = new ListNode(-1);ListNode cur = dummy;while (list1 != null && list2 != null) {if (list1.val < list2.val) {cur.next = new ListNode(list1.val);cur = cur.next;list1 = list1.next;} else {cur.next = new ListNode(list2.val);cur = cur.next;list2 = list2.next;}}if (list1 != null) {cur.next = list1;} else {cur.next = list2;}return dummy.next;}
}

分治合并,将链表数组拆分成2段,处理好后合并。

class Solution {public ListNode mergeKLists(ListNode[] lists) {return merge(lists, 0, lists.length - 1);}private ListNode merge(ListNode[] lists, int l, int r) {if (l == r) {return lists[l];}if (l > r) {return null;}int mid = (l + r) / 2;return mergeTwoLists(merge(lists, l, mid), merge(lists, mid + 1, r));}public ListNode mergeTwoLists(ListNode list1, ListNode list2) {if (list1 == null || list2 == null) {return list1 == null ? list2 : list1;}ListNode dummy = new ListNode(-1);ListNode cur = dummy;while (list1 != null && list2 != null) {if (list1.val < list2.val) {cur.next = new ListNode(list1.val);cur = cur.next;list1 = list1.next;} else {cur.next = new ListNode(list2.val);cur = cur.next;list2 = list2.next;}}if (list1 != null) {cur.next = list1;} else {cur.next = list2;}return dummy.next;}
}

使用优先队列

class Solution {public ListNode mergeKLists(ListNode[] lists) {//优先队列默认是小顶堆,最小的元素放在队头,即a-bPriorityQueue<ListNode> priorityQueue = new PriorityQueue<ListNode>((a, b) -> {return a.val - b.val;});for (int i = 0; i < lists.length; i++) {if(lists[i]!=null){
priorityQueue.add(lists[i]);}}ListNode dummy = new ListNode(-1);ListNode cur = dummy;while (!priorityQueue.isEmpty()) {ListNode listNode = priorityQueue.poll();ListNode next = listNode.next;cur.next = listNode;cur = listNode;if (next != null) {priorityQueue.add(next);}}return dummy.next;}
}
LeetCode148: 排序链表

148. 排序链表

使用优先队列,最简单。

使用归并排序。做链表拆分。

可以和回文链表做比较,必须熟悉掌握两个链表合并的逻辑。

class Solution {public ListNode sortList(ListNode head) {if (head == null || head.next == null) {return head;}ListNode fast = head.next;ListNode slow = head;while (fast != null && fast.next != null) {fast = fast.next.next;slow = slow.next;}ListNode next = slow.next;slow.next = null;ListNode listNode1 = sortList(head);ListNode listNode2 = sortList(next);ListNode dummy = new ListNode(-1);ListNode cur =dummy;while (listNode1 != null && listNode2 != null) {if (listNode1.val < listNode2.val) {cur.next = listNode1;cur = cur.next;listNode1 = listNode1.next;} else {cur.next = listNode2;cur = cur.next;listNode2 = listNode2.next;}}cur.next = listNode1 == null ? listNode2 : listNode1;return dummy.next;}
}

LRU缓存

LeetCode146. LRU 缓存

146. LRU 缓存

使用LinkedHashMap,设置accessOrder为true,最近访问的元素会排在最后。而removeEldestEntry当条件满足的时候会移除最老的元素。

class LRUCache extends LinkedHashMap<Integer, Integer> {private int capacity;public LRUCache(int capacity) {super(capacity, 0.75f, true);this.capacity = capacity;}public int get(int key) {return super.getOrDefault(key, -1);}public void put(int key, int value) {super.put(key, value);}protected boolean removeEldestEntry(Map.Entry<Integer, Integer> entry) {return size() > this.capacity;}
}

使用Hash表和双向链表

双向链表记录访问顺序,Hash表获取元素

获取元素,将元素放在最前(移除当前元素在双向链表中的原位置,放在前面)。

存放元素,如果元素已存在,进行更新值,且将元素放在最前;如果元素不存在,添加元素要判断边界,超过边界要移除最早访问的元素(从链表和Hash表中移除)。

class LRUCache extends LinkedHashMap<Integer, Integer> {public class DLinkedNode {int key;int val;DLinkedNode prev;DLinkedNode next;public DLinkedNode() {}public DLinkedNode(int key, int val) {this.key = key;this.val = val;}}private Map<Integer, DLinkedNode> map = new HashMap<>();private int size;private int capacity;private DLinkedNode head, tail;public LRUCache(int capacity) {this.capacity = capacity;size = 0;head = new DLinkedNode();tail = new DLinkedNode();head.next = tail;tail.prev = head;}public int get(int key) {DLinkedNode dLinkedNode = map.get(key);if (dLinkedNode == null) {return -1;} else {moveToHead(dLinkedNode);return dLinkedNode.val;}}private void moveToHead(DLinkedNode node) {removeNode(node);addToHead(node);}private void addToHead(DLinkedNode node) {DLinkedNode next = head.next;head.next = node;node.prev = head;node.next = next;next.prev = node;}private void removeNode(DLinkedNode node) {DLinkedNode prev = node.prev;DLinkedNode next = node.next;prev.next = next;next.prev = prev;}private DLinkedNode removeTail() {DLinkedNode prev = tail.prev;removeNode(prev);return prev;}public void put(int key, int value) {DLinkedNode node = map.get(key);if (node == null) {DLinkedNode newNode = new DLinkedNode(key, value);map.put(key, newNode);addToHead(newNode);size++;if (size > capacity) {DLinkedNode tail = removeTail();map.remove(tail.key);size--;}} else {node.val = value;moveToHead(node);}}
}

相关文章:

【算法练习】leetcode链表算法题合集

链表总结 增加表头元素倒数节点&#xff0c;使用快慢指针环形链表&#xff08;快慢指针&#xff09;合并有序链表&#xff0c;归并排序LRU缓存 算法题 删除链表元素 删除链表中的节点 LeetCode237. 删除链表中的节点 复制后一个节点的值&#xff0c;删除后面的节点&#x…...

2023.12.28每日一题

LeetCode每日一题 2735.收集巧克力 2735. 收集巧克力 - 力扣&#xff08;LeetCode&#xff09; 介绍 看题目看不懂&#xff0c;在评论区看到一个大哥解释&#xff0c;瞬间明白了。 一张桌子上有n件商品围成一圈&#xff0c;每件都有一个价签&#xff0c;它们构成数组nums。…...

231227-9步在RHEL8.8配置本地yum源仓库

Seciton 1&#xff1a;参考视频 RHEL8配置本地yum源仓库-安徽迪浮_哔哩哔哩_bilibili Seciton 2&#xff1a;具体操作 &#x1f3af; 第1步&#xff1a;查看光驱文件/dev/sr0是否已经挂载&#xff1f;此处已挂在 [lgklocalhost ~]$ df -h &#x1f3af; 第1步&#xff1a;查看…...

5. 创建型模式 - 单例模式

亦称&#xff1a; 单件模式、Singleton 意图 单例模式是一种创建型设计模式&#xff0c; 让你能够保证一个类只有一个实例&#xff0c; 并提供一个访问该实例的全局节点。 问题 单例模式同时解决了两个问题&#xff0c; 所以违反了单一职责原则&#xff1a; 保证一个类只有一…...

机器学习之人工神经网络(Artificial Neural Networks,ANN)

人工神经网络(Artificial Neural Networks,ANN)是机器学习中的一种模型,灵感来源于人脑的神经网络结构。它由神经元(或称为节点)构成的层级结构组成,每个神经元接收输入并生成输出,这些输入和输出通过权重进行连接。 人工神经网络(ANN)是一种模仿生物神经系统构建的…...

GetLastError()详细介绍

GetLastError() 是 Windows 操作系统提供的一个函数&#xff0c;用于获取调用线程最近一次发生的错误码。这个函数的定义如下&#xff1a; DWORD GetLastError(void); 调用 GetLastError() 函数可以帮助开发人员在发生错误时获取错误的详细信息&#xff0c;从而进行适当的错…...

【unity3D-粒子系统】粒子系统主模块-Particle System篇

&#x1f497; 未来的游戏开发程序媛&#xff0c;现在的努力学习菜鸡 &#x1f4a6;本专栏是我关于游戏开发的学习笔记 &#x1f236;本篇是unity的粒子系统主模块-Particle System 基础知识 Particle System 介绍&#xff1a;粒子系统的主模块&#xff0c;是必需的模块&#x…...

Windows搭建FTP服务器教学以及计算机端口介绍

目录 一. FTP服务器介绍 FTP服务器是什么意思&#xff1f; 二.Windows Service 2012 搭建FTP服务器 1.开启防火墙 2.创建组 ​编辑3.创建用户 4.用户绑定组 5.安装ftp服务器 ​编辑6.配置ftp服务器 7.配置ftp文件夹的权限 8.连接测试 三.计算机端口介绍 什么是网络…...

安防视频监控系统EasyCVR实现H.265视频在3秒内起播的注意事项

可视化云监控平台/安防视频监控系统EasyCVR视频综合管理平台&#xff0c;采用了开放式的网络结构&#xff0c;可以提供实时远程视频监控、视频录像、录像回放与存储、告警、语音对讲、云台控制、平台级联、磁盘阵列存储、视频集中存储、云存储等丰富的视频能力&#xff0c;同时…...

CNN实现对手写字体的迭代

导入库 import torchvision import torch from torchvision.transforms import ToTensor from torch import nn import matplotlib.pyplot as plt 导入手写字体数据 train_dstorchvision.datasets.MNIST(data/,trainTrue,transformToTensor(),downloadTrue) test_dstorchvis…...

docker学习笔记01-安装docker

1.Docker的概述 用Go语言实现的开源应用项目&#xff08;container&#xff09;&#xff1b;克服操作系统的笨重&#xff1b;快速部署&#xff1b;只隔离应用程序的运行时环境但容器之间可以共享同一个操作系统&#xff1b;Docker通过隔离机制&#xff0c;每个容器间是互相隔离…...

【《设计模式之美》】如何取舍继承与组合

文章目录 什么情况下不推荐使用继承&#xff1f;组合相比继承有哪些优势&#xff1f;使用组合、继承的时机 本文主要想了解&#xff1a; 为什么组合优于继承&#xff0c;多用组合少用继承。如何使用组合来替代继承哪些情况适用继承、组合。有哪些设计模式使用到了继承、组合。 …...

一步到位:用Python实现PC屏幕截图并自动发送邮件,实现屏幕监控

在当前的数字化世界中&#xff0c;自动化已经成为我们日常生活和工作中的关键部分。它不仅提高了效率&#xff0c;还节省了大量的时间和精力。在这篇文章中&#xff0c;我们将探讨如何使用Python来实现一个特定的自动化任务 - PC屏幕截图自动发送到指定的邮箱。 这个任务可能看…...

Spring Boot+RocketMQ 实现多实例分布式环境下的事件驱动

为什么要使用MQ&#xff1f; 在Spring Boot Event这篇文章中已经通过Guava或者SpringBoot自身的Listener实现了事件驱动&#xff0c;已经做到了对业务的解耦。为什么还要用到MQ来进行业务解耦呢&#xff1f; 首先无论是通过Guava还是Spring Boot自身提供的监听注解来实现的事…...

oracle ORA-01704: string literal too long ORACLE数据库clob类型

当oracle数据表中有clob类型字段时候&#xff0c;insert或update的sql语句中&#xff0c;超过长度就会报错 ORA-01704: string literal too long update xxx set xxx <div><h1>123</h1></div> where id 100;可以修改为 DECLAREstr varchar2(10000…...

微星主板强刷BIOS(以微星X370gaming plus 为例)

(前两天手欠&#xff0c;用U盘通过微星的M-flash升级BIOS 升级过程中老没动静就强制关机了 然后电脑就打不开了) 几种强刷主板BIOS的方式 在网上看到有三种强刷BIOS的方式分别是: 使用夹子编程器 (听说不太好夹)使用微星转接线编程器&#xff08;只能用于微星主板&#xff0…...

matlab 图像上生成指定中心,指定大小的矩形窗

用matlab实现在图像上生成指定中心,指定大小的矩形窗(奇数*奇数) function PlaneWin PlaneWindow(CentreCoorX,CentreCoorY,RadiusX,RadiusY,SizeImRow,SizeImColumn) % 在图像上生成指定中心,指定大小的矩形窗(奇数*奇数) % % Input: % CentreCoorX(1*1) % CentreCoorY(1*1)…...

❀My学习小记录之算法❀

目录 算法:) 一、定义 二、特征 三、基本要素 常用设计模式 常用实现方法 四、形式化算法 五、复杂度 时间复杂度 空间复杂度 六、非确定性多项式时间&#xff08;NP&#xff09; 七、实现 八、示例 求最大值算法 求最大公约数算法 九、分类 算法:) 一、定义 …...

Hive-high Avaliabl

hive—high Avaliable ​ hive的搭建方式有三种&#xff0c;分别是 ​ 1、Local/Embedded Metastore Database (Derby) ​ 2、Remote Metastore Database ​ 3、Remote Metastore Server ​ 一般情况下&#xff0c;我们在学习的时候直接使用hive –service metastore的方式…...

码住!8个小众宝藏的开发者学习类网站

1、simplilearn simplilearn是全球排名第一的在线学习网站&#xff0c;它的课程由世界知名大学、顶级企业和领先的行业机构通过实时在线课程设计和提供&#xff0c;其中包括顶级行业从业者、广受欢迎的培训师和全球领导者。 2、VisuAlgo VisuAlgo是一个免费的在线学习算法和数…...

Postman常见问题及解决方法

1、网络连接问题 如果Postman无法发送请求或接收响应&#xff0c;可以尝试以下操作&#xff1a; 检查网络连接是否正常&#xff0c;包括检查网络设置、代理设置等。 确认请求的URL是否正确&#xff0c;并检查是否使用了正确的HTTP方法&#xff08;例如GET、POST、PUT等&#…...

ubuntu图形化登录默认只有guest session账号解决方法

新安装的ubuntu16.x 图形化界面登录默认只有guest账号&#xff0c;只有进入guest账号之后再去手动切换root账号很麻烦&#xff0c;但是这样确实很安全。为了方便希望能够在登录图形化界面的时候以root身份/或者自定义其他身份登录。做一下简单的记录。 使用终端命令行编辑文件…...

全国计算机等级考试| 二级Python | 真题及解析(1)

一、选择题 1. 按照“后进先出”原则组织数据的数据结构是____ A栈 B双向链表 C二叉树 D队列 正确答案: A 2. 以下选项的叙述中,正确的是 A在循环队列中,只需要队头指针就能反映队列中元素的动态变化情况 B在循环队列中,只需要队尾指针就能反映队列中元素的动态变…...

Java开发框架和中间件面试题(9)

目录 102.你了解秒杀吗&#xff1f;怎么设计&#xff1f; 103.什么是缓存穿透&#xff1f;怎么解决&#xff1f; 102.你了解秒杀吗&#xff1f;怎么设计&#xff1f; 1.设计难点&#xff1a;并发量大&#xff0c;应用&#xff0c;数据库都承受不了。另外难控制超卖。 2.设计…...

【ARMv8M Cortex-M33 系列 2 -- Cortex-M33 JLink 连接 及 JFlash 烧写介绍】

文章目录 Jlink 工具JLink 命令行示例JFlash 烧写问题Jlink 工具 J-Link 是 SEGGER 提供的一款流行的 JTAG 调试器,它支持多个平台和处理器。JLink.exe 是 J-Link 调试器的命令行接口,它允许用户通过命令行执行一系列操作,例如编程、擦除、调试等。 工具链接: https://ww…...

react pwa应用示例

创建一个基于React的PWA应用&#xff0c;你可以使用create-react-app&#xff0c;它自带PWA支持&#xff0c;但默认是关闭的。以下是创建React PWA应用的步骤&#xff1a; 安装create-react-app 如果你还没有安装&#xff0c;你可以通过npm来安装&#xff1a; npm install -…...

python如何通过日志分析加入黑名单

python通过日志分析加入黑名单 监控nginx日志&#xff0c;若有人攻击&#xff0c;则加入黑名单&#xff0c;操作步骤如下&#xff1a; 1.读取日志文件 2.分隔文件&#xff0c;取出ip 3.将取出的ip放入list&#xff0c;然后判读ip的次数 4.若超过设定的次数&#xff0c;则加…...

RabbitMq知识概述

本文来说下RabbitMq相关的知识与概念 文章目录 概述AMQP协议Exchange 消息如何保证100&#xff05;投递什么是生产端的可靠性投递可靠性投递保障方案 消息幂等性高并发的情况下如何避免消息重复消费confirm 确认消息、Return返回消息如何实现confirm确认消息return消息机制 消费…...

专业级A链接测试特有

A链接普通 A链接添加链接描述带有blank...

Spring Boot 入参校验及全局异常处理

版本依赖 JDK 17 Spring Boot 3.2.0 源码地址&#xff1a;Gitee Spring Boot validation spring-boot-starter-validation是基于hibernate-validator的实现&#xff0c;在Spring Boot项目中直接导入spring-boot-starter-validation即可。 Valid 和 Validated 的区别 适用范围…...