天龙怀旧游戏python脚本

设置图:

游戏窗口最大化。

海贼洞这里定位你要回点的定位。

运行bat就行,脚本出错了还是会重新运行脚本,运行自动启动,end暂停脚本,home重新启动脚本

1.  我常用的是内挂回点脚本,

下面都是前台脚本,如果颜色点位没有区别,那么恭喜直接可以用,如果不能正常运作,那么颜色点位不一样,思路给你了,抓点抓色对应修改动手一下吧。

新建批处理 ng.bat

@echo off  
set "script_path=E:\soft\game\sleep\NG.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  echo Checking python.py...  powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  if %errorlevel% neq 0 (  echo python.py failed. Waiting %max_wait% seconds before retrying...  timeout /t %max_wait% >nul  ) else (  echo python.py executed successfully.  )  
goto :loop

新建python脚本 ng.py

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  running = True  
listener = None  def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  pyautogui.moveTo(x,y,duration=duration)  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseDown(x,y,button='left')  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseUp(x,y,button='left')  def on_press(key):  global running  if key == Key.home:  print("继续运行脚本")  running = True  elif key == Key.end:  print("暂停运行脚本")  running = False  def start_listener():  global listener  with Listener(on_press=on_press) as listener:  listener.join()  listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  
delay = random.uniform(2.3,2.5)
time.sleep(delay)  while True:  if running:  color1 = pyautogui.pixel(2544,144)  #内挂if color1 == (255,243,49):  perform_click(2544,144,duration=0.5,delay_range=(0.3,0.5))  delay = random.uniform(0.5,1.0)time.sleep(delay)pyautogui.moveTo(1600,169, duration=0.2)color4 = pyautogui.pixel(1294,322)          #断线点1color5 = pyautogui.pixel(1177,335)          #断线点2if color4 == (255,242,99)  and color5 == (255,242,99)  :  delay = random.uniform(15.0,20.0)time.sleep(delay)perform_click(1344,356,duration=0.2,delay_range=(0.3,0.5))  delay = random.uniform(5.0,6.0)time.sleep(delay)color2 = pyautogui.pixel(1205,397)          #死亡判断点1color3 = pyautogui.pixel(1150,397)          #死亡判断点2if color2 == (37,37,37)  and      color3 == (37,37,37) :delay = random.uniform(200,210)time.sleep(delay)perform_click(1357,397,duration=0.2,delay_range=(0.3,0.5))  delay = random.uniform(5.0,6.0)time.sleep(delay)# 上面是人物死亡出鞘pyautogui.press('tab')delay = random.uniform(0.5,1.0)time.sleep(delay)perform_click(2448,326,duration=0.2,delay_range=(0.3,0.5))  pyautogui.mouseDown(2448,326,button='left')pyautogui.mouseUp(2448,326 ,button='left')    delay = random.uniform(0.04,0.05)time.sleep(delay)pyautogui.mouseDown(2448,326,button='left')pyautogui.mouseUp(2448,326,button='left')      delay = random.uniform(3,4)time.sleep(delay)pyautogui.press('tab')delay = random.uniform(0.5,1.0)time.sleep(delay)perform_click(73,351,duration=0.2,delay_range=(0.3,0.5))  delay = random.uniform(5,6)time.sleep(delay)#上面是走出地府delay = random.uniform(2.0,2.2)time.sleep(delay)perform_click(1299,1313,duration=0.2,delay_range=(0.3,0.5))              delay = random.uniform(0.5,1.0)time.sleep(delay)perform_click(1361,866,duration=0.2,delay_range=(0.3,0.5))     delay = random.uniform(0.5,1.0)time.sleep(delay)perform_click(1419,936,duration=0.2,delay_range=(0.3,0.5))             delay = random.uniform(0.5,1.0)time.sleep(delay)perform_click(1296,825,duration=0.2,delay_range=(0.3,0.5))       delay = random.uniform(8,9)time.sleep(delay)#上面是大理使用地彻符起飞color7799 = pyautogui.pixel(575,208)          #珍兽未关闭if color7799 == (248,196,88) :  delay = random.uniform(0.5,0.8)time.sleep(delay)perform_click(968,1383,duration=0.2,delay_range=(0.3,0.5))    delay = random.uniform(0.5,0.8)time.sleep(delay)color7788 = pyautogui.pixel(93,112)          #珍兽未出站if color7788 != (231,211,123) :  delay = random.uniform(0.3,0.5)time.sleep(delay)perform_click(968,1383,duration=0.2,delay_range=(0.3,0.5))    delay = random.uniform(0.5,0.8)time.sleep(delay)color77991 = pyautogui.pixel(575,208)          #珍兽未关闭if color77991 == (248,196,88) :  perform_click(191,505,duration=0.2,delay_range=(0.3,0.5))    delay = random.uniform(0.5,0.8)time.sleep(delay)perform_click(194,542,duration=0.2,delay_range=(0.3,0.5))    delay = random.uniform(3.5,4.0)time.sleep(delay)perform_click(968,1383,duration=0.2,delay_range=(0.3,0.5))    delay = random.uniform(0.5,0.8)time.sleep(delay)time.sleep(0.5)  # # 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

