common

树中两个节点的最低公共祖先

大憨熊 提交于 2020-02-10 09:19:10
树是二叉查找树的情况 题目来自LeetCode: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ Lowest Common Ancestor of a Binary Search Tree Total Accepted: 3402 Total Submissions: 8709 My Submissions Question Solution Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes v and w as the lowest node in T that has both v and w as descendants (where we allow a node to be a descendant of itself).” _______6______ / \ ___2__ ___8__ / \ /

修改 myeclipse8.5 servlet 模板

China☆狼群 提交于 2020-02-09 17:51:52
在myeclipse8.5的安装目录下找到 \Common\plugins下的com.genuitec.eclipse.wizards_8.5.0.zmyeclipse75020090612.jar 注意先关闭myeclipse。 1.找到Genuitec\Common\plugins下的com.genuitec.eclipse.wizards_8.5.0.zmyeclipse75020090612.jar ( "Common"和"MyEclipse 8.5"同在"Genuitec"文件夹下 搜索:com.genuitec.eclipse.wizards,迅速定位到com.genuitec.eclipse.wizards_8.5.0.zmyeclipse75020090612.jar 以防万一,建议先备份那个.jar包 ) 2.选择使用WinRAR打开 3.在WinRAR里,依次进入: templates --->servlet 4.修改 5..最后WinRAR提示是否保存对jar包的修改,“是”就行了。 来源: https://www.cnblogs.com/ckant/p/3778650.html

Samba 简单快速文件共享

China☆狼群 提交于 2020-02-07 14:23:57
Samba 简单快速文件共享 Samba是linux,unix与windows之间进行交互操作的软件组件。 所需软件包括:samba(服务器端软件包),samba-client(客户端软件包)和samba-common(公共文件软件包) samba由smbd和nmbd两个守护进程组成,smbd默认监听端口是TCP 139和445。 ① 快速安装配置Samba服务器 Yum –y install samba ② 创建共享目录 Mkdir /common Chmod 777 /common Echo “hello ” > /common/smb.txt #创建测试文件 ③ 修改配置文件 Samba默认配置文件是/etc/samba/smb.conf Vim /etc/samba/smb.conf [ common] #共享名称为common Comment = common share #共享注释 Path = /common #指定共享路径 browseable = yes #所有人可见 guest ok = no #拒绝匿名访问 writable = yes #支持写入数据 ④ 创建访问账号,samba共享的密码是独立的密码,不同于系统密码,默认存放在/var/lib/samba/private useeradd –s /sbin/nologin smbuser smbpasswd

错误:selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

淺唱寂寞╮ 提交于 2020-02-07 14:18:35
错误再现 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 来源: https://www.cnblogs.com/HByang/p/12272878.html

Facade静态代理

社会主义新天地 提交于 2020-02-03 01:34:52
< ? php namespace app\index\controller ; //use \app\facade\Test; class Demo2 { public function index ( $name = 'ThinkPHP' ) { //对象方式访问hello方法 // $test = new \app\common\Test; // return $test->hello($name); /** * 如果想静态调用一个动态方法,需要给当前的类绑定一个静态代理的类 *如果没有在静态代理类中显示指定要绑定的类名,就需要动态显示绑定一下 * \think\Facade::bind() */ \think\Facade : : bind ( 'app\facade\Test' , '\app\common\Test' ) ; // 实际上访问路径为 \app\facade\Test::hello('Peter Zhu'); return Test : : hello ( 'Peter Zhu' ) ; } } 名字建议和代理类相同 < ? php namespace app\facade ; //app\facade\Test 代理了 app\common\Test class Test extends \ think \ Facade { //代理app\common

235. Lowest Common Ancestor of a Binary Search Tree

℡╲_俬逩灬. 提交于 2020-02-02 09:15:40
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia : “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself ).” Given binary search tree: root = [6,2,8,0,4,7,9,null,null,3,5] Example 1: Input: root = [6,2,8,0,4,7,9,null,null,3,5], p = 2, q = 8 Output: 6 Explanation: The LCA of nodes 2 and 8 is 6. Example 2: Input: root = [6,2,8,0,4,7,9,null,null,3,5], p = 2, q = 4 Output: 2

235. Lowest Common Ancestor of a Binary Search Tree (E)

三世轮回 提交于 2020-02-02 08:30:23
Lowest Common Ancestor of a Binary Search Tree (E) Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia : “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself ).” Given binary search tree: root = [6,2,8,0,4,7,9,null,null,3,5] Example 1: Input: root = [6,2,8,0,4,7,9,null,null,3,5], p = 2, q = 8 Output: 6 Explanation: The LCA of nodes 2 and 8 is 6. Example 2: Input: root = [6

Vue实战:公用组件拆分,结合毕设完成后台导航栏

半世苍凉 提交于 2020-01-31 03:49:10
Vue实战:公用组件拆分,结合毕设完成后台导航栏   一、创建文件夹 将公用组件都放到common文件中   二、修改webpack.base.conf.js 在webpack.base.conf.js添加别名’common’: resolve(‘src/common’),让common指向刚刚创建的文件夹,修改文件都需要 重启项目 resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.esm.js', '@': resolve('src'), 'common': resolve('src/common'), } },   三、使用公用组件 在pages/home/Home.vue中使用公用组件bar.vue <template> <div class="home"> <common-header></common-header> </div> </template> <script> import CommonHeader from 'common/bar/Bar.vue' export default { name: 'Home', components:{ CommonHeader } } </script> <style lang="stylus" scoped> <

CVE&CWE概念及其关系

别来无恙 提交于 2020-01-29 17:36:25
1. 概念 CVE (Common Vulnerabilities & Exposures,通用漏洞和风险)是国际著名的安全漏洞库,也是对已知漏洞和安全缺陷的标准化名称的列表,它是一个由企业界、政府界和学术界综合参与的国际性组织,采取一种非盈利的组织形式,其使命是为了能更加快速而有效地鉴别、发现和修复软件产品的安全漏洞。 CWE (Common Weakness Enumeration,通用缺陷枚举)是由美国国土安全部国家计算机安全部门资助的软件安全战略性项目。CWE成立于2006年,建立之初分别借鉴了来自CVE(“Common Vulnerabilities & Exposures”公共漏洞和暴露),CLASP(Comprehensive Lightweight Application Security Process,全面轻量级应用安全过程)等组织对缺陷概念描述和缺陷分类。 CWE,先后推出了 CWSS (Common Weakness Scoring System)和 CWRAF (Common Weakness Risk Analysis Framework)工程研究。CWSS主要研究的是对源代码缺陷产生危害的不同等级划分,目前属于研究初期,研究报告发布于2011年。报告中称:跨站脚本攻击、SQL注入、缓冲区溢出、跨站伪造请求和信息泄漏等是危害级别最高的缺陷。

解决:selenium.common.exceptions.WebDriverException: Message: 'chromedriver' execu

假如想象 提交于 2020-01-29 05:36:05
# http://chromedriver.storage.googleapis.com/index.html 在准备写个脚本去爬取网易云歌曲信息时。用selenium去戳。这里采用的是chrome浏览器,链接网页时报错:File “C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py”, line 73, in init self.service.start() File “C:\Python37\lib\site-packages\selenium\webdriver\common\service.py”, line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home 解决办法: 安装与浏览器版本匹配的webdriver 1、打开谷歌浏览器, 在地址栏输入 chrome:/