自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(5)
  • 资源 (5)
  • 收藏
  • 关注

原创 Flask-admin新建记录时动态生成某个字段数据

关键在于自定义创建记录的表单类,在表单类的构造函数中生成字段内容,通过get_create_form返回表单。附带的可以将字段设置为只读。下面例子中希望自动生成只读的uuid。class AdminProductionView(ModelView):class AdminProductionCreateForm(Form):uuid = StringField('UUID')name = StringField('Name')para = StringField('...

2020-09-18 14:58:55 447

原创 Flask-admin列表搜索使用外键字段

假设License表有个外键引用User表,想在License的列表中通过User的name来搜索。同时License数据库模型中有User表的反向引用userclass AdminLicenseView(AdminModelView):column_searchable_list = ('user.name', )

2020-09-18 13:54:27 555

原创 cmake联合boost.test做单元测试

假设测试代码都在test目录下测试代码就用boost的例子#define BOOST_TEST_MODULE My Test#include <boost/test/included/unit_test.hpp>BOOST_AUTO_TEST_CASE(first_test){ int i = 1; BOOST_TEST(i); BOOST_TEST(i ...

2020-05-06 13:31:00 828

原创 cmake获取Git版本信息

主要使用两个命令获取当前版本哈希值:git rev-parse --short HEADmacro(get_git_hash _git_hash) find_package(Git QUIET) if(GIT_FOUND) execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --shor...

2020-05-06 11:14:24 1311

原创 如何在wxWidgets窗口内嵌入SDL窗口

思路是利用SDL_Window* SDL_CreateWindowFrom(const void* data)函数从原生窗口创建SDL窗口。参数data是一个指向依赖于驱动程序的窗口创建数据的指针,在Windows系统下就是将窗口句柄强制类型转换成void *传入。下面是创建SDL窗口的帮助代码,创建SDL窗口后也附带创建绘图用的renderbool CreateSDLWindow(...

2020-04-27 11:35:51 664

115解析工具

解析115资源的实际url,目前115已经不开放下载了

2012-08-20

CyanogenMod编译环境的搭建和可刷机文件的编译及打包

CyanogenMod编译环境的搭建和可刷机文件的编译及打包

2011-08-05

OP放大器设计与应用

运算放大器的选择和系统设计,运算放大器的不同应用

2011-01-05

USB MIDI Spec

Following is the USB Audio Device Class Definition for MIDI Devices. It is designed to cover the widest range of possible MIDI applications and products. This document must be considered an integral part of the USB Audio Device Class Definition.

2010-02-08

DIY remote camera trigger

Most SLRs, even entry-level ones, have a remote shutter release socket so you can shoot pictures without actually touching the camera body.The remote trigger is used often in long-exposure photography, where even a small amount of vibration can introduce blurriness into the image. As steady as your hands are, they are not machines, and, therefore, they are prone to tiny movements that you may not be aware of until you view your picture.With a wired remote trigger release, the camera body can be mounted on a tripod, and you operate the camera through the wired remote trigger.

2010-02-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除