当前位置: 首页 > news >正文

将Sqlite3数据库挂在内存上处理

创作灵感:最近把小学生的口算题从2位数改到3位数,100以内四则运算练习(千纬数学)再次更新,选取难题-CSDN博客要不断刷题目,以前100以内的加减乘除也是这样刷出来的,代码如下:

import sqlite3
import random
from time import time
from pathlib import Path#导入必要的库resources_folder = Path(__file__).joinpath("../resources/").resolve()
db_filepath = resources_folder.joinpath("qwsx.db")
#db_filepath = '/storage/emulated/0/Pictures/qwsx.db'
#上面是数据库的存放位置,生成手机app请参考我以前的文章
#oppo版 需要用电脑调试应删除下面5行def gettid(s1,fh,s2,dan):conn = sqlite3.connect(db_filepath, timeout=10, check_same_thread=False)c = conn.cursor()#如果公式存在,提取tidcursor = c.execute("SELECT count(tid) from ys where s1 = ? and fh = ? and s2 = ?;", (s1,fh,s2,))row = cursor.fetchone()ctid = row[0]#如果公式不存在,插入公式到数据库if ctid == 0:c.execute("INSERT INTO ys(s1,fh,s2,dan,cs,cuo) VALUES (?,?,?,?,0,0);", (s1,fh,s2,dan,))conn.commit()cursor = c.execute("SELECT tid from ys where s1 = ? and fh = ? and s2 = ? order by tid desc;", (s1,fh,s2,))row = cursor.fetchone()tid = row[0] c.close()conn.close()return(tid)
#获取tid,题目的id
def settm(nd):    if nd ==1:jj = random.randint(0,1)elif nd ==2:jj = random.randint(0,3)if jj == 0:#为加法 s1 = random.randint(0,100)s2 = random.randint(0,(100 - s1))cvalue = str(s1) + "+" + str(s2) + "=" dan = s1 + s2hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□+" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3:cvalue = str(s1) + "+□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 > 0:#a+0=a,a-0=a,可以是+-cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号elif jj ==1:s1 = random.randint(0,100)s2 = random.randint(0,s1)cvalue = str(s1) + "-" + str(s2) + "=" dan = s1 - s2hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□-" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3:cvalue = str(s1) + "-□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 > 0:#a+0=a,a-0=a,可以是+-cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号elif jj ==2:#乘法s1 = random.randint(1,10)s2 = random.randint(0,int(100 / s1))cvalue = str(s1) + "×" + str(s2) + "="dan = s1 * s2hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□×" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3 and s2 > 0:#a*0=0,b*0=0cvalue = str(s1) + "×□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 !=1 and s1 != 0:#a*=a,a/1=a;0*a=0,0/a=0cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号elif jj ==3:s1 = random.randint(1,10)s2 = random.randint(0,int(100 / s1))s3 = s1dan = s1 * s2s1 = dans2 = s3cvalue = str(s1) + "÷" + str(s2) + "=" dan = int(s1 / s2)hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□÷" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3 and s1 > 0:#0/a=0cvalue = str(s1) + "÷□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 !=1 and s1 !=0:#a*=a,a/1=a;0*a=0,0/a=0cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号cid = 0return(jj,dan,hd,cid,tid,cvalue)i = 0
while i < 1000000:settm(2)i=i+1

上面代码就是刷题100万次,让电脑随机出题。实际能够存入数据库的题目只有1万条。所以当初刷题的时候没有考虑计算机的运行效率和对资源的消耗,从上面程序看,每运行一次就要从硬盘读取数据库文件一次。这次不知道要刷题多少次才能将3位数以内的算式。问下deepseek:

官网的罢工:

用下国家超算平台DeepSeek的:

最终答案:

两个1至3位数相加或相减,得数在0到999范围内的所有算式共有 998,001 条。

再加上200以内的乘法和除法:

经过上述计算,我们得出所有满足条件的算式共有 2000 个。

除法应该在2000个以内。

下面是随机生成的代码:

