build.xml

tomcat源码编译 tomcat源码编译 1 搭建jdk环境 建议版本,1.8 2 搭建ant 本人使用的参考版本: 注意:ant安装成功后,这里有个问题,build.xml不存在。可以直接忽略 3 下载tomcat源码 tomcat源码在tomcat官网,github,码云上面都有。建议去码云上面下载,下载速度很快,其它方式会比较慢。本人使用tomcat源码版本参考如下: 4 安装maven环境 参考版本: 本人使用maven版本可能偏低,... 阅读详情
转:http://www.cnblogs.com/earl86/archive/2008/11/02/1666487.html
<?xml version="1.0" encoding="UTF-8"?>
<project name="test3" default="" basedir=".">
    <!--${ant.project.name}-->
    <!-- 链接库目录 -->
    <property name="lib.dir" value="${basedir}/lib" />
    <!--工程目录-->
    <property name="src" value="${basedir}/src" />
    <property name="test" value="${basedir}/test" />
    <property name="function" value="${basedir}/function" />
    <!-- 工程编译目录 -->
    <property name="build.dir" value="${basedir}/build" />
    <property name="desc.dir" value="${build.dir}/desc" />
    <property name="classes.dir" value="${build.dir}/classes" />
    <property name="function.dir" value="${build.dir}/function" />
    <!-- Tomcat 目录 -->
    <property name="tomcat.dir" value="/opt/javaworkspace/tomcat" />
    <property name="tomcatlib.dir" value="${tomcat.dir}/lib" />
    <!-- Selenium 目录-->
    <property name="selenium.dir" value="/opt/java/selenium/selenium-server-1.0-beta-1" />
    <!-- 测试编译目录 -->
    <property name="test.dir" value="${build.dir}/test" />
    <property name="function.dir" value="${build.dir}/function" />
    <property name="report.dir" value="${build.dir}/Report" />
    <property name="junitreport.dir" value="${report.dir}/JunitReport" />
    <property name="finalreport.dir" value="${report.dir}/FinalReport" />
    <!-- 数据库 -->
    <property file="${src}/datasource.properties" />
    <property name="changelog" value="${build.dir}/database.changelog.xml" />
    <!-- 链接库(jar;class文件) -->
    <path id="base.classpath">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="${tomcatlib.dir}">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="${src}">
            <include name="**/*.xml" />
        </fileset>
    </path>
    <!-- ant-contrib.jar -->
    <taskdef resource="net/sf/antcontrib/antlib.xml">
        <classpath>
            <pathelement location="${tomcatlib.dir}/ant-contrib-0.6.jar" />
        </classpath>
    </taskdef>
    <!-- Clean 编译的文件-需要修改-->
    <target name="clean" depends="tomcat.stop">
        <delete dir="${build.dir}" />
        <delete dir="${basedir}/classes">
        </delete>
        <delete>
            <fileset dir="${tomcat.dir}/webapps">
                <include name="${ant.project.name}.war" />
            </fileset>
        </delete>
        <delete dir="${tomcat.dir}/webapps/${ant.project.name}" />
        <delete dir="${tomcat.dir}/work/Catalina/localhost/${ant.project.name}" />
    </target>
    <!-- 生成编译文件目录 --需要改-->
    <target name="init" depends="clean">
        <mkdir dir="${build.dir}" />
        <mkdir dir="${report.dir}" />
        <mkdir dir="${test.dir}" />
        <mkdir dir="${function.dir}" />
        <mkdir dir="${desc.dir}" />
        <mkdir dir="${classes.dir}" />
        <mkdir dir="${report.dir}" />
        <mkdir dir="${junitreport.dir}" />
        <mkdir dir="${finalreport.dir}" />
        <copy todir="${desc.dir}">
            <fileset dir="${basedir}/WebRoot" />
        </copy>
        <copy todir="${classes.dir}">
            <fileset dir="${basedir}/src">
                <include name="*.xml" />
                <include name="*.properties" />
                <exclude name="*.jar" />
            </fileset>
        </copy>
    </target>
    <!-- 编译src -->
    <target name="compile-src" depends="init">
        <javac srcdir="${src}" destdir="${classes.dir}">
            <classpath refid="base.classpath" />
        </javac>
        <copy todir="${classes.dir}/com/goodhope/pojo">
            <fileset dir="${basedir}/src/com/goodhope/pojo">
                <include name="*.xml" />
            </fileset>
        </copy>
    </target>
    <!-- 编译test -->
    <target name="compile-test" depends="compile-src">
        <javac srcdir="${test}" destdir="${test.dir}">
            <classpath path="${classes.dir}" />
            <classpath refid="base.classpath" />
        </javac>
    </target>
    <!-- 编译function -->
    <target name="compile-function" depends="compile-src,compile-test">
        <javac srcdir="${function}" destdir="${function.dir}">
            <classpath path="${classes.dir}" />
            <classpath refid="base.classpath" />
        </javac>
    </target>
    <!-- 单元测试-生成单元测试报告 -->
    <target name="junit-test" depends="compile-function">
        <junit printsummary="on" fork="true" haltonfailure="false" failureproperty="tests.failed" showoutput="true">
            <classpath>
                <pathelement location="${test.dir}" />
                <pathelement location="${classes.dir}" />
                <path refid="base.classpath" />
            </classpath>
            <formatter type="xml" />
            <batchtest todir="${junitreport.dir}" fork="true">
                <fileset dir="${test.dir}">
                    <include name="**/*Test.*" />
                </fileset>
            </batchtest>
        </junit>
        <junitreport todir="${junitreport.dir}">
            <fileset dir="${junitreport.dir}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${junitreport.dir}" />
        </junitreport>
        <fail if="tests.failed">
        </fail>
    </target>
    <!--生成 War 包 -->
    <target name="war" depends="junit-test">
        <war warfile="${build.dir}/${ant.project.name}.war" webxml="${desc.dir}/WEB-INF/web.xml">
            <lib dir="${basedir}/lib" />
            <classes dir="${classes.dir}" />
            <fileset dir="${desc.dir}">
            </fileset>
        </war>
    </target>
    <!-- 部署 War 到 Tomcat -->
    <target name="deploy" depends="war">
        <copy todir="${tomcat.dir}/webapps">
            <fileset dir="${build.dir}">
                <include name="${ant.project.name}.war" />
            </fileset>
        </copy>
    </target>
    <!--启动 Tomcat -->
    <target name="tomcat.start">
        <ant antfile="${tomcat.dir}/tomcat-build.xml" target="tomcat.start" inheritall="false" />
    </target>
    <!--停止 Tomcat -->
    <target name="tomcat.stop">
        <ant antfile="${tomcat.dir}/tomcat-build.xml" target="tomcat.stop" inheritall="false" />
    </target>
    <!--启动 Selenium 服务器 -->
    <target name="selenium.start">
        <if>
            <not>
                <socket server="localhost" port="4444" />
            </not>
            <then>
                <java jar="${selenium.dir}/selenium-server.jar" fork="true" spawn="true" />
                <waitfor maxwait="5" maxwaitunit="minute" checkevery="3" checkeveryunit="second">
                    <and>
                        <socket server="localhost" port="4444" />
                    </and>
                </waitfor>
            </then>
        </if>
    </target>
    <!-- 停止 Selenium 服务器 -->
    <target name="selenium.stop">
        <if>
            <socket server="localhost" port="4444" />
            <then>
                <get taskname="selenium-shutdown" dest="${functionTest.report.dir}/selenium-result.txt" src="http://localhost:4444/selenium-server/driver/?cmd=shutDown" ignoreerrors="true" />
            </then>
        </if>
    </target>
    <!-- test-all -->
    <target name="function-test" depends="deploy">
        <!-- 并行容器节点,一边同时打开tomcat 和selenium server,一边等待两者打开后执行JUnit测试。
       如果不使用并行节点,而是用spawn=yes属性后台启动tomcat,则屏幕里看不到tomcat信息,如果测试意外终止的话,也不能关闭tomcat -->
        <parallel>
            <antcall target="tomcat.start" />
            <antcall target="selenium.start" />
            <sequential>
                <waitfor maxwait="5" maxwaitunit="minute" checkevery="3" checkeveryunit="second">
                    <and>
                        <socket server="localhost" port="8099" />
                    </and>
                </waitfor >
                <waitfor maxwait="5" maxwaitunit="minute" checkevery="3" checkeveryunit="second">
                    <and>
                        <socket server="localhost" port="4444" />
                    </and>
                </waitfor >
                <!-- Junit Test All -->
                <junit printsummary="on" fork="true" haltonfailure="false" failureproperty="tests.failed" showoutput="true">
                    <classpath>
                        <pathelement path="${function.dir}" />
                        <path refid="base.classpath" />
                    </classpath>
                    <formatter type="xml" />


