自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(31)
  • 收藏
  • 关注

原创 【无标题】gpfs 文件系统上使用gpfs获取用户的acl

gpfs acl

2024-03-27 19:37:05 93

原创 vscode插件开发-右键菜单:获取选中的文件或者目录

【代码】vscode 插件,获取右键选中的文件或者目录。

2022-09-16 16:16:59 2997 2

原创 python sftp sock5代理

python socks5 sftp

2021-12-29 18:16:39 986

原创 中科方德desktop gcc6 编译安装wxPython 3.0.2

下载网址https://sourceforge.net/p/wxpython/activity/?page=0&limit=100#54111c8734309d3223d507d4编译解压tar -jxf wxPython-src-3.0.2.0.tar.bz2修改文件src/stc/scintilla/src/Editor.cxx添加头文件:#include 修改5847行跟5845行abs函数为std:abs替换函数sed -i ‘s@PyErr_Format(P

2021-12-09 19:48:42 1155

原创 【无标题】nodejs https单向认证下载图片

nodejs https下载图片

2021-12-02 19:41:26 367

原创 electron 多窗口共享session

环境electron 1.6.8问题:服务端升级了spring,导致electron两个窗口之间session不能共享,两个窗口一个是登陆窗口,一个是主界面窗口;主界面窗口需要用到登陆窗口登录后产生的session。解决方案:新建窗口时通过webPreferences指定session如下: webPreferences: { session: session.fromPartition('persist:name'), //共享session }注意事项:如

2021-08-17 19:39:03 2611

原创 windows7编译svn 64位

环境准备windows7 sp1vs2017 (需要安装vc++ ATL/MFC for X86/x64)svn版本:1.11.1check svn代码,地址: https://svn.osdn.net/svnroot/tortoisesvn/tags/version-1.11.1安装必要工具(详情参考源码下的build.txt)Java runtime https://www.java.comPython 2.6(\b 1 \b 3)

2021-07-08 19:33:00 305

原创 linssh2 sftp读取远端目录,获取远端文件或者目录信息

环境信息rhel65libssh2版本:libssh2-1.8.2libssh2目前遇到几个注意事项:读取远端目录时,实体的名称没有存储在LIBSSH2_SFTP_ATTRIBUTES中(具体看读取远端目录的实例)在libssh2-1.5之后的版本判断远端是否是目录还是文件,不能使用系统的函数,得使用libssh2封装的函数(具体查看实例)参考https://www.libssh2.org//libssh2_sftp_fstat_ex.htmllibssh2对于sftp操作的错误信息没有

2021-07-03 11:29:19 2789

原创 boost 接受多参数列表

boost 接受多参数列表#include <boost/program_options.hpp>using namespace boost::program_options;using namespace std;int main(){ options_description desc("Allowed options"); desc.add_options() ("files,f", value< std::vector< std::string

2021-07-01 11:30:04 173

原创 boost 进程间通信-share memery传递字符串

### boost 进程间通信-share memery传递字符串#### 写入字符 writeShareMemery.cpp #include<boost/interprocess/shared_memory_object.hpp> #include<boost/interprocess/mapped_region.hpp> #include <iostream> #include <vector> us...

2021-06-28 20:02:41 278

原创 rhel62 编译安装filezilla

rhel62 编译安装filezilla升级gcc到gcc-8.3.0,具体参考如下网址https://www.cnblogs.com/gyfluck/p/10537383.html编译安装libfilezillatar -jxf libfilezilla-0.14.0.tar.bz2cd libfilezilla-0.14.0修改g++为升级后的gccexport CXX=/usr/local/gcc-8.3.0/bin/g++./configure --enable-sha

2020-09-27 14:33:25 489

原创 使用boost::asio:async_write 接受buffer对象时注意事项

使用buffer异步传入对象时注意事项问题:在解决产品bug时,有这样一种case:程序在数据稍微大一点的情况下,会时而崩溃,时而正常,经过定位,发现崩溃是在boost库的async_write处。查阅官方文档发现,async_write传入的对象必须确保能在调用回调函数的时候没有被销毁,否则程序有可能会崩溃Boost.Asio takes advantage of this feature to add buffer debugging. Consider the following co

2020-06-24 11:20:56 1241

原创 innosetup 字符截取 字符长度

字符截取 字符长度实例var S: String; V: String;RegQueryStringValue(HKCU,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppId}_is1','UninstallString', S)V := Copy(S,2,Length(S)-2);

2020-06-23 15:56:22 615

原创 awk 按照顺序合并两个命令执行结果

a 文件内容[root@server272 home]# cat a.txt aaa bbb ccc dddb文件内容[root@server272 home]# cat b.txt 1 a 2 b 3 c合并结果[root@server272 home]# sh test.sh 1 a aaa 2 b bbb 3 c ccctest.sh脚本内容#!/bin/bashcopyIds=

2020-05-20 19:45:09 951

原创 ‘ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)

【Python错误】 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)问题说明:在windows命令行传入参数中包含中文时,在调用subprocess.Popen执行子进程时报错如题,解决方案如下:if sys.platform == "win32": reload(sys)...

2020-05-08 11:52:52 1028

原创 c++之set插入自定义类型的数据-重载小于运算符