import sqlite3
import random
from time import time
from pathlib import Path
import datetime
#导入必要的库resources_folder = Path(__file__).joinpath("../resources/").resolve()
db_filepath = resources_folder.joinpath("qwsx.db")
#db_filepath = '/storage/emulated/0/Pictures/qwsx.db'
#上面是数据库的存放位置,生成手机app请参考我以前的文章
#oppo版 需要用电脑调试应删除下面5行
for j in range(0,10):# 连接到磁盘上的数据库disk_conn = sqlite3.connect(db_filepath)# 连接到内存数据库memory_conn = sqlite3.connect(':memory:')# 使用 backup API 将磁盘数据库复制到内存数据库disk_conn.backup(memory_conn)xt = 0def gettid(s1,fh,s2,dan):global xtconn = memory_connc = conn.cursor()#如果公式存在,提取tidcursor = c.execute("SELECT count(tid) from ys where s1 = ? and fh = ? and s2 = ?;", (s1,fh,s2,))row = cursor.fetchone()ctid = row[0]#如果公式不存在,插入公式到数据库if ctid == 0:c.execute("INSERT INTO ys(s1,fh,s2,dan,cs,cuo) VALUES (?,?,?,?,0,0);", (s1,fh,s2,dan,))conn.commit()# print(s1,fh,s2,dan)else:# print('与数据库存在相同')xt = xt + 1cursor = c.execute("SELECT tid from ys where s1 = ? and fh = ? and s2 = ? order by tid desc;", (s1,fh,s2,))row = cursor.fetchone()tid = row[0] c.close()return(tid)#获取tid,题目的iddef settm(nd):    if nd ==1:jj = random.randint(0,1)elif nd ==2:jj = random.randint(0,3)if jj == 0:#为加法 s1 = random.randint(0,999)s2 = random.randint(0,(999 - s1))cvalue = str(s1) + "+" + str(s2) + "=" dan = s1 + s2hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□+" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3:cvalue = str(s1) + "+□=" + str(dan) + ",□为"dan = s2elif ii == 4 and s2 > 0:#a+0=a,a-0=a,可以是+-cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号elif jj ==1:s1 = random.randint(0,999)s2 = random.randint(0,s1)cvalue = str(s1) + "-" + str(s2) + "=" dan = s1 - s2hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□-" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3:cvalue = str(s1) + "-□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 > 0:#a+0=a,a-0=a,可以是+-cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号elif jj ==2:#乘法s1 = random.randint(1,200)s2 = random.randint(0,int(200 / s1))cvalue = str(s1) + "×" + str(s2) + "="dan = s1 * s2hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□×" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3 and s2 > 0:#a*0=0,b*0=0cvalue = str(s1) + "×□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 !=1 and s1 != 0:#a*=a,a/1=a;0*a=0,0/a=0cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号elif jj ==3:s1 = random.randint(1,200)s2 = random.randint(0,int(200 / s1))s3 = s1dan = s1 * s2s1 = dans2 = s3cvalue = str(s1) + "÷" + str(s2) + "=" dan = int(s1 / s2)hd = 1tid = gettid(s1,jj,s2,dan)ii = random.randint(0,4) #0为提交答案if ii == 2:cvalue = "□÷" + str(s2) + "=" + str(dan) + ",□为"dan = s1elif ii == 3 and s1 > 0:#0/a=0cvalue = str(s1) + "÷□=" + str(dan) + ",□为"dan = s2elif ii ==4 and s2 !=1 and s1 !=0:#a*=a,a/1=a;0*a=0,0/a=0cvalue = str(s1) + "□" + str(s2) + "=" + str(dan) + ",□为"dan = jjhd = 4 #hd4为符号cid = 0return(jj,dan,hd,cid,tid,cvalue)print(datetime.datetime.now())i = 0while i < 50000:settm(1)i=i+1print(f'与原来数据库存在{xt}个相同。')print(datetime.datetime.now())# 将内存数据库的内容写回磁盘数据库memory_conn.backup(disk_conn)# 关闭连接disk_conn.close()memory_conn.close()

