上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: 1. 使用内联样式和响应式数据 步骤一:创建响应式数据来存储背景图片的 URL在script setup中,可以使用ref来创建一个响应式的变量来存储背景图片的 URL。 <template> <div> <button @click="changeBackground">更换背景图片</butto 阅读全文
posted @ 2024-11-11 18:19 lytcreate 阅读(601) 评论(0) 推荐(0)
摘要: template部分: <el-avatar shape="square" :size="50" :fit="fit" :src="avatarImg" class="avatar-with-border-image"/> style部分: .avatar-with-border-image { p 阅读全文
posted @ 2024-11-09 17:21 lytcreate 阅读(157) 评论(0) 推荐(0)
摘要: 装饰器如下: def calc_note_vip(view_func): def wrapper(request, *args, **kwargs): # 这里可以在视图函数执行前进行一些操作 response = view_func(request, *args, **kwargs) # 这里可以 阅读全文
posted @ 2024-11-09 13:50 lytcreate 阅读(27) 评论(0) 推荐(0)
摘要: def get_client_ip(request): x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR') if x_forwarded_for: ip = x_forwarded_for.split(',')[0] else: ip 阅读全文
posted @ 2024-11-09 00:46 lytcreate 阅读(47) 评论(0) 推荐(0)
摘要: 代码如下: import geoip2.database def get_city_info(ip_address): reader = geoip2.database.Reader('C:\\Users\lytcreate\Downloads\\222\GeoLite2-City.mmdb') t 阅读全文
posted @ 2024-11-09 00:31 lytcreate 阅读(316) 评论(0) 推荐(0)
摘要: from PIL import Image # 1寸照片的尺寸(单位:像素,这里以300dpi为例) width = 295 height = 413 # 打开原始图片 image = Image.open('your_image.jpg') # 计算缩放比例 image_width, image_ 阅读全文
posted @ 2024-11-08 11:12 lytcreate 阅读(130) 评论(0) 推荐(0)
摘要: 情况说明: select * from aaaa WHERE column='aa' limit 79980, 10; 当数据量特别大的时候,就会查询比较缓慢 优化方向: 前提是有一个索引id,先查询索引id,然后再查询id对应的数据 select id from aaaa WHERE column 阅读全文
posted @ 2024-11-01 17:37 lytcreate 阅读(102) 评论(0) 推荐(0)
摘要: data_frame['aa'] = pd.to_numeric(data_frame['aaa'], errors='coerce') 阅读全文
posted @ 2024-11-01 17:32 lytcreate 阅读(28) 评论(0) 推荐(0)
摘要: provide('getMenuInfo', getMenuInfo); 父页面代码如上,provide从vue导入, getMenuInfo既是方法也是导出的名称子页面使用: const getMenuInfo = inject<() => void>('getMenuInfo'); 在子页面的任 阅读全文
posted @ 2024-11-01 00:04 lytcreate 阅读(199) 评论(0) 推荐(0)
摘要: 方法一:抽象类版 import base64 from Crypto.Cipher import AES class EncryptDate: def __init__(self, key): self.key = key.encode('utf-8') # 初始化密钥 self.length = 阅读全文
posted @ 2024-10-29 11:50 lytcreate 阅读(362) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 13 下一页