依赖注入原理 <?phpclass A{ public function get_name() { return 'A-get_name'; }}class B{ //$a必须是A类的对象 public function get_name(A $a) { //参数实例化,在外面实例化,里面不用再次实 ...
分类:
Web程序 时间:
2020-06-10 00:03:36
阅读次数:
138
/** * 获取一个32位长的唯一id * @return 唯一id */public static String createNewId(){ return UUID.randomUUID().toString() ; } UUID.randomUUID().toString()是javaJDK提 ...
分类:
其他好文 时间:
2020-06-09 23:52:43
阅读次数:
118
一、安装mockjs npm install mockjs 二、创建mock文件夹 三、创建mock文件 FzIdentNetCard.js import Mock from 'mockjs' const res = { "head": { "chanel": "DBK", "drbkdt": "2 ...
分类:
Web程序 时间:
2020-06-09 23:46:54
阅读次数:
126
给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。 示例 1: 输入: 123输出: 321 示例 2: 输入: -123输出: -321示例 3: 输入: 120输出: 21 class Solution { public int reverse(int x) { int a ...
分类:
其他好文 时间:
2020-06-09 23:31:56
阅读次数:
68
1021 个位数统计 (15分) #include<iostream> #include<string> #include<cstdio> using namespace std; int main(){ string s;cin>>s; int a[1005]={0}; for(int i=0;i ...
分类:
其他好文 时间:
2020-06-09 18:43:19
阅读次数:
54
元注解: 注解元素 注解元素可用的类型如下所示: 所有基本类型(int、float、boolean等) String Class enum Annotation 以上类型的数组 ######################################## 注解都是 @ 符号开头的 注解可以元数据 ...
分类:
编程语言 时间:
2020-06-09 18:35:03
阅读次数:
58
【模板】快速排序 #include <iostream> using namespace std; const int N = 1e5 + 10; int a[N]; void qsort(int l, int r) { if(l >= r) return; //边界边界,莫要忘了 int i = ...
分类:
编程语言 时间:
2020-06-09 18:25:49
阅读次数:
76
PHP 简单的日期加减计算 <?php date_default_timezone_set('PRC'); //默认时区 echo "今天:",date("Y-m-d",time()),"\n"; echo "今天:",date("Y-m-d",strtotime("18 june 2008")), ...
分类:
其他好文 时间:
2020-06-09 16:44:29
阅读次数:
70
1、Environment @Configurable @PropertySource("classpath:/userinfo.properties") //这个属性文件会加载到Spring的Environment中 public class UserInfoConfig { @Autowired ...
分类:
其他好文 时间:
2020-06-09 16:29:18
阅读次数:
50
前言:前两天遇到处理请求超时的逻辑,记录起来。 // 处理超时问题 下面的代码仅在登录的时候做了超时处理,有其他需求的自行修改逻辑 axios.interceptors.response.use( (response) => response, (error) => { const original ...
分类:
移动开发 时间:
2020-06-09 14:59:20
阅读次数:
93