为网页文章开头添加原文连接
本文介绍如何在博客文章页面添加原文链接,并进行动画效果美化,效果如下:
向插件目录中添加
post-copyright-link.pug文件
这里我使用的是butter_fly主题,post-copyright-link.pug文件放在了butterfly主题下的相关文件夹中:
/butterfly/layout/includes/post/post-copyright-link.pug
12345678.post-copyright-link .post-copyright-link-divider .divider-line-fancy .post-copyright-link-content span 原文链接: a(href=url_for(page.permalink) target="_blank")= page.title + ' | ' + config.title .post-copyright-link-divider .divider-line-fancy
向文章页面附加:
如果你使用的是b ...
Hexo-Butterfly主题在主页添加GitHub贡献日历
本文介绍如何在博客添加GitHub贡献日历,效果如下:
需要用到的插件及API :
注:该插件来自博主 百里飞洋 基于原开源插件 hexo-github-calendar 、API python_github_calendar_api 改造
前端Hexo插件:https://github.com/Barry-Flynn/hexo-github-calendar
后端API部署:https://github.com/Barry-Flynn/python_github_calendar_api
作者: 百里飞洋 Barry-Flynn链接: https://blog.meta-code.top/2022/03/15/2022-41/来源: 百里飞洋
安装依赖1npm i @barry-flynn/hexo-github-calendar --save
或者 使用 cnpm ,速度更快
1cnpm i @barry-flynn/hexo-github-calendar --save
添加配置在 Hexo 项目根目录的 _config.yml 文件最后面添加如下配置
注意:在 He ...
Proteus中555定时器仿真问题
Proteus版本:Proteus 8.9
使用Proteus中ne555仿真时,遇到了仿真报错:
[SPICE] Too many iterations without convergence.Real Time Simulation failed to start.
因为proteus8.6版本对一些内容做出了更新,使得在之前版本能够正常使用的555定时器在8.6之后的版本不能够使用。
通过搜索到的内容,在ne555信号输出端添加1r电阻,问题解决
解决proteus:555定时器报错,无法使用的问题。_由于ne555芯片在protues不能像实物一样正常运行-CSDN博客
后续波形测试时发现,在连接示波器的情况下,即便不加入1r电阻,也不会报错
助听器:
下载:https://drluo.lanzoul.com/isLSK2r7idgj 密码:6k0d
流水灯:
下载:https://drluo.lanzoul.com/ijzKB2r7idha 密码:gmdq
装饰器
Python
Timeout装饰器timeout装饰器实现了超时回调的功能
1234567891011121314151617181920212223242526import threadingimport asyncioclass Timeout: def __init__(self, wait, on_timeout): self.wait = wait self.on_timeout = on_timeout self.timer = None def __call__(self, fn): def wrapped(*args, **kwargs): # 执行原函数 result = fn(*args, **kwargs) # 取消之前的定时器 if self.timer is not None: self.timer.cancel() # 创建新的定时器 ...
洛玖开发日记
注意:目前的开发重心集中在 Rust 部分,C++ 和 Python SDK 暂未同步更新。本项目作为一个非盈利项目,如果你有兴趣参与 C++ 或 Python SDK 的维护与开发,亦或者参与luo9_bot本身的开发,欢迎通过邮件联系:luoy-oss@qq.com
rust版本:luoy-oss/luo9_bot
python版本:luoy-oss/luo9_bot at python
Python版本已废弃,如果您希望使用Python开发,请阅读新的Python SDK
(2026年4月13日进度:已进行基础版本推送,旧插件重新实现中)
luo9_bot框架
WebSocket 连接
事件路由 (message/event/notice)
FFI 消息总线 (luo9_core)
插件加载器 (DLL/SO)
Cron 调度器
...
STS3032舵机获取力矩输出
对世博同学桌面轮足机器人的STS3032控制代码外加了舵机力矩获取(输出的电压百分比(0~1000),输出值有正负之分,反映力矩方向)
已有功能:
同步写多个舵机位置控制(可选ACC, SPEED设置)void SyncWritePosEx(u8 ID[], u8 IDN, s16 Position[], u16 Speed[], u8 ACC[]);获取舵机力矩(输出至电机的电压百分比(0~1000)) int ReadLoad(int ID);
Servo_STS3032.h123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107//飞特STS3032舵机同步控制指令//调用方式为sms_sts.SyncWr ...
kotlin网页前后端那些事
爱来自洛屿❤drluo
登出操作
使用@RequestMapping 注解接收PUT请求,销毁账号session
1234567891011121314151617181920@Controller@RequestMapping(value = ["/admin"])interface LoginController { @RequestMapping(value = ["/logout"], method = [RequestMethod.PUT]) fun logout(request: HttpServletRequest, response: HttpServletResponse)}@Componentclass LoginControllerImpl : LoginController { override fun logout(request: HttpServletRequest, response: HttpServletResponse) { ...
mspm0g3507-ad9850
通过gpio口串行配置a9850的信号输出频率
ad9850_wr_serial(w0写入数据, 频率(HZ));
调用格式:
12ad9850_init_serial();ad9850_wr_serial(0x00, 10000000.0); // 设为10MHz
a9850.h12345678910#ifndef __AD9850_H__#define __AD9850_H__#include "headfile.h"void ad9850_init_serial(void);void ad9850_wr_serial(unsigned char w0, const double frequence);#endif
a9850.C1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878 ...
奇怪的bug
问题已解决123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180#pragma once#include "../src/main.h"#include "js ...
Paddle模型转PaddleLite
爱来自ZZULI❤drluo
从Github下载PaddleLite库根据机型选择arm 或 x86编译再次编译Opt,用于模型转换转换模型使用MobileConfig和PaddlePredictor部署模型








