针对河南大学数据结构傻逼学堂在线的自动化脚本

首先展示一下我们的答案

{'1': ['对象'], '2': ['关系']}
{'1': ['非数值计算'], '2': ['操作']}
{'1': ['线性表']}
['D']
['B']
['B']
['C']
['C']
{'1': ['操作']}
{'1': ['数据关系', '数据对象上关系的集合']}
{'1': ['性质相同']}
{'1': ['物理结构']}
{'1': ['存储结构', '操作表示']}
['C']
['B']
['D']
['B']
['D']
['true']
['false']
['false']
['false']
['true']
['C']
['B']
['A']
['C']
['D']
['false']
['false']
['false']
['false']
['false']
['C']
['B']
['D']
['A']
['D']
['C']
['B']
['D']
['A']
['A']
{'1': ['栈']}
{'1': ['链栈', '链式栈']}
{'1': ['先进先出']}
{'1': ['队头'], '2': ['队尾']}
['B']
['C']
['C']
['C']
['D']
{'1': ['后进先出']}
{'1': ['具有递归特性的数据结构', '递归的数据结构'], '2': ['可递归求解的问题', '可以递归求解的问题']}
{'1': ['分治法']}
{'1': ['递归部分', '递归步骤']}
['B']
['B']
['C']
['B']
['C']
{'1': ['s, ‘WORKER’, t', 's, ‘WORKER’, t', 's, ‘WORKER’, t', 's, ‘WORKER’, t'], '2': [' ‘GOOD BOY’', 'GOOD BOY']}
{'1': ['模式匹配']}
{'1': ['空串']}
{'1': ['堆式顺序存储结构']}
{'1': ['链式存储']}
['D']
['B']
['A']
['B']
['C']
{'1': ['01122']}
{'1': ['01123']}
{'1': ['数据元素是一个字符', '数据元素是单个字符']}
{'1': ['当前位置']}
{'1': ['7 ']}
['D']
['A']
['B']
['D']
['C']
['B']
['B']
['B']
['D']
['C']
{'1': ['非线性']}
{'1': ['1', '一']}
{'1': ['度']}
{'1': ['最大']}
{'1': ['0', '零']}
{'1': ['1']}
{'1': ['383']}
{'1': ['32']}
{'1': ['9']}
{'1': ['11']}
{'1': ['A'], '2': ['J']}
{'1': ['E'], '2': ['H']}
{'1': ['C']}
['true']
['true']
['false']
['true']
['false']
['A']
['B']
['B']
['C']
['D']
['C']
['C']
['A']
['D']
['B']
{'1': ['空']}
{'1': ['n1-1'], '2': ['n2+n3']}
{'1': ['双亲'], '2': ['孩子兄弟']}
['true']
['false']
['true']
['false']
['true']
{'1': ['叶子']}
{'1': ['6'], '2': ['261']}
{'1': ['2n-1']}
{'1': ['前缀', '最优前缀']}
['A']
['B']
['A']
['B']
['D']
{'1': ['最小']}
{'1': ['贪心算法思想', '贪心算法的思想'], '2': ['动态规划思想', '动态规划的思想']}
{'1': ['Dijkstra'], '2': ['Floyd']}
['D']
['C']
['D']
['C']
['A']
['A']
['C']
['A']
['A']
['B']
{'1': ['静态查找表', '动态查找表'], '2': ['动态查找表', '静态查找表']}
{'1': ['平均查找长度']}
{'1': ['主关键字']}
['C']
['D']
['A']
['A']
['D']
['B']
['C']
['true']
['false']
['C']
['A']
['C']
['true']
['true']
['true']
['true']
['false']
['C']
['D']
['A']
{'1': ['查找']}
{'1': ['内部排序']}
{'1': ['空间效率'], '2': ['稳定性']}
{'1': ['插入排序']}
['false']
['true']
['true']
['false']
['true']
['false']
['true']
['true']
['true']
['false']
['true']
['true']
['false']
['true']
['false']
['true']
['false']
['true']
['false']
['true']
['false']

经过抓包分析

其答案在data.problems[0].user.answer下

而且对于填空题它是answers{}

