摘要: 用过python 的同学都知道 functools.partial 和 lambda 可以实现绑定, 这在线程池调用很有用。 下面看看C++ 与python 的实现对比 #include <iostream> #include <functional> int fun(int a, int b, i 阅读全文
posted @ 2021-06-19 15:50 Onsunsl 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; struct student { string name; int age; int score; }; class A{ public: A() { s = { "张三",30,80 }; } student Get( 阅读全文
posted @ 2021-06-18 00:35 Onsunsl 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 概述 Git 原生的sumodules 功能无法实现将子模块存放在父级目录, 而放入子目录时候会存在多份代码,交叉依赖的问题。所以需要搭建一个脚本工具来解决多个模块之间的依赖关系。 解决模块依赖 通过配置文件指定git 仓库url、名称、分支、版本 支持解析原生的.gitmodules 文件 (优先 阅读全文
posted @ 2021-06-16 09:53 Onsunsl 阅读(487) 评论(0) 推荐(0) 编辑
摘要: Pyinstaller console 阅读全文
posted @ 2021-01-26 20:19 Onsunsl 阅读(527) 评论(0) 推荐(0) 编辑
摘要: from pydantic import BaseModel class ModelTypeError(Exception): pass class ModelAttrError(Exception): pass class MyBaseModel(BaseModel): """ 带类型和只读属性拦 阅读全文
posted @ 2021-01-19 20:48 Onsunsl 阅读(785) 评论(0) 推荐(0) 编辑
摘要: Django 动态修改库名 阅读全文
posted @ 2021-01-15 16:30 Onsunsl 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 在Kiv应用里嵌入web页面 环境 Windwos 10 python 3.6.6 Kivy 1.11.1 cefpython3 66.0 Demo 代码 from cefpython3 import cefpython as cef # import pygtk # import gtk impo 阅读全文
posted @ 2020-12-02 14:41 Onsunsl 阅读(1059) 评论(0) 推荐(0) 编辑
摘要: kivy 显示中文与高棉语unicode乱码或不正确的解决办法,即kivy 字体渲染bug排查过程 阅读全文
posted @ 2020-11-27 10:34 Onsunsl 阅读(1249) 评论(0) 推荐(0) 编辑
摘要: python call win32print print unicode 阅读全文
posted @ 2020-10-30 19:20 Onsunsl 阅读(1204) 评论(0) 推荐(0) 编辑
摘要: .exe.manifest 文件 requireAdministrator 这个是权限的关键 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly manifestVersion="1.0" xmlns="urn:sche 阅读全文
posted @ 2020-09-12 11:52 Onsunsl 阅读(607) 评论(0) 推荐(0) 编辑