1. 题目描述 2. 代码 1 # Definition for singly-linked list. 2 # class ListNode: 3 # def __init__(self, val=0, next=None): 4 # self.val = val 5 # self.next = ...
分类:
其他好文 时间:
2020-11-11 16:47:05
阅读次数:
24
git init:创建/初始化一个的存储库 git init git status:显示工作目录和暂存区的状态 git status git add .:将文件添加到索引/暂存区 git add . git commit:提交更改到存储库 git commit git checkout:切换分支 g ...
分类:
其他好文 时间:
2020-11-11 16:34:31
阅读次数:
8
class Oar: def __init__(self,oar): self.o=oar def print(self): print(self.o) # print 不会到class Oar下面找,除非引用self.print def decorator(cls): def _print(sel ...
分类:
编程语言 时间:
2020-11-11 16:32:21
阅读次数:
9
import datetime import json import requests from exception import AsstException #自定义 from log import logger #自定义 class Messenger(object): def __init__ ...
分类:
编程语言 时间:
2020-11-11 16:32:04
阅读次数:
9
变量 type varName = value; 每个变量都有类型,类型可以是基本类型,也可以是引用类型 变量名必须是合法的标识符 变量声明是一条完整的语句,因此声明以分号结束 变量作用域 类变量 实例变量 局部变量 变量的命名规范 要保证见名知意 类成员变量: studentName(第一个单词首 ...
分类:
编程语言 时间:
2020-11-11 16:25:50
阅读次数:
9
这次写的是小游戏扫雷,由于时间问题,扫雷的成功失败判断还没有写的很好,只是把大体的思路写出来了。 这次最主要的是有两个类 第一个是地雷类 :lanmine 1 using System; 2 using System.Collections.Generic; 3 using System.Drawi ...
一、 Git 常用命令速查 git branch 查看本地所有分支git status 查看当前状态 git commit 提交 git branch -a 查看所有的分支git branch -r 查看远程所有分支git commit -am "init" 提交并且加注释 git remote a ...
分类:
其他好文 时间:
2020-11-11 16:03:10
阅读次数:
6
Express安装使用 1、新建文件夹,使用npm init生成package.json文件。 2、执行npm命令安装express npm install express --save 3、基础使用 多级目录 动态路由 由于路由匹配是从上往下的,所以在使用动态路由时,一定要注意路由配置的顺序,如果 ...
分类:
Web程序 时间:
2020-11-10 11:39:42
阅读次数:
33
语法错误 "TypeError: Cannot read property 'resetFields' of undefined" 关键字前面的值变成了undefined property or method "isCollapse" is not defined on the instance b ...
分类:
其他好文 时间:
2020-11-10 11:13:58
阅读次数:
5
一棵树,每个点为黑点或白点。一开始全是白点。 支持维护三个操作:1、把$x$子树中包含$x$的极大黑连通块找出来,把所有点儿子染黑(如果$x$为白色直接将$x$染成黑色)。2、将一棵子树染白。3、询问一个点的颜色。 \(n,Q\le 10^5\) 考虑怎么处理第一个操作。 假设没有操作二,每次在操作 ...
分类:
其他好文 时间:
2020-11-10 11:13:14
阅读次数:
6