批量操作安装功能

news2024/10/3 2:16:18

功能结构设计

   分别使用单线程、多线程、多进程、协程分别实现功能:

一、 单线程实现功能

1.1单线程 实现发送点击生成 transaction_id;

click01.py  :  发送点击模块;

base.py:                          封装一些公共的方法;

# _*_ encoding=utf-8 _*_
import requests,re
from common.test_datas import tt
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp


class Click(BaseModule):

    def __init__(self):
        super(Click,self).__init__()

    def _process(self, offer_id):
        host = '```'
        click_id = ''.join(re.findall('[0-9a-z]', (tt.radom_uuid())))
        url = host + ":8888/click?id=" + offer_id + "&aff=31110005&click_id=" + click_id + "&ip=89.179.45.132&pkg=pkg12345&lang=lang&pkg=com.test.cn&ua=ua&ad_type=ad_type&media_type=media_type&model=model&os=Android&sub_siteid=123213&offer_name=offernameselenium2022-07-05&android_id=35433&os_version=os_version&brand=brand&b_size=b_size&date=20220706&data_source_id=1645619743316148226"
        res = requests.get(url=url, verify=False)
        if "Success=false" in res.text:
            print("结束程序运行 {}".format(res.text))
        else:
            transaction_id = ((res.url).split("transaction_id=")[1]).split("&affiliate_id=")[0]
        return transaction_id

    def _process_singlethread(self,list_):
        # 单线程运行
        response_list = [self._process(offer) for offer in list_]
        return response_list

1.2单线程 实现操作安装;

doingPB02.py     单线程实现安装功能;

# _*_ encoding=utf-8 _*_
import requests
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp

class DoingPB(BaseModule):

    def _process(self,transaction_id):
        host = '  ···   '
        url = host + ":8090/pb/lsr?click_id=" + transaction_id
        print("点击系统执行PB操作 【transaction_id:{},请求url: {}】".format(transaction_id, url))
        res = requests.get(url=url, verify=False)
        return res.text


    def _process_singlethread(self,list_):
        # 单线程运行
        response_list = [self._process(transaction_id) for transaction_id in list_]
        return response_list

1.3单线程  实现调度;

schedulerinstall.py   单线程实现调度功能;

# _*_ encoding=utf-8 _*_
import os.path
import time

from modules.click01 import Click
from modules.doingPB02 import DoingPB

from const import CalcType
class SchedulerInstall:

    def __init__(self):
        self.ck = Click()
        self.doingpb = DoingPB()


    def process(self):
        # 1.加载要执行的offerid
        lit = ['1006','538']

        # 2. 调度发送点击
        content_list = self.ck.process(lit)
        # 3. 调度操作安装
        self.doingpb.process(content_list)

if __name__ == '__main__':
    scheduleri = SchedulerInstall()
    scheduleri.process()

二、 多线程实现功能

2.1多线程 实现发送点击生成 transaction_id;

click01.py  :  发送点击模块;

# _*_ encoding=utf-8 _*_
import requests,re
from common.test_datas import tt
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp


class Click(BaseModule):

    def __init__(self):
        super(Click,self).__init__()

    def _process(self, offer_id):
        host = '  ···   '
        click_id = ''.join(re.findall('[0-9a-z]', (tt.radom_uuid())))
        url = host + ":8888/click?id=" + offer_id + "&aff=31110005&click_id=" + click_id + "&ip=89.179.45.132&pkg=pkg12345&lang=lang&pkg=com.test.cn&ua=ua&ad_type=ad_type&media_type=media_type&model=model&os=Android&sub_siteid=123213&offer_name=offernameselenium2022-07-05&android_id=35433&os_version=os_version&brand=brand&b_size=b_size&date=20220706&data_source_id=1645619743316148226"
        # res = requests.get(url=url, headers=header, verify=False)
        res = requests.get(url=url, verify=False)
        if "Success=false" in res.text:
            print("结束程序运行 {}".format(res.text))
        else:
            transaction_id = ((res.url).split("transaction_id=")[1]).split("&affiliate_id=")[0]
        return transaction_id

    

    def _process_multithread(self,list_):
        # 多线程 下载
        task_list = [tp.submit(self._process,(offer)) for offer in list_]
        response_list = [task.result() for task in task_list]
        return response_list