问题:定义了一个集合,存放了自定的数据,但是发现数据多的时候,只能插入两条数据;经过调研发现是自定义类型的小于操作符重载函数问题:之前判断的条件是,如果两个路径长度不相等,则表示该类型不一样;之后的条件是:如果两个路径名称不相等,则表示该类型不一样。之前的代码如下:class UploadDirData{public: CLocalPath m_localPath; CSer...

2019-11-28 13:32:19 2771 1

原创 python 2.7 中文编码

python 2.7 中文编码文件编码 "-- coding:utf-8 --"文件编码的意思是,以“utf-8”为例,在当前文件中,可以存在“utf-8”的中文字符,如下例子,如果控制台是utf-8编码的,那就会输出“你好世界! hello world ” # -*- coding:utf-8 -*- def test3(): str1 = u"你好世界...

2019-09-21 17:38:47 518

原创 innosetup 判断系统是否安装了.Net Framework 4.7.2

innosetup判断系统是否安装了.NetFramework 4.7.21. codeif RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\full','release',HistoryBufferSize) thenbegin RegeditValue:=HistoryBuf...

2019-06-06 17:21:21 3300

原创 python3.6中使用web.py创建简单webservice并使用pyinstaller打包成可执行程序

python3.6中使用web.py创建简单webservice并使用pyinstaller打包成可执行程序1.windows 环境搭建 python版本3.6 安装:下载地址,安装过程中选择完全安装,并且勾选“将python添加到path中”。 安装web.py:因为我使用pip 安装web.py时,报好多依赖相关的错,所以建议:使用easy_install web.py命...

2019-06-04 13:35:39 1698

原创 python算法实现两个顺序列表的合并

题目:有顺序列表a[1,3,5,7,9],b[2,3,7,9],如何实现合并?第一种A = [1, 2, 3, 4, 5, 6, 99]B = [2, 4, 6, 8, 10]i = 0j = 0aLen = len(A)bLen = len(B)while i < bLen: bEle = B[i] while j < aLen: ...

2019-05-11 22:39:33 4183

原创 innosetup 通过操作注册表来添加默认文件关联

innosetup 通过操作注册表来添加默认文件关联设置(.dapp)的默认打开方式为{app}\bin\app.exe[Registry]Root: HKCR; Subkey: ".dapp"; ValueType: string; ValueName: ""; ValueData: "appFile" ;Flags: noerror uninsdeletevalue; Root:...

2019-03-29 18:44:03 1722

原创 electron 通过nodejs的winre库实现软件开机自启动

说明:nodejs操作注册表本人试过两个库,第一个是regedit库;另外一个则是winre库。个人推荐winre库。主要是因为:winre库操作方便,源代码阅读方便。 winre库支持electron-packager 打包为sar格式。app完成功能:electron 开发app可以使用户通过menu来设置开机自启动。 支持electron-packager 打包为sar形式...

2019-03-25 22:02:50 1090 1

原创 在linux自定义协议,让浏览器可以调用本地程序

在linux自定义协议,让浏览器可以调用本地程序第一种是在gnome桌面环境下,执行以下步骤 并且重启系统gconftool-2 -t string -s /desktop/gnome/url-handlers/foo/command 'foo "%s"' gconftool-2 -s /desktop/gnome/url-handlers/foo/needs_terminal fals...

2019-03-07 21:48:44 6557 24

原创 nodejs 使用net模块的ipc通信

server 端代码const net = require('net');let path = require('path');let server = net.createServer(function (connect) { connect.setEncoding('binary'); connect.on('error',function(exception){ conso...

2019-03-07 21:40:48 5191

原创 deepin 15.1.1 编译filezilla 3.0.4

1.安装必要库:sudo apt-get install libgtk2.0apt-get install pkg-configsudo apt-get install glib-2.0apt-get install libgmp-devapt-get install libxxf86vm-devsudo apt-get install g++//export CFLA...

2018-08-15 12:17:10 945

翻译 json 按照输入顺序输出结果

import jsonfrom collections import OrderedDictjson_data = '{"test": 1, "test2": 2, "test3":2}'data = json.loads(json_data, object_pairs_hook=OrderedDict)json.JSONDecoder(object_pairs_h...

2017-06-06 21:13:36 5444

原创 python 发送http请求填坑

先说问题:最近开始使用python的urllib2和urllib来请求webservice获取数据,但是服务器是java的服务器,发现python传入的参数(中文)在服务器端显示的是乱码,在网上搜索了一整天,终于整出来了,特此填坑。1.环境:python2.7.10,rhel5.52.代码:import urllib2import urlliburl = "https://ww

2017-06-06 20:23:19 1723

原创 c++ windows wstring转wchar_t数组

wstring pWideChar=L'hello world';wchar tagWideCharList[2048];wcscpy ( tagWideCharList,pWideChar.c_str() );

2017-05-26 14:13:31 3214

原创 shell 填坑记录

1.if else语法:if ....; then....elif ....; then....else...fi注意:then之前必须有“;”2.判断字符相等:if [  str1 = str2 ];then echo okelse echo "not ok"注意:等于号两边必须有空格。

2017-05-23 17:03:37 604

原创 python 双向https client

1.https单向认证。https单向认证:客户端不需要发送证书,只需要认证服务器端证书是否正确即可。https单向认证流程:客户端发送请求前,先认证服务器端证书,证书认证通过,则发送请求。2.https双向认证。https双向认证:简单来讲,就是客户端需要认证服务器端的证书,服务器端需要认证客户端的证书。https双向认证流程:客户端发送请求前,先认证服务器端证书,证书认证通...

2017-05-17 15:57:17 6570

原创 rhel5.5 搭建pyinstaller环境

rhel5.5 搭建pyinstaller环境1.python和pyinstaller环境搭建(redhat5.5)1.1 从python官网下载python2.7.2。1.2 安装:https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz  xz  -d Python-2.7.12.tar.xz  tar -x

2017-05-10 18:44:07 1104

空空如也

空空如也

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

TA关注的人

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