- 博客(363)
- 资源 (119)
- 收藏
- 关注
原创 领域驱动设计:软件核心复杂性应对之道
如果整个程序设计或者其核心部分没有与领域模型相对应,那么这个模型就是没有价值的,软件的正确性也值得怀疑。同时,模型和设计功能之间过于复杂的对应关系也是难于理解的,在实际项目中,当设计改变时也无法维护这种关系。若分析与和设计之间产生严重分歧,那么在分析和设计活动中所获得的知识就无法彼此共享。软件系统各个部分的设计应该忠实地反映领域模型,以便体现出这二者之间的明确对应关系。我们应该反复检查并修改模型,以便软件可以更加自然地实现模型,即使想让模型反映出更深层次的领域概念时也应如此。
2024-09-04 19:25:40 354
原创 C++ Annotations Version 12.5.0 学习(7)
当从模板类Binops继承类时,使用 CRTP(Curiously Recurring Template Pattern),运算符被定义为接受类型的参数,即基类接收其派生类作为模板参数。因此,Binops类以及额外的运算符都定义为期望} // 对于 Binops &&lhs 的类似实现const} // 对于 Binops &&lhs 的类似实现// 对于 Binops &&lhs 的类似实现这样,一个从Binops。
2024-08-23 16:00:31 867
原创 C++ Annotations Version 12.5.0 学习(6)
类模板和嵌套当一个类嵌套在类模板中时,它会自动成为一个类模板。嵌套类可以使用外围类的模板参数,如下例所示。类 PtrVector 中定义了一个嵌套类 iterator。嵌套类从其外围类 PtrVector<Type> 中获取信息。由于这个外围类应是唯一构造其迭代器的类,因此 iterator 的构造函数被定义为私有,并且外围类 PtrVector<Type> 被授予对 iterator 私有成员的访问权限。以下是 PtrVector 类接口的初始部分:template <t
2024-08-23 12:37:49 423
原创 C++ Annotations Version 12.5.0 学习(5)
多线程1998年的C++标准并未涉及多线程的概念。然而,从那时起到当前C++标准发布的这段时间里,计算机已经发展为多核设备,因此在软件开发时考虑使用多线程已成为一种现实的选择。多线程是一个广泛而复杂的主题,关于这一主题有许多优秀的参考书籍。C++的多线程功能是基于pthread库提供的功能构建的(参见Nichols, B等人的《Pthreads Programming》, O’Reilly)。然而,按照C++当前的设计理念,语言提供的多线程实现为多线程操作提供了一个高级接口,因此几乎不需要直接使用底层的
2024-08-22 19:08:03 265
原创 C++ Annotations Version 12.5.0 学习(4)
如第9.1.5节所述,操作符用于在“原始内存”中安装值或对象,即内存已经可用但尚未初始化为预期的对象类型。在使用时,字符串在专门分配给该对象的内存中构造,且对象类型的构造函数会在该内存中初始化对象。调用delete ptr时,字符串的析构函数会被调用,然后返回内存到通用内存池。使用 placement new 时,存储对象的内存已经可用,通过仅在指定的位置构造字符串。字符串可以通过ptr访问,但不能使用delete ptr,因为位置的内存已在调用 placement new 操作符之前可用。
2024-08-21 00:35:24 598
原创 C++ Annotations Version 12.5.0 学习(3)
虚基类如图 14.2 所示,AirCar 代表两个 Vehicle。这不仅导致了选择哪个函数来访问质量数据的歧义,还在 AirCar 中定义了两个质量字段。这有些多余,因为我们可以假设 AirCar 只有一个质量。然而,可以通过定义那些在派生类的继承树中被多次提及的基类为虚拟基类来实现 AirCar 只包含一个 Vehicle,同时使用多重继承。对 AirCar 类来说,这意味着在从 Land 和 Air 类派生时需要做一些小的修改:class Land: virtual public Vehicle
2024-08-21 00:25:34 341
原创 C++ Annotations Version 12.5.0 学习(2)
this 指针给定类的成员函数总是与其类的一个对象组合调用。对于函数要作用的对象总是存在一个隐式的“substrate”。C++ 定义了一个关键字 this 来访问这个substrate。this 关键字是一个指针变量,总是包含调用成员函数的对象的地址。this 指针由每个成员函数(无论是 public、protected 还是 private)隐式声明。this 指针是一个指向成员函数所属类对象的常量指针。例如,类 Person 的成员函数隐式地声明了以下内容:extern Person *const
2024-08-21 00:06:23 767
原创 C++ Annotations Version 12.5.0 学习(1)
C++’s historyC++ 的首次实现是在 1980 年代由 AT&T 贝尔实验室开发的,当时 Unix 操作系统也在这里创建。C++ 最初是一个“预编译器”,类似于 C 的预处理器,将源代码中的特殊结构转换为普通的 C 代码。当时,这些代码由标准 C 编译器编译。C++ 预编译器读取的“预代码”通常保存在扩展名为 .cc、.C 或 .cpp 的文件中。这些文件会被转换为扩展名为 .c 的 C 源文件,然后进行编译和链接。C++ 的首次实现是在 1980 年代由 AT&T 贝尔实验
2024-08-20 23:59:44 886
原创 gdb pretty printing
usr/share/gcc/python 对于自己编译的gdb 的python。下面的这部分是必须的不然不会生效。
2024-08-20 12:58:05 166
原创 编程卓越之道学习
UML指定用例来描述系统的功能。一个用例大致会对应一个需求。设计人员会创建用例图,外部观察者的角度指定系统需要做什么,意味着只管做什么,而不管如何做,然后,设计者会创建用例故事(user case)来描述设计图的细节。如前所述,通过在属性名称前加上 +、-、# 或 ~ 符号来指定属性的可见性,分别表示公有、私有、受保护和包级可见性。UML 活动图使用的状态符号基于传统的流程图符号。本节描述了你将常用的一些符号。在 UML 活动图中,你可以通过几种不同的方式处理条件语句:过渡条件和决策点。
2024-08-14 00:18:50 445
原创 Effective Modern C++ 学习
Effective Modern C++ Effective Modern C++ Effective Modern C++
2024-07-02 13:26:23 988
原创 plantUML学习笔记
相关文档请参考https://plantuml.com/zh/guide使用相关的关键字来声明参与者• actor(角色)• boundary(边界)• control(控制)• entity(实体)• database(数据库)• collections(集合)• queue(队列)• participant(参与者)
2023-10-02 20:20:45 528
原创 Erlang 学习笔记
Erlang编译器和运行时系统会正确推断出如何在收到消息时运行适当的代码。这是模式匹配带来的乐趣之一,会为你节省大量工作。请注意Erlang的变量以大写字母开头。所以X、This和A_long_name都是变量。Erlang的变量只能绑定一次。绑定变量的意思是给变量一个值,一旦这个值被绑定,以后就不能改动了。开头的名称(比如monday或friday)不是变量,而是符号常量,它们被称为原子(atom)。=不是一个赋值操作符,它实际上是一个模式匹配操作符。第一台机器上运行的客户端和第二台机器上运行的服务器。
2023-07-22 21:39:08 508
原创 IBM Rational Software Architect RealTime Edition (RSARTE) C++ RT Services Library 文档翻译
IBM Rational Software Architect RealTime Edition (RSARTE) C++ RT Services Library参考:https://rsarte.hcldoc.com/help/index.jsp?topic=%2Fcom.ibm.xtools.rsarte.webdoc%2Fusers-guide%2Foverview.html本文档介绍了C++ RT Services库,它是从Rational Software Architect RealTime
2023-06-08 21:04:27 822
原创 官网文档 States and Transitions in RSARTE 文档翻译
外部状态转换会导致对象从一种状态更改为另一种状态。请参阅下图。假设状态机处于State1。如果转换Ping被触发,它将导致状态从State1变为State2。转换Ping被认为是一个外部转换,因为它导致状态机离开一个状态(State1),然后进入另一个(State2)。转换Ping可能具有一个guard (布尔表达式),用于确定是否启用转换。当guard 表达式的计算结果为true时,将启用转换。只能触发已启用的转换。转换还可以具有在触发转换时执行的effect code。保护和效果代码的示例如下图所示。
2023-06-08 00:06:09 163
原创 官网文档 Modeling Real-Time Applications in RSARTE 翻译
与其他类型的应用程序相比,实时应用程序具有特殊的特点。例如,实时应用程序通常是复杂的、事件驱动的、有状态的、资源高效的和分布式的。RSARTE的目的是促进实时应用程序的建模和开发。定义较小的UML子集,即“UML的RT子集”。通过配置文件(称为UML-RT)引入新的实时特定概念。支持自动转换符合上述限制的模型,以产生高效的目标代码,例如C++。提供一个运行时库(称为RT services库),该库与生成的和手写的代码一起可以编译成可执行的实时应用程序。
2023-06-05 22:46:13 443
原创 WSL上srsRAN_4G的安装和学习
参考:https://docs.srsran.com/projects/4g/en/latest/general/source/1_installation.html。验证新的“ue1”网络是否存在。uplink 的traffic。能ping通说明可以了。
2023-05-10 22:00:35 583 1
原创 WSL 运行的程序的界面的字体设置
完成以上步骤后,您应该能够在WSL中运行的程序中看到放大的字体大小。请注意,某些程序可能需要自己的字体设置。如果您的程序的字体大小仍然不合适,请检查程序的字体设置并进行相应的更改。最后,您需要重启X Server。这可以通过关闭WSL终端并重新打开来完成。这将会让X Server在下一次启动时启用新的dpi设置。这将把Xft的dpi设置为120,从而放大字体大小。这将安装字体配置系统,使您可以对字体进行更多配置。打开WSL终端并进入Bash shell。首先,通过以下命令安装。接下来,创建一个名为。
2023-05-10 00:04:14 1217
原创 程序员自我修养学习笔记
处于运行中线程拥有一段可以执行的时间,这段时间称为时间片(Time Slice),当时间片用尽的时候,该进程将进入就绪状态。如果在时间片用尽之前进程就开始等待某事件,那么它将进入等待状态。每当一个线程离开运行状态时,调度系统就会选择一个其他的就绪线程继续执行。在一个处于等待状态的线程所等待的事件发生之后,该线程将进入就绪状态。这3个状态的转移如图1-9所示。
2023-04-19 22:54:40 243
原创 The-Art-of-Writing-Efficient-Programs 学习笔记2
D:指令调度。表示 CPU 已经从指令队列中取出指令,并将指令放入指令缓存区等待执行。e:指令执行。表示指令正在被 CPU 执行。E:指令执行完成。指令已经完成执行,并产生了相应的结果。R:指令退役。指令已经完成执行,并已经从指令缓存区中移除。=:指令已经调度,等待执行。指令已经被调度到指令缓存区等待执行,但是还没有开始执行。-:指令已经执行,等待退役。指令已经在 CPU 中执行过,并且产生了结果,但是还没有从指令缓存区移除,需要等待退役。
2023-04-14 19:06:55 1275
原创 TDD 学习笔记
测试驱动开发(Test-Driven Development, TDD),或测试先行编程,是指在编写实现功能的代码之前,先编写自动化测试来验证所需的功能。这些测试一开始当然会失败。我们的目标是快速编写最少的代码使这些测试通过。最后,根据需要重构代码以优化或清理实现。TDD的一个重要方面是,变更是渐进进行的,以小步为单位。编写一个简短的测试,然后编写足够的代码使该测试通过,然后重复上述过程。每次小改动之后,都要重新编译代码并重新运行测试。
2023-04-13 22:59:50 297
OpenCV 3 Blueprints.pdf
2018-06-17
OpenCV 2 Computer Vision Application Programming Cookbook
2018-06-17
Learning Image Processing with OpenCV.pdf
2018-06-17
A Practical Introduction to Computer Vision with OpenCV.pdf
2018-06-17
OpenCV Computer Vision with Python.pdf
2018-06-17
Arduino Computer Vision Programming.pdf
2018-06-17
OpenGL Programming Guide, 8th Edition
2018-06-17
OpenGL ES 3dot0 Cookbook
2018-06-17
OpenGL Data Visualization Cookbook
2018-06-17
OpenGL 4 Shading Language Cookbook, Second Edition
2018-06-17
Real-Time C++, 2nd Edition.pdf
2018-06-17
Procedural Content Generation for C++ Game Development.pdf
2018-06-17
Learning Boost C++ Libraries.pdf
2018-06-17
Functional Programming with C++
2018-06-17
Data Structures & Algorithm Analysis in C++, 4th Edition.pdf
2018-06-17
Data Clustering in C++.pdf
2018-06-17
C++ for Engineers and Scientists, 4th Edition.pdf
2018-06-17
Boost.Asio C++ Network Programming Cookbook
2018-06-17
OGLPG-9th-Edition.zip OpenGL编程指南代码(包括资源文件)
2019-10-23
OpenGL 4.5 Reference Pages API + GLSLangSpec.4.60 + glspec46.core
2019-10-22
OGRE 3D 1.7 Application Development Cookbook.pdf
2019-04-20
UNIX网络编程卷1:套接字联网API(第3版) (1).pdf
2019-04-14
Multicore and GPU Programming An Integrated Approach.pdf
2019-03-21
Game Programming Using QT.pdf
2018-06-17
Practical Algorithms for 3D Computer Graphics, Second Edition.pdf
2018-06-17
OpenCV Computer Vision Application Programming Cookbook Second Edition.pdf
2018-06-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人