0%

概念

可重入函数:如果一个函数在执行过程中被中断服务程序打断,执行中断服务程序之后恢复执行,还能不妨碍之前的执行,就称该函数是可重入的

可重入函数一般用于硬件中断处理递归等应用程序中。

可重入程序/可重入子例程:在多个处理器上能被安全地多次并发调用。

与线程安全的区别:可重入函数的概念在多任务操作系统出现之前就存在了,所以该概念仅仅针对的是单线程执行过程。
一个函数可以是线程安全但非可重入的,例如,该函数每次都使用互斥量来包裹。但是,如果该函数用于中断服务程序,那么,它可能在等待第一次执行过程释放互斥量时陷入饥饿。TODO:陷入饥饿为什么就不是可重入了?

要实现可重入性,函数通常需要满足以下条件:

  • 不使用静态或全局变量:这些变量在多次调用之间共享,可能导致数据竞争。
  • 不依赖于不可重入的函数:例如,标准库中的某些函数可能不是可重入的。
  • 不使用动态内存分配:动态内存分配可能会导致竞争条件。
  • 不使用信号处理:信号处理可能会中断函数的执行。

可重入性在多线程编程和中断处理程序中尤为重要,因为它确保了函数在并发环境下的安全性。

可重入 VS 线程安全

可重入性和线程安全虽然都涉及到并发编程,但它们有不同的侧重点:

可重入性:

定义:一个函数可以在被中断后安全地再次调用,而不会影响其执行结果。
条件:不使用静态或全局变量、不依赖不可重入的函数、不使用动态内存分配、不使用信号处理。
应用场景:主要用于中断处理程序和嵌入式系统。
线程安全:

定义:一个函数或代码块在多线程环境下可以安全地并发执行,而不会导致竞争条件或数据不一致。
条件:通常需要使用同步机制(如互斥锁、信号量)来保护共享资源。
应用场景:主要用于多线程编程。
总结来说,可重入性关注的是函数在被中断后能否安全地再次调用,而线程安全关注的是在多线程环境下能否安全地并发执行。可重入函数不一定是线程安全的,线程安全的函数也不一定是可重入的。

  1. 可重入函数不一定是线程安全的
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>

int counter = 0;

void reentrantFunction() {
int localCounter = counter;
localCounter++;
counter = localCounter;
}

int main() {
reentrantFunction();
printf("Counter: %d\n", counter);
return 0;
}

解释:

reentrantFunction 是可重入的,因为它满足以下条件:

不使用静态或全局变量:虽然 counter 是一个全局变量,但 reentrantFunction 中的操作都是基于局部变量 localCounter,并且没有依赖于函数外部的状态。
不依赖不可重入的函数:reentrantFunction 中没有调用任何不可重入的函数。
不使用动态内存分配:函数中没有使用 malloc 或其他动态内存分配函数。
不使用信号处理:函数中没有涉及信号处理。
因此,reentrantFunction 可以在被中断后安全地再次调用,而不会影响其执行结果。

然而,正因为它使用了全局变量 counter,在多线程环境下可能会导致竞争条件,所以它不是线程安全的。

  1. 线程安全的函数不一定是可重入的
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <pthread.h>

pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
int counter = 0;

void* threadSafeFunction(void* arg) {
pthread_mutex_lock(&lock);
counter++;
pthread_mutex_unlock(&lock);
return NULL;
}

int main() {
pthread_t thread1, thread2;
pthread_create(&thread1, NULL, threadSafeFunction, NULL);
pthread_create(&thread2, NULL, threadSafeFunction, NULL);
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
printf("Counter: %d\n", counter);
return 0;
}

解释:

这个函数 threadSafeFunction 是线程安全的,因为它使用了互斥锁来保护对 counter 的访问。
然而,它不是可重入的,因为它使用了互斥锁,互斥锁在中断处理程序中可能会导致死锁:

互斥锁的使用:互斥锁用于确保线程安全,但它们在中断处理程序中可能会导致死锁。如果一个线程在持有锁时被中断,然后中断处理程序尝试再次调用该函数并试图获取同一个锁,就会发生死锁。

依赖于锁的状态:函数的执行依赖于锁的状态。如果锁已经被其他线程持有,函数就无法继续执行,必须等待锁释放。这种依赖性使得函数在中断后无法安全地再次调用。

