myeclipse下用XFire开发webservice

Myeclipse中创建webservice工程(原创) Myeclipse中创建webservice工程~~客户端和服务器端均有创建。 希望对大家有所帮助。 立即下载
1.new->other->MyEcplise->Web Services->Web Services


自动在classpath:META-INF/xfire

下建立services.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">

 <service>
  <name>UserService</name>
  <serviceClass>com.semovy.service.IUserService</serviceClass>
  <implementationClass>
   com.semovy.service.impl.UserServiceImpl
  </implementationClass>
  <style>wrapped</style>
  <use>literal</use>
  <scope>application</scope>
 </service>
</beans>

2.在WEB-INF下的web.xml下添加servlet:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <servlet>
    <servlet-name>XFireServlet</servlet-name>
    <servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>XFireServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>
</web-app>

 3.com.semovy.beans下建立测试类User

User.java

package com.semovy.beans;

public class User {

 private String id = "";

 private String name = "";

 private String remark = "";

 public User() {
 }

 public User(String id, String name, String remark) {
  this.id = id;
  this.name = name;
  this.remark = remark;
 }

 public String getId() {
  return id;
 }

 public void setId(String id) {
  this.id = id;
 }

 public String getName() {
  return name;
 }

 public void setName(String name) {
  this.name = name;
 }

 public String getRemark() {
  return remark;
 }

 public void setRemark(String remark) {
  this.remark = remark;
 }

 public String toString() {
  return "Id: " + id + " , name: " + name + " , remark: " + remark + "\n";
 }

 @Override
 public int hashCode() {
  final int PRIME = 31;
  int result = 1;
  result = PRIME * result + ((id == null) ? 0 : id.hashCode());
  result = PRIME * result + ((name == null) ? 0 : name.hashCode());
  result = PRIME * result + ((remark == null) ? 0 : remark.hashCode());
  return result;
 }

 @Override
 public boolean equals(Object obj) {
  if (this == obj)
   return true;
  if (obj == null)
   return false;
  if (getClass() != obj.getClass())
   return false;
  final User other = (User) obj;
  if (id == null) {
   if (other.id != null)
    return false;
  } else if (!id.equals(other.id))
   return false;
  if (name == null) {
   if (other.name != null)
    return false;
  } else if (!name.equals(other.name))
   return false;
  if (remark == null) {
   if (other.remark != null)
    return false;
  } else if (!remark.equals(other.remark))
   return false;
  return true;
 }
 
}


在com.semovy.service包下建立服务接口IUserService

IUserService.java


package com.semovy.service;

import java.util.List;

import com.semovy.beans.User;

public interface IUserService {
 public abstract String getStringTest(String msg1,String msg2);
 public abstract List getStringList();
 public abstract List getUsersList();
 public abstract User[] getUsersArray();
 public abstract String[] getUsersStringArray();
 public abstract User getUserById(String id);
 public abstract void addUser(User user);
}
这在接口包下建立.与服务接口相同名称的IUserService.aegis.xml


<?xml version="1.0" encoding="UTF-8"?>
<mappings>
  <mapping><!-- 返回类型是String ,String[]的,参数是String类型的方法不用定义 -->
    <method name="getStringList">
       <return-type  componentType="java.lang.String" /><!-- 返回类型对应集合Collection,数组中的元素的类型 -->
    </method>
    <method name="getUsersList">
     <return-type componentType="com.semovy.beans.User"/>
    </method>
    <method name="getUsersArray">
     <return-type componentType="com.semovy.beans.User"/>
    </method>
    <method name="getUserById">
     <return-type componentType="com.semovy.beans.User"/>
    </method> 
   </mapping>
</mappings>

在com.semovy.service.impl包下

UserServiceImpl.java

package com.semovy.service.impl;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.semovy.beans.User;
import com.semovy.service.IUserService;