通过build.xml打war包在liunx部署 通过build.xml打war包在liunx部署 一.WEB服务打包 1.打war包。 选中build.xml右键 --> Run As --> 2 Ant Build --> Run 打包成功,war包存放位置 2.整理部署所需文件 在eclipse项目存储文件夹将项目的 hello.jar lib configs logs start.sh ... 阅读详情

相关推荐

ant环境配置以及build.xml文件解析

目录大纲1. 简介2. 配置2.1 配置库文件2.2 配置ant的编译文件build.xml2.3 出现邮件发送失败时怎么解决3. 修改测试报告的样式 1. 简介 apache Ant,是一个将软件编译、测试、部署等步骤联系在一起加以自动化的一个工具,大多用于Java环境中的软件开发。由Apache软件基金会所提供。 Ant是Apache软件基金会JAKARTA目录中的一个子项目,它有以下的优点。跨平台性。Ant是纯Java语言编写的,所以具有很好的跨平台性。操作简单。Ant是由一个内置任务和可选任务组成的

冷小陌的博客 2327

Ant之build.xml配置详解

前言国内关于build.xml的配置资料太零散了,实在是受不了,故而将自己的笔记整理成博文,方便大家查阅和理解。build.xml配置参数构建文件默认叫build.xml,其有很多配置参数。project每个构建文件都有一个project标签,有以下属性: - default:表示默认的运行目标,这个属性是必须的。 - basedir:表示项目的基准目录。 - name:表示项目名。

