- 博客(21)
- 资源 (94)
- 收藏
- 关注
原创 MySQL排名
MySQL中没有Rank排名函数,当我们需要查询排名时,只能使用MySQL数据库中的基本查询语句来查询普通排名。尽管如此,可不要小瞧基础而简单的查询语句,我们可以利用其来达到Rank函数一样的高级排名效果。在这里我用一个简单例子来实现排名的查询:首先我们先创建一个我们需要进行高级排名查询的players表,CREATE TABLE `players` ( `pid` int(2) NOT...
2018-12-29 18:34:21 1996
原创 node js 判断数组中是否包含某个值
判断数组中是否包含某个值这里有四种方法。用的测试数据:let arr=["a","b","c"];let arr2={"a":"aaa","b":"bbb","c":"ccc"};in判断是否在数组的key里in操作符针对的是key,而非value。而对于普通的一维数组来说,key是隐藏的。所以,对于判断某个数组中是否
2018-12-28 12:40:04 15238
原创 Win32gui 无效窗口句柄
在用模拟浏览器上传文件时,用win32gui查找窗口,并输入文件路径,点击确定上传。然而在设置打开窗口焦点时,报错了:xx是 无效窗口句柄经过spy++排查,确定窗口类和名称都无误,后来经过多次测试,发现问题是:窗口打开太慢,在窗口打开之前就开始查找窗口了,当然就找不到了。所以要等一等,一秒也行。time.sleep(1)部分python代码片段如下:ele_file.click()...
2018-12-28 09:43:34 6549
原创 Python selenium win32gui autoIT SendKeys 文件上传
selenium对网页进行UI自动化时经常会遇到操作系统弹框,比如上传、下载框,对这种弹框,selenium无法处理。上传按钮有简单的input按钮,还有js、flash等复杂按钮,针对不同的按钮,我们有不同的自动化方法。input标签直接send_keys以网址:http://www.sahitest.com/demo/php/fileUpload.htm为示例。# -*- coding...
2018-12-27 15:19:40 1531
原创 Python PIL自动定位消消乐
先看定位好的效果图:from PIL import Image, ImageDrawimport mathimport operatorfrom functools import reducesrc_img = Image.open("xxl.png")tpl_img = Image.open("xx.png")# tpl_colours = tpl_i
2018-12-24 19:05:21 1792
原创 OpenCV3模板匹配
模板匹配,就是在一幅图像中寻找另一幅模板图像最匹配(也就是最相似)的部分的技术。#include <opencv2/core/core.hpp>#include <opencv2/imgproc/imgproc.hpp>#include &a
2018-12-23 16:51:01 1462
原创 PyMySQL增删查改CRUD
PyMySQL增删查改的例子:表结构:CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(255) COLLATE utf8_bin NOT NULL, `password` varchar(255) COLLATE utf8_bin NOT NULL, PRI...
2018-12-22 17:32:00 420
原创 PHP输出函数区别
函数名介绍返回值echo语言结构,非函数,无括号时可以多个值,用逗号分割。整形和字符串,布尔类型会转换成1或空无返回值print语言结构,非函数,只能一个参数值,比echo慢。打印类型同echo无返回值print_r可以输出整形、字符串、数组、对象第二个参数设定为true,将打印内容返回sprintf把格式化的字符串写入变量中返回格式化好的字...
2018-12-21 15:30:58 677
原创 PHP错误日志跟踪记录register_shutdown_function/set_error_handler/set_exception_handler
写程序不可避免有错误,而调试错误就很重要了,需要看错误信息,错误发生的文件、行号等,特别是对于线上的系统调试,不能让用户看到错误信息,这就需要把错误信息记录日志里。下面简单写了一段错误记录的小程序。<?phpfunction myErrorHandler($errno, $errstr, $errfile, $errline){ $f = fopen("log.txt&
2018-12-21 10:46:09 1402
原创 mysql获取年月日周季度
MySQL经常查询某个日期时间的记录,可以用以下方法转换到对应的年月日时分秒季度。获取第几天SELECT to_days("2018-12-07"); # 737400SELECT to_days("2018-12-07 10:17:12"); # 737400获取第几秒SELECT to_s
2018-12-20 11:28:29 6126
原创 tar排除文件夹
用tar命令打包很方便,直接使用 tar -zcvf test.tar.gz test 即可。排除某个个目录或文件,只需要加--exclude参数即可。如下:tar -zcvf tomcat.tar.gz --exclude=tomcat/logs tomcat排除多个,就加多个--exclude:tar -zcvf t.tar.gz --exclude=logs --exclude=...
2018-12-18 10:00:52 499
原创 PHP CURL GET HTTPS报错SSL certificate problem: unable to get local issuer certificate
请求HTTP使用php curl获取http资源,不会报错。如下:<?php// 创建curl资源$ch = curl_init(); // 设置urlcurl_setopt($ch, CURLOPT_URL, "baidu.com"); // 将Transfer作为字符串返回curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);// 执...
2018-12-15 11:13:14 28347 2
原创 ERROR 1221 (HY000): Incorrect usage of UNION and ORDER BY
union和union all区别UNION会把两个查询语句的结果集合并起来。union会过滤掉两个结果集中重复的行,而union all不会过滤掉重复行。union order在union两个带order的select的时候,会报错。ERROR 1221 (HY000): Incorrect usage of UNION and ORDER BY解决方法就是使用括号,把两个SELE...
2018-12-12 11:20:27 2012
原创 curl: (35) SSL connect error
最近用curl下载图片,发现报错:curl: (35) SSL connect error换成opensslcurl默认支持https是nss,而不是openssl,需要换成openssl。cd /usr/local/src/wget http://curl.haxx.se/download/archeology/curl-7.19.7.tar.gztar -zxf curl-7.1...
2018-12-10 15:32:01 24522
原创 Yii2 rules datetime格式化验证
使用datetime平常经常使用datetime这种数据格式,特别是在model的rules里:public function rules(){ return [ [['create_at'], 'datetime'] ];}那表单提交后怎么转换为这种格式呢?一般使用Yii2的formatter,在配置文件中添加这样的代码:配置formatterre...
2018-12-07 16:40:01 3591
原创 NodeJS字典转URL中的参数值
Node的querystring.stringify,类似php的http_build_query,Python的urllib.urlencode。const querystring = require('querystring');querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });// return...
2018-12-05 15:24:59 1280
原创 PHP下载采集图片到本地
下载远程图片到本地/** * 下载远程图片到本地 * * @param string $url 远程文件地址 * @param string $filename 保存后的文件名(为空时则为随机生成的文件名,否则为原文件名) * @param array $fileType 允许的文件类型 * @param string $dirName 文件保存的路径(路径其余部分根据时间系统自动生...
2018-12-05 15:20:13 5631
原创 MySQL避免重复插入记录的四种方法
MySQL的INSERT INTO IF EXISTS语句可以保证不重复插入。INSERT INTO iqilu_category(catname,type,cid,caturl,keywords) SELECT '中国人', 2, 2031, 'china','中国人民' FROM DUAL WHERE NOT EXISTS(SELECT catname FROM iqilu_categ...
2018-12-05 11:44:18 4228
原创 Mysql查询重复字段
查询category表中,catname字段值重复的数据及重复次数select catname, count(*) as count from category group by catname having count>1
2018-12-03 15:14:11 3555
原创 NodeJS模块全局安装路径配置
配置NODE路径npm或cnpm默认是安装到当前目录,如果想安装到全局目录下,就需要加-g参数。例如安装express模块:npm install -g express如果不配置全局目录,require的时候,就会找不到,报错:Error: Cannot find module 'express'默认全局目录是C:\Users\Administrator\AppData\Roami...
2018-12-02 21:24:40 2897
原创 Python 将有序list打乱随机排序
random模块下的shuffle函数就可以打乱list。from random import shufflel = [1, 2, 4, 5]shuffle(l)print(l)# [2, 3, 4, 5, 1]参考:https://docs.python.org/3/library/random.html?highlight=random#random.shuffle...
2018-12-02 15:18:53 30611 3
安卓 RE文件浏览器,Root Explorer PRO Apk 4.10.3
2022-11-22
x64dbg-snapshot-2022-10-18-22-09
2022-10-28
ChromeDriver-92.0.4515.107.zip
2021-08-12
ChromeDriver-87.0.4280.88.rar
2020-12-14
带exp的pwn测试文件
2020-09-12
TraceMe.exe year.exe.rar
2020-09-12
flag.rar图片逆向排序
2020-09-09
coconut_tree.zip
2020-08-30
chromedriver_2.46.zip
2020-06-29
chromedriver_84.0.4147.30.zip
2020-06-29
Magisk-v20.4+MagiskManager-v7.5.0+Magisk-uninstaller-20200323.zip
2020-06-18
阿里巴巴新版Java开发手册.rar
2020-04-29
poppler-0.68.0_x86.7z
2019-10-25
quamotion-webdriver.0.123.3.win7-x64.zip
2019-08-15
selenium-server-standalone-3.141.59
2019-01-08
mozilla firfox geckodriver v0.23.0 火狐 webdriver
2018-11-20
ChromeDriver v2.44
2018-11-20
APK反编译工具apktool-dex2jar-luyten-jd-gui
2018-10-17
ChromeDriver 2.39 win32
2018-05-31
强化学习在阿里的技术演进与业务创新
2018-02-06
TensorFlow机器学习实战指南中英双语版-epub和pdf格式
2018-01-31
SVG精髓(第2版) (图灵程序设计丛书) 英文版
2017-10-26
Linear Algebra and Its Applications 5th Edition (David C. Lay)全书9-10章及所有答案
2017-10-25
网络安全思维导图
2017-09-19
《Windows程序设计》第五版 源码
2017-09-11
hanlp-portable-1.3.2.jar
2017-04-18
emmet PythonScript 打包压缩文件
2017-03-20
simplehtmldom
2014-05-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人