Using C++ 11's Smart Pointers

c++智能指针(smart pointer)详解 Smart Pointer Deal with c++11’s smart pointer facility. brief Smart pointers are class objects that behave like built-in pointers but also manage objects that you create with new so that you don’t 阅读详情

Using C++ 11’s Smart Pointers

This tutorial deals with C++ 11’s smart pointer, which consists unique_ptr, shared_ptr, and its partner, weak_ptr.
本文摘自David Kieras, EECS Department, University of Michigan,Using C++ 11’s Smart Pointers. 建议阅读原文

Concept of the C++ 11 Smart Pointers

Smart pointers are class objects that behave like bulit-in pointers but also manage objects that you create with new.

How to Access the C++ 11 Smart Pointers

In a C++ 11 implementation, the following #include is all that is needed

#include <memory>

Shared Ownership with shared_ptr


The shared_ptr class template is a refereced-counted smart pointer.
* managed object
* manager object

managed object & manager object

注释:在用new operator初始化一个shared_ptr时,会产生一个manager object来管理生成的managed object。


If the weak count is greater than zero, the manager object is kept. If the weak count is decremented to zero, and the shared count is also zero, the weak_ptr destructor deletes the manager object. Thus the managed object stays around as long as there are shared_ptrs pointing to it, and the manager object stays around as long as there are either shared_ptrs or weak_ptrs referring to it.


If the pointer and shared count are non-zero, then the managed object is still present, and weak_ptr can make the pointer to it available. This is done by a weak_ptr member function that creates and returns a new shared_ptr to the object; the new shared_ptr increments the shared count, which ensures that the managed object will stay in existence as long as necessary

Important restrictions in using shared_ptr and weak_ptr

  • You can only use these smart pointers to refer to objects allocated with new and that can be deleted with delete. No pointing to objects on the function call stack! Trying to delete them will cause a runtime error!. (basic rules, always create object with new operator when using smart pointers)
    注释:红色为批注

  • You must ensure that there is only one manager object for each managed object. You do this by writing your code so that when an object is first created, it is immediately given to a shared_ptr to manage , and any other shared_ptrs or weak_ptrs that are needed to point to that object are all directly or indirectly copied or assigned from that first shared_ptr. The customary way to ensure this is to write the new object expression as the argument for a shared_ptr constructor, or use the make_shared function template described below. (RAII, use a foolproof way to ensure you create smart pointers in right way)

  • If you want to get the full benefit of smart pointers, your code should avoid using raw pointers to refer to the same objects; otherwise it is too easy to have problems with dangling pointers or double deletions. In particular, smart pointers have a get() function that returns the pointer member variable as a built-in pointer value. This function is rarely needed. As much as possible, leave the built-in pointers inside the smart pointers and use only the smart pointers. (never use raw pointers when you wrap it with a smarter pointer, unless you have a good reason)
    注释:scott meyer的effective c++系列有讲到什么时候会用raw pointer.

Using shared_ptr

Basic use of shared_ptr

can be used as a call-by-value function argument or return value, or stored in containers. You can also reset a shared_ptr by assigning it the value nullptr, which is converted to an empty shared_ptr before the assignment (decrease count in advance, so may release memory in advance).
注释:下面是shared_ptr的基本用法。

#include <iostream>
#include <memory>

using namespace std;

class Widget {
public:
  void foo();
};

ostream& operator<< (ostream&, const Widget&);

// a function can return a shared_ptr
shared_ptr<Widget> bar();

// a function can take a shared_ptr by value
shared_ptr<Widget> do_something_with(shared_ptr<Widget> p);

void foo()
{
  shared_ptr<Widget> p1(new Widget());  // the new is in the shared_ptr constructor expression

  shared_ptr<Widget> p2 = p1;           // p1 and p2 now share ownership of the Widget

  shared_ptr<Widget> p3(new Widget());  // another Widget

  p1 = bar();                           // p1 may no longer pointer to the first thing

  do_something_with(p2);

  p3->foo();                            // call a member funtion like built-in pointer

  cout << *p2 << endl;                  // deference like built-in pointer

  p1.reset();                           // reset with a member funtion or assignment to nullptr

  p2 = nullptr;                         // convert nullptr to an empty shared_ptr, and decrement count
}
  • the only way to get a shared_ptr to take an address from a raw pointer is with the constructor
  • The only way you can get the raw pointer inside the manager object is with a member function, get() - there is no implicit conversion to the raw pointer type.
