work hard work smart

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

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 阅读(76) 评论(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 阅读(92) 评论(0) 推荐(0)

2022年4月1日

摘要: 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 阅读(289) 评论(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 阅读(35) 评论(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 阅读(69) 评论(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 阅读(82) 评论(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 阅读(203) 评论(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 阅读(172) 评论(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 阅读(409) 评论(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 阅读(50) 评论(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 阅读(35) 评论(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 阅读(47) 评论(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 阅读(40) 评论(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 阅读(63) 评论(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 阅读(56) 评论(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 阅读(96) 评论(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 阅读(130) 评论(0) 推荐(0)

摘要: Vert.x 最大的特点在于异步(底层基于Netty),通过事件循环(EventLoop)来调起存储在异步任务队列(CallBackQueue)中的任务,大大降低了传统阻塞模型中线程对操作系统的开销。异步模型能够很大程度的提高系统的并发量。 1、Vertx能做什么 Java能做的,Vert.x 都能 阅读全文

posted @ 2022-02-15 10:34 work hard work smart 阅读(1421) 评论(0) 推荐(0)

2022年2月14日

摘要: Vertx底层通信框架依赖于Netty,并封装了对Http协议的支持,因此可以非常方便的进行Web开发,且不依赖于任何中间件。 下面简单实现一个HttpServer 1、引入依赖 <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-c 阅读全文

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

2022年2月13日

摘要: 一、lua基本语法 1、lua注释 --[[ print("hello lua"); --]] 2、lua标识符 标识符以一个字母A到Z,或者a到z或下划线,开头后加上0个或者多个字母,下划线,数字(0到9) 最好不要使用下划线加大写字母的标识符,因为lua的保留字也是这样的。 Lua不允许使用特殊 阅读全文

posted @ 2022-02-13 20:10 work hard work smart 阅读(427) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 59 下一页