linux-Mustmypidfilebelocatedin/var/run?-StackOverflowThelocationofthepidfileshouldbeconfigurable./var/runisstandardforpidfiles,thesameas/var/logisstandardforlogs.Butyourdaemonshouldallowyoutooverwritethissettinginsomeconfigfile.li
系统 2019-08-12 01:32:30 2531
安装环境Windows764bitApache-tomcat-8.0.9-windows-x64Solr-4.9.0JDK1.8.0_0564bit安装步骤Tomcat和JDk的安装在这里就略过。注意:solr4.9要求jdk1.7+步骤一:解压solr-4.9.0到任意文件夹,我解压到D:\InstalledApplications\solr-4.9.0\solr-4.9.0目录下。步骤二:将solr-4.9.0\dist\solr-4.9.0.war复
系统 2019-08-12 01:32:18 2531
文章目录1.字典增删2.模块、类、对象2.1一个类的例子3.继承和组合3.1什么是继承3.1.1隐式继承3.1.2显式覆盖3.1.3在运行前或运行后替换3.1.4三种方式组合使用3.2组合3.3继承和组合的应用场合1.字典增删stuff={"name":"jack","age":"18","height":"180"}stuff["city"]="beijing"print(stuff)delstuff["city"]print(stuff)2.模块、类、
系统 2019-09-27 17:55:03 2530
使用工具:IronPython工具介绍:是一种在.NET及Mono上的Python实现,是一个开源的项目,基于微软的DLR引擎。(个人理解就是在.net上面运行Python代码)使用方法:先新建一个控制台应用程序=>使用Nuget添加IronPython包=>在Main()函数中编写如下代码:ScriptEngineengine=Python.CreateEngine();ScriptScopescope=engine.CreateScope();stri
系统 2019-09-27 17:54:42 2530
list_pratisce=[45,69,8,19,9]n=len(list_pratisce)forjinrange(n):foriinrange(n-1):iflist_pratisce[i]>list_pratisce[i+1]:temp=list_pratisce[i]list_pratisce[i]=list_pratisce[i+1]list_pratisce[i+1]=tempprint(list_pratisce)输出结果:[8,9,19,
系统 2019-09-27 17:53:56 2530
原文链接:https://mp.weixin.qq.com/s?__biz=MzIwNDA1OTM4NQ==&mid=2649543094&idx=2&sn=dc2c1fa8a9bfe28f73e10dfba4b06ee0&chksm=8edd9620b9aa1f36d87e6f508ede851ec177257a117af53b36a6ca81269502c28b2912a57f08&scene=0&xtrack=1&key=6836e4d006a8e5
系统 2019-09-27 17:53:42 2530
用dist存放所有数据到中心的距离,有n行(n组数据),k+1列(前k列分别存放到第i个类中心的距离,最后一列存放分到了第几类)#!/usr/bin/envpython#-*-coding:utf-8-*-importnumpyasnpn=100x=np.arange(100)y=np.arange(200,300,1)#1、选中心,此时假设分为两个类k=2center0=np.array([x[0],y[0]])center1=np.array([x[1
系统 2019-09-27 17:52:46 2530
result=[]defget_all(path):#递归获取指定目录下所有文件的绝对路径(非目录)dir_list=os.listdir(path)foriindir_list:sub_dir=os.path.join(path,i)ifos.path.isdir(sub_dir):get_all(sub_dir)else:#此时sub_dir是文件的绝对路径result.append(sub_dir)get_all(r'E:\bigdata')E:\b
系统 2019-09-27 17:49:36 2530
最近由于经常要用到Excel,需要根据Excel表格中的内容对一些apk进行处理,手动处理很麻烦,于是决定写脚本来处理。首先贴出网上找来的读写Excel的脚本。1.读取Excel(需要安装xlrd):#-*-coding:utf8-*-importxlrdfname="reflect.xls"bk=xlrd.open_workbook(fname)shxrange=range(bk.nsheets)try:sh=bk.sheet_by_name("Shee
系统 2019-09-27 17:48:35 2530
周末在家,写了个小程序,用于将阿拉伯数字转换化大写中文。程序没经过任何优化,出没经过详细的测试,挂到网上,方便将来有需要的时候直接拿来用。#!/usr/bin/python#-*-encoding:utf-8-*-importtypesclassNotIntegerError(Exception):passclassOutOfRangeError(Exception):pass_MAPPING=(u'零',u'一',u'二',u'三',u'四',u'五',
系统 2019-09-27 17:45:25 2530