approximation theory method and
[ERROR] Can't find error-message file '/data/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
1. MySQL5.7.21启动时报错: [ERROR] Can't find error-message file '/data/mysql/3307/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir ......
Application of Permutation and Combination
# Reference https://www.shuxuele.com/combinatorics/combinations-permutations.html # Online Tool https://gadget.chienwen.net/x/math/percomb # Cracking ......
Celery with FastAPI and TortoiseORM
API server using: `fastapi+tortoise-orm+postgresql+redis+supervisor+nginx` There are some period tasks and async tasks that will run in `celery+rabbit ......
wait_timeout and interactive_timeout 参数
### wait_timeout and interactive_timeout 参数 - 非交互模式连接:通常情况下,应用到RDS实例会采用非交互模式,具体采用哪个模式需要查看应用的连接方式配置,比如PHP通过传递MYSQL_CLIENT_INTERACTIVE常量给mysql_connect() ......
coe_xfr_sql_profile.sql脚本 适用 oracle数据库版本:10.2, 11.1, 11.2, 12.1, 12.2 18c_and 19c
coe_xfr_sql_profile.sql脚本 内容如下: 适用 oracle数据库版本:10.2, 11.1, 11.2, 12.1, 12.2 18c_and 19c 注明:复制粘贴即可。 SPO coe_xfr_sql_profile.log;SET DEF ON TERM OFF ECH ......
get_object_or_404 method in Django Models
Some functions are hard as well as boring to code each and every time. But Django users don’t have to worry about that because Django has some awesome ......
12_How to deploy Flask apps on Ubuntu VPS Using gunicorn and Ngnix
地址:https://www.codewithharry.com/blogpost/flask-app-deploy-using-gunicorn-nginx/ How to deploy flask app on Ubuntu VPS using Nginx and gunicorn In thi ......
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 ......
1) Factory method pattern
类别: Creational Pattern 问题/动机 如何创建一套子类的问题(父类引用指向子类实例) 情形1:一个方法返回一个具体的子类 极端情况:1万个子类需要一万个方法吗 极端情况:如过再扩展一万个子类,还需要再增加一万个方法吗 极端情况:虽然有一万个子类,但只需要用到其中一个,其他9999 ......
Item 1: Consider static factory methods instead of constructors
实际应用: package java.lang; public final class Boolean implements java.io.Serializable, Comparable<Boolean> { public static final Boolean TRUE = new Bool ......
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即可 ......
[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$,问存在多少种排法。 ......
[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 ......
drf:Method Not Allowed
put 请求,报错如题 其中的url url(r'books/', views.BookView.as_view()),path('books/<int:pk>', views.BookView2.as_view())原因:第一条url后没加$, put请求被第一条url匹配到, 第一个url是ge ......
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 ......
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 ......