摘要: 在测试工作中,经常用到adb命令,每次输入都非常麻烦,做了一个小工具将adb命令集合起来,每次可自动填入设备id,减少重复劳动 @echo off :main chcp 65001 title=TOOLKIT set space=a a rem mode con cols=101 lines=30 阅读全文
posted @ 2025-04-03 18:22 fishegg 阅读(17) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python3 import os import sys from datetime import datetime, timedelta import re import xml.etree.ElementTree as ET if len(sys.argv) < 3 阅读全文
posted @ 2025-01-18 22:59 fishegg 阅读(13) 评论(0) 推荐(0)
摘要: #!/bin/sh #$1=english $2=others $3=output if [[ $3 ]]; then date +%F" "%T" start " >> $3 fi timestamp=`date +%s` en_type= others_type=#获得第1个参数最后3个字符为后 阅读全文
posted @ 2025-01-18 22:29 fishegg 阅读(11) 评论(0) 推荐(0)
摘要: #!/bin/sh row_number=0 cat $1|while read row do let row_number+=1 running_output="${row_number}:${row}" printf "\r%-80s" "${running_output:0:80}" #ech 阅读全文
posted @ 2025-01-18 22:16 fishegg 阅读(9) 评论(0) 推荐(0)
摘要: 中括号判断字符串用"=" if [[ ${pkg} = p ]]; then 获取文件名后缀 suffix=${pkg##*.} grep使用正则表达式"-E" adb devices|grep -E "device$|unauthorized|offline"|grep -E -n "device 阅读全文
posted @ 2025-01-17 18:33 fishegg 阅读(10) 评论(0) 推荐(0)
摘要: 通过截图获取多语言文本,与多语言文档对比,确定文本是否正确 ocr.py 截图可以是1.单个文件;2.adb截图;3.目录下所有图片文件 import image_process import tesseract_process import book_process import os optio 阅读全文
posted @ 2023-04-05 02:52 fishegg 阅读(61) 评论(0) 推荐(0)
摘要: 描述 将给出的链表中的节点每k个一组翻转,返回翻转后的链表 如果链表中的节点数不是k的倍数,将最后剩下的节点保持原样 你不能更改节点中的值,只能更改节点本身。 数据范围:0≤n≤2000 ,1≤k≤2000 ,链表中每个元素都满足0≤val≤1000要求空间复杂度O(1),时间复杂度O(n) 例如: 阅读全文
posted @ 2022-06-03 10:51 fishegg 阅读(93) 评论(0) 推荐(0)
摘要: 描述 将一个节点数为size链表m位置到n位置之间的区间反转,要求时间复杂度O(n),空间复杂度O(1)。 例如: 给出的链表为1→2→3→4→5→NULL, m=2,n=4, 返回1→4→3→2→5→NULL. 数据范围: 链表长度0<size≤1000,0<m≤n≤size,链表中每个节点的值满 阅读全文
posted @ 2022-06-03 00:52 fishegg 阅读(194) 评论(0) 推荐(0)
摘要: 关键在于遍历链表时将结点next指针指向前一个结点。 描述 给定一个单链表的头结点pHead(该头节点是有值的,比如在下图,它的val是1),长度为n,反转该链表后,返回新链表的表头。 数据范围:0≤n≤1000 要求:空间复杂度O(1),时间复杂度O(n)。 /* struct ListNode 阅读全文
posted @ 2022-05-30 23:50 fishegg 阅读(34) 评论(0) 推荐(0)
摘要: chcp 65001 切换代码页,避免乱码 title=TOOLKIT 设置标题 mode con cols=101 lines=30 设置列数和行数 %~1 已去除引号的参数 for %%i in ("%suffix%") do set suffix=%%~xi 后缀名 for /f "token 阅读全文
posted @ 2022-04-20 01:52 fishegg 阅读(45) 评论(0) 推荐(0)