work hard work smart

专注于AI+Java后端开发。 不断总结,举一反三。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 ··· 60 下一页

2022年4月12日

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

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

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

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

2022年4月8日

摘要: 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 阅读(177) 评论(0) 推荐(0)

2022年4月6日

摘要: 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 阅读(79) 评论(0) 推荐(0)

2022年4月5日

摘要: 在/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 阅读(122) 评论(0) 推荐(0)

2022年4月1日

摘要: Shell 在本地执行另外一台远程机器命令 sshpass -p "xxx" ssh [email protected] << 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 阅读(299) 评论(0) 推荐(0)

2022年3月28日

摘要: 1、安装gcc编译器 查看gcc版本 gcc -v 2、第一个C程序 Hello world vi demon1.c #include <stdio.h> int main(){ printf("Hello, World! \n"); return 0; } 编译 执行 C程序 gcc demon1 阅读全文

posted @ 2022-03-28 10:16 work hard work smart 阅读(37) 评论(0) 推荐(0)

2022年3月9日

摘要: 项目根目录下新建 .vscode 文件夹,然后在该文件夹下创建launch.json launch.json文件内容如下 { "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": 阅读全文

posted @ 2022-03-09 17:41 work hard work smart 阅读(80) 评论(0) 推荐(0)

2022年3月6日

摘要: 1、创建博客表Post 2、插入默认数据 3、查询 4、创建用户表 5、post表中增加user_id字段 post表增加外键。 user_id 对应的是user表中的id字段 6、用户表增加一个用户 7、插入用户 8、where 查询 阅读全文

posted @ 2022-03-06 18:54 work hard work smart 阅读(85) 评论(0) 推荐(0)

2022年2月25日

摘要: 1、动态输出 打开E:\study\openresty\openresty-1.19.9.1-win64 目录下的 conf/nginx.conf 文件 在server中增加一下代码 location /hello { default_type text/html; content_by_lua ' 阅读全文

posted @ 2022-02-25 17:51 work hard work smart 阅读(208) 评论(0) 推荐(0)

2022年2月24日

摘要: 1、OpenResty在Window下安装 1)、 下载 下载地址: https://openresty.org/cn/download.html 选择 64 位 Windows: openresty-1.19.9.1-win64.zip 2) 解压 双击 nginx.exe 3)验证 localh 阅读全文

posted @ 2022-02-24 15:56 work hard work smart 阅读(182) 评论(0) 推荐(0)

2022年2月19日

摘要: 1、fastify安装 npm i fastify --save 2、第一个服务器 main.js // 加载框架并新建实例 const fastify = require('fastify')({ logger: true }) //申明路由 fastify.get("/", function(r 阅读全文

posted @ 2022-02-19 21:07 work hard work smart 阅读(421) 评论(0) 推荐(0)

2022年2月18日

摘要: Nodejs中的函数与JavaScript类似。 匿名函数:samp11.js function execute(someFunction, value) { someFunction(value); } execute(function(word){ console.log(word) }, "H 阅读全文

posted @ 2022-02-18 15:54 work hard work smart 阅读(61) 评论(0) 推荐(0)

摘要: 创建模块 hello.js exports.world = function(){ console.log("hello world"); } 引入模块samp9.js var hello = require("./hello"); hello.world(); 执行 PS E:\study\nod 阅读全文

posted @ 2022-02-18 15:45 work hard work smart 阅读(37) 评论(0) 推荐(0)

摘要: 1、从流中读取数据 samp7.js var fs = require("fs"); var data = ''; // 创建可读流 var readerStream = fs.createReadStream('input.txt'); // 设置编码为 utf8 readerStream.set 阅读全文

posted @ 2022-02-18 15:21 work hard work smart 阅读(71) 评论(0) 推荐(0)

摘要: 1、阻塞代码 创建文件input.txt, 内容为 hello world in input.txt 创建samp3.js var fs = require("fs"); var data = fs.readFileSync('input.txt'); console.log(data.toStri 阅读全文

posted @ 2022-02-18 14:07 work hard work smart 阅读(44) 评论(0) 推荐(0)

摘要: 一、创建samp1.js 内容如下: console.log("Hello World"); 运行结果: PS E:\study\nodejs\demo1> node .\samp1.js Hello World 二、创建第一个应用 创建samp2.js var http = require("ht 阅读全文

posted @ 2022-02-18 13:03 work hard work smart 阅读(73) 评论(0) 推荐(0)

2022年2月17日

摘要: 1、下载node.js https://nodejs.org/zh-cn/download/ 我这里选择的版本为 node-v14.16.1-x64.msi 下载完成后点击安装 阅读全文

posted @ 2022-02-17 10:57 work hard work smart 阅读(61) 评论(0) 推荐(0)

2022年2月15日

摘要: 一、基本使用 1、基本路由实现 1).增加依赖包 <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-web</artifactId> <version>3.5.2</version> </dependency> 2)、创建一个Htt 阅读全文

posted @ 2022-02-15 23:37 work hard work smart 阅读(108) 评论(0) 推荐(0)

摘要: 参考: https://www.liqinglin0314.com/article/479 https://blog.csdn.net/blueheart20/article/details/51601441 阅读全文

posted @ 2022-02-15 22:57 work hard work smart 阅读(132) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 60 下一页