12 2022 档案

摘要:utils/http.js import axios from "axios"; const http = axios.create({ withCredentials: false, timeout: 30000, baseURL: "http://127.0.0.1:8000", headers 阅读全文
posted @ 2022-12-28 17:03 carol2014 阅读(367) 评论(0) 推荐(0)
摘要:安装 #运行时依赖 package.json的dependencies npm install sweetalert2 --save #开发时依赖 package.json的devDependencies npm install sweetalert2 --save-dev 新建utils/swee 阅读全文
posted @ 2022-12-28 16:32 carol2014 阅读(259) 评论(0) 推荐(0)
摘要:之前有使用过bootstrap做过一个简单的加载遮罩层,现把它加入到vue中。 加载遮罩层一般来讲整个app共用一个就可以,因此放到App.vue中,为不影响其它的业务逻辑,放到</template>标签前面 <script setup> import "bootstrap/dist/css/boo 阅读全文
posted @ 2022-12-28 16:06 carol2014 阅读(506) 评论(0) 推荐(0)
摘要:使用自动化构建工具vite搭建新项目 #某个目录下执行 npm create vite@latest 按照提示初始化项目,并按照提示: cd vite-project npm install npm run dev 生成目录结构如下: 安装常用的类库 npm install vue-router - 阅读全文
posted @ 2022-12-28 15:35 carol2014 阅读(130) 评论(0) 推荐(0)
摘要:Laravel 文档里面关于 Sanctum 和 Fortify 的介绍 Laravel Sanctum 为 SPA(单页应用程序)、移动应用程序和基于令牌的、简单的 API 提供轻量级身份验证系统。Sanctum 允许应用程序的每个用户为他们的帐户生成多个 API 令牌。这些令牌可以被授予指定允许 阅读全文
posted @ 2022-12-28 14:18 carol2014 阅读(965) 评论(0) 推荐(0)
摘要:最近要做一个类似于数据看板的页面,使用bootstrap5做基础的样式,一个页面划分为n个长宽不一的大小方块,需求要求背景色不用单色,要用渐变色,看起来会比较有质感,特意研究了下css的渐变色,这里记录下。 线性渐变 background-image: linear-gradient(directi 阅读全文
posted @ 2022-12-16 15:14 carol2014 阅读(1208) 评论(0) 推荐(0)
摘要:最近要做发送邮件的功能,发送邮件的功能还是比较简单的,可以使用 PHPMailer 包。 $mail = new PHPMailer\PHPMailer(); try { $mail->addaddress('username@mail.com'); $mail->CharSet = 'UTF-8' 阅读全文
posted @ 2022-12-16 15:01 carol2014 阅读(569) 评论(0) 推荐(0)
摘要:基于 bootstrap 简单的 loading 遮罩层 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 阅读全文
posted @ 2022-12-12 17:05 carol2014 阅读(1635) 评论(0) 推荐(0)
摘要:jquery.dataTables使用ajax数据源 <script type="text/javascript" language="javascript" src="./plugins/jquery/jquery-1.12.4.min.js"></script> <script type="te 阅读全文
posted @ 2022-12-12 16:54 carol2014 阅读(361) 评论(0) 推荐(0)
摘要:一些频繁触发的事件,我们不想让它频繁执行,比如 keyup scroll resize mousemove,可以使用防抖节流技术。 防抖:动作执行停止后间隔一定的时间执行,应用场景: 搜索框联想 节流:不管执行的频率有多高,需要间隔一定的时间执行一次,应用场景:向下滚动加载数据 防抖和节流的区别: 阅读全文
posted @ 2022-12-07 11:02 carol2014 阅读(1387) 评论(0) 推荐(0)
摘要:连接 try { $dsn = "mysql:host=127.0.0.1;port=3306;dbname=test;charset=utf8"; $user = "root"; $password = ""; #持久连接 $pdo = new PDO($dsn, $user, $password 阅读全文
posted @ 2022-12-06 16:00 carol2014 阅读(121) 评论(0) 推荐(0)
摘要:常用正则基础规则 . 匹配除换行符(\n、\r)之外的任何单个字符 \s 是匹配所有空白符,包括换行 \S 非空白符,不包括换行 \w 匹配字母、数字、下划线。等价于 [A-Za-z0-9_] \W 匹配非字母、数字、下划线。等价于 '[^A-Za-z0-9_]'。 \d 匹配任意一个阿拉伯数字。等 阅读全文
posted @ 2022-12-04 12:30 carol2014 阅读(94) 评论(0) 推荐(0)
摘要:SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 原始代码 for x in os.listdir('C:\Users\Administrator\Desktop\files'): pr 阅读全文
posted @ 2022-12-04 11:58 carol2014 阅读(42) 评论(0) 推荐(0)
摘要:水平对齐 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <style> div { margin: 1rem; } /* 文本居中 */ .text-center { text-align: center; border: 1px so 阅读全文
posted @ 2022-12-02 17:11 carol2014 阅读(258) 评论(0) 推荐(0)
摘要:部分配置项 <link href="./plugins/fullcalendar-5.11.2/lib/main.css" rel="stylesheet" /> <script type="text/javascript" language="javascript" src="./plugins/ 阅读全文
posted @ 2022-12-02 16:55 carol2014 阅读(2819) 评论(0) 推荐(0)
摘要:使用 js 组件 fullcalendar 构建简单会议室预约页面 <link href="./plugins/fullcalendar-5.11.2/fullcalendar-scheduler/main.min.css" rel="stylesheet" /> <script type="tex 阅读全文
posted @ 2022-12-02 16:37 carol2014 阅读(1067) 评论(0) 推荐(0)
摘要:使用 js 判断时间区间是否重叠 <script> const range = [ { st: "2022-11-29 10:00", et: "2022-11-29 11:00", }, { st: "2022-11-29 15:00", et: "2022-11-29 19:00", }, ]; 阅读全文
posted @ 2022-12-02 16:29 carol2014 阅读(1295) 评论(0) 推荐(0)
摘要:PHP Intelephense :php 代码格式化,代码提示等功能 PHP Server:打开一个 php 文件,右键即可开启一个 server,并在默认浏览器中运行当前文件 Laravel Blade formatter:laravel 框架 blade 文件格式化 python、Black 阅读全文
posted @ 2022-12-02 16:27 carol2014 阅读(728) 评论(0) 推荐(0)
摘要:import csv import seaborn as sns import matplotlib.pyplot as plt # 解决中文不显示和负号不显示问题 rc = { 'font.family': 'Microsoft YaHei', 'axes.unicode_minus': Fals 阅读全文
posted @ 2022-12-02 16:12 carol2014 阅读(75) 评论(0) 推荐(0)
摘要:pip install xlsxwriter xlsxwriter 生成的文件后缀名为.xlsx,最大能够支持 1048576 行数据,16384 列数据 import os import xlsxwriter import datetime if os.path.exists('./gen-fil 阅读全文
posted @ 2022-12-02 16:06 carol2014 阅读(465) 评论(0) 推荐(1)
摘要:pip install openpyxl openpyxl 读写 xlsx 文件,不处理 xls 文件 读文件 import openpyxl # 打开xlsx文件 excel = openpyxl.load_workbook('./source-files/info.xlsx') for shee 阅读全文
posted @ 2022-12-02 16:03 carol2014 阅读(1065) 评论(0) 推荐(0)
摘要:最新要处理excel文件,于是整理了下python3中常用操作excel的包的用法 pip 用法 # 查看已安装 pip list # 安装包 pip install xlrd # 安装指定版本 pip install xlrd==1.2.0 # 卸载 pip uninstall xlrd xlrd 阅读全文
posted @ 2022-12-02 15:59 carol2014 阅读(413) 评论(0) 推荐(0)