1.什么是LEGB? L:local 函数内部作用域 E:enclosing 函数内部与内嵌函数之间 G:global 全局作用域 B:build in 内置作用域 2.它们是作什么用的 为什么非要介绍这个呢?或者说它们的作用是什么? 原因是因为我们的在学习Python函数的时候,经常会遇到很多定义 ...
分类:
其他好文 时间:
2020-02-01 12:49:40
阅读次数:
124
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee ...
分类:
其他好文 时间:
2020-02-01 11:02:57
阅读次数:
105
双指针 class Solution: def moveZeroes(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ i = j = 0 while j < l ...
分类:
其他好文 时间:
2020-01-31 23:02:26
阅读次数:
64
今晚写代码的时候更新了一下Chrome,结果打开所有网页都提示 喔唷 崩溃了,而且找到c盘内没有bd0001.sys文件,电脑内也无任何百度系的软件,此解决办法pass。 折腾了半天从google中找到了原因,因为其中渲染器代码完整性保护(Renderer Code Integrity Protec ...
分类:
其他好文 时间:
2020-01-31 18:45:24
阅读次数:
1407
使用多个光源渲染支持多光源类型使用光照信息计算顶点光照了解球谐函数 上部分介绍了Unity的基本单个光源,现在学习多个光源参与渲染物体,使用Unity5.6.6f2 1 Include Files 为了给Shader增加支持多个光源,我们需要增加更多Pass通道。但是这些Pass最终包含了几乎完全相... ...
分类:
编程语言 时间:
2020-01-31 17:17:35
阅读次数:
126
前言 不想复现的可以访问榆林学院信息安全协会CTF训练平台找到此题直接练手 HITCON 2016 WEB -babytrick(复现) 原题 index.php 1 <?php 2 3 include "config.php"; 4 5 class HITCON{ 6 private $metho ...
分类:
Web程序 时间:
2020-01-31 14:05:34
阅读次数:
95
The "First-Class object" in Python: Created at runtime Assigned to a variable or element in a data structure Pass as an augument to a function Return ...
分类:
其他好文 时间:
2020-01-31 10:57:55
阅读次数:
76
1 安装python的mysql驱动 $ conda install mysql-connector-python 2 测试mysql驱动是否安装成功 import不报错,即说明安装成功 >>> import mysql.connector 3 查询数据 # 导入MySQL驱动: import my ...
分类:
数据库 时间:
2020-01-31 10:56:13
阅读次数:
84
Navicat 连接MySQL 8.0.11 出现2059错误 错误 使用Navicat Premium 连接MySQL时出现如下错误: 原因 mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password ...
分类:
数据库 时间:
2020-01-30 22:41:58
阅读次数:
95
例子 from types import FunctionType, MethodType def func1(): pass class Foo(object): def func2(self): pass print(isinstance(func1, FunctionType)) 表明func ...
分类:
其他好文 时间:
2020-01-30 10:09:07
阅读次数:
83