spells types two of

python typing标准库

1. typing模块 1.1 typing模块简介 typing模块是Python 3.5及以上版本中的一个标准模块,提供了对类型注解和类型提示的支持。该模块中包含了多个类、函数和类型别名等,用于描述函数、方法、变量等的输入和输出类型,以及自定义类型等。typing模块中常用的几个类、函数和类型别 ......
标准 python typing

: Only one usage of each socket address (protocol/network address/port) is normally permitted.

2023/10/16 19:07:45 tick2023/10/16 19:07:46 dial tcp 7.11.12.26:3309: connectex: Only one usage of each socket address (protocol/network address/port) ......
address permitted normally protocol network

用户研究:如何利用VoC[Voice of Customer]数据使业务增长

在一个B端项目里,用户体验是非常重要的,一个好的用户体验可以让用户感受到舒适,以此提高自己的口碑等;在用户研究中,VoC是一项很重要的例子,它可以帮助我们收集用户的体验数据,以此进行更好的服务。 Voice of Customer 也就是VoC,这是在B端很重要的一个研究;因为B端的主要调研是面临客 ......
Customer 业务 数据 用户 Voice

2——of C++ class relative

C++类 C++和java都是面向对象的语言,所以类的语法上看起来相似,但也有些区别,比如访问控制符的书写规范。除此之外,在访问控制权限,静态static等内容也有很大区别 1.访问控制权限 访问控制符 //不加的默认私有 class player { int x, y; int speed; vo ......
relative class

Educational Codeforces Round 154 (Rated for Div. 2) B. Two Binary Strings

