上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页
摘要: 常用方法 <dl> <dt>常用方法</dt> <dd> <dl> <dt>直线(路径)</dt> <dd> <p>context.lineTo(x, y)</p> <canvas id="line" width="800" height="100"></canvas> <script> { con 阅读全文
posted @ 2024-03-01 16:40 carol2014 阅读(3) 评论(0) 推荐(0) 编辑
摘要: <style> .parent { display: grid; grid-template-columns: 25% 75%; /* grid-template-columns: 1fr 3fr; */ /* 同上 */ height: 100px; } .child { border: 1px 阅读全文
posted @ 2024-02-29 11:26 carol2014 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 最近要做一个页面:在图片上特定区域根据数值显示不同的颜色。 涉及到图片和绘图,细数下可能的解决方案:canvas、svg。由于区域并不规则且需要根据区域交互,考虑svg的方案,使用echarts画图,并找到了例子:Examples - Apache ECharts 找几个案例复习下svg的用法,以下 阅读全文
posted @ 2024-02-28 15:19 carol2014 阅读(4) 评论(0) 推荐(0) 编辑
摘要: php中的map、filter、reduce函数使用 有时候真的很头疼php中参数的位置,经常记错 $arr = [1, 2, 3, 4, 5]; // array_map — 为数组的每个元素应用回调函数 $arr_new = array_map(function ($val) { return 阅读全文
posted @ 2024-01-31 15:02 carol2014 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 最近遇到了34进制转化为10进制的问题,记录下。 将34进制的字符串'H2V'转换成为10进制数,进而转换为日期。 百度了下34进制的资料,记录如下: 34进制指以0、1、2、3、4、5、6、7、8、9、A、B、C、D、E、F、G、H、J、K、L、M、N、P、Q、R、S、T、U、V、W、X、Y、Z为 阅读全文
posted @ 2024-01-31 13:27 carol2014 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 本文内容参考 多进程 - 廖雪峰的官方网站 (liaoxuefeng.com) python进程、线程、协程 - 张岩林 - 博客园 (cnblogs.com) Python异步协程(asyncio详解) - 红后 - 博客园 (cnblogs.com) 多进程 os模块的fork() 多进程(mu 阅读全文
posted @ 2024-01-17 13:47 carol2014 阅读(14) 评论(0) 推荐(0) 编辑
摘要: For update是MySQL中用于实现行锁的一种语法,其主要作用是在SELECT查询语句中加上FOR UPDATE子句,以保证查询结果集中的每一行都被锁定,避免其他事务对这些行进行修改。 SELECT ... FROM table_name WHERE ... FOR UPDATE; 在执行Fo 阅读全文
posted @ 2024-01-11 11:31 carol2014 阅读(81) 评论(0) 推荐(0) 编辑
摘要: import matplotlib.pyplot as plt import numpy as np N = 8 i = 0 # 指定一个画板 fig = plt.figure(figsize=(20, 5 * N)) x = np.arange(0, 3 * np.pi, 0.1) y_sin = 阅读全文
posted @ 2024-01-10 16:54 carol2014 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 安装 pip install pillow 引入 from PIL import Image, ImageFilter, ImageDraw, ImageFont, ImageOps, ImageEnhance import os img_dir = "../../files/" img_gen_d 阅读全文
posted @ 2024-01-10 16:51 carol2014 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 控制结构 条件判断 n = 10 i = 2 if n == i: print("equal") elif n < i: print("lower") else: print("higher") score = 89 match score: case 100: print("level A+") 阅读全文
posted @ 2024-01-10 16:46 carol2014 阅读(3) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页