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

首先展示一下我们的答案

{'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+1
        print(j)
    except:
        continue
    for list in anwser_list:
        try:
            print(list["user"]["answer"])
        except:
            print(list["user"]["answers"])

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

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

不过这还没啥

重点是:

自动填答案脚本

from time import sleep
import requests

def 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 list

exce_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 = -1

for 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 += 1
    j = 0
    problem_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+=1
        sleep(5)
        response = requests.post(url, headers=headers, json=data)
        print(response.json())





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

 

然后这个可能有点不一样

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

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

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

2024数据库期末综合(第9关:索引)

第9关:索引(注意看下面的温馨提示!!) 任务描述 湖南人口hnpeople数据表结构如图所示,各字段含义如下 cs(城市)、qx(区县)、rk(人口)、man(男)、woman(女)、child(儿童)、adult(成人)、old(老人)…

提升教学效率的全方位解决方案

在现代教育环境中,教学管理的复杂性与日俱增。如何高效管理教学活动、优化教师资源、提升教学质量,是每个教育机构面临的重要挑战。搭贝教务教学管理系统提供了一套全面的解决方案,涵盖了巡检、调课代课、生源登记、监考、外派、作业发布、听…

数据库开发-MySQL

前言 首先来了解一下什么是数据库。 数据库:英文为 DataBase,简称DB,它是存储和管理数据的仓库。 像我们日常访问的电商网站京东,企业内部的管理系统OA、ERP、CRM这类的系统,以及大家每天都会刷的头条、抖音类的app…

【Mac】DMG Canvas for mac(DMG镜像制作工具)软件介绍

软件介绍 DMG Canvas 是一款专门用于创建 macOS 磁盘映像文件(DMG)的软件。它的主要功能是让用户可以轻松地设计、定制和生成 macOS 上的安装器和磁盘映像文件,以下是它的一些主要特点和功能。 主要特点和功能 1. 用户界面设计 DMG Canva…

【深海王国】小学生都能做的APP?AppInventor、BLE蓝牙、Arduino联合开发你的第一个手机远程控制程序(7)

Hi~ (o^^o)♪, 各位深海王国的同志们,早上下午晚上凌晨好呀~ 辛勤工作的你今天也辛苦啦(/≧ω) 今天大都督依旧为大家带来小学生都能学会的APP制作教程,帮你一周内快速开发一款可以和单片机无线通讯的手机蓝牙APP,let’s go! &a…

跨境多账号需知:指纹浏览器需要用独立IP吗?

指纹浏览器也成为反检测浏览器,旨在安全管理多个账户。在跨境多账号中,多个账号容易引发网站怀疑并最终导致大量账户被暂停,使用反检测浏览器的主要目的是通过创建新的浏览器指纹来隐藏用户的真实浏览器指纹。 但浏览器指纹并不是网站关注的唯…

收费4980的AI批量混剪,素材技术方法工具配套,详细拆解!

前几天有朋友跟我讲,他说有做旅游卡的,他们收费4980元,给500张卡,送AI批量混剪技术,问我们有没有? 批量混剪技术,这个其他早在2022年的时候我们就已经使用了。有开通抖音企业号的朋友都知道&am…

AIGC-CVPR2024best paper-Rich Human Feedback for Text-to-Image Generation-论文精读

Rich Human Feedback for Text-to-Image Generation斩获CVPR2024最佳论文!受大模型中的RLHF技术启发,团队用人类反馈来改进Stable Diffusion等文生图模型。这项研究来自UCSD、谷歌等。 在本文中,作者通过标记不可信或与文本不对齐的图像区域&…

106、从中序与后序遍历序列构造二叉树

给定两个整数数组 inorder 和 postorder &#xff0c;其中 inorder 是二叉树的中序遍历&#xff0c; postorder 是同一棵树的后序遍历&#xff0c;请你构造并返回这颗 二叉树 。 提示: 1 < inorder.length < 3000postorder.length inorder.length-3000 < inorder[i]…

数学建模整数规划学习笔记

与线性规划的本质区别在于决策变量是否取整。 &#xff08;1&#xff09;分支定界法 若不考虑整数限制先求出相应松弛问题的最优解&#xff1a; 若松弛问题&#xff08;线性规划&#xff09;无解&#xff0c;则ILP&#xff08;整数规划&#xff09;无解。 若求得的松弛问题最…

Reddit、Discord等社媒网站抓取总结:如何更高效实现网页抓取?

有效的网络抓取需要采取战略方法来克服挑战并确保最佳数据提取。让我们深入研究一些关键实践&#xff0c;这些实践将使您能够掌握复杂的网络抓取。 一、了解 Web 抓取检测 在深入探讨最佳实践之前&#xff0c;让我们先了解一下网站如何识别和抵御网络爬虫。了解您在这一过程中…

基于改进TLS-ESPRIT的旋转机械故障诊断方法(MATLAB)

针对轴承信号微弱的问题&#xff0c;目前有以下几种方式来改善。如常用方法有&#xff1a;窗函数方法、非参数方法以及参数方法等。其中非参数方法包括AR模型、Prony指数模型等&#xff1b;参数方法中最为代表性的是MUSIC(多信号分类)方法&#xff0c;该方法通过对相关矩阵的特…

ECharts Y轴倒置,X轴顶部,图表反向

1.配置&#xff1a; xAxis:{position: ‘top’} //让x轴在顶部 yAxis: { inverse:true} //让Y轴坐标为反向坐标 2.将数据的只转换成负值&#xff08;不建议&#xff09;&#xff0c;显示的时候formatter里面在显示正值&#xff08;不建议&#xff09;

百度文库AI产品“橙篇”:支持10万字长文生成,开启AI创作新篇章

6月19日&#xff0c;百度文库发布了一款创新产品「橙篇」&#xff0c;这一行业首创的产品集成了10万字长文生成及多模态编辑能力&#xff0c;成为首个实现「查阅创编」一站式AI自由创作平台的里程碑。 百度“橙篇”官网&#xff1a; 地址&#xff1a;橙篇AI - 用橙篇&#xf…

编译 CanMV 固件

前言 上一章节中已经搭建好了基于 CanMV 的 C 开发环境&#xff0c;这么一来便可以进行基于 C 语言和 FreeRTOS 的应用开发或者编译基于 MicroPython 语法的应用开发方式所需的 CanMV 固件&#xff0c;本 章就将带领读者体验一下 CanMV 固件的编译流程。 本章分为如下几个小节&…

<Rust><iced><resvg>基于rust使用iced构建GUI实例:使用resvg库实现svg转png

前言 本文是使用rust库resvg来将svg图片转为png图片。 环境配置 系统&#xff1a;windows 平台&#xff1a;visual studio code 语言&#xff1a;rust 库&#xff1a;resvg 代码分析 resvg是一个基于rust的svg渲染库&#xff0c;其官方地址&#xff1a; An SVG rendering li…

VScode创建ROS项目 ROS集成开发环境

ROS使用VScode创建项目步骤 1.创建ROS工作空间2.启动VScode3.VScode编译ROS4.创建ROS功能包C语言开发Python语言开发 本文章介绍了如何在Ubuntu18.04系统下搭建VScode 的ROS项目 搭建项目分为一下几个步骤&#xff1a; 1.创建ROS工作空间 创建一个demo的ROS工作空间&#xff0…

【windows|009】计算机网络基础知识

&#x1f341;博主简介&#xff1a; &#x1f3c5;云计算领域优质创作者 &#x1f3c5;2022年CSDN新星计划python赛道第一名 &#x1f3c5;2022年CSDN原力计划优质作者 ​ &#x1f3c5;阿里云ACE认证高级工程师 ​ &#x1f3c5;阿里云开发者社区专家博主 &#x1f48a;交流社…

百度地图使用任意图片旋转任意角度作为地面贴图

公司项目有个需求是要在地图上贴个航拍的照片做出类似卫星地图的效果,但是只有一张图片而且可以随时替换,也不好做瓦片地图,而且照片的角度可以任意旋转。 要实现这个功能需要解决以下问题: 百度地图怎么贴图片图片角度如何旋转 不卖关子,我先放出实现的效果,为了不涉及侵…

DN-DETR

可以看到&#xff0c;与 DAB-DETR 相比&#xff0c;最大的差别仍然在 decoder 处&#xff0c;主要是 query 的输入。DN-DETR 认为可以把对 offsets 的学习&#xff0c;看作一种对噪声学习的过程&#xff0c;因此&#xff0c;可以直接在 GT 周围生成一些 noised boxes&#xff0…