当前位置: 首页 > news >正文

Openharmony3.2 源码编译(ubuntu 22.04) 过程记录

OS: ubuntu 22.04 x64

1. 下载源码

1.1 安装码云repo工具

sudo apt install python3-pip git-lfsmkdir ~/bin
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o ~/bin/repo 
chmod a+x ~/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests

1.2 将repo添加到环境变量

vim ~/.bashrc               # 编辑环境变量
export PATH=~/bin:$PATH     # 在环境变量的最后添加一行repo路径信息
source ~/.bashrc            # 应用环境变量

1.3 获取源码

需有gitee.com 账号,同时设置好ssh 公钥登录(https://gitee.com/help/articles/4191#article-header0)

vm@vm:~$ mkdir oh 
vm@vm:~$ cd oh
vm@vm:~/oh$  repo init -u git@gitee.com:openharmony/manifest.git -b OpenHarmony-3.2-Release --no-repo-verify
remote: Enumerating objects: 9229, done.
remote: Counting objects: 100% (676/676), done.
remote: Compressing objects: 100% (467/467), done.
remote: Total 9229 (delta 393), reused 125 (delta 56), pack-reused 8553Your identity is: maoxiaochuan <maoxiaochuan-gz@loongson.cn>
If you want to change this, please re-run 'repo init' with --config-namerepo has been initialized in /home/vm/ohvm@vm:~/oh$ repo sync -c
remote: Enumerating objects: 1260, done.
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Counting objects: 100% (279/279), done.
remote: Total 51 (delta 0), reused 2 (delta 0), pack-reused 47
remote: Compressing objects: 100% (189/189), done.
Fetching projects:   0% (1/353) applications_camera_sample_communicationremote: Enumerating objects: 1526, done.0Updating files: 100% (2351/2351), done.
Checking out projects:  83% (293/353) third_party_libusbUpdating files:  36% (1Updating files: 100% (451/451), done.
Checking out projects:  85% (302/353) third_party_mbedtlsUpdating files:  28% (Updating files: 100% (8570/8570), done.
Checking out projects:  85% (303/353) third_party_mesa3dUpdating files:  59% (8Updating files: 100% (14195/14195), done.
Checking out projects:  87% (310/353) third_party_ninjaUpdating files:   2% (37Updating files: 100% (12683/12683), done.
Checking out projects:  88% (312/353) third_party_ntfs-3gUpdating files:  85% (Updating files: 100% (1511/1511), done.
Checking out projects:  89% (315/353) third_party_opencl-headersUpdating files:Updating files: 100% (720/720), done.
Checking out projects:  89% (317/353) third_party_openmaxUpdating files:  76% (Updating files: 100% (3166/3166), done.
Checking out projects:  92% (325/353) third_party_pulseaudioUpdating files:  78Updating files: 100% (4384/4384), done.
Checking out projects:  93% (330/353) third_party_selinuxUpdating files:   5% (Updating files: 100% (54797/54797), done.
Checking out projects:  94% (335/353) third_party_toyboxUpdating files:   0% (3Updating files: 100% (58182/58182), done.
Checking out projects:  96% (339/353) third_party_unityUpdating files:   1% (86Updating files: 100% (6429/6429), done.
Checking out projects: 100% (353/353), done.
repo sync has finished successfully.vm@vm:~/oh$ repo forall -c 'git lfs pull'
Error updating the git index: (10/10), 135 MB | 8.8 MB/s
error: UI/JsAnimation/entry/src/main/js/MainAbility/common/animator/show.mp4: cannot add to the index - missing --add option?
fatal: Unable to process path UI/JsAnimation/entry/src/main/js/MainAbility/common/animator/show.mp4
Errors logged to /home/vm/oh/applications/standard/app_samples/.git/lfs/logs/20230416T074901.707130201.log
Use `git lfs logs last` to view the log.
Downloading LFS objects: 100% (26/26), 43 MB | 9.1 MB/s
vm@vm:~/oh$ 
vm@vm:~/oh$ ls
applications  build.py       device      interface       qemu-run     vendor
arkcompiler   build.sh       docs        kernel          test
base          commonlibrary  drivers     napi_generator  third_party
build         developtools   foundation  productdefine   tools
vm@vm:~/oh$

2. 编译

2.1 安装编译工具

vm@vm:~/oh$ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev e2fsprogs pkg-config flex bison perl bc openssl libssl-dev libelf-dev libc6-dev binutils binutils-dev libdwarf-dev u-boot-tools mtd-utils gcc-arm-linux-gnueabi cpio device-tree-compiler git git-lfs ruby ccachevm@vm:~/oh$ python3 -m pip install --user ohos-build

2.2 将hb添加到环境变量

vim ~/.bashrc               # 编辑环境变量
export PATH=~/.local/bin:$PATH     # 在环境变量的最后添加一行repo路径信息
source ~/.bashrc            # 应用环境变量
vm@vm:~/oh$ hb
usage: hb [-h] [-v] {build,set,env,clean,tool} ...OHOS Build System version 0.4.6positional arguments:{build,set,env,clean,tool}build               Build source codeset                 OHOS build settingsenv                 Show OHOS build envclean               Clean outputtool                Call the gn command through the hb tooloptions:-h, --help            show this help message and exit-v, --version         show program's version number and exitvm@vm:~/oh$ hb -v
[OHOS INFO] hb version 0.4.6

2.3 通过hb 选取板卡配置

vm@vm:~/oh$ hb set
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/hb/__main__.py", line 84, in main
[OHOS ERROR]     status = args.command(args)
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/set/set.py", line 45, in exec_command
[OHOS ERROR]     return set_product() == 0
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/set/set.py", line 62, in set_product
[OHOS ERROR]     product_info = Product.product_menuconfig()
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/common/product.py", line 260, in product_menuconfig
[OHOS ERROR]     product = menu.list_promt('product', 'Which product do you need?',
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/cts/menuconfig.py", line 34, in list_promt
[OHOS ERROR]     return self._promt(questions, **kwargs)
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/cts/menuconfig.py", line 25, in _promt
[OHOS ERROR]     prompt = importlib.import_module('hb_internal.cts.prompt')
[OHOS ERROR]   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
[OHOS ERROR]     return _bootstrap._gcd_import(name[level:], package, level)
[OHOS ERROR]   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
[OHOS ERROR]   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
[OHOS ERROR]   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
[OHOS ERROR]   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
[OHOS ERROR]   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
[OHOS ERROR]   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/cts/prompt.py", line 21, in <module>
[OHOS ERROR]     from prompt_toolkit.shortcuts import run_application
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
[OHOS ERROR]     from .interface import CommandLineInterface
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/interface.py", line 19, in <module>
[OHOS ERROR]     from .application import Application, AbortAction
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/application.py", line 8, in <module>
[OHOS ERROR]     from .key_binding.bindings.basic import load_basic_bindings
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
[OHOS ERROR]     from prompt_toolkit.renderer import HeightIsUnknownError
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
[OHOS ERROR]     from prompt_toolkit.styles import Style
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
[OHOS ERROR]     from .from_dict import *
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
[OHOS ERROR]     from collections import Mapping
[OHOS ERROR] ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
[OHOS ERROR] Unhandled error: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

解决方法:

//因为Python3.10版本以后对requests库进行调整,collections中不能直接调用方法Mapping,MutableMapping
//参考:https://blog.csdn.net/LSH1628340121/article/details/124140926
vm@vm:~/oh$ vim /usr/lib/python3.10/collections/__init__.py  from collections.abc import Mapping
from collections.abc import MutableMapping

2.4 编译

// 选择板卡
vm@vm:~/oh$ hb set
OHOS Which product do you need?  qemu-arm64-linux-min// 编译
vm@vm:~/oh$ hb build
[OHOS INFO] Set cache size limit to 100.0 GB
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] cache hit (direct)  : 0
[OHOS INFO] cache hit (preprocessed)  : 0
[OHOS INFO] cache miss  : 0
[OHOS INFO] hit rate:  0.00%
[OHOS INFO] mis rate: 0.00%
[OHOS INFO] ---------------------------------------------
[OHOS INFO] file: /home/vm/oh/out/qemu-arm-linux/.ninja_log not exists
[OHOS INFO] parse file fail
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/vm/.local/lib/python3.10/site-packages/hb/__main__.py", line 84, in main
[OHOS ERROR]     status = args.command(args)
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/build/build.py", line 230, in exec_command
[OHOS ERROR]     return build.build(args.full,
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/build/build_process.py", line 153, in build
[OHOS ERROR]     exec_cmd(cmd_args)
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/build/build_process.py", line 253, in gn_build
[OHOS ERROR]     exec_command(gn_cmd, log_path=self.config.log_path, env=self.env())
[OHOS ERROR]   File "/home/vm/oh/build/lite/hb_internal/common/utils.py", line 92, in exec_command
[OHOS ERROR]     process = subprocess.Popen(cmd,
[OHOS ERROR]   File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
[OHOS ERROR]     self._execute_child(args, executable, preexec_fn, close_fds,
[OHOS ERROR]   File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
[OHOS ERROR]     raise child_exception_type(errno_num, err_msg, err_filename)
[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory: 'gn'
[OHOS ERROR] Unhandled error: [Errno 2] No such file or directory: 'gn'

解决方法:
安装ninja 和 gn

sudo apt install ninja-build
sudo apt install generate-ninja
vm@vm:~/oh$ hb build
[OHOS INFO] Set cache size limit to 100.0 GB
[OHOS INFO] ERROR at //build/config/BUILDCONFIG.gn:544:1: Unknown function.
[OHOS INFO] set_sources_assignment_filter(sources_assignment_filter)
[OHOS INFO] ^----------------------------
[OHOS INFO] root_out_dir=//out/qemu-arm-linux
[OHOS INFO] root_build_dir=//out/qemu-arm-linux
[OHOS INFO] root_gen_dir=//out/qemu-arm-linux/gen
[OHOS INFO] current_toolchain=//build/toolchain/ohos:ohos_clang_arm64
[OHOS INFO] host_toolchain=//build/toolchain/linux:clang_x64
[OHOS INFO]
[OHOS INFO] args: Namespace(platforms_config_file='/home/vm/oh/out/preloader/qemu-arm64-linux-min/platforms.build', subsystem_config_file='/home/vm/oh/out/preloader/qemu-arm64-linux-min/subsystem_config.json', example_subsystem_file=None, exclusion_modules_config_file='/home/vm/oh/out/preloader/qemu-arm64-linux-min/exclusion_modules.json', source_root_dir='/home/vm/oh/', gn_root_out_dir='/home/vm/oh/out/qemu-arm-linux', build_platform_name='phone', build_xts=False, load_test_config=True, target_os='ohos', target_cpu='arm64', os_level='standard', ignore_api_check=['xts', 'common', 'developertest'], scalable_build=False)[OHOS INFO] [70/80] ACTION //build/ohos/images:phone_vendor_image(//build/toolchain/ohos:ohos_clang_arm64)
[OHOS INFO] [71/80] STAMP obj/build/ohos/images/phone_userdata_image.stamp
[OHOS INFO] [72/80] STAMP obj/build/ohos/images/phone_vendor_image.stamp
[OHOS INFO] [73/80] ACTION //build/ohos/images:phone_system_image(//build/toolchain/ohos:ohos_clang_arm64)
[OHOS INFO] [74/80] STAMP obj/build/ohos/images/phone_system_image.stamp
[OHOS INFO] [75/80] ACTION //build/ohos/images:phone_ramdisk_image(//build/toolchain/ohos:ohos_clang_arm64)
[OHOS INFO] [76/79] ACTION //build/ohos/images:phone_updater_ramdisk_image(//build/toolchain/ohos:ohos_clang_arm64)
[OHOS INFO] [77/79] STAMP obj/build/ohos/images/phone_updater_ramdisk_image.stamp
[OHOS INFO] [78/79] STAMP obj/build/ohos/images/make_images.stamp
[OHOS INFO] [79/79] STAMP obj/build/core/gn/images.stamp
[OHOS INFO] tar: Removing leading `/' from member names
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/updater.img
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/vendor.img
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/Image
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/system.img
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/userdata.img
[OHOS INFO] /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/out/qemu-arm-linux/packages/phone/images/ramdisk.img
[OHOS INFO] part_name: access_token                                actual_size: 1084.47KB   standard_size: 2048KB     'rom' conform to the rules
[OHOS INFO] part_name: bytrace                                     actual_size: 0.0KB       standard_size: 114KB      'rom' conform to the rules
[OHOS INFO] part_name: c_utils                                     actual_size: 393.28KB                             This part does not set standard 'rom' size
[OHOS INFO] part_name: device_auth                                 actual_size: 252.37KB    standard_size: 500KB      'rom' conform to the rules
[OHOS INFO] part_name: device_manager                              actual_size: 377.67KB    standard_size: 2M         'rom' out of standard
[OHOS INFO] part_name: dsoftbus                                    actual_size: 3079.16KB   standard_size: 967KB      'rom' out of standard
[OHOS INFO] part_name: eventhandler                                actual_size: 122.97KB    standard_size: 500KB      'rom' conform to the rules
[OHOS INFO] part_name: faultloggerd                                actual_size: 790.47KB    standard_size: 1024KB     'rom' conform to the rules
[OHOS INFO] part_name: hdc                                         actual_size: 0.0KB       standard_size: 1725KB     'rom' conform to the rules
[OHOS INFO] part_name: hichecker_native                            actual_size: 14.7KB                               This part does not set standard 'rom' size
[OHOS INFO] part_name: hilog_native                                actual_size: 370.95KB    standard_size: 188KB      'rom' out of standard
[OHOS INFO] part_name: hilog_service                               actual_size: 0.0KB       standard_size: 460KB      'rom' conform to the rules
[OHOS INFO] part_name: hisysevent_native                           actual_size: 255.72KB                             This part does not set standard 'rom' size
[OHOS INFO] part_name: hitrace_native                              actual_size: 45.66KB                              This part does not set standard 'rom' size
[OHOS INFO] part_name: hiviewdfx_hilog_native                      actual_size: 0.0KB       standard_size: 188KB      'rom' conform to the rules
[OHOS INFO] part_name: huks                                        actual_size: 5646.47KB   standard_size: 5000KB     'rom' out of standard
[OHOS INFO] part_name: init                                        actual_size: 652.13KB                             This part does not set standard 'rom' size
[OHOS INFO] part_name: ipc                                         actual_size: 549.3KB     standard_size: 500KB      'rom' out of standard
[OHOS INFO] part_name: safwk                                       actual_size: 106.82KB    standard_size: 200KB      'rom' conform to the rules
[OHOS INFO] part_name: samgr                                       actual_size: 149.16KB    standard_size: 300KB      'rom' conform to the rules
[OHOS INFO] part_name: startup_l2                                  actual_size: 244.47KB                             This part does not set standard 'rom' size
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] cache hit (direct)  : 0
[OHOS INFO] cache hit (preprocessed)  : 0
[OHOS INFO] cache miss  : 21
[OHOS INFO] hit rate:  0.00%
[OHOS INFO] mis rate: 100.00%
[OHOS INFO] ---------------------------------------------
[OHOS INFO] c targets overlap rate statistics
[OHOS INFO] subsystem           files NO.       percentage      builds NO.      percentage      overlap rate
[OHOS INFO] third_party             1607        36.1%       1891        39.9%   1.18
[OHOS INFO] thirdparty              1607        36.1%       1891        39.9%   1.18
[OHOS INFO] commonlibrary             56        1.3%          56        1.2%    1.00
[OHOS INFO] communication            406        9.1%         406        8.6%    1.00
[OHOS INFO] customization              1        0.0%           1        0.0%    1.00
[OHOS INFO] developtools              55        1.2%          55        1.2%    1.00
[OHOS INFO] distributedhardware       21        0.5%          21        0.4%    1.00
[OHOS INFO] filemanagement             4        0.1%           4        0.1%    1.00
[OHOS INFO] hiviewdfx                187        4.2%         187        3.9%    1.00
[OHOS INFO] notification             139        3.1%         139        2.9%    1.00
[OHOS INFO] securec                   78        1.8%          78        1.6%    1.00
[OHOS INFO] security                 389        8.7%         389        8.2%    1.00
[OHOS INFO] startup                  178        4.0%         178        3.8%    1.00
[OHOS INFO] systemabilitymgr          37        0.8%          37        0.8%    1.00
[OHOS INFO] useriam                   23        0.5%          23        0.5%    1.00
[OHOS INFO]
[OHOS INFO] c overall build overlap rate: 1.06
[OHOS INFO]
[OHOS INFO]
[OHOS INFO] qemu-arm-linux build success
[OHOS INFO] cost time: 0:05:32
vm@vm:~/oh-3.2/OpenHarmony-v3.2-Release
vm@vm:~/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony$ hb env
[OHOS INFO] root path: /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony
[OHOS INFO] board: qemu-arm-linux
[OHOS INFO] kernel: None
[OHOS INFO] product: qemu-arm64-linux-min
[OHOS INFO] product path: /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/vendor/ohemu/qemu_arm64_linux_min
[OHOS INFO] device path: /home/vm/oh-3.2/OpenHarmony-v3.2-Release/OpenHarmony/device/board/qemu/qemu-arm-linux
[OHOS INFO] device company: qemu

相关文章:

Openharmony3.2 源码编译(ubuntu 22.04) 过程记录

OS: ubuntu 22.04 x64 1. 下载源码 1.1 安装码云repo工具 sudo apt install python3-pip git-lfsmkdir ~/bin curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o ~/bin/repo chmod ax ~/bin/repo pip3 install -i https://repo.huaweicloud.com/repository/p…...

PostgreSQL 数据库使用 psql 导入 SQL

最近我们有一个 SQL 需要导入到 PostgreSQL &#xff0c;但数据格式使用的是用&#xff1a; -- -- TOC entry 7877 (class 0 OID 21961) -- Dependencies: 904 -- Data for Name: upload_references; Type: TABLE DATA; Schema: public; Owner: - --COPY public.upload_refere…...

容器编排学习(三)端口映射与Harber镜像仓库介绍

一 对外发布服务&#xff08;端口映射&#xff09; 1 概述 新创建容器的IP 地址是随机的 容器在重启后每次 IP 都会发生变化 容器服务只有宿主机才能访问 如何才能使用容器对外提供稳定的服务? 容器端口可以与宿主机的端口进行映射绑定 从而把宿主机变成对应的服务&a…...

Day_13 > 指针进阶(2)

目录 1.函数指针数组 2.指向函数指针数组的指针 3.回调函数 qsort()函数 代码示例 void* 4.结束 今天我们在进阶指针的基础上&#xff0c;学习进阶指针的第二部分 1.函数指针数组 首先我们回顾一下指针数组 char* arr[5]://字符指针数组 - 数组 - 存放的是字符指针 in…...

对Transformer中的Attention(注意力机制)的一点点探索

摘要&#xff1a;本文试图对 Transformer 中的 Attention 机制进行一点点探索。并就 6 个问题深入展开。 ✅ NLP 研 1 选手的学习笔记 简介&#xff1a;小王&#xff0c;NPU&#xff0c;2023级&#xff0c;计算机技术 研究方向&#xff1a;文本生成、摘要生成 文章目录 一、为啥…...

车内信息安全技术-安全技术栈-软件安全

操作系统 1.隔离技术 信息安全中的隔离技术通常指的是将不同安全级别的信息或数据隔离开来,以保护敏感信息不受未授权的访问或泄露。在操作系统中,常见的隔离技术包括:虚拟化技术:通过虚拟化软件,将物理计算机分割成多个独立的虚拟计算机,每个虚拟计算机都可以运行独立的…...

Redis常见命令

命令可以查看的文档 http://doc.redisfans.com/ https://redis.io/commands/ 官方文档&#xff08;英文&#xff09; http://www.redis.cn/commands.html 中文 https://redis.com.cn/commands.html 个人推荐这个 https://try.redis.io/ redis命令在线测试工具 https://githubfa…...

Android Studio实现一笔画完小游戏

文章目录 一、项目概述二、开发环境三、详细设计3.1、数据库设计3.2、普通模式3.3、随机模式3.4、关卡列表 四、运行演示五、项目总结六、源码获取 一、项目概述 Android一笔画完是一种益智游戏&#xff0c;玩家需要从起点开始通过一条连续的线&#xff0c;将图形中所有的方块…...

【Python 程序设计】数据人员入门【02/8】

一、说明 介绍如何管理 Python 依赖项和一些虚拟环境最佳实践。 以下文章是有关 Python 数据工程系列文章的一部分&#xff0c;旨在帮助数据工程师、数据科学家、数据分析师、机器学习工程师或其他刚接触 Python 的人掌握基础知识。迄今为止&#xff0c;本初学者指南包括&#…...

学习笔记——树上哈希

普通子树哈希 树上的很多东西都是转化成链上问题的&#xff0c;比如树上哈希 树上哈希&#xff0c;主要是用于树的同构这个东西上的 什么是树的同构&#xff1f; 如图&#xff0c;不考虑节点编号&#xff0c;三棵树是同构的 将树转化成链&#xff0c;一般有两种方式&#xf…...

Opencv快速入门教程,Python计算机视觉基础

快速入门 OpenCV 是 Intel 开源计算机视觉库。它由一系列 C 函数和少量 C 类构成&#xff0c; 实现了图像处理和计算机视觉方面的很多通用算法。 OpenCV 拥有包括 300 多个 C 函数的跨平台的中、高层 API。它不依赖于其它的外部库——尽管也 可以使用某些外部库。 OpenCV 对非…...

laravel 报错误信息 Carbon\Exceptions\InvalidFormatException

Carbon\Exceptions\InvalidFormatException Unexpected data found. at vendor\nesbot\carbon\src\Carbon\Traits\Creator.php:687 683▕ return $instance; 684▕ } 685▕ 686▕ if (static::isStrictModeEnabled()) { ➜ 687…...

UI自动化之混合框架

什么是混合框架&#xff0c;混合框架就是将数据驱动与关键字驱动结合在一起&#xff0c;主要用来回归业务主流程&#xff0c;将核心流程串联起来。 上一篇我们写到了关键字驱动框架&#xff0c;关键字驱动框架是针对一个业务场景的单条测试用例的。 我们以163邮箱的登录到创建…...

SQL创建用户-非DM8.2环境(达梦数据库)

DM8:达梦数据库SQL创建用户-非DM8.2环境 环境介绍 环境介绍 在没有图形化界面&#xff0c;或者想快速创建用户&#xff0c;可以使用一下SQL语句&#xff1b;将其中的 CESHI 替换为要创建的用户名即可&#xff0c;默认创建了数据表空间&#xff0c;索引表空间&#xff0c;文件大…...

Thread类中run和start的区别

答&#xff1a;调用线程类中的 start 方法&#xff0c;才开始创建并启动线程&#xff0c;而线程被回收&#xff0c;则是要执行完线程的入口方法&#xff08;对于主线程来说&#xff0c;则是要执行完 main 方法&#xff09;&#xff0c;这里要回收线程则是要将&#xff08;&…...

ElementUI浅尝辄止35:Checkbox 多选框

一组备选项中进行多选 1.如何使用&#xff1f; 单独使用可以表示两种状态之间的切换&#xff0c;写在标签中的内容为 checkbox 按钮后的介绍。 //在el-checkbox元素中定义v-model绑定变量&#xff0c;单一的checkbox中&#xff0c;默认绑定变量的值会是Boolean&#xff0c;选…...

讲讲如何用IDEA开发java项目——本文来自AI创作助手

使用IDEA开发Java项目&#xff0c;您可以按照以下步骤进行操作&#xff1a; 下载并安装IntelliJ IDEA 您可以从JetBrains官网下载并安装最新版的IntelliJ IDEA。 创建项目 启动IDEA&#xff0c;在欢迎界面中选择“Create New Project”或者在主菜单中选择“File”->“Ne…...

Kafka3.0.0版本——消费者(Range分区分配策略以及再平衡)

目录 一、Range分区分配策略原理1.1、Range分区分配策略原理的示例一1.2、Range分区分配策略原理的示例二1.3、Range分区分配策略原理的示例注意事项 二、Range 分区分配策略代码案例2.1、创建带有4个分区的fiveTopic主题2.2、创建三个消费者 组成 消费者组2.3、创建生产者2.4、…...

WeiTools

目录 1.1 WeiTools 1.2 getTime 1.3 getImageView 1.4 StringEncode 1.4.1 // TODO Auto-generated catch block WeiTools package com.shrimp.xiaoweirobot.tools;...

目标检测数据集:医学图像检测数据集(自己标注)

1.专栏介绍 ✨✨✨✨✨✨目标检测数据集✨✨✨✨✨✨ 本专栏提供各种场景的数据集,主要聚焦:工业缺陷检测数据集、小目标数据集、遥感数据集、红外小目标数据集,该专栏的数据集会在多个专栏进行验证,在多个数据集进行验证mAP涨点明显,尤其是小目标、遮挡物精度提升明显的…...

【系统设计系列】数据库

系统设计系列初衷 System Design Primer&#xff1a; 英文文档 GitHub - donnemartin/system-design-primer: Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards. 中文版&#xff1a; https://github.com/donnemarti…...

mp4压缩视频不改变画质?跟我这样压缩视频大小

在当今数字化时代&#xff0c;视频文件变得越来越普遍&#xff0c;然而&#xff0c;这些文件通常都很大&#xff0c;给存储和传输带来了困难&#xff0c;为了解决这个问题&#xff0c;许多人都希望将视频压缩得更小&#xff0c;而又不牺牲画质&#xff0c;下面就来看看具体应该…...

AQS同步队列和等待队列的同步机制

理解AQS必须要理解同步队列和等待队列之间的同步机制&#xff0c;简单来说流程是&#xff1a; 获取锁失败的线程进入同步队列&#xff0c;成功的占用锁&#xff0c;占锁线程调用await方法进入条件等待队列&#xff0c;其他占锁线程调用signal方法&#xff0c;条件等待队列线程进…...

vue3实现无限循环滚动的方法;el-table内容无限循环滚动的实现

需求&#xff1a;vue3实现一个div内的内容无限循环滚动 方法一&#xff1a; <template><div idcontainer><div class"item" v-foritem in 5>测试内容{{{ item }}</div></div> </template><script setup> //封装一个方法…...

Windows 安装 MariaDB 数据库

之前一直使用 MySQL&#xff0c;使用 MySQL8.0 时候&#xff0c;占用内存比较大&#xff0c;储存空间好像也稍微有点大&#xff0c;看到 MariaDB 是用来代替 MySQL 的方案&#xff0c;之前用着也挺得劲&#xff0c;MySQL8.0 以上好像不能去导入低版本的 sql&#xff0c;或者需要…...

RK3568-mpp(Media Process Platform)媒体处理软件平台

第一章 MPP 介绍 1.1 概述 瑞芯微提供的媒体处理软件平台(Media Process Platform,简称 MPP)是适用于瑞芯微芯片系列的通用媒体处理软件平台。 该平台对应用软件屏蔽了芯片相关的复杂底层处理,其目的是为了屏蔽不同芯片的差异,为使用者提供统一的视频媒体处理接口(Medi…...

【ModelSim】使用终端命令行来编译、运行Verilog程序,创建脚本教程

▚ 01 ModelSim命令解说 &#x1f4e2; 这些命令是 ModelSim 中常用的命令&#xff0c;用于创建库、编译源代码和启动仿真。 &#x1f514; 在使用这些命令之前&#xff0c;你需要在 ModelSim 的命令行界面或脚本中执行 vlib 命令来创建一个库&#xff0c;然后使用 vlog 命令…...

腾讯云网站备案详细流程_审核时间说明

腾讯云网站备案流程先填写基础信息、主体信息和网站信息&#xff0c;然后提交备案后等待腾讯云初审&#xff0c;初审通过后进行短信核验&#xff0c;最后等待各省管局审核&#xff0c;前面腾讯云初审时间1到2天左右&#xff0c;最长时间是等待管局审核时间&#xff0c;网站备案…...

HTTP介绍:一文了解什么是HTTP

前言&#xff1a; 在当今数字时代&#xff0c;互联网已经成为人们生活中不可或缺的一部分。无论是浏览网页、发送电子邮件还是在线购物&#xff0c;我们都离不开超文本传输协议&#xff08;HTTP&#xff09;。HTTP作为一种通信协议&#xff0c;扮演着连接客户端和服务器的重要角…...

动态规划之子数组系列

子数组系列 1. 环形⼦数组的最⼤和2. 乘积最大子数组3. 等差数列划分4. 最长湍流子数组5. 单词拆分6. 环绕字符串中唯⼀的子字符串 1. 环形⼦数组的最⼤和 1.题目链接&#xff1a;环形⼦数组的最⼤和 2.题目描述&#xff1a;给定一个长度为 n 的环形整数数组 nums &#xff0c…...

重庆品牌网站建设公司哪家好/常见的网络推广方式

什么是几何变换&#xff08;Transform&#xff09; 在图形学中&#xff0c;主要有三种几何变换&#xff0c;分别是平移&#xff08;Translate&#xff09;&#xff0c;旋转&#xff08;Rotation&#xff09;和缩放&#xff08;Scaling&#xff09;。在D2D中&#xff0c;这三种变…...

南宁做棋牌网站的公司/广告投放都有哪些平台

本文来自&#xff1a;安卓航班网 1、创建工程&#xff1a;HandlerTest022、准备程序中需要的图片资源&#xff0c;将图片资源存放在res/drawable-mdpi目录下3、编写布局文件main.xml&#xff1a;代码如下&#xff1a; <?xml version"1.0" encoding"utf-8…...

静态网站建设/做销售最挣钱的10个行业

3 后台分类管理 3.1概述 到这里就开始讲解功能开发了。 开发整站的顺序&#xff0c;通常来说还是按照依赖性来进行&#xff0c;前端需要的数据&#xff0c;都要先通过后台的功能维护在数据库中&#xff0c;才可以拿到。 所以&#xff0c;先进行后台功能的开发&#xff0c;然后…...

哈尔滨做平台网站平台公司哪家好/公司网站设计与制作

K-means算法简介 K-means是机器学习中一个比较常用的算法&#xff0c;属于无监督学习算法&#xff0c;其常被用于数据的聚类&#xff0c;只需为它指定簇的数量即可自动将数据聚合到多类中&#xff0c;相同簇中的数据相似度较高&#xff0c;不同簇中数据相似度较低。 K-menas的优…...

网站功能列表/网络客服

已解决 4G内存条,显示只有2.99G 1、用readyfor 4G&#xff0c;破解后在系统属性和任务管理器可看到物理内存总数已经识别到4G。至于有没有用&#xff0c;各有说法。有人说稳定&#xff0c;破解后可以运行更多程序&#xff0c;有人说用了之后蓝屏.........鉴于有不稳定因素&…...

武汉建网站公司怎么样/郑州网站开发公司

freemarker使用时间类型注意事项 1、在配置文件中约束 freemarker的显示样式可以在配置文件中配置 <!-- 配置freemarker模板路径 --><bean id"freemarkerConfig" class"org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"…...