Inheritance and shared_ptr

The constructors and assignment operators in shared_ptr (and weak_ptr) are defined with templates so that if the built-in pointers could be validly copied or assigned, then the corresponding shared_ptrs can be also:

class Base {}; 

class Derived : public Base {}; 

shared_ptr<Derived> dp1(new Derived());

shared_ptr<Base> bp1 = dp1;
shared_ptr<Base> bp2(dp1);
shared_ptr<Base> bp3(new Derived());

Should define virtual base destructor
注释:shared_ptr与raw pointer基本有着相同的行为,这里跑题一下,绝对不要在数组中使用多态。

Casting shared_ptrs


C++11 supplies some function templates that provide a casting service corresponding to the built-in pointer casts. These functions internally call the get() function from the supplied pointer, perform the cast, and return a shared_ptr of the specified type.

shared_ptr<Base> base_ptr (new Base);

shared_ptr<Derived> derived_ptr;

 // if static_cast<Derived *>(base_ptr.get()) is valid, then the following is vaild:
derived_ptr = static_pointer_cast<Derived>(base_ptr);
Testing and comparing shared_ptrs

You can compare two shared_ptrs using the ==, !=, and < operators; they compare the internal raw pointers and so behave just like these operators between built-in pointers. In addition, a** shared_ptr provides a conversion to a bool**. (operator int() or may other…)

Getting better memory allocation performance
shared_ptr<Widget> p(new Widget());

There are actually ***two dynamic memory allocations*** that happen: one for the object itself from the new, and then a second for the manager object created by the shared_ptr constructor.

To address this problem, C++11 includes a function template make_shared that does a single memory allocation big enough to hold both the manager object and the new object, passing along any constructor parameters that you specify, and returns a shared_ptr of the specified type, which can then be used to initialize the shared_ptr that you are creating (with efficient move semantics).

So instead of:

shared_ptr<Thing> p(new Thing); // ouch - two allocations
you would write:
shared_ptr<Thing> p(make_shared<Thing>()); // only one allocation!

Using make_shared also avoids explicit use of new, promoted in the slogan “no naked new!” That is, if you are using shared_ptrs throughout a project, never writing new, and always using make_shared, is an easy way to make sure that all allocated objects are managed by shared_ptrs.

Using weak_ptr

You can’t dereference it; neither operator* nor operator-> is defined for a weak_ptr. You can’t access the pointer to the object with it - there is no get() function. There is a comparison function defined so that you can store weak_ptrs in an ordered container; but that’s all.

Initializing a weak_ptr

You can point a weak_ptr to an object only by copy or assignment from a shared_ptr or an existing weak_ptr to the object.
注释:以下是weak_ptr的用法,用weak_ptr可以解决shared_ptr环的问题,这个代码我会补上。

shared_ptr<Widegt> wp1(sp);         // construct wp1 from a shared_ptr
weak_ptr<Widegt> wp2;               // an empty weak_ptr - points to nothing
wp2 = sp;                           // wp2 now points to the new Widegt
weak_ptr<Widegt> wp3(wp2);          // construct wp3 from a weak_ptr
weak_ptr<Widegt> wp4;
wp4 = wp2;                          // wp4 now points to the new Widegt

You can use the reset() member function to set a weak_ptr back to the empty state in which it is pointing to nothing. (Unlike shared_ptr, you can’t reset a weak_ptr by assignment to nullptr)

Three ways to check a non-existent object
void do_it(weak_ptr<Widget> wp) {
    shared_ptr<Widget> sp = wp.lock();      // get shared_ptr from weak_ptr
    if(sp)
      sp->foo();
    else
      cout << "The Widget is gone!" << endl;
  }   

This is the most useful and common way to use a weak_ptr to access the object.注释:这个安全。
2.

bool is_it_there(weak_ptr<Widget> wp) {
  if(wp.expired()) {
    cout << "The thing is gone!" << endl;
    return false;
  } 
  return true
}

This approach is useful as a way to simply ask whether the pointed-to object still exists. Notice that if after calling expired(), the code goes on to use lock() to get a shared_ptr to the object, testing first for expired() is redundant and may actually be problematic.

3.
We can construct a shared_ptr from a weak_ptr; if the weak_ptr is expired, an exception is thrown, of type
std::bad_weak_ptr. This has its uses, but the first method is generally handier and more direct.

