文章目录
Excel的COUNTIFS函数
基本结构是:
=COUNTIFS(条件匹配查询区域1,条件1,条件匹配查询区域2,条件2,以此类推…)
Windows批量改文件名方法
新建txt文件,文件内容如下:
@echo off
REM
REM rename
REM
ren 原文件名 新文件名
ren 原文件名 新文件名
ren 原文件名 新文件名
PostgreSQL查询某张表的所有字段
select * from information_schema. columns
where table_schema='schema名' and table_name ='表名'
PostgreSQL查询某张表的所有字段名并用逗号拼接
select string_agg(column_name,',') from information_schema. columns
where table_schema='schema名' and table_name ='表名'
MyBatis的#是占位符 不能做运算,$可以做运算但是会有sql注入风险
在动态排序或者分页的时候需要用到$
Java8根据某一字段属性去重
通过TreeSet
List<Student> studentDistinctList = studentList.stream()
.collect(Collectors.collectingAndThen
(Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(t -> t.getName()))),
ArrayList::new
)
);
通过district
能是简单数据类型比如List。
Java8筛选集合数据
list stream(). filter(item->item.getId>0)
.filter(item->!StringUtils.isEmpty(item.getName()))
.collect(Collection. toList())
可以链式筛选,非常方便高效
Git解决完冲突还说没解决完,IDEA也没显示冲突文件
先用git status查看,unmerge path下面的都是有冲突的文件
前端传[“”],后端会作为大小为1集合接收,用CollectionUtil判不了空,如果sql用like的话就会查所有数据。
PostgreSQL插入更新语句
inset into 表名(列字段1,列字段2,列字段3)values(值1,值2,值3)
on conflict(唯一索引) do update set 列1=值1,列2=值