摘要: Promise Promise.resolve(x) 可以看作是 new Promise(resolve ⇒ resolve(x)) 的简写,可以用于快速封装字面量对象或其他对象,将其封装成 Promise 实例 返回一个Promise对象,使用该对象来注册处理结果和错误的回调 同时可以串联.the 阅读全文
posted @ 2021-01-28 16:57 rentu 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 前置知识 Redux Rematch:Redux 基础上的改进 更简洁的代码,避免大量的冗余 不用写 action.type,actionCreate 其实就是把这些东西写到了 model 里而已 文档中的描述十分的棒,写的是真的好 理解模型与回答几个问题一样简单: 我的初始 state 是什么? 阅读全文
posted @ 2021-01-28 14:45 rentu 阅读(556) 评论(0) 推荐(0) 编辑
摘要: React 和 Redux 的连接 数据流 进行一次数据的传递来再次描述整个过程 store.dispatch(action) 向store传递action,描述发生事件 {type: , payload: } store调用传入的reducer store收到action之后,会将当前的state 阅读全文
posted @ 2021-01-28 14:16 rentu 阅读(83) 评论(1) 推荐(0) 编辑
摘要: 新类型 元组(Tuple) // Declare a tuple type let x: [string, number]; // Initialize it x = ["hello", 10]; // OK // Initialize it incorrectly x = [10, "hello" 阅读全文
posted @ 2021-01-28 14:15 rentu 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 基于深度卷积胶囊网络的高光谱图像和光谱-空间分类 摘要 ​ 最近在监督分类问题中展现出优势的胶囊网络被认为将是深度学习的下一个时代。胶囊网络利用向量代替标量来表示特征,从而增加了特征的表现能力。本篇论文介绍一个针对高光谱图像(HSI)分类的深度胶囊网络来改良传统卷积神经网络的表现。除此之外,还提出一 阅读全文
posted @ 2020-05-13 23:56 rentu 阅读(589) 评论(1) 推荐(0) 编辑
摘要: 【luogu P3901】数列找不同 【题意】给一整数序列,Q个询问,询问区间内数字是否互不相同 1 #include<cstdio> 2 #include<cmath> 3 #include<algorithm> 4 #define ll long long 5 using namespace s 阅读全文
posted @ 2020-05-13 23:54 rentu 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 【lowbit】 1 #define lowbit(x) x&(-x) 【单点修改】 1 void add(int pos, int k) 2 { 3 while (pos <= n) 4 { 5 tree[pos] += k; 6 pos += lowbit(pos); 7 } 8 } 【区间询问 阅读全文
posted @ 2020-05-13 23:46 rentu 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 【最大公约数】 1 ll qpow(ll a, ll x) 2 { 3 ll ret = 1; 4 while (x) 5 { 6 if (x & 1) 7 { 8 ret = (ret * a) % mod; 9 } 10 a = (a * a) % mod; 11 x >>= 1; 12 } 1 阅读全文
posted @ 2020-05-13 23:43 rentu 阅读(199) 评论(0) 推荐(0) 编辑
摘要: A 【题意】签到题 B 【题意】长度为n的字符串,由n-2个a和2个b组成,按照字典序排序,问第k个 【题解】读题细心,最开始以为是ab代表01,搞二进制转化,实际上上面是正确题意,直接算b的位置即可 C 【题意】长度为n的由0,1,2组成的序列,分成两个数字,让他们的最小值最大 【题解】所以我们只 阅读全文
posted @ 2020-04-06 10:46 rentu 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 【题目大意】n种菜,每种有pi份,有m位厨师,第i位厨师做第j道菜的时间是cij,求将所有菜做完花费的最小时间 【题目分析】 【相对暴力】 直接进行拆点,类似 "修车" (其实就是一样的 但是问题在于如果直接拆的话点数过多,就会TLE 于是就需要想办法进行优化 (建议不熟的话先把暴力写会) 阅读全文
posted @ 2020-03-15 17:45 rentu 阅读(160) 评论(0) 推荐(0) 编辑