??xml version="1.0" encoding="utf-8" standalone="yes"?>
]]>
专家点评Q?/font>从最q几q就业情冉|看,׃国内主要q是外包斚w需要大量的人才Q所以,Java未来几年的发展还是很好的QIBM、Oracle{大公司都一直在做这斚w的相关品,以及Java开源运动,Javaq属于青壮年期。只要学好了JavaQ待遇应该不是问题!而且Q据我们了解Q一些大公司正在原来C++的系l,往Java上面转!比如Q华为,诺基亚西门子{?/font> pȝ提示好像是在注册表中扑ֈ的是java1.3,而这个java.exe。是java1.4。好像找到问题的所在了Q于是,q入注册表。查扑ֈQJava Runtime Environment 2.另外一U情况就是eclipse們֊报错,看log文g?javax的parexmlcL问题,该原因一般是因ؓ安装了oracle9i,它在pȝ变量的path路径中加入了jre1.3的\?把它删除卛_启动eclipse,q主要是因ؓeclipse使用的jdk.1.4以上的版??.4?.3做了很大的修?所以找不到那个c? 如何解决q些问题呢?有识之士早已开始思考,需要徏立一U普遍认同的标准来结束这U无序和混ؕ。商业公?Netscape、Microsoft{?也终于认识到l一标准的好处,因此在W3CQW3C.orgQ的l织下,|站标准开始被建立Q?998q??0日发布XML1.0为标志)Qƈ在网站标准组l(webstandards.orgQ的督促下推q执行?/p>
单说Q网站标准的目的是Q?/p>
对于|站设计和开发h员来_遵@|站标准是使用标准Q对于你的网站用h_|站标准是最佳体验?/p>
对网站浏览者的好处Q?/p>
对网站所有者的好处Q?/p>
q样才能使自q|站不过ӞQ!Q!Q?br>打破“99%的网站都该被淘汰”Q!Q?/p>
计算机科学的史诗 学习讨论|页 如果你认Z是一名真正优U的程序员……?span lang=EN-US>Knuth的《计机E序设计艺术》,如果你能L整套书的话,L我发一份你的简历?span lang=EN-US>--Bill Gates q是一套集所有基法之大成的l典之作。当今Y件开发h员所掌握的绝大多数计机E序设计的知识都来源于此?span lang=EN-US>--Byte 他的主页 http://www-cs-faculty.stanford.edu/~knuth/taocp.html At the end of 1999, these books (The Art of Comupter Programming) were named among the best twelve scientific monographs of the century by American Scientist, along with: Dirac on quantum mechanics, Einstein on relativity, Mandelbrot on fractals, Pauling on the chemical bond, Russell and Whitehead on foundations of mathematics, von Neumann and Morgenstern on game theory, Wiener on cybernetics, Woodward and Hoffmann on orbital symmetry, Feynman on quantum electrodynamics, Smith on the search for structure, and Einstein's collected papers. 下蝲q套书的W一和第三册中文?/span> (阅读该书使用的Y件下?/span>. 该内Ҏ源于|络Q仅供参考学?span lang=EN-US>.如有用于商业目的Q后果自负;如有版权冲突Q来信告知,一定删?span lang=EN-US>. 再次声明Q该书来自网上其他书c下载类站点Q图书版权归原作者和电子书制作者所有。请您预览该书后Q在24时内从计算Z该书删除?span lang=EN-US>) 下蝲q套书的W二册英文版 Q该内容来源于网l,仅供参考学?span lang=EN-US>.如有用于商业目的Q后果自负;如有版权冲突Q来信告知,一定删?span lang=EN-US>. 再次声明Q该书来自网上其他书c下载类站点Q图书版权归原作者和电子书制作者所有。请您预览该书后Q在24时内从计算Z该书删除?span lang=EN-US>) knuth 先生?lt;< 具体数学>> 下蝲(TAOCP 的数学基) 本书自第一版出版以来,已经成ؓ世界范围内广泛用的大学教材和专业h员的标准参考手册。本书全面论qC法的内容,从一定深度上늛了算法的诸多斚wQ同时其讲授和分析方法又兼顾了各个层ơ读者的接受能力。各章内容自成体p,可作为独立单元学习。所有算法都用英文和伪码描述Q具备初步~程l验的h也可L。全书讲解通俗易懂Q且不失深度和数学上的严谨性?/span> Topics covered: Overview of algorithms (including algorithms as a technology); designing and analyzing algorithms; asymptotic notation; recurrences and recursion; probabilistic analysis and randomized algorithms; heapsort algorithms; priority queues; quicksort algorithms; linear time sorting (including radix and bucket sort); medians and order statistics (including minimum and maximum); introduction to data structures (stacks, queues, linked lists, and rooted trees); hash tables (including hash functions); binary search trees; red-black trees; augmenting data structures for custom applications; dynamic programming explained (including assembly-line scheduling, matrix-chain multiplication, and optimal binary search trees); greedy algorithms (including Huffman codes and task-scheduling problems); amortized analysis (the accounting and potential methods); advanced data structures (including B-trees, binomial and Fibonacci heaps, representing disjoint sets in data structures); graph algorithms (representing graphs, minimum spanning trees, single-source shortest paths, all-pairs shortest paths, and maximum flow algorithms); sorting networks; matrix operations; linear programming (standard and slack forms); polynomials and the Fast Fourier Transformation (FFT); number theoretic algorithms (including greatest common divisor, modular arithmetic, the Chinese remainder theorem, RSA public-key encryption, primality testing, integer factorization); string matching; computational geometry (including finding the convex hull); NP-completeness (including sample real-world NP-complete problems and their insolvability); approximation algorithms for NP-complete problems (including the traveling salesman problem); reference sections for summations and other mathematical notation, sets, relations, functions, graphs and trees, as well as counting and probability backgrounder (plus geometric and binomial distributions). 误住:法D 是本教材 ?span lang=EN-US> TAOCP 是本史诗?/span>
1、企业应用开?/strong>
q里是JAVA的天圎ͼ大到全国联网的系l,到中小企业的应用解x案,JAVA都占有极为重要的C?/p>
2、网站开?/strong>
当然是JSP+Servlet+JavaBeanQ以及后来的StrutsQSpringQHibernate/IBatis{,一直以来都相当行
3、移动领?/strong>
典型的应用是手机游戏Q国内主要是q方面)Q这里是J2ME的天圎ͼ其实应用范围是很q的Q只是国内开发不够?/p>
JAVA已成为当今市面上最受欢q的~程软gQ对于处于信息高速发辄今天QJAVA技术已l无处不在,手机软g、手机JAVA游戏、电脑Y件等{。可以这栯Q只要你使用手机、电脑等电子产品Q你׃用到跟JAVA有关的东ѝ?/p>
]]>
]]>
C:\WINDOWS\system32>java
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.3', but '1.4' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
看到了他下面却实有好多的jdk版本。包括jb7带的1.3。还有jb9带的1.4.1。还有我刚装的jdk1.4.2。都在,而看?br>CurrentVersion的值竟然是1.3。该死,于是Ҏ1.4。保存。在命o行的C:\WINDOWS\system32下运行java。成功了?br> 于是打开eclipse。ok。一切成功。终于看C那个期望的界面?br>q个问题可能是jb7的自带jdk1.3所造成的。看来eclipseL的jdk不是pȝ环境变量中的java_home。而是system32下的java虚拟机。也是
注册表中的那个Java Runtime Environment\CurrentVersio。这ơ终于从Ҏ上解决了q个恼火的问题。高兴?/p>
MQ仔l查看系l变量中path的值就知道是什么原因!
]]>
采用|站标准的好?/h4>
]]>
egQ?br> 1. 没有null reference?
2. reference必须有初倹{?
3. 使用reference要比使用指针效率高。因为reference不需要测试其有效性?
4. 指针可以重新赋|而referenceL指向它最初获得的对象
(参:http://dev.csdn.net/article/17/17286.shtm )
]]>
•Struts的具体实现模式有Q?br>•前端控制器(FrontControllerQ?br>•应用控制器(ApplicationControllerQ?br>•命o处理器(CommandProcessorQ?br>•视图处理器(ViewHandlerQ?br>
View技?框架)
•HTML/XHTML
•JSP
•XSL
•Excel/PDF
•Flash
•Xforms
•Template
•Velocity
•Freemaker
•Webmacro
•Layout
•Sitemesh
•Tiles
控制器框ӞWeb框架Q?br>•Struts
•JSF
•WebWork
•Tapstry
•Cocoon
•SpringMVC
•ADF
•Flex
•Laszlo
Model框架
•(POJOQ?
•SpringIoCContainer
•Someothercontainer
•EJB
•ADF
Persistence框架
•JDBC
•Hibernate
•iBATIS
•JDO
•Cayenne
•MrPersister
•OJB
•EJB
•TOPLINK
]]>
The Art of Computer Programming(TAOCP)
Donald.E.Knuth( 唐纳?span lang=EN-US>.E.克努特,中文名高L)是算法和E序设计技术的先驱者,是计机排版pȝTEX?span lang=EN-US>METAFONT的发明者,他因q些成就和大量创造性的影响p的著?span lang=EN-US>(19部书?span lang=EN-US>160论?span lang=EN-US>)而誉满全球。作为斯坦福大学计算机程序设计艺术的荣誉退休教授,他当前正全神贯注于完成其关于计算机科学的史诗性的七卷集。这一伟大工程?span lang=EN-US>1962q他q是加利尼亚理工学院的研究生时开始了?span lang=EN-US>
Knuth教授获得了许多奖和荣誉Q包括美国计机协会囄?/strong>(ACM Turing Award)Q美国前ȝ卡特授予的科学金?span lang=EN-US>(Medal of Science)Q美国数学学会斯蒂尔?span lang=EN-US>(AMS Steele Prize)Q以?span lang=EN-US>1996q?span lang=EN-US>11月由于发明先q技术荣L极受重的京都奖(KyotoPrize)。现与其?span lang=EN-US>Jill生活于斯坦福校园内?span lang=EN-US>
Introduction to AlgorithmsQ?span lang=EN-US>CLRSQ?/font>
学习和讨论网?/font>
]]>
两种不同Ҏ的实玎ͼ
鉴于|友的的指出Q我重新认真研究了一下四舍五入,最l给出正解法如下:
import java.math.BigDecimal;
import java.text.DecimalFormat;
/**
* 本例通过对网上几U取四舍五入的研IӞq行了一一试。最l通过实验和理论得出round4为唯一正确的算法?br />
* 2008/10/13
*
* @author jamezhan
*
*/
public class RoundTest {
public static double round1(double v, int scale) {
if (scale < 0)
return v;
String temp = "#####0.";
for (int i = 0; i < scale; i++) {
temp += "0";
}
return Double.valueOf(new java.text.DecimalFormat(temp).format(v));
}
/**
* 该算法会出现中间q算后结果超qDouble.MAX_VALUEQ所以不推荐使用
* @param d
* @param scale
* @return
* @throws Exception
*/
public static double round2(double d, int scale) throws Exception {
if (scale < 0)
return d;
long temp = 1;
for (int i = scale; i > 0; i--) {
temp *= 10;
}
if (Math.abs(d * temp) > Double.MAX_VALUE)
throw new Exception("data is too big or too small");
d *= temp;
long dl = Math.round(d);
return (double) (dl) / temp;
}
public static double round3(double v, int scale) {
BigDecimal value = new BigDecimal(v);
float actualTax = value.setScale(scale, BigDecimal.ROUND_HALF_UP).floatValue();
return actualTax;
}
public static double round4(double v,int scale)
{
if(scale<0){
throw new IllegalArgumentException("The scale must be a positive integer or zero");
}
BigDecimal b = new BigDecimal(Double.toString(v));
BigDecimal one = new BigDecimal("1");
return b.divide(one,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
}
public static void testRound1(double d, int scale) {
System.out.println("==========================");
System.out.println("data:"+ d + "; scale:"+scale);
double a = round1(d, scale);
System.out.println(a);
DecimalFormat df = new DecimalFormat();
System.out.println("formatted:"+df.format(a));
}
public static void testRound2(double d, int scale) {
try {
System.out.println("==========================");
System.out.println("data:"+ d + "; scale:"+scale);
double a = round2(d, scale);
System.out.println(a);
DecimalFormat df = new DecimalFormat();
System.out.println("formatted:"+df.format(a));
} catch (Exception e) {
System.err.println( e.getMessage() );
}
}
public static void testRound3(double d, int scale) {
try {
System.out.println("==========================");
System.out.println("data:"+ d + "; scale:"+scale);
double a = round3(d, scale);
System.out.println(a);
DecimalFormat df = new DecimalFormat();
System.out.println("formatted:"+df.format(a));
} catch (Exception e) {
System.err.println( e.getMessage() );
}
}
public static void testRound4(double d, int scale) {
try {
System.out.println("==========================");
System.out.println("data:"+ d + "; scale:"+scale);
double a = round4(d, scale);
System.out.println(a);
DecimalFormat df = new DecimalFormat();
System.out.println("formatted:"+df.format(a));
} catch (Exception e) {
System.err.println( e.getMessage() );
}
}
public static void main(String[] args) throws Exception {
System.out.println("****************************** Test round1 ******************************");
testRound1(Double.MAX_VALUE,2);
testRound1(1.264,2);
testRound1(-1.264,2);
testRound1(1.265,2);//wrong result
testRound1(-1.265,2);//wrong result
testRound1(1.266,2);
testRound1(-1.266,2);
testRound1(10224948.265,2);//wrong result
testRound1(-10224948.265,2);//wrong result
testRound1(-Double.MAX_VALUE, 2);
System.out.println("****************************** Test round2 ******************************");
testRound2(Double.MAX_VALUE,2);
testRound2(1.264,2);
testRound2(-1.264,2);
testRound2(1.265,2);//wrong result (java表示数0.1的问题导致的 1.265表示?.2599999904632568)
testRound2(-1.265,2);//wrong result (׃round法是先?.5再运,所以d数时且最后一位小Cؓ5时结果是不正的)
testRound2(1.266,2);
testRound2(-1.266,2);
testRound2(10224948.265,2);
testRound2(-10224948.265,2);//wrong result
testRound2(-Double.MAX_VALUE, 2);
System.out.println("****************************** Test round3 ******************************");
testRound3(Double.MAX_VALUE,2);//wrong result
testRound3(1.264,2);
testRound3(-1.264,2);
testRound3(1.265,2);
testRound3(-1.265,2);
testRound3(1.266,2);
testRound3(-1.266,2);
testRound3(10224948.265,2);//wrong result
testRound3(-10224948.265,2);//wrong result
testRound3(-Double.MAX_VALUE, 2);//wrong result
System.out.println("****************************** Test round4 ******************************");
testRound4(Double.MAX_VALUE,2);
testRound4(1.264,2);
testRound4(-1.264,2);
testRound4(1.265,2);
testRound4(-1.265,2);
testRound4(1.266,2);
testRound4(-1.266,2);
testRound4(10224948.265,2);
testRound4(-10224948.265,2);
testRound4(-Double.MAX_VALUE, 2);
}
}