摘要: Express框架本身不直接提供一个全局命令,但它依赖于Node.js环境,你可以通过npm(Node包管理器)来使用Express的生成器命令,快速创建一个Express应用的基本结构。 以下是使用Express生成器的一些基本命令: 1. **安装Express生成器**: bash npm i 阅读全文
posted @ 2024-08-03 14:42 linux星 阅读(10) 评论(0) 推荐(0) 编辑
摘要: from rich.prompt import Prompt # 简单的输入提示 user_input = Prompt.ask("请输入你的名字") print(f"你好, {user_input}") from rich import print # 打印富文本 print("[bold red 阅读全文
posted @ 2024-06-24 16:34 linux星 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 1.安装: pip install zmail 2.基本使用: #导包 import zmail #邮件消息体 mail_content={ "subject":"邮件主题", "content_html":"邮件内容"} #进行邮箱验证 server=zmail.server(from_mail, 阅读全文
posted @ 2024-06-24 14:38 linux星 阅读(30) 评论(0) 推荐(0) 编辑
摘要: const transporter = nodemailer.createTransport({ host: "smtp.qq.com",// SMTP 服务器地址 port: 465,// SMTP 端口,对于 SSL 使用 465 secure: true, // 对端口465使用“true”, 阅读全文
posted @ 2024-06-24 13:33 linux星 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 以下是一些 asyncio 常用方法的代码示例,以及相应的中文说明: asyncio.run() - 运行顶层的异步函数。 async def main(): print("Hello, asyncio!") asyncio.run(main()) 中文说明:asyncio.run() 启动事件循环 阅读全文
posted @ 2024-06-24 10:46 linux星 阅读(4) 评论(0) 推荐(0) 编辑
摘要: JavaScript发送电子邮件 const nodemailer = require("nodemailer"); const transporter = nodemailer.createTransport({ host: "smtp.qq.com",// SMTP 服务器地址 port: 46 阅读全文
posted @ 2024-06-15 10:10 linux星 阅读(4) 评论(0) 推荐(0) 编辑
摘要: officegen操作word文档 const officegen = require('officegen') const fs = require('fs') // 创建一个空的Word对象: let docx = officegen('docx') // Officegen在完成生成docx文 阅读全文
posted @ 2024-06-15 09:43 linux星 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 安装 npm install exceljs 目录 导入 接口 创建工作簿 设置工作簿属性 工作簿视图 添加工作表 删除工作表 访问工作表 工作表状态 工作表属性 页面设置 页眉和页脚 工作表视图 冻结视图 拆分视图 自动筛选器 列 行 Add Rows 处理单个单元格 合并单元格 Insert R 阅读全文
posted @ 2024-06-15 09:16 linux星 阅读(939) 评论(0) 推荐(0) 编辑
摘要: 以下是如何使用 js-crawl 来爬取文本信息的基本步骤: 安装 js-crawl: 首先,确保你已经通过 npm 安装了 js-crawl。 npm install js-crawler 创建爬虫实例: 引入 js-crawl 模块并创建一个新的爬虫实例。 var Crawler = requi 阅读全文
posted @ 2024-06-15 08:28 linux星 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 安装 npm install js-crawler 用法 爬网程序提供了直观的界面来爬网网站上的链接。实例 var Crawler = require("js-crawler"); new Crawler().configure({depth: 3}) .crawl("http://www.goog 阅读全文
posted @ 2024-06-15 08:28 linux星 阅读(7) 评论(0) 推荐(0) 编辑