前言 vue通信手段有很多种,props/emit、vuex、event bus、provide/inject 等。还有一种通信方式,那就是 $attrs 和 $listeners,之前早就听说这两个api,趁着有空来补补。这种方式挺优雅,使用起来也不赖。下面例子都会通过父、子、孙子,三者的关系来说 ...
分类:
其他好文 时间:
2020-07-26 00:35:59
阅读次数:
70
<?php // clearDir('upload/images/'); if ($_FILES['file']['error'] == 0) { $MAX_FILE_SIZE = 300000; if ($_FILES['file']['size'] > $MAX_FILE_SIZE) { exi ...
分类:
Web程序 时间:
2020-07-26 00:34:37
阅读次数:
73
1 /*先定义个三线表*/ proc template; define style work.threeline; parent=styles.rtf; class table/ frame=hsides rules=group borderspacing=0pt; end; run; option ...
分类:
其他好文 时间:
2020-07-25 11:27:42
阅读次数:
93
背景: 项目性能问题有一个明显的表征是CPU占用率持续超高>98%,与之前baseline(平均稳定在70%~80%)有明显差异。 急需了解常见情景可能造成CPU占用率过高。 参考: https://blog.csdn.net/dingjianmin/article/details/85705812 ...
分类:
编程语言 时间:
2020-07-25 11:27:20
阅读次数:
71
前提:配置数据库连接(见前面) 一、步骤 1、导包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> 2、操 ...
分类:
数据库 时间:
2020-07-25 10:05:13
阅读次数:
95
思路: 小程序登录获取code,将code传到后台; 后台用code得到微信用户id,即openid,将openid存储在用户表中,完成绑定 登录时,再次获取code并传给后台,得到openid,若用户表中存在,便可直接登录 以下仅是代码片段,更多代码在Github back_end/applica ...
分类:
微信 时间:
2020-07-25 09:59:11
阅读次数:
210
对于已知个数的集合来说,枚举其非空子集的最简单方法是二进制枚举法 void print_subset(int n,int s) { for(int i=0;i<n;i++) { if(s&(1<<i)) { printf("%d ",i); //事实上i输出的是集合的数组标号 } } cout<<e ...
分类:
编程语言 时间:
2020-07-25 09:38:01
阅读次数:
68
Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justif ...
分类:
其他好文 时间:
2020-07-25 09:35:28
阅读次数:
71
sequenceDiagram B->>C:initConfig C->>D: registerPubKey C-->>C: 缓存 loop 健康检查 王五->王五: 与疾病战斗 end Note right of 王五: 合理 食物 看医生... 李四-->>张三: 很好! 王五->李四: 你怎么 ...
分类:
其他好文 时间:
2020-07-25 09:25:59
阅读次数:
62
背景 本文基于JDK 11,主要介绍FutureTask类中的run()、get()和cancel() 方法,没有过多解析相应interface中的注释,但阅读源码时建议先阅读注释,明白方法的主要的功能,再去看源码会更快。 文中若有不正确的地方欢迎大伙留言指出,谢谢了! 1、FutureTask类图 ...
分类:
其他好文 时间:
2020-07-25 09:16:45
阅读次数:
56