axis

Three.js - Rotating a sphere around a certain axis

一世执手 提交于 2019-12-30 01:58:29
问题 I have a problem. In Three.js, I want to rotate a sphere (Earth) around axis tilted by 23.5 degs. I found sphere.rotation.x, sphere.rotation.y and sphere.rotation.z, but when I combine them in the correct ratio, the sphere's rotation is quite weird - it has no permanent rotation axis. I think I need a function like sphere.rotation.vector(1,0,-1). Does anyone know how this function is called and how the correct syntax is? Many thanks for answers! 回答1: You need to use quaternions for this. This

Eclipse调用Web service的困扰(二)

寵の児 提交于 2019-12-29 22:28:17
找到一个 WSDL2Java Eclipse Plug-in ,但结果还是一样,不知是否因为我用disco.exe生成wsdl文件的缘故。 A plug-in to generate client-side bindings to a Web service using the Apache AXIS WSDL2Java tool. This plug-in has been updated to use the latest version of the Apache AXIS jar files. Previous versions are no longer supported. THIS PLUG-IN REQUIRES ECLIPSE 2.X AND IS NOT SUPPORTED. Download (2MB) INSTALLATION: Unzip to the same directory you installed eclipse (e.g. If eclipse is in C:\eclipse, then unzip to C:\). Make sure you have the latest Apache AXIS 1.1 jar files in your build path when executing the plug-in! If you are

Eclipse调用Web service的困扰

北慕城南 提交于 2019-12-29 22:26:54
正在实施的项目是一个数据中心项目,客户要求写一个通用的数据访问接口,可以兼容现有与以后的应用访问后端不同的数据库。考虑到现有的应用有java、visual basic与C++,而我们实施的应用既有java也有.net,需要访问的数据库既有DB2、Oracle也有SQL Server,所以用web service来提供数据访问。参考微软的Data Access Application Block,做了一个通用的服务,前端传送SQL语句给后端服务,服务返回执行后的XML串。使用.net客户端访问该服务,一切功能正常。但在使用java客户端访问时,却出现了问题。 我采用Eclipse平台开发java应用,找不到直接调用web service的插件,采用axis生成java包后在应用在调用。在应用中当返回的字串大小超过64K时,却出现org.xml.sax.SAXParseException,提示“ 分析器已达到由应用程序设置的实体扩展限制 ”,因为对java不是很熟悉,找了好久都找不到原因,不知各位有没有好的解决方法。 代码与提示信息如下: 1、生成java包语句: java - classpath commons - logging.jar;log4j - 1.2 . 8 .jar;wsdl4j.jar;axis.jar;commons - discovery.jar;jaxrpc

使用Axis2调用Web Service

主宰稳场 提交于 2019-12-29 22:25:43
本文作为 使用Axis2创建Web Service 的后篇,主要介绍如何使用Axis2调用Web Service。有关准备工作详情请参考 前篇 的内容。 在Eclipse的Packge Explorer中右键点击New,选择Other项,新建一个Axis2 Code Genrateor向导。点击Next,打开向导选择界面: 选择Generate Java Source code from a WSDL file,点击Next。 在WSDL file location中输入WSDL文件的地址,点击Next。 使用默认设置,继续Next。 选择文件输出路径,点击Finish。啊哦,可怕的事情发生了: 于是 Google ,得知要将Tomcat安装目录下的webapps/axi2/WEB-INF/lib下的backport-util-concurrent-3.1.jar复制到eclipse\plugins\Axis2_Codegen_Wizard_1.3.0\lib目录下,没想到我的axis2的lib下竟然没有backport-util-concurrent-3.1.jar,于是网上 下载 了一个。至于为什么没有这个文件,至今还没有搞明白。 复制之后,修改%ECLIPSE_HOME%\plugins\Axis2_Codegen_Wizard_1.3.0\plugin.xml文件,在

could not find deserializer for type : Error

