注解与反射 注解 注解是什么? 注解是种特殊的注释,如果说注释是给人看的话,那么注解就是给程序看的。 Java的注解可以分为三类 第一类是由编译器使用的注解,如@Override和@SuppressWarning,这类注解不会被编译进.class文件中,它们在编译后就被编译器抛弃 第二类是由工具处理 ...
分类:
其他好文 时间:
2021-03-10 13:06:18
阅读次数:
0
import time'''时间戳'''# time()时间戳,1615279063.568697秒,从1970年1月1日凌晨0点开始计时,可用于做计算print('时间戳:', time.time())'''时间戳转换为结构化时间'''# localtime()结构化时间(当地时间),按顺序是:年 ...
分类:
其他好文 时间:
2021-03-10 13:05:40
阅读次数:
0
顺序执行变为异步执行 # 导包 import multiprocessing import time def dance(): for i in range(3): print('跳舞中...') time.sleep(0.2) def sing(): for i in range(3): prin ...
分类:
编程语言 时间:
2021-03-10 13:04:45
阅读次数:
0
public class HttpServerStart { public static volatile boolean flag = false ; public static void start() { int port = 8099; EventLoopGroup bossGroup = ...
分类:
Web程序 时间:
2021-03-10 12:59:52
阅读次数:
0
# 任何对象都有一个bool值,空值或0、FALSE值除外 print(bool(0)) #Fasle print(bool(1)) # True print(bool('a')) # True print(bool('')) print(bool(None)) print(bool(dict()) ...
分类:
其他好文 时间:
2021-03-10 12:57:17
阅读次数:
0
数字基本数据类型赋值与比较 //byte y = 128;编译错误 byte j = 127;//编译通过 byte x = (byte)(127+1);//编译通过 byte g = 1+1;//编译通过 //byte h = 139+1;编译错误 short i1 = 127; System.o ...
分类:
其他好文 时间:
2021-03-10 12:55:56
阅读次数:
0
数组声明创建 声明数组变量,两种方法 int[] num; int num[]; 使用 new 创建数组 num = new int[arraySize]; 可以同时进行声明和创建数组 int[] num = new int[arraySize]; 数组初始化 静态初始化 int[] a = {1, ...
分类:
编程语言 时间:
2021-03-09 13:55:36
阅读次数:
0
练习: 输出一个a-z的随机集合,然后去重,按照a-z的顺序进行排列 方法一: print(sorted(set([chr(i) for i in range(97,123)]))) 方法二: import numpy as npa1=np.arange(97,123)b1=[chr(i) for ...
分类:
编程语言 时间:
2021-03-09 13:54:55
阅读次数:
0
Instant 类的使用 Instant 类概述 在时间线上的瞬间点。该类在时间线上建立单个瞬时点。 这可能用于在应用程序中记录事件时间戳。 now( ) 方法 //now() 获取本初子午线的时间 Instant instant = Instant.now(); System.out.printl ...
分类:
编程语言 时间:
2021-03-09 13:52:20
阅读次数:
0
1.下载安装Golang https://golang.google.cn/dl/ 一路下一步即可 2.下载安装Vscode https://visualstudio.microsoft.com/zh-hans/ 3.检查Golang是否安装成功 4.设置Golang 环境变量 go env -w ...
分类:
其他好文 时间:
2021-03-09 13:46:11
阅读次数:
0