当基类中的函数被protected的时候,只有继承的子类才能访问,为了使得非继承的类也可以使用,使用friend class (类名)来进行操作 #include <iostream> using namespace std; class Lover{ public: Lover(string th ...
分类:
编程语言 时间:
2020-07-19 23:16:52
阅读次数:
128
package LeetCode_1060 /** * 1060. Missing Element in Sorted Array * (Prime) * Given a sorted array A of unique numbers, find the K-th missing number s ...
分类:
其他好文 时间:
2020-07-19 00:49:27
阅读次数:
93
You are given three positive (i.e. strictly greater than zero) integers xx , yy and zz . Your task is to find positive integers aa , bb and cc such th ...
分类:
其他好文 时间:
2020-07-18 19:56:20
阅读次数:
82
Thread.yield()方法是Thread类中的静态方法,直接由类名调用。 yield表示让步、放弃的意思。 Thread.yield() 方法,使当前线程由执行状态,变成为就绪状态,让出CPU,在下一个线程执行时候,此线程有可能被执行,也有可能没有被执行。 《Java编程思想》中这样描述:Th ...
分类:
其他好文 时间:
2020-07-17 22:13:47
阅读次数:
101
Minimum Size Subarray Sum Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which th ...
分类:
其他好文 时间:
2020-07-16 18:17:25
阅读次数:
57
1:所有的发布订阅就是一个对象。 class Obersve { event={} //等价于下面的constructor // constructor() { // this.event = {} // } subscribe(type, fn) { //订阅 if (Object.keys(th ...
分类:
其他好文 时间:
2020-07-15 15:47:31
阅读次数:
68
CSS数据样式 表格 定制表格 我们除了可以使用<table>标签进行绘制表格,在css3中display也支持进行表格的样式绘制。 样式规则说明 table 对应 table table-caption 对应 caption table-row 对表 tr table-cell 对于th或td t ...
分类:
Web程序 时间:
2020-07-14 13:37:41
阅读次数:
125
关于thymeleaf中th:insert、th:replace、th:include的区别 1. th:insert:保留自己的主标签,保留th:fragment的主标签 1 需要替换的片段内容: 2 <footer th:fragment="copy"> 3 <script type="text ...
分类:
其他好文 时间:
2020-07-14 13:20:09
阅读次数:
62
写法一: <img th:src="@{/css/bianji.png}" th:onclick="|viewById('${user.id}','${user.is_concurrent}')|" title="编辑"/> 写法二: <a href="#" th:onclick="viewById ...
分类:
Web程序 时间:
2020-07-13 13:19:18
阅读次数:
86
表格元素及相关样式 1、<table>标签:声明一个表格 2、<tr>标签:定义表格中的一行 3、<td>和<th>标签:定义一行中的一个单元格,td代表普通单元格,th表示表头单元格 表格相关样式属性 border-collapse 设置表格的边线合并,如:border-collapse:coll ...
分类:
Web程序 时间:
2020-07-13 13:17:09
阅读次数:
102