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

linker list

linker list是利用lds 描述符实现同类型数据连续排布的一种机制。
下面是uboot里面的应用说明

lds文件里面需要增加section描述:

. = ALIGN(4);.u_boot_list : {KEEP(*(SORT(.u_boot_list*)));}

linker_list.h:

/* SPDX-License-Identifier: GPL-2.0+ */
/** include/linker_lists.h** Implementation of linker-generated arrays** Copyright (C) 2012 Marek Vasut <marex@denx.de>*/#ifndef __LINKER_LISTS_H__
#define __LINKER_LISTS_H__#include <linux/compiler.h>/** There is no use in including this from ASM files.* So just don't define anything when included from ASM.*/#if !defined(__ASSEMBLY__)/*** llsym() - Access a linker-generated array entry* @_type:	Data type of the entry* @_name:	Name of the entry* @_list:	name of the list. Should contain only characters allowed*		in a C variable name!*/
#define llsym(_type, _name, _list) \((_type *)&_u_boot_list_2_##_list##_2_##_name)/*** ll_entry_declare() - Declare linker-generated array entry* @_type:	Data type of the entry* @_name:	Name of the entry* @_list:	name of the list. Should contain only characters allowed*		in a C variable name!** This macro declares a variable that is placed into a linker-generated* array. This is a basic building block for more advanced use of linker-* generated arrays. The user is expected to build their own macro wrapper* around this one.** A variable declared using this macro must be compile-time initialized.** Special precaution must be made when using this macro:** 1) The _type must not contain the "static" keyword, otherwise the*    entry is generated and can be iterated but is listed in the map*    file and cannot be retrieved by name.** 2) In case a section is declared that contains some array elements AND*    a subsection of this section is declared and contains some elements,*    it is imperative that the elements are of the same type.** 3) In case an outer section is declared that contains some array elements*    AND an inner subsection of this section is declared and contains some*    elements, then when traversing the outer section, even the elements of*    the inner sections are present in the array.** Example:** ::**   ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {*           .x = 3,*           .y = 4,*   };*/
#define ll_entry_declare(_type, _name, _list)				\_type _u_boot_list_2_##_list##_2_##_name __aligned(4)		\__attribute__((unused,				\section(".u_boot_list_2_"#_list"_2_"#_name)))/*** ll_entry_declare_list() - Declare a list of link-generated array entries* @_type:	Data type of each entry* @_name:	Name of the entry* @_list:	name of the list. Should contain only characters allowed*		in a C variable name!** This is like ll_entry_declare() but creates multiple entries. It should* be assigned to an array.** ::**   ll_entry_declare_list(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {*        { .x = 3, .y = 4 },*        { .x = 8, .y = 2 },*        { .x = 1, .y = 7 }*   };*/
#define ll_entry_declare_list(_type, _name, _list)			\_type _u_boot_list_2_##_list##_2_##_name[] __aligned(4)		\__attribute__((unused,				\section(".u_boot_list_2_"#_list"_2_"#_name)))/** We need a 0-byte-size type for iterator symbols, and the compiler* does not allow defining objects of C type 'void'. Using an empty* struct is allowed by the compiler, but causes gcc versions 4.4 and* below to complain about aliasing. Therefore we use the next best* thing: zero-sized arrays, which are both 0-byte-size and exempt from* aliasing warnings.*//*** ll_entry_start() - Point to first entry of linker-generated array* @_type:	Data type of the entry* @_list:	Name of the list in which this entry is placed** This function returns ``(_type *)`` pointer to the very first entry of a* linker-generated array placed into subsection of .u_boot_list section* specified by _list argument.** Since this macro defines an array start symbol, its leftmost index* must be 2 and its rightmost index must be 1.** Example:** ::**   struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);*/
#define ll_entry_start(_type, _list)					\
({									\static char start[0] __aligned(4) __attribute__((unused,	\section(".u_boot_list_2_"#_list"_1")));			\(_type *)&start;						\
})/*** ll_entry_end() - Point after last entry of linker-generated array* @_type:	Data type of the entry* @_list:	Name of the list in which this entry is placed*		(with underscores instead of dots)** This function returns ``(_type *)`` pointer after the very last entry of* a linker-generated array placed into subsection of .u_boot_list* section specified by _list argument.** Since this macro defines an array end symbol, its leftmost index* must be 2 and its rightmost index must be 3.** Example:** ::**   struct my_sub_cmd *msc = ll_entry_end(struct my_sub_cmd, cmd_sub);*/
#define ll_entry_end(_type, _list)					\
({									\static char end[0] __aligned(4) __attribute__((unused,		\section(".u_boot_list_2_"#_list"_3")));			\(_type *)&end;							\
})
/*** ll_entry_count() - Return the number of elements in linker-generated array* @_type:	Data type of the entry* @_list:	Name of the list of which the number of elements is computed** This function returns the number of elements of a linker-generated array* placed into subsection of .u_boot_list section specified by _list* argument. The result is of an unsigned int type.** Example:** ::**   int i;*   const unsigned int count = ll_entry_count(struct my_sub_cmd, cmd_sub);*   struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);*   for (i = 0; i < count; i++, msc++)*           printf("Entry %i, x=%i y=%i\n", i, msc->x, msc->y);*/
#define ll_entry_count(_type, _list)					\({								\_type *start = ll_entry_start(_type, _list);		\_type *end = ll_entry_end(_type, _list);		\unsigned int _ll_result = end - start;			\_ll_result;						\})/*** ll_entry_get() - Retrieve entry from linker-generated array by name* @_type:	Data type of the entry* @_name:	Name of the entry* @_list:	Name of the list in which this entry is placed** This function returns a pointer to a particular entry in linker-generated* array identified by the subsection of u_boot_list where the entry resides* and it's name.** Example:** ::**   ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub) = {*           .x = 3,*           .y = 4,*   };*   ...*   struct my_sub_cmd *c = ll_entry_get(struct my_sub_cmd, my_sub_cmd, cmd_sub);*/
#define ll_entry_get(_type, _name, _list)				\({								\extern _type _u_boot_list_2_##_list##_2_##_name;	\_type *_ll_result =					\&_u_boot_list_2_##_list##_2_##_name;		\_ll_result;						\})/*** ll_start() - Point to first entry of first linker-generated array* @_type:	Data type of the entry** This function returns ``(_type *)`` pointer to the very first entry of* the very first linker-generated array.** Since this macro defines the start of the linker-generated arrays,* its leftmost index must be 1.** Example:** ::**   struct my_sub_cmd *msc = ll_start(struct my_sub_cmd);*/
#define ll_start(_type)							\
({									\static char start[0] __aligned(4) __attribute__((unused,	\section(".u_boot_list_1")));				\(_type *)&start;						\
})/*** ll_end() - Point after last entry of last linker-generated array* @_type:	Data type of the entry** This function returns ``(_type *)`` pointer after the very last entry of* the very last linker-generated array.** Since this macro defines the end of the linker-generated arrays,* its leftmost index must be 3.** Example:** ::**   struct my_sub_cmd *msc = ll_end(struct my_sub_cmd);*/
#define ll_end(_type)							\
({									\static char end[0] __aligned(4) __attribute__((unused,		\section(".u_boot_list_3")));				\(_type *)&end;							\
})#endif /* __ASSEMBLY__ */#endif	/* __LINKER_LISTS_H__ */

ll_entry_declare_list 和ll_entry_declare差别是前者是数组声明,一次可以声明多个条目,后者只声明(定义)一个条目。

ll_entry_start(_type, _list) 获取该类型列表首个条目地址

ll_entry_get(_type, _name, _list) 根据名字 返回条目地址

ll_entry_count(_type, _list) 返回该类型条目数

使用实例

参考driver的定义:

struct driver {char *name;enum uclass_id id;const struct udevice_id *of_match;int (*bind)(struct udevice *dev);int (*probe)(struct udevice *dev);int (*remove)(struct udevice *dev);int (*unbind)(struct udevice *dev);int (*ofdata_to_platdata)(struct udevice *dev);int (*child_post_bind)(struct udevice *dev);int (*child_pre_probe)(struct udevice *dev);int (*child_post_remove)(struct udevice *dev);int priv_auto_alloc_size;int platdata_auto_alloc_size;int per_child_auto_alloc_size;int per_child_platdata_auto_alloc_size;const void *ops;	/* driver-specific operations */uint32_t flags;
};/* Declare a new U-Boot driver */
#define U_BOOT_DRIVER(__name)						\ll_entry_declare(struct driver, __name, driver)

usb hub driver

U_BOOT_DRIVER(usb_generic_hub) = {
.name = “usb_hub”,
.id = UCLASS_USB_HUB,
.of_match = usb_hub_ids,
.flags = DM_FLAG_ALLOC_PRIV_DMA,
};

相关文章:

linker list

linker list是利用lds 描述符实现同类型数据连续排布的一种机制。 下面是uboot里面的应用说明 lds文件里面需要增加section描述&#xff1a; . ALIGN(4);.u_boot_list : {KEEP(*(SORT(.u_boot_list*)));}linker_list.h: /* SPDX-License-Identifier: GPL-2.0 */ /** include…...

[CUDA手搓]从零开始用C++ CUDA搭建一个卷积神经网络(LeNet),了解神经网络各个层背后算法原理

文章目录 前言一、所需环境二、实现思路2.1. 定义了LeNet网络模型结构&#xff0c;并训练了20次2.2 以txt格式导出训练结果(模型的各个层权重偏置等参数)2.3 (可选)以pth格式导出训练结果&#xff0c;以方便后期调试2.4 C CUDA要做的事 三、C CUDA具体实现3.1 新建.cu文件并填好…...

【开源】基于JAVA+Vue+SpringBoot的数据可视化的智慧河南大屏

目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块三、系统展示四、核心代码4.1 数据模块 A4.2 数据模块 B4.3 数据模块 C4.4 数据模块 D4.5 数据模块 E 五、免责说明 一、摘要 1.1 项目介绍 基于JAVAVueSpringBootMySQL的数据可视化的智慧河南大屏&#xff0c;包含了GDP、…...

页面单跳转换率统计案例分析

需求说明 页面单跳转化率 计算页面单跳转化率&#xff0c;什么是页面单跳转换率&#xff0c;比如一个用户在一次 Session 过程中访问的页面路径 3,5,7,9,10,21&#xff0c;那么页面 3 跳到页面 5 叫一次单跳&#xff0c;7-9 也叫一次单跳&#xff0c; 那么单跳转化率就是要统计…...

眸思MouSi:“听见世界” — 用多模态大模型点亮盲人生活

文章目录 1. Introduction1.1 APP细节展示2. Demo2.1 论文链接2.2 联系方式3. Experiment3.1 多专家的结合是否有效?3.2 如何更好的将多专家整合在一起?Reference让盲人听见世界,复旦眸思大模型打破视觉界限,用科技点亮新生活 1. Introduction 在这个世界上,视力是探索万…...

电商小程序05用户注册

目录 1 搭建页面2 设置默认跳转总结 我们上一篇拆解了登录功能&#xff0c;如果用户没有账号就需要注册了。本篇我们介绍一下注册功能的实现。 1 搭建页面 打开应用&#xff0c;点击左上角的新建页面 输入页面的名称&#xff0c;用户注册 删掉网格布局&#xff0c;添加表单容…...

什么是UI设计?

用户界面&#xff08;UI&#xff09;它是人与机器互动的载体&#xff0c;也是用户体验&#xff08;UX&#xff09;一个组成部分。用户界面由视觉设计 (即传达产品的外观和感觉) 和交互设计 (即元素的功能和逻辑组织) 两部分组成。用户界面设计的目标是创建一个用户界面&#xf…...

React 实现表单组件

表单是html的基础元素&#xff0c;接下来我会用React实现一个表单组件。支持包括输入状态管理&#xff0c;表单验证&#xff0c;错误信息展示&#xff0c;表单提交&#xff0c;动态表单元素等功能。 数据状态 表单元素的输入状态管理&#xff0c;可以基于react state 实现。 …...

PlantUML绘制UML图教程

UML&#xff08;Unified Modeling Language&#xff09;是一种通用的建模语言&#xff0c;广泛用于软件开发中对系统进行可视化建模。PlantUML是一款强大的工具&#xff0c;通过简单的文本描述&#xff0c;能够生成UML图&#xff0c;包括类图、时序图、用例图等。PlantUML是一款…...

自学Python第二十二天- Django框架(六) django的实用插件:cron、APScheduler

django-crontab 和 django-cron 有时候需要django在后台不断的执行一个任务&#xff0c;简单的可以通过中间件来实现&#xff0c;但是中间件是根据请求触发的。如果需要定时执行任务&#xff0c;则需要使用到一些插件。 django-crontab 和 django-cron 是常用的用于处理定时任…...

医院挂号预约|医院挂号预约小程序|基于微信小程序的医院挂号预约系统设计与实现(源码+数据库+文档)

医院挂号预约小程序目录 目录 基于微信小程序的医院挂号预约系统设计与实现 一、前言 二、系统功能设计 三、系统实现 1、小程序用户端 2、系统服务端 &#xff08;1&#xff09; 用户管理 &#xff08;2&#xff09;医院管理 &#xff08;3&#xff09;医生管理 &…...

网络选择流程分析(首选网络类型切换流程)

首先是界面,我在此平台的界面如下: 对应的入口源码位置在Settings的UniEnabledNetworkModePreferenceController中,当然其他平台可能在PreferredNetworkModePreferenceController中,流程上都是大同小异 然后点击切换按钮会调用到UniEnabledNetworkModePreferenceControlle…...

AutoSAR(基础入门篇)6.1-Vector的汽车电子开发工具链简介

目录 前言 一、PREEvision 二、vVIRTUALtarget 三、DaVinci 四、CANoe 五、CANape 其他 前言 因为国内用...

TI的电量计驱动在卸载时导致Linux卡死

背景 最近移植TI电量计芯片bq40z50的驱动&#xff0c;移植完毕后&#xff0c;能正常读取电池信息了&#xff0c;但是无意中发现驱动卸载会导致Linux卡死&#xff0c;死前终端闪过大量打印&#xff0c;将putty的缓冲区都耗尽了&#xff0c;必须启用syslog转发并用visual syslog…...

使用yolo训练自己的模型

YOLO&#xff08;You Only Look Once&#xff09;是一种用于目标检测的深度学习模型&#xff0c;旨在实时检测图像或视频中的多个对象。与传统的目标检测方法不同&#xff0c;YOLO一次性处理整个图像&#xff0c;而不是通过滑动窗口或区域提议进行多次检测。这种方法使得YOLO在…...

堆的概念实现

前言 本文将详细讲解堆。堆是一种二叉树&#xff08;一般是完全二叉树&#xff09;使用顺序结构的数组来存储。 tip&#xff1a;这里我们需要注意区分堆在不同地方的含义&#xff0c;这里的堆是一个数据结构&#xff0c;操作系统虚拟进程地址空间的堆是操作系统中管理内存的一块…...

Redis(三)主从架构、Redis哨兵架构、Redis集群方案对比、Redis高可用集群搭建、Redis高可用集群之水平扩展

转自 极客时间 Redis主从架构 redis主从架构搭建&#xff0c;配置从节点步骤&#xff1a; 1、复制一份redis.conf文件2、将相关配置修改为如下值&#xff1a; port 6380 pidfile /var/run/redis_6380.pid # 把pid进程号写入pidfile配置的文件 logfile "6380.log" …...

pnpm + vite 从外网迁移到内网环境开发

离线安装pnpm 在有外网的机器上执行以下命令&#xff0c;下载pnpm的tgz压缩包至桌面&#xff0c;注意下载版本和当前使用版本保持一致 npm pack -g pnpm7.4.0 --pack-destination ~/Desktop将tgz压缩包拷贝至离线机器在离线机器中执行命令 npm -g i /home/user/offline/pnpm…...

寒假作业7

sql语句 创建表格 create table 表名 &#xff08;字段名 数据类型&#xff0c;字段名 数据类型&#xff09; create table if not exists 表名 &#xff08;字段名 数据类型&#xff0c; 字段名 数据类型&#xff09; 删除表格 drop table 表名&#xff1b; 插入记录 全字…...

【0257】关于pg内核shared cache invalidation messages (概念篇)

文章目录 1. inval messages2. 可配置参数(Configurable parameters)1. inval messages 所谓“共享缓存无效消息(shared cache invalidation messages)”,从概念上讲,共享缓存无效消息存储在一个无限数组中,其中maxMsgNum是存储提交消息的下一个数组下标, minMsgNum是…...

Nginx 缓存集成、清除、设置不缓存资源

文章目录 前言1. web缓存服务1.1 原理1.2 指令1.2.1 proxy_cache_path1.2.2 proxy_cache1.2.3 proxy_cache_key1.2.4 proxy_cache_valid1.2.5 proxy_cache_min_uses1.2.6 proxy_cache_methods 2. 缓存案例3. 缓存的清除3.1 删除对应的缓存目录3.2 使用第三方扩展模块ngx_cache_…...

C++面试宝典第27题:完全平方数之和

题目 给定正整数 n,找到若干个完全平方数(比如:1、4、9、16、...),使得它们的和等于n。你需要让组成和的完全平方数的个数最少。 示例1: 输入:n = 12 输出:3 解释:12 = 4 + 4 + 4。 示例2: 输入:n = 13 输出:2 解释:13 = 4 + 9。 解析 这道题主要考察应聘者对于…...

webrtc native api的几个要点

文章目录 基本流程状态回调类sdp的中媒体行pc对象 基本流程 webrtc native的接口&#xff0c;主要就是围绕着PeerConnection对象&#xff0c;一个PeerConnection对象它代表了一次音视频会话。 那么通过PeerConnection对象建立音视频通话&#xff0c;包括如下步骤&#xff1a; …...

MinMaxScaler, StandardScaler数据预处理中常用的两种缩放方法,用于将数据标准化或归一化到特定的范围或分布

MinMaxScaler 和 StandardScaler 是数据预处理中常用的两种缩放方法&#xff0c;用于将数据标准化或归一化到特定的范围或分布。这两种缩放方法的主要区别在于它们的目标和实现方式。 MinMaxScaler MinMaxScaler 会将数据缩放到一个指定的范围&#xff0c;通常是 [0, 1] 或 […...

【Web】vulhub Shiro-550反序列化漏洞复现学习笔记

目录 Shiro简介 复现流程 工具一把梭 半脚本半手动 原理分析 反序列化入口 常见的key 登录过程 验证过程 利用原理 Shiro简介 Apache Shiro 是一个强大且易于使用的 Java 安全框架&#xff0c;用于身份验证、授权、加密和会话管理等安全功能。Shiro 的设计目标是简单…...

【论文精读】多模态情感分析 —— VLP-MABSA

Vision-Language Pre-Training for Multimodal Aspect-Based Sentiment Analysis 本篇论文发表于ACL-2022 原文链接 https://arxiv.org/abs/2204.07955 源码 GitHub - NUSTM/VLP-MABSA 模态&#xff1a;图像文本 基于多模态方面的情感分析(MABSA)近年来越来越受到关注。然而&am…...

SQL SELECT TOP, LIMIT, ROWNUM 子句

在数据库中&#xff0c;LIMIT是一个用于限制结果集的关键字&#xff0c;它可以与SELECT语句一起使用。它有以下几种用法&#xff1a; LIMIT n&#xff1a;返回前n条记录。例如&#xff0c;LIMIT 10将返回结果集中的前10条记录。 LIMIT m, n&#xff1a;返回从第m1条记录开始的…...

金融信贷风控评分卡模型

评分卡模型概念 评分模型是根据借款人的历史数据&#xff0c;选取不同维度的数据类型&#xff0c;通过计算而得出的对借款人信用情况打分的模型。不同等级的信用分数代表了借款人信用情况的好坏&#xff0c;以此来分析借款人按时还款的可能性。 评分卡模型分类 A卡&#xff…...

【java苍穹外卖项目实战二】苍穹外卖环境搭建

文章目录 1、前端环境搭建2、后端环境搭建1、项目结构搭建2、Git版本控制3、数据库创建 开发环境搭建主要包含前端环境和后端环境两部分。 前端的页面我们只需要导入资料中的nginx&#xff0c; 前端页面的代码我们只需要能看懂即可。 1、前端环境搭建 前端运行环境的nginx&am…...

在 Ubuntu 22.04 上安装 Django Web 框架的方法

简介 Django 是一个功能齐全的 Python Web 框架&#xff0c;用于开发动态网站和应用程序。使用 Django&#xff0c;您可以快速创建 Python Web 应用程序&#xff0c;并依赖框架来完成大部分繁重的工作。 在本指南中&#xff0c;您将在 Ubuntu 22.04 服务器上启动 Django。安装…...

JVM Java虚拟机入门指南

文章目录 为什么学习JVMJVM的执行流程JVM的组成部分类加载运行时数据区本地方法接口执行引擎 垃圾回收什么样的对象是垃圾呢内存溢出和内存泄漏定位垃圾的方法对象的finalization机制垃圾回收算法分代回收垃圾回收器 JVM调优参数JVM调优工具Java内存泄漏排查思路CPU飙高排查方案…...

【错误文档】This与Here的区别、主系表结构、如何合并两个句子、祈使句结构

目录 This与Here的区别 主系表结构 如何合并两个句子 祈使句结构 原句中文1&#xff1a; “就是这件。” 我的翻译&#xff1a; This is it. 正确翻译&#xff1a; 书上原句&#xff1a; Here it is! 正确解释&#xff1a; 两个翻译都对&#xff0c;只是强调点不同&…...

Java入门之JavaSe(韩顺平p1-p?)

学习背景&#xff1a; 本科搞过一段ACM、研究生搞了一篇B会后&#xff0c;本人在研二要学Java找工作啦~~&#xff08;宇宙尽头是Java&#xff1f;&#xff09;爪洼纯小白入门&#xff0c;C只会STL、python只会基础Pytorch、golang参与了一个Web后端项目&#xff0c;可以说项目小…...

TCP的连接和断开详解

目录 1.TCP基础知识 1.1.TCP 头格式 1.2.TCP协议介绍 1.3.UDP协议介绍 1.4.TCP 和 UDP 区别 1.5.TCP 和 UDP 应用场景 1.6.计算机网络相关术语&#xff08;缩写&#xff09; 2.TCP 连接建立&#xff1a;三次握手 2.1.TCP 三次握手过程 2.2.三次握手原理 2.3.异常分析…...

armbian ddns

参考https://mp.weixin.qq.com/s/0Uu_nbGH_W6vAYHPH4kHqg Releases jeessy2/ddns-go GitHub mkdir -p /usr/local/ddns-go cd /usr/local/ddns-gowget https://github.com/jeessy2/ddns-go/releases/download/v6.1.1/ddns-go_6.1.1_freebsd_armv7.tar.gztar zxvf ddns-go_…...

MQTT 服务器(emqx)搭建及使用

推荐阅读&#xff1a; MQTT 服务器(emqx)搭建及使用 - 哔哩哔哩 (bilibili.com) 一、EMQX 服务器搭建 1、下载EMQX https://www.emqx.com/zh/try?productbroker 官方中文手册&#xff1a; EMQX Docs 2、安装使用 1、该软件为绿色免安装版本&#xff0c;解压缩后即安装完…...

【flink状态管理(四)】MemoryStateBackend的实现

文章目录 1.基于MemoryStateBackend创建KeyedStateBackend1.1. 状态初始化1.2. 创建状态 2. 基于MemoryStateBackend创建OperatorStateBackend3.基于MemoryStateBackend创建CheckpointStorage 在Flink中&#xff0c;默认的StateBackend实现为MemoryStateBackend&#xff0c;本文…...

前端架构: 脚手架在前端研发流程中的意义

关于脚手架 脚手架又被成为 CLI (command-line interface)基于文本界面&#xff0c;通过中断输入命令执行常见的脚手架&#xff1a;npm, webpack-cli, vue-cli拿 npm 这个脚手架来说 在终端当中输入 npm 命令, 系统就会通过文本方式返回 npm 的使用方法它这种通过命令行执行的…...

Qt网络编程-QTcpServer的封装

简单封装Tcp服务器类&#xff0c;将QTcpServer移入线程 头文件&#xff1a; #ifndef TCPSERVER_H #define TCPSERVER_H#include <QObject>class QTcpSocket; class QTcpServer; class QThread; class TcpServer : public QObject {Q_OBJECT public:explicit TcpServer(…...

【MySQL】_JDBC编程

目录 1. JDBC原理 2. 导入JDBC驱动包 3. 编写JDBC代码实现Insert 3.1 创建并初始化一个数据源 3.2 和数据库服务器建立连接 3.3 构造SQL语句 3.4 执行SQL语句 3.5 释放必要的资源 4. JDBC代码的优化 4.1 从控制台输入 4.2 避免SQL注入的SQL语句 5. 编写JDBC代码实现…...

微信小程序编译出现 project.config.json 文件内容错误

问题描述&#xff1a; 更新微信开发工具后&#xff0c;使用微信开发工具编译时出现project.config.json 文件内容错误。 原因&#xff1a;当前使用的微信开发工具非稳定版本。 解决方法&#xff1a; 在 manifest.json中加入以下代码&#xff1a; "mp-weixin" : …...

一周学会Django5 Python Web开发-Django5创建项目(用命令方式)

锋哥原创的Python Web开发 Django5视频教程&#xff1a; 2024版 Django5 Python web开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili2024版 Django5 Python web开发 视频教程(无废话版) 玩命更新中~共计11条视频&#xff0c;包括&#xff1a;2024版 Django5 Python we…...

DockerUI如何部署结合内网穿透实现公网环境管理本地docker容器

文章目录 前言1. 安装部署DockerUI2. 安装cpolar内网穿透3. 配置DockerUI公网访问地址4. 公网远程访问DockerUI5. 固定DockerUI公网地址 前言 DockerUI是一个docker容器镜像的可视化图形化管理工具。DockerUI可以用来轻松构建、管理和维护docker环境。它是完全开源且免费的。基…...

UML之在Markdown中使用Mermaid绘制类图

1.UML概述 UML&#xff08;Unified modeling language UML&#xff09;统一建模语言&#xff0c;是一种用于软件系统分析和设计的语言工具&#xff0c;它用于帮助软件开发人员进行思考和记录思路。 类图是描述类与类之间的关系的&#xff0c;是UML图中最核心的。类图的是用于…...

Spring Boot + 七牛OSS: 简化云存储集成

引言 Spring Boot 是一个非常流行的、快速搭建应用的框架&#xff0c;它无需大量的配置即可运行起来&#xff0c;而七牛云OSS提供了稳定高效的云端对象存储服务。利用两者的优势&#xff0c;可以为应用提供强大的文件存储功能。 为什么选择七牛云OSS? 七牛云OSS提供了高速的…...

C++:二叉搜索树模拟实现(KV模型)

C&#xff1a;二叉搜索树模拟实现&#xff08;KV模型&#xff09; 前言模拟实现KV模型1. 节点封装2、前置工作&#xff08;默认构造、拷贝构造、赋值重载、析构函数等&#xff09;2. 数据插入&#xff08;递归和非递归版本&#xff09;3、数据删除&#xff08;递归和非递归版本…...

npm淘宝镜像源换新地址

新的淘宝npm镜像源地址&#xff1a;https://registry.npmmirror.com 切换新的镜像源 npm config set registry https://registry.npmmirror.com然后再执行以下操作查看是否成功 npm config list如果没安装过淘宝镜像源的&#xff0c;则直接安装 npm install -g cnpm --regi…...

十大排序算法之线性时间非比较类排序

线性时间非比较类排序 线性时间的算法执行效率也较高&#xff0c;从时间占用上看&#xff0c;线性时间非比较类排序要优于非线性时间排序&#xff0c;但其空间复杂度较非线性时间排序要大一些。因为线性时间非比较类排序算法会额外申请一定的空间进行分配排序&#xff0c;这也…...

容器基础:Docker 镜像如何保证部署的一致性?

Docker 镜像如何通过固化基础环境、固化依赖性和固化软件启动流程保证部署的一致性 Docker 镜像通过以下三个方面保证部署的一致性&#xff1a; 1. 固化基础环境: 镜像包含构建应用程序所需的所有环境依赖项&#xff0c;例如操作系统、库和工具。构建镜像时&#xff0c;所有…...

爪哇部落算法组2024新生赛热身赛题解

第一题&#xff08;签到&#xff09;&#xff1a; 1、题意&#xff1a; 2、题解: 我们观察到happynewyear的长度是12个字符&#xff0c;我们直接从前往后遍历0到n - 12的位置&#xff08;这里索引从0开始&#xff09;&#xff0c;使用C的substr()函数找到以i开头的长度为12的字…...