this关键字含义 1. this代表什么 this代表对象, 代表的是当前对象, this里保存的是对象的地址. 谁是当前对象? 比如方法调用 t1.say() 在这个方法执行时 执行以下代码 : public String say() { return “姓名:” + name + “,年龄:” ...
分类:
编程语言 时间:
2021-06-29 16:00:27
阅读次数:
0
https://leetcode-cn.com/problems/largest-bst-subtree/ public int largestBSTSubtree(TreeNode root) { return (root == null) ? 0 : getInfo(root).size; } ...
分类:
其他好文 时间:
2021-06-29 15:58:52
阅读次数:
0
//默认返回 json GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); // GlobalConfiguration.Configuration.Formatters.Jso ...
1. 题目 给定一个 m x n 二维字符网格 board 和一个字符串单词 word 。如果 word 存在于网格中,返回 true ;否则,返回 false 。 单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母不允许被重 ...
分类:
其他好文 时间:
2021-06-29 15:32:31
阅读次数:
0
//目标类型 data = [{},{},{}...]data = this.chartData.map((item, index) => { const newItem = { value: item.num, name: item.title_name, } return newItem}) ...
分类:
其他好文 时间:
2021-06-28 21:08:43
阅读次数:
0
Js得到选中的文字 (function getSelectionText() { if (window.getSelection) { return window.getSelection().toString(); } else if (document.selection && document ...
分类:
其他好文 时间:
2021-06-28 21:07:38
阅读次数:
0
正则表达式很好用但是不好记,为方便以后查询做个记录 public static class ValidatorHelper { #region 验证输入字符串为数字(带小数) /// <summary> /// 验证输入字符串为带小数点正数 /// </summary> /// <param nam ...
WPF的设计理念是:数据驱动,UI与逻辑松耦合 一、传统的CLR属性 public class Person { private string _Name; public string Name { get { return _Name; } set { _Name = value; } } } 二 ...
编译器会给类的非静态成员函数添加一个this参数。 int square(int num) { return num * num; } class Hehe{ public: int square(int num) { return num * num; } }; int main() { int ...
分类:
其他好文 时间:
2021-06-28 20:58:16
阅读次数:
0
题目链接:用最少数量的箭引爆气球 题目描述: 题解: class Solution { public: static bool cmp(vector<int> &a, vector<int> &b) //按右边界排序 { return a[1] < b[1]; } int findMinArrowS ...
分类:
其他好文 时间:
2021-06-28 20:44:14
阅读次数:
0