搜索到与相关的文章
各行各业

Yarn下Map数控制

publicListgetSplits(JobContextjob)throwsIOException{longminSize=Math.max(getFormatMinSplitSize(),getMinSplitSize(job));longmaxSize=getMaxSplitSize(job);Listsplits=newArrayList();Listfiles=listStatus(job);for(FileStatus

系统 2019-08-12 09:27:08 2224

各行各业

TNS-01251: Cannot set trace/log directory un

试图改变监听日志的名称时,报出TNS-01251错误:$lsnrctlLSNRCTLforLinux:Version11.2.0.4.0-Productionon30-JUN-201514:51:08Copyright(c)1991,2013,Oracle.Allrightsreserved.WelcometoLSNRCTL,type"help"forinformation.LSNRCTL>setlog_fileParameterValue:listene

系统 2019-08-12 09:26:42 2224

数据库相关

pk+uk+fk+index

1.pk数据库表分为实体表和关系表。实体表是用来描述在domain(领域模型)里确实存在的实体(人、财、物、时间、空间)及实体元素发生的活动(转移)。实体表的pk一般由系统自动生成(SYS_GUID()和sequence)。关系表是用来描述两张实体表之间的多对多关系,关系表的pk一般是两张实体表pk的联合,此pk同时具有uk的功能,所以关系表不用再建uk。--查询pk缺失的表selecttable_namefromuser_tablestwherenote

系统 2019-08-12 01:54:44 2224

数据库相关

模仿c的字符转整数函数 atoi

1#include2enumStatus{KValid=0,KInvalid};3intg_nStatus=KValid;4longStrToIntCore(char*str,boolminus)5{6longnum=0;7while(*str!='\0')8{9if(*str>'0'&&*str<'9')10{11intflag=minus?-1:1;12num=num*10+flag*(*str-'0');13if((!minus&&

系统 2019-08-12 01:33:55 2224

各行各业

自创算法实现Reporting Service中多值判定

前提条件:用ReportingService做过报表,并碰到想确定多选下拉框选了哪些选项却无法确定的情况。如:根据选项显示相应的值。功能实现:用算法实现ReportingService中多值判定。算法说明:设a=1,b=2,c=4,d=8,e=16,f=32,大家能从这组数中看到什么规律?很容易得到它们的值是2的n-1次方,还有什么呢?很容易忽视的一点:b=a+1,c=a+b+1,d=a+b+c+1,e=a+b+c+d+1,f=a+b+c+d+e+1,这个

系统 2019-08-12 01:32:19 2224

各行各业

OpenCascade Primitives BRep-Cone

OpenCascadePrimitivesBRep-Coneeryar@163.comAbstract.BRepisshortforBoundaryRepresentation.BoundaryRepresentationgivesacompletedescriptionofanobjectbyassociatingtopologicalandgeometricinformationforsolidmodeling.Inthiscase,objectsar

系统 2019-08-12 01:31:52 2224

Python

跟老齐学Python之字典,你还记得吗?

字典,这个东西你现在还用吗?随着网络的发展,用的人越来越少了。不少人习惯于在网上搜索,不仅有web版,乃至于已经有手机版的各种字典了。我曾经用过一本小小的《新华字典》。《新华字典》是中国第一部现代汉语字典。最早的名字叫《伍记小字典》,但未能编纂完成。自1953年,开始重编,其凡例完全采用《伍记小字典》。从1953年开始出版,经过反复修订,但是以1957年商务印书馆出版的《新华字典》作为第一版。原由新华辞书社编写,1956年并入中科院语言研究所(现中国社科院

系统 2019-09-27 17:56:42 2223

Python

Python多线程异步任务队列

原文地址python的多线程异步常用到queue和threading模块#!/usr/bin/envpython#-*-coding:UTF-8-*-importloggingimportqueueimportthreadingdeffunc_a(a,b):returna+bdeffunc_b():passdeffunc_c(a,b,c):returna,b,c#异步任务队列_task_queue=queue.Queue()defasync_call(fu

系统 2019-09-27 17:51:38 2223

Python

python笔记2

阅读更多操作列表#列表循环for循环(for**in**)1.注意使用for循环时print前要缩进cats=["alice","clear","dell",'moon']forcatincats:print(cat)#可在for循环中执行更多操作#2.不使用for循环时,切记print能缩进cats=["alice","clear","dell",'moon']forcatincats:print(cat)print("theyaresocute")#在

系统 2019-09-27 17:51:31 2223

Python

python实现爬虫

解决print()中文的乱码问题!!!#-*-coding:utf-8-*-importioimportsys#改变标准输出的默认编码(改变中文输出的乱码问题)sys.stdout=io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')selenium+chrome浏览器进行爬虫下载chrome的浏览器驱动(http://chromedriver.storage.googleapis.com/index.ht

系统 2019-09-27 17:49:57 2223