axis

How to disable SSLv2 socket protocol in axis

ε祈祈猫儿з 提交于 2019-12-06 14:58:22
I have a problem with consuming a web service using axis.This happen because axis sent a SSLv2 ClientHello and the server that offer the webservice does not support the SSLv2 protocol. To fix this i have to disable this protocol. The code for disable it in Java is : SocketFactory socketFactory = SSLSocketFactory.getDefault(); SSLSocket socket = (SSLSocket) socketFactory.createSocket(hostname, port); socket.setEnabledProtocols(new String[] {"SSLv3", "TLSv1"}); I refer to these link . Now, the problem is how can I disable this protocol when I am using axis for consuming the webservice? Bruno If

Splitting axis labels with expressions

流过昼夜 提交于 2019-12-06 11:19:55
I have a plot with a long label containing an expression and I want to split it on two lines. Adding a "\n" inside the expression the result is not as expected. ylabel <- expression("A very long label with text and \n expression"*(alpha+beta) [ij]*" A very long label with text and expression") curve(x^3 - 3*x, -2, 2, xlab=xlabel) Any help would be appreciated. Thanks Here is another solution, relying on atop as did @AndresT in his edit. Note that we cannot use control character like \n in an expression, which explains why using something like expression(paste("...\n", alpha[i], "....")) would

Datetime axis spacing