Unique Ownership with unique_ptr

What makes the ownership unique?

The unique ownership is enforced by disallowing (with =delete) copy construction and copy assignment.

Transferring ownership

**the move constructor and move assignment operator are defined for unique_ptr **so that they transfer ownership from the original owner to the new owner. After move construction, the newly created unique_ptr owns the object and the original unique_ptr owns nothing.

Explicit transfer of ownership between unique_ptrs
unique_ptr<Widget> p1(new Widget());          // p1 owns the Widget
unique_ptr<Widget> p2;                        // p2 owns nothing

// invoke move assignment explicitly
p2 = std::move(p1);                           // now p2 owns it, p1 onws nothing

// invoke move construction explicitly
unique_ptr<Widget> p3(std::move(p2));         // now p3 owns it, p2 and p1 own nothing

注释:使用uniqe_ptr是IMPL手法的一个良好实现,在move constructor中直接move所指向的资源,另外uniqe_ptr也可以替换copy-swap idiom,真是太棒了!

Using unique_ptr with Standard Containers
  • You must fill the container by supplying rvalue unique_ptrs, so the ownership transfers into the unique_ptr in the container. Either use an unnamed rvalue unique_ptr as the argument for the container inserting/filling function, or use std::move with a named unique_ptr.
  • If you erase an item in the container, you are destroying the unique_ptr, which will then delete the object it is pointing to.
  • If you empty, clear, or destroy the container, all of the pointed-to objects will be deleted because all the unique_ptrs will be destroyed.
  • If you transfer ownership out of container items, the empty unique_ptrs stay in the container. If you leave empty unique_ptrs in the container, your code will need to check for empty unique_ptrs before dereferencing them.
  • You can refer to an object by referring to the unique_ptr in the container without trying to copy or take it out of the container.
Conclusion

The most common use of unique_ptr is as a pretty fool-proof way of making sure an object allocated in a function (or class constructor) gets deleted. However, there are situations in which ownership of objects needs to be transferred around but always remains in one place at a time; unique_ptr gives you way to represent this concept directly.

基于MATLAB的太阳能光伏电力仿真,模拟每日太阳能发电,可视化功率曲线,并通过数值积分计算总能量输出。.zip 1.版本:matlab2014a/2019b/2024b 2.附赠案例数据可直接运行。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 立即下载

相关推荐

人脸识别签到考勤系统实战源码

这是一套可直接运行的人脸识别智能签到考勤系统,基于OpenCV YuNet人脸检测与SFace特征识别实现,全程本机运行,数据保存在本地SQLite,不上传任何服务器。配套交付完整Python源码、9章实战教程(md/html/pdf三种格式)、逐步骤操作截图和答辩PPT讲解。 系统围绕五个功能模块展开:人脸注册支持照片批量导入并提取特征入库;识别签到支持照片或摄像头两种方式,实时框出人脸并标注姓名、相似度与考勤状态;考勤规则引擎按config.py里配置的上下班时间与宽限分钟,自动判定迟到、早退、缺勤;Tkinter管理面板完成人员管理、流水查询与月度汇总;最后通过openpyxl一键导出整月考勤矩阵,正常绿、迟到黄、缺勤红,Excel打开即用。 选型上特意选了YuNet+SFace路线:纯pip安装免编译,CPU单帧识别不到100ms,两个ONNX模型共约37MB,出自OpenCV官方模型仓库,毕设报告引用有据可查。教程第7章整理了16条Windows下真实踩过的报错及排查方法,第8章给出换模型、换人脸、加功能的二次开发路径。 适合做计算机视觉方向毕设或课程设计的学生,也适合想给班级、实验室、小团队搭一套本地签到工具的Python学习者。运行环境为Python 3.9以上、Windows 10/11,不需要GPU。 使用时先pip install -r requirements.txt装齐依赖,再运行download_data.py下载模型,最后启动main.py即可进入图形界面;命令行register、recognize、report子命令也可脱离界面单独调用。

Jython_Using Jython in an IDE

In this chapter, we will discuss developing Jython applications using two of the most popular integrated development environments, Eclipse and Netbeans. There are many other development environments a

jiguanghoverli的专栏 3331

【无人机航测】MATLAB重叠率与地面分辨率协同设计:航线间距及飞行方向优化系统 MATLAB 无人机航测重叠率设计|地面分辨率与航线间距计算

