一、队列(Queue) Python的Queue模块中提供了同步的、线程安全的队列类,包括FIFO(先入先出)队列Queue,LIFO(后入先出)队列LifoQueue,和优先级队列PriorityQueue。这些队列都实现了锁原语,能够在多线程中直接使用。可以使用队列来实现线程间的同步。 常用方法 ...
分类:
编程语言 时间:
2021-02-19 13:37:25
阅读次数:
0
react基础一 1. 组件三大属性 state state 为组件的内部数据。类似 vue 中的 data; 注意:状态必须通过 setState进行更新。更新是合并,而不是替换。更新状态有两种方式。 // 对象方式 this.setState({ count: this.state.count ...
分类:
其他好文 时间:
2021-02-18 13:31:01
阅读次数:
0
/** * 方法一:使用indexOf和subString方法,循环判断并截取 */ public static void getStrCount1(String str, String con) { int count = 0; while (str.indexOf(con) >= 0) { // ...
分类:
编程语言 时间:
2021-02-17 14:46:16
阅读次数:
0
We are given a matrix with rows and columns has cells with integer coordinates , where?`0 这道题给了一个R行C列的矩阵,又给了一个起始点 (r0, c0),让按照离起始点的曼哈顿距离从小到大排序坐标点。博主最先 ...
分类:
其他好文 时间:
2021-02-17 14:32:03
阅读次数:
0
背景 Read the fucking source code! --By 鲁迅 A picture is worth a thousand words. --By 高尔基 说明: KVM版本:5.9.1 QEMU版本:5.0.0 工具:Source Insight 3.5, Visio 文章同步在 ...
分类:
系统相关 时间:
2021-02-16 12:27:04
阅读次数:
0
注意不满$4$位的话要补成$4$位。 string s; set<int> S; int main() { cin>>s; while(s.size()<4) s='0'+s; while(true) { sort(s.begin(),s.end(),greater<char>()); string ...
分类:
其他好文 时间:
2021-02-15 12:21:49
阅读次数:
0
A 题面 对于一个仅含小写字母的字符串 \(a\) ,若 \(p\) 为 \(a\) 的前缀且 \(p\ne a\) ,那么我们称 \(p\) 为 \(a\) 的 \(proper\) 前缀。 规定字符串 \(Q\)(可以是空串)表示 \(a\) 的周期,当且仅当 \(Q\) 是 \(a\) 的 \ ...
分类:
其他好文 时间:
2021-02-15 12:07:24
阅读次数:
0
https://www.acwing.com/problem/content/1133/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:38
阅读次数:
0
聚合函数 函数返回值型 函数(参数) 描述 BIGINT count(*), count(expr), count(DISTINCT expr[, expr...]) 1.统计总行数,包括含有 NULL 值的行 2.count(expr) 统计提 供非 NULL 的 expr 表达式 值的行数 3. ...
分类:
其他好文 时间:
2021-02-10 13:04:58
阅读次数:
0
模板字符串(template string)是增强版的字符串,用反引号(`)标识。它可以当作普通字符串使用,也可以用来定义多行字符串,或者在字符串中嵌入变量。 $('#result').append(` There are <b>${basket.count}</b> items in your b ...
分类:
其他好文 时间:
2021-02-09 11:57:00
阅读次数:
0