2.2多线程 实现操作安装;

doingPB02.py     多线程实现安装功能;

# _*_ encoding=utf-8 _*_
import requests
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp

class DoingPB(BaseModule):

    def _process(self,transaction_id):
        host = ' ···   '
        url = host + ":8090/pb/lsr?click_id=" + transaction_id
        print("点击系统执行PB操作 【transaction_id:{},请求url: {}】".format(transaction_id, url))
        res = requests.get(url=url, verify=False)
        return res.text


    def _process_multithread(self,list_):
        # 多线程 运行
        task_list = []
        for transaction_id in list_:
            task = tp.submit(self._process, (transaction_id))
            task_list.append(task)
        for task in task_list:
            task.result()

2.3多线程  实现调度;

schedulerinstall.py   多线程实现调度功能;

# _*_ encoding=utf-8 _*_
from modules.click01 import Click
from modules.doingPB02 import DoingPB

from const import CalcType
class SchedulerInstall:

    def __init__(self):
        self.ck = Click()
        self.doingpb = DoingPB()
        self.ck.set_calc_type(CalcType.MultiThread)
        self.doingpb.set_calc_type(CalcType.MultiThread)


    def process(self):
        # 1.加载要执行的offerid
        lit = ['1006','538']

        # 2. 调度发送点击
        content_list = self.ck.process(lit)
        # 3. 调度操作安装
        self.doingpb.process(content_list)

if __name__ == '__main__':
    scheduleri = SchedulerInstall()
    scheduleri.process()

三、多进程实现功能

3.1多进程 实现发送点击生成 transaction_id;

click01.py  :  发送点击模块;

# _*_ encoding=utf-8 _*_
import requests,re
from common.test_datas import tt
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp
from modules.executors import process_pool_executor as pp


class Click(BaseModule):

    def __init__(self):
        super(Click,self).__init__()

    def _process(self, offer_id):
        host = '  ```   '
        click_id = ''.join(re.findall('[0-9a-z]', (tt.radom_uuid())))
        url = host + ":8888/click?id=" + offer_id + "&aff=31110005&click_id=" + click_id + "&ip=89.179.45.132&pkg=pkg12345&lang=lang&pkg=com.test.cn&ua=ua&ad_type=ad_type&media_type=media_type&model=model&os=Android&sub_siteid=123213&offer_name=offernameselenium2022-07-05&android_id=35433&os_version=os_version&brand=brand&b_size=b_size&date=20220706&data_source_id=1645619743316148226"
        # res = requests.get(url=url, headers=header, verify=False)
        res = requests.get(url=url, verify=False)
        if "Success=false" in res.text:
            print("结束程序运行 {}".format(res.text))
        else:
            transaction_id = ((res.url).split("transaction_id=")[1]).split("&affiliate_id=")[0]
        return transaction_id

    def _process_multiprocess(self, list_):
        # 多进程 下载
        response_list = []

        task_list = []
        for offer in list_:
            task = pp.submit(self._process, (offer))
            task_list.append(task)
        for task in task_list:
            transaction_id = task.result()
            response_list.append(transaction_id)
        return response_list

3.2多进程 实现操作安装;

doingPB02.py     多进程实现安装功能;

# _*_ encoding=utf-8 _*_
import requests
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp
from modules.executors import process_pool_executor as pp

class DoingPB(BaseModule):

    def _process(self,transaction_id):
        host = '  ···   '
        url = host + ":8090/pb/lsr?click_id=" + transaction_id
        print("点击系统执行PB操作 【transaction_id:{},请求url: {}】".format(transaction_id, url))
        res = requests.get(url=url, verify=False)
        return res.text


    def _process_multiprocess(self, list_):
        # 多进程 下载
        task_list = []
        for transaction_id in list_:
            task = pp.submit(self._process, (transaction_id))
            task_list.append(task)
        for task in task_list:
            task.result()

