The first character in any String has an index of 1.
Answer the following statement true (T) or false (F)
False
You might also like to view...
Case-based Critical Thinking QuestionsCase 13-1Judy wants to be able to validate the XML documents that she uses for recipes. These documents include numeric elements that specify ingredient amounts and cooking times, so you recommend that she use a schema instead of a DTD, and you teach her some of the key facts about schemas. Which of the following is NOT an advantage of schemas over DTDs?
A. They are more flexible than DTDs in dealing with mixed content. B. They support more data types than DTDs. C. They provide better support for namespaces. D. They are simpler to create and maintain.
Can you edit the /etc/nginx/custom_configuration.conf file with SciTE? Describe the process below. Remember, because the file is stored under /etc, you will need root permissions to edit it.
Editing Configuration Files for Services a. First, open nginx’s configuration file in a nano. The configuration filename used here is custom_server.conf. Notice below that the command is preceded by the sudo command. After typing nano include a space and the -l switch to turn on line-numbering.
[analyst@secOps ~]$ sudo nano -l /etc/nginx/custom_server.conf [sudo] password for analyst:Use the arrow keys to navigate through the file.
GNU nano 2.8.1 File: /etc/nginx/custom_server.conf #user html; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request$ # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 81; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos ^X Exit ^R Read File ^\ Replace ^U Uncut Text^T To Spell ^_ Go To Lib. While the configuration file has many parameters, we will configure only two: the port nginx listens on for incoming connections, and the directory it will serve web pages from, including the index HTML homepage file. c. Notice that at the bottom of the window, above the nano commands, the line number is highlighted and listed. On line 36, change the port number from 81 to 8080. This will tell nginx to listen to HTTP requests on port TCP 8080. d. Next, move to line 44 and change the path from /usr/share/nginx/html/ to /home/analyst/ lab.support.files/ e. Press CTRL+X to save the file. Press Y and then ENTER to confirm and use the custom_server.conf as the filename. f. Type the command below to execute nginx using the modified configuration file:
[analyst@secOps ~]$ sudo nginx -c custom_server.conf -g "pid /var/run/nginx_v. pid;"g. Click the web browser icon on the Dock to launch Firefox. h. On the address bar, type 127.0.0.1:8080 to connect to a web server hosted on the local machine on port 8080. A page related to this lab should appear. i. After successfully opening the nginx homepage, look at the connection message in the terminal window. j. To shut down the nginx web server, press ENTER to get a command prompt and type the following command in the terminal window:
[analyst@secOps ~]$ sudo pkill nginxk. You can test whether the nginx server is indeed shut down by first clearing the recent history in the web browser, then close and re-open the web browser, then go to the nginx homepage at 127.0.0.1:8080.