equal
deleted
inserted
replaced
296 |
296 |
297 \begin{figure}[p] |
297 \begin{figure}[p] |
298 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/crawler2.scala}}} |
298 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/crawler2.scala}}} |
299 \caption{A version of the web-crawler which only follows links in ``my'' domain---since these are the |
299 \caption{A version of the web-crawler which only follows links in ``my'' domain---since these are the |
300 ones I am interested in to fix. It uses the regular expression {\tt my\_urls} in Line~16. |
300 ones I am interested in to fix. It uses the regular expression {\tt my\_urls} in Line~16. |
301 The main change is in Line~26 where we test whether URL is in our domain or not.} |
301 The main change is in Line~26 where there is a test whether URL is in ``my'' domain or not.} |
302 |
302 |
303 \end{figure} |
303 \end{figure} |
304 |
304 |
305 \begin{figure}[p] |
305 \begin{figure}[p] |
306 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/crawler3.scala}}} |
306 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/crawler3.scala}}} |
307 \caption{A small email harvester---whenever we download a web-page, we also check whether |
307 \caption{A small email harvester---whenever we download a web-page, we also check whether |
308 it contains any email addresses. For this we use the regular expression {\tt email\_pattern} in |
308 it contains any email addresses. For this we use the regular expression {\tt email\_pattern} in |
309 Line~17. The main change is in Lines 33 and 34 where we print all email addresses |
309 Line~17. The main change is in Lines 33 and 34 where all email addresses that can be found in a page are printed.} |
310 we can find in a page.} |
|
311 \end{figure} |
310 \end{figure} |
312 |
311 |
313 \end{document} |
312 \end{document} |
314 |
313 |
315 %%% Local Variables: |
314 %%% Local Variables: |