Saturday, 25 July 2015

Git Interview Question

* What is git?
Git is a distributed version control system.
Git originates from the Linux kernel development and is used by many popular open source projects, e.g., the Android or the Eclipse developer teams, as well as many commercial organizations.
The core of Git was originally written in the programming language C, but Git has also been re-implemented in other languages, e.g., Java, Ruby and Python.

* What is a default branch in git?
You can create a new branch from an existing one and change the code independently from other branches. One of the branches is the default (typically named master). The default branch is the one for which a local branch is automatically created when cloning the repository.

* What is different between author and committer in git?
The author and committer might be different people. The author did the change and the committer applied the change to the Git repository. This is common for contributions to open source projects.

* What is a Head in git?
HEAD is a symbolic reference pointing to the currently checked out branch.

* What is the detached HEAD mode in git?
Sometimes the HEAD points directly to a commit object, this is called detached HEAD mode. In that state creation of a commit will not move any branch.

* How to install drupal using git?
Use Git to locally clone the Drupal core Git repository into a new folder
For Ex:
$ git clone http://git.drupal.org/project/drupal.git folder name

* How to list all of available drupal releases using git?
We will list all of the available releases:
First we move on to the drupal root directory in the command line, then enter the below command
$ git tag -l 7.*
7.0
~
7.1
7.10
7.11
7.12
7.2
7.3
7.4
7.5
7.6
7.7
7.8

* How to checkout latest drupal version using git?
First we should pointing the drupal root directory using command line, then we enter the below command
$ git checkout 7.12

* How to delete git repository?
If you want to delete a Git repository, you can simply delete the folder which contains the repository.



Tuesday, 21 July 2015

Drupal Interview Questions

* What is Drupal Site?
Drupal site can have an unlimited number of content types (for example, blog, web page, forum, products, portfolio, and so on) with an unlimited number of nodes for each content type.


* What is the node in drupal?
A node is single piece of content.
A node has several pieces of information attached to it.
A node belongs to only one content type.
Some pieces you provide when you create a node (such as the title and full text).
Some are generated automatically (such as the date created and node ID).
You can create a menu link to a node.
Add a custom URL path to access the node.
Allow web site visitors to comment on a node.
Save a revision every time you edit a node.


* What is the content type in drupal?
The Content type is a grouping of nodes.
Each content type has its own set of default settings, such as comment settings, publishing options, URL path settings, and more.
Each content type can have its own template.
You can also add fields to content types, such as drop-down lists, check boxes, and image uploads.
Example:
Click the Add content button in the administration toolbar to see the two default content types provided by Drupal.

* What is region in drupal?
A region is a section of the web site, such as a header or sidebar

* What is blocks in drupal?
Content is displayed in various regions of the site through blocks.
The default Drupal web site has two blocks.
You can create a block and add content to it, 
A block can display content from other sources
Blocks have a number of powerful mechanisms to control where and to whom the block is displayed.


* Different types of drupal modules?
There are three different types of Drupal modules:
- A core module is any module that comes pre-packaged with Drupal.
- A contrib or contributed module is any module that is available to download from http://drupal.org/download, and is not part of the Drupal core.
- A custom module is basically any module that is not a core or contrib module.

* What is Drush?
Drush is a very powerful tool that eases the management of a Drupal development environment from the command line.
Drush will automatically take care of enabling all module dependencies
Install Drush on windows:
https://github.com/drush-ops/drush/releases/download/6.0.0/Drush-6.0-2013-08-28-Installer-v1.0.21.msi


* What is Views module in drupal?
The Views module is the most-installed Drupal 7 contributed module.
The Views module offers a very unique way to create custom 'views' of your content that is powerful, flexible, and easier than ever with the new version of Views for Drupal 7.


* How to install views module using drush?
C:\xampp\htdocs\d7dev>drush dl views

* How to install & enable module using drush?

Install Example :
C:\xampp\htdocs\d7dev>drush dl views
C:\xampp\htdocs\d7dev>drush dl html5_tools
C:\xampp\htdocs\d7dev>drush dl microdata

Enable Example:

C:\xampp\htdocs\d7dev>drush en html5_tools
C:\xampp\htdocs\d7dev>drush en microdata

* What is RDFa in Drupal?
Drupal 7 has such a semantic capability baked right into core, and it is called RDFa.

* Are themes saved in the database?
Themes are not saved in the database but live in a separate folder.This means there is a separation between content stored in the database and how content is displayed.

* List of some important module?
- Devel Module
  Url : http://drupal.org/project/devel
  Use : Help us out with content creation for development purposes is the devel_generate module.
  Installation : Installing the Devel Generate content module using drush
  C:\xampp\htdocs\d7dev>drush dl devel
  Enable : To enable devel module using drush
  C:\xampp\htdocs\d7dev>drush en devel_generate

- Html5 Tools
  Url : http://drupal.org/projects/html5_tools
 

Database Interviewtips

* What is database?

A database is a collection of data organized into rows, columns, and tables.