3.3多进程  实现调度;

schedulerinstall.py   多进程实现调度功能;

# _*_ encoding=utf-8 _*_
from modules.click01 import Click
from modules.doingPB02 import DoingPB
import utils,prettytable
from const import CalcType
class SchedulerInstall:

    def __init__(self):
        self.ck = Click()
        self.doingpb = DoingPB()
        self.ck.set_calc_type(CalcType.MultiProcess)
        self.doingpb.set_calc_type(CalcType.MultiProcess)


    def process(self):
        time_statictics = {}
        time_statictics['click_time'] = []
        time_statictics['install_time'] = []
        timer = utils.Timer()

        # 1.加载要执行的offerid
        lit = ['1006','538']

        # 2. 调度发送点击
        timer.tick()
        content_list = self.ck.process(lit)
        time_cost = timer.tock()
        time_statictics['click_time'].append(time_cost)
        # 3. 调度操作安装
        timer.tick()
        self.doingpb.process(content_list)
        time_cost = timer.tock()
        time_statictics['install_time'].append(time_cost)

        return time_statictics


if __name__ == '__main__':
    scheduleri = SchedulerInstall()
    log_time = scheduleri.process()
    

3.4分别对单线程,多线程,多进程 实现调度;

分别对单线程,多线程,多进程执行代码汇总,并对执行时间绘制表格输出;