2.  打马活动脚本

新建批处理 dm.bat

@echo off  
set "script_path=E:\soft\game\sleep\DM.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  echo Checking python.py...  powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  if %errorlevel% neq 0 (  echo python.py failed. Waiting %max_wait% seconds before retrying...  timeout /t %max_wait% >nul  ) else (  echo python.py executed successfully.  )  
goto :loop

新建python脚本 dm.py

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  running = True  
listener = None  def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  pyautogui.moveTo(x,y,duration=duration)  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseDown(x,y,button='left')  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseUp(x,y,button='left')  def on_press(key):  global running  if key == Key.home:  print("继续运行脚本")  running = True  elif key == Key.end:  print("暂停运行脚本")  running = False  def start_listener():  global listener  with Listener(on_press=on_press) as listener:  listener.join()  listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  while True:  if running:  colordanshua1 = pyautogui.pixel(278,52)  #有血colordanshua2 = pyautogui.pixel(453,58)  #是马贼colordanshua3 = pyautogui.pixel(279,35)  #白怪colordanshua33 = pyautogui.pixel(279,35)  #红怪if colordanshua1 == (255,162,150)    and colordanshua3  != (155,153,152)      and  colordanshua2 == (205,195,196)     or  colordanshua33  == (155,1,1)     :pyautogui.press('F2')  delay = random.uniform(0.11,0.12)time.sleep(delay)  else:  pyautogui.press('F1')        delay = random.uniform(0.11,0.12)time.sleep(delay)    colordanshua1  = pyautogui.pixel(278,52)  #没血if colordanshua1 != (255,162,150)      :pyautogui.press('F1')  delay = random.uniform(0.11,0.12)time.sleep(delay)          colordanshua1  = pyautogui.pixel(278,64)  #怒气if colordanshua1 == (255,255,213)      :pyautogui.press('F1')  delay = random.uniform(0.11,0.12)time.sleep(delay)          colordanshuamb1 = pyautogui.pixel(1206,136)  #目标1colordanshuamb2 = pyautogui.pixel(1360,216)  #目标5if colordanshuamb1 == (1,1,1)  and  colordanshuamb2 ==  (1,1,1)    :pyautogui.press('F1')  delay = random.uniform(0.11,0.12)time.sleep(delay)    colordanshua3 = pyautogui.pixel(279,35)  #红怪colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血colordanshua23 = pyautogui.pixel(1224,1344)  #F4技能好了if    colordanshua3  == (155,1,1)    and  colordanshua21 == (255,162,150)  and    colordanshua23 != (33,28,19)   :delay = random.uniform(0.20,0.22)time.sleep(delay)  pyautogui.press('F5')  delay = random.uniform(0.20,0.22)time.sleep(delay)  pyautogui.press('F4')  delay = random.uniform(0.20,0.22)time.sleep(delay)  pyautogui.press('F6')  delay = random.uniform(0.20,0.22)time.sleep(delay)  colordanshua33 = pyautogui.pixel(279,35)  #红怪colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血colordanshua22 = pyautogui.pixel(1188,1344)  #F3技能好了if    colordanshua33  == (155,1,1)   and  colordanshua21 == (255,162,150)  and  colordanshua22 != (33,28,19)    :delay = random.uniform(0.2,0.3)time.sleep(delay)  pyautogui.press('F5')  delay = random.uniform(0.20,0.22)time.sleep(delay)  pyautogui.press('F3')  delay = random.uniform(0.20,0.22)time.sleep(delay)  colorlan2 = pyautogui.pixel(104,63)   #  没蓝if colorlan2 != (193,188,255) :delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F7')  #  吃蓝delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorjiaxue13 = pyautogui.pixel(166,57)   #  没血if colorjiaxue13  !=(255,162,150)  :delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F10')  # 吃血delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorccc1 = pyautogui.pixel(93,112)   # 宝宝在colorccc2 = pyautogui.pixel(180,100)   # 珍兽50%血        if colorccc1 == (231,211,123)  and  colorccc2  != (255,162,150) :   # 宝宝加血delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F8')  # delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorccc11 = pyautogui.pixel(93,112)   # 宝宝在colorccc21 = pyautogui.pixel(150,100)   # 珍兽30%血        if colorccc11 == (231,211,123)  and  colorccc21  != (255,162,150) :   # 宝宝加血delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F9')  # delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorcccdz1 = pyautogui.pixel(3,175)   # 队友1在colorcccdz2 = pyautogui.pixel(58,69)   # 我是队长if   colorcccdz1  == (0,0,0)  and  colorcccdz2  == (219,31,10) :   # 给队长delay =  random.uniform(3.21,3.22)time.sleep(delay)    pyautogui.moveTo(20,170, duration=0.2)delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(20,170, button='left')pyautogui.mouseUp(20,170, button='left')delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(20,170, button='right')pyautogui.mouseUp(20,170, button='right')delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.moveTo(47,243, duration=0.2)delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(47,243, button='left')pyautogui.mouseUp(47,243, button='left')delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorcccdz3 = pyautogui.pixel(1581,1382)   # 闪烁if   colorcccdz3  == (49,41,32)  :   # 加队delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.moveTo(1581,1382, duration=0.2)delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(1581,1382, button='left')pyautogui.mouseUp(1581,1382, button='left')delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.moveTo(1563,836, duration=0.2)delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(1563,836, button='left')pyautogui.mouseUp(1563,836, button='left')delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorcccdz11 = pyautogui.pixel(3,175)   # 队友1不在colorcccdz21 = pyautogui.pixel(58,69)   # 我是队长if   colorcccdz11  != (0,0,0)  and  colorcccdz21  == (219,31,10) :   # 解散队delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.moveTo(37,62, duration=0.2)delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(37,62, button='left')pyautogui.mouseUp(37,62, button='left')delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(37,62, button='right')pyautogui.mouseUp(37,62, button='right')delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.moveTo(62,71, duration=0.2)delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(62,71, button='left')pyautogui.mouseUp(62,71, button='left')delay =  random.uniform(0.21,0.22)time.sleep(delay)    time.sleep(0.02)  # # 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