不可重入的行为:由于锁的存在,函数在中断后重新进入时可能无法正确处理锁的状态,从而导致不可预期的行为。

Reference

Get IP from the host name

Key function: getaddrinfo.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#define _POSIX_C_SOURCE 200112L

#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>
#include <sys/types.h>
#include <errno.h>
#include <strings.h>
#include <arpa/inet.h>

int main() {
struct addrinfo hints;
bzero(&hints, sizeof hints);
// hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;

struct addrinfo *res = 0;
// The following 3 hostnames are legal.
int rc = getaddrinfo("www.baidu.com", NULL, &hints, &res);
// int rc = getaddrinfo("localhost", NULL, &hints, &res);
// int rc = getaddrinfo("PC-XXX", NULL, &hints, &res); // PC-XXX is a hostname
if (rc != 0)
perror("getaddrinfo failed");

for (struct addrinfo* res_i = res; res_i != NULL; res_i = res_i->ai_next) {
if (res_i->ai_addr) {
if (res_i->ai_addr->sa_family == AF_INET) {
char ip4[INET_ADDRSTRLEN];
inet_ntop(AF_INET, &(((struct sockaddr_in*)(res_i->ai_addr))->sin_addr), ip4, INET_ADDRSTRLEN);
printf("IP: %s\n", ip4);
} else {
char ip6[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, &(((struct sockaddr_in6*)(res_i->ai_addr))->sin6_addr), ip6, INET_ADDRSTRLEN);
printf("IP: %s\n", ip6);
}
}
}

return 0;
}

预定义宏

#if defined(__linux)
#ifdef LINUX2

C标准预定义宏

  • __LINE__
  • __func__
  • __FILE__
  • NDEBUG:参考_DEBUG和NDEBUG的区别,其中,_DEBUG是Visual Studio定义的,NDEBUG是C/C++标准。

GNU C预定义宏

官方文档

  • __COUNTER__: 扩展为从0开始的连续整数值,每次在源码中出现,则加1。不同源文件的__COUNTER__互不影响。

    可以用来生成唯一的命名。
    参考链接

    1
    2
    3
    4
    5
    6
    7
    8
    #define CONCAT_IMPL(x,y) x##y
    #define CONCAT(x,y) CONCAT_IMPL(x,y)
    #define VAR(name) CONCAT(name,__COUNTER__)
    int main() {
    int VAR(myvar); // 展开为 int myvar0;
    int VAR(myvar); // 展开为 int myvar1;
    int VAR(myvar); // 展开为 int myvar2;
    }
  • program_invocation_name:参考man page

#pragma

#pragma weak

Synopsis

1
#pragma weak function-name1 [= function-name2]

#pragma weak means that even if the definition of the symbol is not found, no error will be reported.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>

// It is not an error for symbol to never be defined at all.
// Without this line, the address of "foo" will always evaluate to "true",
// so the linker will report an "undefined reference to 'foo'" error.
#pragma weak foo
// The declaration is needed.
/* extern */ void foo();

int main() {
if (foo)
foo();

return 0;
}

Reference: 123

Host site

有两个托管个人站点的网站:Github pagesreathedocs.

Github Pages

使用github pages可以搭建个人主页。

github pages简介:官方链接

github pages使用了CNAME record技术,参考:链接1链接2Custom domains in Github Pages

注:Read the Docs也是一个很好的搭建个人主页的网站。

Github Pages 站点类型

有3种类型的 Github Pages 站点(sites):project, user 和 organization 。

Project sites 连接到 github 上特定 project ,比如 Javascript library 或 recipe collection。user 或 organization sites 连接到 github.com 的特定账户。

发布 user site ,你必须创建一个你的个人账户下的一个名为 <username>.github.io 的 repository 。发布 organization site ,你必须创建一个组织所有的名为 <organization>.github.io 的 repository 。除非你使用 custom domain ,否则 user 和 organization sites 将位于 http(s)://<username>.github.iohttp(s)://<organization>.github.io

project site 的源文件存储在作为 project 的相同的 repository 中。除非使用 custom domain , 否则 project sites 将位于 http(s)://<username>.github.io/<repository>http(s)://<organization>.github.io/<repository>

有关如何自定义影响您网站的域名的更多信息,参见”About custom domains and GitHub Pages“。

