zoukankan      html  css  js  c++  java
  • debug pin用

    string path = @"d:	est";
                        var files =System.IO.Directory.GetFiles(path, "*.txt");
                        foreach (var file in files)
                        {
                            StreamReader reader = new StreamReader(file);
    
                            string headText = reader.ReadLine();//读取第一行
                            string bodyText = reader.ReadToEnd();
                            string time = headText.Split(new[] {':'})[0];
                            string type = headText.Split(new[] {':'})[1];
                            switch (type)
                            {
                                case "Ds":
                                    target.GpType=GpType.Ds;
                                    break;
                                case "Dj":
                                    target.GpType = GpType.Dj;
                                    break;
                                case "Zd":
                                    target.GpType = GpType.Zd;
                                    break;
                                case "Zp":
                                    target.GpType = GpType.Zp;
                                    break;
                                case "Xb":
                                    target.GpType = GpType.Xb;
                                    break;
    
                            }
                            items = Provider.Analysis(bodyText, target.GpType);
                            StringBuilder content=new StringBuilder();
                            foreach (HgFootballItem item in items)
                            {
                                string text = string.Format("{0}||{1}-{2}-让:{3}-{4}-{5}大:{6}-{7}-{8}赢:{9}-{10}", time, item.gid, item.gnum_h,item.Plate.ratio, item.Plate.ior_RH, item.Plate.ior_RC, item.Plate.ratio_o,item.Plate.ior_OUH, item.Plate.ior_OUC, item.Plate.ior_MH, item.Plate.ior_MC);
                                content.AppendLine(text);
                            }
    
                            FileInfo file2 = new FileInfo("D:\PinLog\" + time + type + ".txt");
    
                            if (!file2.Directory.Exists)
                                file2.Directory.Create();
                            FileStream stream = file2.Create();
                            StreamWriter writer = new StreamWriter(stream);
                            writer.Write(content);
                            writer.Close();
                            stream.Close();
                        }
    
    
                        break;
  • 相关阅读:
    CNN5 调用 C实现pool2d im2col col2im
    CUDA学习3 Max pooling (python c++ cuda)
    CUDA学习2 基础知识和Julia示例
    CUDA学习1 在Visual Studio和CodeBlocks上配置
    线性搜索
    CNN4 参数优化
    CNN3 im2col
    CNN2 多层卷积
    爬虫:Scrapy8
    爬虫:Scrapy7
  • 原文地址:https://www.cnblogs.com/dennysong/p/5384034.html
Copyright © 2011-2022 走看看