更改資料到指定格式 修改版

2021-12-29 22:10:10 字數 1511 閱讀 6505

//目標格式:位址,單幅包含的目標數,目標1座標(x0,y0,x1,y1),目標2座標(x0,y0,x1,y1)..../************************************director by hengguan*************************************/

//資料必須不等於0;

//原版基礎上,修正了負數的提示,並且單個文件可讀入多組個資料,而不是每個文件唯讀入1組資料

//本**適用 voc2011,voc2007,inria等資料庫

#include

#include

#include

#include

#include

#include

#include

using namespace std;

//要讀取的資料夾路徑

#define basic_path "e:\\data\\inria\\posgt\\"

//要存放的路徑位址的基路徑,可以選擇basic_path,也可以修改此路徑

#define set_path "/home/jack/desktop/data/pos/"

//目標存檔檔案路徑,需要先建立好此文件

#define f_info "c:\\users\\admin\\desktop\\data1.txt"

bool judgenum(string str, int& itmp, string path)

bnum = false;

break;

} }if (bnum)

//判斷數字是否為單個0

/*if (itmp == 0)

*/ return bnum;

} int a, b, c, d;

vector ivec;

string strtmp;

int itmp = 0, b_num = 0, coor_num , object_num;

string file_path;

bool end_if=true;

int main()

while (getline(icin, strtmp, ' ')) // 以空格為分隔符,讀取每乙個詞

//else

//num_zero++;

//end_if = false;

}//if (end_if == false)

//break;

}vector::size_type stcnt = ivec.size();

/*if (stcnt >= 4)

{a = ivec.at(0 + b_num*4);

b = ivec.at(1 + b_num * 4);

c = ivec.at(2 + b_num * 4)+a;

d = ivec.at(3 + b_num * 4)+b;

b_num++;

cout << a << " " << b << " " << c << " " << d<

更改資料到指定格式 修改版

資料必須不等於0 原版基礎上,修正了負數的提示,並且單個文件可讀入多組個資料,而不是每個文件唯讀入1組資料 本 適用 voc2011,voc2007,inria等資料庫 include include include include include include includeusing name...

利用python抓取指定格式資料並翻譯

要實現的目標 我的演算法實現的基本思路 遇見的問題及解決辦法def loop.close 此外,還用到了全域性變數,如下 def init 初始化 global global dict global dict defset value key,value 定義乙個全域性變數 global dict ...

修改資料庫的編碼格式

在控制台向資料庫新增漢字時有時候會是亂碼,以下是曾經嘗試過的幾種修改編碼格式的方法,記錄學習。修改資料庫在控制台的編碼格式 1 輸入sql語句 set name jbk 2 關閉 mysqladministrator 的service control,修改mini檔案的編碼格式,重啟服務 3 修改資...