Keyword

Result: 252 questions

What is Web Scraping? How do you achieve it in Python?

Answer:

Web Scrapping is a way of extracting the large amounts of information which is available on the web sites and saving it onto the local machine or onto the database tables.
In order to scrap the web:load the web page which is interesting to you. To load the web page, use “requests” module.
parse HTML from the web page to find the interesting information.Python has few modules for scraping the web. They are urllib2, scrapy, pyquery, BeautifulSoap, etc.

View

What are the pros and cons of Node.js?

Answer:

Pros:

a) If your application does not have any CPU intensive computation, you can build it in Javascript top to bottom, even down to the database level if you use JSON storage object DB like MongoDB.

b) Crawlers receive a full-rendered HTML response, which is far more SEO friendly rather than a single page application or a websockets app run on top of Node.js.

Cons:

a) Any intensive CPU computation will block node.js responsiveness, so a threaded platform is a better approach.
b) Using relational database with Node.js is considered less favourable

View

What are Cocoa and Cocoa Touch and how are they relevant to Swift?

Answer:

Cocoa and Cocoa Touch are frameworks that run on OS X and iOS respectively. Both are primarily implemented with Objective-C and integrated with Xcode (you should also be able to explain Xcode if you get a question on that). They consist of libraries, APIs, and runtimes. Because Swift is an iOS language, it also works with Cocoa and Cocoa Touch. Read the Apple Developer page on Cocoa for more info.

Getting Your Opinion on Swift

View

How stable is Swift?

Answer:

As with any new language, there is a potential for bugs. While you may encounter some trouble with the Swift language, the majority of issues were addressed before the 1.0 release.

The thing to most look out for is changes to the Swift language during each update. For example, when updating from 1.0 to 1.1, Apple introduced a new feature: failable initializers. You can expect that the language will change as more people use it and give feedback to Apple. Stay apprised of changes using the revision history for The Swift Programming Language.

View

Write a function that sorts the keys in a hash by the length of the key as a string. For instance, the hash:

{ abc: 'hello', 'another_key' => 123, 4567 => 'third' }

should result in:

["abc", "4567", "another_key"]

Answer:

As is always true in programming, there are in fact multiple ways to accomplish this.

The most straightforward answer would be of the form:

hsh.keys.map(&:to_s).sort_by(&:length)

or:

hsh.keys.collect(&:to_s).sort_by { |key| key.length }

Alternatively, Ruby’s Enumerable mixin provides many methods to operate on collections. The key here is to turn the hash keys into a collection, convert them all to strings, then sort the array.

def key_sort hsh
	hsh.keys.collect(&:to_s).sort { |a, b| a.length <=> b.length }
end

An equivalent call of the collect method is done with the usual block syntax of:

collect { |x| x.to_s }
View

What is a markup language?

Answer:

Markup languages are designed for presentation of text in different formats, and it can also be used for transporting and storing data. This markup language specifies the code for formatting, layout and style of data .This markup code is called Tag.

HTML and XML are examples of Markup Language.

View

What are the differences between HTML and XML?

Answer:

Following are the differences between HTML and XML:

HTML

XML

Markup language used to display data Markup language used to store data
Case Insensitive Case sensitive
Designing web pages Used to transport and store data
Predefined Tags Custom Tags
Does not Preserve white spaces Preserve white spaces
Static Dynamic
View

How comment can be represented in XML?

Answer:

Comment can be represented as <!- – comments – -> as like HTML. This comment symbol is applicable for single or multiple lines.

View

Can I replace HTML with XML?

Answer:

No, XML is not a replacement of HTML. XML provides an alternative approach to define own set of markup elements, and it is used for processing and storing data.

View

Why XSLT is important for XML?

Answer:

XSLT is abbreviated as eXtensible Sytlesheet Language Transformation which is used to transform an XML document to HTML before it is displayed to the browser.

View

What is Data Island?

Answer:

An XML Data island is XML data embedded into a HTML page. This works only with the Internet.

View

Which of the following function of String object produces an HTML hypertext link for requesting another URL?

Quiz

Select the correct HTML tag to make a text bold.

Quiz

Select the appropriate HTML tag for inserting a line break?

Quiz

Select the correct HTML for creating a hyperlink?

Quiz

Select the property that is used to create spacing between HTML elements?

Quiz

Select the correct HTML tag to make a text italic?

Quiz

What is CSS ?

Answer:

The full form of CSS is Cascading Style Sheets. It is a styling language which is simple enough for HTML elements. It is popular in web designing, and its application is common in XHTML also.

View

In how many ways can a CSS be integrated as a web page?

Answer:

CSS can be integrated in three ways:

  • Inline: Style attribute can be used to have CSS applied HTML elements.
  • Embedded: The Head element can have a Style element within which the code can be placed.
  • Linked/ Imported: CSS can be placed in an external file and linked via link element.
View

What benefits and demerits do External Style Sheets have? 

Answer:

Benefits:

  • One file can be used to control multiple documents having different styles.
  • Multiple HTML elements can have many documents, which can have classes.
  • To group styles in composite situations, methods as selector and grouping are used.

Demerits:

  • Extra download is needed to import documents having style information.
  • To render the document, the external style sheet should be loaded.
  • Not practical for small style definitions.
View

© 2017 QuizBucket.org