[Free] 2018(Aug) Ensurepass Microsoft 70-480 Dumps with VCE and PDF 51-60

Ensurepass.com : Ensure you pass the IT Exams
2018 Aug Microsoft Official New Released 70-480
100% Free Download! 100% Pass Guaranteed!

Programming in HTML5 with JavaScript and CSS3

Question No: 51 – (Topic 2)

You are developing a web application that uses web workers to process images extracted from an HTML5 CANVAS object on a web page.

You need to pass messages between the web workers and the web page.

Which three types of objects should you use? (Each correct answer presents a complete solution. Choose three.)

  1. JSON

  2. Window

  3. Parent

  4. String

  5. JavaScript

  6. DOM

Answer: A,D,E Explanation: * Example:

var myHelloWorker = new Worker(#39;helloworkers.js#39;);

You’ll then start the worker (and thus a thread under Windows) by sending it a first message:

myHelloWorker.postMessage();

Indeed, the Web Workers and the main page are communicating via messages. Those messages can be formed with normal strings or JSON objects.

  • (E) The Web Workers API makes it possible to execute a JavaScript file asynchronously and autonomously. A web worker is essentially a thread executing a JavaScript file.

  • (A, D) In the first implementations of web workers the browsers only allowed strings to be exchanged as messages. However, recent implementations allow for exchange of values or JSON objects.

Reference: HTML5 Web Workers

Question No: 52 DRAG DROP – (Topic 2)

You develop an HTML5 webpage. You have the following HTML markup:

Ensurepass 2018 PDF and VCE

You also have the following JavaScript variable defined: var languages = [];

You need to add statements to an existing JavaScript function to sort the list items.

Which four actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Explanation:

Box 1:

Ensurepass 2018 PDF and VCE

Box 2:

Ensurepass 2018 PDF and VCE

Box 3:

Ensurepass 2018 PDF and VCE

Box 4:

Ensurepass 2018 PDF and VCE

Note:

  • getElementsByTagName

    The getElementsByTagName() method accesses all elements with the specified tagname.

  • Example:

// Get the list items and setup an array for sorting var lis = ul.getElementsByTagName(quot;LIquot;);

var vals = [];

// Populate the array

for(var i = 0, l = lis.length; i lt; l; i ) vals.push(lis[i].innerHTML);

// Sort it vals.sort();

// Sometimes you gotta DESC if(sortDescending) vals.reverse();

// Change the list on the page for(var i = 0, l = lis.length; i lt; l; i )

lis[i].innerHTML = vals[i];

}

Question No: 53 – (Topic 2)

You are developing an HTML5 web application and are styling text. You need to use the text-transform CSS property.

Which value is valid for the text-transform property?

  1. lowercase

  2. 20px

  3. line-through

  4. italic

Answer: A

Explanation: CSS Syntax

text-transform: none|capitalize|uppercase|lowercase|initial|inherit;

Example

Transform text in different elements: h1 {text-transform:uppercase;}

h2 {text-transform:capitalize;} p {text-transform:lowercase;}

Reference: CSS text-transform Property http://www.w3schools.com/cssref/pr_text_text-transform.asp

Question No: 54 DRAG DROP – (Topic 2)

You are creating an application by using HTML5 and CSS3. The styles for the pages are derived from five style sheets.

The styles are not being applied correctly to the pages in the application.

You need to determine the order in which the style sheets will be applied by the browser.

In which order will the five style sheets be applied? (To answer, move the style sheet types from the list of style sheet types to the answer area and arrange them in the order that they will be applied.)

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Explanation:

Box 1: user agent style sheets Box 2: user normal style sheets Box 3 author normal style sheets:

Box 4: author important style sheets Box 5: user important style sheets

Note:

The order of declarations from least important to most important:

-> user agent declarations

-> user normal declarations

-> author normal declarations

-> author important declarations

-> user important declarations

Question No: 55 – (Topic 2)

You are creating a JavaScript object that represents an employee.

You need to extend the Employee object by adding the GetPayroll() method.

You need to ensure that all future instances of the Employee object implement the GetPayroll() method.

