Qt是一个跨平台开发的框架,可以实现一套代码多平台编译运行。但是有时候我们想实现的功能却和平台深度挂钩,比如本文想要描述的键盘钩子,也就是KeyBoard Hook。在Windows平台开发时,如果我们需要监听键盘的操作或者屏蔽一些键盘操作时,比较容易的办法就是使用Windows 自带的API,包含 ...
分类:
其他好文 时间:
2020-04-01 17:55:25
阅读次数:
171
How do I get notifications for commits to a repository? I just found out by accident that you can easily manage to achieve this: fork the project (if ...
分类:
其他好文 时间:
2020-03-31 18:46:41
阅读次数:
64
代码片段fromurllib.requestimporturlretrieveimportsocketimportosimportsysdefreporthook(blocknum,bs,size):#blocknum:已经下载的数据块bs:数据块的大小size:远程文件的大小per=100.0*blocknum*bs/sizeifper>100:per=100sys.stdout.writ
分类:
编程语言 时间:
2020-03-31 14:22:47
阅读次数:
99
观察者模式,我们有很多其他的方式来称呼它。比如熟悉的发布/订阅模式,回调方式,Listen监听等。 我们看到很多源码中有Observer,Listen,Hook,Callback,基本用到了观察者模式; 话不多说,直接来点代码说明下 首先定义被观察者(抽象的,公有的) public interfac ...
分类:
其他好文 时间:
2020-03-27 13:13:46
阅读次数:
111
先说说react原版的useEffect使用起来不便的地方 useEffect( function() { // effect操作 }, ['a', 'b', { name: 'c' }] ); 这里的effect每次更新都会执行,因为第三个参数一直是不等的,{name: 'c'} !== {nam ...
分类:
其他好文 时间:
2020-03-27 12:47:14
阅读次数:
268
恢复内容开始 一、SpringBoot简介 SpringBoot是整个Spring技术栈的整合,来简化Spring应用开发,约定大于配置,去繁从简,just run 就能创建一个独立的,产品级别的应用。 背景: J2EE笨重的开发、繁多的配置、底下的开发效率、复杂的部署流程、第三方技术集成难度大。 ...
分类:
编程语言 时间:
2020-03-26 23:08:16
阅读次数:
87
from myToolsPkgs.pytorch_block import * from myToolsPkgs.pytorch_helper import * class Classifier(nn.Module): def __init__(self, in_size, in_ch): supe ...
分类:
其他好文 时间:
2020-03-25 23:13:57
阅读次数:
242
解决办法: // 实例化echarts对象 var/let myChart = echarts.init(this.$refs.myChart) ...
分类:
其他好文 时间:
2020-03-25 10:29:35
阅读次数:
460
1、方法一 使用$on和$emit // Parent.vue <Child @mounted="doSomething"/> // Child.vue mounted() { this.$emit("mounted"); } 2、使用hook // Parent.vue <Child @hook: ...
分类:
其他好文 时间:
2020-03-22 17:29:18
阅读次数:
164