摘要: /** * Initialize your data structure here. */ var MyStack = function() { this.inQueue = []; this.outQueue = []; }; /** * Push element x onto stack. * 阅读全文
posted @ 2020-06-24 11:26 guogrant 阅读(74) 评论(0) 推荐(0) 编辑
摘要: /** * Initialize your data structure here. */ var MyQueue = function() { this.stack1 = []; this.stack2 = []; }; /** * Push element x to the back of qu 阅读全文
posted @ 2020-06-24 11:24 guogrant 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Queue.isEmpty = function() { return (this.front == this.rear); } Queue.isFull = function() { return ((this.rear + 1) % this.MaxSize == this.front); } 阅读全文
posted @ 2020-06-23 17:28 guogrant 阅读(598) 评论(0) 推荐(0) 编辑
摘要: 路由守卫分类: 1,全局守卫 指的是路由实例上直接操作的钩子函数。 特点是所有路由配置的组件都会触发。 beforeEach (to, from, next) -- >注: 跳转前触发。 beforeResolve (to, from, next) --> 注: 在beforeEach, befor 阅读全文
posted @ 2020-05-10 17:01 guogrant 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 回文数判断 function isParmse(str) { if(typeof str !== 'string') return false; let i = 0,j = str.length - 1; while(i < j) { if (str.charAt(i) !== str.charAt 阅读全文
posted @ 2020-05-08 11:21 guogrant 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 什么是扁平化 ? 意思是将多维数组转化为一维数组。 话不多说,直接上代码。 直接方式 arr.flat(Infinity); For 循环 + 递归 function flat(arr) { let dd = []; for(let i=0; i<arr.length; i++) { if(Arra 阅读全文
posted @ 2020-05-08 10:52 guogrant 阅读(183) 评论(0) 推荐(0) 编辑
摘要: CIA知道么 ? 机密性(Confidentiality) 完整性(Integrity) 可用性(Availiability) 常见的web攻击有 XSS ,CSRF; xss 到底是什么 ? 黑客在你的浏览器中插入一段恶意JS脚本,窃取你的隐私信息【这里泛指cookie登录信息】,冒充你的身份进行 阅读全文
posted @ 2020-04-26 19:52 guogrant 阅读(1673) 评论(0) 推荐(0) 编辑
摘要: 软件环境: -Centos7 X 64 CEPH 版本: -ceph-deploy v1.5.37 -ceph version 10.2.9 步骤1.修改主机名(即节点名) 1) sed -i ‘/HOSTNAME/d’ /etc/sysconfig/network echo “HOSTNAME=主 阅读全文
posted @ 2018-06-12 08:46 guogrant 阅读(758) 评论(0) 推荐(0) 编辑
摘要: 1,wget http://download.redis.io/releases/redis-4.0.1.tar.gz //下载关于redis稳定的安装包, //我下的是redis-4.0.1 2,tar xzf redis-4.01.tar.gz //解压redis 3,cd redis-4.0. 阅读全文
posted @ 2017-07-28 15:14 guogrant 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: 1,查看ip 地址 ifconifg; 2,查看是否安装samba服务器,rpm -qa | grep samba; 3,如果有该服务器,启动 service smb start,否则进行安装 yum install samba; samba-3.0.21b-2 // 如果有这行输出,则表示安装了  阅读全文
posted @ 2017-07-25 10:01 guogrant 阅读(7805) 评论(0) 推荐(0) 编辑