Writing a Server Application Tasks In this task you are asked to demonstrate how a web server can be coded to serve dynamic pages. Specifically, the server application is to provide a page that displays if the visitor is a Winner of a Competition or not. The selection of a win/no-win can be based on a simple random number selection (i.e., 1 in 3 chance). This page is to be served through a defined web address (or route) such as http://localhost: 3000/competition. Follow the steps below to complete this task: 1. Create your own local directory (or you can use the same local directory created in Task 8.1). 2. Use express module to create a Node.js application (i.e., using the index.js from your Task 8.1 or creating a new expressserver.js) that will set a local web server. The server listens to the port 3000. 3. Modify your index.js (or expressServer.js) file to: o remove the hardcoded response for the GET on the route (as done in Task 8.1P) and change it to serve pages form the public_html folder, as done in previous weeks (sample of this code is shown in the snippet below) o add a route handler for a GET request on /competition. This would enable access to http://localhost: 3000/competition using a web browser. The handler for this route would then choose a random number (say out of 3) and if it equals 3 then display a 'win', otherwise display a 'no win' message. These messages, along with a statistics (tally) of wins & losses, should be provided a new webpage. 4. Run the command node. (to run the index.js) or node expressServer.js in a Command Prompt (Windows) or Terminal (Mac OS) within your local directory to make the server work. 5. Use the provided index.html file to access your newly created /competition route handler (or access it directly through http://localhost: 3000/competition), the Home page should appear like this:
Build and Enhance the "Product Discount Calculator" application with the syntaxes and skills you've learnt so far (Including PHP, HTML, CSS, and JS).
Which file system does Linux currently use for the volume on which Linux is installed?
You are managing an FTP server installed in Ubuntu Server. The server has created a very large log file,vsftpd.log. Which command is appropriate to search the log file for activity of the user charlie?
7.2P: Event Handler and Dynamic Page Tasks You are required to complete the following tasks using JavaScript: 1. Prompt the user to enter their name into a text box (e.g., Michael). 2. Include a Button object that when clicked modifies the content of the page to display an appropriate greeting message. o The current time of day should be used to personalise the message, for example, Good Morning, Good Day, Good Afternoon, or Good Evening) along with the input name (e.g., "Good Morning Michael") based on the hour of the day. • Also include the time and date, showing the number of hours and minutes into the day, along with the day of the week, date, month and year; as shown below. 3. Implement the onmouseover event handler for the welcome message paragraph to change the style of the welcome paragraph (background colour to yellow). 4. Implement onmouseout effects to change the style of a paragraph back to its original background colour. What will you submit? You should submit: • HTML file with Javascript code. • Screen-shot of the web page showing the output for Step 1. • Screen-shot of the web page showing the output for Step 2. • Screen-shot of the web page showing the output for Step 3. • Screen-shot of the web page showing the output for Step 4.
You work at an IT help desk and have been asked to set up 25 new user accounts in Active Directory.look at several script files named CreateNewUsers that are stored on the drive. Which one is likely to Your boss tells you to save time by using a Power Shell script that's available on a network share. You be the one you want?
Question Two Write a script that shows the exact day and time? You required to do the followings: 1. Copy and paste your script as your answer for this question. DON'T take screen shot for your HTML script. It must be editable script. 2. Full screenshot of your output
You are tasked with developing a secure and effective web-based interface for Friendzone's users. The interface must be designed to work on both mobile and desktop clients using appropriate HTML5 and CSS3 coding techniques. You should use a framework such as Bootstrap to handle the responsive structure of the site and make changes to it to suit your specific design.
Task2 Create a program that introduces three numerical values a, b, c - three sides of the triangle and calculates the area of the triangle according to the Heron formula (do not forget about checking the triangle inequality!).