pstmt = conn.prepareStatement("select ordernumber,datetime,price,dayofmoney from zujie where ordernumber= "+ cdName + " ") rs=pstmt.executeQuery() if(rs!=null && rs.next()){ String datetime = rs.getString(2) java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ("yyyy-MM-dd") Date date = new Date() String date1=formatter.format(date) ParsePosition pos = new ParsePosition(0) ParsePosition pos1 = new ParsePosition(0) Date dt1=formatter.parse(datetime,pos) Date dt2=formatter.parse(date1,pos1) Long l = (dt2.getTime()-dt1.getTime())/(3600*24*1000)+1 double price = rs.getDouble(3) double dayofmoney=rs.getDouble(4) double dayofmoneybuy=dayofmoney*l double otherMoney = price-dayofmoneybuy request.setAttribute("price", price) request.setAttribute("l", l) request.setAttribute("dayofmoney", dayofmoneybuy) request.setAttribute("otherMoney", otherMoney)
标签: prepareStatement ordernumber dayofmoney datetime
上传时间: 2013-12-14
上传用户:zsjinju
Imperfect C++ Practical Solutions for Real-Life Programming C++, although a marvelous language, isn t perfect. Matthew Wilson has been working with it for over a decade, and during that time he has found inherent limitations that require skillful workarounds. In this book, he doesn t just tell you what s wrong with C++, but offers practical techniques and tools for writing code that s more robust, flexible, efficient, and maintainable. He shows you how to tame C++ s complexity, cut through its vast array of paradigms, take back control over your code--and get far better results.
标签: Programming Imperfect Practical Solutions
上传时间: 2014-03-02
上传用户:songrui
// chebysheve outlier detection // this function is used to detect the abnormal value among a set of data // input: // delta: a set of data // flag: discribe which data is already known as outlier // p: restrict level // output: // double[] door : byyond which the data may be considered as a outlier // door[0]: the upperdoor // door[1]: the lowerdoor
标签: chebysheve detection abnormal function
上传时间: 2013-11-30
上传用户:13517191407
DDR SDRAM控制器的VHDL源代码,含详细设计文档。 The DDR, DCM, and SelectI/O™ features in the Virtex™ -II architecture make it the perfect choice for implementing a controller of a Double Data Rate (DDR) SDRAM. The Digital Clock Manager (DCM) provides the required Delay Locked Loop (DLL), Digital Phase Shift (DPS), and Digital Frequency Synthesis (DFS) functions. This application note describes a controller design for a 16-bit DDR SDRAM. The application note and reference design are enhanced versions of XAPP200 targeted to the Virtex-II series of FPGAs. At a clock rate of 133 MHz, 16-bit data changes at both clock edges. The reference design is fully synthesizable and achieves 133 MHz performance with automatic place and route tools.
上传时间: 2014-11-01
上传用户:l254587896
这是用于线性方程组求解的ILUK预处理算法的实现。在VC++编译通过。矩阵采用压缩稀疏行格式存储(CSR),采用如下结构存储:struct Distmatrix {double **ma int **ja,dimension,*nnzrow } 很容易移植到自己定义数值计算软件包中。经本人测试计算效率比Fortran写的高很多(比如与Sparskit2比较)。
上传时间: 2016-12-15
上传用户:奇奇奔奔
1. 下列说法正确的是 ( ) A. Java语言不区分大小写 B. Java程序以类为基本单位 C. JVM为Java虚拟机JVM的英文缩写 D. 运行Java程序需要先安装JDK 2. 下列说法中错误的是 ( ) A. Java语言是编译执行的 B. Java中使用了多进程技术 C. Java的单行注视以//开头 D. Java语言具有很高的安全性 3. 下面不属于Java语言特点的一项是( ) A. 安全性 B. 分布式 C. 移植性 D. 编译执行 4. 下列语句中,正确的项是 ( ) A . int $e,a,b=10 B. char c,d=’a’ C. float e=0.0d D. double c=0.0f
上传时间: 2017-01-04
上传用户:netwolf
#include "iostream.h" #include "iomanip.h" #define N 20 //学习样本个数 #define IN 1 //输入层神经元数目 #define HN 8 //隐层神经元数目 #define ON 1 //输出层神经元数目 double P[IN] //单个样本输入数据 double T[ON] //单个样本教师数据 double W[HN][IN] //输入层至隐层权值 double V[ON][HN] //隐层至输出层权值 double X[HN] //隐层的输入 double Y[ON] //输出层的输入 double H[HN] //隐层的输出
标签: define include iostream iomanip
上传时间: 2014-01-01
上传用户:凌云御清风
1. 统计工资 设计要求: (1) 使用结构数组设计一个公司职员的数据结构,使用下述的结构定义: struct employee{ int age char name[15] double salary } (2) 在主函数里构造一个数组company,用来存放职工信息。 (3) 设计update函数,用来对company中指定职员的信息进行更改。要求先按照name查询到相应的职员,然后修改并保存。 (4) 设计一个read函数,用来向company中录入职员信息,并显示结果。 (5) 编写mean函数求平均工资。 应该能对全体职工或大于某一年龄的职工工资求和并计算平均值。 (6) 编写total函数对工资求和。 应该能对全体职工或某一年龄段职工的工资求和。
上传时间: 2014-01-23
上传用户:colinal
本书是所随带的VC++和BC++数值分析类库光盘的使用手册。此VC++和BC++数值分析类库涵盖了数值分析领域中大部分常见算法,还包括线性和非线性最优化问题的多种算法以及概率统计中的一些基本算法。此类库中将矩阵和向量当成如char,int,double一样的基本变量类型,为矩阵和向量提供了几乎是随心所欲的操作函数。因此,可以在此数值类库的基础上进行二次开发。类库的各项功能均经过严格的检测,并与MATLAB作了比较,结果准确无误,效率不相上下。书中以菜单的方式对数值分析类库的每项功能作了详尽的解释,给出了调用方法的示例,对某些算法还提供了相应的数学背景知识。 如果你经常需要使用计算机求解科学与工程中的数值计算问题,特别是希望使用VC++或BC++做出独立于MATLAB的应用软件,本类库是不错的选择。
上传时间: 2014-07-28
上传用户:yiwen213
Description The MUSIC algorithm, proposed by Schmidt, first estimates a basis for the noise subspace and then determines the peaks the associated angles provide the DOA estimates. The MATLAB code for the MUSIC algorithm is sampled by creating an array of steering vectors corresponding to the angles in the vector angles.
标签: Description algorithm estimates proposed
上传时间: 2013-12-08
上传用户:hgy9473