fedor game and new
Backtrader - numpy.core._exceptions.MemoryError: Unable to allocate 77.2 GiB for an array with shape (10368000003,) and data type float64
1.0 Error numpy.core._exceptions.MemoryError: Unable to allocate 77.2 GiB for an array with shape (10368000003,) and data type float64 錯誤提示 2.0 原因 沒有任 ......
CF1559D2 Mocha and Diana (Hard Version) 题解
[Luogu](https://www.luogu.com.cn/problem/CF1559D2) | [Codeforces](https://codeforces.com/problemset/problem/1559/D2) ### 题意 给定两个森林 $A$ 和 $B$,均有编号 $1$ ......
Reward Modelling(RM)and Reinforcement Learning from Human Feedback(RLHF)for Large language models(LLM)技术初探
Reward Modelling(RM)and Reinforcement Learning from Human Feedback(RLHF)for Large language models(LLM)技术初探 ......
How do you display code snippets in MS Word preserving format and syntax highlighting?
How do you display code snippets in MS Word preserving format and syntax highlighting? 回答1 Here is the best way, for me, to add code inside word: Go t ......
Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
1)错误信息 Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apac ......
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
https://tools.ietf.org/html/rfc7231 Table of Contents 1. Introduction ....................................................6 1.1. Conformance and Error ......
[LeetCode] 2352. Equal Row and Column Pairs
Given a 0-indexed n x n integer matrix grid, return the number of pairs (ri, cj) such that row ri and column cj are equal. A row and column pair is co ......
cpp test write content speed to ssd and usual disk respectively 1M,10M,100M rows data,the fact has illustrated the write speed of ssd is 4-5 times faster than usual disk
#include <chrono> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <thread> #include <uuid/uuid. ......
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
这个异常在springboot,是一个常见的异常,我们引入了mybatis依赖,确没有在.yml文件中配置数据源,这次我配置了数据源,但是因为有二个application.yml和application-dev.yml,没有指定yml的环境,在application.yml中添加指定dev即可 ......
C# new 和override重写的区别
在 C# 中,函数前面加 override 和 new 都可以实现函数的重写(Overriding)。不过它们实现的方式不同,因此会有一些区别。 ## 1.Override 在 C# 中,override 关键字主要用于重写父类中虚方法(Virtual Method),它表示子类中的方法会覆盖父类中 ......
__new__和__init__的方法
构造方法包括创建对象和初始化对象,在python当中,分为两步执行:先执行__new__方法,然后执行__init__方法; 。__init__是当实例对象创建完成后被调用的,然后设置对象属性的一些初始值。 。__new__是在实例创建之前被调用的,因为它的任务就是创建实例然后返回该实例,是个静态方 ......
[ABC201D] Game in Momotetsu World 题解
[Game in Momotetsu World](https://www.luogu.com.cn/problem/AT_abc201_d) ### 题目大意 在一个 $n\times m$ 的网格中,存在红色和蓝色两种格子,红色格子用 `-` 表示,蓝色格子用 `+` 表示。 现在 Takaha ......
[ABC205F] Grid and Tokens 题解
[Grid and Tokens](https://www.luogu.com.cn/problem/AT_abc205_f) ### 题目大意 给定 $n$ 个点和一个 $H\times W$ 的网格,每个点可以放置在 $(A_i,B_i)$ 到 $(C_i,D_i)$ 的矩形中或不放,每一行或一 ......
[ABC205E] White and Black Balls 题解
[White and Black Balls](https://www.luogu.com.cn/problem/AT_abc205_e) ### 题目大意 将 $n$ 个白球,$m$ 个黑球排成一列,要求满足 $\forall i\in[1,n+m],w_i\le b_i+k$,问存在多少种排法。 ......
[学习笔记]数据结构_线性表_顺序表and单链表
线性表 线性表是一种逻辑结构,表示元素之间一对一的相邻关系。顺序表和链表是指存储结构,两者属于不同层面上的概念。 线性表的基本操作 bool InitList(&L)//初始化表,构造一个空的线性表 int Length(L)//求表长。返回线性表L的长度,即L中数据元素的个数 int Locate ......
[LeetCode] 1346. Check If N and Its Double Exist 检查整数及其两倍数是否存在
Given an array `arr` of integers, check if there exist two indices `i` and `j` such that : - `i != j` - `0 这道题给了一个整型数组,让检测是否有一个数字和其倍数同时存在的情况。一看到这道题博主就 ......
Windows debug and troubleshoot
windows debug and troubleshoot # 一。 使用windbg 调试应用的三种方式: 1. 附件到已经运行的进程; 2. 从windbg运行新的程序; 3. 从windbg分析程序的dump 文件; # 二。 计算机架构(x86,x64 ) # 三。 虚拟内存 1. 通过分 ......
3. Liouville's Theorem and Ergodicity
## 为什么会涉及到刘维尔定理和遍历性 在前面的关于微正则系综的平衡态的博客里面,我们对于微正则系综做了一些假设,其中最重要的两个假设是: 1. 微正则系综中各个系统出现的概率都是一样大的,没有哪一个处于某个状态的系统备受青睐 2. 在微正则系综里面,我们在计算平衡态的某些宏观性质时,认为对于相空间 ......
application deployment by jenkinsfile and docker compose
Using Jenkins CI/CD for your NodeJS app https://blog.harveydelaney.com/jenkins-build-test-deploy-node-app/ Jenkinsfile https://github.com/internetarch ......
AtCoder Beginner Contest 258 G Grid Card Game
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc259_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc259/tasks/abc259_g "AtCoder 传送门") 记 $b_i = ......
w task2 - problem and solution
Read and understand the question -highlight / underline key parts causes ... solutions your opinion I believe ... Introduction: variety of reasons, st ......
nohup execute command,both write info to file and print on console
nohup ./h1 >>write.log |tail -f write.log ......
[LeetCode] 1345. Jump Game IV 跳跃游戏之四
Given an array of integers `arr`, you are initially positioned at the first index of the array. In one step you can jump from index `i` to index: - `i ......
mpi4py.MPI.COMM_WORLD.Get_size失败——mpiexec and python mpi4py gives rank 0 and size 1
参考: https://stackoverflow.com/questions/29264640/mpiexec-and-python-mpi4py-gives-rank-0-and-size-1 运行代码: import mpi4py.MPI as MPI comm = MPI.COMM_WORL ......
CF321E - Ciel and Gondolas
考虑 $dp_{i,j}$ 表示用 $i$ 条船载走前 $j$ 个人的最小贡献,$w_{i,j}$ 表示区间 $[i,j]$ 里的人同乘一条船的代价。则 $dp_{i,j}=\min_{1\le k\lt j}(dp_{i-1,k}+w_{k+1,j})$。 我们发现,$w_{i,j}$ 可以通过 ......
读书笔记: Psychological Power between knowledge and practice; Inverted Totalitarianism;
John Dewey once remarked that equality becomes dangerous when it is widely praised but empty in practice. Perhaps the most crucial element in the stru ......
[Debug] Debug and inspect event listeners with Devtools
You can use getEventListeners(button)directly inside chrome devtool, but not inside application code. You can use monitorEvents(button, 'keydown'), no ......
URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)
问题描述: 如下图,在.xml配置文件中配置报错:URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs) 解决办法: 工具栏:file-->settings :找到Schemas and DTDs 中加 ......
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
问题现象为通过kubectl进入pods时提示在未来版本中将移除这种进入这种方式,需要使用新的命令格式进入 ```sh [root@master ~]# kubectl exec myweb-c5xq6 -it /bin/bash kubectl exec [POD] [COMMAND] is DE ......
Codeforces 1515I - Phoenix and Diamonds(值域倍增+线段树)
首先 $c$ 很大,因此复杂度跟 $c$ 有关的项肯定只能是 $\log c$ 之类的。 类比 IOI2021 dungeons 的套路,我们**对值域进行分层**,假设 $c\in[2^{\omega-1},2^{\omega})$,考虑令重量在 $\ge 2^{\omega-1}$ 的物品为“重 ......