为此写了一个小的处理

让其可以提取到两类答案

对的这是源码

import requests
j=0
for i in range(3845905,3846006):url = f"https://www.xuetangx.com/api/v1/lms/exercise/get_exercise_list/{i}/9357137/"headers = {"Accept": "application/json, text/plain, */*","Accept-Encoding": "gzip, deflate, br, zstd","Accept-Language": "zh","App-Name": "xtzx","Cache-Control": "no-cache","Content-Type": "application/json","Cookie": "_abfpc=73f3154febe39bed2d1a540a8a94f67551d2d361_2.0; cna=0e5d0ea34bdd926182ad8f3ecbef9aec; mode_type=normal; provider=xuetang; django_language=zh; point={%22point_active%22:true%2C%22platform_task_active%22:true%2C%22learn_task_active%22:true}; 59584271video_seconds=146; 77831809video_seconds=3; login_type=WX; csrftoken=BSJSNDMqRjXmygIMUjRE9kVD1dGetAh5; sessionid=n0ghs2l1c5dct15z0nlzxwztq6qzob92; k=59584271; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2259584271%22%2C%22first_id%22%3A%2219025a34692932-03fb6f51d259324-4c657b58-1638720-19025a346931fb3%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E8%87%AA%E7%84%B6%E6%90%9C%E7%B4%A2%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22https%3A%2F%2Fwww.bing.com%2F%22%7D%2C%22%24device_id%22%3A%2219025a34692932-03fb6f51d259324-4c657b58-1638720-19025a346931fb3%22%7D; JG_016f5b1907c3bc045f8f48de1_PV=1718967129887|1718968519390","Django-Language": "zh","Pragma": "no-cache","Priority": "u=1, i",# "Referer": "https://www.xuetangx.com/learn/henu08091007584/henu08091007584/19322491/exercise/43306490","Sec-Ch-Ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Microsoft Edge\";v=\"126\"","Sec-Ch-Ua-Mobile": "?0","Sec-Ch-Ua-Platform": "\"Windows\"","Sec-Fetch-Dest": "empty","Sec-Fetch-Mode": "cors","Sec-Fetch-Site": "same-origin","Terminal-Type": "web","User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0","X-Client": "web","X-Csrftoken": "BSJSNDMqRjXmygIMUjRE9kVD1dGetAh5","Xtbz": "xt"}response = requests.get(url, headers=headers)data = response.json()try:anwser_list = data["data"]["problems"]j=j+1print(j)except:continuefor list in anwser_list:try:print(list["user"]["answer"])except:print(list["user"]["answers"])

不过需要注意的是,你要F12自己抓包一下

将Cookie和X-Csrftoken搞到,然后沾到对应的请求头上

不过这还没啥

重点是:

自动填答案脚本

from time import sleep
import requestsdef promble_get(exce_idd):url = f"https://www.xuetangx.com/api/v1/lms/exercise/get_exercise_list/{exce_idd}/9357137/"headers = {"Accept": "application/json, text/plain, */*","Accept-Encoding": "gzip, deflate, br, zstd","Accept-Language": "zh","App-Name": "xtzx","Cache-Control": "no-cache","Content-Type": "application/json",#替换成自己的"Cookie": "_abfpc=73f3154febe39bed2d1a540a8a94f67551d2d361_2.0; cna=0e5d0ea34bdd926182ad8f3ecbef9aec; mode_type=normal; provider=xuetang; django_language=zh; point={%22point_active%22:true%2C%22platform_task_active%22:true%2C%22learn_task_active%22:true}; 77831809video_seconds=3; 59584271video_seconds=151; undefinedvideo_seconds=151; login_type=P; csrftoken=dadHEX0qMOTyNfvQbDNd2zm3Fu1VoVtG; sessionid=9ml5t7q958j7rnd03owedypb5ek7oqb5; k=77831809; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2277831809%22%2C%22first_id%22%3A%2219025a34692932-03fb6f51d259324-4c657b58-1638720-19025a346931fb3%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E8%87%AA%E7%84%B6%E6%90%9C%E7%B4%A2%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22https%3A%2F%2Fwww.bing.com%2F%22%7D%2C%22%24device_id%22%3A%2219025a34692932-03fb6f51d259324-4c657b58-1638720-19025a346931fb3%22%7D; JG_016f5b1907c3bc045f8f48de1_PV=1718967129887|1718970073104","Django-Language": "zh","Pragma": "no-cache","Priority": "u=1, i","Referer": "https://www.xuetangx.com/learn/henu08091007584/henu08091007584/19322491/exercise/43306308","Sec-Ch-Ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Microsoft Edge\";v=\"126\"","Sec-Ch-Ua-Mobile": "?0","Sec-Ch-Ua-Platform": "\"Windows\"","Sec-Fetch-Dest": "empty","Sec-Fetch-Mode": "cors","Sec-Fetch-Site": "same-origin","Terminal-Type": "web","User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0","X-Client": "web",#替换成自己的"X-Csrftoken": "dadHEX0qMOTyNfvQbDNd2zm3Fu1VoVtG","Xtbz": "xt"}response = requests.get(url, headers=headers)datad = response.json()anwerlist = datad["data"]["problems"]list = []for ll in anwerlist:list.append(ll["problem_id"])return listexce_id = [3845905, 3845907, 3845910, 3845913, 3845915, 3845917, 3845920, 3845923, 3845925,3845929, 3845931, 3845933, 3845936, 3845939, 3845942, 3845945, 3845948, 3845954,3845957, 3845960, 3845962, 3845964, 3845967, 3845970, 3845971, 3845973, 3845976,3845979, 3845982, 3845984, 3845987, 3845988, 3845990, 3845991,3845992, 3845993,3845995, 3845997,3845998, 3845999, 3846000, 3846002, 3846004, 3846005]leaf_id = [43306297,43306301,43306308,43306312,43306316,43306323,43306328,43306335,43306340,43306346,43306350,43306358,43306363,43306368,43306374,43306380,43306386,43306398,43306404,43306410,43306415,43306421,43306428,43306433,43306438,43306444,43306449,43306456,43306463,43306468,43306472,43306475,43306478,43306480,43306482,43306486,43306490,43306493,43306496,43306499,43306503,43306505,43306509,43306512
]
data = [[1,{1: "对象", 2: "关系"},{1: "非数值计算", 2: "操作"},{1: "线性表"}],[2,["D"],["B"],["B"],["C"],["C"]],[3,{1: "操作"},{1: "数据关系,数据对象上关系的集合"},{1: "性质相同"},{1: "物理结构"},{1: "存储结构, 操作表示"}],[4,['C'],['B'],['D'],['B'],['D']],[5,['true'],['false'],['false'],['false'],['true']],[6,['C'],['B'],['A'],['C'],['D']],[7,['false'],['false'],['false'],['false'],['false']],[8,['C'],['B'],['D'],['A'],['D']],[9,['C'],['B'],['D'],['A'],['A']],[10,{1: "栈"},{1: "链栈, 链式栈"},{1: "先进先出"},{1: "队头", '2': "队尾"}],[11,['B'],['C'],['C'],['C'],['D']],[12,{1: "后进先出"},{1: "具有递归特性的数据结构, 递归的数据结构", 2: "可递归求解的问题, 可以递归求解的问题"},{1: "分治法"},{1: "递归部分, 递归步骤"}],[13,['B'],['B'],['C'],['B'],['C']],[14,{1: "s, ‘WORKER’, t, s, ‘WORKER’, t, s, ‘WORKER’, t, s, ‘WORKER’, t", '2': " ‘GOOD BOY’, GOOD BOY"},{1: "模式匹配"},{1: "空串"},{1: "堆式顺序存储结构"},{1: "链式存储"}],[15,['D'],['B'],['A'],['B'],['C']],[16,{1: "01122"},{1: "01123"},{1: "数据元素是一个字符, 数据元素是单个字符"},{1: "当前位置"},{1: 7 }],[17,['D'],['A'],['B'],['D'],['C']],[18,['B'],['B'],['B'],['D'],['C']],[19,{1: "非线性"},{1: "1, 一"},{1: "度"},{1: "最大"},{1: "0, 零"}],[20,{1: "1"},{1: "383"},{1: "32"},{1: "9"},{1: "11"}],[21,{1: "A", 2: "J"},{1: "E", 2: "H"},{1: "C"}],[22,['true'],['true'],['false'],['true'],['false']],[23,['A'],['B'],['B'],['C'],['D']],[24,['C'],['C'],['A'],['D'],['B']],[25,{1: "空"},{1: "n1-1", 2: "n2+n3"},{1: "双亲", 2: "孩子兄弟"}],[26,['true'],['false'],['true'],['false'],['true']],[27,{1: "叶子"},{1: "6", 2: "261"},{1: "2n-1"},{1: "前缀, 最优前缀"}],[28,['A'],['B'],['A'],['B'],['D']],[29,{1: "最小"},{1: "贪心算法思想, 贪心算法的思想", 2: "动态规划思想, 动态规划的思想"},{1: "Dijkstra", 2: "Floyd"}],[30,['D'],['C'],['D'],['C'],['A']],[31,['A'],['C'],['A'],['A'],['B']],[32,{1: "静态查找表, 动态查找表", 2: "动态查找表, 静态查找表"},{1: "平均查找长度"},{1: "主关键字"}],[33,['C'],['D'],['A']],[34,['A'],['D'],['B']],[35,['C'],['true'],['false']],[36,['C'],['A'],['C'],['true'],['true']],[37,['true'],['true'],['false']],[38,['C'],['D'],['A']],[39,{1: "查找"},{1: "内部排序"},{1: "空间效率", 2: "稳定性"},{1: "插入排序"}],[40,['false'],['true'],['true'],['false'],['true']],[41,['false'],['true'],['true'],['true']],[42,['false'],['true'],['true'],['false']],[43,['true'],['false'],['true']],[44,['false'],['true'],['false'],['true'],['false']]
]
i = -1for item in data:# print(item)url = "https://www.xuetangx.com/api/v1/lms/exercise/problem_apply/"# 设置HTTP头信息headers = {"Accept": "application/json, text/plain, */*","Accept-Encoding": "gzip, deflate, br, zstd","Accept-Language": "zh","App-Name": "xtzx","Cache-Control": "no-cache","Content-Type": "application/json",# 必要的"Cookie": "_abfpc=73f3154febe39bed2d1a540a8a94f67551d2d361_2.0; cna=0e5d0ea34bdd926182ad8f3ecbef9aec; mode_type=normal; provider=xuetang; django_language=zh; point={%22point_active%22:true%2C%22platform_task_active%22:true%2C%22learn_task_active%22:true}; 77831809video_seconds=3; 59584271video_seconds=151; undefinedvideo_seconds=151; login_type=P; csrftoken=dadHEX0qMOTyNfvQbDNd2zm3Fu1VoVtG; sessionid=9ml5t7q958j7rnd03owedypb5ek7oqb5; k=77831809; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2277831809%22%2C%22first_id%22%3A%2219025a34692932-03fb6f51d259324-4c657b58-1638720-19025a346931fb3%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E8%87%AA%E7%84%B6%E6%90%9C%E7%B4%A2%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22https%3A%2F%2Fwww.bing.com%2F%22%7D%2C%22%24device_id%22%3A%2219025a34692932-03fb6f51d259324-4c657b58-1638720-19025a346931fb3%22%7D; JG_016f5b1907c3bc045f8f48de1_PV=1718967129887|1718970073104","Django-Language": "zh","Origin": "https://www.xuetangx.com","Pragma": "no-cache","Referer": "https://www.xuetangx.com/learn/henu08091007584/henu08091007584/19322491/exercise/43306496","Sec-Ch-Ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Microsoft Edge\";v=\"126\"","Sec-Ch-Ua-Mobile": "?0","Sec-Ch-Ua-Platform": "\"Windows\"","Sec-Fetch-Dest": "empty","Sec-Fetch-Mode": "cors","Sec-Fetch-Site": "same-origin","Terminal-Type": "web","User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0","X-Client": "web",# 必要的"X-Csrftoken": "dadHEX0qMOTyNfvQbDNd2zm3Fu1VoVtG","Xtbz": "xt"}i += 1j = 0problem_id_list = promble_get(exce_id[i])for item_true in item[1:]:print(item_true)print(problem_id_list[j])data = {"leaf_id": leaf_id[i],"classroom_id": 19322491,"exercise_id": exce_id[i],"problem_id": problem_id_list[j],"sign": "henu08091007584","answers": str(item_true),"answer": str(item_true),}j+=1sleep(5)response = requests.post(url, headers=headers, json=data)print(response.json())

同理也是那两个换成自己的

 

然后这个可能有点不一样

很简单自己交个题打开网络抓包,对应的改改进行了

已经经过博主测试,代码可行,可以自动填答案哈哈
解放你的双手吧老弟

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/31767.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Polyp-DDPM: Diffusion-Based Semantic Polyp Synthesis for Enhanced Segmentation

Polyp- ddpm:基于扩散的语义Polyp合成增强分割 摘要: 本研究介绍了一种基于扩散的方法Polyp-DDPM,该方法用于生成假面条件下息肉的逼真图像,旨在增强胃肠道息肉的分割。我们的方法解决了与医学图像相关的数据限制、高注释成本和隐私问题的挑…

pywinauto入门指南:轻松掌握Windows GUI自动化

pywinauto库概述: pywinauto是一个Python库,主要用于自动化Windows应用程序的GUI测试和操作.它提供了一组简单而强大的API,可以模拟用户与Windows应用程序的交互,包括点击按钮、输入文本、选择菜单等操作. 安装 ##pywinauto可以通过pip进行安装,打开命令行运行: pip install…

交叉注意力一脚踹进医学图像分割!新成果精度、效率表现SOTA

为解决传统方法的局限性,研究者们提出了将交叉注意力机制应用于医学图像分割。 交叉注意力机制能更有效地整合来自不同模态/尺度的特征,让模型同时捕捉全局和局部信息,加速学习并减少干扰。这样不仅可以提高分割的精度,还可以减少…

深度解析SD-WAN在企业组网中的应用场景

在现代企业快速发展的网络环境中,SD-WAN技术不仅是实现企业各站点间高效连接的关键,也是满足不同站点对互联网、SaaS云应用和公有云等多种业务需求的理想选择。本文将从企业的WAN业务需求出发,对SD-WAN的组网场景进行全面解析,涵盖…

日元预计明年开始上涨

被称为“日元先生”的前大藏省(现财务省)财务官榊原英资预测,美元兑日元汇率将在今年底或2025年初逐步升至130。他认为,通缩时代已经过去,通货膨胀即将来临。 《日本经济新闻》6月5日报道,日本财务省于5月3…

oracle12c到19c adg搭建(五)dg搭建后进行切换19c进行数据字典升级

一、备库切主库升级 12c切换为19c主库的时候是由低版本到高版本所以cdb和pdb的数据字典需要进行升级才可以让数据与软件版本兼容。 1.1切换 SQL> alter database recover managed standby database finish; Database altered. SQL> alter database commit to switcho…

阿里云使用域名访问部署网站【2024 详细版】

目录 一、注册域名 1.创建信息模板 2.查询注册域名 二、域名设置 1.SSL证书 2.域名解析 3.宝塔设置 一、注册域名 1.创建信息模板 点击右上角【三】-【域名】-【信息模板】-【创建信息模板】- 填写信息 模板分为个人和企业两种,根据情况进行创建即可&…

C++ GPU编程(英伟达CUDA)

安装编译环境 https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.85_windows.exe CMakeLists.txt cmake_minimum_required(VERSION 3.10)set(CMAKE_CXX_STANDARD 17) set(CMAKE_BUILD_TYPE Release) #set(CMAKE_CUDA_ARCHITECTUR…

微服务中不同服务使用openfeign 相互调用

首先 我们上文 已经知道了 nacos 的注册服务,现在 我们 在不同服务中相互调用就可以使用openfeign 直接调用,而不是 再写冗余的调用代码啦 首先 我们的微服务组件如下 因为我这个微服务是我在 员工登录demo 中 拆出来的,在userlogin模块中…

【计算机毕业设计】​206校园顺路代送微信小程序

🙊作者简介:拥有多年开发工作经验,分享技术代码帮助学生学习,独立完成自己的项目或者毕业设计。 代码可以私聊博主获取。🌹赠送计算机毕业设计600个选题excel文件,帮助大学选题。赠送开题报告模板&#xff…

qmt量化交易策略小白学习笔记第43期【qmt编程之期货数据--如何获取历史主力合约--原生python】

qmt编程之获取期货数据 qmt更加详细的教程方法,会持续慢慢梳理。 也可找寻博主的历史文章,搜索关键词查看解决方案 ! 感谢关注,咨询免费开通量化回测与获取实盘权限,欢迎和博主联系! 获取历史主力合约 …

Hi3861 OpenHarmony嵌入式应用入门--LiteOS Timer

iteOS Timer(定时器)是LiteOS操作系统中的一个重要组件,它提供了一种基于软件模拟的定时器功能,用于满足在硬件定时器数量不足时的定时需求。 软件定时器:基于系统Tick时钟中断,由软件来模拟的定时器。当经…

【计算机网络体系结构】计算机网络体系结构实验-FTP实验

1. 2. 3. wireshark 第一行:帧Frame 545:要发送的数据块,所抓帧的序号为545,捕获字节数等于传送字节数:451字节第二行:源Mac地址为a4:bb:6d:6e:28:9a;目标Mac地址为24:00:fa:e4:df:d8第三行&…

深度学习Day-21:ResNet与DenseNet结合

🍨 本文为:[🔗365天深度学习训练营] 中的学习记录博客 🍖 原作者:[K同学啊 | 接辅导、项目定制] 要求: 探索ResNet与DenseNet结合的可能性根据模型特性构建新的模型框架验证改进后模型的效果 一、 基础配…

【linux】dup文件描述符复制函数和管道详解

目录 一、文件描述符复制 1、dup函数(复制文件描述符) ​编辑 2、dup2函数(复制文件描述符) ​编辑 二、无名管道pipe 1、概述 2、无名管道的创建 3、无名管道读写的特点 4、无名管道ps -A | grep bash实现 三、有名管道FI…

Java8使用Stream流实现List列表查询、统计、排序、分组、合并

Java8使用Stream流实现List列表查询、统计、排序以及分组 目录 一、查询方法1.1 forEach1.2 filter(T -> boolean)1.3 filterAny() 和 filterFirst()1.4 map(T -> R) 和 flatMap(T -> Stream)1.5 distinct()1.6 limit(long n) 和 skip(long n) 二、判断方法2.1 anyMa…

容器之按钮盒构件演示

代码; #include <gtk-2.0/gtk/gtk.h> #include <glib-2.0/glib.h> #include <gtk-2.0/gdk/gdkkeysyms.h> #include <stdio.h>int main(int argc, char *argv[]) {gtk_init(&argc, &argv);GtkWidget *window;window gtk_window_new(GTK_WINDO…

xargs 传参

xargs的默认命令是 echo&#xff0c;空格是默认定界符。这意味着通过管道传递给 xargs的输入将会包含换行和空白&#xff0c;不过通过 xargs 的处理&#xff0c;换行和空白将被空格取代。xargs是构建单行命令的重要组件之一。 xargs -n1 // 一次输出一个参数到一行&#xf…

Python学习笔记16:进阶篇(五)异常处理

异常 在编程中&#xff0c;异常是指程序运行过程中发生的意外事件&#xff0c;这些事件通常中断了正常的指令流程。它们可能是由于错误的输入数据、资源不足、非法操作或其他未预料到的情况引起的。Python中&#xff0c;当遇到这类情况时&#xff0c;会抛出一个异常对象&#…

最详细的Selenium+Pytest自动化测试框架实战

前言 selenium自动化 pytest测试框架 本章你需要 一定的python基础——至少明白类与对象&#xff0c;封装继承 一定的selenium基础——本篇不讲selenium&#xff0c; 测试框架简介 测试框架有什么优点呢&#xff1a; 代码复用率高&#xff0c;如果不使用框架的话&#xff…