brizer的博客 6万+

软件测试学习笔记(二)图覆盖

软件测试学习笔记(二)图覆盖 课程链接软件测试_中国大学MOOC 2.1 测试中的图 2.2 图覆盖准则 1、什么是图? 点的集合和边的集合。点或者结点,有穷非空的集合。边是点对。 2、图为什么在软件测试中具有重要地位? 所谓软件测试就是将软件变作一张图,然后覆盖它,不仅仅是软件,图更是计算机科学重要的结构。 3、软件测试中的图是如何得到的? 常见的图可以来自源代码,常见的是控制流图,还有各种各样...

DZFinder的博客 1422

build.xml文件的粗浅理解

上面是厂里给的项目中的一个build.xml配置文件,一共11个target,在ant中加载后如下显示 右击ant,选择run build,编译 在这个项目的子文件夹下的build文件夹下生成了这三个文件夹,如下图 此后运行tomcat,项目

过客的博客 712

《深入浅出强化学习原理入门》学习笔记(三)机器人找金币应用实例

《深入浅出强化学习原理入门》学习笔记(三)MDP应用实例

lxs3213196的博客 3187

本地部署llama3Chinese

这通常意味着你的构建环境可能不完整或者没有正确配置。通常是由 Visual Studio 的 C++ 工具提供的。(大模型对错误的解析)错误信息表明在尝试构建一个项目时,在 Windows 上,

m0_49343639的博客 1432

Tomcat 部署详解

前篇大概讲过了tomcat的发布和部署,以及测试。 本篇详细介绍下tomcat的部署相关的内容,本篇主要内容: 1 介绍下部署相关的内容,需要安装的文件以及上下文描述符 2 静态部署——在tomcat启动时部署 3 动态部署——在运行时自动部署 4 使用TCD完成部署,另外还可以对应用进行编译、校验、打包等功能。 其他内容参考:tomcat官方文档翻译 介绍   ...

xingoo 725

3GPP LTE/NR信道模型

CDL(Clustered Delay Line):簇延迟线模型,包括CDL-A、CDL-B、CDL-C三个用于NLOS的信道模型,以及CDL-D、CDL-E两个用于LOS的信道模型。

LinkEverything的博客 1万+

Maven的pom.xml文件结构之Build配置build

在Maven的pom.xml文件中,Build配置包含两个部分,一个是,另一个是,这里我们只介绍。 1. 在Maven的pom.xml文件中,存在如下两种: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc

成长的足迹 9万+

《低功耗方法学》翻译——前言

前言

记录所学,分享知识,结识挚友 1208

Flutter SDK的删除与重装:一步步教你如何轻松搞定

在Flutter开发过程中,我们可能会遇到一些需要重新安装Flutter SDK的情况,例如升级Flutter版本、解决依赖冲突等。本文将详细介绍如何删除并重新安装Flutter SDK,让你轻松应对各种问题。

理论都是虚的,代码才是王道。 2247

build.xml是什么

一般情况下,大多数软件公司做开发的时候都不用myeclipse开发,这是利用ant部署就给我们带来极大的方便,它先将你的project打包成war包,然后部署到指定的服务器中。 Ant的概念 当一个代码项目大了以后,每次重新编译,打包,测试等都会变得非常复杂而且重复,因此c语言中有make脚本来帮助这些工作的批量完成。在Java 中应用是平台无关性的,当然不会用平台相关的make脚本来完成这些批处...

张永胜 1万+

HLA分型

HLA分型 一、根据WES的tumor数据进行数据分型 选用hlahd 软件安装及使用 [root@18605fd8771e ~]# wget https://jaist.dl.sourceforge.net/project/bowtie-bio/bowtie2/2.4.1/bowtie2-2.4.1-linux-x86_64.zip [root@18605fd8771e ~]# unzip bowtie2-2.4.1-linux-x86_64.zip && mv bowtie2-2.4.1

qq_23435961的博客 2489

编写build.xml的12个原则