/**
 *
 * @author semovy
 * @version 1.0
 * the user service class implemente the IUserService implementation for testing
 */
public class UserServiceImpl implements IUserService {

 private List<User> users;
 public UserServiceImpl()
 {
  users = new ArrayList<User>();
  users.add(new User("1","semovy","semovy's remark"));
  users.add(new User("2","韦善茂","韦善茂的备注"));
  users.add(new User("3","superman_wshm","superman_wshm's remark"));
 }
 /**
  * @param msg1 the string msg1
  * @param msg2 the string msg2
  *
  */
 public String getStringTest(String msg1,String msg2) {

  return "Hello :" + msg1 + " : "  + msg2;
 }
 /**
  * @return list the list Collection with some String element
  */
 public List getStringList()
 {
  List<String> list = new ArrayList<String>();
  list.add("string1");
  list.add("字符串2");
  list.add("字符串3");
  list.add("string4");
  return list;
 }
 /**
  * @return all users
  */
 public List getUsersList() {
  return users;
 }
 /**
  * @param id the id of user
  * @return the user by specifical id
  */
 public User getUserById(String id) {
  Iterator it = users.iterator();
  while(it.hasNext())
  {
   User user = (User)it.next();
   if(user.getId().equals(id))
   {
    return user;
   }
  }
  return null;
 }
 /**
  * @return return all users of array form with type User.
  */
 public User[] getUsersArray() {
  
  return users.toArray(new User[]{new User()});
 }
 /**
  * @return return all users of array form with type String
  */
 public String[] getUsersStringArray() {
  
  User[] users_arr = (User[])users.toArray(new User[]{});
  String[] tempUser_arr = new String[users_arr.length];
  for(int i=0;i<users_arr.length;i++)
  {
   tempUser_arr[i] = users_arr[i].toString();
   System.out.println(tempUser_arr[i]);
  }
  return tempUser_arr;
 }
 public void addUser(User user) {
  users.add(user);
 }
 
}


4.在com.semovy.test包下
建立客户调用测试类.UserServiceWSTest .java

package com.semovy.test;

import java.net.MalformedURLException;
import java.util.Iterator;
import java.util.List;

import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;

import com.semovy.beans.User;
import com.semovy.service.IUserService;

public class UserServiceWSTest {
 public static void main(String[] args) {
  // 创建服务实例
  Service srvcModel = new ObjectServiceFactory()
    .create(IUserService.class);
  XFireProxyFactory factory = // 创建代理工厂实例
  new XFireProxyFactory(XFireFactory.newInstance().getXFire());
  String helloWorldURL = "http://localhost:8000/webServiceTest/services/UserService";
  IUserService srvc = null;
  try { // 获取指定位置的web服务对象
   srvc = (IUserService) factory.create(srvcModel, helloWorldURL);
  } catch (MalformedURLException e) {
   e.printStackTrace();
  }
  
  //调用只返回String的方法.在接口名.aegis.xml中不用设置方法名
  String result = srvc.getStringTest("msg1", "msg2");
  System.out.println(result);
  //调用返回String[]数组的方法,在接口名.aegis.xml中不用设置方法名.
  String[] userInfo_str_arr = srvc.getUsersStringArray();
  for(String aUserInfo:userInfo_str_arr)
   System.out.println(aUserInfo);
  //调用返回List类型值的方法,需要定义,List容器中的元素类型为String
  List strList = srvc.getStringList();
  Iterator str_it = strList.iterator();
  while (str_it.hasNext()) {
   String str = (String) str_it.next();
   System.out.println(str);
  }
  //调用返回User[]数组
  User[] user_arr = srvc.getUsersArray();
  for (User a_user : user_arr)
   System.out.print(a_user.toString());
  
  //调用返回User类型值的方法.方法参数是字符串.
  User a_user = srvc.getUserById("2");
  System.out.print(a_user.toString());
  
  //调用参数为User的方法,没有返回值,不用配置方法
  srvc.addUser(new User("4","添加的名称","添加的备注"));
  
  //调用返回List类型值的方法,需要定义,List容器中的元素类型为User
  List userList = srvc.getUsersList();
  Iterator userList_it = userList.iterator();
  while (userList_it.hasNext()) {
   User user = (User) userList_it.next();
   System.out.print(user.toString());
  }
 }

}
5.结果:
Hello :msg1 : msg2
Id: 1 , name: semovy , remark: semovy's remark
Id: 2 , name: 韦善茂 , remark: 韦善茂的备注
Id: 3 , name: superman_wshm , remark: superman_wshm's remark
string1
字符串2
字符串3
string4
Id: 1 , name: semovy , remark: semovy's remark
Id: 2 , name: 韦善茂 , remark: 韦善茂的备注
Id: 3 , name: superman_wshm , remark: superman_wshm's remark
Id: 2 , name: 韦善茂 , remark: 韦善茂的备注
Id: 1 , name: semovy , remark: semovy's remark
Id: 2 , name: 韦善茂 , remark: 韦善茂的备注
Id: 3 , name: superman_wshm , remark: superman_wshm's remark
Id: 4 , name: 添加的名称 , remark: 添加的备注

