上机环境linux mint Qt5.11 需求:自定义一个label,使得label在点击时可以显示鼠标的坐标值 步骤一,新建一个QWidget项目 方便起见,设置如下 步骤二,新建一个Label类 自定义的控件,无非是在Qt官方控件的基础上添加新的槽(通俗点就是响应事件的函数),那么必定要继承基 ...
分类:
编程语言 时间:
2020-01-06 12:50:29
阅读次数:
106
注意对应的是put请求方式, 路由需要带上对应的更新对象的ID example: http://127.0.0.1:8001/api/employees/employees/2/ 最后的2 即是更新的对象2 ...
分类:
其他好文 时间:
2020-01-06 12:21:32
阅读次数:
238
1 public class UfArray implements UF { 2 private int array[]=null; 3 public UfArray(int n) { 4 array=new int[n]; 5 for(int i=0;i<array.length;i++){ 6 ...
分类:
其他好文 时间:
2020-01-06 09:55:07
阅读次数:
80
什么是LazyLoad LazyLoad是一个很小的,压缩后1.5kb(未使用Gzip压缩)、不依赖的JavaScript实用程序,它使根据需要加载外部JavaScript和CSS文件变得超级容易。 只要有可能,LazyLoad将自动并行加载资源,同时在指定要加载的url数组时确保执行顺序。在不保留 ...
分类:
编程语言 时间:
2020-01-06 00:44:44
阅读次数:
390
[TOC] (一)异常处理 1.捕获所有异常 2.捕获特定异常 3.手动抛出异常 (二)测试 使用Python自带的unittest模块 example 1:测试某个函数 example 2:测试某个类 常用的断言方法: ...
分类:
编程语言 时间:
2020-01-06 00:07:22
阅读次数:
75
之前用Qt的sharedmemory实现的。但是有时候,应用退出后,共享内存并没有释放。导致下次启动应用时,应用不能被打开。需要启动两次才能打开应用。 咨询了Qt的工作人员,他们也知道这个bug。并给了一个连接https://code.qt.io/cgit/qt-solutions/qt-solut ...
分类:
其他好文 时间:
2020-01-05 15:22:26
阅读次数:
57
一 先做一个简单对比: 1. SpringMVC的入口是Servlet,核心是DispatcherServlet,Struts2是Filter,核心是FilterDispatcher 2. SpringMVC应当会比Struts2稍微快些。SpringMVC是基于方法设计,Struts2是基于类,即 ...
分类:
编程语言 时间:
2020-01-05 13:44:10
阅读次数:
116
#java#spring#webflux#入门#编程# Spring WebFlux web的基本应用 视频讲解: https://www.bilibili.com/video/av82028626/ WebfluxApplication.java package com.example.webfl ...
分类:
Web程序 时间:
2020-01-05 11:52:40
阅读次数:
112
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 ...
分类:
其他好文 时间:
2020-01-05 11:37:20
阅读次数:
72
Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3 / / \ 4 5 ...
分类:
其他好文 时间:
2020-01-05 09:54:14
阅读次数:
60