抽象类 es中并没有引用抽象类的概念,这是ts对es又一次扩展,所谓抽象类就是只能被继承而不能被实例化的类。举例说明: 多态 紧接上例 特殊的ts类型:this类型 类的成员方法可以直接返回一个this,可以很方便地实现链式调用。 在继承的时候,this类型也可以表现出多态,这里的多态是指this既 ...
分类:
其他好文 时间:
2020-04-07 12:38:22
阅读次数:
84
题目描述 In a village called Byteville, there are $n$ houses connected with $n 1$ roads. For each pair of houses, there is a unique way to get from one to ...
分类:
其他好文 时间:
2020-04-07 00:16:06
阅读次数:
70
Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the ...
分类:
其他好文 时间:
2020-04-06 20:59:56
阅读次数:
79
训练赛上一题,当时没做出来,Orz太弱了 The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c ...
分类:
其他好文 时间:
2020-04-06 19:02:19
阅读次数:
77
1. 使用 Iterator 遍历 HashMap EntrySet 2. 使用 Iterator 遍历 HashMap KeySet 3. 使用 For-each 循环迭代 HashMap 4. 使用 Lambda 表达式遍历 HashMap 5. 使用 Stream API 遍历 HashMap ...
分类:
其他好文 时间:
2020-04-06 17:40:49
阅读次数:
59
Given 2 lists a and b. Each element is a pair of integers where the first integer represents the unique id and the second integer represents a value. ...
分类:
其他好文 时间:
2020-04-06 10:06:59
阅读次数:
72
1.新建项目 新建vue项目直接通过命令行即可,过程比较简单,具体参照:https://www.jianshu.com/p/02b12c600c7b 需要注意的是,直接在需要生成的目录下用命令行操作即可,不用先新建该项目的文件夹。 2.遇到报错 Error: Cannot find module ' ...
分类:
其他好文 时间:
2020-04-05 20:28:44
阅读次数:
92
在JS中万物皆对象,字符串,数组,数值,函数,日期...... 内置对象都有它们自己的属性和方法: 对象名.属性名称; 对象名.方法名称 一、Array数组对象 1)shift 格式:数组.shift() 功能:移除数组开头第一项 参数:无 返回值:移除的内容 原数组发生改变 2)unshift 格 ...
分类:
编程语言 时间:
2020-04-05 18:24:52
阅读次数:
79
本篇博客所讲的是C#泛型中的协变和逆变。 首先讲协变: 协变 要把泛型参数定义为协变,可在类型定义中使用out关键字,例如: public interface IEnumerable<out T> : IEnumerable { IEnumerator<T> GetEnumerator(); } 相 ...
package LeetCode_746 /** * 746. Min Cost Climbing Stairs * https://leetcode.com/problems/min-cost-climbing-stairs/description/ * On a staircase, the i ...
分类:
其他好文 时间:
2020-04-05 09:48:47
阅读次数:
78