HFSS学习笔记——Vivaldi天线仿真(一) Vivaldi 天线HFSS仿真,HFSS中指数曲线绘制及曲面绘制。 阅读详情

相关推荐

ROG幻16Air新机避坑:Ubuntu 22.04下NVIDIA驱动、CUDA与Isaac Gym的兼容性实战

本文详细记录了在ROG幻16Air新机上安装Ubuntu 22.04,并成功配置NVIDIA驱动、CUDA与Isaac Gym强化学习开发环境的完整实战过程。针对官方文档未明确支持Ubuntu 22.04的挑战,文章提供了从驱动安装、CUDA版本选择、Python虚拟环境搭建到Isaac Gym兼容性调试的一站式解决方案,帮助开发者在新硬件上高效部署机器人仿真与训练平台。

weixin_28419039的博客 221

利用myeclipse自带的功能实现webservice

最近一直在听说WebService的一个远程调用的东西,我用Jdbc写了一套增删改查,创建了两个项目来模拟服务端和客户端的交互实现WebService,写下来,避免以后忘掉。 1、新建一个Web Service Project项目,在项目中创建实体、接口、和接口实现类 2、Cedevice.java(数据实体的java类,所以简单展示一下)private int DEVICE_ID;//设备

化工厂的博客 1516

QT播放器插件内嵌浏览器配合流媒体实现国标摄像头网页端播放

基本原理在浏览器⽹页中的指定播放窗口的位置和⼤⼩,实现⼀个内嵌到⽹页中显⽰的播放窗⼝,前端还必须可对这个内嵌播放窗⼝进⾏控制,⽽且播放窗⼝必须跟随浏览器窗⼝的移动和缩放、⽹页滚动、标签页切换、关闭等操作进⾏⾃动联动。播放器可以通过QT实现。这个播放窗⼝同时提供Web Socket的服务端和JSON打包命令的解析执⾏模块,前端就可以通过Web Socket连接后发送JSON打包的控制命令实现控制播放窗⼝。

cameravision的博客 562

MyEclips新建webservice

https://note.sdo.com/u/635231777425794297/n/Z1NG5B916E81150E0DD4E14CB7375373107864A4

Huang兄 991

立创EDA实战:基于NE555的夜间氛围呼吸灯电路设计与模式切换

本文详细介绍了使用立创EDA设计基于NE555芯片的夜间氛围呼吸灯电路。项目核心是利用NE555产生PWM信号,并通过RC充放电电路实现LED亮度的缓慢周期性变化,形成呼吸效果。文章手把手教学,涵盖从电路原理分析、元件参数计算,到在立创EDA中进行原理图绘制、PCB布局布线,直至焊接调试的完整硬件设计流程,是电子爱好者入门实战的经典项目。

