work hard work smart

专注于Java后端开发。 不断总结,举一反三。
随笔 - 1158, 文章 - 0, 评论 - 153, 阅读 - 186万
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

04 2022 档案

摘要:1、阿里Java诊断工具 arthas - 排查线上环境内存使用过大、线程cpu使用率高问题 https://blog.csdn.net/qq_43692950/article/details/122688520 2、user case https://github.com/alibaba/arth 阅读全文

posted @ 2022-04-12 18:21 work hard work smart 阅读(102) 评论(0) 推荐(0) 编辑

摘要:LockSupport是JDK中比较底层的类,用来创建锁和其他同步工具类的基本线程阻塞原语。java锁和同步框架AQS:AbstractQueuedSynchronizer,就是通过LockSupport.park() 和 LockSupport.unpark() 实现线程阻塞和唤醒的。 LockS 阅读全文

posted @ 2022-04-12 13:53 work hard work smart 阅读(34) 评论(0) 推荐(0) 编辑

摘要:Exchanger(交换者),它是用于线程间的协作工具类,主要用于线程间数据的交换。它提供了一个同步点,在这个同步点,两个线程可以交换彼此的数据。 代码如下: public class ExchangerTest { private static final Exchanger<String> ex 阅读全文

posted @ 2022-04-12 10:27 work hard work smart 阅读(45) 评论(0) 推荐(0) 编辑

摘要:CyclicBarrier,通过设置屏障的方式使得多线程同步,能够控制多个线程在屏障处等等其他线程也执行到屏障点,可以实现CountDownLatch具有的功能,但是比CountDownLatch功能强大; CyclicBarrier即同步屏障,它主要功能是让一组线程达到一个屏障(也可以称为同步点) 阅读全文

posted @ 2022-04-12 10:13 work hard work smart 阅读(49) 评论(0) 推荐(0) 编辑

摘要:CountDownLatch,它是一种计数器的方式保证线程同步;它不去控制多个线程之间的前后关系,只保证某一线程能够在这些子线程执行完之后再执行。 CountDownLatch类似于计数器的方式,用于等待一个或多个线程执行完操作开始自身代码的执行。 其构造函数接收一个int类型的整数作为计数器而使用 阅读全文

posted @ 2022-04-12 09:55 work hard work smart 阅读(41) 评论(0) 推荐(0) 编辑

摘要:1、安装Python 安装 python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose pip install -U scikit-learn 效果图: 运行结果: 完整代码: from 阅读全文

posted @ 2022-04-08 17:09 work hard work smart 阅读(110) 评论(0) 推荐(0) 编辑

摘要:FTP介绍 FTP是FILE Transfer Protocol 文件传输协议,用于在Internet上控制文件的双向传输。 小公司用的多,大企业不用FTP,因为不安全。 1、安装vsftpd yum install -y vsftpd 2、创建一个普通的系统用户 useradd -s /sbin/ 阅读全文

posted @ 2022-04-06 11:18 work hard work smart 阅读(55) 评论(0) 推荐(0) 编辑

摘要:在/home/study/weatherdata/project/idc2下创建如下文件夹 在c文件夹下,创建crtsurfdata1.cpp #include "_public.h" CLogFile logfile(10); int main(int argc, char *argv[]){ / 阅读全文

posted @ 2022-04-05 21:01 work hard work smart 阅读(74) 评论(0) 推荐(0) 编辑

摘要:Shell 在本地执行另外一台远程机器命令 sshpass -p "xxx" ssh root@192.168.238.12 << remotessh cd /tmp/test/ rm -f test.txt cat test.log | grep 'test' >> test2.txt echo 阅读全文

posted @ 2022-04-01 19:37 work hard work smart 阅读(280) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示