3.  副本打怪脚本

新建批处理 dg.bat

@echo off  
set "script_path=E:\soft\game\sleep\DG.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  echo Checking python.py...  powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  if %errorlevel% neq 0 (  echo python.py failed. Waiting %max_wait% seconds before retrying...  timeout /t %max_wait% >nul  ) else (  echo python.py executed successfully.  )  
goto :loop

新建python脚本 dg.py

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  running = True  
listener = None  def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  pyautogui.moveTo(x,y,duration=duration)  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseDown(x,y,button='left')  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseUp(x,y,button='left')  def on_press(key):  global running  if key == Key.home:  print("继续运行脚本")  running = True  elif key == Key.end:  print("暂停运行脚本")  running = False  def start_listener():  global listener  with Listener(on_press=on_press) as listener:  listener.join()  listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  while True:  if running:  colordanshua1 = pyautogui.pixel(278,52)  #有血if colordanshua1 == (255,162,150)  :pyautogui.press('F2')  delay = random.uniform(0.11,0.12)time.sleep(delay)  else:  pyautogui.press('F1')  delay = random.uniform(0.11,0.12)time.sleep(delay)    colordanshuamb1 = pyautogui.pixel(1206,136)  #目标1colordanshuamb2 = pyautogui.pixel(1360,216)  #目标5if colordanshuamb1 == (1,1,1)  and  colordanshuamb2 ==  (1,1,1)    :pyautogui.press('F1')  delay = random.uniform(0.11,0.12)time.sleep(delay)    colordanshua3 = pyautogui.pixel(279,35)  #红怪colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血colordanshua23 = pyautogui.pixel(1224,1344)  #F4技能好了if    colordanshua3  == (155,1,1)    and  colordanshua21 == (255,162,150)  and    colordanshua23 != (33,28,19)   :delay = random.uniform(0.2,0.3)time.sleep(delay)  pyautogui.press('F5')  delay = random.uniform(0.2,0.3)time.sleep(delay)  pyautogui.press('F4')  delay = random.uniform(0.2,0.3)time.sleep(delay)  pyautogui.press('F6')  delay = random.uniform(0.2,0.3)time.sleep(delay)  colordanshua211 = pyautogui.pixel(278,52)  #有血if colordanshua211 == (255,162,150)  :pyautogui.press('F2')  delay = random.uniform(0.11,0.12)time.sleep(delay)  else:  pyautogui.press('F1')  delay = random.uniform(0.11,0.12)time.sleep(delay)    colordanshua33 = pyautogui.pixel(279,35)  #红怪colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血colordanshua22 = pyautogui.pixel(1188,1344)  #F3技能好了if    colordanshua33  == (155,1,1)   and  colordanshua21 == (255,162,150)  and  colordanshua22 != (33,28,19)    :delay = random.uniform(0.2,0.3)time.sleep(delay)  pyautogui.press('F5')  delay = random.uniform(0.2,0.3)time.sleep(delay)  pyautogui.press('F3')  delay = random.uniform(0.2,0.3)time.sleep(delay)  colorjiaxue1 = pyautogui.pixel(93,112)   # 宝宝在colorjiaxue2 = pyautogui.pixel(166,57)   #  没血colorjiaxue5 = pyautogui.pixel(1477,1298)   #  共生colorjiaxue6 = pyautogui.pixel(199,100)   # 宝宝满血if colorjiaxue1 == (231,211,123)    and colorjiaxue2 != (255,162,150)     and      colorjiaxue5  != (49,41,29)  and      colorjiaxue6  == (255,162,150) :delay =  random.uniform(0.21,0.22)time.sleep(delay)    perform_click(1477,1315,duration=0.2,delay_range=(0.3,0.5))  delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorlan2 = pyautogui.pixel(104,63)   #  没蓝if colorlan2 != (193,188,255) :delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F7')  #  吃蓝delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorjiaxue14 = pyautogui.pixel(93,112)   # 宝宝不在colorjiaxue13 = pyautogui.pixel(166,57)   #  没血if colorjiaxue13  !=(255,162,150)  and  colorjiaxue14  != (231,211,123):delay = random.uniform(0.2,0.3)time.sleep(delay)    pyautogui.press('F10')  # 吃血delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorccc1 = pyautogui.pixel(93,112)   # 宝宝在colorccc2 = pyautogui.pixel(180,100)   # 珍兽30%血        if colorccc1 == (231,211,123)  and  colorccc2  != (255,162,150) :   # 宝宝加血delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F8')  # delay =  random.uniform(0.21,0.22)time.sleep(delay)    colorccc11 = pyautogui.pixel(93,112)   # 宝宝在colorccc21 = pyautogui.pixel(150,100)   # 珍兽30%血        if colorccc11 == (231,211,123)  and  colorccc21  != (255,162,150) :   # 宝宝加血delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.press('F9')  # delay =  random.uniform(0.21,0.22)time.sleep(delay)    time.sleep(0.02)  # # 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