内容概要:本文档介绍了基于MATLAB R2025b开发的无人机航测重叠率与航线间距计算系统,旨在通过建立统一的航测几何计算体系,实现重叠率、地面分辨率与航线间距的动态协同设计。系统结合相机参数、飞行参数、地形数据与风场信息,通过自动化候选航向搜索与多目标优化,选择兼顾覆盖质量、飞行效率与安全性的最优航线方向。项目涵盖从参数输入、摄影测量计算、地形与安全修正,到候选路线生成、综合评价与结果可视化的全流程,并构建了五万组模拟数据用于算法验证与模型训练,支持桌面交互、批量处理与服务化部署,适用于多种复杂场景下的无人机航测任务规划。 适合人群:具备一定MATLAB编程基础和摄影测量知识的科研人员、工程技术人员及高校师生,尤其适合从事无人机航测、地理信息系统(GIS)、遥感与测绘等相关领域的从业者。 使用场景及目标:① 实现无人机航测任务中地面分辨率与航线间距的精确计算与动态优化;② 解决复杂地形与风场环境下航线方向选择困难、覆盖质量难以保障的问题;③ 通过自动化设计减少人为经验依赖,提升航测任务的可靠性与效率;④ 为后续的三维建模、正射影像生成与灾害应急评估等应用提供高质量的数据基础。 阅读建议:建议读者结合文中提供的完整代码示例与GUI界面设计,逐步实践参数配置、模型计算与结果分析流程。重点关注摄影测量公式推导、地形修正策略与多目标优化算法的实现细节,并利用模拟数据进行敏感性分析与模型验证,以深入理解系统的设计理念与工程应用价值。

Using Top More Efficiently

摘自:http://www.linuxforums.org/articles/using-top-more-efficiently_89.html For desktop users, monitoring resource usage is an important task. By doing this, we can locate system bottleneck, planning

shenyan008的专栏 811

