帝国cms同一条信息使用不同的多个内容页模板伪静态实现教程
理论上可以实现一条信息使用无数个内容页模板,实现过程:
1、/e/action目录下新建bishun.php,内容如下:
<?php
require('../class/connect.php');
require('../class/db_sql.php');
require('../class/functions.php');
require('../class/t_functions.php');
require LoadLang('pub/fun.php');
require('../data/dbcache/class.php');
require('../data/dbcache/MemberLevel.php');
$link=db_connect();
$empire=new mysqlquery();
$classid=(int)$_GET['classid'];
$id=(int)$_GET['id'];
$page=(int)$_GET['page'];
$page=RepPIntvar($page);
$mid=$class_r[$classid]['modid'];
$tbname=$class_r[$classid]['tbname'];
//验证IP
eCheckAccessDoIp('showinfo');
if(!$classid||!$id||!$mid||!$tbname||InfoIsInTable($tbname))
{printerror('此信息不存在','',1,0,1);
}
$r=$empire->fetch1("select * from {$dbtbpre}ecms_".$tbname." where id='$id' limit 1");
if(!$r['id']||$classid!=$r['classid'])
{printerror('此信息不存在','',1,0,1);
}
//外部链接
if($r['isurl'])
{$titleurl=$r['titleurl'];Header("Location:$titleurl");exit();
}
/*
//moreport
if(Moreport_ReturnMustDt())
{$class_r[$classid]['showdt']=2;
}
//是否支持动态内容页
if($class_r[$classid]['showdt']!=2)
{$titleurl=sys_ReturnBqTitleLink($r);Header("Location:$titleurl");exit();
}*/
//缓存
if($public_r['ctimeopen'])
{$public_r['usetotalnum']=0;
}
$ecms_tofunr=array();
$ecms_tofunr['cacheuse']=0;
$ecms_tofunr['cacheselfcid']=$classid;
$ecms_tofunr['cachetype']='textpage';
$ecms_tofunr['cacheids']=$classid.','.$id.','.$page;
$ecms_tofunr['cachepath']='empirecms';
$ecms_tofunr['cachedatepath']='ctext/bishun/'.date('Y/md',$r['truetime']);
$ecms_tofunr['cachetime']=$public_r['ctimetext'];
$ecms_tofunr['cachelasttime']=$public_r['ctimelast'];
$ecms_tofunr['cachelastedit']=$r['lastdotime'];
$ecms_tofunr['cacheopen']=Ecms_eCacheCheckOpen($ecms_tofunr['cachetime']);
$ecms_tofunr['cachehavedo']=0;
if($ecms_tofunr['cacheopen']==1&&!($r['groupid']||$class_r[$classid]['cgtoinfo']))
{$ecms_tofunr['cacheuse']=Ecms_eCacheOut($ecms_tofunr,2);if($ecms_tofunr['cacheuse']){//更新点击$empire->query("update {$dbtbpre}ecms_".$tbname." set onclick=onclick+1 where id='$id' limit 1");db_close();$empire=null;exit();}$ecms_tofunr['cachehavedo']=1;
}
//缓存
//副表
$finfor=$empire->fetch1("select ".ReturnSqlFtextF($mid)." from {$dbtbpre}ecms_".$tbname."_data_".$r['stb']." where id='$r[id]' limit 1");
$r=array_merge($r,$finfor);
//权限
if($r['groupid']||$class_r[$classid]['cgtoinfo'])
{define('empirecms','wm_chief');define('PageCheckLevel','wm_chief');$check_tbname=$tbname;$check_infoid=$id;$check_classid=$classid;$check_path="../../";$checkinfor=$r;@include("../class/CheckLevel.php");
}
//缓存
if($ecms_tofunr['cacheopen']==1&&!$ecms_tofunr['cachehavedo'])
{$ecms_tofunr['cacheuse']=Ecms_eCacheOut($ecms_tofunr,2);if($ecms_tofunr['cacheuse']){//更新点击$empire->query("update {$dbtbpre}ecms_".$tbname." set onclick=onclick+1 where id='$id' limit 1");db_close();$empire=null;exit();}
}
//缓存
//存文本
if($emod_r[$mid]['savetxtf'])
{$stf=$emod_r[$mid]['savetxtf'];if($r[$stf]){$r[$stf]=GetTxtFieldText($r[$stf]);}
}
//初始值
$search="&classid=$classid&id=$id";
$line=1;
$start=0;
$page_line=6;//每页显示链接数
$offset=$page*$line;//总偏移量
$GLOBALS['navclassid']=$r[classid];
$GLOBALS['navinfor']=$r;
//取得内容模板
//$r[newstempid]=$r[newstempid]?$r[newstempid]:$class_r[$r[classid]][newstempid];
$r[newstempid]=29;
$newstemp_r=$empire->fetch1("select tempid,temptext,showdate from ".GetTemptb("enewsnewstemp")." where tempid='$r[newstempid]'");//替换模板变量
function DtGetHtml($add,$newstemp_r,$mid,$tbname,$line,$page_line,$start,$page,$search){global $public_r,$class_r,$class_zr,$class_tr,$fun_r,$empire,$dbtbpre,$emod_r,$level_r;//更新点击$empire->query("update {$dbtbpre}ecms_".$tbname." set onclick=onclick+1 where id='$add[id]' limit 1");$add['onclick']=$add['onclick']+1;//模板参数$newstemptext=$newstemp_r[temptext];$formatdate=$newstemp_r[showdate];//页面$pagetitle=ehtmlspecialchars($add[title]);$url=ReturnClassLink($add[classid]);//导航$newstemptext=DtInfo_ReplaceSvars($newstemptext,$url,$add[classid],$pagetitle,$add[keyboard],$pagetitle);//相关信息if(strstr($newstemptext,'[!--other.link--]')){$keyboardtext=GetKeyboard($add[keyboard],$add[keyid],$add[classid],$add[id],$class_r[$add[classid]][link_num]);}//分页字段$ptitle=$add['title'];$truepage='';$titleselect='';$expage='[!--empirenews.page--]';//分页符$pf=$emod_r[$mid]['pagef'];if($pf&&strstr($add[$pf],$expage))//有分页{$n_r=explode($expage,$add[$pf]);$thispagenum=count($n_r);//checkpagenoeCheckListPageNo($page,$line,$thispagenum);if($page<0||$page>$thispagenum-1){$page=0;}$add[$pf]=$n_r[$page];if($page){$ti_r=explode('[/!--empirenews.page--]',$n_r[$page]);if(count($ti_r)>=2){$ptitle=$ti_r[0];$add[$pf]=$ti_r[1];}else{$ptitle=$add['title'].'('.($page+1).')';}}//伪静态$pagefunr=eReturnRewriteInfoUrl($add['classid'],$add['id'],0);$pagefunr['repagenum']=0;//取得分页$truepage=InfoUsePage($thispagenum,$line,$page_line,$start,$page,$search,$pagefunr);//下拉式分页if(strstr($newstemptext,'[!--title.select--]')){for($j=0;$j<$thispagenum;$j++){$spurl=eReturnRewritePageLink($pagefunr,$j);if($j==0){$sptitle=$add[title];}else{$ti_r=explode('[/!--empirenews.page--]',$n_r[$j]);$sptitle=count($ti_r)>=2?$ti_r[0]:$add[title].'('.($j+1).')';}$select='';if($page==$j){$ptitle=$sptitle;$select=' selected';}$titleselect.='<option value="'.$spurl.'"'.$select.'>'.$sptitle.'</option>';}$titleselect='<select name="titleselect" onchange="self.location.href=this.options[this.selectedIndex].value">'.$titleselect.'</select>';}//下一页链接if($page==$thispagenum-1){$thisnextlink=eReturnRewritePageLink($pagefunr,0);}else{$thisnextlink=eReturnRewritePageLink($pagefunr,$page+1);}}else{//checkpagenoif($page!=0){printerror('ErrorUrl','history.go(-1)',1);}}//返回替换验证字符$docheckrep=ReturnCheckDoRepStr();if($add[newstext]){if(empty($public_r['dorepword'])&&$docheckrep[3]){$add[newstext]=ReplaceWord($add[newstext]);//过滤字符}if(empty($public_r['dorepkey'])&&$docheckrep[4]&&!empty($add[dokey]))//替换关键字{$add[newstext]=ReplaceKey($add['newstext'],$add['classid']);}if($public_r['opencopytext']){$add[newstext]=AddNotCopyRndStr($add[newstext]);//随机复制字符}}//变量$tempf=$emod_r[$mid]['tempf'];$fr=explode(',',$tempf);$fcount=count($fr)-1;//变量替换$newstempstr=$newstemptext;//模板for($i=1;$i<$fcount;$i++){$f=$fr[$i];$value=$add[$f];if($f=='downpath')//下载地址{if(strstr($newstemptext,'[!--downpath--]')){$value=ReturnDownSoftHtml($add);}}elseif($f=='onlinepath')//观看地址{if(strstr($newstemptext,'[!--onlinepath--]')){$value=ReturnOnlinepathHtml($add);}}elseif($f=='morepic')//图片集{if(strstr($newstemptext,'[!--morepic--]')){$value=ReturnMorepicpathHtml($add);}}elseif($f=='newstime')//时间{if(strstr($newstemptext,'[!--newstime--]')){$value=date($formatdate,$value);}}elseif($f=='befrom')//信息来源{if($docheckrep[1]&&strstr($newstemptext,'[!--befrom--]')){$value=ReplaceBefrom($value);}}elseif($f=='writer')//作者{if($docheckrep[2]&&strstr($newstemptext,'[!--writer--]')){$value=ReplaceWriter($value);}}elseif($f=='titlepic')//标题图片{if(empty($value)){$value=$public_r[newsurl].'e/data/images/notimg.gif';}}elseif($f=='title')//标题{}else//正常字段{if(!strstr($emod_r[$mid]['editorf'],','.$f.',')){if(strstr($emod_r[$mid]['tobrf'],','.$f.','))//加br{$value=nl2br($value);}if(!strstr($emod_r[$mid]['dohtmlf'],','.$f.','))//去除html{$value=RepFieldtextNbsp(ehtmlspecialchars($value));}}}$newstempstr=str_replace('[!--'.$f.'--]',$value,$newstempstr);}//固定变量$newstempstr=str_replace('[!--id--]',$add[id],$newstempstr);$newstempstr=str_replace('[!--classid--]',$add[classid],$newstempstr);$newstempstr=str_replace('[!--class.name--]',$class_r[$add[classid]][classname],$newstempstr);$newstempstr=str_replace('[!--ttid--]',$add[ttid],$newstempstr);$newstempstr=str_replace('[!--tt.name--]',$class_tr[$add[ttid]][tname],$newstempstr);$newstempstr=str_replace('[!--tt.url--]',sys_ReturnBqInfoTypeUrl($add['ttid']),$newstempstr);$newstempstr=str_replace('[!--onclick--]',$add[onclick],$newstempstr);$newstempstr=str_replace('[!--userfen--]',$add[userfen],$newstempstr);$newstempstr=str_replace('[!--username--]',$add[username],$newstempstr);//带链接的用户名if($add[ismember]==1&&$add[userid]){$newstempstr=str_replace('[!--linkusername--]',"<a href='".$public_r[newsurl]."e/space/?userid=".$add[userid]."' target=_blank>".$add[username]."</a>",$newstempstr);}else{$newstempstr=str_replace('[!--linkusername--]',$add[username],$newstempstr);}$newstempstr=str_replace('[!--userid--]',$add[userid],$newstempstr);$newstempstr=str_replace('[!--other.link--]',$keyboardtext,$newstempstr);$newstempstr=str_replace('[!--news.url--]',$public_r[newsurl],$newstempstr);$newstempstr=str_replace('[!--plnum--]',$add[plnum],$newstempstr);$newstempstr=str_replace('[!--totaldown--]',$add[totaldown],$newstempstr);$newstempstr=str_replace('[!--keyboard--]',$add[keyboard],$newstempstr);//链接$titleurl=sys_ReturnBqTitleLink($add);$newstempstr=str_replace('[!--titleurl--]',$titleurl,$newstempstr);$newstempstr=str_replace('[!--page.stats--]','',$newstempstr);$classurl=sys_ReturnBqClassname($add,9);$newstempstr=str_replace('[!--class.url--]',$classurl,$newstempstr);//下一篇if(strstr($newstemptext,'[!--info.next--]')){$next_r=$empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_".$class_r[$add[classid]][tbname]." where id>$add[id] and classid='$add[classid]' order by id limit 1");if(empty($next_r[id])){$infonext="<a href='".$classurl."'>".$fun_r['HaveNoNextLink']."</a>";}else{//链接$nexttitleurl=sys_ReturnBqTitleLink($next_r);$infonext="<a href='".$nexttitleurl."'>".$next_r[title]."</a>";}$newstempstr=str_replace('[!--info.next--]',$infonext,$newstempstr);}//上一篇if(strstr($newstemptext,'[!--info.pre--]')){$next_r=$empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_".$class_r[$add[classid]][tbname]." where id<$add[id] and classid='$add[classid]' order by id desc limit 1");if(empty($next_r[id])){$infonext="<a href='".$classurl."'>".$fun_r['HaveNoNextLink']."</a>";}else{//链接$nexttitleurl=sys_ReturnBqTitleLink($next_r);$infonext="<a href='".$nexttitleurl."'>".$next_r[title]."</a>";}$newstempstr=str_replace('[!--info.pre--]',$infonext,$newstempstr);}//投票if(strstr($newstemptext,'[!--info.vote--]')){$myvotetext=sys_GetInfoVote($add[classid],$add[id]);$newstempstr=str_replace('[!--info.vote--]',$myvotetext,$newstempstr);}//评分if(strstr($newstemptext,'[!--pinfopfen--]')){$pinfopfen=$add[infopfennum]?round($add[infopfen]/$add[infopfennum]):0;$newstempstr=str_replace('[!--pinfopfen--]',$pinfopfen,$newstempstr);$newstempstr=str_replace('[!--infopfennum--]',$add[infopfennum],$newstempstr);}$string=$newstempstr;//替换变量$string=str_replace('[!--p.title--]',strip_tags($ptitle),$string);$string=str_replace('[!--next.page--]',$thisnextlink,$string);$string=str_replace('[!--page.url--]',$truepage,$string);$string=str_replace('[!--title.select--]',$titleselect,$string);return $string;
}if(empty($newstemp_r['tempid']))
{printerror('ErrorUrl','',1);
}
//页面支持标签
if($public_r['dtncanbq'])
{$newstemp_r[temptext]=DtNewsBq('text'.$newstemp_r[tempid],$newstemp_r[temptext],1);
}
else
{if($public_r['searchtempvar']){$newstemp_r[temptext]=ReplaceTempvar($newstemp_r[temptext]);}
}
$string=DtGetHtml($r,$newstemp_r,$mid,$tbname,$line,$page_line,$start,$page,$search);
//缓存
if($ecms_tofunr['cacheopen']==1)
{Ecms_eCacheIn($ecms_tofunr,stripSlashes($string));
}
else
{echo stripSlashes($string);
}
//缓存
db_close();
$empire=null;
?>
2、增加内容页模板,模板内容与正常内容页模板一样调用,新建完成后记住内容页模板id。
3、增加伪静态规则:rewrite ^/bishun/zi-([0-9]+)\.html$ /e/action/bishun.php?classid=5&id=$1 last;
演示地址就是使用1个内容的信息用5个页面调出
https://www.gushichi.com/bishun/zi-2606.html
https://www.gushichi.com/wubi/zi-2606.html
https://www.gushichi.com/wuxing/zi-2606.html
https://www.gushichi.com/bushou/zi-2606.html
https://www.gushichi.com/duyin/zi-2606.html
相关文章:
帝国cms同一条信息使用不同的多个内容页模板伪静态实现教程
理论上可以实现一条信息使用无数个内容页模板,实现过程: 1、/e/action目录下新建bishun.php,内容如下: <?php require(../class/connect.php); require(../class/db_sql.php); require(../class/functions.php); require(..…...
解决Linux<云服务器>访问HuggingFace的问题(操作记录)
一、准备配置文件 cache.db clash config.yaml Country.mmdb(1)cache.db、clash的获取 链接:百度网盘 提取码:82t0 (2)config.yaml、Country.mmdb的获取 启动本地已安装的clash软件→找到“配置订阅”…...
selenium 报错 invalid argument: invalid locator
环境: Python3.12.2 selenium4.0 报错信息: invalid argument: invalid locator 错误分析: selenium语法错误,find_element方法少写By.XPATH参数 错误语法如下: driver.find_element(//div[id"myid"]) 解决办…...
springboot——登录认证(包括jwt技术、拦截器过滤器)
实现登录的原理 用户名和密码都输入正确,登录成功,否则,登录失败 登录功能的本质:查询,根据用户名和密码查询员工信息 实现登录的步骤 登录需要确定用户的id、username、name、token(用于 身份校验),对此要重新定义一个类LoginInfo public class LoginInfo {priva…...
【IN、NOT、AND、OR】在 MySql 中的使用方法,使用场景、注意事项
目录 IN NOT AND OR 注意事项: 使用场景: IN 用于指定某个字段的值在一个预定义的列表中。 SELECT * FROM users WHERE age IN (20, 25, 30);查询返回 age 字段 是20、25 、30 的用户记录。 NOT 用于对条件进行否定。 查询将返回与指定 条件相…...
html <a>设置发送邮件链接、打电话链接 <a href=“mailto:></a> <a href=“tel:></a>
1.代码 <ul><li>电话:<a href"tel:18888888888">188-8888-8888</a></li><li>邮箱:<a href"mailto:10000qq.com">10000qq.com</a></li><li>邮箱:<a hre…...
Mac上详细配置java开发环境和软件(更新中)
文章目录 概要JDK的配置JDK下载安装配置JDK环境变量文件 Idea的安装Mysql安装和配置Navicat Premium16.1安装安装Vscode安装和配置Maven配置本地仓库配置阿里云私服Idea集成Maven Cpolar快速入门 概要 这里使用的是M3型片 14.6版本的Mac 用到的资源放在网盘 链接: https://pan…...
游戏渠道假量解决方案
某推广公司在推广过程中被查出“短期内点击量激增”“存在同一地址多次访问”“已注册用户重复注册”等数据作弊行为,法院判罚退还服务费200余万元,并赔偿违约金约350万元。 某公司为提升其游戏在应用商店榜单排名,委托某网络公司进行下载、注…...
Java重要面试名词整理(二):SpringMyBatis
文章目录 Spring篇Spring核心推断构造方法AOP动态代理Advice的分类Advisor的理解AOP相关的概念 定义BeanASM技术JFR依赖注入循环依赖LifecycleSpring AOT Spring事务Spring事务传播机制Spring事务传播机制是如何实现的呢?Spring事务传播机制分类 SpringMVCHandlerHandlerMappi…...
powershell美化
powershell美化 写在前面 除了安装命令,其他都是测试命令,后续再写进配置文件 安装主题控件 安装主题oh-my-posh,powershell中执行 winget install JanDeDobbeleer.OhMyPosh -s winget oh-my-posh init pwsh | Invoke-Expression # 查看…...
D102【python 接口自动化学习】- pytest进阶之fixture用法
day102 pytest的usefixtures方法 学习日期:20241219 学习目标:pytest基础用法 -- pytest的usefixtures方法 学习笔记: fixture调用方法 实际应用 总结 pytest.mark.usefixtures(func),pytest的usefixtures方法,无…...
Excel生成DBC脚本源文件
Excel制作 新建一个Excel,后缀为“.xls” 工作本名称改为“CAN_Matrix” 在首行按照列来起名字,在里面只需要填写必须的内容即可。 列数名称第0列Message Name第1列Message Format第2列Message ID第3列Message Length (byte)第4列Message Transmitte…...
【Leetcode 每日一题】2545. 根据第 K 场考试的分数排序
问题背景 班里有 m m m 位学生,共计划组织 n n n 场考试。给你一个下标从 0 0 0 开始、大小为 m n m \times n mn 的整数矩阵 s c o r e score score,其中每一行对应一位学生,而 s c o r e [ i ] [ j ] score[i][j] score[i][j] 表示…...
Spring MVC(上)
上一篇博客的补充: 一般出现这种问题,我们就要检查版本了 我们需要查看这几个地方是否版本是对的 注意: jdk版本运行取决于什么? 1.通过cmd运行,jdk版本就是你设置的环境变量 2.通过Idea运行,取决于该项目设置的JDK版本 创建项目的方式: 1> 我们上个博客用idea进行创建 2…...
【优选算法---归并排序衍生题目】剑指offer51---数组中的逆序对、计算右侧小于当前元素的个数、翻转对
一、剑指offer51---数组中的逆序对 题目链接: LCR 170. 交易逆序对的总数 - 力扣(LeetCode) 题目介绍: 在数组中的两个数字,如果前面⼀个数字大于后面的数字,则这两个数字组成⼀个逆序对。输入一个数组,…...
单体到微服务:电商平台架构的演变与可扩展性探索
目录 一、整体理解可扩展性 二、从电商平台架构发展看架构的可扩展性 (一)单体架构 (二)分布式架构 (三)SOA架构 (四)微服务架构 三、1号店App服务端架构升级说明 ÿ…...
clickhouse-副本和分片
1、副本 1.1、概述 集群是副本和分片的基础,它将ClickHouse的服务拓扑由单节点延伸到多个节点,但它并不像Hadoop生态的某些系统那样,要求所有节点组成一个单一的大集群。ClickHouse的集群配置非常灵活,用户既可以将所有节点组成…...
C语言版解法力扣题:将整数按权重排序
1.题目描述 我们将整数 x 的 权重 定义为按照下述规则将 x 变成 1 所需要的步数: 如果 x 是偶数,那么 x x / 2 如果 x 是奇数,那么 x 3 * x 1 比方说,x3 的权重为 7 。因为 3 需要 7 步变成 1 (3 --> 10 -->…...
ubuntu18.04升级到ubuntu20.04
为了使用qt6,在ubuntu18.04上各种折腾失败,无奈只能升级到ubuntu20.04, 按照网上的教程没成功。自己摸索了 lsb_release -a df -h sudo apt update sudo apt upgrade -y sudo apt dist-upgrade -y sudo apt autoremove -y sudo apt clean sudo apt inst…...
【我的 PWN 学习手札】IO_FILE 之 stdin任意地址写
我们知道,stdin会往“缓冲区”先读入数据,如果我们劫持这个所谓“缓冲区”到其他地址呢?是否可以读入数据到任意地址?答案是肯定的。 注意!代码中的“-------”分隔,是为了区分一条调用链上不同代码片段&am…...
<mutex>注释 11:重新思考与猜测、补充锁的睡眠与唤醒机制,结合 linux0.11 操作系统代码的辅助(上)
(46)问题的起源: 因为上面的内核代码,我们编写多线程代码时,对手里的家伙事不那么自信。但我们知道,多线程在竞争锁时,若得不到锁,会进入睡眠,并会在被唤醒后重新尝试得…...
C/C++圣诞树
系列文章 序号直达链接1C/C爱心代码2C/C跳动的爱心3C/C李峋同款跳动的爱心代码4C/C满屏飘字表白代码5C/C大雪纷飞代码6C/C烟花代码7C/C黑客帝国同款字母雨8C/C樱花树代码9C/C奥特曼代码10C/C精美圣诞树11C/C俄罗斯方块12C/C贪吃蛇13C/C孤单又灿烂的神-鬼怪14C/C闪烁的爱心15C…...
upload-labs-master第21关超详细教程
目录 环境配置解题思路利用漏洞 操作演示 环境配置 需要的东西 phpstudy-2018 链接: phpstudy-2018 提取码:0278 32 位 vc 9 和 11 运行库 链接: 运行库 提取码:0278 upload-labs-master 靶场 链接: upload-lasb-ma…...
Python基础——数学运算
目录 1. 算术运算符 2. 比较运算符 3. 赋值运算符 4. 逻辑运算符 5. 成员运算符 6. 身份运算符 7. 三目运算符 Python数学计算通过多种运算符来执行,常用的运算符类型包括算术运算符、比较运算符、赋值运算符、逻辑运算符、成员运算符、身份运算符、三目…...
ubuntu 安装更新 ollama新版本
ubuntu 安装更新 ollama新版本 我这里是 2024-12-18 ollama 版本是 0.5.3 1手动下载 ollama-linux-amd64.tgz https://github.com/ollama/ollama/releases 2下载脚本 https://ollama.com/install.sh install.sh 和 ollama-linux-amd64.tgz 在相同路径下 修改:…...
汽车IVI中控开发入门及进阶(45):凌阳科技车载娱乐芯片
概述: Sunplus科技有限公司成立于1990年,是一家领先的多媒体和汽车应用芯片提供商,如DVD播放器、便携式DVD播放器、家庭娱乐音频产品、汽车信息娱乐和高级驾驶辅助系统(ADAS)。与此同时,凌阳正在为消费类、便携式和连接设备上的广泛应用提供高速I/O IP、高性能数据转换I…...
Linux export命令
本文来自智谱清言 --------- 在Linux系统中,export 是一个用来设置环境变量的命令。 环境变量是操作系统运行时用于存储有关系统环境的信息的变量,它们对于用户和程序都是可访问的。下面是关于 export 命令的一些基本用法: 基本语法 ba…...
AI自我进化的新篇章:谷歌DeepMind推出苏格拉底式学习,语言游戏解锁无限潜能
各位AI爱好者、技术研究者,大家好!今天我们来聊聊一个令人兴奋的AI研究新进展——谷歌DeepMind推出的“苏格拉底式学习”方法。这项研究的独特之处在于,它让AI在没有外部数据的情况下,通过“语言游戏”实现自我进化,这…...
【BUG】记一次context canceled的报错
文章目录 案例分析gorm源码解读gin context 生命周期context什么时候cancel的什么时候context会被动cancel掉呢? 野生协程如何处理 案例分析 报错信息 {"L":"ERROR","T":"2024-12-17T11:11:33.0050800","file"…...
JAVA前端开发中type=“danger“和 type=“text“的区别
在前端开发中,type 属性通常用于指定按钮或其他元素的样式或行为。不同的框架和库可能对 type 属性有不同的定义和用法。常见的框架包括 Bootstrap、Ant Design(antd)、Element Plus 等。下面我将分别介绍在这些框架中 type"danger"…...
sqlite3 支持位运算 和view和 triger
数据设置条件以后可以.根据门限自动调整其他的值 由数据库记录修改时间,及记录-> 网元设备的告警产生时间,设置超时清除时间,记录系统的原始时间戳 CPp 有 sqlite 支持 json 导出字符串,json 库将字符串,映射为结构体 triger update table 更新到一个 可设置参数列表 ,view …...
Mysql复习(一)
数据库系统的核心是( 数据库管理系统 )。 以下的标识符中符合标识符命名规则的有几个?(3个) 3abc7, abc73, bc73a, c73ab,*73abc 标识符的第一个字符允许包括哪些符号?( _ 或者 或者 #) 关系表达式运算的…...
Redis bitmaps 使用
应用场景: 记录id为 1 的用户,2024年12月签到情况,并统计; 记录 1号签到 zxys-redis:0>setbit 1:202412 1 1 记录 2号签到 zxys-redis:0>setbit 1:202412 2 1 记录 3号未签到 zxys-redis:0>setbit 1:202412 3 0 …...
计算无人机俯拍图像的地面采样距离(GSD)矩阵
引言 在无人机遥感、测绘和精细农业等领域,地面采样距离(Ground Sampling Distance,简称 GSD)是一个非常重要的指标。GSD 是指图像中每个像素在地面上实际代表的物理距离,通常以米或厘米为单位。GSD 决定了图像的空间…...
Java基础 | 数据库的命名规范
数据库的命名规范 1. 基本原则2. 命名规范详解2.1 命名禁止项2.2 命名规范3. 通用字段规范4. 特殊表命名建议 1. 基本原则 统一性:全库采用一致的命名规范简洁性:在表达清晰的前提下尽量简短规范性:遵循数据库标准规范可读性:命名…...
计算机网络基础(2):网络安全/ 网络通信介质
1. 网络安全威胁 网络安全:目的就是要让网络入侵者进不了网络系统,及时强行攻入网络,也拿不走信息,改不了数据,看不懂信息。 事发后能审查追踪到破坏者,让破坏者跑不掉。 网络威胁来自多方面:…...
Reactor
文章目录 正确的理解发送double free问题 1.把我们的reactor进行拆分2.链接管理3.Reactor的理论 listensock只需要设置_recv_cb,而其他sock,读,写,异常 所以今天写nullptr其实就不太对,添加为空就没办法去响应事件 获…...
介绍 Html 和 Html 5 的关系与区别
HTML(HyperText Markup Language)是构建网页的标准标记语言,而 HTML5 是 HTML 的最新版本,包含了一些新的功能、元素、API 和属性。HTML5 相对于早期版本的 HTML(比如 HTML4)有许多重要的改进和变化。以下是…...
已有 containerd 的情况下部署二进制 docker 共存
文章目录 [toc]学习目的开始学习dockerd启动 containerd准备配置文件启动 containerd 启动 docker准备配置文件启动 docker 环境验证停止 docker 和 containerd 学习目的 使用容器的方式做一些部署的交付,相对方便很多,不需要担心别人的环境缺少需要的依…...
Springboot @Transactional使用时需注意的几个问题
一、事务的隔离级别 在Springboot应用中,如果我们想实现方法一旦执行有异常产生,就触发事务回滚,可以在方法上面添加Transactional注解。如果应用采用mysql数据库,虽然mysql本身也有事务隔离机制,但在Sping数据库的应…...
西游记战力排名、笔记等
文章目录 战力排名对西游记的理解各个版本游戏题材西游记关卡和妖怪 西游记家喻户晓,没有谁不知道吧,无论是电视剧、影视,还是小说,乃至游戏,很多地方都有西游记的身影。 虽然知道,但总不如对三国啊、水浒啊…...
(2024.12)Ubuntu20.04安装ZED-SDK
一.官网地址 ZED SDK 4.2 - Download | Stereolabs 选择适配版本进行下载 二.安装程序 下载完成后,进入文件目录,打开终端,输入: chmod x ZED_SDK_Ubuntu20_cuda11.8_v4.2.2.zstd.run ./ZED_SDK_Ubuntu20_cuda11.8_v4.2.2.zst…...
Pytorch | 从零构建GoogleNet对CIFAR10进行分类
Pytorch | 从零构建GoogleNet对CIFAR10进行分类 CIFAR10数据集GoogleNet网络结构特点网络整体架构应用与影响Inceptionv1到Inceptionv2 GoogleNet结构代码详解结构代码代码详解Inception 类初始化方法前向传播 forward GoogleNet 类初始化方法前向传播 forward 训练过程和测试结…...
蓝桥杯刷题——day9
蓝桥杯刷题——day9 题目一题干解题思路一代码解题思路二代码 题目二题干解题思路代码 题目一 题干 小蓝最近在研究一种浮点数的表示方法:R格式。对于一个大于0的浮点数d,可以用R格式的整数来表示。给定一个转换参数n,将浮点数转换为R格式整…...
ffmpeg翻页转场动效的安装及使用
文章目录 前言一、背景二、选型分析2.1 ffmpeg自带的xfade滤镜2.2 ffmpeg使用GL Transition库2.3 xfade-easing项目三、安装3.1、安装依赖([参考](https://trac.ffmpeg.org/wiki/CompilationGuide/macOS#InstallingdependencieswithHomebrew))3.2、获取ffmpeg源码3.3、融合xf…...
分布式刚度编织,让可穿戴触觉更出色 ——Haptiknit
大家好!今天来了解一项非常有趣的科技成果 ——“Haptiknit:用于可穿戴触觉的分布式刚度编织”——《Haptiknit: Distributed stiffness knitting for wearable haptics》发表于《SCIENCE ROBOTICS》。在现代科技发展中,可穿戴触觉设备越来越…...
Elasticsearch:什么是查询语言?
查询语言定义 查询语言包括数据库查询语言 (database query language - DQL),是一种用于查询和从数据库检索信息的专用计算机语言。它充当用户和数据库之间的接口,使用户能够管理来自数据库管理系统 (database management system - DBMS) 的数据。 最广…...
PyQt介绍
**PyQt 和 PySide (Qt for Python) 简介** **PyQt** 和 **PySide** 是 Python 中用于开发图形用户界面 (GUI) 应用程序的两个主要框架,它们都是基于 Qt 库的绑定。Qt 是一个跨平台的应用程序开发框架,广泛用于创建图形用户界面、应用程序开发以及嵌入式…...
Oracle 数据库函数的用法(一)
Oracle数据库提供了大量的内置函数,可以用于完成各种操作,如字符串操作,数学计算,日期时间处理,条件判断,序列生成,聚合统计等。以下是一些常用的Oracle数据库函数: 一、oracle 使用…...
labelme标签批量转换数据集json_to_dataset
文章目录 labelme标签批量转换数据集json_to_dataset转换原理单张图片转换多张图片批量转换bat脚本循环法 标注图片提取标注图片转单通道 labelme标签批量转换数据集json_to_dataset 转自labelme批量制作数据集教程。 转换原理 在安装了labelme的虚拟环境中有一个labelme_js…...