节点 后代recursive leetcode
【LeetCode 2701. 连续递增交易】MySQL用户变量编程得到严格递增连续子序列的开始位置,结束位置,长度等统计信息
题目地址 https://leetcode.cn/problems/consecutive-transactions-with-increasing-amounts/ 代码 # Write your MySQL query statement below with t1 as( select * # ......
【Leetcode 2474. 购买量严格增加的客户】MySQL用户变量编程解决严格递增连续子序列问题
题目地址 https://leetcode.cn/problems/customers-with-strictly-increasing-purchases/description/ 代码 # Write your MySQL query statement below with t1 as( se ......
【LeetCode 2494. 合并在同一个大厅重叠的活动】MySQL用户变量编程解决区间合并问题
题目地址 https://leetcode.cn/problems/merge-overlapping-events-in-the-same-hall/ 代码 # Write your MySQL query statement below with t2 as( select * # 只需要改动这 ......
Redis 哨兵启动 以及 手动切换节点
服务启动 ./redis-server ../redis.conf 哨兵启动 ./redis-sentinel ../sentinel.conf查看当前服务是否是主节点(先登录到redis)INFO replication 要将从节点切换为主节点,您可以执行以下步骤: 首先,确保从节点已成功连接到主 ......
【LeetCode1747. 应该被禁止的 Leetflex 账户】MySQL用户变量编程;尝试维护一个multiset
题目地址 https://leetcode.cn/problems/leetflex-banned-accounts/description/ 代码 with t1 as( select account_id,ip_address, login as tick, "login" as mytype ......
Ubuntu 20.04版本安装k8s控制节点
一、环境配置 服务器配置:2核4G IP:192.168.10.23 主机名:master4将改主机加入此 集群 # 1.修改主机名 hostnamectl set-hostname master4 && bash # 2.添加hosts 127.0.1.1 master4 192.168.10.2 ......
【Leetcode1949. 坚定的友谊】使用MySQL在无向图中寻找{"CompleteTripartite", {1, 1, 3}}这个pattern
题目地址 https://leetcode.cn/problems/strong-friendship/ 思路 就是在无向图中寻找这个pattern: (* Mathematica *) GraphData[{"CompleteTripartite", {1, 1, 3}}] SQL写还是比较麻烦。 ......
js string转html节点
1、 var str = "<h1>这是一个标题</h1>"; var parser = new DOMParser(); var doc = parser.parseFromString(str, "text/html"); var html = doc.body.firstChild; 2、 c ......
【LeetCode 2142. 每辆车的乘客人数 I】乘客到站等车,车到站载客。MySQL用户变量编程完成
题目地址 https://leetcode.cn/problems/the-number-of-passengers-in-each-bus-i/description/ 思路 将所有关键时刻作为tick。(同一时刻车和人同时到,默认人在车前到) 之后按照tick升序,使用MySQL用户变量编程完成 ......
动力节点RabbitMQ教程|12小时学会rabbitmq消息中间件-01
今日主题内容: 1、What is RabbitMQ? 2、MQ的应用场景? 3、RabbitMQ运行部署 4、RabbitMQ工作模型 5、RabbitMQ交换机类型 6、RabbitMQ过期消息 7、RabbitMQ死信队列 8、RabbitMQ延迟队列 1. What is RabbitMQ? ......
【LeetCode 】练习str_to_date函数;over(rows between CURRENT ROW AND 2 following)实现【当月和接下来2个月】滑动窗口
题目地址 https://leetcode.cn/problems/hopper-company-queries-iii/description/ 代码 -- CTE生成2020年每月的最后一天 WITH RECURSIVE months AS ( SELECT LAST_DAY('2019-12- ......
两两交换链表中的节点 24
学习到的有两点,leetcode好像不设置哨兵节点,需要的话要自己额外设置。 点击查看代码 ListNode*dummy=new ListNode(0); 还有的就是递归的使用,先把自己这一层任务干完,然后还要与下一个任务建立联系。 点击查看代码 class Solution { public: L ......
leetcode 15.三数之和
leetcode 15.三数之和 第十五题:三数之和 1.排序 + 双指针: 和两数之和不同,但可以转化为类似的思路,即确定一个数,去找数组中是否有另外两个数之和等于它的相反数。本题的难点在于如何去除重复解,如果是无序数组,则需要对每个值所在的位置进行记录并进行比较。但如果是有序数组且相加结果为0, ......
Prometheus监控k8s集群节点主机内存/CPU使用率
CPU使用率: (1 - avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) by (instance)) *100 说明: container_cpu_usage_seconds_total 该容器服务针对每个CPU累计消耗的CPU时间。如果有多个 ......
[LeetCode] 2085. Count Common Words With One Occurrence
Given two string arrays words1 and words2, return the number of strings that appear exactly once in each of the two arrays. Example 1: Input: words1 = ......
Prometheus监控容器内pod节点内存/CPU使用率
内存使用率: 表达式1:sum (container_memory_working_set_bytes{container !="",container!="POD"}) by (container, pod) / sum(container_spec_memory_limit_bytes{cont ......
【LeetCode 1635. Hopper 公司查询 I】with recursive生成2020年每月的最后一天
题目地址 https://leetcode.cn/problems/hopper-company-queries-i/description/ 代码 -- CTE生成2020年每月的最后一天 WITH RECURSIVE months AS ( SELECT LAST_DAY('2019-12-01 ......
YAML示例:创建单幅本nginx容器到指定节点及其service
# one rc deployment, schedule it to the node that has a label "ip" equals to "172.18.8.241" apiVersion: apps/v1 kind: Deployment metadata: name: 241-d ......
【LeetCode 2854. 滚动平均步数】MySQL过去n日滑动窗口
题目地址 https://leetcode.cn/problems/rolling-average-steps/description/ 代码 WITH t1 AS ( SELECT user_id, steps_date, CASE WHEN COUNT(steps_count) OVER ( P ......
【LeetCode 2989. 班级表现】T-SQL 动态sql编程示例
题目地址 https://leetcode.cn/problems/class-performance/description/ 题目大意 编写一个查询,计算学生获得的 最高分 和 最低分 之间的 总分差(3 次作业的总和)。 代码 /* Write your T-SQL query stateme ......
LRU cache实现,还是使用伪头部和伪尾部节点写代码更加简单
class Node: def __init__(self, key, val): self.key = key self.val = val self.prev = None self.next = None class LRUCache: def __init__(self, capacity) ......
代码随想录 day16 N 叉树的最大深度 完全二叉树的节点个数
N 叉树的最大深度 这题昨天做过二叉版本 n叉区别不大 完全二叉树的节点个数 层级遍历 入que的数量就是节点个数 ......
【LeetCode 2994. 发生在周五的交易 II】with recursive生成2023-11月所有周五的日期
题目地址 https://leetcode.cn/problems/friday-purchases-ii/description/ 代码 # Write your MySQL query statement below WITH RECURSIVE Fridays (week_of_month, ......
【LeetCode2993. 发生在周五的交易 I】MySQL里尝试实现weekofmonth功能
题目地址 https://leetcode.cn/problems/friday-purchases-i/description/ 代码 # Write your MySQL query statement below with t1 as( SELECT *, DAYOFMONTH(purchas ......
8.k8s之调动pod到指定节点
官方文档:将pod分配给节点题目:调度pod到指定节点 设置配置环境kubectl config use-context k8s 按如下要求创建并调度一个pod: - 名称:nginx-kusc00401 - image: nginx - Node selector: disk=ssd 解答: # ......
Nginx实战系列之功能篇----后端节点健康检查
Nginx实战系列之功能篇 后端节点健康检查 公司前一段对业务线上的nginx做了整理,重点就是对nginx上负载均衡器的后端节点做健康检查。目前,nginx对后端节点健康检查的方式主要有3种,这里列出: 1、ngx_http_proxy_module 模块和ngx_http_upstream_mo ......
[LeetCode] 1363. Largest Multiple of Three 形成三的最大倍数
Given an array of digits digits, return the largest multiple of three that can be formed by concatenating some of the given digits in any order. If th ......
k8s集群Node节点管理:节点信息查看及节点label标签管理
k8s集群Node节点管理:节点信息查看及节点label标签管理 Kubernetes集群Node管理 一、查看集群信息 [root@k8s-master1 ~]# kubectl cluster-info Kubernetes control plane is running at https:/ ......
day 1 LeetCode刷题日志
今天的内容是 704 和 27 ovo 704. 二分查找 给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target 写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1 Myself C: //左闭右闭 [0,1,2,3] int searc ......
【APP逆向03】反编译后代码定位
需求:抓包某款APP的登录请求,定位到密码加密的逻辑 1.通过抓包分析,password被加密了 2.反编译定位位置 URL网址 或 参数关键字 pwd "pwd" put("pwd 等关键字搜索 3.双击,跳转 4.右击,查找用例 5.右击--查找声明 6.此处就是密码的加密逻辑,简单的md5,使 ......