这样要形成一个随机的表,太慢了,运行了半天:

2025-02-12 23:19:25.515728
与原来数据库存在25585个相同。
2025-02-13 00:10:52.646772
2025-02-13 00:10:52.894585
与原来数据库存在26770个相同。
2025-02-13 01:04:37.832301
2025-02-13 01:04:38.108767
与原来数据库存在27902个相同。
2025-02-13 02:01:26.172076
2025-02-13 02:01:26.429696
与原来数据库存在28961个相同。
2025-02-13 03:01:18.825697
2025-02-13 03:01:19.081742
与原来数据库存在30000个相同。
2025-02-13 04:03:55.562965
2025-02-13 04:03:55.833989
与原来数据库存在30767个相同。
2025-02-13 05:09:20.222007
2025-02-13 05:09:20.711048
与原来数据库存在31616个相同。
2025-02-13 06:16:58.876971
2025-02-13 06:16:59.169436
与原来数据库存在32288个相同。
2025-02-13 07:27:02.256963
2025-02-13 07:27:02.546013
与原来数据库存在33187个相同。
2025-02-13 08:42:14.837606
2025-02-13 08:42:15.139579
与原来数据库存在33747个相同。
2025-02-13 09:57:30.281790

而且,接下来要生成数据库不存在的公式,将越来越少。所以不如按顺序全部生成,不用1分钟就完成:

import sqlite3
import random
from time import time
from pathlib import Path
import datetime
#导入必要的库resources_folder = Path(__file__).joinpath("../resources/").resolve()
db_filepath = resources_folder.joinpath("qwsx.db")
#db_filepath = '/storage/emulated/0/Pictures/qwsx.db'
#上面是数据库的存放位置,生成手机app请参考我以前的文章
#oppo版 需要用电脑调试应删除下面5行# 连接到磁盘上的数据库
disk_conn = sqlite3.connect(db_filepath)# 连接到内存数据库
memory_conn = sqlite3.connect(':memory:')# 使用 backup API 将磁盘数据库复制到内存数据库
disk_conn.backup(memory_conn)def gettid(s1,fh,s2,dan):conn = memory_connc = conn.cursor()#如果公式存在,提取tidc.execute("INSERT INTO ysall(s1,fh,s2,dan,cs,cuo) VALUES (?,?,?,?,0,0);", (s1,fh,s2,dan,))conn.commit()c.close()return(1)
#获取tid,题目的id
def settm(jj):if jj == 0:#为加法 for s1 in range(0,1000):for s2 in range(0,(1000 - s1)):dan = s1 + s2tid = gettid(s1,jj,s2,dan)cvalue = str(s1) + "+" + str(s2) + "=" + str(dan)print(cvalue)elif jj ==1:for s1 in range(0,1000):for s2 in range(0,s1 + 1):dan = s1 - s2tid = gettid(s1,jj,s2,dan)cvalue = str(s1) + "-" + str(s2) + "=" + str(dan)print(cvalue)elif jj ==2:#乘法for s1 in range(1,201):for s2 in range(0,int(200 / s1) + 1):dan = s1 * s2tid = gettid(s1,jj,s2,dan)cvalue = str(s1) + "×" + str(s2) + "=" + str(dan)print(cvalue)elif jj ==3:ii = 0for s1 in range(1,201):# print(s1)s3 = s1for s2 in range(0,int(200 / s1) + 1):ii = ii + 1# print(s3)dan = s1 * s2ss1 = danss2 = s3sdan = int(ss1 / ss2)tid = gettid(ss1,jj,ss2,sdan)cvalue = str(ss1) + "÷" + str(ss2) + "=" + str(sdan)print(cvalue)print(ii)return(jj,dan,tid,cvalue)
print(datetime.datetime.now())
settm(3)
print(datetime.datetime.now())
# 将内存数据库的内容写回磁盘数据库
memory_conn.backup(disk_conn)# 关闭连接
disk_conn.close()
memory_conn.close()

