06 2020 档案

摘要:1、连接mysql,输入密码进入 mysql -u root -p 2、查看当前连接超时时间,一般默认是28800秒及8小时 SHOW GLOBAL VARIABLES LIKE '%timeout%'; 3、先在服务器管理器中停止Mysql服务,然后修改默认配置文件my.ini,最后重启Mysql 阅读全文
posted @ 2020-06-29 15:57 蛋挞小子 阅读(1665) 评论(0) 推荐(0)
摘要:String filePath = "指定文件写入路径"; // 例如:D:\\files\\test.txt BufferedWriter bw= new BufferedWriter (new OutputStreamWriter (new FileOutputStream (filePath, 阅读全文
posted @ 2020-06-28 18:16 蛋挞小子 阅读(595) 评论(0) 推荐(0)
摘要:public class Singleton { // volatile防止指令重排序 private volatile static Singleton instance = null; public static Singleton getInstance() { // 多线程竞争情况下,其他线 阅读全文
posted @ 2020-06-09 09:41 蛋挞小子 阅读(461) 评论(0) 推荐(0)
摘要:第一种方式: import java.util.concurrent.CountDownLatch; public class ConcurrentTest { private static CountDownLatch latch= new CountDownLatch(1); public st 阅读全文
posted @ 2020-06-08 11:32 蛋挞小子 阅读(685) 评论(0) 推荐(0)
摘要:// 需要导入包 import net.sf.json.JSONObject; // json形式的字符串 String str = "{'company':'Trump','userInfo':[{'id':1000,'name':'唐纳德·特朗普','age':'78','hobby':'发推特 阅读全文
posted @ 2020-06-03 16:56 蛋挞小子 阅读(208) 评论(0) 推荐(0)