每个 github 账户允许创建 1 个 user 或 organization 站点。无论是被组织还是个人所有,project 站点的个数不限制。

GitHub Pages 访问方法

参考官方文档

例如,你的project站点配置的发布源是gh-pages分支,然后在gh-pages分支上创建了一个about/contact-us.md文件,你将可以在https://<user>.github.io/<repository>/about/contact-us.html访问它。

你也可以使用Jekyll等静态站点生成器来给你的github page配置一个主题。

站点发布常见问题的解决方法

Github workflows

参考官方文档

Github个人访问令牌

Github个人访问令牌

readthedocs

Similar to the github pages.

Tutorial

配置前准备

Markdown编辑器

推荐的markdown编辑器

  • VSCode:免费。VSCode原生支持Markdown,安装一些插件可以帮助更快地编写markdown文件。
  • Typora:现在已经开始收费。

VSCode markdown插件:

  • Mardown All in One: 提供快捷键,帮助更快的编写markdown文件。
  • Markdown+Math:提供数学公式支持。
  • Markdown Preview Enhanced: 将原生markdown预览的黑色背景改成白色。
  • Markdown Preview Github Styling:提供Github风格的预览。

在线表格生成器:可以生成Markdown、Text、HTML、LaTex、MediaWiki格式的表格。

轻量级虚拟机WSL

WSL,Windows Subsystem for Linux,是Windows提供的轻量级Linux虚拟机。

安装教程:见链接

WSL默认没有启用systemctl:

启用systemctl的方法:链接

替代方法:不需要启动systemctl,因为会比较占用资源,启动也会变慢。可以使用service命令替代。

WSL默认没有安装openssl-server:

使用ssh连接到服务器时,需要服务器运行着sshd程序,否则连接不上,会出现”Connection refused“错误。

参考链接

查看openssh-server有没有安装:

1
dpkg --list | grep ssh

注:如果安装了openssh-server,执行which sshd可以看到路径。

WSL默认没有安装openssh-server,安装方法:

1
sudo apt-get install openssh-server

启动ssh:

1
sudo service ssh start

ssh-keygen

1
2
# 删除错误的 know_hosts 项
ssh-keygen -f "/home/<user>/.ssh/known_hosts" -R "ubuntu"

通过https登录到github

git push不再支持输入用户名和密码,当提示输入密码时,需要输入personal access token.

步骤1:在github上创建personal access token

步骤2:在命令行上使用personal access token

步骤3:为了避免每次都需要输入personal access token,可以将其缓存在git client上

1
gh auth login

注:使用gh命令需要先安装GitHub CLI:

1
sudo apt-get install gh

WSL常见问题

在WSL的Linux下,在.bashrc中加入:

1
2
3
4
function browser() {
explorer.exe $(wslpath -w $(realpath $1))
}
export -f browser

打开html:

1
browser index.html

静态站点生成器

以下几种静态站点生成器都可以用来搭建个人主页。如果使用除JekyII外的工具,则需要配置Github Actions以构建和发布你的站点。

mkdocs

mkdocs是一个快速的静态网页生成器。

mkdocs.yml 文件是 MkDocs 文档生成器的配置文件,其格式说明参见这里

JekyII

Jekyll 是一个静态站点生成器,内置对 GitHub Pages 的支持和简化的构建进程。

参见 About GitHub Pages and Jekyll

Hexo

Sphinx

Install Sphinx
Hosting the documentation

python

python建立个人站点

python -m http.server

Syntax

Markdown

reStructuredText

.rst

大型文件存储

图片

Postimages

  • 网站: https://postimages.org/
  • 特点:
  • 适合快速上传和生成图片链接。
  • 不需要注册,可以直接上传图片并获得链接。
  • 提供图片缩略图和直接链接。
  • 上传后图片会长期存储,适用于网站和博客图片托管。

视频

TinyPic (由 Photobucket 提供)

  • 网站: https://tinypic.com/
  • 特点:
  • 支持上传并生成快速共享链接。
  • 上传后,链接可以嵌入到社交媒体、论坛、博客中。
  • 图片和视频都支持托管,但TinyPic已关闭,现由Photobucket服务接管。

Git LFS

GitHub 提供的用于存储大型文件的服务叫 Git LFS(Git Large File Storage)。

什么是 Git LFS?