空扰寡人 提交于 2019-12-06 11:17:20
I have an errorbar plot where the xaxis is a list of datetime objects. The standard plotting method will put the first and last point so that they are right on the bounding box of the plot. I would like to offset by a half tick so that the first and last point can be seen clearly. ax.axis(xmin=-0.5,xmax=len(dates)-0.5) does not work for obvious reasons. It would be nice to be able to do this without hardcoding any dates. The following will produce a plot which has ten points but you can really only see 8. import datetime import matplotlib.pyplot as plt dates = [datetime.date(2002, 3, 11) -

numpy

[亡魂溺海] 提交于 2019-12-06 11:02:18
import numpy as np # numpy数值计算,支持维度数组和矩阵计算# 特殊创建矩阵方式x = np.zeros((2, 3)) # zeros 创建全是 0 的数组矩阵,参数是数组类型y = np.ones(3) # ones 创建全是 1 的数组矩阵z = np.full((3, 2), 3) # full 创建定值数组矩阵,如创建3行2列,数值全是3的矩阵s = np.eye(5, k=2) # eye 创建对角矩阵,对角值为 1 ,k值表示从第几列开始对角相同,不填默认为 0w = np.random.random((2, 3)) # 创建随机值的矩阵# 初始化创建矩阵方式a = np.array([[1, 2, 3], [3, 4, 5]],dtype=np.int64) # 初始化一个数组成矩阵,dtype= 设置数据类型print(a.shape) # 查看这个矩阵是几行几列a1 = a[[1, 0, 1], [0, 1, 1]] # 索引结果是[3,2,4],前后保持一一对应a2 = [a[1, 0], a[0, 1], a[1, 1]] # 与上面结果相同rows = np.array([[0, 0], [1, 1]]) # 索引矩阵的行cols = np.array([[0, 1], [0, 1]]) # 索引矩阵的列print(a[rows,

K近邻法与kd树

北战南征 提交于 2019-12-06 10:57:57
K近邻法与kd树 一、k近邻算法 输入:训练数据集 \[ T = \{(x_1,y_1),(x_2,y_2),...,(x_n,y_n)\} \] 其中, \(x_i \in R^n\) 为实例的特征向量, \(y_i \in Y = {c_1,c_2,c_3,..,c_k}\) 为实例类别, \(i=1,2,3,..N\) ,实例特征向量 \(x\) . 输出:实例特征向量所属的类 (1) 根据给定的距离度量,在训练集 \(T\) 中找出与 \(x\) 最邻近的 \(k\) 个点,涵盖这 \(k\) 个点的 \(x\) 的邻域记作 \(N_k(x)\) . (2) 在 \(N_k(x)\) 中根据分类决策规则(如多数表决)决定 \(x\) 的类别 \(y\) 。 \[ y = \mathop{argmax}_{c_j} \sum_{x_i\in N_k(x)} I(y_i=C_j) \] k近邻算法没有显式的学习过程。 二、k近邻模型 k近邻模型由三个基本要素组成——距离度量,k值选择,分类决策规则 2.1 距离度量 闵可夫斯基距离公式: \[ L_p(x_i,x_j) = (\sum_{l=1}^{n}|x_i^{(l)}-x_j^{(l)}|^p)^{\frac{1}{p}} \] 当p = 2 时,公式称为欧式距离。 当p = 1时,公式称为曼哈顿距离。 当p = \(

Web Service throwing exception using Axis2 Java

浪尽此生 提交于 2019-12-06 10:19:55
问题 I'm actually developing a Web Service in Java using Axis 2. I designed my service as a POJO (Plain Old Java Object) with public method throwing exceptions : public class MyService { public Object myMethod() throws MyException { [...] } } I then generated the WSDL using Axis2 ant task. With the WSDL I generate a client stub to test my service. The generated code contains a "MyExceptionException" and the "myMethod" in the stub declare to throw this : public class MyServiceStub extends org

Remove all axis values and labels in twoord plot

我怕爱的太早我们不能终老 提交于 2019-12-06 10:08:42
I want to remove all the axis including x, left and right y but retain the boundary of the plot. I tried to set xaxt and yaxt to 'n' but no luck. library(plotrix) twoord.plot(2:10,seq(3,7,by=0.5)+rnorm(9), 1:15,rev(60:74)+rnorm(15), type=c("bar","l"), xaxt='n', yaxt='n') Is there any suggestion? Thanks in advance. I don't think so from what I saw. It's easy enough to create this plot anyway: library('plotrix') set.seed(1) x1 <- 2:10 y1 <- seq(3,7,by=0.5)+rnorm(9) x2 <- 1:15 y2 <- rev(60:74)+rnorm(15) par(mfrow = c(1, 3), mar = c(3, 3,2,3)) twoord.plot(x1, y1, x2, y2, type=c("bar","l"), xaxt='n

Mirth Connect: javascript to call a webservice

廉价感情. 提交于 2019-12-06 08:36:58
I'm trying to call a web service from a Mirth Channel transformer javascript using apache axis library (which it's supposed to be deployed with Mirth). I've tried using the following java script, but it does not work: /*importPackage(java.net); importPackage(org.apache.axis.client.Call); importPackage(org.apache.axis.client.Service); importPackage(javax.xml.namespace.QName);*/ var endpoint = 'http://tempuri.org/IService1/'; var service = org.apache.axis.client.Service(); var call = service.createCall(); call.setTargetEndpointAddress( new URL(endpoint) ); call.setOperationName(new QName('http:/

SAXParseException: XML document structures must start and end within the same entity

╄→尐↘猪︶ㄣ 提交于 2019-12-06 07:55:08
问题 I'm calling a web service from an Apache Axis 1.4 Java client. The call reaches the server correctly but the client is throwing this exception after approximately a couple of minutes: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. faultActor: faultNode: faultDetail: The exception is not always the same. Sometimes it specifies a

NumPy的使用

ε祈祈猫儿з 提交于 2019-12-06 03:21:51
一、什么是NumPy (一)工作环境的安装   使用的是Anaconda环境,它是一个集成的工作环境,方便管理各种包,这里提供一个版本的链接: https://pan.baidu.com/s/1pHqRTy_uwKMArtt8SvY6Tw 提取码: 3922 。在下载后按照指示进行安装即可。   注意安装完毕后需要进行环境变量的配置,在电脑的系统环境变量中进行配置,将Anaconda的安装路径以及scripts路径导入系统path中。   此时可以在左下角开始处打开Anaconda Prompt终端: 1、检查是否安装成功 (base) C:\Users\Administrator>conda --version conda 4.5.4 2、管理虚拟环境 查看所有的虚拟环境 (base) C:\Users\Administrator>conda info --envs # conda environments: # base * H:\Anaconda3 python35 H:\Anaconda3\envs\python35 创建新的虚拟环境 (base) C:\Users\Administrator>conda create -n python37 python=3.7 切换环境 (base) C:\Users\Administrator>activate python35