skip to Main Content

Debian – How to extract columns from CSV file, process and create a CSV file based on the extract and processing result?

The is a snipped from the source CSV file. %status,date,job,project,start,end,description % //,18.03.2021,sib,sib-dede,07:00,15:00,dede-mongo % //,11.06.2021,sib,sib-dede,07:00,15:00,dede-mongo % //,24.06.2021,sib,sib-dede,07:00,15:00,dede-mongo % ?,02.08.2021,sib,sib-accounting,14:35,16:35,business-plan % ?,13.10.2021,sb,sb-accounting,11:30,12:00,e-mail-pump I like to extract from the source CSV file the start time in column 5 and the end time in…

VIEW QUESTION

Ubuntu – Why iterator type of priority_queue is wrong with range constructor?

The code is as following. #include <iostream> #include <queue> #include <unordered_map> using namespace std; typedef unordered_map<int,int>::iterator myIt; class cmpHelper { public: bool operator()(myIt l, myIt r){return l->second > r->second;} }; int main(int argc, char* argv[]){ unordered_map<int,int> freq_cnt({{3,1},{2,4},{5,2}}); priority_queue<myIt,vector<myIt>, cmpHelper> h(freq_cnt.begin(),…

VIEW QUESTION
Back To Top
Search