⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testvector.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.test;

import java.util.Vector;
import java.text.NumberFormat;
import java.text.DecimalFormat;
import net.aetherial.gis.dataType.TrackType;
import net.aetherial.gis.output.FileOperate;
import java.io.File;
import net.aetherial.gis.table.WuWei;
import java.util.StringTokenizer;
import java.util.Enumeration;
import java.util.Properties;
import net.aetherial.gis.output.toLd.OpenDirectory;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class TestVector {

  private void deleteTarget(File target){
    if (target.isFile()) {
      target.delete();
    }else{
      File[] children = target.listFiles();
      if (children == null || children.length == 0) {
        target.delete();
      }else{
        for (int i = 0; i < children.length; i++) {
          deleteTarget(children[i]);
        }
        target.delete();
      }
    }
  }

  private boolean isInArray(String xiangzhen){
    StringTokenizer st = new StringTokenizer(xiangzhen,"、");
    String myxiangzhen = "";
    while(st.hasMoreTokens()){
      myxiangzhen = st.nextToken();
      System.out.println(myxiangzhen);
    }

//    if () {
//
//    }
    return false;
  }

  public static void main(String args[]) {
//    DecimalFormat format = new DecimalFormat("#.###");
//    double[] array = {0,1,1.0,1.01,10.000,10.0021,1000.892449};
//    for (int i = 0; i < array.length; i++) {
//      System.out.println(format.format(array[i]));
//    }
//    System.out.println(format.format(0.93029));
//      for (int i = 0; i < TrackType.RS_JTB.length; i++) {
//        System.out.println(TrackType.RS_JTB[i]);
//      }
//    Process process = null;
//    try {
//      process = Runtime.getRuntime().exec("cmd /c ping 192.168.0.10 ");
//    }
//    catch (Exception ex) {
//      ex.printStackTrace();
//    }
//
//    if (process != null) {
//      System.out.println(process.getInputStream() + "\r\n" + process.getOutputStream());
//      process.getOutputStream();
//
//    }
//      FileOperate fo = new FileOperate();

//    try {
//      Runtime.getRuntime().exec("cmd /c Explorer e:\\ ");
//
//    }
//    catch (Exception ex) {
//      ex.printStackTrace();
//    }

//    File target = new File("E:\\核对工作\\数据\\临时数据\\安庆市\\枞阳县\\补报表格\\array");
//    System.out.println(target.delete());
//    target.delete();
//      TestVector tv = new TestVector();
//      tv.deleteTarget(new File("E:\\核对工作\\数据\\临时数据\\安庆市\\枞阳县"));
//    String gji = "dsdsokd\t\t";
//    System.out.println(gji.endsWith("okd\t"));

//      fo.copyFile("D:\\11试点整理数据.rar","E:\\test\\9\\tr.rar");
//      System.out.println("X065341421L009".indexOf("X065"));
//      double gpsLicheng = 0;
//      gpsLicheng += 24.486804158712605;
//      gpsLicheng += 19.64559387201158;
//      gpsLicheng += 7.319327803231346;
//      gpsLicheng += 8.223185129050007;
//      double nianbao = 0;
//      nianbao += 62.72;
//      double bili = gpsLicheng / nianbao;
//      System.out.println("gpsLicheng / nianbao" + bili);
//      double weizhi = 53.54 * bili;
//      System.out.println("weizhi1:" + weizhi);
//      System.out.println("weizhi2:" + (weizhi - 19.64559387201158 - 7.319327803231346 - 24.486804158712605));

//      String n = "测试";
//      int temp = (int)n;

//      System.out.println(n.trim().equals(""));
//      String str = "测试";
//      char[] chars = str.toCharArray();
//      int[] ints = new int[chars.length];
//
//      for (int i = 0;chars != null && i < chars.length; i++) {
//        ints[i] = (int)chars[i] + 1;
////
////        System.out.println((int)chars[i]);
//      }
//
//      for (int i = 0; i < ints.length; i++) {
//        System.out.println((char)ints[i]);
//      }

//      TestVector tv = new TestVector();
//      String testString = "华阳、杨湾";
//      String testString1 = "华阳";
//      tv.isInArray(testString);
//      Properties pro = System.getProperties();
//      Enumeration keys = pro.keys();
//      String key = "";
//      while(keys.hasMoreElements())
//      {
//        key = "" + keys.nextElement();
//        System.out.println("key:" + key);
//        System.out.println("\t" + pro.getProperty(key));
//      }
//      try {
//        Thread.sleep(100000);
//      }
//      catch (InterruptedException ex) {
//      }
//      OpenDirectory od = new OpenDirectory();
//      File sheng = new File("E:\\农村公路通达情况调查\\数据\\报省数据\\通达情况专项调查\\安徽省");
//      File[] shis = sheng.listFiles();
//      File[] xians = null;
//      File f = null;
//      for (int i = 0; i < shis.length; i++) {
//        if (shis[i].getName().indexOf("汇总") == -1 && shis[i].getName().indexOf("svn") == -1) {
//          xians = shis[i].listFiles();
//          for (int j = 0; j < xians.length; j++) {
//            if (xians[j].getName().indexOf("汇总") == -1 && xians[j].getName().indexOf("svn") == -1) {
//              f = od.getXiangzhenFenjieExcel(xians[j].getAbsolutePath());
//              if (f == null) {
//               System.out.println(xians[j].getAbsolutePath() + " 没有乡镇分解表!**");
//              }else{
//                System.out.println(f.getAbsolutePath());
//              }
//            }
//          }
//        }
//
//      }
//      File f = od.getXiangzhenFenjieExcel("E:\\农村公路通达情况调查\\数据\\报省数据\\通达情况专项调查\\安徽省\\亳州市\\蒙城县");
//      System.out.println(f.getAbsolutePath());
//      System.out.println(System.getProperties().getProperty("java.class.path"));//
      double num = 7.385120852632099E-7;
      System.out.println(num * 10000000);

  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -