Giter Club home page Giter Club logo

cpp-libface's Introduction

This repo is now archived

DuckDuckHack went on maintenance mode in 2015 and we aren't in a position to continue it. This repo hasn't been maintained subsequently and so we are archiving it.

Need to report a bug?

If you find a bug or relevancy issue, the best way to report this is via the Feedback button on the DuckDuckGo.com search results page. These issues are compiled and reviewed daily.

Have a suggestion or idea?

The best way to report these is also via the Feedback button on the DuckDuckGo.com search results page.

You can also share your thoughts with our community on Reddit.

cpp-libface's People

Contributors

bosky101 avatar dhruvbird avatar nilnilnil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpp-libface's Issues

Query contains keyword

As far as I can tell this will only search from the beginning of a string. Is there a way to search within a string as DDG does? In other words, what "trick" do we have to pull to do what DDG is able to do?

ddg

Missing license file

Hello !
I do not know what license do you want for this project. Can you add a license to it ?
Cheers !

Consider using a flex based scanner

Consider using a flex based scanner for more maintainability.
The current scanner is hand-written, but allows us to use mmap(). With a flex based scanner, we need to investigate if we can track the file offset. Also benchmark the flex based scanner to see if it's fast enough (I think it should be).

possibly a security concern - ability to guess search queries by listening to auto-complete session

Hello
It seems that one can guess search queries by listening to auto-complete session and record response lengths, even if the connection is encrypted.
I've made a POC:
https://github.com/ohadcn/bingo
a youtube video - shows the attack in action:
https://www.youtube.com/watch?v=XhbHFUHmvjo
and a presentation - explaining the attack flow (includes why DDG is easier to attack than other search engines):
https://prezi.com/pu5ilmqi-hyh/search-incognito/

lib-face can't handle queries that include spaces

I've been experimenting with lib-face. I imported a set of data that included terms containing spaces, for example:

14  API Design  api-design
3   API Security    api-security

Running queries for "api%20des" or "api+des" do not return any results:

http://localhost:6767/face/suggest/?n=10&q=api%20des
http://localhost:6767/face/suggest/?n=10&q=api+des

Is this intended behaviour? The example in the quick-start guide includes terms that have spaces in them: https://github.com/duckduckgo/cpp-libface/wiki/Quick-Start-Guide

weird answer

hello, i am trying out this application to achieve autocompletion. But it gives me weird results
Here is my entry :

25 hey
21 how do you do?
15 how I met your mother
10 hello world
9 great Days ahead

and my query : http://localhost:6767/face/suggest/?q=h&n=3

and the result :

"[ { "phrase": "hey", "score": 25 },
{ "phrase": "how do you do?", "score": 21 },
{ "phrase": "hello world", "score": 10 }]

Why is it not, hey/ how do you do / how i met, which are the most frequent ones??
thank you

Error make

I get this error when using make

g++ -o lib-face src/main.cpp src/httpserver.o deps/libuv/libuv.a deps/http-parser/http_parser.o -I . -I deps -Wall -D_FILE_OFFSET_BITS=64 -O2 -lm -lrt -pthread
In file included from src/main.cpp:21:
./include/benderrmq.hpp: In member function 'uint_t LookupTables::query_max(uint_t, uint_t, uint_t)':
./include/benderrmq.hpp:250: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
./include/benderrmq.hpp:251: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
./include/benderrmq.hpp:252: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
./include/benderrmq.hpp: In member function 'void BenderRMQ::initialize(const vui_t&)':
./include/benderrmq.hpp:353: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
./include/benderrmq.hpp:353: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
./include/benderrmq.hpp:354: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
./include/benderrmq.hpp:354: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
src/main.cpp: In function 'int do_import(std::string, uint_t, int&, int&)':
src/main.cpp:516: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'off_t'
src/main.cpp: In function 'void handle_stats(client_t*, parsed_url_t&)':
src/main.cpp:715: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

any idea, http server loads but says page not found

Output doesn't pass JSON Lint

The output should pass a simple JSON Lint test. We have our Content-Type set at "application/json; charset=UTF-8"

Here's my output:
[ { "phrase": "maid card game
", "score": 12 }
]

There are a couple things wrong:

  1. There should be no '\n' in the results
  2. There should also not be any unnecessary spaces (for instance a space between "[" and "{")
  3. The output should pass a simple JSON Lint test. The output above results in an error from jsonlint.com of:

"Parse error on line 3:
...{ "phrase": "maid card game",
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.