在对这些数据进行随机写入:

# -*- coding: utf-8 -*-
"""
Created on Thu Feb 13 10:47:16 2025@author: YBK
"""
import sqlite3
import random
from pathlib import Pathresources_folder = Path(__file__).joinpath("../resources/").resolve()
db_filepath = resources_folder.joinpath("qwsx.db")
# 连接到磁盘上的数据库
disk_conn = sqlite3.connect(db_filepath)
# 连接到内存数据库
memory_conn = sqlite3.connect(':memory:')
# 使用 backup API 将磁盘数据库复制到内存数据库
disk_conn.backup(memory_conn)conn = memory_conn
c = conn.cursor()
#如果公式存在,提取tid
cursor = c.execute("SELECT tid from ysall;")
rows = cursor.fetchall()
ysshun = [row[0] for row in rows]
print(len(ysshun))
random.shuffle(ysshun)
for tid in ysshun:cursor = c.execute("SELECT s1,fh,s2,dan from ysall where tid = ?;",(tid,))row = cursor.fetchone()c.execute("INSERT INTO ys(s1,fh,s2,dan,cs,cuo) VALUES (?,?,?,?,0,0);", (row[0],row[1],row[2],row[3],))conn.commit()
c.close# 将内存数据库的内容写回磁盘数据库
memory_conn.backup(disk_conn)# 关闭连接
disk_conn.close()
memory_conn.close()

不用1分钟就能完成。

######################################################

因为我原来数据库有2位数的加减乘除算式,所以这次只是将3位数的算式加上去,为保留原有数据的内容,只需要对原来数据中没有的数据加上去就可以,为了提高速度,在生成随机列表后,对原有公式一致的tid删除即可,删除1万来行。

# -*- coding: utf-8 -*-
"""
Created on Thu Feb 13 10:47:16 2025@author: YBK
"""
import sqlite3
import random
from pathlib import Pathresources_folder = Path(__file__).joinpath("../resources/").resolve()
db_filepath = resources_folder.joinpath("qwsx.db")
# 连接到磁盘上的数据库
disk_conn = sqlite3.connect(db_filepath)
# 连接到内存数据库
memory_conn = sqlite3.connect(':memory:')
# 使用 backup API 将磁盘数据库复制到内存数据库
disk_conn.backup(memory_conn)conn = memory_conn
c = conn.cursor()
#如果公式存在,提取tid
cursor = c.execute("SELECT tid from ysall;")
rows = cursor.fetchall()
ysshun = [row[0] for row in rows]
print(len(ysshun))
random.shuffle(ysshun)
#找出所有旧数据库有的tid,在列表中删除掉
cursor = c.execute("SELECT s1,fh,s2,dan from ys;")
rows = cursor.fetchall()
for row in rows:s1 = row[0]fh = row[1]s2 = row[2]cursor = c.execute("SELECT tid from ysall where s1 = ? and fh = ? and s2 = ?;", (s1,fh,s2,))row = cursor.fetchone()if row:ctid = row[0]        ysshun.remove(ctid)print(f'删除{ctid}')else:print(f'{s1},{fh},{s2}不存在') 
#插入删除已经有的公式后没有的数据
for tid in ysshun:cursor = c.execute("SELECT s1,fh,s2,dan from ysall where tid = ?;",(tid,))row = cursor.fetchone()s1 = row[0]fh = row[1]s2 = row[2]dan = row[3]c.execute("INSERT INTO ys(s1,fh,s2,dan,cs,cuo) VALUES (?,?,?,?,0,0);", (s1,fh,s2,dan,))conn.commit()
c.close# 将内存数据库的内容写回磁盘数据库
memory_conn.backup(disk_conn)# 关闭连接
disk_conn.close()
memory_conn.close()

相关文章:

将Sqlite3数据库挂在内存上处理

创作灵感&#xff1a;最近把小学生的口算题从2位数改到3位数&#xff0c;100以内四则运算练习&#xff08;千纬数学&#xff09;再次更新&#xff0c;选取难题-CSDN博客要不断刷题目&#xff0c;以前100以内的加减乘除也是这样刷出来的&#xff0c;代码如下&#xff1a; impor…...

