axis

java axis web service client setMaintainSession on multiple services (cookies?)

限于喜欢 提交于 2019-12-02 04:25:20
问题 I'm implementing a client to a web service (and the guys maintaining the web service have been a litte unresponsive..) I've used axis and WSDL2Java to generate java classes and I can call their login-method on their authentication-service ok, and get a sessionId back (eg z4zojhiqkw40lj55kgtn1oya). However, it seems that i cannot use this sessionId as a parameter anywhere. Even a call to their hasSession()-method directly after login returned false. I managed to solve this by setting

Nicer AxisArrowStyle arrows for my Chart.Axes

不羁岁月 提交于 2019-12-02 04:12:09
问题 I answered a question on how to set up a Chart to look like a regular mathematical graph, i.e. with the axes centered and with nice arrows to the top and to the right.. However I found the built-in AxisArrowStyle.Triangle to be rather big and found no way to make it smaller. Lines - A line-shaped arrow is used for the relevant axis. None - No arrow is used for the relevant axis. SharpTriangle - A sharp triangular arrow is used for the relevant axis. Triangle - A triangular arrow is used for

sklearn逻辑回归实战

≡放荡痞女 提交于 2019-12-02 04:03:26
目录 题目要求 ex2data1.txt处理 方案一:无多项式特征 方案二:引入多项式特征 ex2data2.txt处理 两份数据 ex2data1.txt ex2data2.txt 题目要求 根据学生两门课的成绩和是否入学的数据,预测学生能否顺利入学:利用 ex2data1.txt 和 ex2data2.txt 中的数据,进行逻辑回归和预测。 数据放在最后边。 ex2data1.txt处理 作散点图可知,决策大致符合线性关系,但还是有弯曲(非线性),用线性效果并不好,因此可用两种方案:方案一,无多项式特征;方案二,有多项式特征。 方案一:无多项式特征 对ex2data1.txt中的数据进行逻辑回归,无多项式特征 代码实现如下: """ 对ex2data1.txt中的数据进行逻辑回归(无多项式特征) """ from sklearn.model_selection import train_test_split from matplotlib.colors import ListedColormap from sklearn.linear_model import LogisticRegression import numpy as np import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = [

oxyplot axis locking center when mouse wheel

夙愿已清 提交于 2019-12-02 02:54:50
I'm new to wpf and oxyPlot. Now, I want create a dynamic line chart like an oscilloscope, but I don't know how to lock the axis on a value when mouse wheel zooms. Example: The red point is mouse location. In normal, zoom A -> B, zoom C -> D. now, I want to zoom C ->E, like mouse location at 0 center. I've found a solution that works for blocking an axis zoom center. You have to create a custom LinearAxis to achieve this: public class FixedCenterLinearAxis : LinearAxis { double center = 0; public FixedCenterLinearAxis() : base(){} public FixedCenterLinearAxis(double _center) : base() { center =

How to show categorical data on x-axis when using bar function?

China☆狼群 提交于 2019-12-02 02:46:17
I am trying to simulate a code which is on the official MATLAB website, but I cannot get the same output. This is the code: c = categorical({'apples','oranges','pears'}); prices = [1.23 0.99 2.3]; bar(c,prices) This is the correct output which is on the MATLAB website: This is the output that I get in my MATLAB: The c array, which is apple , orange and pears is not showing in my MATLAB output. Why don't I get the same output? My MATLAB version is R2016a. You can try the following workaround (as mentioned here ): prices = [1.23 0.99 2.3]; bar(prices) set(gca,'xticklabel',{'apples','oranges',

Nicer AxisArrowStyle arrows for my Chart.Axes

核能气质少年 提交于 2019-12-02 02:12:59
I answered a question on how to set up a Chart to look like a regular mathematical graph, i.e. with the axes centered and with nice arrows to the top and to the right.. However I found the built-in AxisArrowStyle.Triangle to be rather big and found no way to make it smaller. Lines - A line-shaped arrow is used for the relevant axis. None - No arrow is used for the relevant axis. SharpTriangle - A sharp triangular arrow is used for the relevant axis. Triangle - A triangular arrow is used for the relevant axis. Here is the original look of it: So how can we fix this? The Chart's axis

matplotlib 3d plot with changing labels

拥有回忆 提交于 2019-12-02 02:03:35
So I have a 3d live-updating graph! it only shows one point at a time so I can easily track the motion of the point! But here is the problem: No matter what I seem to do, the point is always placed in the center of the graph and the tick marks on the axis change in order to do that. This makes my life very difficult because I don't see the motion on the point. Here is my code: from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from pylab import * import time import pandas as pd import pickle def pickleLoad(pickleFile): pkl_file = open(pickleFile, 'rb') data = pickle.load

kd树的创建和求最近邻

China☆狼群 提交于 2019-12-02 00:36:41
1 import numpy as np 2 arr = np.array([[2, 3], [5, 4], [9, 6], [4, 7], [8, 1], [7, 2]]) 3 arr.shape 4 5 class KDTree(): 6 def __init__(self): 7 self.value = None 8 self.left = None 9 self.right = None 10 self.axis = None 11 12 def create(arr, k, h=0): 13 if arr.shape[0] == 0: 14 return None 15 tree = KDTree() 16 axis = h % k 17 18 if arr.shape[0] == 1: 19 tree.value = arr[0] 20 tree.left = None 21 tree.right = None 22 tree.axis = axis 23 else: 24 arr = sorted(arr, key = lambda x:x[axis]) 25 arr = np.array(arr) 26 i = arr.shape[0]//2 27 28 tree.value = arr[i] 29 tree.left = create(arr[0:i], k,

numpy学习总结

余生颓废 提交于 2019-12-01 20:21:49
numpy用法 导入: import numpy as np 生成矩阵: array = np.array([[1,2,3],[4,5,6]]) 矩阵维度: array.ndim 矩阵形状: array.shape 矩阵大小: array.size 矩阵元素类型: array.dtype 创建array a = np.array([1,2,3], dtype=np.int32) dtype:指定数据类型 矩阵维度:创建时方括号的层数代表矩阵的维度 常用用法 zero = np.zeros((2, 3)) 生成两行三列全为0的矩阵 one = np.empty((2, 3)) 生成两行三列全为1的矩阵 empty = np.empty((3, 2)) 生成三行两列全为接近于0但不是0的矩阵 e = np.arange(10) 此种用法与python中的range类似 h = np.arange(10).reshape(2, 4) 重新定义矩阵的形状 矩阵操作(要求:两个矩阵形状相同) arr1:矩阵1 arr2:矩阵2 加法:arr1 + arr2 按位相加 减法:arr1 - arr2 按位相减 乘法:arr1 * arr2 按位相乘 求幂:arr1 ** arr2 ****按位操作**** 除法:arr1 / arr2 按位相除 取余:arr1 % arr2 按位取余 取整

Numpy | 12 数组操作

丶灬走出姿态 提交于 2019-12-01 20:04:09
Numpy 中包含了一些函数用于处理数组,大概可分为以下几类: 修改数组形状 翻转数组 修改数组维度 连接数组 分割数组 数组元素的添加与删除 一、修改数组形状 函数 描述 reshape 不改变数据的条件下修改形状 flat 数组元素迭代器 flatten 返回一份数组拷贝,对拷贝所做的修改不会影响原始数组 ravel 返回展开数组 numpy.reshape numpy.reshape 函数可以在 不改变数据的条件下 修改形状 numpy.reshape(arr, newshape, order='C') arr:要修改形状的数组 newshape:整数或者整数数组,新的形状应当兼容原有形状 order:'C' -- 按行,'F' -- 按列,'A' -- 原顺序,'k' -- 元素在内存中的出现顺序。 import numpy as np a = np.arange(8) print('原始数组:') print(a) print('\n') b = a.reshape(4, 2) print('修改后的数组:') print(b) 输出结果如下: 原始数组: [0 1 2 3 4 5 6 7] 修改后的数组: [[0 1] [2 3] [4 5] [6 7]] numpy.ndarray.flat numpy.ndarray.flat 是一个数组元素迭代器 import