react learn road the
E: The repository 'xxx' is not signed.
在ubuntu上安装了google chrome, 运行时有问题,删除了之后再次运行 sudp apt update 会报错 E: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signe ......
Codeforces Round 855 (Div. 3) C. Powering the Hero
有 \(n\) 张卡的卡堆,你可以自顶向下抽卡。装备卡显示数值为 \(a_i(a_i>0)\) ,英雄卡显示数值为 \(a_i = 0\) 。 如果是装备卡,你可以将卡抽出放在装备堆。如果是英雄卡,你可以将装备堆顶端的一张数值为 \(x\) 的装备卡装备给英雄,英雄数值 \(+ x\) 。无论是否装 ......
救济金发放(The Dole Queue, UVa 133)
#include<stdio.h> #include<string.h> #define maxn 100 int n,k,m,a[25]; int left, chance; int win, lose; char s[maxn], s2[maxn]; int go(int p, int d, i ......
The 2021 CCPC Guangzhou Onsite
Preface 逆天PKU,出的什么寄吧东西,做题全靠打表找规律,一场比赛全是\(\bmod 998244353\) 4题成功从金到铜完美区分,我们队VP的时候两个半小时就下班了,看祁神写了3h的大几何题L 虽然徐神开场一眼看出了F是个诈骗题,但推了1h无果还是要上机打表找规律才发现式子 最后和徐神 ......
The 2021 CCPC Guilin Onsite (XXII Open Cup, Grand Prix of EDG)
Preface 昨天下午16:30~21:30刚打完CCPC2021的广州,今天早上九点又开始打这场桂林,压力拉满了属于是 这场比起昨天那场良心太多了,开场还挺顺(虽然因为写Dijkstra偷懒TLE了四发),但开题啥的都是见一个会一个 中期虽然有点卡但因为祁神会了几何所以没有空机,然后再点完外卖后 ......
React框架的基本运行原理与组件定义方式
React框架的基本运行原理 React的本质是内部维护了一套虚拟DOM树,这个虚拟DOM树就是一棵js对象树,它和真实DOM树是一致的,一一对应的。 当某一个组件的state发生修改时,就会生成一个新的虚拟DOM,让它和旧的虚拟DOM通过Diff算法进行对比,生成一组差异对象。 然后变量差异对象, ......
Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'useSSL' at [row,col,system-id]: [8,75,"file:/usr/bigdata/hive-3.1.3/conf/hive-site.xml"]
在初始化hive时报错,出现如下问题: 错误原因:hive-site.xml 配置文件中,数据库的地址带有 & 符号。 将数据库地址中的 & 符号调整为 &,详情如下: 再次初始化hive,执行结果如下: ......
The innodb_system data file 'ibdata1' must be writable
MySQL无法启动 Active: deactivating (stop-sigterm) (Result: exit-code) 查看配置文件中的日志存储位置: view /etc/my.cnf 查看日志存储文件位置:/var/log/mysqld.log 文件错误提示:The innodb_sy ......
The JSON value of length n is too large and not supported
https://github.com/dotnet/runtime/issues/39953 I'm referring to this issue #30746 that was closed with limit of 125MB staying fixed opposed to being c ......
Docker启动失败,报错Cannot connect to the Docker daemon at unix:///var/run/docker 完美解决方案
问题描述: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 首次安装docker后,服务没有自启动 解决方案: 查看docker状态 1 service ......
React学习笔记14-dangerousSetinnerHtml指令
1.使用场景 dangerouslySetInnerHTML指令能将字符串当做html解析 相当于vue中的v-html指令 一般我们用来渲染富文本返回的html文本 2.使用方法 {this.state.tolist.map((item,index)=>{ return ( <span dange ......
Docker启动报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
问题描述: Docker启动报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? Cannot connect to the Docker daemon ......
React学习笔记13-小案例toList(状态,状态维护,条件渲染渲染)
写一个todoList小案例来体验一下组件的状态以及状态维护的注意点 import React, { Component } from 'react' import './css/01-index.css' export default class App extends Component { s ......
React项目中webpack的配置过程
初始化一个web项目 使用npm init -y 初始化一个项目 在项目目录下创建src, dist文件夹,创建webpack.config.js配置文件 然后在src文件夹下创建index.js, index.html文件 然后安装依赖包 npm i jquery -S 安装jQuery包 npm ......
sonarqube启动报错:You must address the points described in the following [2] lines before starting Elasticsearch.bootstrap check XXXmax numberXXXfor user[sonar] is too low .XXX check the logs at XXX/.log
You must address the points described in the following [2] lines before starting Elasticsearch.bootstrap check failure [1] of [2]: max number of threa ......
Scikit-learn 的 preprocessing.LabelEncoder函数:标签编码
参考文档:https://pythonjishu.com/sklearn-preprocessing-labelencoder/ 转换类别数据为整数:LabelEncoder 可以将字符串或其他类别型数据转换为整数。例如,如果你有一个特征包含类别 "红色"、"绿色" 和 "蓝色",LabelEnco ......
React DockerFile 镜像部署
1.配置Node.js 运行环境 (可以不用配置) 1> wget https://nodejs.org/dist/v12.18.1/node-v12.18.1-linux-x64.tar.gz 2> sudo tar -zxv f node-v12.18.1-linux-x64.tar.gz 3> ......
B. Chips on the Board
B. Chips on the Board 题意:保证在n*n的棋盘上对于每一个点的列或者行都有一个筹码,也可以两个都有,问最小筹码:对于每一个筹码计算:a[i]+b[i]; 要使每个点都满足,最少的筹码的个数应该为n 1.对于行来看,如果每一行都有一个筹码,那么列就可以随便填:直接全选择最小的列 ......
Vivado生成bitstream时报错[Opt 31-67] Problem: A LUT3 cell in the design is missing a connection on input pin I1, which is used by the LUT equation
这个原因主要是因为有一个引脚没有用到,解决方法。 1、打开Schematic。 2、根据提示的模块去找,比如说我的报错。 [Opt 31-67] Problem: A LUT3 cell in the design is missing a connection on input pin I1, w ......
React学习笔记12-循环渲染
在vue中我们一般是通过v-for指令来进行循环渲染的,但react中没有封装相关指令供我们调用 在react中我们可以通过数组的map方法来进行数据的循环渲染 import React, { Component } from 'react' export default class App ext ......
React学习笔记11-状态(state)
状态就是组件的数据,由组件自己设置和更改,也就是说由组件自己维护,使用状态 的目的就是为了在不同的状态下使组件的显示不同(自己管理) 定义状态的方法 可以在构造函数中定义也可以直接在类中通过变量的形式来定义 /* eslint-disable eqeqeq */ import React, { Co ......
React学习笔记10- Ref的应用
用法 1.给标签设置ref="username" 通过这个获取this.refs.username , ref可以获取到应用的真实dom 2. 给组件设置ref="username" 通过这个获取this.refs.username ,ref可以获取到组件对象 写法 import React, { ......
React学习笔记09- 事件处理
React采用on+事件名的方式来绑定一个事件,注意,这里和原生的事件是有区别的,原生的事件全是小写 onclick , React里的事件是驼峰 onClick ,React的事件并不是原生事件,而是合成事件。 事件回调的几种写法 1.直接在组件内定义一个非箭头函数的方法,然后在render里直接 ......
[918] Copy the formatting from one cell in a table of a Word document to another cell in Python
To copy the formatting from one cell in a table of a Word document to another cell, you can use the python-docx library in Python. Here's a step-by-st ......
[919] Change the horizontal alignment of a cell to center within a table of a Word document using Python
To change the horizontal alignment of a cell to center within a table of a Word document using Python and the python-docx library, you can set the ali ......
[920] Copy the font style from one cell in a table of a Word document to another cell using Python
To copy the font style from one cell in a table of a Word document to another cell using Python and the python-docx library, you can access the font p ......
Paper Reading: Sample and feature selecting based ensemble learning for imbalanced problems
为了克服现有集成方法的缺点,本文提出一种新的混合集成策略——样本和特征选择混合集成学习 SFSHEL。SFSHEL 考虑基于聚类的分层对大多数样本进行欠采样,并采用滑动窗口机制同时生成多样性的特征子集。然后将经过验证训练的权重分配给不同的基学习器,最后 SFSHEL 通过加权投票进行预测。SFSHE... ......
Codeforces Round 872 (Div. 2) B. LuoTianyi and the Table
给一个 \(n \times m\) 的矩阵和 \(n \times m\) 个数,你需要把这些数填入矩阵。保证 \[\sum_{i=1}^n \sum_{j=1}^m \left ( \mathop{max}\limits_{1 \leq x \leq i, 1 \leq y \leq j} a_ ......
强化学习Q-Learning和DQN算法
1 Q-Learning 强化学习中有state和action的两个重要概念。而Q-Learning算法就是用来得到在state上执行action的未来预期奖励。具体的算法流程如下: 初始化一个Q-table。 在当前状态\(s\)选择一个动作\(a\)。 执行动作\(a\),转移到新的状态\(s' ......
CF367C Sereja and the Arrangement of Numbers
这题首先上来会发现题目中的很多信息都是假的,核心就是问要构造一个\(x\)个点的完全图至少要多长的序列 我们把序列中相邻的两个元素看作图上的一条边,则可以把问题转化为:给一个\(x\)个点的完全图,问至少要走多长的路径才可以遍历图中的所有边至少一次 简单讨论下会发现当\(x\)为奇数时,此时图中每个 ......