|
@@ -68,7 +68,7 @@ public class ConvertCommonUtils {
|
|
|
} catch (Exception e) {
|
|
|
StringWriter trace = new StringWriter();
|
|
|
e.printStackTrace(new PrintWriter(trace));
|
|
|
- log.error(trace.toString());
|
|
|
+ log.error("出错",e);
|
|
|
} finally {
|
|
|
if (bos != null) {
|
|
|
bos.close();
|
|
@@ -135,28 +135,30 @@ public class ConvertCommonUtils {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- List<String> list1 = new ArrayList<String>();
|
|
|
- list1.add("普通会员");
|
|
|
- list1.add("专业会员");
|
|
|
- list1.add("商业会员");
|
|
|
- List<String> list2 = new ArrayList<String>();
|
|
|
- list2.add("1G");
|
|
|
- list2.add("1T");
|
|
|
- List<List<String>> dimValue = new ArrayList<List<String>>();
|
|
|
- dimValue.add(list1);
|
|
|
- dimValue.add(list2);
|
|
|
-
|
|
|
- // 递归实现笛卡尔积
|
|
|
- ConvertCommonUtils s = new ConvertCommonUtils();
|
|
|
- List<List<String>> res = s.descartes(dimValue);
|
|
|
- System.out.println("递归实现笛卡尔乘积: 共 " + res.size() + " 个结果");
|
|
|
- for (List<String> list : res) {
|
|
|
- for (String string : list) {
|
|
|
- System.out.print(string + " ");
|
|
|
- }
|
|
|
- System.out.println();
|
|
|
- }
|
|
|
+ public static void main(String[] args) throws Exception{
|
|
|
+// List<String> list1 = new ArrayList<String>();
|
|
|
+// list1.add("普通会员");
|
|
|
+// list1.add("专业会员");
|
|
|
+// list1.add("商业会员");
|
|
|
+// List<String> list2 = new ArrayList<String>();
|
|
|
+// list2.add("1G");
|
|
|
+// list2.add("1T");
|
|
|
+// List<List<String>> dimValue = new ArrayList<List<String>>();
|
|
|
+// dimValue.add(list1);
|
|
|
+// dimValue.add(list2);
|
|
|
+//
|
|
|
+// // 递归实现笛卡尔积
|
|
|
+// ConvertCommonUtils s = new ConvertCommonUtils();
|
|
|
+// List<List<String>> res = s.descartes(dimValue);
|
|
|
+// System.out.println("递归实现笛卡尔乘积: 共 " + res.size() + " 个结果");
|
|
|
+// for (List<String> list : res) {
|
|
|
+// for (String string : list) {
|
|
|
+// System.out.print(string + " ");
|
|
|
+// }
|
|
|
+// System.out.println();
|
|
|
+// }
|
|
|
+ ConvertCommonUtils.convertTxtToVisionModelData("F:\\visiontest\\vision.txt", "F:\\visiontest\\vision.modeldata");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public static void convertTxtToVisionmodeldata(String srcpath,String despath)throws Exception
|