创建组件的三种方式 第一种:通过ES6的方式创建 第二种:通过ES5的方式创建 第三种:函数式定义 组件的生命周期 在React 中组件(Component)也是有自己的生命周期方法的。展示一个界面从创建到销毁的一生。 组件的生命周期分成三个状态: Mounting:已插入真实 DOM Updati ...
分类:
其他好文 时间:
2018-06-16 17:49:58
阅读次数:
128
问题描述: Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges ...
分类:
其他好文 时间:
2018-06-16 14:26:00
阅读次数:
170
Remove Duplicates from Sorted Array II描述Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted arra ...
分类:
其他好文 时间:
2018-06-11 15:46:59
阅读次数:
122
下标间距<=k,立马就想到滑动窗口,维护一个大小为k的区间。 对于新的数,维护区间大小的同时,需要判断该区间中是否存在 [num-t, num+t] 的数字。由于需要根据大小查找,可以利用大小为 k 的 set 作为维护的区间,set 是有序的,因此可以调用 lower_bound 找到第一个大于等 ...
分类:
其他好文 时间:
2018-06-09 15:24:08
阅读次数:
165
Tips: ① 如何删除老版本docker 安装流程: ① sudo yum install docker-ce ② yum list docker-ce --showduplicates | sort -r (此示例使用排序-r命令对结果进行排序,版本号由最高到最低,并被截断。) ③ 可以通过yu ...
分类:
其他好文 时间:
2018-06-06 21:59:20
阅读次数:
138
LeeCode初级算法的Python实现 数组 coding: utf 8 """ @Created on 2018/6/3 17:06 @author: ZhifengFang """ 排列数组删除重复项 def removeDuplicates(nums): if len(nums) 1: k ...
分类:
编程语言 时间:
2018-06-06 18:30:50
阅读次数:
236
yy or Y to copy the line or dd to delete (cutting) the line then p to paste the copied or deleted text after the current line or P to paste the copied ...
分类:
系统相关 时间:
2018-06-06 18:26:08
阅读次数:
195
1. //数组去重的方法let arr = [1,2,5,3,4,2,9,6,4,4];let unique = function(arr){ let hashTable = {}; let data = []; for(let i=0;i<arr.length;i++){ //这是判断条件(已经存 ...
分类:
编程语言 时间:
2018-06-06 01:17:07
阅读次数:
249
import urllib, urllib.request, urllib.parse import random import zlib import re import os, time SavePath="Save" def InitDev(): AllHanzi = "" if not os... ...
分类:
编程语言 时间:
2018-06-03 17:28:06
阅读次数:
261