“2020年6月”存档文章有30

ng build的参数配置

Angular程序编写完成,需要对程序进行构建,具体命令如下:ng build <project> [options]<project>:要构建的项目的名称。可以是应用程序或库ng build projectName --aot=true --buildOptimizer=true --optimization=true --prod=true--aot=true:使用“提前编译”进行构建--bu...

Material icon outline

Material icons提供了丰富的图标库,在Angular中可以很容易使用Material。Material icons提供了Filled和Outline样式的图片,默认使用的是Filled样式的图片,但是如果需要转换成Outline样式的图标,应该怎么做呢?you can use outline one as below ex:<mat-icon>info_outline</mat-ico...

TypeError: string indices must be integers

最近再处理api返回数据的时候出现了如下错误:TypeError: string indices must be integers具体代码如下:def test_sms_content(self): # 首先向数据库中插入数据 test_insert_database() response_404 = self.client.get('/api...

nginx 的一些安全设置

所有访问80(http)端口的流量直接301转移到443端口(https),写法如下:server { listen *:80; add_header Strict-Transport-Security max-age=15768000; return 301 https://$host$request_uri; }这个主...

代码覆盖率

代码覆盖率的定义:代码覆盖(英语:Code coverage)是软件测试中的一种度量,描述程序中源代码被测试的比例和程度,所得比例称为代码覆盖率。一般来说我们从以下四个维度来度量:行覆盖率(line coverage):度量被测代码中每个可执行语句是否都被执行到,但不包括java import,空行,注释等。函数覆盖率(function coverage):度量被测代码中每个定义的函数是否都被调用...

Python dotenv Command errored out with exit status 1

最近再安装dotnev的时候出现了如下错误:ERROR: Command errored out with exit status 1报错截图如下:具体错误原因未查清。解决方案:直接安装python-dotenv,具体命令如下:pip3 install python-dotenv或者执行如下命令:pip install python-dotenv参考资料:1、pip install dotenv ...