Daily 10/30

学习

Vue

vue中input绑定回车事件

@keyup.13="search"

javascript 验证身份的有效性

CSS

:first-child 使用:first-child伪类时一定要保证前面没有兄弟节点,把h1去掉就可以;或者使用div包住article,然后css:div article:first-child

移动端高清、多屏适配方案 1)Retina下图片高清问题, 2)retina下,border: 1px问题,3)多屏适配布局问题,

python

python 命令行传参,避免敏感信息硬编码在代码中

import argparse

parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('integers', metavar='N', type=int, nargs='+',
                    help='an integer for the accumulator')
args = parser.parse_args()

split 第一个参数默认值、所有的空字符(空格、换行(\n)、制表符(\t), 第二个参数表示分隔次数

str = "Line1-abcdef \nLine2-abc \nLine4-abcd";
print str.split( );
print str.split(' ', 1 );

   多行匹配模式
这个问题很典型的出现在当你用点(.)去匹配任意字符的时候,忘记了点(.)不能匹配换行符的事实。
re.compile() 函数接受一个标志参数叫 re.DOTALL

comment = re.compile(r'/\*(.*?)\*/', re.DOTALL)

Gerrit

Gerrit代码审核服务器 详细的文章介绍 Gerrit代码审查-简介

git仓库导入到gerrit

I imported many GIT projects to gerrit, the easiest way I found was to copy the xy.git Directory of the git repository to the directory where gerrit deposits the git repos. After restart of gerrit process the new project is in the list of new projects and you can edit description and access rights.

Gerrit内置数据库H2访问权限修改 修改project.config文件

[capability]
       accessDatabase = group Administrators

Gerrit工作流程及使用手册 介绍gerrit安装http

Gerrit英文学习资料

GIT

修改远程仓库地址:

git remote set-url origin [url]

最后修改 February 7, 2021 : doc: 整理daily日记 (0dcc57d)