Git LFS 是一个 Git 扩展,用于处理 Git 仓库中的大型文件(如图片、视频、音频等),它通过将大型文件存储在 GitHub 的独立存储区来解决 Git 的性能瓶颈。

Git LFS 的免费额度:

GitHub 为免费账户提供一定的 LFS 存储和带宽额度:

免费存储:每个 GitHub 账户提供 1GB 的 LFS 存储。

免费带宽:每个月 1GB 的下载带宽。

如果超出免费额度,你可以选择购买更多的存储和带宽。

Git LFS 的工作原理:

文件替代:Git LFS 用一个指向大文件的指针来替代文件内容,将文件本身存储在 GitHub 提供的 LFS 存储空间中。

文件存储:实际的文件内容存储在 GitHub 的 LFS 存储中,Git 只会管理这些文件的指针。

下载/上传:当你从仓库克隆或拉取代码时,Git LFS 会自动下载大文件,反之,当你提交大文件时,Git LFS 会将其上传到 GitHub。

如何使用 Git LFS?

  1. 安装 Git LFS:
    首先需要安装 Git LFS,可以通过 Git LFS 官方网站 下载和安装。
1
git lfs install
  1. 初始化 Git LFS:
    在你的 Git 仓库中初始化 Git LFS。
1
2
3
4
5
git lfs track "*.jpg"   # 例如跟踪所有 jpg 格式的图片
git add .gitattributes # 添加 .gitattributes 文件
git add <large-file> # 添加大型文件
git commit -m "Add large file"
git push origin main # 推送到 GitHub
  1. 使用 Git LFS 进行提交:
    每次提交时,Git LFS 会自动处理大文件,并将它们上传到 GitHub LFS 存储区。
优势:

减少仓库体积:通过将大文件存储在 Git LFS 中,可以避免将大文件直接存储在 Git 仓库中,从而提高 Git 的性能。

适用于大文件:适合管理图像、视频、二进制文件等大型文件,避免 Git 克隆和拉取过程变得过于缓慢。

总结:

Git LFS 是 GitHub 提供的用于管理和存储大型文件的扩展服务,适合存储需要频繁更改或管理的大文件(如图片、音频、视频等)。

推荐书籍

  1. 多人在线游戏架构实战:基于C++的分布式游戏编程/彭放编著. –北京:机械工业出版社,2020.11 (ISBN 978-7-111-66792-6)

Options

npm root - Current installation root path.
npm root -g - The global installation root path.
npm uninstall - After executing this command, you should also remove the items in the package.json file and delete the package-lock.json file and the node_modules directory.

Reference

Where does npm install packages?
Cannot Uninstall two npm Packages

安装

sudo apt install net-tools

手册

man 7 socket - socket options
man 7 tcp - tcp options

文件系统

/proc/sys/net/ipv4/ip_local_port_range

概念

网关(Gateway)

网关(Gateway)是一个网络节点,它充当其他网络之间的访问点或网关。网关通常用于连接不同的网络,并且可以在不同的协议之间进行转换。网关设备可以是路由器、服务器或其他网络设备。当本地网络中的设备需要与外部网络通信时,它们会将数据包发送到网关,网关再将数据包转发到目标网络。

举例: 假设你的本地网络使用的IP地址范围是192.168.1.0/24,而你的网关IP地址是192.168.1.1。当你的计算机需要访问外部网络(例如互联网)时,它会将数据包发送到网关(192.168.1.1),然后由网关将数据包转发到目标网络。

在Linux系统中,你可以使用ip route命令查看默认网关。例如:

在这个例子中,default via 192.168.1.1 dev eth0表示默认网关是192.168.1.1,你的计算机通过网络接口eth0与网关连接。

子网(CIDR表示法)

CIDR(Classless Inter-Domain Routing,无类别域间路由)是一种用于分配IP地址和路由的标准,使用斜杠(/)后跟一个数字来表示子网掩码的位数。

在CIDR表示法中,192.168.1.0/24表示一个子网,其中/24表示子网掩码为255.255.255.0。这意味着子网中有256个IP地址(从0到255),但其中两个地址是保留的:

  1. 网络地址192.168.1.0,用于标识子网本身。
  2. 广播地址192.168.1.255,用于向子网中的所有设备发送广播消息。

因此,有效的主机IP地址范围是从192.168.1.1192.168.1.254,共254个可用的IP地址。

