安装 git --version 初始化配置 git config --global user.name "damu" git config --global user.email damu@example.com git config --list 初始化仓库 git init C(新增) 在工作 ...
分类:
其他好文 时间:
2020-07-04 22:48:04
阅读次数:
78
情景: 当前存在两个窗口或以上,先初始化的窗口会被后初始化的窗口覆盖,从而置于底层, 这时一个最简单的方案就是给需要置于顶层的窗口配置事件过滤器,监听窗口状态,当窗口不属于顶层窗口时调用activateWindow,将窗口激活置于顶层。 蓝色窗口创建后创建绿色窗口,这时事件到达蓝色窗口,重新将蓝色窗 ...
分类:
其他好文 时间:
2020-07-04 22:28:23
阅读次数:
347
Node应用由模块组成,采用CommonJS模块规范。 每个文件就是一个模块,有自己的作用域。每一个文件里面定义的变量、函数、类都是私有的,对其他文件不可见。 // example.js var x = 5 var add = function(value){ return value + x } ...
分类:
Web程序 时间:
2020-07-04 21:13:56
阅读次数:
70
环境: win10 Python 3.7.5 vs code 解决方法: 新建环境变量,然后重启 vs code 就可以了 QT_QPA_PLATFORM_PLUGIN_PATH C:\Users\Administrator\Desktop\新建文件夹 (2)\venv\Lib\site-packa ...
在QT中设置圆形头像,本文记录了两个解决思路。 将头像显示在QLabel 此类控件中,设置QLabel 为一个正方形,接着设置QLabel 的圆角属性,可以实现圆形头像的效果。 图像合成,在头像上方设置遮罩。 以下是实现上述两种方式的Demo 实现效果: QLabel 方式: 遮罩方式: 这里分为两 ...
分类:
其他好文 时间:
2020-07-04 21:04:16
阅读次数:
72
Spring读取配置的两种方式 注解的方式 ApplicationContext ac=new AnnotationApplicationContext("MyConfig.class") package com.example.demo; import org.springframework.co ...
分类:
编程语言 时间:
2020-07-04 18:58:16
阅读次数:
59
问题的可能原因: 可能是传递给avformat_alloc_output_context2()函数的filename参数不对,并不是一个正常的字符串。 问题解决办法: 检查avformat_alloc_output_context2()的输入参数是否都合理。 问题历程: 在使用QT+ffmpeg库做 ...
分类:
其他好文 时间:
2020-07-04 16:46:11
阅读次数:
274
问题: 给定一个数组,对所有元素进行,按大小排名rank,同样大小排名相同。 Example 1: Input: arr = [40,10,20,30] Output: [4,1,2,3] Explanation: 40 is the largest element. 10 is the small ...
分类:
其他好文 时间:
2020-07-04 15:11:29
阅读次数:
58
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di ...
分类:
其他好文 时间:
2020-07-04 13:47:53
阅读次数:
61
For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i ...
分类:
其他好文 时间:
2020-07-04 13:45:09
阅读次数:
71