前端大屏适配方案:从设计到实现的全流程指南

引言 随着数据可视化需求的增长&#xff0c;大屏展示项目在前端开发中越来越常见。然而&#xff0c;大屏开发面临独特的挑战&#xff1a; 屏幕分辨率多样&#xff1a;从1080P到4K甚至8K&#xff0c;如何保证清晰度&#xff1f;布局复杂&#xff1a;多图表、多组件如何合理排列…...

学习总结三十二

map #include<iostream> #include<map> using namespace std;int main() {//首先创建一个map对象map<int, char>oneMap;//插入数据oneMap.insert(pair<int, char>(1, A));oneMap.insert(make_pair(2,B));oneMap.insert(map<int,char>::value_ty…...

飞书专栏-TEE文档

CSDN学院课程连接&#xff1a;https://edu.csdn.net/course/detail/39573...

linux 查看设备中的摄像头迅速验证设备号

​ 通常&#xff0c;摄像头在系统中会被识别为/dev/video*设备文件&#xff0c;比如/dev/video0、/dev/video1等。用户可能有多个摄像头&#xff0c;比如内置摄像头和外接USB摄像头&#xff0c;这时候每个摄像头会被分配不同的设备号。 1. 列出所有摄像头设备 方法 1&#xf…...

2.8 企业级训练数据构造革命:从人工标注到GPT智能标注的工业级实践指南

企业级训练数据构造革命:从人工标注到GPT智能标注的工业级实践指南 引言:数据标注——AI模型的基石与瓶颈 据2024年AI行业报告显示,高质量标注数据的获取成本占模型开发总成本的62%,且标注错误导致的模型性能下降可达40%。本文将揭示如何结合大模型能力,构建支持千万级数…...

DeepSeek的蒸馏技术:让模型推理更快

DeepSeek系列模型&#xff0c;如DeepSeek-R1-Distill-Qwen-7B&#xff0c;采用了知识蒸馏&#xff08;Knowledge Distillation&#xff09;技术&#xff0c;这是一种强大的模型压缩和优化方法。通过蒸馏&#xff0c;DeepSeek模型在保持甚至提升性能的同时&#xff0c;实现了更快…...

19.4.6 读写数据库中的二进制数据

版权声明&#xff1a;本文为博主原创文章&#xff0c;转载请在显著位置标明本文出处以及作者网名&#xff0c;未经作者允许不得用于商业目的。 需要北风数据库的请留言自己的信箱。 北风数据库中&#xff0c;类别表的图片字段在【数据表视图】中显示为Bitmap Image&#xff1…...

如何在 Elasticsearch 中设置向量搜索 - 第二部分

作者&#xff1a;来自 Elastic Valentin Crettaz 了解如何在 Elasticsearch 中设置向量搜索并执行 k-NN 搜索。 本文是三篇系列文章中的第二篇&#xff0c;深入探讨了向量搜索&#xff08;也称为语义搜索&#xff09;的复杂性以及它在 Elasticsearch 中的实现方式。 第一部分重…...

【CXX-Qt】0 Rust与Qt集成实践指南(CXX-Qt)

CXX-Qt 是一个用于在 Rust 和 Qt 之间实现安全互操作的库。与通常的 Rust Qt 绑定不同&#xff0c;它提供了一种不同的方式来桥接 Qt 代码和 Rust 代码。CXX-Qt 认识到 Qt 和 Rust 代码具有不同的习惯&#xff0c;因此不能直接从一个语言包装到另一个语言。相反&#xff0c;它使…...

C++ 设计模式-适配器模式

适配器模式示例,包括多电压支持、类适配器实现、安全校验等功能: #include <iostream> #include <memory> #include <stdexcept>// 抽象目标接口:通用电源接口 class PowerOutlet {public:virtual ~PowerOutlet() = default;virtual int outputPower() c…...

【Elasticsearch】文本分析Text analysis概述