Which code segment should you use?

Ensurepass 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: D

Explanation: * Object.prototype.constructor

Returns a reference to the Object function that created the instance#39;s prototype. Note that the value of this property is a reference to the function itself, not a string containing the function#39;s name. The value is only read-only for primitive values such as 1, true and quot;testquot;.

* The constructor property is created together with the function as a single property of func.prototype.

Reference: Object.prototype.constructor

Question No: 56 DRAG DROP – (Topic 2)

You are creating a web worker for an HTML5 application.

The following tasks must be performed from within the web worker:

-> Register an event listener for the web worker

-> Start and stop the web worker

You need to define a function that performs the required tasks.

Which line of code should you use? (To answer, drag the appropriate line or lines of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Explanation:

Ensurepass 2018 PDF and VCE

  • addEventListener

    The addEventListener() method attaches an event handler to the specified element.

    In context of a worker, both self and this refer to the global scope. The worker can either add an event listener for the message event, or it can define the onmessage handler to listen for any messages sent by the parent thread.

  • postmessage

    Pass a message to the worker.

  • close()

    Terminating Workers

    Workers are resource-intensive; they are OS-level threads. Therefore, you do no want to create a large number of worker threads, and you should terminate the web worker after it completes its work. Workers can terminate themselves, like this:

    self.close();

    Question No: 57 HOTSPOT – (Topic 2)

    You are developing an online shopping application that accepts credit cards for payment.

    If the credit card number is invalid, the application must: Generate an error

    Assign quot;200quot; to the error number Assign quot;Invalidquot; to the error description

    You need to write the code that meets the requirements.

    How should you write the code? (To answer, select the appropriate option from the drop- down list in the answer area.)

    Ensurepass 2018 PDF and VCE

    Ensurepass 2018 PDF and VCE

    Answer:

    Ensurepass 2018 PDF and VCE

    Explanation:

    Ensurepass 2018 PDF and VCE

    Example: throw new Error(200, quot;x equals zeroquot;);

    Question No: 58 – (Topic 2)

    You are creating a JavaScript function to display the current version of a web application You declare a button as follows.

    lt;input type=quot;buttonquot; id=quot;Aboutquot; value=quot;Aboutquot; /gt;

    You need to create an event handler for the button by using an anonymous function. Which code segment should you use?

    Ensurepass 2018 PDF and VCE

    1. Option A

    2. Option B

    3. Option C

    4. Option D

    Answer: C Explanation: Example

    When passing parameter values, use an quot;anonymous functionquot; that calls the specified function with the parameters:

    document.addEventListener(quot;clickquot;, function() { myFunction(p1, p2);

    });

    Reference: HTML DOM addEventListener() Method

    Question No: 59 – (Topic 2)

    You are modifying a blog site to improve search engine readability.

    You need to group relevant page content together to maximize search engine readability. Which tag should you use?

    1. lt;sectiongt;

    2. lt;tbodygt;

    3. lt;divgt;

    4. lt;tablegt;

    Answer: A

    Explanation: The lt;sectiongt; tag defines sections in a document. Such as chapters, headers, footers, or any other sections of the document.

    Question No: 60 – (Topic 2)

    You are modifying a blog site to improve search engine readability.

    You need to group relevant page content together to maximize search engine readability. Which tag should you use?

    1. lt;spangt;

    2. lt;navgt;

    3. lt;cablegt;

    4. lt;sectiongt;

    Answer: D

    Explanation: The lt;sectiongt; tag defines sections in a document. Such as chapters, headers, footers, or any other sections of the document.

    100% Ensurepass Free Download!
    70-480 PDF
    100% Ensurepass Free Guaranteed!
    70-480 Dumps

    EnsurePass ExamCollection Testking
    Lowest Price Guarantee Yes No No
    Up-to-Dated Yes No No
    Real Questions Yes No No
    Explanation Yes No No
    PDF VCE Yes No No
    Free VCE Simulator Yes No No
    Instant Download Yes No No

You must be logged in to post a comment.

Proudly powered by WordPress   Premium Style Theme by www.gopiplus.com