- 博客(114)
- 资源 (70)
- 收藏
- 关注
原创 解决Python扩展程序编译安装的error: command 'mt.exe' failed with exit status 31
编辑Python27\Lib\distutils\msvc9compiler.py,查找ld_args.append('/MANIFESTFILE:' + temp_manifest)一行,在其后添加一行,内容为ld_args.append('/MANIFEST')
2013-11-23 03:55:17 3728 1
原创 解决Python的UnicodeDecodeError
在Python安装目录下找到Lib\site-packages,新建sitecustomize.py文件,写入如下内容:import syssys.setdefaultencoding("gb2312")这里是中文,所以采用的gb2312,其它编码方案对应的设置即可。
2013-11-21 15:29:36 1143
原创 使用DLL文件生成LIB文件实现动态链接
以编译wxPython所需要的unicows.lib文件为例进行说明。用VS编译wxPython时提示无法打开unicows.lib文件,经核实,该文件是为支持陈旧Windows版本的Unicode而提供,全称为Microsoft Layer for Unicode on Windows。在微软官网下载到unicows.exe文件,解开后得到最重要的unicows.dll和一个pdb文件,而离
2013-11-21 13:39:04 1911
原创 Windows 7自动更新后安装Windows 7 SDK失败
由于安装了新版本的可重发布动态库和编译器工具,安装程序无法覆盖新版本,对此可卸载Microsoft Visual C++ 2010 x86 Redistributable和Microsoft Visual C++ 2010 x64 Redistributable,在安装配置过程中忽略编译工具的安装即可。
2013-11-21 10:17:28 903
原创 Visual Studio 2010编译Python扩展程序报error: Unable to find vcvarsall.bat
该错误由于Python扩展编译工具在注册表找不到Visual Studio 2010注册信息造成,编辑“\Lib\distutils\msvc9compiler.py”,找到 toolskey = “VS%0.f0COMNTOOLS” % version,直接修改为 toolskey = ”VS100COMNTOOLS”解决,记录之。
2013-11-20 23:55:01 1304
原创 使用nslookup查询域名的MX记录
有很多工具提供SMTP发送邮件的功能,只需指定发送方和接受方的邮件地址,便可以通过域名查询定位SMTP服务器完成通信,但是如果域名服务器的域名设置中MX记录是错误的话,容易出现无法连接SMTP服务器的错误,现将通过nslookup查看MX记录的方法,方便日后查询。 >nslookup>server dnsip>set q=MX>maildomain 若出现的MX记录对应
2013-01-30 16:39:24 3317
原创 VirtualBox安装的Linux虚拟机虚拟磁盘膨大问题处理
经常在Windows机下安装虚拟Linux操作系做实验,为了节省硬盘空间,并最大地让虚拟机适应将来的要求,把虚拟硬盘的容量定义很大,然后设置动态分配属性使其按需扩展。虚拟硬盘的动态扩展和Oracle的表空间类似,是单方向的,也就是增大后就不能自动缩小。虚拟机使用的真实空间其实远远小于宿主机上的虚拟磁盘大小,因此需要经常性的Shrink下虚拟磁盘对节约硬盘资源意义重大。 网上对缩小虚拟硬盘
2012-12-25 13:45:33 2126
原创 安装Funtoo Linux手记
无意间看到Daniel Robbins老兄悲催境遇的八卦故事,禁不住想试试funtoo linux,先前使用过gentoo,对USE的不正确应用导致portage包间出现循环依赖是gentoo很头痛的问题,不知道funtoo在这方面有没有改善,于是操刀尝试一把。Funtoo不提供livecd,按照官方的建议,可使用系统急救工具盘来启动系统并装入funtoo操作系用,也可使用任意能使系统举起并带
2012-12-24 12:37:20 5232
原创 通过给Tomcat打Monkey Patch实现数据库连接池配置用户密码加密
有一个陈旧的J2EE项目使用Tomcat做应用容器,数据库连接部分使用里容器的连接池,由于信息安全的需要,数据库密码不允许明文保存,而Tomcat的连接池配置文件不管是xml格式也好还是properties格式也好都只支持明文的读取,而且系统是陈旧项目,变动代码风险太大,因此决定修改中间件实现数据库密码的加密。 通过查找一些资料,并且确定Tomcat确实使用的自带的dbcp库来维护连接池
2012-07-29 02:57:09 1348
原创 Fortran 77处女程序
program hello a=0 b=0 t=0 print *,'input a' read *,a print *,'input b' read *,b a=abs(a) b=abs(b) if(a.lt.b) then t=a
2012-07-24 19:38:38 2062
原创 使用Pyinstaller打包Python脚本
Python打本地包工具很多,网上资料也不少,自己经常碰到需要打成独立包的需求,因此选择了Pyinstaller,只是Windows下如果Python的版本大于2.6就需要Pywin32支持(类Unix下工具本身就很全,打单个包执行的需求不强烈),执行的过程大致如下,旨在在记录,日后来此处复制。 准备就需要后执行如下命令序列: Configure.py MakeSpe
2012-07-17 13:20:52 733
原创 脚本初始化VS 2010 C/C++编译环境
首先本地需要安装Microsoft Visual Studio 2010或者相应的版本,创建批处理文件cl32.bat,内容如下:@echo offcall "D:\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86set CMD_LINE_ARGS=:setArgsif ""%1""=="""" goto doneSe
2012-07-11 11:43:02 949
原创 Windows 7删除任务栏Shell_NotifyIcon添加过的垃圾图标显示配置信息
打开注册表编辑器,找到HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify,先导出备份,之后删除之下的IconStreams和PastIconsStream,关闭注册表编辑器,然后打开任务管理器,杀死explorer.exe进程(这步至关重要,如果
2012-07-04 00:29:57 1285
原创 用低级键盘钩子检测键盘某键粘死故障
最近工作用的Thinkpad左ALT键可能使用太多损坏,表现为是不是粘死,在工作中用快捷达不到目标时才发现这一状况,且该状态是不可见的,发生时总要排除其它原因后才通过重复敲击ALT键来释放这一BT的状态,尤其在处理关键任务时发生令人心烦意乱,于是捡起丢了很多年的VC写个键盘钩子监视这一情况,以便及时发行并整改。 解决的原理为采用低级键盘钩子检测ALT键的状态,若发现ALT键长期被按着不释
2012-07-03 19:49:03 2643
原创 Oracle DBA日常任务——查杀死锁
Oracle的锁分为两大类,一类就是极为常见的DML事务锁,是为保障数据库系统数据一致性而存在的锁,其中分共享锁、排它锁等,不同的DBMS对这类锁的实现参差不齐;另一大类锁就是DDL级锁,这类锁一般出现在开发或发布时候,一旦出现比较棘手。下面就两类所的锁查找和灭杀做一个阐述。 1、查找DML锁select p.spid, s.sid, s.serial#,
2012-07-03 11:17:44 856
原创 Oracle计算正常公休或工作日的PL/SQL函数
记录如下create or replace function f_jg_sxts(date_begin in number, date_end in number default to_char(sysdate,
2012-06-21 16:52:58 6110
原创 快速安装Gentoo操作系统(以AMD64为例)
不求最好,但求最快,快速安装配置Gentoo Linux,自己记录下,省得日后又重新图破,结合Gentoo手册运行,相当顺利,只需解决少量的循环依赖。第一部分 准备安装1、官网下载livecd镜像和stage包;install-amd64-minimal-20120614.isostage3-amd64-20120614.tar.bz22、使用livecd启动主机;3、
2012-06-20 19:27:15 2124
原创 一个用作撕碎字符串的PL/SQL工具函数(Oracle 10g)
create or replace function f_tool_splt2arr(p_src in varchar2, p_sub in varchar2 default ',', p_regflag i
2012-06-20 19:12:37 689
原创 Lua语言string对象的split方法实现
function split(str,delim) local i,j,k local t = {} k = 1 while true do i,j = string.find(str,delim,k) if i == nil then table.insert(t,string.sub(str,k)) return t end table.insert(t,s
2012-05-14 13:42:58 1799
原创 Python中使用正规表达式实现查找和匹配串
Python的正规表示通过标准库re模块实现,其中包括两种基本操作:1、使用正规表达式匹配整串;2、使用正规表达式查找子串。对应到正规表达式的操作,有两个对象需要涉及,re.RegexObject和re.MatchObject,这两个对象分别代表正规表示本身和匹配信息,对象有一组方法用于设置匹配选项、编译、查找、匹配、查看分组匹配情况等,同时提供有模块级别的对应方法,只是参数中要把模式
2012-05-10 15:33:55 1554
原创 Python使用SocksiPy使paramiko库通过Socks代理SSH连接服务器
近期有使用Python通过SSH连接服务器进行维护的需求,通过搜索发现使用paramiko库的居多,因此决定使用该库。经过短时间的使用后发现paramiko没有如Ruby的net/ssh一般很方便使用Socks代理的方法(可能有,出于自己初学的水平没有发现吧,从Agent相关的类发现有一些转发的痕迹,看代码依赖于具体的平台,而且还访问到环境变量,并且不确定能通过这些方法使用代理连接),希望只有寄托
2012-05-10 00:53:20 10704
原创 Emacs最基本命令记录
1、最基本命令a、Ctrl和Alt键是操作emacs的基础,没有Alt键的同学可以使用其它键顶替,如ESC;b、开始介绍最基本的几个命令:C-x C-c 退出emacsC-v,M-v 向下滚一屏和向上滚一屏,会留两行以便查看的连续性C-l 刷新屏幕,将光标所处的行置于屏幕中央C-p,C-n 光标向上和向下移动一行C-b,C-f 光标往回和往前移动一个字符M-b,M-
2012-05-08 21:51:29 1011
原创 Python使用Httplib访问Web站点
最简单的用法:import httplib2import libxml2http = httplib2.Http()response,content=http.request('http://www.google.com/ig/api?hl=en_us&weather=kunming','GET')doc = libxml2.parseDoc(content)print docd
2012-05-08 21:47:36 769
原创 使用Python库Paramiko连接SSH服务器
Ruby下有net/ssh方便连接SSH服务端,在Python下是否也存在类似的库呢?经过简单的搜索发现使用paramiko库的较多,于是乎尝试一下。 首先使用easy_install pycrypto安装pycrypto库作为ssh库的依赖,然后执行easy_install paramiko安装这个库。 编写如下代码进行测试:import paramikoif _
2012-05-08 16:04:01 1668
原创 使用Visual Studio 2010编译wxPython-2.8.12.1
为了解决C运行时冲突的问题,决定在本地编译使用Visual Studio 2010编译wxPython,话不多说,开始处理。 1、首先下载wxPython-2.8.12.1源码包,下载地址为http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2; 2、解压源码包至本地,在这里解压到D:\wxPython
2012-05-04 14:01:40 2202 1
原创 使用Visual Studio 2010本地构建libxml-python
由于要使用libxml-python,官方下载的Windows二进制发布安装包会向系统添加反安装信息,和经典Windows应用程序混为一堂,不方便管理,因此决定自己在本地进行编译,加之这样可以部分避开MinGW中转。MinGW在本机的表现实在令人蛋疼,部分应用效率之差都不敢恭维啊。在构建过程中遇到了一些问题,部分问题发现是自己再4年前的项目应用中解决过的,由于当时没留下记录,所有的图破又重走一遍,
2012-05-02 03:46:55 1846
原创 Windows本地编译TortoiseSVN项目源代码
出于工作的中处理琐碎事务的要求,需要了解SVN客户端工作的一些细节,以便服务于项目,选择了Tortoise SVN客户端进行本地编译,准备瞅机会对其扩展。 首先从SVN的代码库中导出项目源代码,在次选择了最新的发布分支1.7.6,在本地建一目录,建议上级目录中都不含有中文或者空格之类的特殊情况,在此建作SVN,并在之建立子目录TortoiseSVN,然后将代码Check Out至该子目录
2012-04-22 10:45:40 1979
原创 MySQL-python在Windows环境下的编译安装
MySQL-python是Python语言访问MySQL数据库的扩展,和Ruby或Perl的DBI类似,是便捷访问数据库的方式之一。MySQL-python的项目地址为http://sourceforge.net/projects/mysql-python/files/,下载文件后在README中发现惊人的几句话:I don't do Windows. However if someone p
2012-04-21 14:12:02 1165
原创 一组VC开发PL/SQL Developer插件代码骨架
PL/SQL Developer因其较完整的Oracle数据库开发和管理功能而广泛被诸多MIS程序员和DBA采用,随着应用的深入,应用提供的功能可能不在能满足当前的快速开发或维护的需求,和其它软件类似,该应用程序也提供通过插件开发扩展功能办法,尽管在编辑窗口方面没什么便利而言,并且官方提供有第三方开发的有用插件下载,如ExecuteNotifier就是一个超简单且很实用的插件,尤其是对并行执行工作
2012-04-21 00:42:55 2148
原创 Java中用iText导出DPF文档的纯文本内容
iText作为在Java中处理PDF文档的工具被广泛使用,各种开源项目中都比较常见。现在就使用iText提供的API将PDF文档中的文本信息导出为纯文本,虽然现在很多工具中都已经支持这样的操作,这是第一步也算是读取PDF文件最常见的需求。 首先下载iText包,地址为http://sourceforge.net/projects/itext/,最新版本为5.1.2,完整包名为iText-
2011-11-10 17:20:09 4257 2
原创 C++中使用Lambda演算
由于自己没有接触Boost C++类库,据说里面提供了优美的Lambda演算,现在说的是标准C++中支持的Lambda表达式。新的C++规范中支持了此类演算,这类似于Ruby语言中的模块,无非是想让代码编写者尽量少些代码,且良好地处理闭包问题,下列程序演示了这类演算过程。#include using namespace std;templateint max(int x,i
2011-11-02 04:20:20 887
原创 C++中使用正规表达式操作字符串
一、前言 之前在C++中使用正规表达式是比较头痛的问题,要么需要引用第三方库,要么需要自己实现匹配过程。虽然使用第三方的库确实可行,但对程序的移植带来一定的困难,有时不得不带上笨重的Boost库或使用为Perl开发的C语言库,新的C++标准中加入了对正规表达式的支持,这的确是大快人心,因为在字符串处理中或多或少使用正规表达式能达到事半功倍的效果,且程序的健壮性得到很好的保持。下面就使用C++
2011-11-02 03:11:28 899
原创 使用Lua构造PL/SQL Developer插件框架
一、前言Lua是一门脚本语言,由巴西里约热内卢天主教大学的一个研发小组创作,因其小巧和灵活备受青睐,魔兽世界和迅雷中都能看到它的身影,关于Lua更详细介绍和源代码,可以从http://www.lua.org获取。和前者不同,PL/SQLDeveloper是一个商业软件,使
2011-09-03 17:16:00 3671
原创 JNI Hello World
一、Windows版本1、创建工作目录JNIDemo。2、编写包含本地方法的Java类JNIDemo.java。 首先为Java的package在工作目录下创建文件夹层次结构test/jni/demo,在该子目录下创建Java源文件。package test.jni.demo;public class JNIDemo{ //Dynamic library i
2009-08-20 21:10:00 3553 2
PKCS #11 v2.11: Cryptographic Token Interface Standard(包含C头文件)
2022-01-02
Steinberg SDKs.zip
2020-05-24
VST SDK 3.612
2019-03-02
MFC调用Delphi开发的ActiveX控件
2019-02-14
Julia学习材料合集
2018-09-10
Flex(The Fast Lexical Analyzer)用户手册(pdf)
2018-08-31
Data Structures and Algorithms Using Python
2012-04-26
The Java™ Language Specification Java SE 7 Edition
2011-10-30
SecureCRT 6.72永久试用版
2011-10-20
Oracle错误查看实用工具oerr Windows改编
2010-11-14
XML终极教程(PDF)
2009-06-10
Pragmatic Bookshelf, Programming Ruby 2nd
2009-06-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人