前言
集合是Java中非常重要而且基础的内容,因为任何数据必不可少的就是该数据是如何存储的,集合的作用就是以一定的方式组织、存储数据。这里写的集合,一部分是比较常见的、一部分是不常用但是我个人平时见到过的,一些比较相似的集合(比如HashMap和Hashtable)就只讲一个,突出它们之间的区别即可。
实现Runnable接口和继承Thread可以得到一个线程类,new一个实例出来,线程就进入了初始状态。
线程调度程序从可运行池中选择一个线程作为当前线程时线程所处的状态。这也是线程进入运行状态的唯一一种方式。
阻塞状态是线程阻塞在进入synchronized关键字修饰的方法或代码块(获取锁)时的状态。
处于这种状态的线程不会被分配CPU执行时间,它们要等待被显式地唤醒,否则会处于无限期等待的状态。
处于这种状态的线程不会被分配CPU执行时间,不过无须无限期等待被其他线程显示地唤醒,在达到一定时间后它们会自动唤醒。
并发 (Concurrency):一个处理器“同时”处理多个任务
并行 (Parallelism):多个处理器 “同时”处理多个任务
1 |
|
1 |
|
1 | SELECT SCHEMA_NAME '数据库',DEFAULT_CHARACTER_SET_NAME '原字符集',DEFAULT_COLLATION_NAME '原排序规则',CONCAT('ALTER DATABASE ',SCHEMA_NAME,' CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;') '修正SQL' |
ALTER TABLE attendance1.attendance_apply MODIFY COLUMN time_span varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_apply MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_approve MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_approve MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_copy_user MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_copy_user MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_file MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_file MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_working MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE attendance1.attendance_working MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.company_manage MODIFY COLUMN update_user varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.file_Info MODIFY COLUMN file_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.file_Info MODIFY COLUMN model_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.polling MODIFY COLUMN org_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.polling MODIFY COLUMN charge_phone varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.polling MODIFY COLUMN picture varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.polling MODIFY COLUMN abarbeitung varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.team MODIFY COLUMN adderss varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.team_type MODIFY COLUMN value varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE iot_device1.video_client MODIFY COLUMN username varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE iot_device1.video_client MODIFY COLUMN password varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE iot_device1.video_client MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE iot_device1.video_client MODIFY COLUMN creator varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE iot_device1.video_client MODIFY COLUMN update_user varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN apply_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN current_approve_node varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN reason varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN remark varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN time_span varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN departure varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN destination varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply_file MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply_file MODIFY COLUMN file_save_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply_file MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_apply_file MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_approve MODIFY COLUMN approve_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_approve MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_approve MODIFY COLUMN approve_full_opinion varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_approve MODIFY COLUMN approve_remark varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_approve MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_approve MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_copy_user MODIFY COLUMN copy_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_copy_user MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_copy_user MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_copy_user MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_settings MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_settings MODIFY COLUMN name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_settings MODIFY COLUMN address varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_settings MODIFY COLUMN longitude varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_settings MODIFY COLUMN latitude varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_user MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_user MODIFY COLUMN user_id varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_working MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.attendance_working MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dangerous MODIFY COLUMN company_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dangerous MODIFY COLUMN manage_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN code varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN field varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN field_value varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN type varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN remark varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.dictionary MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.focus_user MODIFY COLUMN file_src varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.storage_tank MODIFY COLUMN creator varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.storage_tank MODIFY COLUMN update_user varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.storage_tank MODIFY COLUMN design_stock varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.template_attendance_record MODIFY COLUMN user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.template_attendance_record MODIFY COLUMN user_type varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.template_attendance_record MODIFY COLUMN clock_in_type varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.template_attendance_record MODIFY COLUMN created_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE share.template_attendance_record MODIFY COLUMN modified_user_id varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE emergency.company_category COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.company_label COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.company_manage COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.file_Info COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.garden COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.garden_company COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.label COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.polling COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.sys_dict COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.team COLLATE=utf8mb4_general_ci;
ALTER TABLE emergency.team_type COLLATE=utf8mb4_general_ci;
ALTER TABLE iot_device1.video_client COLLATE=utf8mb4_general_ci;
ALTER TABLE share.apply_user_company COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_apply COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_apply_file COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_approve COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_copy_user COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_settings COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_user COLLATE=utf8mb4_general_ci;
ALTER TABLE share.attendance_working COLLATE=utf8mb4_general_ci;
ALTER TABLE share.company_expand COLLATE=utf8mb4_general_ci;
ALTER TABLE share.dangerous COLLATE=utf8mb4_general_ci;
ALTER TABLE share.dictionary COLLATE=utf8mb4_general_ci;
ALTER TABLE share.focus_user COLLATE=utf8mb4_general_ci;
ALTER TABLE share.notice_company COLLATE=utf8mb4_general_ci;
ALTER TABLE share.notice_user COLLATE=utf8mb4_general_ci;
ALTER TABLE share.storage_tank COLLATE=utf8mb4_general_ci;
ALTER TABLE share.sys_dict COLLATE=utf8mb4_general_ci;
ALTER TABLE share.template_attendance_record COLLATE=utf8mb4_general_ci;
ALTER TABLE share.user_issue COLLATE=utf8mb4_general_ci;
ALTER TABLE share.warehouse COLLATE=utf8mb4_general_ci;
ALTER DATABASE attendance1 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance10 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance2 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance3 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance4 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance5 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance6 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance7 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance8 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER DATABASE attendance9 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
图中红色部分为受检查异常。它们必须被捕获,或者在函数中声明为抛出该异常。