上一页 1 2 3 4 5 6 ··· 88 下一页
摘要: //微信登录 const chatWx = async (req, res) => { try { // 扫码 const onScan = (qrcode, status) => { let qrcodeImageUrl if (status ScanStatus.Waiting || statu 阅读全文
posted @ 2024-04-11 14:46 徐同保 阅读(3) 评论(0) 推荐(0) 编辑
摘要: https://wechaty.js.org/zh/docs/howto/event#friendship-event-friend-requests //微信登录 const chatWx = async (req, res) => { try { // 扫码 const onScan = (qr 阅读全文
posted @ 2024-04-11 09:59 徐同保 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 要写一个函数通过文件的MIME类型判断文件类型,你需要了解MIME类型与文件类型的对应关系。MIME类型是一种标准,用于表述文档、文件或字节流的性质和格式。下面是一个简单的JavaScript函数,该函数接收MIME类型作为参数,并返回对应的大致文件类型分类(例如:‘image’, ‘video’, 阅读全文
posted @ 2024-04-10 16:56 徐同保 阅读(2) 评论(0) 推荐(0) 编辑
摘要: const bytesToSize = (size) => { if (size < 0.1 * 1024) { //小于0.1KB,则转化成B size = size.toFixed(2) + 'B' } else if (size < 0.1 * 1024 * 1024) { // 小于0.1M 阅读全文
posted @ 2024-04-10 15:39 徐同保 阅读(0) 评论(0) 推荐(0) 编辑
摘要: https://ai.google.dev/pricing?hl=zh-cn 查询可用的model https://generativelanguage.googleapis.com/v1beta/models?key=xxx 使用postman调用 https://generativelangua 阅读全文
posted @ 2024-04-10 13:54 徐同保 阅读(1) 评论(0) 推荐(0) 编辑
摘要: // 假设我们有一个数字数组和一个条件函数 // 条件函数返回true的元素将被移动到数组的前面 let numbers = [1, 2, 3, 4, '', 6, '', 8, 9]; let condition = (value) => value ''; // 例如,我们想把偶数移动到前面 / 阅读全文
posted @ 2024-04-09 17:55 徐同保 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 在JavaScript中,使用sort函数可以按照特定的规则对数组进行排序。如果你想根据特定的条件把数组中的某些项移动到前面,你可以使用sort函数来实现这一点。以下是一个例子,演示了如何使用sort函数把满足特定条件的数组项移动到数组的前面: // 假设我们有一个数字数组和一个条件函数 // 条件 阅读全文
posted @ 2024-04-09 17:52 徐同保 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 在JavaScript中,如果你要将数组中的某一项移动到第一位,你可以使用以下几种方法。 假设我们有一个数组arr,并且想要将位于索引index的项移动到数组的第一个位置: let arr = [1, 2, 3, 4, 5]; let index = 2; // 假设我们想将3(即索引2的项)移动到 阅读全文
posted @ 2024-04-09 17:45 徐同保 阅读(66) 评论(0) 推荐(0) 编辑
摘要: html版 <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta charset="utf-8" /> <link rel 阅读全文
posted @ 2024-04-06 18:26 徐同保 阅读(2) 评论(0) 推荐(0) 编辑
摘要: https://speech.microsoft.com/audiocontentcreation 9 More Realistic AI Voices for Conversations Now Generally Available https://techcommunity.microsoft 阅读全文
posted @ 2024-04-04 18:39 徐同保 阅读(10) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 88 下一页