# _*_ encoding=utf-8 _*_
from modules.click01 import Click
from modules.doingPB02 import DoingPB
import utils,prettytable
from const import CalcType
class SchedulerInstall:

    def __init__(self):
        self.ck = Click()
        self.doingpb = DoingPB()


    def set_calc_type(self,type_):
        self.ck.set_calc_type(type_)
        self.doingpb.set_calc_type(type_)


    def process(self):
        time_statictics = {}
        time_statictics['click_time'] = []
        time_statictics['install_time'] = []
        timer = utils.Timer()

        # 1.加载要执行的offerid
        lit = ['1006','538']

        # 2. 调度发送点击
        timer.tick()
        content_list = self.ck.process(lit)
        time_cost = timer.tock()
        time_statictics['click_time'].append(time_cost)
        # 3. 调度操作安装
        timer.tick()
        self.doingpb.process(content_list)
        time_cost = timer.tock()
        time_statictics['install_time'].append(time_cost)

        return time_statictics

    def statictics(self, single_log, multi_log, multiprocess_log):
        table = prettytable.PrettyTable(['类型', '单线程总耗时','多线程耗时','多线程提升率','多进程耗时','多进程提升率'])
        click_row = ['click']
        install_row = ['install']

        click_row.append(single_log['click_time'][0])
        install_row.append(single_log['install_time'][0])

        #  多线程数据
        click_row.append(multi_log['click_time'][0])
        install_row.append(multi_log['install_time'][0])
        # 多线程提升率
        time_ = single_log['click_time'][0] - multi_log['click_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['click_time'][0]) * 100)
        click_row.append(lift_rate)

        time_ = single_log['install_time'][0] - multi_log['install_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['install_time'][0]) * 100)
        install_row.append(lift_rate)

        #  多进程数据
        click_row.append(multiprocess_log['click_time'][0])
        install_row.append(multiprocess_log['install_time'][0])

        # 多进程提升率
        time_ = single_log['click_time'][0] - multiprocess_log['click_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['click_time'][0]) * 100)
        click_row.append(lift_rate)

        time_ = single_log['install_time'][0] - multiprocess_log['install_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['install_time'][0]) * 100)
        install_row.append(lift_rate)


        table.add_row(click_row)
        table.add_row(install_row)
        print(table)


if __name__ == '__main__':
    scheduleri = SchedulerInstall()
    # 单线程运行
    scheduleri.set_calc_type(CalcType.SingleThread)
    singlethread_time = scheduleri.process()

    # 多线程运行
    scheduleri.set_calc_type(CalcType.MultiThread)
    multithread_time = scheduleri.process()

    # 多进程运行
    scheduleri.set_calc_type(CalcType.MultiProcess)
    multiprocess_time = scheduleri.process()

    # 执行时间合并,分析
    scheduleri.statictics(singlethread_time, multithread_time, multiprocess_time)

|   类型  | 单线程总耗时 | 多线程耗时 | 多线程提升率 | 多进程耗时 | 多进程提升率 |
+---------+--------------+------------+--------------+------------+--------------+
|  click  |   1.923541   |  1.144035  |   40.5245%   |   1.7682   |   8.0758%    |
| install |   2.605678   |  1.359892  |   47.8104%   |  1.418436  |   45.5636%   |
+---------+--------------+------------+--------------+------------+--------------+

四、协程实现功能

4.1协程 实现发送点击生成 transaction_id;

click01.py  :  发送点击模块;

# _*_ encoding=utf-8 _*_
import requests,re
from common.test_datas import tt
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp
from modules.executors import process_pool_executor as pp
from modules.executors import pycoroutine_executor as pe
import httpx,asyncio

host = ' ··· '

class Click(BaseModule):

    def __init__(self):
        super(Click,self).__init__()

    def _process(self, offer_id):
        click_id = ''.join(re.findall('[0-9a-z]', (tt.radom_uuid())))
        url = host + ":8888/click?id=" + offer_id + "&aff=31110005&click_id=" + click_id + "&ip=89.179.45.132&pkg=pkg12345&lang=lang&pkg=com.test.cn&ua=ua&ad_type=ad_type&media_type=media_type&model=model&os=Android&sub_siteid=123213&offer_name=offernameselenium2022-07-05&android_id=35433&os_version=os_version&brand=brand&b_size=b_size&date=20220706&data_source_id=1645619743316148226"
        res = requests.get(url=url, verify=False)
        if "Success=false" in res.text:
            print("结束程序运行 {}".format(res.text))
        else:
            transaction_id = ((res.url).split("transaction_id=")[1]).split("&affiliate_id=")[0]
        return transaction_id

        def _process_singlethread(self,list_):
        # 单线程运行
        response_list = [self._process(offer) for offer in list_]
        return response_list

    def _process_multithread(self,list_):
        # 多线程 下载
        task_list = [tp.submit(self._process,(offer)) for offer in list_]
        response_list = [task.result() for task in task_list]
        return response_list

    def _process_multiprocess(self, list_):
        # 多进程 下载
        task_list = [pp.submit(self._process, (offer)) for offer in list_]
        response_list = [task.result() for task in task_list]
        return response_list

    def _process_coroutine(self, list_):

        click_id = ''.join(re.findall('[0-9a-z]', (tt.radom_uuid())))
        response_list = []
        async def main():
            for offer in list_:
                url = host + ":8888/click?id=" + offer + "&aff=31110005&click_id=" + click_id + "&ip=89.179.45.132&pkg=pkg12345&lang=lang&pkg=com.test.cn&ua=ua&ad_type=ad_type&media_type=media_type&model=model&os=Android&sub_siteid=123213&offer_name=offernameselenium2022-07-05&android_id=35433&os_version=os_version&brand=brand&b_size=b_size&date=20220706&data_source_id=1645619743316148226"
                async with httpx.AsyncClient() as response:
                    response = await response.get(url)
                    res = response.headers['location']
                    #
                    transaction_id = (res.split("transaction_id=")[1]).split("&affiliate_id=")[0]
                    response_list.append(transaction_id)

        pe.run_until_complete(main())
        return response_list

4.2协程 实现操作安装;

doingPB02.py     协程实现安装功能;

# _*_ encoding=utf-8 _*_
import requests,httpx
from modules.base import BaseModule
from modules.executors import thread_pool_executor as tp
from modules.executors import process_pool_executor as pp
from modules.executors import pycoroutine_executor as pe
host = '  ···   '
class DoingPB(BaseModule):

    def _process(self,transaction_id):

        url = host + ":8090/pb/lsr?click_id=" + transaction_id
        print("点击系统执行PB操作 【transaction_id:{},请求url: {}】".format(transaction_id, url))
        res = requests.get(url=url, verify=False)
        return res.text


        def _process_singlethread(self,list_):
        # 单线程运行
        response_list = [self._process(transaction_id) for transaction_id in list_]
        return response_list

    def _process_multithread(self,list_):
        # 多线程 运行
        response_list = []
        task_list = [tp.submit(self._process, (transaction_id)) for transaction_id in list_]
        for task in task_list:
            response = task.result()
            response_list.append(response)
        return response_list

    def _process_multiprocess(self, list_):
        # 多进程 下载
        response_list = []
        task_list = [pp.submit(self._process, (transaction_id)) for transaction_id in list_]
        for task in task_list:
            response = task.result()
            response_list.append(response)
        return response_list

    def _process_coroutine(self, list_):
        # 协程
        return self._process_multiprocess(list_)

4.3协程  实现调度;

schedulerinstall.py   协程实现调度功能;

# _*_ encoding=utf-8 _*_
from modules.click01 import Click
from modules.doingPB02 import DoingPB
import utils,prettytable
from const import CalcType
class SchedulerInstall:

    def __init__(self):
        self.ck = Click()
        self.doingpb = DoingPB()


    def set_calc_type(self,type_):
        self.ck.set_calc_type(type_)
        self.doingpb.set_calc_type(type_)


    def process(self):
        time_statictics = {}
        time_statictics['click_time'] = []
        time_statictics['install_time'] = []
        timer = utils.Timer()

        # 1.加载要执行的offerid
        lit = ['1006', '538']

        # 2. 调度发送点击
        timer.tick()
        content_list = self.ck.process(lit)
        time_cost = timer.tock()
        time_statictics['click_time'].append(time_cost)
        # 3. 调度操作安装
        timer.tick()
        self.doingpb.process(content_list)
        time_cost = timer.tock()
        time_statictics['install_time'].append(time_cost)

        return time_statictics

    def statictics(self, single_log, multi_log, multiprocess_log, pycoroutine_log):
        table = prettytable.PrettyTable(['类型', '单线程总耗时','多线程耗时','多线程提升率','多进程耗时','多进程提升率','协程','协程提升率'])
        click_row = ['click']
        install_row = ['install']

        click_row.append(single_log['click_time'][0])
        install_row.append(single_log['install_time'][0])

        #  多线程数据
        click_row.append(multi_log['click_time'][0])
        install_row.append(multi_log['install_time'][0])
        # 多线程提升率
        time_ = single_log['click_time'][0] - multi_log['click_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['click_time'][0]) * 100)
        click_row.append(lift_rate)

        time_ = single_log['install_time'][0] - multi_log['install_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['install_time'][0]) * 100)
        install_row.append(lift_rate)

        #  多进程数据
        click_row.append(multiprocess_log['click_time'][0])
        install_row.append(multiprocess_log['install_time'][0])

        # 多进程提升率
        time_ = single_log['click_time'][0] - multiprocess_log['click_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['click_time'][0]) * 100)
        click_row.append(lift_rate)

        time_ = single_log['install_time'][0] - multiprocess_log['install_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['install_time'][0]) * 100)
        install_row.append(lift_rate)

        #  协程数据
        click_row.append(pycoroutine_log['click_time'][0])
        install_row.append(pycoroutine_log['install_time'][0])

        # 协程提升率
        time_ = single_log['click_time'][0] - pycoroutine_log['click_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['click_time'][0]) * 100)
        click_row.append(lift_rate)

        time_ = single_log['install_time'][0] - pycoroutine_log['install_time'][0]
        lift_rate = '%.4f%%' % ((time_ / single_log['install_time'][0]) * 100)
        install_row.append(lift_rate)


        table.add_row(click_row)
        table.add_row(install_row)
        print(table)


if __name__ == '__main__':
    scheduleri = SchedulerInstall()
    # 单线程运行
    scheduleri.set_calc_type(CalcType.SingleThread)
    singlethread_time = scheduleri.process()

    # 多线程运行
    scheduleri.set_calc_type(CalcType.MultiThread)
    multithread_time = scheduleri.process()

    # 多进程运行
    scheduleri.set_calc_type(CalcType.MultiProcess)
    multiprocess_time = scheduleri.process()

    # 多进程运行
    scheduleri.set_calc_type(CalcType.PyCoroutine)
    pyprocess_time = scheduleri.process()

    # 执行时间合并,分析
    scheduleri.statictics(singlethread_time, multithread_time, multiprocess_time,pyprocess_time)



实际运行结果:

+---------+--------------+------------+--------------+------------+--------------+----------+------------+
|   类型 | 单线程总耗时| 多线程耗时| 多线程提升率| 多进程耗时|多进程提升率| 协程 | 协程提升率 |
+---------+--------------+------------+--------------+------------+--------------+----------+------------+
|  click  |   3.005457 |  1.566382|   47.8821% |  2.299507 |   23.4889%  | 1.495633 |  50.2361%  |
| install |   3.423995 |  1.787206|   47.8035% |  1.726279 |   49.5829%  | 1.738925 |  49.2136%  |
+---------+--------------+------------+--------------+------------+--------------+----------+------------+

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

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

相关文章

2023下半年软考改成机考,对考生有哪些影响?

软考改革成无纸化考试已经实锤。根据陕西软考办官网的消息,从2023年11月起,软考的所有科目都将改为机器考试形式。详情请参阅: 那么软考考试改为机考后,对我们会有哪些影响呢?我来简单概括一下。 1、复习的方法可以根…

苍穹外卖day12笔记

一、工作台 联系昨天 要实现的功能和昨天差不多,都是查询数据。 所以我们就写出查询语句,然后直接导入已经写好的代码。 实现效果 查询语句 今日数据 营业额 select count(amount) from orders where status5 and order_time > #{begin} and …

【二分+贪心】CF1665 C

Problem - C - Codeforces 题意: 思路: 一开始想太简单wa6了 只想到先感染大的分量,然后最后把最大的分量剩下的染色 但是可能会有别的分量更大(因为最后给最大的染色之后可能不再是最大的) 可以用堆维护&#xf…

SQL | 高级数据过滤

5-高级数据过滤 通过组合WHERE子句,建立功能更强的检索语句。 5.1-组合WHERE子句 前面写的都是单一条件下的WHERE子句,SQL语句允许给出多个WHERE子句来组合检索,这些WHERE子句通过AND子句或者OR子句进行连接。 操作符(operato…

将达梦DM8数据库JDBC驱动注册到本地Maven仓库安装

这里写目录标题 1下载DmJdbcDriver18.jar2,以管理员身份运行CMD窗口,然后执行如下安装命令:3.pom文件添加引用 1下载DmJdbcDriver18.jar 我本地放在d:\DmJdbcDriver.jar 2,以管理员身份运行CMD窗口,然后执行如下安装命令: mvn …

SQL Server基础之游标

一:认识游标 游标是SQL Server的一种数据访问机制,它允许用户访问单独的数据行。用户可以对每一行进行单独的处理,从而降低系统开销和潜在的阻隔情况,用户也可以使用这些数据生成的SQL代码并立即执行或输出。 1.游标的概念 游标是…

ELK的搭建和使用

ELK的搭建和使用 1、什么是ELK 日志收集平台有多种组合方式: ELK Stack 方式:Elasticsearch Logstash Filebeat Kibana,业界最常见的架构。 Elasticsearch Logstash Kafka Kibana,用上了消息中间件,但里面也有…

sxs卡丢失数据如何找回?sxs卡数据丢失原因和修复办法分享!

说起sxs卡,你们是否有所了解呢?sxs卡具有很好的传输性能,能够存储照片和视频数据,主要被放置在索尼XDCAM EX型摄像机上。 而在使用sxs卡设备过程中,难免和其他设备一样,容易出现数据丢失情况。而如果丢失的…

不一样的新体验!太川股份联手菊风打造智能门禁可视对讲

在智能化浪潮的发展中,实时音视频等信息技术的加持使得楼宇对讲门禁的功能越发多且智能。作为安防产业的三大支柱之一,门禁对讲逐渐衍生为社区与家庭智慧化融合的“桥梁”。菊风用实时音视频技术赋能太川楼宇门禁可视对讲应用,将在兼顾稳定楼…

【C++从0到王者】第二十站:模板进阶

文章目录 前言一、typename 和 class的一些区别二、非类型模板参数1.非类型模板参数介绍2.array容器 三、模板的特化1.函数模板的特化2.类模板的特化1.全特化2.偏特化(半特化) 三、模板的分离编译四、总结 前言 在前面我们使用模板主要是为了解决两类问…

vs2022+qt6.24+Cef编译

1.QCefView源码下载地址 https://github.com/cefview/qcefview2.目录层级关系如下: 3.下载CefViewCore git pull --regit pull --recurse-submodules上面命令失败直接用下面的命令 git clone gitgithub.com:CefView/CefViewCore.git4.编译QCefView准备工作 a.准…

Java程序猿搬砖笔记(十五)

文章目录 在Java中将类作为参数传递(泛型)IDEA快捷键:查看该方法调用了哪些方法、被哪些方法调用快捷键:ctrlalth IDEA快捷键:快速从controller跳转到serviceImplIDEA快捷键:实现接口的方法IDEA 快捷键:快速包裹代码ID…

剑指offer66.构建乘积数组

我一开始的想法就是,先把所有数的乘积求出来,然后遍历数组,用这个积除以它,就是除了这个数外所有数的乘积。但是题目明确给了不能用除法,所以可不可以用位运算来实现除法呢。 class Solution {public int[] construct…

第R3周 - 天气预测

🍨 本文为🔗365天深度学习训练营 中的学习记录博客🍖 原作者:K同学啊 我的环境: 语言环境:Python3.10.7编译器:VScode深度学习环境:TensorFlow 2.13.0 数据集: 一、前期…

系列二、Redis简介

一、概述 # 官网 https://redis.io/ 总结:redis是一个内存型的数据库。 二、特点 Redis是一个高性能key/value内存型数据库。Redis支持丰富的数据类型。Redis支持持久化 。Redis单线程,单进程。

Jmeter 配置环境变量,简明教程专享

通过给 JMeter 配置环境变量,可以快捷的打开 JMeter: 打开终端。执行 jmeter。 配置环境变量的方法如下。 Mac 和 Linux 系统 在 ~/.bashrc 中加如下内容: export JMETER_HOMEJMeter所在目录 export PATH$JAVA_HOME/bin:$PATH:.:$JMETER…

日常BUG —— Java判空注解

😜作 者:是江迪呀✒️本文关键词:日常BUG、BUG、问题分析☀️每日 一言 :存在错误说明你在进步! 一. 问题描述 问题一: 在使用Java自带的注解NotNull、NotEmpty、NotBlank时报错,…

ubuntu 安装 cuda

ubuntu 安装 cuda 初环境与设备在官网找安装方式 本篇文章将介绍ubuntu 安装 CUDA Toolkit CUDA Toolkit 是由 NVIDIA(英伟达)公司开发的一个软件工具包,用于支持并优化 GPU(图形处理器)上的并行计算和高性能计算。它…

ISC 2023 | 赛宁网安验证评估 重磅发布

​​8月9日-10日,第十一届互联网安全大会(简称ISC 2023)在北京国家会议中心隆重举办。作为本次大会的战略合作伙伴(最高级别),赛宁网安主办 “安全验证评估论坛”,邀请邬江兴院士与业界专家共同…

企业分配给员工的微信号怎么高效管理?

很多很多公司都在发愁这几个问题: 1、拥有多个微信号,不想管理多台手机,想将所有微信号进行统一管理 2、想用软件来代替传统的营销体系,安全性上也要有保障 3、用人成本太大与公司的效益不成正比 4、多个账号发圈不方便&#xff0…