weixin_42153793的博客 126

【微信小程序开发与设计】垃圾智能分类小程序

垃圾分类是将来生活可持续发展的必需项。但是很多人由于缺乏垃圾分类知识,或是因为垃圾分类困难,费时费力,所以没有好好贯彻垃圾分类政策,此时设计一款方便于群众进行智能化垃圾识别分类的微信小程序就显得尤为必要。

Markelle_Fultz的博客 8246

Eclipse 创建 Java 类 最快最全教程

Eclipse 快速创建 Java 类指南 本文介绍了 4 种在 Eclipse 中创建 Java 类的高效方法,按速度排序:1)神键法(Ctrl+N 3秒完成);2)右键菜单法;3)直接修改代码法;4)模板生成法。重点演示了前两种方式,详细说明了类创建对话框中的关键选项配置。文章还提供了 2025 年常用的 8 种类模板关键词,可自动生成带注解的标准类结构,以及创建后快速生成 getter/setter 等常用代码的快捷键(Alt+Shift+S)。适用于从新手到老手的所有 Java 开发者,帮助提升开发

likuolei的博客 1272

直流电动机的建模仿真(1)他励,串励和并励电动机建模仿真

本文根据不同励磁方式的直流电动机的接线原理图,建立了相应的数学模型,然后根据与数学模型对应的等效电路以及模拟机械运动方程的等效电路,用Matlab/simulink中的SpecializedPower system库中的电路元件,建立了他励,并励和串励直流电动机的全等效电路仿真模型,经过与Matlab自带的直流电动机仿真模型比较以及仿真实例验证,所建立的仿真模型时完全正确的。

weixin_45670943的博客 7521

MyEclipse创建WebService项目(使用XFire框架)

这是一篇使用MyEclipse创建WebService的图文教程,每一步骤都有记录截图,适合刚刚接触WebService的朋友,高手们可以忽略。

水寒 3692

RK3588 平台部署实战:OpenCV + LibTorch + FFmpeg 环境搭建与深度学习推理全流程解析

现在,你已经掌握了在RK3588上搭建OpenCV+LibTorch+FFmpeg环境的完整流程,也完成了深度学习模型的部署测试。不妨从一个具体的应用场景入手(如检测自家宠物的品种),亲手打造属于你的第一个边缘智能应用——当你看到模型在RK3588上精准输出结果时,你会发现:嵌入式深度学习的门槛,其实并没有想象中那么高。这些依赖是编译OpenCV、FFmpeg的基础,安装过程中若提示权限不足,可在命令前加。若能输出预测的类别索引,则说明环境搭建成功,模型推理流程通畅。文件,实现模型加载、图像预处理与推理。

FJN110的博客 536

Agent驱动电商运营:从选品到售后的全链路革新

在当今竞争激烈的电商市场中,传统的电商运营模式面临着诸多挑战。从选品到售后,每个环节都需要大量的人力投入和专业知识。选品需要深入了解市场趋势和消费者需求,营销需要精准定位目标用户,客服需要24小时响应用户咨询。这些工作不仅耗时耗力,而且容易受到人为因素的影响,导致效率低下和成本高企。AI Agent是一种能够感知环境、做出决策并采取行动的智能系统。感知能力:能够获取和处理环境信息。决策能力:能够根据感知到的信息做出决策。行动能力:能够执行决策,对环境产生影响。学习能力。

AI 领航者的博客 356

Myeclipse spring xfire 开发 webservice

<br />XFire是一个简化WebService开发的开源项目,通过Spring和XFire的结合可以大大简化基于Spring Framework的应用中的WebService开发。<br /> <br />一:开发环境<br />Myeclipse  :<br />MyEclipse  Enterprise Workbench Version: 7.0 Milestone-1<br />spring  :spring 2.5<br />xfire  :1.2<br />tomcat:6.0<br />

