Group Details

Computer Sciences

Discussion and Solution of Computer Sciences and IT related Problem of Virtual Studies.

Member List

  • RE: Modern community for virtual studies

    @Sahil
    Sorry for inconvenience. We are working on new features.

    posted in Announcements
  • RE: India Successfully landed on Moon. Here is the moon landing video 😎

    Moon could not accept modi because there are peace moon don’t want to be destroyed #IndiaFailed

    posted in General Discussion
  • RE: India Successfully landed on Moon. Here is the moon landing video 😎

    @zaasmi
    ChandRayaan2 Connection Restored !
    Message Received :
    “India tujh se Naa ho Paaye Ga”😂😂 #IndiaFailed

    posted in General Discussion
  • RE: Malala Yousafzai

    Please check her tweet

    posted in Pakistan
  • Cyberian Mobile Application Launched!

    We are happy to announced that Android application has been launched. You can download as following link.
    Download Link Available.

    posted in Announcements
  • RE: How to Copy Quiz and Paste or direct Google Search - VU Quiz

    Chrome extension link activate now you can download from below link

    VU Quiz Extension

    posted in Virtual University
  • RE: CS311 Quiz 2 Solution and Discussion

    XML Quiz
    For each question, choose the best choice out of the given choices.

    1. What does XML stand for?
      A. X-Markup Language
      B. eXtra Modern Link
      C. Example Markup Language
      D. eXtensible Markup Language

    2. XML’s goal is to replace HTML
      A. True
      B. False

    3. What does DTD stand for?
      A. Direct Type Definition
      B. Document Type Definition
      C. Document Type Declaration

    4. Is this a correct XML document?
      <?xml version=”1.0”?>
      <to>Students</to>
      <from>Teacher</from>
      <heading>Reminder</heading>
      <body>We are at Software Park, Thailand</body>
      A. Yes
      B. No

    5. Which statement is true?
      A. All XML elements must have a closing tag
      B. All XML documents must have a DTD or an XML schema
      C. All XML elements must be lowercase
      D. All of the statements are true

    6. Which statement is true?
      A. XML tags are case sensitive
      B. XML elements must be properly nested
      C. XML documents must have the root element
      D. All the statements are true

    7. XML preserves white spaces
      A. True
      B. False

    8. Is this a correct XML document?
      <?xml version=”1.0”?>
      <note>
      <to age=19>Students</to>
      <from>Teacher</from>
      </note>

    A. No
    B. Yes

    1. XML elements cannot be empty
      A. True
      B. False

    2. Which is not a correct name for an XML element?
      A. <Note>
      B. <h1>
      C. <1dollar>
      D. All 3 names are incorrect

    3. Which is not a correct name for an XML element?
      A. <age>
      B. <first name>
      C. <NAME>
      D. All 3 names are incorrect

    4. Which is not a correct name for an XML element?
      A. <xmldocument>
      B. <document>
      C. <doc>

    5. For the XML parser to ignore a certain section of your XML document, which syntax is correct?
      A. <xml:CDATA[ Text to be ignored]>
      B. <CDATA>Text to be ignored</CDATA>
      C. <![CDATA[ Text to be ignored ]]>

    6. XML is a subset of SGML
      A. True
      B. False

    7. XML attributes must be in double quotes
      A. True
      B. False

    8. XML attributes must be assigned values
      A. True
      B. False

    9. The Document Type Definition must be stored in an external file
      A. True
      B. False

    10. What can XML do?
      A. The standard for automating data exchange between systems
      B. The standard for displaying data on the Web
      C. The standard for a cross-platform programming language

    11. Which is false?
      A. XML is used to describe only structured data
      B. XML is used to only on the Internet
      C. XML is used to represent only simple data
      D. All of the above

    12. Which of the following comments are not well formed?
      A. <!-- define <source> -->
      B. <!-- define <source> -->
      C. <!-- declaration — 10.27.2004 -->
      D. <!— this is a valid comment -->

    13. Provided that the file x.dtd has the following contents. Which of the xml files are valid?
      <!ELEMENT test (a, b)>
      <!ELEMENT a ANY>
      <!ELEMENT b (#PCDATA | c)*>
      <!ELEMENT c EMPTY>
      <!ATTLIST c valid (true | false) #IMPLIED>

    a. <?xml version=”1.0” encoding=”ISO-8859-1”?>
    <!DOCTYPE test SYSTEM “x.dtd”>
    <test>
    <a/>
    <b>text<c valid=”true”/></b>
    </test>

    b. <?xml version=”1.0” encoding=”ISO-8859-1”?>
    <!DOCTYPE test SYSTEM “x.dtd”>
    <test>
    <a>Element <a>can</a>
    contain <anything/></a>
    </test>

    c. <?xml version=”1.0” encoding=”ISO-8859-1”?>
    <!DOCTYPE a SYSTEM “x.dtd”>
    <b>Sample</b>

    1. How can you declare in a DTD that the element x contains either the element a or the element b, but not both of them
      a) <!ELEMENT x a|b>
      b) <!ELEMENT x (a|b)>
      c) <!ELEMENT x (a?, b?)>
      d) It is not possible to declare in a DTD that one element contains either the element a or the element b, but not both of them

    2. How can you declare in a DTD that the element x contains the element a, or the element b, or both of them in the sequence a b.
      a) <!ELEMENT x a|b>
      b) <!ELEMENT x (a|b)>
      c) <!ELEMENT x (a?, b?)>
      d) None of the declarations above does solve the problem.

    3. How can you declare in a DTD that the empty element x has either the attribute a or the attribute b (or both of them). The attributes contain any value.
      a) <!ELEMENT x EMTPY>
      <!ATTLIST (a|b) CDATA #REQUIRED>

    b) <!ELEMENT x EMPTY>
    <!ATTLIST a CDATA #REQUIRED>
    <!ATTLIST b CDATA #REQUIRED>

    c) <!ELEMENT x EMPTY>
    <!ATTLIST a CDATA #REQUIRED
    b CDATA #REQUIRED>

    d) It is not possible to make the presence of one attribute depend on another attribute

    1. How can you in a DTD declare that the element x contains both attributes a and b and that the order of them has to be ab? The attributes can contain any value
      a) <!ELEMENT x EMPTY>
      <!ATTLIST (a,b) CDATA #REQUIRED>

    b) <!ELEMENT x EMPTY>
    <!ATTLIST a CDATA #REQUIRED>
    <!ATTLIST b CDATA #REQUIRED>

    c) <!ELEMENT x EMPTY>
    <!ATTLIST a CDATA #REQUIRED>
    b CDATA #REQUIRED>

    d) It is not possible to specify the order of attributes in a DTD. The order of attributes does not matter in XML.

    e) It is not possible to specify the order of attributes in a DTD. The order of attributes can be specified only in an XML schema.

    Valid names of elements and attributes start with a letter, an underscore or a colon, the following allowed characters are letters, numeric characters, colon, underscore, dot and hyphen (minus). Names which start with “xml” (in any case) are reserverd for W3C. The colon has a special meaning with namespaces and should not be used with any other semantic.

    posted in CS311 - Introduction to Web Services Development
  • RE: CS311 Quiz 2 Solution and Discussion
    1. Which method does SAX use for processing XML documents?

    a) Event Based
    b) DocumentHandler
    c) Document
    d) Tree based

    Answer : a

    1. Which method does DOM use for processing XML documents?

    a) Event Based
    b) DocumentHandler
    c) Document
    d) Tree based

    Answer : d

    1. Which interfaces are part of the SAX2 API?

    a) ContentHandler, ErrorHandler, DTDHandler, EntityResolver
    b) DocumentHandler, ErrorHandler, DTDHandler, EntityHandler
    c) DocumentHandler, Errorhandler, DTDHandler, SchemaHandler
    d) DocumentHandler, Errorhandler, DTDHandler, EntityResolver

    Answer : a

    1. Which is the best description of the “characters()” method?

    a) a method of DOM API to insert character data in the XML document
    b) a method of the SAX ContentHandler interface to receive notification
    of the presence of character data
    c) a method of the DOM interface to replace the entity reference
    with the character data
    d) None of these.

    Answer : b

    1. An XML document to be processed is very large. The application extracts a small portion of the information from the document. Memory and speed may be constraints. Which method or methods are most appropriate for this situation?

    a) Use SAX
    b) Use DOM
    c) Extract the necessary information and process using XSLT.
    d) Use a schema-based approach.

    Answers : a

    1. When you construct an XML using a DOM enabled Parser, the same parser should be used to process back
      the XML document when the process involves legacy applications, otherwise it is not necessary to do so.

    a) Not really
    b) Yes, whenver the process is between legacy conectivity this is better.
    c) You can use SAX enabled parser to fill this gap.
    d) This statement is not a correct one, because DOM is constructed using IDL.

    Answer : d

    1. When Processing Instructions are a part of your parsing process, DOM should be used,
      since SAX cannot be used to detect a Processing Instruction in a document.

    a)true
    b)false

    Answer : a

    1. Consider a system which is memory & speed constraint. The application is to process XML documents,
      sort the contents and mail them to a higher configuration machine for transformation. Which is the best approach?

    a) Use platform native language to process the docuements
    b) Use DOM based approach.
    c) Using SAX based approach is the best.
    d) DOM and SAX must be used in this context.

    Answer : b

    1. When receiving documents from a non-trusted agent, the best way to process the documents is:

    a) Use SAX
    b) Use DOM
    c) Both can be used here.
    d) Both can be used but validity is an issue here.

    Answer: d

    1. In DOM, the Document interface is the only interface that allows you to create other DOM document components.

    a)true
    b)false

    Answer: a

    1. XSLT is essentially a tool for translating what kind of documents?

    a) XML
    b) PDF
    c) DOM
    d) RTF

    Answers: a

    1. Use of SAX based parser is most likely to be used in which of the following scenarios?

    a) You want to process the document in a sequential order only.
    b) The documents is very large.
    c) When there is no need to validate XML documents.
    d) The parser implements only SAX based approach.

    Answers: a, b

    1. DOM can be used to process HTML documents.

    a)true
    b)false

    Answer: a

    1. What error types does the SAX2 ErrorHandler interface handle?

    a) informational, warning, fatal-error
    b) warning, error, fatal-error
    c) warning, error
    d) informational, warning, error, fatal-error

    Answer: b

    1. A DOM-based parser should be used for which of the following situations?

    a) Need to modify the XML document directly
    b) Performance and/or memory is an issue
    c) Need to have random access to the components of the XML document
    d) Only need to process the XML document sequentially

    Answer: a, c

    posted in CS311 - Introduction to Web Services Development
  • RE: CS508 GDB.1 Solution and Discussion posted in CS508 - Modern Programming Languages
  • RE: CS508 GDB.1 Solution and Discussion

    Too many answers to this question have given examples of languages that aren’t really all that suited for all purposes; C, Assembly and Machine Language being the biggest examples. Sure, these are Turing complete, but they aren’t all that great for exploratory programming, or for prototyping, so they fail. Similarly, I like Python, and I’d suspect that I’d be at home with Ruby, but these languages define “getting close to the metal” as “Profile your programs, find the parts that run the most, and write those parts in C”. Hardly universal at all.

    posted in CS508 - Modern Programming Languages