文本分析概述 文本分析使 Elasticsearch 能够执行全文搜索&#xff0c;搜索结果会返回所有相关的结果&#xff0c;而不仅仅是完全匹配的结果。 如果你搜索“Quick fox jumps”&#xff0c;你可能希望找到包含“A quick brown fox jumps over the lazy dog”的文档&#xff0c…...

【IDEA】2017版本的使用

目录 一、常识 二、安装 1. 下载IDEA2017.exe 2. 安装教程 三、基本配置 1. 自动更新关掉 2. 整合JDK环境 3. 隐藏.idea文件夹和.iml等文件 四、创建Java工程 1. 新建项目 2. 创建包结构&#xff0c;创建类&#xff0c;编写main主函数&#xff0c;在控制台输出内容。…...

ES6 Proxy 用法总结以及 Object.defineProperty用法区别

Proxy 是 ES6 引入的一种强大的拦截机制&#xff0c;用于定义对象的基本操作&#xff08;如读取、赋值、删除等&#xff09;的自定义行为。相较于 Object.defineProperty&#xff0c;Proxy 提供了更灵活、全面的拦截能力。 1. Proxy 语法 const proxy new Proxy(target, hand…...

数据结构——【二叉树模版】

#思路 1、二叉树不同于数的构建&#xff0c;在树节点类中&#xff0c;有数据&#xff0c;左子结点&#xff0c;右子节点三个属性&#xff0c;在树类的构造函数中&#xff0c;添加了变量maxNodes&#xff0c;用于后续列表索引的判断 2.GetTreeNode()函数是常用方法&#xff0c;…...

关闭浏览器安全dns解决访问速度慢的问题

谷歌浏览器加载速度突然变慢了&#xff1f;检查安全DNS功能(DoH)是否被默认开启。 谷歌浏览器在去年已经推出安全DNS功能(即DoH) , 启用此功能后可以通过加密的DNS增强网络连接安全性。例如查询请求被加密后网络运营商将无法嗅探用户访问的地址&#xff0c;因此对于增强用户的…...

【AIGC】语言模型的发展历程:从统计方法到大规模预训练模型的演化

博客主页&#xff1a; [小ᶻ☡꙳ᵃⁱᵍᶜ꙳] 本文专栏: AIGC | ChatGPT 文章目录 &#x1f4af;前言&#x1f4af;语言模型的发展历程&#xff1a;从统计方法到大规模预训练模型的演化1 统计语言模型&#xff08;Statistical Language Model, SLM&#xff09;&#xff1a;统…...

Spring Boot 中的事务管理:默认配置、失效场景及集中配置

Spring Boot 提供了强大的事务管理功能&#xff0c;基于 Spring 的 Transactional 注解。本文将详细介绍事务的默认配置、事务失效的常见场景、以及事务的几种集中配置方式&#xff0c;并给出相应的代码片段。 一、事务的默认配置 在 Spring Boot 中&#xff0c;默认情况下&am…...

DeepSeek 助力 Vue 开发:打造丝滑的进度条

前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;今天给大家分享一篇文章&#xff01;并提供具体代码帮助大家深入理解&#xff0c;彻底掌握&#xff01;创作不易&#xff0c;如果能帮助到大家或者给大家一些灵感和启发&#xff0c;欢迎收藏关注哦 &#x1f495; 目录 Deep…...

deepseek的CoT优势、两阶段训练的有效性学习笔记

文章目录 1 DeepSeek的CoT思维链的优势1.2 open-r1的CoT训练数据1.3 ReAct任务与CoT任务适用场景 2 AI推理方向&#xff1a;deepseek与deepmind的两条路线的差异2.1 PRM与ORM的两大学派分支的差异2.2 DeepSeek-R1的两阶段训练概述 1 DeepSeek的CoT思维链的优势 DeepSeek跟之前…...

centos 7 部署awstats 网站访问检测

