Public URLs for testing on mobile devices. Ngrock

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/java_goodstudy/article/details/80317331

1 download ngrock
2 unzip ngrock
3 ./ngrok authtoken xxxxxxx
4 $ ./ngrok http {yourt local port}

这里写图片描述

URLs

03-05

In the early nineties, the World Wide Web (WWW) was invented. Nowadays, most people think that the WWW simply consists of all the pretty (or not so pretty) HTML-pages that you can read with your WWW browser. But back then, one of the main intentions behind the design of the WWW was to unify several existing communication protocols.nnThen (and even now), information on the Internet was available via a multitude of channels: FTP, HTTP, E-Mail, News, Gopher, and many more. Thanks to the WWW, all these services can now be uniformly addressed via URLs (Uniform Resource Locators). The syntax of URLs is defined in the Internet standard RFC 1738. For our problem, we consider a simplified version of the syntax, which is as follows:nn "://" [ ":" ] [ "/" ]nnThe square brackets [] mean that the enclosed string is optional and may or may not appear. Examples of URLs are the following:nnhttp://www.informatik.uni-ulm.de/acmnftp://acm.baylor.edu:1234/pub/staff/mr-pngopher://veryold.edunnMore specifically,nn is always one of http, ftp or gopher.nn is a string consisting of alphabetic (a-z, A-Z) or numeric (0-9) characters and points (.).nn is a positive integer, smaller than 65536.nn is a string that contains no spaces.nnYou are to write a program that parses an URL into its components.nnnInputnnThe input starts with a line containing a single integer n, the number of URLs in the input. The following n lines contain one URL each, in the format described above. The URLs will consist of at most 60 characters each.nnnOutputnnFor each URL in the input first print the number of the URL, as shown in the sample output. Then print four lines, stating the protocol, host, port and path specified by the URL. If the port and/or path are not given in the URL, print the string instead. Adhere to the format shown in the sample output.nnPrint a blank line after each test case.nnnSample Inputnn3nftp://acm.baylor.edu:1234/pub/staff/mr-pnhttp://www.informatik.uni-ulm.de/acmngopher://veryold.edunnnSample OutputnnURL #1nProtocol = ftpnHost = acm.baylor.edunPort = 1234nPath = pub/staff/mr-pnnURL #2nProtocol = httpnHost = www.informatik.uni-ulm.denPort = nPath = acmnnURL #3nProtocol = gophernHost = veryold.edunPort = nPath =

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试