command pattern cpp
typescript: Memento Pattern
/** * Memento Pattern 备忘录是一种行为设计模式, 允许生成对象状态的快照并在以后将其还原。 * The Originator holds some important state that may change over time. It also * defines a me ......
vscode配置代码(cpp编译)
.vscode文件夹内为配置文件 launch.json program选项填写调试时二进制程序的路径 cwd为该文件内调试命令的工作路径 environment为传递给程序入口的参数 preLaunchTask为程序调试前执行的任务,填写对应Tasks的Label tasks.json label ......
【3rd_Party】Cpp 单元测试框架-gtest
Unit Test 和 gtest 介绍 单元测试( Unit Test ,模块测试)是开发者编写的一小段代码,用于检验被测代码的一个很小的、很明确的功能是否正确,通过编写单元测试可以在编码阶段发现程序编码错误,甚至是程序设计错误。 单元测试不但可以增加开发者对于所完成代码的自信,同时,好的单元测试 ......
typescript: Chain of Responsibility Pattern
/** * Chain of Responsibility Pattern 责任链是一种行为设计模式, 允许你将请求沿着处理者链进行发送, 直至其中一个处理者对其进行处理。 * file: Chaints.ts * The Handler interface declares a method fo ......
src/param.cpp:30:26: fatal error: gsl/gsl_blas.h: No such file or directory
001、问题:安装gemma软件报错 src/param.cpp:30:26: fatal error: gsl/gsl_blas.h: No such file or directory 002、解决方法, 安装gls a、官网下载 http://mirrors.ustc.edu.cn/gnu/g ......
typescript: Proxy Pattern
/** * Proxy Pattern 代理是一种结构型设计模式, 让你能提供真实服务对象的替代品给客户端使用。 代理接收客户端的请求并进行一些处理 (访问控制和缓存等), 然后再将请求传递给服务对象。 * The Subject interface declares common operatio ......
typescript: Flyweight Pattern
/** * Flyweight Pattern 享元是一种结构型设计模式, 它允许你在消耗少量内存的情况下支持大量对象。 * https://refactoringguru.cn/design-patterns/flyweight/typescript/example#lang-features * ......
设计模式之 Observer Pattern观察者模式
观察者模式Observer Observer模式为组件向相关接收方【广播】消息提供了灵活的方法; 该模式定义了对象一到多的依赖关系,这样当对象改变状态时,将自动通知并更新他所有的依赖对象; 优点 抽象了主体与Observer之间的耦合关系; 支持广播方式的通信 适用 对一个对象的修改涉及其他对象的修 ......
Docker command
reference https://docs.docker.com/get-started/overview/ Images An image is a read-only template with instructions for creating a Docker container. // ......
command
mysql命令 修改mysql密码: use mysql; update user set authentication_string=password('dsd') where user=''; flush privileges; iptables命令 添加白名单 iptables -L ipta ......
Linux Awk command All In One
Linux Awk command All In One
shell script
Awk language
......
socket.io-client-cpp与boost的编译、交叉编译
一、下载socket.io-client-cpp源码 git clone https://github.com/socketio/socket.io-client-cpp.git直接克隆,或者下载release版本源码 二、下载依赖的库rapidjson和websocketpp cd socket. ......
设计模式之 State Pattern状态模式
State模式允许对象在内部状态变化时,变更其行为,并修改其类; 优点: 定位指定状态的行为,并且针对不同状态来划分行为,使状态转换显式进行; 适用: 对象的行为依赖于其状态,并且该对象必须在运行时根据其状态修改其行为; 操作具有大量的以及多部分组成的取决于对象状态的条件语句; public cla ......
typescript: Facade Pattern
/** * Facade pattern 外观是一种结构型设计模式, 能为复杂系统、 程序库或框架提供一个简单 (但有限) 的接口。 * The Facade class provides a simple interface to the complex logic of one or * sev ......
typescript: Decorator Pattern
/** * Decorator Pattern 装饰是一种结构设计模式, 允许你通过将对象放入特殊封装对象中来为原对象增加新的行为。 * The base Component interface defines operations that can be altered by * decorato ......
typesciprt: Composite Pattern
/** * Composite Pattern 组合是一种结构型设计模式, 你可以使用它将对象组合成树状结构, 并且能像使用独立对象一样使用它们。 * https://refactoringguru.cn/design-patterns/composite/typescript/example#la ......
多种方案教你彻底解决mac npm install -g后仍然不行怎么办sudo: xxx: command not found
问题概述 某些时候我们成功执行了npm install -g xxx,但是执行完成以后,使用我们全局新安装的包依然不行,如何解决呢? 解决方案1: step1: 查看npm 全局文件安装地址 XXX@CN_CXXXMD6M ~ % npm list -g /Users/XXX/.npm-global ......
bash: conda: command not found
在Linux系统中安装完anaconda3或者miniconda3后,输入conda命令却返回bash: conda: command not found。 首先我尝试了网络上流传比较广的这个方法: 1.打开文件bashrc命令:vim ~/.bashrc 2.在最后一行加入 export PATH ......
【Cpp】RTTI 机制原理解析
References Baidu Wiki C++中的RTTI机制详解 RTTI 推荐阅读: RTTI 原理 推荐阅读:C++中的RTTI机制 什么是RTTI机制? RTTI 是“Runtime Type Information”的缩写,意思是:运行时类型信息。它提供了运行时确定对象类型的方法。 R ......
System Architecture Patterns All In One
System Architecture Patterns All In One
系统架构模式
......
Cpp 惯用法 CRTP 简介
From Wikipedia, The curiously recurring template pattern (CRTP) is an idiom, originally in C++, in which a class X derives from a class template insta ......
typescript: Bridge Pattern
/** * Bridge Pattern 桥接是一种结构型设计模式, 可将业务逻辑或一个大类拆分为不同的层次结构, 从而能独立地进行开发。 * https://dev.to/takaakit/uml-diagram-for-gof-design-pattern-examples-in-typescr ......
Top 50+ Linux Commands You MUST Know
https://www.digitalocean.com/community/tutorials/linux-commands Top 50 Linux Commands You Must Know as a Regular User ls - The most frequently used co ......
React in patterns
In brief > Foundation 1. Communication - Input - Output 2. Event handlers 3. Composition - Using React's children API - Passing a child as a prop - Hi ......
Windows桌面应用程序源文件.cpp注释
这个是visual studio 2022上利用 Windows桌面应用程序模板创建的源文件注释 一个Windows图形界面(GUI)应用程序通常由主窗体,对话框,控件组成。 当应用程序创建一个窗体,需要调用CreateWindowEx函数,必须提供的参数1.窗体类窗体类是一个结构体。是一系列属性的 ......
typescript: Adapter pattern
/** * Adapter pattern 适配器是一种结构型设计模式, 它能使不兼容的对象能够相互合作。 * file: Adapterts.ts * * */ /** * The Target defines the domain-specific interface used by the c ......
typescript: Singleton Pattern
/** * file: Singletonts.ts * Singleton Pattern 单例是一种创建型设计模式, 让你能够保证一个类只有一个实例, 并提供一个访问该实例的全局节点。 * The Singleton class defines the `getInstance` method ......
Flutter/Dart第10天:Dart高级特性Pattern模式的全部类型(共15种)
Pattern模式是Dart 3.0发布的3个高级特性之一,在第09天我们学习了模式的概览和用法,对模式的强大之处有了基本的认识,今天我们来看看Dart中的全部模式类型,总共有15种,它们包括逻辑或、逻辑与、关系、值转换、空检测、空断言、常量、变量、标识符、括号、List列表、Map映射、Recor... ......
typescript: Prototype Pattern
/** * Prototype Pattern 原型是一种创建型设计模式, 使你能够复制对象, 甚至是复杂对象, 而又无需使代码依赖它们所属的类。 * The example class that has cloning ability. We'll see how the values of fi ......
typescript: Builder Pattern
/** * TypeScript 实体类 Model * Builder Pattern * 生成器是一种创建型设计模式, 使你能够分步骤创建复杂对象。 * https://stackoverflow.com/questions/12827266/get-and-set-in-typescript ......