华为电脑切换热键/功能键
3月 27, 2024 |
Nix.Huang
f1~f91和上排的媒体键切换 很多电脑都是通过集成到bios,或者mobility center来完成的。傻 […more]
f1~f91和上排的媒体键切换 很多电脑都是通过集成到bios,或者mobility center来完成的。傻 […more]
VarHandle是用来代替Unsafe获取和修改对象的字段 private int state; priva […more]
Caused by: java.lang.ClassNotFoundException: org.slf4j. […more]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
@Configuration public class Config { //将Integer 映射未枚举处理器 @MappedTypes({MState.class}) @MappedJdbcTypes(value ={JdbcType.TINYINT, JdbcType.INTEGER}) public static class MStateTypeHandler extends EnumOrdinalTypeHandler<MState> { public MStateTypeHandler() { super(MState.class); } } //JSON处理器 @MappedTypes({EventHandlingContext.class}) @MappedJdbcTypes(value ={JdbcType.VARCHAR, JdbcType.UNDEFINED}) public static class EventHandlingContextHandler extends FastjsonTypeHandler { public EventHandlingContextHandler() { super((Class)EventHandlingContext.class); } } //将处理器注册未bean @Bean public MStateTypeHandler getTypeHandlerForMState() { return new MStateTypeHandler(); } @Bean public FastjsonTypeHandler getJsonTypeHandler() { return new EventHandlingContextHandler(); } } |
ll /proc/{pid} 输出中, exe ->; ‘/usr/bin/-bash (deleted […more]
最近将IDEA 升级到IntelliJ IDEA 2022.3.1后原来可以运行的工程启动报: java: l […more]
java代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
CloseableHttpClient httpClient = HttpClients.createDefault(); HttpPost post = new HttpPost(url); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.setBoundary("123456789"); builder.setCharset(java.nio.charset.Charset.forName("UTF-8")); builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); // 文件流 builder.addBinaryBody("file", getInputStream(), ContentType.DEFAULT_BINARY, "xyz.txt"); builder.addPart("type", new StringBody("0", ContentType.TEXT_PLAIN)); //Finally post.setEntity(builder.build()); CloseableHttpResponse response = httpClient.execute(post); response.getEntity().writeTo(System.out); |
生成的报文 POST /ebo […more]
VUE ref vs reactive API 两个函数都能用于创建reactive object, reac […more]
Typora 使用Pandoc库完成导出工作, 但是Pandoc 的用户手册说使用如下命令生成模板 pando […more]
javascript Promise async await 概述 Promise: 解决callback嵌套 […more]