Angular JS. Web-search. Application.
1) Write an application that prompts the user for a text string, performs a Web search (Google/Yahoo/Bing/etc - your choice) and returns the title and URL of the first result. Use any tools /libraries you wish, but you must provide instructions on how to build and run your application. Please include a brief description of your application and why you implemented it the way you did.
2) Write an application that does the following:
Given two text files: input.txt and patterns.txt, where input.txt is a free-text document composed of 1 or more lines of text, and patterns.txt is a set of search strings (1 per line). Your application should be able to run in one of three different modes:
Required:
Output all the lines from input.txt that match exactly any pattern in patterns.txt
Optional:
2) output all the lines from input.txt that contain a match from patterns.txt somewhere in the line.
3) output all the lines from input.txt that contain a match with edit distance <= 1 patterns.txt
For example:
input.txt -
Hello. This is line 1 of text.
and this is another.
line 3 here
the end
patterns.txt -
the end
matches
line 3
and this is anoother.
Mode 1 outputs:
the end
Mode 2 outputs:
line 3 here
the end
Mode 3 outputs:
and this is another.
the end
===
Какие функции мне нужны?Что почитать?
Посоветуйте что-нибудь?Что написать код для того чтобы решить эти задачи.
Благодарю.
|