上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页

2022年12月14日

C# winform picturebox 选中区域

摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文

posted @ 2022-12-14 14:30 空明流光 阅读(708) 评论(0) 推荐(0)

2022年12月13日

SAFEARRAY 使用转载

摘要: 创建SAFEARRAY: SAFEARRAY* SafeArrayCreate( //于建立多维普通数组 VARTYPE vt, //属性类型,一般设置为VT_VARIANT unsigned intcDims, //维度 SAFEARRRAYBOUND *rgsabound //传入SAFEARR 阅读全文

posted @ 2022-12-13 11:27 空明流光 阅读(431) 评论(0) 推荐(0)

2022年12月12日

c++与c#数据类型对照表

摘要: https://learn.microsoft.com/zh-cn/windows/win32/winrt/base-data-types?redirectedfrom=MSDN 下表列出了Windows 运行时支持的基数据类型,并指示 C#、Visual Basic 和 C++ 中的相应类型。 数 阅读全文

posted @ 2022-12-12 15:18 空明流光 阅读(572) 评论(0) 推荐(0)

2022年12月9日

Ubuntu 20.04 安装 jdk 1.8

摘要: sudo apt-get install openjdk-8-jdk 阅读全文

posted @ 2022-12-09 16:34 空明流光 阅读(679) 评论(0) 推荐(0)

2022年12月8日

c++ md5

摘要: 国内 c++ 的md5 一搜一大把,试了十几个,都有问题,转国外一篇,暂未发现问题 http://www.zedwood.com/article/cpp-md5-function main.cpp #include <iostream> #include "md5.h" using std::cou 阅读全文

posted @ 2022-12-08 21:11 空明流光 阅读(338) 评论(0) 推荐(0)

2022年12月6日

c++ 获取对象地址和从地址获取对象

摘要: #include <iostream> using namespace std; int main() { const char* a = "I am the data"; long long addr = (long long)(std::addressof(a)); cout << "addre 阅读全文

posted @ 2022-12-06 11:14 空明流光 阅读(559) 评论(0) 推荐(0)

2022年12月4日

windows 下重启网卡

摘要: 获取接口名称 netsh interface show interface 禁用 接口 WLAN netsh interface set interface name="WLAN" admin=DISABLE 启用 接口 WLAN netsh interface set interface name 阅读全文

posted @ 2022-12-04 21:40 空明流光 阅读(274) 评论(0) 推荐(0)

2022年11月30日

css 左右而已,左边根据自动伸展,右边填满剩余空间

摘要: <div class="container"> <div class="left"></div> <div class="right"></div> </div> .container { display: flex; } .left { flex: 0 0 auto; height: 100px; 阅读全文

posted @ 2022-11-30 16:15 空明流光 阅读(177) 评论(0) 推荐(0)

2022年11月27日

Cent 制作离线rpm包(包括所有依赖项)

摘要: 首先yum上能找到这个包,它是以本机现有环境为基础生成的依赖包。如果已经安装完成,这个就做不成了,所以最好用虚拟机先试一下,确保可以安装成功,再回滚,再制作。 # 安装yum-utils $ yum -y install yum-utils # 下载 ansible 依赖包 $ yumdownloa 阅读全文

posted @ 2022-11-27 13:28 空明流光 阅读(51) 评论(0) 推荐(0)

Cent 7 安装 tilde 文本编辑器

摘要: cd /etc/yum.repos.d wget http://download.opensuse.org/repositories/home:/gphalkes:/tilde/CentOS_CentOS-7/home:gphalkes:tilde.repo mv home:gphalkes:til 阅读全文

posted @ 2022-11-27 13:09 空明流光 阅读(49) 评论(0) 推荐(0)

Python基于pip实现离线打包

摘要: 转载自 https://www.zhangshengrong.com/p/x7XRM7byNz/ 新公司是内网环境,无法使用pip安装第三方资源库,在网上搜下,可以直接使用pip打包本机所安装的第三方资源库,打包成whl文件 一 进入cmd命令行 1 打包单个模块 pip download pyte 阅读全文

posted @ 2022-11-27 11:13 空明流光 阅读(1732) 评论(0) 推荐(0)

2022年11月24日

ubuntu 使用入门

摘要: 我使用的版本是 22.04.1 LTS,经验与大家分享: 0. 此版本的Ubuntu默认安装了python3.10.6,启动命令是python3,但没有安装 pip,安装pip命令: sudo apt install python3-pip 但默认安装的pip似乎是坏的,安装任何软件都不成功,也无法 阅读全文

posted @ 2022-11-24 15:33 空明流光 阅读(637) 评论(0) 推荐(0)

2022年11月23日

c++ 调用 python 2.7 / 3.10

摘要: 本来想调用 python 3.10 的,但一直安装不成功,先记录一下 python 2.7。 先上代码: #include <iostream> using namespace std; #include "Python.h" int main(int argc, char *argv[]) { i 阅读全文

posted @ 2022-11-23 10:39 空明流光 阅读(191) 评论(0) 推荐(0)

2022年11月21日

c++ 输入输出重定向

摘要: std中的方法提供了重定向功能,像用户的输入输出都可以重定向到变量中。 #include <iostream> #include <filesystem> #include <stdio.h> using namespace std; #include <sstream>std::stringstr 阅读全文

posted @ 2022-11-21 15:18 空明流光 阅读(299) 评论(0) 推荐(0)

2022年11月18日

c++ 调用 python 数据类型对照表

摘要: Parsing arguments and building values These functions are useful when creating your own extensions functions and methods. Additional information and e 阅读全文

posted @ 2022-11-18 17:58 空明流光 阅读(170) 评论(0) 推荐(0)

c++ 调用 python 备忘

摘要: PyBytesObject 值的获取: PyObject *pFuncSetCredentialResult = PyObject_CallObject(pFuncSetCredential, pFuncSetCredentialArgs); PyBytesObject* pBytes = (PyB 阅读全文

posted @ 2022-11-18 16:19 空明流光 阅读(138) 评论(0) 推荐(0)

2022年11月17日

Hyper-V 磁盘收缩命令

摘要: Optimize-VHD 优化了一个或多个虚拟硬盘文件的空间分配。这个操作可以回收未使用的块,以及重新排列块,使其更有效地打包,从而减少虚拟硬盘文件的大小。 经过测试,该工具效果很好,所以将使用方法记录下来供不时之需。 方法 首先将你的的虚拟磁盘在宿主机的 磁盘管理实用程序 内用 只读 模式挂载(非 阅读全文

posted @ 2022-11-17 13:55 空明流光 阅读(1857) 评论(0) 推荐(0)

2022年11月14日

Cython directive 'language_level' not set, using 2 for now (Py2)

摘要: 如果你期望编译的版本不是python2,那就指定自己要用哪个版本编译,或者在每个要编译的版本 .py 文件顶上添加一行指定cython版本,但如果有成千上成个 .py 或 .pyx 文件,就不好处理了,在 setup.py 中添加: cythonize(module_item,compiler_di 阅读全文

posted @ 2022-11-14 11:50 空明流光 阅读(1488) 评论(0) 推荐(0)

2022年11月10日

python 常见问题备忘

摘要: 1. 查看项目依赖项并输出到文件命令 pip freeze > requirements.txt 自动为当前项目安装依赖项:pip install pipreqs 根据 requirements.txt 安装依赖项:pip --default-timeout=50000 install -r C:\ 阅读全文

posted @ 2022-11-10 17:15 空明流光 阅读(66) 评论(0) 推荐(0)

python 解构生成的可执行文件(如main.exe)

摘要: python打包成的 main.exe 中包含了哪些东西,可以通过以下命令解压到当前目录下一个名为 main.exe_extracted 的文件夹中: python pyinstxtractor.py mainx.exe 文件 pyinstxtractor.py 的下载地址:https://img2 阅读全文

posted @ 2022-11-10 14:16 空明流光 阅读(162) 评论(0) 推荐(0)

python 代码打包成可执行文件 pyinstaller

摘要: 1.打包为一个目录 pyinstaller -D xxx.py 2.打包为一个文件 pyinstaller -F xxx.py 打包过程中会生成一个xxx.spec文件,如果有自定义的引用,可以修改这个文件,然后执行 pyinstaller xxx.spec xxx.spec 文件结构如下: # - 阅读全文

posted @ 2022-11-10 14:10 空明流光 阅读(246) 评论(0) 推荐(0)

2022年11月4日

FileNotFoundError: [WinError 3] 系统找不到指定的路径 general.pyc

摘要: 在项目路径下搜索 *.pyc,找到类似文件 general.cpython-310.pyc,创建目标目录,复制到目标目录下,重命名为 general.pyc 阅读全文

posted @ 2022-11-04 17:42 空明流光 阅读(446) 评论(0) 推荐(0)

python 打包后运行提示 ModuleNotFoundError: No module named 'xxx'

摘要: 毫无疑问,是打的包有问题。 目前见到的原因有三: 1. pycharm 开发环境的引用的包版本和外面的环境引用的包版本不一致。 处理方式:想办法让两个版本一致。 相关命令:pip uninstall xxx,pip install xxx=1.2.1,pip show xxx 2. pyinstal 阅读全文

posted @ 2022-11-04 16:02 空明流光 阅读(2666) 评论(0) 推荐(0)

2022年11月3日

python 创建 动态链接库 到 c++ 调用

摘要: 1. 如果想要在 c++ 中 debug 模式调试模式运行,windows下的话,需要安装时安装 debug 库 2. 安装 cython 3. 编写 pyx 文件,例如 demo.pyx: # distutils: language = c++cdef public int add(int a,i 阅读全文

posted @ 2022-11-03 15:37 空明流光 阅读(1177) 评论(0) 推荐(0)

2022年10月31日

安装 pytorch

摘要: 如果电脑有GPU,就安装 pytorch GPU 版本,可以加速 如果没有就安装CPU版本,执行速度可能会慢 首先,安装的pytorch版本与python版本有关系,对应关系如下: 其次,PyTorch 版本要根据 CUDA 版本决定,根据显示的CUDA,能安装什么版本的CUDA根据显卡决定 官网链 阅读全文

posted @ 2022-10-31 16:10 空明流光 阅读(211) 评论(0) 推荐(0)

linux安装python3.10

摘要: 1.下载python 包 https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz 2.安装依赖包 yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-de 阅读全文

posted @ 2022-10-31 14:23 空明流光 阅读(4703) 评论(0) 推荐(0)

2022年10月30日

iis 主子站点隔绝问题

摘要: IIS网站,添加子站(虚拟应用程序)时,避免子站web.config继承主键的web.config的配置,导致子站无法运行,需要配置主键的web.config,解决方法如下: 在主站点的<system.web>上一级添加父节点(红色的location): <location path="." all 阅读全文

posted @ 2022-10-30 13:22 空明流光 阅读(84) 评论(0) 推荐(0)

2022年10月27日

asp.net 判断集成和经典模式

摘要: protected void Application_Start(object sender, EventArgs e) { log4net.Config.XmlConfigurator.Configure(); try { var path = HttpContext.Current.Reques 阅读全文

posted @ 2022-10-27 20:54 空明流光 阅读(38) 评论(0) 推荐(0)

vue 获取所有路由 及通过 名称 获取指定路由

摘要: 获取路由表: var routes = this.$router.options.routes; 根据名称获取指定路由: this.$router.resolve({ name: item.name }).route.meta.permissionId 阅读全文

posted @ 2022-10-27 15:22 空明流光 阅读(3951) 评论(0) 推荐(0)

iis 配置所有文件类型 mime

摘要: .* application/octet-stream 阅读全文

posted @ 2022-10-27 13:48 空明流光 阅读(194) 评论(0) 推荐(0)

2022年10月26日

vue 根据name获取指定路由对象

摘要: var href = this.$router.resolve({name: "login"}).href; 阅读全文

posted @ 2022-10-26 16:49 空明流光 阅读(325) 评论(0) 推荐(0)

java mybatis 利用 map 实现执行sql动态输入和动态返回

摘要: mapper.xml <select id="getDemoData" parameterType="hashMap" resultType="java.util.Map"> SELECT #{id} as id </select> mapper List<Map<String, Object>> 阅读全文

posted @ 2022-10-26 14:33 空明流光 阅读(680) 评论(0) 推荐(0)

2022年10月17日

python 序列化到字符串以及反序列化

摘要: import pickle s1 = pickle.dumps("I am data") str_version = s1.decode('unicode_escape') decoded = pickle.loads(str_version.encode('utf-8', 'unicode_esc 阅读全文

posted @ 2022-10-17 15:49 空明流光 阅读(121) 评论(0) 推荐(0)

2022年9月29日

htm 使用 head meta refresh url 实现自动跳转 备忘

摘要: 将以下代码存为 .html 或 .jsp 替换首页即可: <html> <head> <meta http-equiv="Refresh" content="1;url=/stgl/#/login" /> </head> <body> </body> </html> 阅读全文

posted @ 2022-09-29 16:11 空明流光 阅读(78) 评论(0) 推荐(0)

2022年9月25日

centos 任务管理器 htop

摘要: 一、以yum方式安装 1、yum -y install epel-release.noarch 2、yum -y install htop 二、源码方式安装 1、安装gcc、内核库依赖库 yum install -y gcc ncurses-deve 2、下载源码 wget http://sourc 阅读全文

posted @ 2022-09-25 18:50 空明流光 阅读(365) 评论(0) 推荐(0)

2022年9月16日

postgresql 备忘

摘要: 查看postgresql版本:select version() 1. postgresql 查询多行合并成一行 SELECT string_agg (DISTINCT relname, ',' order by relname ASC) FROM pg_stat_user_tables WHERE 阅读全文

posted @ 2022-09-16 15:33 空明流光 阅读(159) 评论(0) 推荐(0)

2022年9月13日

c# 获取当前时区时间

摘要: 获取当前时区时间 time (东八区默认会减去8小时): var time = new Date(new Date().getTime() + (new Date().getTimezoneOffset() / 60) * 24 * 60 * 1000); 获取当前时区当前时间 time 字符串: 阅读全文

posted @ 2022-09-13 16:06 空明流光 阅读(1667) 评论(0) 推荐(0)

2022年9月11日

fiddler 使用备忘

摘要: fiddler2 只适用于 xp 及以下系统,以后续系统有很多限制,高版本使用fiddler4 1. fiddler 就是一个代理服务器,默认本机8888端口,可以在 Tool\Options\Connections 中更改 2.fiddler 对 https 默认不开启捕获,需要在 Tools \ 阅读全文

posted @ 2022-09-11 08:10 空明流光 阅读(39) 评论(0) 推荐(0)

2022年9月9日

centos 查看磁盘占用情况命令

摘要: 最易理解的结果,命令:df -h 阅读全文

posted @ 2022-09-09 17:23 空明流光 阅读(102) 评论(0) 推荐(0)

2022年9月8日

javascript 动态添加 get set 方法

摘要: var temp = window; Object.defineProperty(temp, "myprop", { get: function () { return null; }, set: function (val) { window.alert("myprop:" +val); } }) 阅读全文

posted @ 2022-09-08 15:45 空明流光 阅读(253) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页

导航