4.  摆摊(路中央)

bat

@echo off  
set "script_path=E:\soft\game\sleep\baitan.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  echo Checking python.py...  powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  if %errorlevel% neq 0 (  echo python.py failed. Waiting %max_wait% seconds before retrying...  timeout /t %max_wait% >nul  ) else (  echo python.py executed successfully.  )  
goto :loop

python

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  running = True  
listener = None  def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  pyautogui.moveTo(x,y,duration=duration)  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseDown(x,y,button='left')  delay = random.uniform(*delay_range)  time.sleep(delay)  pyautogui.mouseUp(x,y,button='left')  def on_press(key):  global running  if key == Key.home:  print("继续运行脚本")  running = True  elif key == Key.end:  print("暂停运行脚本")  running = False  def start_listener():  global listener  with Listener(on_press=on_press) as listener:  listener.join()  listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  while True:  if running:  delay =  random.uniform(2.1,2.2)time.sleep(delay)    pyautogui.moveTo(2249,1094, duration=0.2)  移动到背包摆摊delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(2249,1094, button='left')   点击背包摆摊pyautogui.mouseUp(2249,1094, button='left')  点击背包摆摊delay =  random.uniform(0.21,0.22)time.sleep(delay)    colordanshua1 = pyautogui.pixel(1395,615)  if colordanshua1 == (245,191,80)  :  #摆摊中间界面打开右上角黄色,说明此处可以摆摊pyautogui.moveTo(1118,1279, duration=0.2)  #  移动到轻功delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(1118,1279, button='left') # 点击轻功pyautogui.mouseUp(1118,1279, button='left')  # 点击轻功delay =  random.uniform(0.21,0.22)time.sleep(delay)    delay = random.uniform(0.06,0.08)time.sleep(delay)  pyautogui.moveTo(897,640, duration=0.1) #  移动路中间摆摊delay =  random.uniform(0.21,0.22)time.sleep(delay)    pyautogui.mouseDown(897,640, button='left') #点击路中间摆摊pyautogui.mouseUp(897,640, button='left')delay =  random.uniform(0.02,0.03)time.sleep(delay)    pyautogui.moveTo(1340,803, duration=0.1)  #移动到确认摆摊delay =  random.uniform(0.02,0.03)time.sleep(delay)    pyautogui.mouseDown(1340,803, button='left') 点击确认摆摊pyautogui.mouseUp(1340,803, button='left')delay =  random.uniform(3.1,3.2)time.sleep(delay)    colordanshua2 = pyautogui.pixel(1395,615)  #摆摊if colordanshua2 != (245,191,80)  :delay =  random.uniform(3.1,3.2)time.sleep(delay)    time.sleep(0.02)  # # 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

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

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

