¡¾×ª¡¿Java double Ïà¼ÓµÄ¹ÖÊÂÇé
(±¾ÎÄתÔØ×Ô£ºhttp://hi.baidu.com/edilyxin/blog/item/27dc152aba3e10315343c19c.html)
ÎÊÌâµÄÌá³ö£º
±àÒëÔËÐÐÏÂÃæÕâ¸ö³ÌÐò»á¿´µ½Ê²Ã´£¿
public class Test{
public static void main(String args[]){
System.out.println(0.05+0.01);
System.out.println(1.0-0.42);
System.out.println(4.015*100);
System.out.println(123.3/100);
}
};
ÄãûÓп´´í£¡½á¹ûȷʵÊÇ
0.060000000000000005
0.5800000000000001
401.49999999999994
1.2329999999999999
JavaÖеļòµ¥¸¡µãÊýÀàÐÍfloatºÍdouble²»Äܹ»½øÐÐÔËËã¡£²»¹âÊÇJava£¬ÔÚÆäËüºÜ¶à±à³ÌÓïÑÔÖÐÒ²ÓÐÕâÑùµÄÎÊÌâ¡£ÔÚ´ó¶àÊýÇé¿öÏ£¬¼ÆËãµÄ½á¹ûÊÇ׼ȷµÄ£¬µ«ÊǶàÊÔ¼¸´Î£¨¿ÉÒÔ×öÒ»¸öÑ»·£©¾Í¿ÉÒÔÊÔ³öÀàËÆÉÏÃæµÄ´íÎó¡£ÏÖÔÚÖÕÓÚÀí½âΪʲôҪÓÐBCDÂëÁË¡£
Õâ¸öÎÊÌâÏ൱ÑÏÖØ£¬Èç¹ûÄãÓÐ9.999999999999Ôª£¬ÄãµÄ¼ÆËã»úÊDz»»áÈÏΪÄã¿ÉÒÔ¹ºÂò10ÔªµÄÉÌÆ·µÄ¡£
ÔÚÓеıà³ÌÓïÑÔÖÐÌṩÁËרÃŵĻõ±ÒÀàÐÍÀ´´¦ÀíÕâÖÖÇé¿ö£¬µ«ÊÇJavaûÓС£ÏÖÔÚÈÃÎÒÃÇ¿´¿´ÈçºÎ½â¾öÕâ¸öÎÊÌâ¡£
ËÄÉáÎåÈë
ÎÒÃǵĵÚÒ»¸ö·´Ó¦ÊÇ×öËÄÉáÎåÈë¡£MathÀàÖеÄround·½·¨²»ÄÜÉèÖñ£Áô¼¸Î»Ð¡Êý£¬ÎÒÃÇÖ»ÄÜÏóÕâÑù£¨±£ÁôÁ½Î»£©£º
public double round(double value){&
Ïà¹ØÎĵµ£º
http://www.sdau.edu.cn/support/html/java03.htm
1.3 ¼ò µ¥ µÄ Java³Ì Ðò
Ï Ãæ ÎÒ ÃÇ ÏÈ ½é ÉÜ Á½ ¸ö ¼ò µ¥ µÄ Java³Ì Ðò ,²¢ ¶Ô Æä ½ø ÐÐ ·Ö Îö¡£
Àý 1.1.
public class HelloWorldApp { //an application
public static void main (String args[ ]){
System.out.println("Hello World!");
}
}
± ......
Java Class Attribute Type Hibernate Type Possible SQL Type-Vendor Specific
Integer, int, long short &n ......
1. MD5¼ÓÃÜ£¬³£ÓÃÓÚ¼ÓÃÜÓû§ÃûÃÜÂ룬µ±Óû§Ñé֤ʱ¡£
¡¡ ¡¡protected byte[] encrypt(byte[] obj) ...{
¡¡¡¡try ...{
¡¡¡¡MessageDigest md5 = MessageDigest.getInstance("MD5");
¡¡¡¡md5.update(obj);
¡¡¡¡return md5.digest();
¡¡¡¡} catch (NoSuchAlgorithmException e) ...{
¡¡¡¡e.printStackTrace();
¡ ......
ArcGIS Server9.3ÍêÕûÇåÎú°²×°Á÷³Ì
ÒÔϵÄArcGIS Server9.3°²×°Á÷³ÌÊÇÎÒ¸öÈË×ܽá³öÀ´µÄ£¬ÔÚwindowXP2Ñé֤ͨ¹ý£¬ÐèÒªµÄ»°£¬Ï£ÍûÓõÄ×Å¡£
Ò»¡¢ArcGIS Server²úÆ·°üÀ¨Á½¸ö²¿·Ö£º
1¡¢GIS Server£¬ËüÊÇÒ»¸öÌṩGIS·þÎñµÄ·þÎñÆ÷Èí¼þ²úÆ·£¬°üÀ¨Ò»ÏµÁкËÐÄAO¿âºÍÒ»¸ö¹ ......
1Ê×ÏÈÌí¼ÓÐÞ¸ÄͼƬ¿í¶ÈºÍ¸ß¶ÈµÄ·½·¨
public static void reduceImg(String imgsrc, int widthdist, int heightdist) {
try {
File srcfile = new File(imgsrc);
if (!srcfile.exists()) {
return;
}
......