importjava.io.IOException;importorg.springframework.context.support.ClassPathXmlApplicationContext;publicclassContextUtils{publicstaticfinalClassPathXmlApplicationContextcontext=newClassPathXmlApplicationContext("applicationContex
系统 2019-08-12 01:32:34 2694
基本格式为::g/pattern/s/old/new/g首先搜索到匹配的行,然后在匹配的行中替换。如有下面的文本:intval_one=1;intval_two=2;intval_three=3;我们想让“=”两边有空格,即变为:intval_one=1;intval_two=2;intval_three=3;则替换语句为::g/\v\w\=\w/s\v\=/\=/g\w表示字母数字或下划线。vim——与上下文相关的替换(先查找匹配再替换)
系统 2019-08-12 01:32:17 2694
修改后的CMemDC类:(增加了红色的那行,非常重要喔。另外加了些注释)///////////////////////////////////////////////////////////////////////////////CMemDCclassCMemDC:publicCDC{public:CDCHandlem_dc;//屏幕的DCOwnerDCCBitmapm_bitmap;//OffscreenbitmapCBitmapHandlem_hOld
系统 2019-08-12 01:31:39 2694
前言开发环境:Centos7+Python3.5.1+QtCreator(只是使用QtCreator编译而已,并没有使用QT的任何库)Python调用C/C++库,我现在能做到的有两种方式1.extern“C”导出(互相传值比较麻烦,不建议使用这种方式):将C/C++库做成和平常一样的DLL和或者.so,比如://.h文件#include//.cpp文件//C/C++my.so或者my.dllenter"C"voidprintHello(){std::co
系统 2019-09-27 17:37:40 2693
shape是数组array的属性;reshape()是数组array的方法shape属性可以获得当前array的形状:importnumpyasnpa=np.array([1,2,3,4,5,6,7,8])#一维数组print(a.shape)#值为(8,)print(a.shape[0])#值为8,因为有8个数据#print(a.shape[1])#IndexError:tupleindexoutofrangea=np.array([[1,2,3,4],
系统 2019-09-27 17:37:35 2693