摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2017-11-18 15:04 DerMond 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that 阅读全文
posted @ 2017-11-13 17:14 DerMond 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: 阅读全文
posted @ 2017-11-13 15:08 DerMond 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
posted @ 2017-11-13 10:56 DerMond 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 数据库有三个字段,名字、学科、成绩,如图 1、 找出每科成绩最高的学生的名字与分数 2、找出总分最高的学生名字与总分 3、找出三科成绩均大于80分的学生 阅读全文
posted @ 2017-07-26 23:12 DerMond 阅读(2419) 评论(0) 推荐(0) 编辑
摘要: 作者:匿名用户链接:https://www.zhihu.com/question/21653286/answer/95532074来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 转帖-[官解]Windows上Python2和3如何兼容 想学习Python3,但是暂时又 阅读全文
posted @ 2017-07-22 20:26 DerMond 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 第24行的preg_match('/IN/i',$val[0]) 第34行的preg_match('/BETWEEN/i',$val[0]) 两个正则表达式没有设置起始,因此xxxinxxxx,xxxbetweenxxx的字符串都可以匹配成功,因而构成了注入。 阅读全文
posted @ 2017-07-22 20:11 DerMond 阅读(913) 评论(0) 推荐(0) 编辑
摘要: ThinkPHP在开启DEBUG的情况下会在Runtime目录下生成日志,如果debug模式不关,可直接输入路径造成目录遍历。 ThinkPHP3.2结构:Application\Runtime\Logs\Home\17_07_22.log ThinkPHP3.1结构:Runtime\Logs\Ho 阅读全文
posted @ 2017-07-22 19:47 DerMond 阅读(2152) 评论(0) 推荐(0) 编辑
摘要: 在开启了Lite模式后,在ThinkPHP/extend/Mode/Lite/Dispatcher.class.php中第73行: 有两点:一是加入了preg_replace使用了e修饰符,二是'$var[\'\\1\']="\\2\;"'中双引号中的PHP代码可以直接被执行。 比如: http:/ 阅读全文
posted @ 2017-07-22 19:41 DerMond 阅读(1488) 评论(0) 推荐(0) 编辑
摘要: Lib/Core/Model.class.php中解析SQL语句的函数parseSql没有对SQL语句进行过滤,使用不当可导致SQL注入。(哈哈,其实用再安全的框架使用不当都可能造成SQLi) 函数: 如果使用以下方式编写查询数据库代码,则会造成SQL注入。 可提交以下请求造成SQLi 阅读全文
posted @ 2017-06-21 19:22 DerMond 阅读(427) 评论(0) 推荐(0) 编辑