相关文章

数据结构与算法学习笔记六-二叉树的顺序存储表示法和实现(C语言)

目录 前言 1.数组和结构体相关的一些知识 1.数组 2.结构体数组 3.递归遍历数组 2.二叉树的顺序存储表示法和实现 1.定义 2.初始化 3.先序遍历二叉树 4.中序遍历二叉树 5.后序遍历二叉树 6.完整代码 前言 二叉树的非递归的表示和实现。 1.数组和结构体相关的一些知…

【React】React-redux多组件间的状态传递

效果(部分完整代码在最底部): 编写 Person 组件 上面的 Count 组件,已经在前面几篇写过了,也可以直接翻到最底部看 首先我们需要在 containers 文件夹下编写 Person 组件的容器组件 首先我们需要编写 index.jsx 文件…

基于VOLOPV2的自动驾驶环境感知系统

基于VOLOPV2的自动驾驶环境感知系统是一个复杂的系统,它主要负责实时检测并识别周围环境中的各种物体和信息,为自动驾驶车辆提供必要的感知数据。以下是对该系统的一个简要介绍: 环境感知是自动驾驶系统中的一个关键部分,它依赖于…

AI代理和AgentOps生态系统的剖析

1、AI代理的构成:AI代理能够根据用户的一般性指令自行做出决策和采取行动。 主要包含四个部分: (1)大模型(LLM) (2)工具:如网络搜索、代码执行等 (3&#x…

C++学习第二十九课:C++ 输入输出流详解:从基础到高级应用

在 C 中,流(stream)是一种用于实现输入输出操作的抽象概念。流可以看作是字节的流动,这些字节可以从一个地方流向另一个地方,例如从键盘输入到程序中,或者从程序输出到屏幕。C 提供了一套完整的流库来处理各…

区块链(打新)如何被割韭菜

看上去,像我只要去每个都买一遍新发行的代币,一定可以成功的 但是好像没有想象中这么简单,因为这些山寨币,庄家可以自己控盘的,看上去好像有跌宕起伏的买卖,但是一单掀桌子,庄家他自己都不玩了…

mac 讨厌百度网盘怎么办

一、别拦我 首先请允许我泄个愤,tmd百度网盘下个1g的文件下载速度竟然超不过200k,只要不放在所有已打开软件的最前面,它就给你降到10k以内,关键是你慢就慢了,我也不是很着急,关键是你日常下载失败并且总是…

Ubuntu18.04--虚拟机配置Samba并从Windows登录

前言: 本文记录我自己在Windows上安装 Virtualbox ,并在Virtualbox中安装 Ubuntu-18.04 虚拟机,在Ubuntu-18.04虚拟机里安装配置Smaba服务器,从 Windows 宿主系统上访问虚拟机共享samba目录的配置命令。 引用: N/A 正文 虚拟…

鸿蒙OpenHarmony开发板解析:【特性配置规则】

特性 特性配置规则 下面介绍feature的声明、定义以及使用方法。 feature的声明 开发前请熟悉鸿蒙开发指导文档:gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md点击或者复制转到。 在部件的bundle.json文件中通过feature_list来声明部件的feature列…

【栈】Leetcode 验证栈序列

题目讲解 946. 验证栈序列 算法讲解 在这里就只需要模拟一下这个栈的出栈顺序即可:使用一个stack,每次让pushed里面的元素入栈,如果当前栈顶的元素等于poped容器中的当前元素,因此就需要让栈顶元素出栈,poped的遍历…

W801学习笔记二十二:英语背单词学习应用——下

续上篇: W801学习笔记二十一:英语背单词学习应用——上 五、处理用户交互 由于英语也是采用了和唐诗一样的《三分钟限时挑战》《五十题竞速挑战》《零错误闯关挑战》,所以用户交互的逻辑和唐诗是一样的。所以,我们抽一个基类&a…

Java入门基础学习笔记7——Intellij IDEA开发工具概述、安装

之前的开发工具存在一些问题: 文本编辑工具:记事本、NotePad、EditPlus、Sublime...编写代码的时候没有错误提醒、没有智能代码提示、需要自己进行编译、执行、功能不够强大。 集成开发环境(IDE:Integrated Development Environm…

SQL注入(sqli-labs第一关)

sqli-labs第一关 方法一:手工注入 来到第一关,图上说我们需要一个数字的参数 于是我们先手工注入?id1 and 11 跟?id1 and 12发现页面没有报错 每张截图上面页面中有select查询语句,这是我在第一关的源码中加上了echo "$sql ";…

探索无界知识:用 ChatGPT 的原理学习任何事物!

为避免文章重复,您的文本已通过更改句式、用词以及句子结构进行了修改。现在的文本应该能更好地满足去重的需求: 从ChatGPT原理出发,我们探讨GPT如何启发人类学习和构建个人知识体系。 1. 明确学习目标 机器学习必须依靠目标函数。同样&…

408算法题专项-2019年

题目: 分析:要求空间复杂度为O(1),我们可以逆向假设可以开空间,得出一种思路,然后对这种思路优化空间即可得到O(1) 思路一:假设开空间 思考:再开…

fswatch工具:跟踪Linux中的文件和目录更改

fswatch是一个跨平台的文件更改监视器,当指定文件或目录的内容被更改或修改时,它会收到通知警报。 fswatch在不同的操作系统上执行多种类型的监视器,例如: 基于 Apple OS X 的文件系统事件 API 构建的监视器。基于kqueue的监视器…

05、Kafka 操作命令

05、Kafka 操作命令 1、主题命令 (1)创建主题 kafka-topics.sh --create --bootstrap-server 192.168.135.132:9092,192.168.135.133:9092,192.168.135.134:9092 --topic test1 --partitions 4 --replication-factor 3–bootstrap-server:…

互动科技如何强化法治教育基地体验?

近年来,多媒体互动技术正日益融入我们生活的各个角落,法治教育领域亦不例外。步入法治教育基地,我们不难发现,众多创新的多媒体互动装置如雨后春笋般涌现,这些装置凭借前沿的科技手段,不仅极大地丰富了法制…

Capl中的运算符

Capl中的运算符类似于C语言。由于capl中没有指针的概念,所以没有指针取值,取地址等运算符。 Capl中的运算符优先级同C语言一样,同样小括号可以 提升优先级。 1.算数运算符 整数类型之间的数据进行除法运算,结果一定是整数。如果…

双目相机标定流程(MATLAB)

一:经典标定方法 1.1OPENCV 1.2ROS ROS进行双目视觉标定可以得到左右两个相机的相机矩阵和畸变系数,如果是单目标定,用ROS会非常方便。 3.MATLAB标定(双目标定) MATLAB用来双目标定会非常方便,主要是为…