Sockets(Engineering > Computer Science And Engineering > Javascript ) Questions and Answers
Question 1. Which is the method used to save chart as a ps file?
ps()
postscript()
script()
post(script)
Explanation:-
Answer: Option B. -> postscript()
The syntax for the method to save chart as a ps file is : postscript([filename]).
Question 2. How will you convert the returned API into an XML object?
SimpleElement()
SimpleXMLElement()
XMLElement()
None of the mentioned
Explanation:-
Answer: Option B. -> SimpleXMLElement()
The API returned by the method file_get_contents() can be converted into an XML object using the method SimpleXMLElement().
Question 3. What is the need for bubble charts?
Represent 2D data
Represent 3D data
Both a and b
None of the mentioned
Explanation:-
Answer: Option B. -> Represent 3D data
Bubble charts are used to represent three-dimensional data.
Question 4. What are the purposes R can be used for?
Suck in data
Parse data
Process data
All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned
Generally, R can be used to suck in data, parse it, process it, and then visualize it for reporting purposes.
Question 5. What is the tainted property of the window object?
Pathname
Protocol
Default status
Host
Explanation:-
Answer: Option C. -> Default status
The Defaultstatus is the tainted property of the window object.
Question 6. Which of the following is the base install for R?
Contrib
Base
Rtools
None of the mentioned
Explanation:-
Answer: Option B. -> Base
The PC installer comes in three flavors: Base is the base install, Contrib comes with compiled third-party packages, and Rtools comes with tools to build your own R packages.
Question 7. Which symbol is used to start a comment?
/
$
#
None of the mentioned
Explanation:-
Answer: Option C. -> #
'#' is used to comment a line.
Question 8. Which method is used to close the WebSocket?
Socket.flush()
Socket.close()
Socket.Close()
Socket.dispose()
Explanation:-
Answer: Option B. -> Socket.close()
The Socket.close() is used to close the WebSocket.
Question 9. What does the pushState() method do?
Removes the state
Adds new state
Replaces the state
None of the mentioned
Explanation:-
Answer: Option B. -> Adds new state
When a web app enters a new state, it calls history.pushState() to add that state to the browsing history.
Question 10. How can we check the subprotocol being used by the client?
subprotocol property
protocol property
clientprotocol property
None of the mentioned
Explanation:-
Answer: Option B. -> protocol property
Once the connection is established, the client can determine which subprotocol is in use by checking the protocol property of the socket.