搜索到与相关的文章
操作系统

把vimrc放上来(2010-12-16修改)

source$VIMRUNTIME/vimrc_example.vimsource$VIMRUNTIME/mswin.vimbehavemswin"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""VIMuserinterface"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""setsmarttabse

系统 2019-08-12 01:33:34 2782

编程技术

WinConsole中文编码问题

一天有个同学在群里问为什么他的控制台窗口无法显示中文了。尝试了不同编译器之后,控制台仍然只能输出乱码。其实控制台还有个小小的秘密。猜测编程初学者(甚至非初学者也)不一定清楚(没有具体统计数据,只能“猜测”了,申明如果与事实不符,本人不承担责任)。大家打开控制台窗口,右键,点击“默认”,可以看到这样一个对话框。对了,“默认代码页”选择语言编码。就这么简单,打完收工。WinConsole中文编码问题

系统 2019-08-12 01:32:50 2782

Tomcat

Tomcat部署项目

将一个新的项目部署到一台新机器上操作步骤为:1、将Tomcat安装包复制到新机器下,tomcat安装包路径为:D:\softwareinstallation\Tomcat下的文件apache-tomcat-6[1].0.18.zip复制到需要部署项目的机器上。2、将jdk包复制到机器上,拷贝路径为:D:\ProgramFiles\Java\jdk1.5.0_12。3、配置新机器的环境变量,配置tomcat_home,类似于D:\Tomcat\JAVA_HO

系统 2019-08-12 01:32:35 2782

Python

logging - Logging facility for Python... - Python 的日志记录工具

logging-LoggingfacilityforPython-Python的日志记录工具Thismoduledefinesfunctionsandclasseswhichimplementaflexibleeventloggingsystemforapplicationsandlibraries.这个模块为应用与库定义了实现灵活的事件日志系统的函数与类。ThekeybenefitofhavingtheloggingAPIprovidedbyastand

系统 2019-09-27 17:57:39 2781

Python

selenium+python启动浏览器时可选的自定义选项

1、参数#设定浏览器调用选项,以谷歌为例options=webdriver.ChromeOptions()#设定浏览器启动模式-以iPhone6模式启动mobileEmulation={'deviceName':'iPhone6'}options.add_experimental_option('mobileEmulation',mobileEmulation)#设定浏览器全屏显示options.add_argument("start-maximized"

系统 2019-09-27 17:57:32 2781

Python

C/C++/Qt与 Python 混合编程(2):Qt 调用嵌入python

在Qt的Project中添加一个py文件。然后在test_py.py中的内容如下:#ThisPythonfileusesthefollowingencoding:utf-8#if__name__=="__main__":#passdefhello():print("helloworld!")只有一个hello()函数,Qt就是调用这个hello函数,然后执行,显示hello,world!在上一节的主文件中添加如下代码:PyRun_SimpleString(

系统 2019-09-27 17:56:32 2781

Python

Python:给定数据集计算样本之间的距离矩阵

importnumpyasnpfromsklearn.datasetsimportload_irisiris=load_iris()#data=iris.data#print(data[0])#print(data[2])#print(type(iris.data))#print(iris.data.shape)#LenRow,LenColumn=iris.data.shape#print("LenRow={}".format(LenRow))#print

系统 2019-09-27 17:54:16 2781

Python

Python httplib模块使用实例

httplib模块是一个底层基础模块,实现的功能比较少,正常情况下比较少用到.推荐用urllib,urllib2,httplib2.HTTPConnection对象classhttplib.HTTPConnection(host[,port[,strict[,timeout[,source_address]]]])创建HTTPConnection对象HTTPConnection.request(method,url[,body[,headers]])发送请

系统 2019-09-27 17:50:21 2781

Python

python : pyecharts 1.1.0 画K线图

阅读更多pipinstallpyecharts;会安装pyecharts-1.1.0画K线图kline1.py#coding:utf-8importos,sysfrompyechartsimportoptionsasoptsfrompyecharts.chartsimportKlineiflen(sys.argv)==2:code=sys.argv[1]else:print('usage:kline1.pycode')sys.exit(1)iflen(co

系统 2019-09-27 17:50:05 2781

Python

汉字数字转阿拉伯数字。Python3实现。

可能有些情况没有考虑到。源码python3:#encoding=utf-8importmath#系数CN_NUM={'〇':0,'一':1,'二':2,'两':2,'三':3,'四':4,'五':5,'六':6,'七':7,'八':8,'九':9,'零':0,}#基数CN_UNIT={'十':10,'百':100,'千':1000,'万':10000,'亿':100000000,}#计算中文数字值,返回stringdefcalcCNNumberValue(

系统 2019-09-27 17:46:43 2781