C++ 动态数组初始化

int *pia = new int[10];//array of 10 uninitializedints此new表达式分配了一个含有 10 个int型元素的数组,并返回指向该数组第一个元素的指针,此返回值初始化了指针pia。在自由存储区中创建的数组对象是没有名字的,只能通过其地址间接地访问堆中的对象。注意:C++使用new和delete在堆(自由存储区)上分配和释放动态数组。 Read More

Change the mirror of HomeBrew to AliYun’s

简介Homebrew 是一款自由及开放源代码的软件包管理系统,用以简化 macOS 系统上的软件安装过程。它拥有安装、卸载、更新、查看、搜索等很多实用的功能,通过简单的一条指令,就可以实现包管理,十分方便快捷。配置方法首先确保你已经安装好了 Homebrew 了, 如果没有, 请参考 OPSX 指引页的 Homebrew 文档;然后你只需要粘贴下述命令在对应终端运行。 Read More

Exuberant Ctags Manual

Thectagsandetagsprograms (hereinafter collectively referred to asctags, except where distinguished) generate an index (or "tag") file for a variety of language objects found infile(s). This tag file allows these items to be quickly and easily located by a text editor or other utility. A "tag" signifies a language object for which an index entry is available (or, alternatively, the index entry crea... Read More

PHP-FPM Configuration

pmstrin设置进程管理器如何管理子进程。可用值:static,ondemand,dynamic。必须设置。static- 子进程的数量是固定的(pm.max_children)。ondemand- 进程在有需求时才产生(当请求时才启动。与 dynamic 相反,在服务启动时pm.start_servers就启动了。dynamic- 子进程的数量在下面配置的基础上动态设置:pm.max_children,pm.start_servers,pm.min_spare_servers,pm.max_spare_servers。pm.max_childreninpm设置为static时表示创建的子进程的数量,pm设置为dynamic时表示最大可创建的子进程的数量。必须设置。该选项设置可以同时提供服务的请求数限制。类似 Apache 的 mpm_prefork 中 MaxClients 的设置... Read More

Layers of OSI Model

OSI stands for Open Systems Interconnection. It has been developed by ISO – ‘International Organization of Standardization‘, in the year 1984. It is a 7 layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe.1. Physical Layer (Layer 1) The lowest layer of the OSI referenc... Read More

Got “our configuration does not allow connections to ” while using composer install

Got this message while using the composer install command[Composer\Downloader\TransportExceptionYour configuration does not allow connections to http://xxx.com:80/path/to/repo/repo-name-0.0.0.tar.gz. See https://getcomposer.org/doc/06-config.md#secure-http for details.Just run this commandcomposer config -g secure-http falsThen, go aheadReferrenc[1]. Latest Composer version not pulling Larav... Read More

三分钟掌握Go mod常用与高级操作

使用go module之后,go get 拉取依赖的方式就发生了变化下载项目依赖go get ./...拉取最新的版本(优先择取 taggo get golang.org/x/text@lates拉取 master 分支的最新 commigo get golang.org/x/text@maste拉取 tag 为 v0.3.2 的 commigo get golang.org/x/text@v0.3.拉取 hash 为 342b231 的 commit,最终会被转换为 v0.3.2go get golang.org/x/text@342b2指定版本拉取,拉取v3版本go get github.com/smartwalle/alipay/v Read More

The tutorial of Protocol Buffers in Golang

This tutorial provides a basic Go programmer's introduction to working with protocol buffers, using theproto3version of the protocol buffers language. By walking through creating a simple example application, it shows you how tDefine message formats in a.protofile.Use the protocol buffer compiler.Use the Go protocol buffer API to write and read messages.This isn't a comprehensive guide to using p... Read More