【电力负荷预测】项目介绍 MATLAB实现基于BO-Transformer-LSTM贝叶斯优化算法(BO)优化Transformer-LSTM组合模型进行居民用户多步电力负荷预测(含模型描述及部分示例

内容概要:本文介绍了一个基于BO-Transformer-LSTM的组合模型,用于实现居民用户多步电力负荷预测的完整项目实例。该模型融合Transformer的全局注意力机制与LSTM的局部时序记忆能力,构建能够捕捉长时依赖与周期性特征的深度学习架构,并引入贝叶斯优化(BO)自动搜索最优超参数组合,提升预测精度与训练效率。项目涵盖从原始数据清洗、特征工程、滑动窗口样本构建、模型设计到超参数优化、反归一化及多步误差评估的全流程,强调时间顺序划分以防止信息泄露,并通过周期编码、外生变量融合等方式增强数据表达能力。文中提供了详细的MATLAB代码示例,包括数据预处理、网络搭建、贝叶斯优化配置和预测结果评估等关键步骤。 适合人群:具备一定机器学习和时间序列分析基础,熟悉MATLAB编程环境,从事电力系统预测、智能电网、负荷管理等相关领域的研究人员、工程师及研究生。 使用场景及目标:①应用于居民级或多用户聚合负荷的短期至中期多步预测(如未来24小时);②服务于配电系统运行调度、需求响应基线设定、家庭能源管理系统优化、分布式能源协调控制等实际工程场景;③为科研提供可复现的深度学习+贝叶斯优化的技术路线参考。 阅读建议:此资源以实际项目为导向,建议读者结合提供的代码逐步实现并调试模型,重点关注数据质量控制、时间特征编码、组合网络结构设计与贝叶斯优化稳定性之间的协同关系,在实践中深入理解多步预测中的误差累积机制与超参数敏感性问题。

国央企创新负责人如何通过平台实现科研成果的快速识别与转化?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

Using the Rule-Based Optimizer

Although Oracle supports the rule-based optimizer, you should design new applications to use the cost-based optimizer (CBO). You should also use the CBO for data warehousing applications, becaus...

sstevencao的专栏 412

PotPlayer自用皮肤

自用 PotPlayer 皮肤,仅微调了字体大小与颜色,是按个人习惯调整,未做适配性调整。

Using gpg-agent Effectively

Usinggpg-agentEffectivel 有效的使用gpg代理 Mar 26, 2018 2018年3月26日 I’ve used GnuPG (or “GPG”) for years now, but until recently I had never bothered setting upgpg-agent. I’ve just never needed it. The...

ccmedu的博客 502

2-shell及常用命令-续.pdf

2-shell及常用命令-续.pdf

【顶级EI复现】基于KKT条件与分段解析优化的双有源桥DC-DC变换器软开关协同最小应力闭环控制方法(Simulink仿真实现)

内容概要:本文详细介绍了一种基于KKT(Karush-Kuhn-Tucker)最优性条件与分段解析优化技术的双有源桥(DAB)DC-DC变换器闭环控制方法,旨在实现软开关条件下器件电压和电流应力的协同最小化,从而提升变换器的转换效率与系统可靠性。该方法通过建立精确的数学模型,结合KKT条件进行优化求解,并采用分段解析策略提高实时控制性能,在Simulink环境中完成了完整的闭环控制系统建模与仿真验证。作为“顶级EI复现”级别的研究成果,内容涵盖控制算法设计、优化机制分析、仿真架构搭建及结果对比,具有较强的理论深度与工程应用价值,适用于电力电子高频化、高效化发展的前沿研究方向。; 适合人群:面向具备电力电子、自动控制或电气工程等相关专业背景,熟悉Simulink仿真平台,且从事科研工作1年以上的研究生、博士生及科研人员;特别适合致力于DC-DC变换器拓扑优化、软开关技术、最小化开关应力控制、能量高效传输等领域研究的专业人士。; 使用场景及目标:① 复现高水平EI期刊论文中的先进优化控制算法;② 掌握KKT条件在非线性约束优化问题中的具体应用;③ 深入理解DAB变换器在不同工况下的软开关实现机制与应力抑制策略;④ 构建高精度仿真模型以支撑学术论文撰写、科研项目申报或实际工程系统的控制方案设计。; 阅读建议:建议结合提供的Simulink仿真模型同步学习,重点关注KKT条件推导过程与分段解析优化模块的实现逻辑。由于内容涉及较强的数学建模与优化理论,推荐具备扎实的电路理论、现代控制理论及数值优化基础后再行研读,并可参考同系列“顶级EI复现”资源以构建系统性知识体系。

使用openssl加解密

https://gist.github.com/dreikanter/c7e85598664901afae03fedff308736b 对称加密: AES: openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

公众号shadow sock7 8416

交错并联图腾柱PFC变换器仿真设计(Simulink仿真实现)

内容概要:本文档系统性地介绍了基于Simulink平台的“交错并联图腾柱PFC变换器”仿真设计,聚焦于高效率功率因数校正技术的建模与实现。内容涵盖双闭环控制策略(电压外环与电流内环)、PI控制器设计、交错并联结构优化以及图腾柱拓扑的工作原理,旨在提升系统动态响应性能、降低输入电流谐波含量并改善功率因数。文档不仅提供详细的仿真模型构建流程,还配套Mathcad计算书用于参数设计与功率等级扩展,并列举了多种相关电力电子变换器的仿真案例,如三相维也纳整流器、LLC谐振变换器、双向Buck-Boost电路等,形成了一套完整的电力电子系统仿真资源体系,适用于从理论分析到工程实践的全流程学习与研究。; 适合人群:电气工程、自动化、电力电子及相关专业的高校本科生、研究生,以及从事新能源发电、电源设计、电能质量治理、工业自动化等领域的研发工程师;具备基本电路理论知识和Simulink/Matlab使用经验者更佳。; 使用场景及目标:①支持高校课程设计、毕业设计或科研项目中对先进PFC拓扑的仿真验证与性能优化;②帮助工程技术人员快速掌握图腾柱PFC的核心控制逻辑与建模方法,缩短产品开发周期;③作为电力电子系统教学与技术培训的标准化参考案例,强化理论与实践结合能力。; 其他说明:文档由“荔枝科研社”整理发布,所有资源可通过指定公众号或百度网盘链接获取,建议按照目录顺序系统学习,并结合提供的Mathcad计算书、参考文献及仿真文件进行参数验证与二次开发,以深化理解与应用能力。

SecureCRT® 远程连接不在同一个局域网的主机

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34198797的博客 612

立创电赛C题:基于STM32的三端口DC-DC变换器设计与MPPT算法实现

本文详细解析了2021年立创电赛C题——基于STM32的三端口DC-DC变换器设计。文章从题目要求出发,系统阐述了采用双DC-DC电路(分别负责MPPT追踪与稳压)的硬件架构,并重点讲解了以STM32为核心、结合PID控制与扰动观察法(MPPT算法)的软件实现方案,为备赛者提供了完整的软硬件设计思路与调试经验。

weixin_42588877的博客 224

【backtrader保姆级教学】投资组合回测

method1:探索投资组合的最有方案,使用蒙特卡洛模拟Markowitz模型。# 提取最小波动组合对应的权重, 并转换成Numpy数组。# 绘制收益-标准差的散点图,并用颜色描绘夏普比率。# 在收益-风险散点图中突出风险最小的点。:param any_day: 任意日期。# 将该点坐标显示在图中并保留四位小数。password = “替换密码”# 找到标准差最小数据的索引值。user = “替换账号”# 计算GMV投资组合收益。# 计算每项资产的夏普比率。# 设置无风险回报率为0。

weixin_38132951的博客 2315

惨遭 openssl 不同版本毒打的一天

``事情是这样的,是由一个加密的sql文件引发的惨案。 我被这些报错信息毒打了差不多8个小时,然后终于找到了答案,之所以写下来这篇文章,希望能帮到与我遭受同样痛苦的人。 先来看下这个文件: test.des3 里面是个sql文件 我的j解密环境为:Ubuntu18 然后我使用在网上找的解密命令为: dd if=文件名 | openssl des3 -d -k 文件的密码 | tar zxf - 然后我根据我的文件类型为des3输入了命令: dd if=test.des3 | openssl des3 -

weixin_44298740的博客 3077

STM32--基于STM32F103C8T6的OV7670摄像头显示

使用 STM32F103C8T6 微控制器驱动 OV7670 摄像头模组,并将图像数据显示在屏幕上,是嵌入式系统中常见的图像采集与显示应用。OV7670 是一款 CMOS VGA 图像传感器,具有高灵敏度、低电压等特点,适用于嵌入式应用。而 STM32F103C8T6 是一款常用的 MCU 控制器,具有丰富的管脚资源和较高的工作频率。

duierrorshuobu的博客 2145

智能指针

智能指针即是可以让程序员不用考虑释放的问题. auto_ptr 的实现如下, template class auto_ptr {   T* ptr;  public:     explicit auto_ptr(T* p =0) : ptr(p) {}    ~ auto_ptr()                      {delete ptr;}    T& operator*

云那边是海的专栏 909

Matlab双目相机标定

1 概述 现在有许多双目相机在出厂时就已经标定好了,用户拿到手后可以直接使用,例如Intel Realsense系列。但是有些相机出厂的时候并没有完成标定工作,因而这个时候就需要我们自己来标定。由于笔者曾改装过一个双目相机,最远可以测至50m,因此有一定的心得体会想给大家分享一下。本文主要介绍双目相机标定的整个过程,以及导出标定数据的方法。 相机标定主要分为手动标定和自动标定,手动标定比较繁琐,这里主要介绍基于matlab工具箱的自动标定方式来对双目相机进行标定。具体的相关标定细节也可以参照这篇博客:m

weixin_46133643的博客 2万+

SPMI协议学习总结

SPMI(System Power Management Interface)是由MIPI(Mobile Industry Processor Interface)联盟定义的一种硬件接口标准,它主要用于移动设备中,连接SoC(System on Chip)处理器系统的集成电源控制器与一个或多个电源管理IC(PMIC),以实现精确的电源管理

歌颂苦难的行为是无耻的; 1082

*** WARNING : deprecated key derivation used. Using -iter or -pbkdf2 would be better.

参考:https://unix.stackexchange.com/questions/507131/openssl-1-1-1b-warning-using-iter-or-pbkdf2-would-be-better-while-decrypting 加上-pbkdf2即可。 openssl aes-256-cbc -salt -pbkdf2 -in name -out name.aes openssl aes-256-cbc -d -salt -pbkdf2 -in name.aes -out na

已迁移至 https://seekstar.github.io/ 7836

NL2SQL实践系列(1):深入解析Prompt工程在text2sql中的应用技巧

NL2SQL实践系列(1):深入解析Prompt工程在text2sql中的应用技巧

丨汀、的博客 4327
上一篇: SVD & PCA
d_delete
博客等级 码龄14年 2粉丝 4原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值