The link-local address range refers to IP addresses that are used for communication within a single network segment or link. These addresses are not routable, meaning they are not intended to be used for communication beyond the local network segment.

For IPv4, the link-local address range is 169.254.0.0/16. This range is automatically assigned to network interfaces when no other IP address is available (e.g., when DHCP fails). Devices on the same local network can communicate with each other using these addresses without requiring a router.

For IPv6, the link-local address range is fe80::/10. These addresses are automatically configured on all IPv6-enabled interfaces and are used for local network communication.

The IP address range 169.254.0.0/16 is regarded as link-local because it is reserved for link-local addresses by the Internet Assigned Numbers Authority (IANA). These addresses are used for communication within a single network segment or link and are not routable beyond that segment.

Characteristics of Link-Local Addresses:

  • Automatic Assignment: Devices automatically assign themselves an IP address from the 169.254.0.0/16 range if they cannot obtain an IP address through DHCP.
  • Non-Routable: These addresses are not meant to be routed across different network segments. They are only valid within the local network.
  • Zero Configuration: Link-local addresses allow devices to communicate without manual configuration or a DHCP server.

Example:
When a device fails to get an IP address from a DHCP server, it might assign itself an address like 169.254.1.2. Other devices on the same local network segment will also have addresses in the 169.254.0.0/16 range, allowing them to communicate directly.

命令

ip

NAME

ip - show / manipulate routing, devices, policy routing and tunnels.
1
2
3
$ ip route get 8.8.8.8
8.8.8.8 via 192.168.1.1 dev eth0 src 192.168.1.100 uid 1000
cache

说明:

  • 8.8.8.8: The destination IP address for which the route is being queried.
  • via 192.168.1.1: The gateway IP address through which the destination can be reached.
  • dev eth0: The network interface (e.g., eth0) used to reach the destination.
  • src 192.168.1.100: The source IP address used for sending packets to the destination.
  • uid 1000: The user ID of the process that issued the command.
  • cache: Indicates that the route information is cached.
1
2
3
4
$ ip route show
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100
169.254.0.0/16 dev idrac proto kernel scope link src 169.254.1.2

说明:该命令用于显示路由表:

  • default via 192.168.1.1 dev eth0: The default route, packets to any destination not in the routing table will be sent to 192.168.1.1 via the eth0 interface.
  • 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100: A route for the 192.168.1.0/24 network (destination network), directly reachable via the eth0 interface, with the source IP 192.168.1.100.
  • 192.168.1.0/24: Destination network.
  • dev eth0: Interface eth0.
  • proto kernel: Added by the kernel.
  • scope link: Directly reachable.
  • src 192.168.1.100: Source IP address.
  • 169.254.0.0/16: Link-local address range.

netstat / ss

NAME

ss - another to investigate sockets.

Reference

查看进程占用的端口

COMMANDS

ss -lnpt

OPTIONS

-n, --numberic

-l, --listening

-t, --tcp
    Note: Only established (non-listening) connections.

-a, --all
    Display both listening and non-linstening (for TCP this means established connections) sockets.

-u, --udp

-p, --process

lsof

Options:

-n inhibits the conversion of network numbers to host names for network files.

-P inhibits the conversion of port numbers to port names for network files.

-i specifies the Internet addresses

    multiple addresses (up to a limit of 100) may be specified with multiple options.

    An Internet address is specified in the form (Items in square brackets are optional.):

    [46][protocol][@hostname|hostaddr][:service|port]

    where:
    46 specifies the IP version, IPv4 or IPv6
        that applies to the following address.
        '6' may be be specified only if the UNIX
        dialect supports IPv6.  If neither '4' nor
        '6' is specified, the following address
        applies to all IP versions.
    protocol is a protocol name - TCP, UDP
    hostname is an Internet host name.  Unless a
        specific IP version is specified, open
        network files associated with host names
        of all versions will be selected.
    hostaddr is a numeric Internet IPv4 address in
        dot form; or an IPv6 numeric address in
        colon form, enclosed in brackets, if the
        UNIX dialect supports IPv6.  When an IP
        version is selected, only its numeric
        addresses may be specified.
    service is an /etc/services name - e.g., smtp -
        or a list of them.
    port is a port number, or a list of them.

-s list file size

-s p:s  exclude(^)|select protocol (p = TCP|UDP) states by name(s).