chensuoyi的专栏 455

基于互联网的智能旧衣回收箱设计与实现

本文介绍了基于嵌入式系统的智能旧衣回收箱的设计与实现,涵盖了硬件设计、软件开发、图像识别、物联网连接等方面的内容。通过利用最新的技术,如图像识别、物联网和云计算,实现了智能、便捷的旧衣物回收系统。未来,随着技术的不断进步,智能回收系统将会在环保领域发挥更大的作用。

2201_76125393的博客 908

在MyEclipse中使用XFire开发WebService

在MyEclipse中使用XFire开发WebService客户端通过web service调用服务器端的sayHello方法开步骤:1 服务器端1.1 创建Web Proejct(HelloWS) 1.2 添加Xfire支持 添加完xfire之后的工程,如图: 1.3 新建web service类及方法新建com.newer.service.HelloService类,同时在该类中添加sayHe...

JavaEE架构与开发 146

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

MyEclipse下XFire开发Webservice实例

最近在研究JAVA开发Webservice,发现网络上比较流行的几种选择AXIS、XFire、CFX(XFire的下一代),前几天转了几篇关于这三种选择的比较的文章,对它们已经有了些概念。决定自己实践一个例子      在开始前,先介绍一些概念:      XFire Java SOAP框架概述 (摘自:http://tech.it168.com/j/e/2006-10-28/200610

JEECG官方博客 2133

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

XFire+MyEclipse 开发WebService入门实例之HelloWorld

<br />由于MyEclipse中已经集成了XFire框架,所以在MyEclipse下用XFire开发webservice十分方便快捷!<br /> <br />下面我们就举一个最简单常见的例子作为入门,也就是经典的helloworld!<br /> <br />第一步,新建工程,引入jar包<br /> <br />        打开MyEclipse,新建一个web service project,命名为XFire_HelloWorld<br /> <br /><br /> <br />下一步,出现

hellojava 4269

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

【转】MyEclipse下XFire开发Webservice实例

?MyEclipse下XFire开发Webservice实例      最近在研究JAVA开发Webservice,发现网络上比较流行的几种选择AXIS、XFire、CFX(XFire的下一代),前几天转了几篇关于这三种选择的比较的文章,对它们已经有了些概念。决定自己实践一个例子     在开始前,先介绍一些概念:     XFire Java SOAP框架概述 (摘自:http://tech.i

218

myeclipse xfire 开发webservice实例

MyEclipse Web Services是建立在XFire JavaSOAP框架和工具基础上的, XFire是一款开源的JavaSOAP框架。它拥有一个轻量级的信息处理模块,通过STAX来与SOAP信息相结合。提供了一个工作在WebServices下的简单API,支持POJO和schema开发. XFire支持 Web Services standards,Spring整合, 支持JBI , ...

aiqing0119的专栏 243

myeclipse使用xfire开发webservice

1.新建一个webservice project,如图所示 2.点击下一步出现,如下对话框 3.接着点下一步 4.下面点击finish项目就自动生成了,结构如下 5.下面先来写接口和实现类 package org.lxh.dao; public interface SayHello { public void say(String name); } pa

技术成就梦想 2105

应用XFire开发WebService实例 xfire+myeclipse+weblogic 8

1. XFire介绍XFire和Axis都是新一代的java web服务框架。XFire提供了非常方便的API,使用这些API可以开发面向服务(SOA)的程序。他比axis性能要高,支持各种标准,性能优良,基于低内存的STAX模型,也是其于流的XML。• 支持多个重要的Web Service标准,包括SOAP、WSDL、WS-I Basic Profile、 WSAddressing、WS

芷兰之室 4182
上一篇: 常用的一些正则表达式写法
下一篇: SQL大全
莫欺少年穷
博客等级 码龄15年 357粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

莫欺少年穷

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值