Q31. You are developing an application that consumes a Windows Communication Foundation (WCF) service.
The application interacts with the service by using the following code. (Line numbers are included for reference only.)
You need to authenticate to the WCF service.
What should you do?
A. At line 11, add the following lines of code. ,username: yourusername ,password: yourpassword
B. At line 11, add the following line of code. ,credentials: prompt
C. At line 06, replace the code with the following line of code. url: "http://contoso.com/Service.svc/GetCountry? Username=username&password=psssword",
D. At line 11, add the following line of code. The username and password will be stored in an XML file. ,credentials: credentials.xml
Answer: A
Q32. You are developing an HTML5 web application and are styling text.
You need to use the text-transform CSS property.
Which values are valid for the text-transform property?
A. hidden
B. blink
C. capitalize
D. line-through
Answer: C
Q33. You are developing a web page that performs CPU-intensive calculations. A web worker processes these calculations on a separate background thread. The process is instantiated from the web page.
You need to stop the web worker process after the calculations are completed.
Which two actions can you perform to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. From the web page, call the close() method.
B. From the web worker process, call the terminate() method.
C. From the web page, call the terminate() method.
D. From the web worker process, call the close() method.
Answer: CD
Q34. You are developing an HTML5 page. The page includes the following code.
The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?
A. absolute
B. static
C. fixed
D. relative
Answer: A
Q35. You develop an HTML5 webpage. You have the following HTML markup:
You need to change the background color for all of the elements whose name attribute ends with the word name.
Which code segment should you add to the webpage?
A. $ ('#name').css ({ 'background-color' : '#E0ECF8' });
B. $ ('input [name |="name"; ] ' ) .css (( 'background-color' : '#E0ECF8'});
C. $('input[name$="name"]'). css{{'background-color' : '#E0ECF8'});
D. $ ('*name' ) .css ({ 'background-color' : ' #E0ECF8'}) ;
Answer: C
Q36. You develop a webpage.
The webpage must display a grid that contains one row and five columns. Columns one, three, and five are the same width. Columns two and four are the same width, but much wider than columns one, three, and five. The grid resembles the following image:
The grid must meet the following requirements:
Each row must be tall enough to ensure that images are not cut off.
Each row must contain five columns.
The width of the columns must not change when the screen is resized or rotated.
You need to define the style for the grid. Which CSS3 style should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q37. You develop an HTML5 webpage. You have the following JavaScript code:
You need to handle the click event when a user clicks the show/Dialog button.
Which code segment should you insert at line 02?
A. $ (document).trigger("click", "#showDialog", function (e) {
B. $ (document).on ("#showDialog", "click", function (e) {
C. $(document).toggle("click", "#showDialog", function (e) {
D. $(document).on("click", "#showDialog", function (e) {
Answer: D
Q38. You develop a webpage that allows a user to download a 3PEG image and convert it to a PNG file.
You need to implement the code to download the contents of the JPEG image with no additional decoding.
Which JavaScript function should you use?
A. readAsBinaryString()
B. readAsArrayBuffer()
C. readAsDataURL()
D. readAsText()
Answer: B
Q39. You develop an HTML5 web application. The web application contains a form that allows users to enter only their month of birth.
The value that the users enter must be numbers between 1 and 12, inclusive.
You need to implement the form element for the month of birth.
Which element should you use?
A. <input type="time" options="month" />
B. <input types="submit" value="month" />
C. <input type="range" min="1" max="12" />
D. <input type="month" itemscope="numeric" />
Answer: C
Q40. You create the following JavaScript code:
You have the following requirements:
. You must invoke a function that displays the vehicle information within the following HTML element: <div id="display"x/div>
. The output of the function must appear on the webpage as follows: Vehicle Color is silverStay safe!Vehicle TransmissionType is manualBig machine!
You need to invoke the JavaScript function to display the required output in the HTML element.
Which two code segments should you use? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Answer: CE