一、基础环境准备&#xff08;两种安装方式都要做&#xff09; bash # 安装必要依赖 yum install -y httpd perl mod_perl perl-Time-HiRes perl-DateTime systemctl enable httpd # 设置 Apache 开机自启 systemctl start httpd # 启动 Apache二、安装 AWStats&#xff0…...

【CSS position 属性】static、relative、fixed、absolute 、sticky详细介绍,多层嵌套定位示例

文章目录 ★ position 的五种类型及基本用法 ★ 一、position 属性概述 二、position 的五种类型详解(初学者版) 1. static(默认值) 2. relative(相对定位) 3. absolute(绝对定位) 4. fixed(固定定位) 5. sticky(粘性定位) 三、定位元素的层级关系(z-i…...

从零开始打造 OpenSTLinux 6.6 Yocto 系统(基于STM32CubeMX)(九)

设备树移植 和uboot设备树修改的内容同步到kernel将设备树stm32mp157d-stm32mp157daa1-mx.dts复制到内核源码目录下 源码修改及编译 修改arch/arm/boot/dts/st/Makefile&#xff0c;新增设备树编译 stm32mp157f-ev1-m4-examples.dtb \stm32mp157d-stm32mp157daa1-mx.dtb修改…...

Pinocchio 库详解及其在足式机器人上的应用

Pinocchio 库详解及其在足式机器人上的应用 Pinocchio (Pinocchio is not only a nose) 是一个开源的 C 库&#xff0c;专门用于快速计算机器人模型的正向运动学、逆向运动学、雅可比矩阵、动力学和动力学导数。它主要关注效率和准确性&#xff0c;并提供了一个通用的框架&…...

Kafka主题运维全指南:从基础配置到故障处理

#作者&#xff1a;张桐瑞 文章目录 主题日常管理1. 修改主题分区。2. 修改主题级别参数。3. 变更副本数。4. 修改主题限速。5.主题分区迁移。6. 常见主题错误处理常见错误1&#xff1a;主题删除失败。常见错误2&#xff1a;__consumer_offsets占用太多的磁盘。 主题日常管理 …...

Leetcode33( 搜索旋转排序数组)

题目表述 整数数组 nums 按升序排列&#xff0c;数组中的值 互不相同 。 在传递给函数之前&#xff0c;nums 在预先未知的某个下标 k&#xff08;0 < k < nums.length&#xff09;上进行了 旋转&#xff0c;使数组变为 [nums[k], nums[k1], …, nums[n-1], nums[0], nu…...

渗透实战PortSwigger靶场:lab13存储型DOM XSS详解

进来是需要留言的&#xff0c;先用做简单的 html 标签测试 发现面的</h1>不见了 数据包中找到了一个loadCommentsWithVulnerableEscapeHtml.js 他是把用户输入的<>进行 html 编码&#xff0c;输入的<>当成字符串处理回显到页面中&#xff0c;看来只是把用户输…...

DAY 26 函数专题1

函数定义与参数知识点回顾&#xff1a;1. 函数的定义2. 变量作用域&#xff1a;局部变量和全局变量3. 函数的参数类型&#xff1a;位置参数、默认参数、不定参数4. 传递参数的手段&#xff1a;关键词参数5 题目1&#xff1a;计算圆的面积 任务&#xff1a; 编写一…...

CppCon 2015 学习:Time Programming Fundamentals

Civil Time 公历时间 特点&#xff1a; 共 6 个字段&#xff1a; Year&#xff08;年&#xff09;Month&#xff08;月&#xff09;Day&#xff08;日&#xff09;Hour&#xff08;小时&#xff09;Minute&#xff08;分钟&#xff09;Second&#xff08;秒&#xff09; 表示…...

rm视觉学习1-自瞄部分

首先先感谢中南大学的开源&#xff0c;提供了很全面的思路&#xff0c;减少了很多基础性的开发研究 我看的阅读的是中南大学FYT战队开源视觉代码 链接&#xff1a;https://github.com/CSU-FYT-Vision/FYT2024_vision.git 1.框架&#xff1a; 代码框架结构&#xff1a;readme有…...