Examples:

1
2
3
lsof -i:<port>
lsof -i -P -n | grep LISTEN
lsof -nP -iTCP -sTCP:LISTEN

nc/netcat/nmap

socket

Create a TCP or a UNIX domain socket and connect to stdin/out.

Installation:

sudo apt-get install socket

电影链接

Midsomer Murders: Season 1 Episode 2 - Written in Blood

台词

Phoenix turned and fired twice, the 34 millimetre bullets spitting through the air and splintering the brickwork two inches to the left of the Russia thug’s shoulder. A moment later came the reply of the Uzi semiautomatic and Phoenix twisted round. 菲尼克斯转身开了两枪,34毫米的子弹在空中喷射,将俄罗斯暴徒肩膀左侧两英寸砖墙击碎。过一会儿,乌兹半自动冲锋枪回应了,菲尼克斯扭过身来。

Her lips, searching in the sapphire, honeyscented darkness, found his; cool, forceful, unresisting, and as the frozen waves crashed down. 当冰冷、有力、不可抗拒的浪汹涌而下的时候,她的嘴唇在蓝宝石般散发着蜜香的夜色中寻找,找到了他的嘴唇。

-Got your meeting, have you? 你要去开会,对吗?
-Yes, I’m on my way. 是的,我正在去。

He pulled her towards him, his powerful, masculine hands tearing at the silk faric of her Gaultier nightshirt.

The repetitive beat of the innercity drum.

1887, Sebastian Lyddiard, greatgrandson of Herbert Lyddiard, who served under Sir John Jervis against Napoleon. 对抗拿破仑。

The Right Honourable William Lyddiard. 威廉·利迪亚德阁下。

-Do you ever regret marrying hime, Amy? I wonder if you ever think that but for you he might still be alive? 你后悔嫁给他吗,埃米?我不知道你是否想过,如果不是因为你,他可能现在还活着?
-(Amy) No. 没有想过。
-Well I do. 我想过。

-So we come to the question of which writer we invite to address us? 所以我们打算请哪位作家来给我们做演讲呢?
-How about Jilly Cooper?
-I think he said a writer.
-Do you think we could interest Frederick Forsythe?
-I rather doubt it.
-Oh, it’s a wonderful idea, Gerald. Especially since you’re writing a thriller. I think Frederick Forsythe would be first rate! 我认为Frederick Forsythe是第一流的。
-He’d never come. He’d just pretend he didn’t have time. They always do.
-I’d like Seamus Heaney.
-The poet?
-Not another poet. That last one was such a ghastly little man.

词汇

screenplay by 剧本由……写成
millimetre 毫米
phoenix 凤凰,这里是人名,菲尼克斯
spit 吐,唾
thug 恶棍,暴徒
twist 扭,拧,捻
brickwork 砖砌体,砖墙
splinter n. 碎片,弹片; v. 碎裂。
Uzi semiautomatic 乌兹半自动冲锋枪(Uzi submachine gun)。Uzi 冲锋枪是由以色列国防军 (IDF) 上尉(后来的少校)Uziel Gal 在 1948 年阿以战争后设计的。
sapphire 蓝宝石
honey 蜂蜜,蜜
scent 香味(a pleasant natural smell);scented 散发香味的
resist 抗拒的;unresisted 不可抗拒的。
masculine 男性的。
tear 撕,撕破,撕毁;拆;泪水。
nightshirt 睡衣
scum 浮渣
scum-bag 渣子袋,这里应该是“渣男”、“人渣”的意思,骂人的话。
hum 哼声
greatgrandson 曾孙
Sir 爵士
Napoleon 拿破仑
The Right Honourable 阁下。其中,Right是副词,意思是’very’ or ‘fully’。从语法上说,The Right Honourable 是形容短语,直接用来称呼人名或者某人用来自称都是不正确的,应该与其引用的名称或名称一起使用第三人称。
address 演讲
first rate 第一流
pretend 假装
ghastly US:/ˈɡæst.li/ UK:/ˈɡɑːst.li/ 阴森的,可怕的,非常坏的
bestseller 畅销书

Specify the search path for pkg_check_modules: Solution

1
set(ENV{PKG_CONFIG_PATH} "${CMAKE_SOURCE_DIR}/libs/opencv-install/lib/pkgconfig")

find_package