元气小坏坏 提交于 2019-12-29 09:03:36
问题 I have to make a SOAP call from my java program ,for which I used apache axis. My program is as follows : import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.rpc.ParameterMode; import javax.xml.namespace.QName; public class Project { public static void main(String [] args) { try { String endpoint ="http://RequestUrl"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) );

could not find deserializer for type : Error

怎甘沉沦 提交于 2019-12-29 09:03:08
问题 I have to make a SOAP call from my java program ,for which I used apache axis. My program is as follows : import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.rpc.ParameterMode; import javax.xml.namespace.QName; public class Project { public static void main(String [] args) { try { String endpoint ="http://RequestUrl"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) );

Axes class - set explicitly size (width/height) of axes in given units

旧巷老猫 提交于 2019-12-28 02:41:05
问题 I want to to create a figure using matplotlib where I can explicitly specify the size of the axes, i.e. I want to set the width and height of the axes bbox. I have looked around all over and I cannot find a solution for this. What I typically find is how to adjust the size of the complete Figure (including ticks and labels), for example using fig, ax = plt.subplots(figsize=(w, h)) This is very important for me as I want to have a 1:1 scale of the axes, i.e. 1 unit in paper is equal to 1 unit

《机器学习实战》实现时遇到的问题

只谈情不闲聊 提交于 2019-12-27 11:28:21
《 机器学习 实战》第二章k-近邻 算法 ,自己实现时遇到的问题,以及解决方法。做个记录。 报错:only 2 non-keyword arguments accepted。 问题所在:粗心少写了两个中括号 本来是array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]]),结果少写了最外面的两个中括号 from numpy import * import operator def createDataSet(): group = array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]]) labels = ['A','A','B','B'] return group,labels def classify0(inX,dataSet,labels,k): dataSetSize = dataSet.shape[0] diffMat = tile(inX,(dataSetSize,1)) - dataSet sqDiffMat = diffMat**2 sqDistances = sqDiffMat.sum(axis = 1) distances = sqDistances**0.5 sortedDistIndicies = distances.argsort() classCount = {} for i in range(k):

Numpy

时间秒杀一切 提交于 2019-12-27 07:22:10
ndarray的优势—为什么快? 存储空间连续,访问速度快 可以并行执行-Numpy底层使用C语言编写,内部解除了GIL(全局解释器锁),其对数组的操作速度不受Python解释器的限制,所以,其效率远高于纯Python代码。 numpy基于矩阵,矩阵可以分块计算,所以可以实现并行 ndarray的属性 Shape—形状—注意:返回的是元组 ndim—维度的个数—就是shape的长度 size—元素个数=shape的各个值想乘 dtype—元素的类型 ndarray的形状 生成数组的方法 生成0和1的数组 np.ones(shape) np.ones_like(array)—根据给定数组生成一个形状一样的数组 np.zeros np.zeros_like 从现有数组生成 np.array--深拷贝 np.asarray--浅拷贝 生成固定范围的数组 np.linspace—start,stop,num 在star到stop之间等区间的选取num个数,注意:一定可以去到stop np.arange(start,stop,step) 以start未开始,每隔step取一个值 stop肯定取不到(左闭右开) 等于python的range np.logspace(start,stop,num) 以10为低的指数值,等比 生成随机数组 均匀分布 np.random.rand—0

基于Axis2开发WebService代码详解

独自空忆成欢 提交于 2019-12-26 12:12:05
基于Axis2开发WebService代码详解 关键字: webservice 转载: http://tenn.javaeye.com/blog/100755 1.HelloWorld做了些什么? HelloWorld功能非常简单,在客户端输入你的姓名,本例中为ZJ。参数传递到服务器端后,经过处理将返回name+"HelloWorld!",本例中为ZJ HelloWorld! 2.服务器端文件HelloWorld.java HelloWorld.java Java代码 package sample; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; public class HelloWorld { //读取client端getSayHelloOMElement()方法传递的参数in。 public OMElement sayHello(OMElement in){ //将in转换为String。 String name=in.getText(); String info=name+ "HelloWorld!"