-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHNSearch.cpp
96 lines (84 loc) · 2.91 KB
/
HNSearch.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//In the name of ALLAH
//
//Va ma ramayta ez ramayt valakenn a ALLAH a rama
#include <iostream>
#include <cstdio>
#include <string>
//#include "stdafx.h"
#include "infrastructure.h"
#include "interface.h"
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace working_with_file;
using namespace std;
string beautiful_find(string statement, string data)
{
string result = "";
int start_index = data.find(statement);
cout << endl << "start_index = " << start_index << endl;
result = data.substr(start_index, 30);
return result;
}
int main(int argc, char** argv) {
//YOU HAVE TO TEST THE CODE IN DEV-C++ BEFORE SENDING TO QUERA
//phase3::test_of_final_query_resolver();
final_interface::mymain();
//phase2::index();
//<<<<<<< HEAD
return 0;
/*cout << "In the name of God \nWelcome to SharfSearch Project-Phase1 Developed by Mohammad Nikan Ghorbani and Mohammad Haghighat." << endl;
cout << "Please select one of these options:" << endl << "1.Count of search statement in each file using default data (statement as input)";
cout << endl << "2.Replace in file (File path, statement, replace term as input)" << endl << "3.Index of search statement using default data (statement as input)";
cout << endl << endl << "0.Exit";
cout << endl << endl << "Enter number of operation: ";
short input;
cin >> input;
=======
//string test = "\nsalam\n";
//int start;
//cin >> start;
//int index = test.find('\n', start);
//cout << endl << index << endl;
//main(argc, argv);
////phase2::index();
//phase4::test_serialize();
//return 0;
phase4::last_test();
return 0;
// string spacing_chars[] = {" ", "\n", "salam "};
// cout<<spacing_chars[2][1];
//
// vector<string> test;
// test.push_back("salam");
// test.push_back("chetori");
// test.push_back("khubam") ;
//
// cout<<test.size()<<endl;
// test.erase(test.begin() + 1);
// cout<<test[1]<<endl;
// cout<<test.size()<<endl;
//
// return 0;
//cout << "In the name of God \nWelcome to SharfSearch Project-Phase1 Developed by Mohammad Nikan Ghorbani and Mohammad Haghighat." << endl;
//cout << "Please select one of these options:" << endl << "1.Count of search statement in each file using default data (statement as input)";
//cout << endl << "2.Replace in file (File path, statement, replace term as input)" << endl << "3.Index of search statement using default data (statement as input)";
//cout << endl << endl << "0.Exit";
//cout << endl << endl << "Enter number of operation: ";
//short input;
//cin >> input;
>>>>>>> origin/master
//if (input == 0)
// exit(0);
//if (input == 1)
// phase1::count();
//if (input == 2)
// phase1::replace();
//if (input == 3)
// phase1::report_index();
<<<<<<< HEAD
cout << endl << "----------------------------------" << endl << endl;
return 0;*/
//=======
//cout << endl << "----------------------------------" << endl << endl;
return 0;
//>>>>>>> origin/master
}