shadow the dog and
Fox and Box Accumulation 题解
[题目传送门](https://www.luogu.com.cn/problem/CF388A) 一道贪心题。 我们先将箱子的力量值从小到大排序,**优先将小的放顶上**,只要还能在底下放就放,否则就到下一个堆。 为什么要从小到大往下放呢?因为越小的力量值能放的位置就越少,所以尽早放一定是最优的。相 ......
Mapping iostat to the node exporter’s node_disk_* metrics
参考:https://www.robustperception.io/mapping-iostat-to-the-node-exporters-node_disk_-metrics/ The node exporter and tools like iostat and sar use the sa ......
Practice on Codeforces and Atcoder in August
## [Educational Codeforces Round 151 A~E](https://www.cnblogs.com/oierpyt/p/17598936.html) ## [Codeforces Round #879 Div.2](https://www.cnblogs.com/oi ......
python: Text-to-Speech and Speech-to-Text
""" python.exe -m pip install --upgrade pip pip install pyttsx3 pip install comtypes pip install Pillow pip install requests pip install PocketSphinx ......
Exercise: Loops and Functions
牛顿迭代法求平方根,Go的tour一上来就搞一个这么高级的练习,吓到我了。不过还好练习说明里面给出了逼近公式,主要代码如下: 1 func Sqrt(x float64) float64 { 2 e, z := 1e-15, 1.0 3 for math.Abs(z*z - x) > e { 4 z ......
CF1588 FJumping Through the Array
# CF1588F Jumping Through the Array ## 题意 你有个长度为 $n$ 的数组 $a$ 和一个长度为 $n$ 的排列 $p$,对于每一个 $i$ 有一有向边 $(i,p_i)$。 有如下三种操作: - ```1 l r``` 询问 $\sum_{i=l}^r a_i ......
Could not extract response: no suitable `HttpMessageConverter` found for response type [class wechat.xx] and content type [text/plain] 问题
## 1. 问题复现 话不多说,先贴出问题代码:这里的`GetUserInfoByAccessToken`是我自定义的一个实体类。 ``` GetUserInfoByAccessToken getUserInfoByAccessTokenString = restTemplate.getForObj ......
CF1682B AND Sorting 题解
首先,我们按照题意,可以用 0 来作为中间的一个数来交换其他两个数,这种元素肯定是有的,那就是所有不在正确位置上的所有数的 AND 值,我们可以开一个数组 a 来模拟这个过程,a_i & a_j = X,那这里的 X 就起到我们的 0 的作用了。 代码: ``` #include #define i ......
vCenter 6.7添加主机报错:Unable to push CA certificates and CRLs to host
vCenter 版本 6.7.0.46000VMware ESXi, 6.7.0, 14320388 在添加新ESXi主机时出现了常规系统错误: Unable to push CA certificates and CRLs to host xxx.xxx.xxx.xxx 如图: 解决办法:点选vC ......
[刷题笔记] CF1132F Clear the String & [CQOI2007] 涂色
[Problem1](https://codeforces.com/problemset/problem/1132/F) [Problem2](https://www.luogu.com.cn/problem/P4170) ~~双倍经验qwq~~ ### Description 初始时数组为空,每次 ......
Vertical Rhythm(垂直节奏)、CSS-in-JS、CSS Module 和shadow dom样式
一、 Vertical Rhythm(垂直节奏)是什么?有什么优点?(1)含义: 垂直节奏是一种网页排版的方法,它可以创建视觉上平衡且协调的布局。使页面上元素之间的空格彼此保持一致。垂直节奏是在基线的帮助下创建或维持的,用于创建一致空间的共同点。基线(由网格提供)是通常用于创建一致间距的公分母。也就 ......
Codeforces 1850H:The Third Letter 带权并查集
# [1850H.The Third Letter](https://codeforces.com/contest/1850/problem/H "Codeforces 1850H") ## Description: - $n$ 个人,$m$ 个条件,每次给出两个人 $a_i$ 和 $b_i$ 一维 ......
[Javascript] event target and currentTarget
<Parent> <child> <button /> </child> </Parent> function onClick(event) { console.log('target: ', event.target) // button console.log('currentTarget', ......
使用Locust进行接口性能测试:Locust and TaskSet类详细分析(二)
**“** Locust是一款开源的Python性能测试工具,它可以模拟大量并发用户对网站或者其他接口进行压力测试**”** 一、Locust类详细说明 在Locust中,Locust类是整个负载测试工具的核心。它用于创建并发用户场景,模拟用户行为。示例: ``` from locust impor ......
centos7 Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
备份原始的 EPEL 存储库配置文件(可选):在更改前,建议您先备份原始的 EPEL 存储库配置文件,以便在需要时恢复到默认设置。在终端中执行以下命令备份: sudo cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup 编辑 ......
Python Web UI自动化报错 :ResourceWarning: Enable tracemalloc to get the object allocation traceback
ResourceWarning资源警告解决方案 原因:在执行线性脚本完毕时,没有及时释放相应资源,导致内存堆积,从而造成内存溢出(如关闭浏览器等操作),此时,Python将会做出提醒; 在百度吸取 网络老师们的经验后实践,总结如下: 1.在进行测试前准备工作时,忽略警告信息 import warni ......
农业工程与信息技术专业(Agricultural Engineering and Information Technology)
农业工程与信息技术专业的研究生考试情况。 (1)农业工程与信息技术是什么? 农业工程与信息技术专业(Agricultural Engineering and Information Technology),是一门集农业科学、环境生态工程、计算机科学、机械设备科学研究、工程项目科学研究、管理学等为一体 ......
delegate open and send for XMLHttpRequest by rewrite the prototype
var sendProxied = window.XMLHttpRequest.prototype.send; window.XMLHttpRequest.prototype.send = function() {var object = {}; let data = arguments[0] if ......
Concurrency and async / await
以下文章非常好的解释了python中的async wait的用法。copy自:https://fastapi.tiangolo.com/async/#in-a-hurry Details about the async def syntax for path operation functions ......
关于python的GIL的解除——PEP 703 – Making the Global Interpreter Lock Optional in CPython
PEP地址: https://peps.python.org/pep-0703/ PEP 703 – Making the Global Interpreter Lock Optional in CPython ......
「题解」AGC034F RNG and XOR
$f_i$ 为变成 $i$ 的期望步数,那么 $f_0=0$,$f_i=1+\sum_{j=0}^{2^n-1}f_j\cdot p_{i\oplus j}$,理解为从 $i$ 走到 $0$ 的期望步数即可。 尝试用集合幂级数描述这个东西,如果不管 $f_0$ 那么就是 $F=F\times P+I ......
InnoDB – the best storage engine for MySQL?
https://dev.mysql.com/doc/refman/5.7/en/innodb-introduction.html InnoDB is a general-purpose storage engine that balances high reliability and high pe ......
记录一下Linux下远程访问Mysql连接不上,报错The driver has not received any packets from the server.
# 问题所在 远程服务器已经提前安装好了MySQL,版本也是对应的。在ssh上可以正常进入MySQL数据库。但是其他地方无法连接上,例如navicat和IDE内部都发生报错。 # 排查 ## 1. 首先排查了一下远程服务器上mysql服务状态是否处于正常运行状态 `sudo service mysq ......
AccountController and SignOut method when using Microsoft.Identity.Web.UI
The signout html code located at <li class="nav-item"> <a class="nav-link text-dark" asp-area="MicrosoftIdentity" asp-controller="Account" asp-action= ......
Ceil and floor of the dataframe in Pandas Python – Round up and Truncate
In this article, we will discuss getting the ceil and floor values of the Pandas Dataframe. First, Let’s create a dataframe. Example: Python3 # import ......
pip安装error:There was a problem confirming the ssl certificate
``` Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=44 ......
Linux:user is not in the sudoers file. This incident will be reported 解决方法
学习自:user is not in the sudoers file. This incident will be reported 解决方法_一路奔跑94的博客-CSDN博客 1、原因 没有在权限文件中说明该用户具有sudo权限 2、解决步骤 1)以root身份去/etc/sudoers文件中, ......
异常FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
AttributeError: module 'numpy' has no attribute 'object'. 原因:numpy版本问题,卸载重新安装对应的版本 方法 pip uninstall numpy==1.19.2(根据自己的版本需要,安装对应的版本) 操作如下: ......
Yifan and Yifan
Yifan Zhao 和 Yifan Bao 的训练题集..... 第一场 $A.$ Making Anti-Palindromes 首先如果出现最多的数次数超过一半,显然是无解的。 如果是奇数也必然无解。 否则, 考虑一共有多少对 $S_{i} = S_{n - i + 1}$ 以及满足这个性质的 ......