摘要: package com.huang.add; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; /** * Semaphore模拟抢车位 */ public class SemaphoreDemo 阅读全文
posted @ 2020-08-21 13:40 Tamako521 阅读(496) 评论(0) 推荐(0) 编辑
摘要: package com.huang.add; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; /** * CyclicBarrier模拟收集7颗龙珠 * */ 阅读全文
posted @ 2020-08-21 13:12 Tamako521 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 2、类加载和main()的执行顺序? 备注:执行main()方法会先加载main()方法所在的类。存在继承关系中,创建子类对象初始化过程为: 父类静态成员和语句块 子类静态成员和静态语句块 父类普通成员和普通语句块 父类构造函数 子类普通成员和普通语句块 父类构造函数 示例如下: public cl 阅读全文
posted @ 2020-08-15 11:35 Tamako521 阅读(1836) 评论(0) 推荐(0) 编辑
摘要: /* eslint-disable */ import XLSX from 'xlsx'; function auto_width(ws, data){ /*set worksheet max width per col*/ const colWidth = data.map(row => row. 阅读全文
posted @ 2020-05-22 23:56 Tamako521 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-05-02 13:23 Tamako521 阅读(128) 评论(0) 推荐(0) 编辑
摘要: if(a >=5){ alert("你好"); } 可以写成: a >= 5 && alert("你好"); 这样只需一行代码就搞定。 在js逻辑运算中,0、""、null、false、undefined、NaN都会判为false,其他都为true var attr = attr || “”;这个运 阅读全文
posted @ 2020-03-30 16:12 Tamako521 阅读(794) 评论(0) 推荐(0) 编辑
摘要: export function sysTime(){ var myDate = new Date(); var year = myDate.getFullYear(); var month = myDate.getMonth()+1; var date = myDate.getDate(); var 阅读全文
posted @ 2020-03-25 17:16 Tamako521 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: <!--丰桥api依赖--> <dependency> <groupId>com.sf.csim.express</groupId> <artifactId>express</artifactId> <version>1.6</version> <scope>system</scope> <syst 阅读全文
posted @ 2020-03-03 21:55 Tamako521 阅读(383) 评论(0) 推荐(0) 编辑
摘要: private static <T> T convertToJavaBean(String xml, Class<T> t) throws Exception { T obj = null; JAXBContext context = JAXBContext.newInstance(t); Unma 阅读全文
posted @ 2020-02-29 10:16 Tamako521 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 最近在做一个查询顺丰物流的接口,需要用到丰桥官网提供的一些jar,这些jar在maven仓库没有。所以需要下载下来再进行配置。 第一步:再resource目录下新键一个lib文件夹,存放下载好的jar。 第二补,在pom.xml中对这些jar进行坐标依赖。 <!--丰桥api依赖--> <depen 阅读全文
posted @ 2020-02-29 09:54 Tamako521 阅读(2142) 评论(0) 推荐(0) 编辑