- 安装
vscode-go
插件:
> ext install Go
- 安装
go tools
:
> Go Install/Update Tools
private void cleanDeadData(List<BcpResend> list) { | |
java.util.Set<String> grupingThanFilter = | |
list.stream().collect(Collectors.collectingAndThen(Collectors.groupingBy(BcpResend::getCid, Collectors.counting()), map -> { | |
map.values().removeIf(l -> l < 50); | |
return map.keySet(); | |
})); | |
grupingThanFilter.forEach(cid -> { | |
repository.deleteByCid(cid); | |
}); | |
} |
private String readFirstLine(String filename) throws IOException { | |
return Files.readFirstLine(new File(Resources.getResource(filename).getFile()), StandardCharsets.UTF_8); | |
} |
ps -ef | awk '/[a]zkaban.jobid=234719041867038727/{print $2}' |
ImmutableMap.<String, String>builder() | |
.put("name", r.name()) | |
.put("description", r.getDescription()) | |
.build() |
split(Paths.get("file"), 100).forEach(this::sendRequest); | |
void sendRequest(List<String> each) { | |
// then you must send the rest request in parallel here | |
} | |
Stream<List<String>> split(Path path, int limit) throws IOException { | |
// skip the remaining lines if its size < limit | |
return split(Files.lines(path), limit, true); | |
} |
<plugins> | |
<!-- com.github.pagehelper为PageHelper类所在包名 --> | |
<plugin interceptor="com.github.pagehelper.PageInterceptor"> | |
<!-- 使用下面的方式配置参数,后面会有所有的参数介绍 --> | |
<property name="supportMethodsArguments" value="true"/> | |
<property name="params" value="pageNum=pageNumKey;pageSize=pageSizeKey;"/> | |
</plugin> | |
</plugins> | |
List<Country> selectByPageNumSize( |
# mybatis-config.xml | |
<configuration> | |
<mapper> | |
<mapper resource="mybatis-cfg/TaskMapper.xml"/> | |
</mapper> | |
</configuration> | |
#spring-config.xml | |
<context:annotation-config /> | |
<tx:annotation-driven/> |
@requestMapping(value="/upload",mmethod=requestMethod.post) | |
public ImportResult uploadCsv(@RequestParam("file") MultipartFile multipartFile) { | |
} |
/** | |
* 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具 | |
* | |
* 参考 https://github.com/wandergis/coordtransform 实现的Java版本 | |
* @author geosmart | |
*/ | |
public class CoordinateTransformUtil { | |
static double x_pi = 3.14159265358979324 * 3000.0 / 180.0; | |
// π | |
static double pi = 3.1415926535897932384626; |