我不喜欢这个title的翻译,它的原文应该是“通往build.xml天堂的12条路”。为了让读者更容易理解,我最后还是选择了这个通俗……俗气的title。需要注意的是,这篇weblog来自“fate”hani……12 paths to build.xml nirvana1 - Always provide shell launchers for ant. A s

透明思考@优快云 3396

杰理AC695N系列芯片 LED7数码管使用教程

杰理AC695N数码管使用摘要 本教程介绍了杰理AC695N芯片驱动LED7数码管的实现方法: 硬件配置:支持7/12/13脚三种数码管类型,详细说明了7脚数码管的标准段码定义和GPIO接线方式。 软件设置: 通过修改配置文件启用LED7功能 配置GPIO引脚映射(PORTC/PORTA组) 选择与硬件匹配的真值表 层次架构:包含硬件层、驱动层、UI层和应用层的完整设计,支持数字、字符和图标显示功能。 实现要点包括正确配置引脚类型、选择真值表,并通过UI风格设置为LED7模式。

qq_42014563的博客 1359

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

ant之build.xml详解

最近项目中用到了ant构建项目,由于之前一直用的maven,没接触过ant,就抽空补了下ant相关知识。下面分三部分介绍ant: ant安装 ant命令 build.xml配置详解 ant安装直接上官网下载ant包ant官网,最新包是apache-ant-1.9.4-bin.zip。将其解压到某个目录,我的放置在E:\develop目录下然后配置环境变量,增加系统变量ANT_HOME,值为ant的解

tang9140的专栏 1万+

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

Ant 自动构建 build.xml

功能: 生成的 build.xml 用来提供自动以 eclipse 执行,自动打 jar 包,自动以 ant 执行,自动执行生成的 jar 等功能~ 非常便捷的生成 java 工程的 build.xml ,build.xml 常用配置我给抽取到 build.properties 文件里面了。 自此就可以尽可能少的去编辑、查看 build.xml 文件了 (新增其他格式的资源

u011513212 1434

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

深度学习工具包 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")

把你的Ant build.xml文档加上DTD

众所周知,在Eclipse中集成了对Ant的支持,但由于在Apache的Ant下载包中,没有提供build.xml的DTD,这对于用一些高级的XML编辑器编写和验证build.xml文件时的有效性时很不方便。不过我们可以通过Ant本身来产生它的build.xml的DTD,然后应有MyEclipse中的XML编辑器根据Ant DTD来辅助编写build.xml。具体做法如下: 1.    在Ecl...

zengenry的专栏 281

build.xml java_build.xml的一些配置实例

1.控制台在firsttest目录,输入ant后回车就打包完成了!注:输入ant回车自动执行init,compile,dist命令。要想执行clean命令,输入ant clean即可。ant firsttest!description="compile the source " >description="generate the distribution" >description=...

weixin_30040925的博客 634

build.xml java,在的build.xml Java项目

I am new in Java and I need some information.What is the file build.xml?I have a university project which I have to extend. It contains also a build.xml.I was wondering if it is a possibility to impor...

weixin_33122261的博客 135

apache-ant build.xml 实例

文章目录 version:apache-ant-1.9.15 build.xml <?xml version="1.0" encoding="UTF-8"?> <project name ="ssh" default="deploy"> <!----> <taskdef resource="net/sf/antcontrib/antlib.xml" /> <!-- 服务器清单 --> <property name="

AntHub的博客 357

maven pom.xml 的 build配置、插件plugin的介绍

maven是什么?用通俗的话来将,maven能帮你构建工程,管理jar包,编译代码,还能帮你自动运行单元测试,打包,生成报表,甚至能帮你部署项目。使用maven构建的项目均可以直接使用maven build完成项目的编译测试打包,无需额外配置。

黄彪博客 3006

Ant之build.xml详解

<转载:只为了更好的学习和收藏> 原文:http://www.cnblogs.com/clarkchen/archive/2011/03/10/1980194.html 关键字: ant build.xml Ant的概念 可 能有些读者并不连接什么是Ant以及入可使用它,但只要使用通过Linux系统得读者,应该知道make这个命令。当编译Linux内核及一些软件的源程 序时,...

weixin_30307921的博客 144

java build.xml怎么拷贝文件_项目打包文件build.xml

Make命令其实就是一个项目管理工具,而Ant所实现功能与此类似。像make,gnumake和nmake这些编译工具都有一定的缺陷,但是Ant却克服了这些工具的缺陷。最初Ant开发者在开发跨平台的应用时,用样也是基于这些缺陷对Ant做了更好的设计。Ant 与 makefileMakefile有一些不足之处,比如很多人都会碰到的烦人的Tab问题。最初的Ant开发者多次强调”只是我在Tab前面加了一个...

weixin_28744573的博客 787
上一篇: android源代码地址
下一篇: 邮件系统postfix安装和设置(一)
lcathm
博客等级 码龄18年 37粉丝 44原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值