给定两个长度相等的 \(01\) 字符串 \(a\) 和 \(b\) 。每个字符串都是以 \(0\) 开始以 \(1\) 结束。 在一步操作中,你可以选择任意一个字符串: 选择任意两个位置 \(l, r\) 满足 \(s_l = s_r\) ,然后让 \(\forall i \in [l, r], ......
Educational Codeforces Strings Binary Round

CF1548E Gregor and the Two Painters

Day \(\text{叁拾肆}\)。 DS 写不动了,标题也取不动了www。 类似 Day 1 CF1270H Number of Components,每个连通块中选出一个代表的点。令一个连通块内所有点按照 \(v_{i,j}=\{a_i+b_j,i,j\}\) 排序,对最小的 \(v_{i,j ......
Painters Gregor 1548E 1548 and

Leetcode 34. Find First and Last Position of Element in Sorted Array

题解 用了两次二分,分别计算第一个>=target的元素位置和第一个>target的元素位置。闭区间二分,[l,r]是未知的,保证每次答案都在[l,r]中,定义清楚nums[l-1]和nums[r+1]和target的关系。因为是while(l < r),所以到l == r时跳出循环,分析l == ......
Leetcode Position Element Sorted Array

微服务-gateway-Cross-Origin Read Blocking (CORB) blocked cross-origin response with MIME type text/plain

问题描述: 前端在访问后端获取验证码时,响应码200,但是浏览器并未显示出验证码(响应码及浏览器显示如下图) 查看浏览器控制台显示如下信息(如图): 看不清,可以看这 Cross-Origin Read Blocking (CORB) blocked cross-origin response ht ......

解决:disagrees about version of symbol module_layout

下载了linux无线backports驱动包,在编译成功加载驱动模块时,报如下错误: insmod: ERROR: could not insert module compat/compat.ko: Invalid module format 起初以为是驱动的vermagic不匹配导致的,随即查看驱 ......

文献阅读-We extend the well-established assumption-based interface of incremental SAT solvers to clauses, allowing the addition of a temporary clause that has the same lifespan as literal assumptions.

Abstract: We extend the well-established assumption-based interface of incremental SAT solvers to clauses, allowing the addition of a temporary clause ......

AT_abc301_h [ABC301Ex] Difference of Distance

AT_abc301_h [ABC301Ex] Difference of Distance 更好的阅读体验 一道基础图论,很好口胡,但是实现不太简单。 考虑离线,把询问挂在边上,按边权从小到大处理。 处理到一个边权时,把边权小于它的边的两端用并查集合并,对于等于这个边权的边在并查集上建图,跑一边 t ......
Difference 301 Distance AT_abc ABC

ORA-01502: index 'xxx' or partition of such index is in unusable state

SELECT 'alter index ' ||INDEX_NAME || ' REBUILD;' INDEX_NAME, INDEX_TYPE, TABLESPACE_NAME, TABLE_TYPE, STATUS FROM DBA_INDEXES WHERE STATUS = 'UNUSABL ......
index partition unusable 01502 state

Power of Matrix

prologue 因为格式问题被卡了一小时的人是谁我不说。 analysis 首先这个题目如果我们暴力计算的话,时间复杂度是不允许的(矩阵乘法前面有巨大的常数)。 那么我们就考虑怎么用一些巧妙地方法去计算。我们就可以采取两次分治地思想,递归求解。 以下结论显然成立,读者自证不难: \[A^1 + A ......
Matrix Power of

数字人论文:Audio-Driven Facial Animation by Joint End-to-End Learning of Pose and Emotion

老规矩. 直接第三章 3. 端到端网络结构 给一个audio 短窗口, 也就是片段. 我们预测窗口中间时刻的面部表情. 我们把表情看做一个全端点的向量 (后面我们会看这是什么的一种刻画面部) 一旦我们网络训完, 我们回各个时间点同时生成, 并行. 即使不需要过去的帧画面, 依然生成很稳定的画面. ( ......

java.lang.TypeNotPresentException: Type javax.servlet.http.HttpServletRequest not present

完整的报错信息 java.lang.TypeNotPresentException: Type javax.servlet.http.HttpServletRequest not present at java.base/sun.reflect.generics.factory.CoreReflec ......

Landsat 8 Collection 2 Tier 1 calibrated top-of-atmosphere (TOA) reflectance

Landsat 8 Collection 2 Tier 1 calibrated top-of-atmosphere (TOA) reflectance. Calibration coefficients are extracted from the image metadata. See Chan ......

Count of Sub-Multisets With Bounded Sum

Count of Sub-Multisets With Bounded Sum You are given a 0-indexed array nums of non-negative integers, and two integers l and r. Return the count of s ......
Sub-Multisets Multisets Bounded Count With

CF585F Digits of Number Pi

CF585F Digits of Number Pi 更好的阅读体验 观察数据范围,考虑数位 DP。 首先把长串中 \(len\geq\lfloor \frac{d}{2}\rfloor\) 的串提出来,塞进一个 trie 里,然后建立 ACAM,然后直接 DP 就行了。 设 \(f_{i,j,0/ ......
Digits Number 585F 585 CF

(待完善)Same data type with different length

首先,问题的前提是:不同数据类型的实际大小是依赖于编译器的具体实现的,那么假设在一个long为8B的平台,使用long作为例如memcpy的参数进行数据移动,并且指定的要移动的字节数超过了4B所能表示的最大值,那么如果将此代码移动到一个long为4B的平台,代码就会出现问题,因为此时的long已无法 ......
different length Same data type

MySQL解决查询语句1111 - Invalid use of group function错误

是因为mysql查询语句的字段当中有聚合函数,where条件中不能用聚合函数的计算值作为查询条件,否则会出现:> 1111 - Invalid use of group function 错误。 可以使用having解决。 补充:这里主要要清楚where和having的作用以及区别:“WHERE”  ......
语句 function 错误 Invalid MySQL

abc282E - Choose Two and Eat One

E - Choose Two and Eat One 非常巧妙的一集 可以将整个局面看作一张图,选两个数获得的score就是它们的边权,然后做最大生成树,不难发现操作和建树之间是一一对应的。 #include<cstdio> #include<algorithm> #include<cstring> ......
Choose 282E abc 282 Two

Display volume of alsa card on i3status

Display volume of alsa on i3status System: gentoo Desktop: i3wm here is my i3status config of volumes: order += "volume master" order += "volume speak ......
i3status Display 3status volume status

Educational Codeforces Round 96 (Rated for Div. 2) A. Number of Apartments

有三种建筑:三室厅、五室厅、七室厅。每个房间严格有一扇窗户。现在有 \(n\) 扇窗户,询问完全用完这些窗户的情况下,\(3, 5, 7\) 室厅各有多少间。输出任意一种答案,或者回答不可能。 假设一定有解,显然可以选择 \(mod\) 任意一个数贪心,不妨选最小的 \(3\) 。假设答案为 \(a ......

Codeforces Round 684 (Div. 2) B. Sum of Medians

定义 \(median\) 是一个非降序数组中第 \(\lceil \frac{n}{2} \rceil\) 的数。数组从 \(1\) 开始标号。 给两个数 \(n\) 和 \(k\) ,并给出一个长为 \(nk\) 的数组 \(a\) 。 需要分出为 \(k\) 个大小为 \(n\) 的数组,每个 ......
Codeforces Medians Round 684 Div

Element type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got undefined

原因就是组件引入错误,应该是 import {BillReverse} form '../xx' 写成了 import Reverse from '../xx' 两个错误 1. 没写大括号 2. 组件名错误 如何从打包后的文件分析导出内容格式,待解决 ......
components composite for undefined expected

Codeforces Round 695 (Div. 2) A. Wizard of Orz

有 \(n\) 个数位板摆放成一条直线,每个数位板可以显示 \(0 \sim 9\) 的数字。最开始数位板显示的是 \(0\) 。每秒数位板上的数字都会加 \(1\) , \(9\) 的下一个数字是 \(0\) 。当一个数位板被暂停,它上面的数字将会定格在当前秒。 你必须对某个数位板执行一次暂停,在 ......
Codeforces Wizard Round 695 Div

CF1886A Sum of Three 题解

Question 给定一个正整数 N ,我们需要找三个不同的整数x,y,z,使得 N = x+y+z,其中下x,y,z不能被三整除 solution 我们把N%3会有一些余数,我们针对余数来讨论,其中我们只关注xyz的余数 如果余数为0 那么也就可能是1+1+1,或者2+2+2,但是考虑到xyz不同 ......
题解 1886A Three 1886 Sum

CF1886B Fear of the Dark 题解

Question Monocarp 在一个二维平面上,他的初始点在 \(O=(0,0)\) ,他需要到 \(P(P_x,P_y)\) 不幸的是,他能走的范围在两个圆内,我们给出了两个圆的坐标 \(A=(A_x,A_y)\) ,\(B=(B_x,B_y)\) 两个圆的半径相同,我们需要找到最小的半径让 ......
题解 1886B 1886 Fear Dark

leaflet使用heatmap.js出现heatmap.js:527 Uncaught TypeError: Cannot assign to read only property 'data' of object '#<ImageData>'问题

一、问题背景 问题是这样发生的,因为项目中需要实现热力图的功能,所以使用了第三方的库 heatmap.js。 但是在一些浏览器中使用它时,会出现这个错误: > Uncaught TypeError: Cannot assign to read only property 'data' of obje ......
heatmap 39 TypeError ImageData Uncaught

CF963B Destruction of a Tree 题解

CF963B Destruction of a Tree 题解 洛谷题目链接 这里提供一个较为朴素的 DP 想法。 题意简述 给定一棵树,节点个数不超过 \(2 \times 10^5\),每次可以删掉度数为偶数的点。问最后能不能删完;能删完给出删除方案。 思路分析 首先可以随便选一个点作为根。 其 ......
题解 Destruction 963B Tree 963