11038 many how uva
[885] How to generate automated tables in Word document with Python
ref: How to Generate Automated Word Documents with Python ref: docxtpl快速上手使用,数据填入以及循环写入表格 Creating a Template Before you can proceed, you must first c ......
[884] How to generate automated Word documents by Python
ref: python-docx ref: How to Generate Automated Word Documents with Python ref: Automating Word Documents from Excel Using Python | ‘docxtpl’ Tutorial ......
How to print a string with a variable by using the echo command in the shell script All In One
How to print a string with a variable by using the echo command in the shell script All In One
Node.js & nvm
......
题解 UVA1537 Picnic Planning
这道题在显然是最小生成树,但是很显然我是不会打最小生成树的。 题意描述 给定一张 \(n\) 个点 \(m\) 条边的无向图,求出无向图的一棵最小生成树,满足一号节点的度数不超过给定的整数 \(s\)。 具体思路 首先,看到这种度数最多为 \(s\) 的题,显然想到 wqs 二分。但是 wqs 二分 ......
How to get a variable data type in Python 3 All In One
How to get a variable data type in Python 3 All In One
typeof in js
type(var) & isinstance(var, type)
......
How to enable HTTPS on a localhost Node.js Server All In One
How to enable HTTPS on a localhost Node.js Server All In One
Let's Encrypt - Free SSL/TLS Certificates
......
How to SupressWarnings for Sonar Security Hotspots?
How to SupressWarnings for Sonar Security Hotspots? Sonarlint/SonarQube allows you to use comments for disabling analysis in specific lines. In order ......
How to use ESM & TypeScript in Node.js All In One
How to use ESM & TypeScript in Node.js All In One { "compilerOptions": { "module": "NodeNext", // "module": "Node16", } } { "name": "esm-ts-package", ......
How to Set the Default Gateway on Ubuntus
ip route list ip r | grep default sudo ip route add default via 10.10.1.1 sudo ip route add default via 10.10.1.1 dev enp0s3 sudo ip route delete defa ......
题解 UVA1566 John
题目描述 两个人轮流取石子,每人每次可以 \([1,a_i]\) 个石子,最后取完石子的人为负。问最终谁会赢。 具体思路 若堆数为 \(1\) 且该堆数量为 \(1\),先手必败。 若堆数不为 \(1\) 且每堆数量都为 \(1\),若有奇数堆,先手比败,否则,先手必胜。 若堆数不为 \(1\),转 ......
How to fix Fetch TypeError in Node.js All In One
How to fix Fetch TypeError in Node.js All In One
TypeError: terminated at Fetch.onAborted (node:internal/deps/undici/undici:11000:53)
......
How to fix macOS Finder not support semicolon symbol in filename error All In One
How to fix macOS Finder not support semicolon symbol in filename error All In One
macOS Finder 不支持文件名中包含 : 分号 bug ❌
......
linux 系統 提示: File "/usr/lib/python3.8/multiprocessing/connection.py", line 527, in Pipe OSError: [Errno 24] Too many open files
Exception in thread Thread-4:Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner File "/usr/lib/p ......
How to use Node.js rename files in folder All In One
How to use Node.js rename files in folder All In One
fs.rename
fs.renameSync
fsPromises.rename
......
How to parse OR AND within text
假设你有一行 String condition = "A or B and C"; 语句,请问怎么做才能变成一行真正的逻辑表达式(能在计算机中运行计算)? Resolution 声明一个List<List<String>>结构; 先分割 or ; 变成 [ A, B and C ] 不包含and的, ......
How to delete a file in Node.js All In One
How to delete a file in Node.js All In One
fs.unlink
fsPromises.unlink
fs.unlinkSync
......
How to fix Tailwind CSS colors not work in Next.js All In One
How to fix Tailwind CSS colors not work in Next.js All In One
Tailwind CSS & Next.js 13
......
洛谷 UVA10714 Ants の 题解
这道题只有一个点比较难想。 大概思路就是先输入个 $t$,表示要跑几轮,后面的照常输入。因为蚂蚁都是一样的,所以两个蚂蚁碰面的时候相互穿过和各自掉头是没有区别的,我们按照前者模拟就好,其余思路暴力求解即可。 #include <iostream> #include <cmath> using nam ......
洛谷 UVA10852 Less Prime の 题解
这道题更像是结论题,因为他要推一个小结论,才能做出这道题。 大概思路是先打个素数表,存到数组 $a$ 内, $cnt$ 是素数表的最后一个元素的下标。之后循环 $M$ 次去输入 $N$,每次输入 $N$ 之前都要定义两个变量,分别是 $mx$,存 $n - p \cdot x$ 的最大值,$ans$ ......
How to fix Node.js fs.readFileSync toString Error All In One
How to fix Node.js fs.readFileSync toString Error All In One
......
Sol.UVA10127
题意:给定 \(n\),找到形如 \(1111...1111\) 的数 \(y\),使得 \(y \equiv 1\mod x\),最终输出 \(y\) 的位数。 思路:形如 \(1111...1111\) 的数可以拆分成 \(10...00 \times 1 +10...0 \times 1 + ......
How to clone git repository with specific revision/changeset?
How to clone git repository with specific revision/changeset? 回答1 UPDATE 2 Since Git 2.5.0 the feature described below can be enabled on server side w ......
How VC6 Disconnect a Project from Source Control
Microsoft KB Archive/180945 < Microsoft KB Archive Jump to:navigation, search Knowledge Base How To Disconnect a Project from Source Control Article I ......
UVA1030 题解
思路分析 猜想 我们可以在题目中看出一下几个突破口: 能“看穿”的位置所对应的单位立方体是一定不存在的。 如果前视图的右上角的颜色 \(A\) 和顶视图的的右下角颜色 \(B\) 不同,那么对应的格子就一定不存在。 在删除这个立方体后,我们还可以发现,挖去立方体的左侧和 \(B\) 左侧的颜色不同。 ......
UVA11210 题解
思路分析 一道大模拟。 一共只有 \(34\) 种牌,因此可以一次判断是否“听”这些牌。比如,为了判断是否“听”一万,只需要判断自己拿到这张一万后能否可以继续和牌。这样,问题就转化成了给定 \(14\) 张牌,判断是否可以和牌。为此,我们可以递归求解:首先将两张牌作为“将”,然后每次选 \(3\) ......
UVA11464 题解
思路分析 暴力枚举? 我们可以枚举每个数字变或不变,最后判断整个矩阵是否满足条件。但是,这样做最多需要枚举 \(2^{255}≈5\times10^{67}\) 中情况,是一定会超时的。 大眼观察 注意到 \(n\le15\),第一行只有不超过 \(2^{15}=32768\) 种可能,所以第一行的 ......
UVA1352 题解
思路分析 构造排列表 立方体只有 \(4\) 个,暴力法是可行的。但是如果我们要暴力,首先得清楚一个立方体到底有几种不同的旋转方式。 接下来,我们用“姿态”一词代替“旋转方法”。假设 \(6\) 个面的编号为 \(1\sim6\),从中选择一个面作为“顶面”,“顶面”的对面为“底面”。然后我们在剩下 ......
How to print a web page without breaking the table content in JavaScript All In One
How to print a web page without breaking the table content in JavaScript All In One
使用 JavaScript 如何在不破坏表格内容的情况下打印一个网页
......
FFmpeg: How To Convert MP4 Video To MP3 Audio?
FFmpeg: How To Convert MP4 Video To MP3 Audio? Learn how to Convert an MP4 Video to MP3 Audio with FFmpeg from this guide. By Darwin Monteiro On Oct 1 ......