java
暗月公子
这个作者很懒,什么都没留下…
展开
-
计算 停电时长
表id VARCHAR2(256) 用户id time VARCHAR2(256) 时间 flag VARCHAR2(256) 0来电,1停电计算 停电时长,使用了 lead函数select t1.id,t1.time,t1.flag,t1.next_time from (select t.id id,t.time,t.flag, lead(t.time, 1, null) over(partition by t.id order by t.id) ne...原创 2020-10-27 18:22:13 · 459 阅读 · 0 评论 -
java代码调用http接口
整合了两种请求方式,特此写下来供日后使用。//通过get请求public void get() { try { URL thisurl = new URL(URL); // 把字符串转换为URL请求地址 HttpURLConnection connection = (HttpURLConnection) thisurl ...转载 2018-12-14 16:11:34 · 929 阅读 · 0 评论 -
计算某行代码运行时间
long start = System.currentTimeMillis();----------代码行------------long end = System.currentTimeMillis();System.out.println(href);System.out.println("运行时间:" + (end - start) + "毫秒"); ...转载 2018-12-14 17:48:17 · 1091 阅读 · 0 评论 -
java中list去除重复项
List<String> list= new ArrayList<>();list= list.stream().distinct().collect(Collectors.toList());原创 2019-01-07 17:42:11 · 436 阅读 · 0 评论 -
ubuntu下安装chrome
第一步:下载.deb包32位 $wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb64bit $wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb第二步:下载好之后安装...原创 2019-01-24 11:09:41 · 1132 阅读 · 0 评论