Skip to content
Snippets Groups Projects
Commit ed188268 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'autocomplete' into 'master'

Autocomplete

Incremented information about how to execute the autocomplete server and fixed bug with upcase characters

See merge request !114
parents 7296cccb d465a872
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,6 @@ class AutocompleteService ...@@ -6,6 +6,6 @@ class AutocompleteService
end end
def query(query) def query(query)
return open( "#{@url}:#{@port}?q=#{query}" ).read return open( "#{@url}:#{@port}?q=#{query.downcase}" ).read
end end
end end
...@@ -44,12 +44,15 @@ using namespace std; ...@@ -44,12 +44,15 @@ using namespace std;
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
if ( argc != 3 ){ if ( argc < 2 ){
cerr << "Usage: " << argv[0] << " <dicionary:file_url> <port:int>\n"; cerr << "Usage: " << argv[0] << " <string dicionary=../brazilian.txt> <int port=4242>\n";
return 1; return 1;
} }
int port = atoi(argv[2]); int port = 4242;
if ( argc > 2 ){
port = atoi(argv[2]);
}
EmbeddedServer server(argv[1], port); EmbeddedServer server(argv[1], port);
while(1) while(1)
sleep(100); sleep(100);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment