public class Main { public static void main(String[] args) throws Exception { // 两个CompletableFuture执行异步查询: CompletableFuture<String> cfQueryFromSina ...
分类:
编程语言 时间:
2021-04-21 12:05:09
阅读次数:
0
UDP 发短信 : 不需要连接但是需要知道对方的地址 发送消息 //不需要连接服务器 public static void main(String[] args) throws Exception { //1.建立一个socket DatagramSocket datagramSocket = ne ...
分类:
其他好文 时间:
2021-04-21 11:50:41
阅读次数:
0
1:使用 插件 geolocator ,官网 https://pub.dev/packages/geolocator 2:按照官网配置,代码照抄 static Future<FlutterLocation> determinePosition() async { bool serviceEnable ...
分类:
移动开发 时间:
2021-04-21 11:46:27
阅读次数:
0
CountDownLatch 每次当线程调用countDownLatch.countDown()方法时,会对计数器减1,减到0,countDownLatch.await()放行 public class CountDownLatchTest { public static void main(Str ...
分类:
其他好文 时间:
2021-04-20 15:06:35
阅读次数:
0
需求:点击按钮,显示文本和隐藏文本 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery 入门</title> <script src="/static/jQuery-1.11/jquery-1.11 ...
分类:
Web程序 时间:
2021-04-20 14:39:19
阅读次数:
0
1.饿汉式,这种方式不推荐,会造成资源的浪费。 public class Hungry { private Hungry(){ } private static Hungry hungry = new Hungry(); public static Hungry getInstance(){ ret ...
分类:
其他好文 时间:
2021-04-20 14:07:56
阅读次数:
0
public class Main { public static void main(String[] args) { test test = new test(); test.xxx(new zi()); } } class fu{ public void x(){ System.out.pri ...
分类:
其他好文 时间:
2021-04-20 14:06:09
阅读次数:
0
public class StatePattern { public static void main(String[] args) { Context context=new Context(); for (int i = 0; i < 10; i++) { context.handle(); } ...
分类:
其他好文 时间:
2021-04-19 16:06:54
阅读次数:
0
Java常用类:System类 System 系统类主要用于获取系统的属性数据和其他操作,构造方法私有 常用方法 方法名 说明 static void arraycopy(); 复制数组 static long currentTimeMillis(); 获取当前系统时间,返回的是毫秒值 static ...
分类:
编程语言 时间:
2021-04-19 15:47:34
阅读次数:
0
Markdown学习 1、标题 三级标题 2、字体 Hello,World!(两边+**) Hello,World!(两边+一个*) Hello,World!(两边+***) Hello,World!(两边+~~) 3、引用 选择Java走向人生巅峰(语法格式:>+空格) 4、分割线 语法格式:三个 ...
分类:
其他好文 时间:
2021-04-19 15:13:32
阅读次数:
0