plot(density(rnorm(1e4)))
我已经使用函数和过程制作了这个包,我试图使用spring jdbctemplate从我的java代码中调用它们。但是程序运行正常,但无法调用此函数。
CREATE OR REPLACE PACKAGE BODY pk_sahil AS
procedure squareNumDummy(x in number,y in number) is
begin
dbms_output.put_line(x*y);
insert into sahil values('package',111);
end squareNumDummy;
function sumFun( x in number , y in number ) return number is
begin
insert into sahil values('function',222);
return x+y;
end sumFun;
END pk_sahil;
/
create or replace package pk_sahil as
procedure squareNumDummy(x in number, y in number);
function sumFun(x in number, y in number ) return number;
end pk_sahil;
/
此程序运行正常。
int param1 =5 , param2 = 10;
jdbcTemplate.update( "call pk_sahil.squareNumDummy(?,?)",param1,param2);
运行此功能后,我遇到错误
请纠正我是否我没有正确地调用该函数或者我需要处理函数的返回变量?如何从jdbctemplate.update('call ...')方法调用该函数?
答案 0 :(得分:1)
您可以按照以下步骤从[re.sub(r'<.*?>', '', str(s) for s in myList]
调用存储的函数:
def threshold_image(img):
gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
resized_img = cv2.resize(gray_img
, None
, fx=5.0
, fy=5.0
, interpolation=cv2.INTER_CUBIC)
resized_img = cv2.GaussianBlur(resized_img,(5,5),0)#(5,5)
equalized_img = cv2.equalizeHist(resized_img)
# height of the image
alto = int(resized_img.shape[0]) # shape[0] = rows
# width of the image
ancho = int(resized_img.shape[1]) # shape[1] = cols
reduced = cv2.cvtColor(reduce_colors(cv2.cvtColor(equalized_img, cv2.COLOR_GRAY2BGR), 6), cv2.COLOR_BGR2GRAY)
ret, mask = cv2.threshold(reduced, 110, 255, cv2.THRESH_BINARY)#64
cv2.imwrite('licence_plate_mask.png', mask)
return mask