0

web technology Online Quiz - 89

Description: web technology Online Quiz - 89
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0
  1. It is a fundamental

  2. It is a platform-independent, XML-based registry for businesses worldwide to be listed on the Internet.

  3. It is a bidirectional pull parser interface for streaming XML processing.

  4. It provides a convenient way to bind an XML schema to a representation in Java code.


Correct Option: B

An existing J2EE 1.3 application provides online stock quotes to the users. The web page refreshes every 60 seconds to show the latest stock prices. Customer is planning to add some minor features to this site and requested you for tips to improve the current features with minimal costs. Which of the following would you recommend? Choose one answer.

  1. Recode the application using JSF, EJB and Entities. This will improve the overall performance of the application and also improves maintainability

  2. Replace the auto-refresh functionality with AJAX code.

  3. Recode the application using JSF, EJB and Web Services.

  4. Use frames and put the auto-refresh part in a different frame.


Correct Option: B
  1. Remove the file upload feature from Internet Banking application

  2. Limit the no. of payments in upload files to minimum so that the overall request does not take more than 1 minute. Encourage customer to break the files and upload multiple times.

  3. Use AJAX to display progress bar displaying the % complete figures.

  4. Use JSF to reduce the processing times.


Correct Option: C

ABC company has a very old web application that was built on Servlets, JSP and a simple proprietary MVC framework which they must use. This application is mostly used for reporting purposes and retrieves data from DB2 through JDBC. They are planning to enhance the functionality of the application and also deploy on a Java EE application server. They approached you for suggestions to improve the application code. Which of the following would not be a valid recommendation (best-fit)? Choose one answer.

  1. Refactor the common scriptlet code into tag libraries wherever possible

  2. Create a common look & feel using templates, CSS files.

  3. Use Entities

  4. Use Expression Language


Correct Option: C
  1. echo ucwords(strtolower($word)

  2. echo ucwords($word)

  3. echo ucfirst(strtolower($word)

  4. echo ucfirst($word)


Correct Option: A
Explanation:

To solve this question, the user needs to know PHP string functions and the concept of case conversion.

  • ucwords(): This function converts the first character of each word in a string to uppercase.
  • strtolower(): This function converts a string to lowercase.
  • ucfirst(): This function converts the first character of a string to uppercase.

Option A: echo ucwords(strtolower($word)) - This option converts the string to lowercase using strtolower() function and then converts the first character of each word in the string to uppercase using ucwords() function. This will return the string in title case.

Option B: echo ucwords($word) - This option converts the first character of each word in the string to uppercase using ucwords() function. This will not convert the string to lowercase and therefore will not return the string in title case.

Option C: echo ucfirst(strtolower($word)) - This option converts the string to lowercase using strtolower() function and then converts the first character of the string to uppercase using ucfirst() function. This will not convert the first character of each word in the string to uppercase and therefore will not return the string in title case.

Option D: echo ucfirst($word) - This option converts the first character of the string to uppercase using ucfirst() function. This will not convert the first character of each word in the string to uppercase and therefore will not return the string in title case.

Therefore, the correct option is:

The Answer is: A. echo ucwords(strtolower($word))

  1. are different how they handle failure

  2. both are same in every aspects

  3. is include() produced a Fatal Error while require results in a Warning

  4. none of above


Correct Option: A

Which of the following is NOT done with JavaScript ?

  1. Form Validation

  2. RGB Colors

  3. Browser Detection

  4. RGB Value


Correct Option: B

AI Explanation

To answer this question, you need to understand the capabilities and functionalities of JavaScript. Let's go through each option to understand why it is correct or incorrect:

Option A) Form Validation - This option is correct because JavaScript can be used to validate form inputs and ensure that the data entered by the user is in the correct format.

Option B) RGB Colors - This option is incorrect because JavaScript can be used to manipulate and generate RGB colors. It can be used to dynamically change the color of elements on a webpage.

Option C) Browser Detection - This option is correct because JavaScript can be used to detect the user's browser and perform specific actions based on the browser type.

Option D) RGB Value - This option is correct because JavaScript can be used to manipulate and retrieve RGB values. It can be used to extract and modify individual color components of an RGB value.

The correct answer is B) RGB Colors. This option is incorrect because JavaScript can indeed be used to work with RGB colors.

It is usually advisable to keep as much JavaScript as possible in which section ?

  1. Head

  2. Layer

  3. Body

  4. Title


Correct Option: A

AI Explanation

To answer this question, you need to understand the structure of an HTML document and the role of JavaScript.

JavaScript is a programming language commonly used for adding interactivity and dynamic functionality to a website. It can be included within an HTML document using the `` tag.

Now let's go through each option to understand why it is correct or incorrect:

Option A) Head - This option is correct. Placing JavaScript in the <head> section of an HTML document is usually advisable. This allows the JavaScript code to be loaded and executed before the content of the webpage is rendered. It is especially useful when the JavaScript code needs to manipulate or interact with elements in the HTML document.

Option B) Layer - This option is incorrect. The term "layer" does not correspond to any specific section in an HTML document. It is not a recommended location for JavaScript code.

Option C) Body - This option is incorrect. Placing JavaScript in the <body> section of an HTML document is possible but not usually advisable. The JavaScript code will be loaded and executed after the content of the webpage is rendered. This can lead to delays in the execution of the JavaScript code and may cause issues with accessing or manipulating elements in the HTML document.

Option D) Title - This option is incorrect. The <title> tag is used to define the title of an HTML document. It is not a suitable location for JavaScript code.

The correct answer is A) Head. Placing JavaScript code in the <head> section of an HTML document is usually advisable as it allows the code to be loaded and executed before the content of the webpage is rendered.

JavaScript lines end with what

  1. comma

  2. semicolon

  3. colon

  4. Bracket


Correct Option: B

AI Explanation

To answer this question, we need to understand the syntax of JavaScript.

In JavaScript, statements or lines of code are typically terminated with a semicolon (;). This is used to indicate the end of the statement and separate multiple statements on the same line. The semicolon is a crucial component of JavaScript syntax and is used to avoid any potential ambiguity or errors.

Let's go through each option to understand why they are correct or incorrect:

Option A) Comma - This option is incorrect because commas are not used to end lines in JavaScript. Instead, commas are used to separate items in a list or arguments in a function.

Option B) Semicolon - This option is correct because semicolons are used to terminate statements and end lines in JavaScript.

Option C) Colon - This option is incorrect because colons are typically used for object property assignments and in JavaScript's ternary operator, but they are not used to end lines.

Option D) Bracket - This option is incorrect because brackets (either curly brackets {} or square brackets []) are used for grouping code blocks, defining arrays, or creating objects, but they are not used to end lines.

Therefore, the correct answer is B) semicolon. This option is correct because semicolons are used to terminate statements and end lines in JavaScript.

- Hide questions