react learn road the
2023/2024 年 React 组件库 与 相关库 推荐
2023/2024 年 React 组件库 与 相关库 推荐 asdf 展开目录 精挑细选的 React 库 , 质量非常的高. 建议每一个都点进去官网看一看. (知乎不支持表格中的超链接 , 只能用这种普通文本了) 这篇文章会一直持续更新下去.... UI 组件库 ⭐ Material-UI ......
react native 退出登录后清空路由栈并返回登录页
背景: 由于项目使用的expo-router,一开始时在退出登录是如下实现的: import { router } from "expo-router"; ... router.replace("/my/login/login"); ... 使用expo-router的router.replace方 ......
react项目中预览pdf文件
最近需求,要在b端展示上传的pdf文件。实现方式有很多,记录一下我们最常用的pdf.js //安装 "pdfjs-dist": "2.0.402" //引入 import * as pdfjs from 'pdfjs-dist' import * as pdfjsWorker from 'pdfjs ......
[JOISC 2021 Day2] 道路の建設案 (Road Construction)
[JOISC 2021 Day2] 道路の建設案 (Road Construction) 题意 给定图上 \(n\) 个点,求前 \(k\) 小曼哈顿距离点对距离。 题解 很好的一道题。 首先有一个 \(O(nlog^2n)\) 的做法,个人感觉还是很有启发性的。 一般对于第 \(k\) 小的处理方 ......
React学习笔记08- 组件的样式
1.使用行内样式 想给虚拟dom添加行内样式,需要使用表达式传入样式对象的方式来实现: // 注意这里的两个括号,第一个表示我们在要JSX里插入JS了,第二个是对象的括号 <p style={{color:'red', fontSize:'14px'}}>Hello world</p> 行内样式需要 ......
[题解]CF1881G Anya and the Mysterious String
思路 发现如果一个字符串中有长度大于等于 \(2\) 回文子串,必定有长度为 \(2\) 的回文子串或长度为 \(3\) 的回文子串,并且形如:aa 和 aba。 所以考虑用线段树这两种情况。维护一段区间的最左、次左、最右、次右的元素,同时用两个标记变量 \(f_1,f_2\) 分别表示这个区间中是 ......
Ant Design中表单验证输入框默认值initialValue不更改值会验证不通过(react)
Ant Design中表单验证输入框默认值initialValue不更改值会验证不通过(react) 更改前 <Form.Item label="用户标识" name="id" rules={[ { required: true, message: '用户标识不能为空!', }, ]} > <Inp ......
React学习笔记07-组件嵌套
一个项目肯定是由多个组件构成的,组件之前必然会存在相互嵌套的关系 在react中如果想要将一个组件嵌入到另外一个组件中 只需要在父组件的render函数的返回值中放入子组件即可 请看下面代码 import React, { Component } from "react" class Navbar ......
React学习笔记06-函数式组件
函数式组件即在React中通过函数的方式来声明一个组件 import React from "react" function App() { return ( <div> 函数式组件 <div>hhh</div> </div> ) } /* 16.8之前 //无状态 16.8之后 react hoo ......
React学习笔记05-类组件
ES6的加入让JavaScript直接支持使用class来定义一个类,react创建组件的方式就是使用的类的继承, ES6 class 是目前官方推荐的使用方式,它使用了ES6标准语法来构建,看以下代码 import React from 'react' import ReactDOM from ' ......
PAT_A 1038 Recover the Smallest Number
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we c ......
How to get macOS CPU details information in the command line All In One
How to get macOS CPU details information in the command line All In One
如何通过命令行获取 macOS CPU 的详细信息
......
[QOJ6555] The 2nd Universal Cup. Stage 5. J : Sets May Be Good
先给 EI 磕三个 首先考虑用 \(n\) 个变量 \(x_1,x_2,\cdots,x_n\in\{0,1\}\) 表示第 \(i\) 个点选不选,那么导出子图的边数的奇偶性就是 \[f(x_1,x_2,\cdots,x_n)=\left(\sum_{(i,j)\in E}x_ix_j\right ......
asp.net core signalr 客户端调用服务端方法报:Error:Failed to invoke 'adduserToConnection' due to an error on the server
TS端调用方法为: connection.start() .then(() => { connection.invoke("adduserToConnection",account,connection.connectionId); }) .catch((err) => { console.erro ......
CF1257E The Contest
用桶存,做一遍前缀和,令 \(b_{x,y}\) 表示序列 \(x\) 包含 \(1\sim y\) 的数字个数。考虑枚举第一个序列保留的前缀 \(1\sim i\),对于第三个序列,如果其保留了后缀 \(j\sim n(i<j)\),考虑哪些数需要被移掉,那么答案就是: \[b_{1,n}-b_{ ......
react技术栈更新到uptodate
现在许多东西更新了,react全家桶可能我的技术栈也要更新一下,于是查询官网,先找个方便点的直接起飞,然后看能不能冲出宇宙 首先安装一下 next去, 这个东西是个桶, npx会执行远端的命令,如果本地没有的话,它会自动搜索无端npm的包下载然后执行 npx create-next-app@late ......
The 2nd Universal Cup. Stage 5: Northern J Sets May Be Good
题解 我们考虑计算 \(\sum_{S\subseteq\{1,2,3,\cdots,n\}} (-1)^{cnt(S)}\),这里 \(cnt(S)\) 表示 \(S\) 集合的导出子图的边数。 我们记 \(x_i=[i\in S]\)。 我们考虑删掉 \(n\) 号点。 注意到如果 \(x_i\ ......
【题解 CF840C & P4448】 On the Bench & 球球的排列
On the Bench 题面翻译 给定一个序列 \(a(a_i\le 10^9)\),长度为 \(n(n\le 300)\)。 试求有多少 \(1\) 到 \(n\) 的排列 \(p_i\),满足对于任意的 \(2\le i\le n\) 有 \(a_{p_{i-1}}\times a_{p_i} ......
Go - Changing the Timing for Running Performance Tests
Problem: You want to run performance tests for a specific duration or a specific number of iterations. Solution: You can increase the minimum duration ......
Learn Git in 30 days—— 第 30 天:分享工作中几个好用的 Git 操作技巧
写的非常好的一个Git系列文章,强烈推荐 原文链接:https://github.com/doggy8088/Learn-Git-in-30-days/tree/master/zh-cn 终于来到了最后一天,这篇文章将分享几个好用的 Git 操作技巧,或许可以节省你不少 Git 版控过程的时间。 如 ......
CF543B Destroying Roads
好经典的题,因为暑假前集训做过类似的思想的题所以知道怎么处理 这题由于要求最多的删去的边数,则等价于求最少保留几条边,很显然留下的边一定是最短路上的 但问题是如果两条路不相交的话很简单,可事实是两条路径可以重叠一些部分,这些边用了两次可能可以使答案变优 关于这种图上两条路径的题有一个经典结论,即两条 ......
论文阅读:Knowledge Distillation via the Target-aware Transformer
摘要 Knowledge distillation becomes a de facto standard to improve the performance of small neural networks. 知识蒸馏成为提高小型神经网络性能的事实上的标准。 Most of the previo ......
react + electron 打包记录
package.json 中的更改: 增加: "homepage": "./", "build": { "productName": "xxxx", "appId": "com.xxx.win", "directories": { "output": "dist" }, "files": [ "di ......
Nginx配置错误:connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream
问题描述 今天本打算学一下Nginx反向代理发送请求到OpenResty(其实也就是个Nginx,可以把它理解成Anaconda中的python版本),再通过OpenResty使用Lua脚本向Redis或数据库查找缓存来着,在配环境的时候报了个502错误。 我把我的环境描述下,这样如果有遇到这个问题 ......
Robust Graph Representation Learning via Neural Sparsification
目录概符号说明NeuralSparse Zheng C., Zong B., Cheng W., Song D., Ni J., Yu W., Chen H. and Wang W. Robust graph representation learning via neural sparsifica ......
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
CentOS7 pyenv安装Python 3.10.13 报错 yum install -y openssl-devel openssl11-devel openssl11-lib CPPFLAGS="-I/usr/include/openssl11" LDFLAGS="-L/usr/lib64/ ......
[914] In Python's datetime library, you can format dates using the strftime() method
In Python's datetime library, you can format dates using the strftime() method. This method allows you to create a formatted string representation of ......
论文阅读 Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection
原始题目:Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection 中文翻译:Generalized Focal Loss:学习用于密集目标检测的 Qual ......
[911] Read Data from Google Sheets into Pandas without the Google Sheets API (.gsheet)
ref: Read Data from Google Sheets into Pandas without the Google Sheets API import pandas as pd sheet_id = "1XqOtPkiE_Q0dfGSoyxrH730RkwrTczcRbDeJJpqRB ......
definition of the convex optimization
A convex optimization problem is one in which the objective and constraint functions are convex, which means they satisfy the inequality \(f_i(\alpha ......