上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
摘要: 坑1,用Array.asList转换基础类型数组 代码 @Slf4j public class ArrayAsListDemo { public static void intArrayToList() { int[] arr = {1, 2, 3}; List list = Arrays.asLi 阅读全文
posted @ 2020-04-19 16:34 xuan_wu 阅读(2360) 评论(0) 推荐(3) 编辑
摘要: 实体类 class Point { private int x; private int y; public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; 阅读全文
posted @ 2020-04-16 23:38 xuan_wu 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 代码 @Slf4j public class StringCompareDemo { public static void compare() { String a = "1"; String b = "1"; log.info("\nString a = \"1\";\n" + "String b 阅读全文
posted @ 2020-04-16 23:00 xuan_wu 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 实例级别的锁 实例代码 @Slf4j public class AddCompareDemo { private int a, b; public void add() { for (int i = 0; i < 10000; i++) { a++; b++; } } public void com 阅读全文
posted @ 2020-04-15 23:38 xuan_wu 阅读(356) 评论(0) 推荐(0) 编辑
摘要: ThreadLocal ThreadLocal 适用于变量在线程间隔离,而在方法或类间共享的场景。 代码 1 @RestController 2 public class ThreadLocalController { 3 private static final ThreadLocal<Strin 阅读全文
posted @ 2020-04-15 22:50 xuan_wu 阅读(769) 评论(0) 推荐(0) 编辑
摘要: newFixedThreadPool @Slf4j public class TheadPoolDemo { private static ThreadPoolExecutor threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPoo 阅读全文
posted @ 2020-04-14 23:30 xuan_wu 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 代码 1 @Slf4j 2 public class IntegerCompare { 3 public static void doCompare() { 4 5 Integer a = 127; //Integer.valueOf(127) 6 Integer b = 127; //Intege 阅读全文
posted @ 2020-04-13 22:37 xuan_wu 阅读(904) 评论(0) 推荐(0) 编辑
摘要: C语言代码 #include <stdio.h> int main() { printf("hello, world\n"); return 0; } GCC编译 gcc -o hello hello.c 会得到一个hello的可执行二进制文件 执行 ./hello 打印出hello, world 阅读全文
posted @ 2020-03-29 16:09 xuan_wu 阅读(317) 评论(0) 推荐(0) 编辑
摘要: NFS服务的启动和配置 配置 IP和括号之间不能有空格。确保与/data/share文件夹 所有人都可以访问 启动服务 客户端查看服务 挂载到mnt 阅读全文
posted @ 2020-02-17 21:10 xuan_wu 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 安装 配置文件 share共享对外的信息 smb用户设置 smb服务启动和访问 查看配置文件 添加同名用户 一定要和本地用户同名。 挂载 密码是smb user1的密码,不是linux用户的密码 卸载 阅读全文
posted @ 2020-02-17 20:37 xuan_wu 阅读(96) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页