Showing posts with label Interview Questions and Answers. Show all posts
Showing posts with label Interview Questions and Answers. Show all posts

Thursday 9 April 2015

Htaccess interview Questions and Answers for fresher and experienced

Htaccess interview Questions and Answers for fresher and experienced



Question: How to redirect http to https?
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]


Question: How to redirect http:// to https://www?
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]


Question: How to redirect non-www to www ?
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


Question: How to redirect all pages to newdomain?
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com [R=301,L]


Question: What is meaning of R & L flag in htaccess?
htacces R flag causes a HTTP redirect to be issued to the browser and 301 means its permanent redirect.
htaccess L fag causes to stop processing the rule set, if the rule matches, no further rules will be processed.
Also we can set more than 2 flags in brackets []
More flags


Question: How to redirect homepage to another Website?
Redirect / http://www.web-technology-experts-notes.in/


Question: How to redirect to another directory within same domain?
Redirect /olddir /newdir


Question: How to set environment in .htaccess?
SetEnv APPLICATION_ENV development


Question: How to set the php config variables in .htaccess?
php_value upload_max_filesize 32M


Question: How to set display_error off in .htaccess?
php_flag display_errors off
php_flag display_startup_errors off


Question: How to block few IP address?
order allow,deny
deny from xxx.xxx.xxx.xxx #specify a specific address
allow from all


Question: How to redirect to error/404.html when 404 errors comes?
ErrorDocument 400 error/404.html


Queston: How to set the caching for javascript/images/css?
ExpiresActive On
ExpiresByType application/javascript "now plus 3 day"
ExpiresByType application/x-javascript "now plus 3 day"
ExpiresByType image/jpg "now plus 1 week"
ExpiresByType image/jpeg "now plus 1 week"
ExpiresByType image/png "now plus 1 week"
ExpiresByType image/pjpeg "now plus 1 week"
ExpiresByType image/gif "now plus 1 week"
ExpiresByType text/css "now plus 3 day"


Question: what is meaning of 301, 302, 400, 401, 403, 404 and 500 error codes?
301 - Permanent movement
302 - Temporary movement
400 - Bad request
401 - Authorization Required
403 - Forbidden
404 - Page Not Found
500 - Internal Server Error


Question: How does RewriteBase works in .htaccess?
It is used to set a base URL for your rewrites rules.
RewriteEngine On
RewriteBase /~new/


By setting the RewriteBase there in htaccess, you make the relative path come off the RewriteBase parameter.


Question: How to create Subdomains on the fly using .htaccess?
for this, you have set the virtual host
Follow the following steps.
Step 1: Create a wildcard DNS entry
*.domain.com.   3600  A  127.0.0.1

Step 2: Setup the Virtual Host, in vhost file.

<virtualhost> DocumentRoot "E:\wamp\www\myproject" ServerName myproject.domain.com <directory myproject="" wamp="" www=""> AllowOverride All Order allow,deny Allow from all </directory> </virtualhost>

Step 3: Now write your all codes in in Document Root path i.e.E:\wamp\www\myproject
Step 4: Done, now you can access with myproject.domain.com


Question: Do i need to restart the apache after chnages in .htaccess?
No,


Friday 3 April 2015

Ajax Interview Questions and Answer for 1 Year Experienced




Ajax Interview Questions and Answer for Experienced

Question: How to Abort ajax requests using jQuery?
Use abort() function to abort a ajax request.
See Example Below:
var ajaxRequest = $.ajax({
    type: "POST",
    url: "/ajax",
    data: "name1=value1&name2=value2",
    success: function(msg){
       //here success comes
    }
});

//Abort the ajax request
ajaxRequest.abort()

When you abort the ajax call, you can see ajax request as aborted in browser console.


Question: How to redirect a page after success of Ajax call?
You can use window.location.href, to redirect.
See Example Below:
$.ajax({
    type: "POST",
    url: "/ajax",
    data: "name1=value1&name2=value2",
    success: function(msg){
        if(msg.success){
            window.location.href='/newpage.php';
        }
       //here success comes
    }
});



Question: How do I test an empty object?
You can use jQuery isEmptyObject().
See Example Below:
var myArray=new Array();
console.log($.isEmptyObject(myArray));//return true

var myArray=new Array('This is message');
console.log($.isEmptyObject(myArray));//return false


Question: How to submit a form in Ajax?
We can use jQuery ajax function to submit a Form.
See Example Below:
Following is Javascript function
   function onSubmitFunction(){
    $.ajax({
        type: "POST",
        url: "/ajax",
        data: $('#mytestForm').serialize(),
        success: function(msg){
            if(msg.success){
               //here success comes
            }

        }
    });
    return false;
}

Following is HTML Code
<form id="mytestForm" onsubmit="return onSubmitFunction()">
Name: <input name="name" type="text" /><input name="submit" type="submit" value="Submit" />
</form>



Question: How to get the value of textarea?
You can use val function of jQuery to get the text of textarea.
See Below:
console.log($('textarea#idOfTextArea').val());


Question: How to send AJAX call without jQuery?
For sending ajax call in IE7+, Firefox, Chrome, Opera, Safari
XMLHttpRequest
For sending ajax call in IE
use ActiveXObject

See Example Below:
function callAjax(url,method) {
    var xmlhttp;
    if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    } else {
            // code for IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {

                //console.log(xmlhttp.responseText);
            }
        }
    }

    xmlhttp.open(method, url, true);
    xmlhttp.send();
}
callAjax('/ajax?data=1','GET')


Question: How to make all ajax call cache Free?
$.ajaxSetup ({
    // Disable the caching of AJAX responses for all Ajax
    cache: false
});


Question: How to download file?
very simple
window.location="/folder/file.pdf"


Question: How can I add a custom HTTP header in Ajax?
Just Use the header parameter to set the custom header
$.ajax({
    url: '/ajax',
    headers: { 'x-my-custom-header': 'I am good' }
});



Wednesday 1 April 2015

Javascript Interview Questions and Answers for Experienced

Javascript Interview Questions and Answers for Experienced


Question: What is JavaScript closures? Give an Example?
A closure is an inner function that has access to the outer function's variables known as Closure.
 function function1(x) {
  var tmp = 3;
  function function2(y) {
    console.log(x + y + (++tmp)); // will console 7
  }
  function2(1);
}

function1(2);


Question: What is the function of the var keyword in Javascript?
var is used to create the local variables.
If you're in a function then var will create a local variable.
 var x =10;
function function1(){
var x=20;
}
function1();
alert(x); //10 

var x = 10 declares variable x in current scope.
If the declaration appears in a function It is a local variable.
if it's in global scope - a global variable is declared.
 
x =10;
function function1(){
x=20;
}
function1();
alert(x); //20
x=10 declare a global variable.


Question: How can I make a redirect page using jQuery?
 window.location.href = "http://www.web-technology-experts-notes.in/p/sitemap.html";


Question: How can I check if one string contains another substring?
you can use indexOf function,
If string found - It will returns the position of the string in the full string.
If string not found- it will return -1
See Example
 
var haystack = "full-string-here";
var needle = 'string';
if(haystack.indexOf(needle)>=0){
    console.log('String found');
}else{
console.log('String Not found');
}


Question: What is difference between == and === in javascript?
Both are used to check the equality only difference === check with both data type.
For Example
 2=='2' // will return true;
2==='2'// will return false;


Question: Can I comment a JSON file?
No, but you can add a node on root where you can display the information.


Question: How to Check checkbox checked property?
 var checkboxStatus = $('#checkMeOut').prop('checked'); 
if(checkboxStatus){
    console.log('Checkbox is Checked');
}else{
    console.log('Checkbox is Not Checked');
}


Question: How to include a JavaScript file in another JavaScript file?
With use of jQuery, its quite simple, See below:
 $.getScript("my_lovely_script.js", function(){   

});


Question: How to remove single property from a JavaScript object?
var myobject=['Web','Technology','Experts','Notes']
delete myobject['Technology'];


Question: How to add single property from a JavaScript array?
var myobject=['Web','Technology','Experts','Notes']
 myobject.push(' Web Development');


Question: How to empty an array?
var myobject=['Web','Technology','Experts','Notes']
 myobject.length = 0


Question: How to trim string in JavaScript?
You can do in very simple way using jQuery.
See Below:
$.trim('  Web Technology   ');


Question: How do you get a timestamp in JavaScript?
new Date().getTime()


Question: How to use javaScript Loop?
var myobject=['Web','Technology','Experts','Notes']
for (index = 0; index < myobject.length; ++index) {
    console.log(myobject[index]);
}


Question: How to detect an undefined object property in JavaScript?
if (typeof myobject === "undefined") {
    console.log("myobject is undefined");
}


Question: How to validate email address in JavaScript?
function validateEmail(email) {
    var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    return re.test(email);
}
validateEmail('contactuse@web-technology-experts-notes.in'); // Will return true;


Question: How to capitalize the first letter of string?
function capitalizeFirstLetterOfString(string) {
    return string.charAt(0).toUpperCase() + string.slice(1);
}
capitalizeFirstLetterOfString('web-technology-experts-notes'); //Web-technology-experts-notes


Question: How to get current url in web browser?
window.location.href


Question: How can I refresh a page with jQuery?
window.location.reload();



Tuesday 31 March 2015

Paypal Integration Interview Questions and Answers

Paypal Integration Interview Questions and Answers
PayPal is an Online Payments System
Online money transfers serve as electronic alternatives to traditional paper methods like checks and money orders. 
PayPal is one of the world's largest internet payment companies.
From: Wikipedia 



Question: When Paypal was founded?
June 1998


Question: Who is CEO of Paypal?
Dan Schulman


Question: What is offical website of Paypal?
www.paypal.com


Question: In which language paypal is written?
C++, JavaScript


Question: What is PayPal Sandbox?
PayPal sandbox is a testing environment of paypal.com. Developer first create account in Sandbox(https://developer.paypal.com/) and integrate the payment with sandbox. After completing all (including testing), then update the API keys.


Question: What is recurring payment?
When Customer pay fixed amount on a regular basis to the merchant is know as recurring payment. For Example: You buy a home and pay some amount on regular basis to bank for x months.


Question: What is Website Payments Standard?
Accept online payments from customers with with OR without PayPal accounts.
In this website, accept credit/debit cards (Visa, MasterCard, American Express and Discover), eChecks, bank transfers, and PayPal accounts.


Question: Is it compulsary to create paypal account for customer, when doing payment with paypal.com?
No, Customer can pay with credit/debit card on paypal.com. He have option to paypal account.


Question: Does paypal support mulitple language?
Yes.


Question: Can we customize the checkout page on paypal.com as per requirement?
Yes, You can customize the logo, item detail and description etc by passing some optional parameter.


Question: What is Paypal Pro Account?
When you want customer must do payment on your website (customer never leave website OR Never redirect to paypal.com) with credit card/debit card.



Question: Can I create payment buttons using an paypal API?
Yes


Question: Does paypal support payment by Mobile?
Yes, https://developer.paypal.com/webapps/developer/docs/classic/products/#mobile


Question: What is PayPal Express Checkout?
PayPal Express Checkout is a powerful API-based solution that can be integrated into any merchant website. With PayPal Express Checkout API, customer leave the merchant website and complete the transaction in paypal.com, where customer can pay with paypal.com OR with credit card / Debit card. When start processing, Paypal gives a TOKEN key which is used to charge money from customer OR get the Payment Details OR Customer Shipping/Billing details. Developer should save this token key for future use. Read More


Question: What is Paypal Adaptive Payment?
Paypal Adaptive Payments is feature of Paypal Pro means you must have Paypal pro account for use this payment method. In this customer can pay with Credit Card/Debit Card/Paypal.com account. While paying with Credit card/Debit card he can also create a account in paypal.com. Adaptive payments handles payments between a sender and one or more receivers. Read more


Question: What are two different types of Adaptive Payment?
  • Adaptive Parallel Payment
  • Adaptive Chain Payment



Question: What is Do-Direct Payment?
Direct Payment lets buyers pay using their credit cards and amount is directly transferred to merchant account.


Question: What is MayPay Payment?
Merchant can send the money to two or more personal in single transaction.


Question: How to create paypal buy now button on paypa.com?
http://www.web-technology-experts-notes.in/2013/02/paypal-buy-now-button.html


Question: What is notify URL in PayPal?
When we send our customer to paypal.com for payment. We send notify_url=http://www.mysite.com/notify_url.php along with price and item detail.
After completing the process PayPal returns data back to our site via what they call IPN (Data is send to the notify_url with post method). Now we save this all data in our database for further inquiry.


Question: What is paypal cancel url?
An mywebsite URL where the user will be returned if payment is cancelled by customer on paypal.com.
Cancel URL send as below:
CANCELURL=http://www.mysite.com/cancel_url.php


Question: Do website need SSL for accepting payments?
Yes, you must have SSL Integration in website.


Question: What are basic information which you must pass to the paypal for every transaction.
Following are different parameter which we must pass.
  • USER
  • PWD
  • SIGNATURE
  • VERSION
  • METHOD
  • PAYMENTACTION



Question: How to add button to get payments?
https://www.paypal.com/cgi-bin/webscr?cmd=_wp-standard-integration-outside#sectiona


Question: From where I can create Sandbox Account?
https://developer.paypal.com/




Monday 30 March 2015

Android Interview Questions and Answers for Freshers



Question: What is Android?
Open source operating system used for smartphones and tablet computers.


Question: In which languages Android is written?
C, C++, Java


Question: What is Initial release date?
September 23, 2008


Question: What is Latest release of Android?
Version: 6.0.1 "Marshmallow"
Date: December 09, 2015


Question: What is offical website of Android?
http://www.android.com


Question: Who are Inventors of android?
Andy Rubin, Rich Miner, Nick Sears


Question: What are Features of Android OS?
  • Live wallpaper
  • Camera
  • Messaging
  • Music
  • Alarm
  • Bluetooth
  • WIFI
  • Web Browsing



Question: What are Advance Features of Android OS?
  • Google now
  • NFC (Near Field Communication)
  • Use phone by joystick
  • Connect your phone with LED TV via MHL or micro HDMI cable
  • Screen Capture
  • Unlock your phone by your face
  • Multitasking
  • Data Usages



Question: Tools Required for Developing Android Apps?
Java Development Kit (JDK)
Android Development Tools (ADT)
Software Development Kit (SDK)


Question: What is Full form of JDK?
Java Development Kit


Question: What is Full form of ADT?
Android Development Tools


Question: What is Full form of SDK?
Software Development Kit


Question: What is full form of AIDL?
Android Interface Definition Language


Question: What is full form of ANR?
Application Not Responding


Question: What are Advantages of android?
Open-source
Platform-independent


Question: What language you should know to develop android application?
Java
XML


Question: What is Activities?
Activity is a single, focused thing that the user can do.
When ever user click on GUI the next Activity will be start and new GUI set base on coding.


Question: What is AVD?
Full form of AVD is Android Virtual Device (emulator).
Android SDK includes a mobile device that is know as virtual device.


Question: Can you deploy executable JARs on Android? Which packaging is supported by Android?
No


Question: Where can you define the icon for your Activity?
In manifest file.


Question: Where will you declare your activity so the system can access it?
In manifest file.


Question: How will you pass data to sub-activities?
Use Bundles to pass data to sub-activities.


Question: What is an Action?
Action in Android is something that an Intent sender wants to complete.


Question: Can we change the name of an application after its deployment?
Not recommended.


Question: How can two Android applications share same Linux user ID and share same VM?
To do this must sign with the same certificate.


Question: Explain about folder structure in Android development.
Following are different folder in Android
src: Contains the .java source files for your project.
gen: This folder contains the R.java file. It is compiler-generated file that references all the resources found in your project.
Android 4.0 library: This folder contains android.jar file, which contains all the class libraries for an Android application.
assets: This folder contains all the information about HTML file, text files and databases etc.
bin: It contains the .apk file (Android Package).
res: This folder contains all the resource file that is used by android application.


Question: What is Intents in android?
An Android application can contain zero or more activities. If you want to navigate from one activity to another then android provides you Intent class and these class are available inandroid.content.Intent package.


Question: What are the key components of Android Architecture?
  • Linux Kernel
  • Libraries
  • Android Framework
  • Android Applications


Question: What is an Explicit Intent?
Explicit intent specifies the particular activity that should respond to the intent.


Question: When does onResume() method called?
onResume is called when activity come to foreground.


Question: What are the different storage methods in android?
  • Internal Storage
  • External Storage
  • Shared Preferences
  • SQLite Databases


Monday 9 March 2015

Ajax Interview questions and answers for experienced


Ajax interview questions and answers for experienced
Ajax is a client-side script that communicates with server without refresh the complete page. You can also say "the method of exchanging data with a server, and updating parts of a web page without reloading the entire page". Ajax is used in all web-technology like PHP, ASP, Java and Mobile Technology etc.



Question: What is Ajax?
AJAX (Asynchronous JavaScript and XML) is a client-side script which is used to get the data from Server.


Question: Why Ajax is used?
Ajax is used to get the data from server without refreshing the current page.


Question: When we can use Ajax? Give Few Examples?
Ajax can be used to get the data from Server when you don't want to refresh the page. See Below Scenario:
  • In Registration Page, check the username is available OR NOT.
  • In Registration page, check email address is already taken OR NOT.
  • In Product Listing page, when user click on "Next" under pagination, you won't want to show the next page data without refreshing the page.


Question: What files need to install to use Ajax in Website?
Initially, no files required to use the ajax in your website.
But to manage your ajax call in better way, you can use JS library which world used to use.


Question: What js library are available to use the Ajax?
Following are few JS library which are used for Ajax
  • JQuery
  • MooTools
  • Prototype
  • YUI Library
  • Backbone js


Question: What Browsers support Ajax?
Today, All the Browser support ajax. Following are minium version of browser which support Ajax.
  • Internet Explorer 5.0 and up,
  • Opera 7.6 and up,
  • Netscape 7.1 and up,
  • Firefox 1.0 and up,
  • Safari 1.2 and up,



Question: How Ajax Works?
How Ajax Works











Question: What is XMLHttpRequest?
XMLHttpRequest is an API available to web browser scripting languages (i.e. JavaScript).
It is used to send HTTP/HTTPS requests to a web server and load the server's response into the script.


Question: How we can send data to server using Ajax?
We can use GET OR POST Method to send data.


Question: What is Asynchronous in Ajax?
We can set the Asynchronous value as true OR false.
Async=true
Ajax request execute independently, Its response can come earlier than other request which is execute later .
Async=true
Ajax request does not execute independently, Its response can comes when earlier request finished.


Question: What do the different readystates in XMLHttpRequest?
Following are different stats(0-4) of ready state in XMLHttpRequest
0 Ajax Request not initialized
1 Ajax Request's server connection established
2 Ajax Request received
3 Ajax Request processing
4 request finished and response is ready.


Question: Can I send Ajax Request to another domain?
No, you can't do this.


Question: What are advantage of AJax?
  • Its faster as it load only required content.
  • More user friendly.
  • One page application possible due to Ajax.
  • Reduce the loading of page.


Question: What are disadvantage of Ajax?
It does not crawl to search Engine.


Question: Define JSON?
JSON is JavaScript Object Notation.


Question: What type of response we can get in Ajax Response?
  • text data
  • html data
  • JSON data
  • XML data



Question: Describe how to handle concurrent AJAX requests?
JavaScipt Closures can be used for handling concurrent requests.



Question: How do you know that an AJAX request has completed?
If readyState's value is 4 means its completed.




Saturday 28 February 2015

HTML5 interview Questions and Answers for Fresher and Experienced

HTML5 interview Questions and Answers for Fresher and Experienced
HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. 

As of October 2014  this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.

From- http://en.wikipedia.org/wiki/HTML5



Question: What is file extension of HTML5?
.html


Question: What is initilize date of Html5?
28 October 2014


Question: What are the new features in HTML5?
Following are new features in HTML5
Local storage.
New form controls like calendar, date, time, email, URL and search etc.
canvas element is provided for 2D drawing.
video and audio elements for media playback.
New elements are provided. For e.g. article, header, footer, nav, section.


Question: What are the various elements provided by HTML 5 for media content?
audio - It defines sound content.
video - It defines a video.
source - This tag defines the source of video and audio.
embed - It provides a container for an external application.
track - It defines text tracks for videoand audio.


Question: What are the new Form elements made available in HTML5?
datalist - It specifies a list of options for input controls
keygen - This tag defines a key-pair generator field.
output - It defines the result of a calculation.


Question: What are the various tags provided for better structuring in HTML5?
article - This tag defines an article.
aside - It defines content other than the page content.
bdi - This tag isolates a part of text for formatting.
command - It defines a command button to be invoked by the user.
details - It defines additional details that can be viewed .
dialog - It defines a dialog box.
figure - This tag specifies content like illustrations, diagrams, photos, code listings etc.
figcaption - It is used to provide a caption for a figure element .
footer - This tag defines a footer for a document or section.
header - This tag is used to define a header for a document .
hgroup - When there are multiple levels in a heading, it groups a set of h1 to h6 elements.
mark - It defines highlighted text.
meter - It defines a scalar measurement within a known range.
nav - It defines links for navigation.
progress - This tag exhibits the progress of a task.
ruby - It defines a ruby annotation for East Asian typography.
rt - It defines an explanation/pronunciation of characters for East Asian typography.
rp - This tag tells the system what to display in browsers that do not support ruby annotations.
section - It defines a section in a document.
summary - It provides a visible heading for a details element.
time - This tag defines a date/time.
wbr - This tag defines a line-break.


Question: What is SVG?
SVG is the abbreviation for Scalable Vector Graphics and is recommended by W3C.
It is used to define vector-based graphics for the Web


Question: What is a Canvas? What is the default border size of a canvas?
Canvas is a rectangular area on a HTML page, specified with the canvas tag.
By default, It has no border. To get a border style attribute can be used.


Question: Differentiate between Canvas and SVG?
Canvas is resolution dependent while SVG is not.
Canvas does not provide any support for event handlers while SVG does provide the support for event handlers.
Canvas is suitable for graphic-intensive games while SVG is not suitable for gaming.
Canvas is suitable for small rendering areas while SVG is suitable for large rendering areas like Google maps.


Question: HTML 5 provides drag and drop facility. How do you make an image draggable?
<img draggable="true" />

Question: What is HTML5 Web Storage?
It store the data locally in the user's browser


Question: Differentiate between session Storage and local Storage objects?
Session Storage object stores the data only for one session while local Storage object stores the data without an expiry date.


Question: What is a Manifest file?
A Manifest file is a simple text file that tells the browser what to cache and what not to cache.


Question: What is a Web Worker?
A web worker is a JavaScript which runs in the background.


Question: What is the purpose of HTML5 versus XHTML?
HTML5 is the next version of HTML 4.01, XHTML 1.0 and DOM Level 2 HTML. Its aim to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as Adobe Flash, Microsoft Silverlight etc.


Question: WHAT are some other advantages of HTML5?
Cleaner markup than earlier versions of HTML
Additional semantics of new elements like header, nav, and time


Question: What is the !DOCTYPE? Is it mandatory to use in HTML5?
The !DOCTYPE is an instruction to the web browser about what version of HTML the page is written in. The !DOCTYPE tag does not have an end tag. It is not case sensitive.



Question: What are various tags which are not available in HTML5?

acronym
applet
basefont
big
center
dir
font
frame
frameset
noframes
strike
tt




Question: How to link an email address?
<a href="mailto:myemialid@wten.in">Email Me</a>





Friday 27 February 2015

SAML Interview Questions and Answers

Security Assertion Markup Language (SAML, pronounced sam-el) is an XML-based, open-standard data format for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider.

SAML is a product of the OASIS Security Services Technical Committee.

From: http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language




Question: What is full form of SAML?
Security Assertion Markup Language


Question: What is SAML?
SAML is XML based data format for exchanging authentication and authorization information between two domains.


Question: Is it Open Standard?
Yes, It is.


Question: Why SAML is designed?
It is designed for Authentication and Authorization to business-to-business (B2B) and business-to-consumer(B2C) clients.


Question: What are three assertions in SAML?
Authentication, Attribute, Authorization.


Question: What is Difference between Authentication, Attribute and Authorization?
Authentication validates the user's identity whether user is valid OR Not.
Attribute assertion contains specific information about the particular user.
Authorization identifies whether user have specific permission or not, after the successful authentication.


Question: With which protocol SAML works?
  • Hypertext Transfer Protocol (HTTP)
  • Simple Mail Transfer Protocol (SMTP)
  • File Transfer Protocol (FTP)
  • BizTalk
  • Electronic Business XML (ebXML)


Question: What is latest Version of SAML?
SAML 2.0 became an OASIS Standard in March 2005.


Question: What is differences between V2.0 and V1.1?
SAML 2.0 and SAML 1.1 are substantial. Although the two standards address the same use case, SAML 2.0 is incompatible with its predecessor.


Question: What are Main Features of SAML?
Following are main features of SAML
  • Seamless integration
  • Exchange of information among different security domains
  • Backoffice Transaction.
  • Single-Sign-On – user's ability to authenticate in one security domain and to use the protected resources of another security domain.
  • XML-based framework for security-related sharing information over Internet.
  • Question: What is similar between OpenID and SAML? SAML2 and OpenID are for authentication/Authorization


Question: What is the difference between OpenID and SAML?
Following are difference between OpenId and SAML

  • SAML2 supports single sign-out but OpenID does not support single sing out.
  • SAML2 has different bindings while the only binding OpenID has is HTTP.
  • SAML2 can be Service Provider (SP) OR Identity Provider (IdP) initiated. But OpenID always SP initiated.
  • SAML 2 is based on XML while OpenID is not.



Tuesday 6 January 2015

Backbone Js interview questions and answers

Backbone Js interview questions and answers


Question: What is backbone Js?
It is JavaScript framework which helps to write the code in organize way and reduce the development time by providing lot of inbuilt functions. It also support MVC (Model, View, Controller). Its data binding framework.



Question: What is initial release date of backbone JS?
October 13, 2010



Question: What is current Stable Version and Release date?
1.3.2 / March 12, 2016



Question: In which language, backbone JS is writeen?
javaScript



Question: What is offical URL of Backbone JS?
http://backbonejs.org/



Question: What are main components of Backbone Js?
  • Model
  • View
  • controller
  • Router
  • Event class object


Question: What is Model in Backbone JS?
We use Model for retrieves the data from server.



Question: What is View in Backbone JS?
We use View for representation of HTML.



Question: What is controller in Backbone JS?
We use controller for writing application logic.


Question: What is Collection in Backbone JS?
Set of models are represented by collections.



Question: What is Router in Backbone JS?
application want to change their URL fragment.


Question: What is Model in Event class object JS?
events is a module that can be mixed in to any object.



Question: What are the three js files that you require to setup backbone Js?
  • jQuery
  • Backbone
  • Underscore


Question: What is the function of toJSON?
toJSON is used for persistence, serialization and for augmentation before being sent to the server.



Question: What are the configuration options available?
  • InitialCopyDirection
  • modelSetOptions
  • change Triggers
  • boundAttribute
  • suppressThrows
  • converter



Question: What are the keypoints of Backbone?
It has hard dependency with underscore.js to make it more functional and supporting.
With jQuery it has a soft dependency.
When the model changes it can update the HTML of your application automatically.
Significantly clean and elegant way for DOM manipulations and UI updates


Question: What is Backbone.sync?
When Backbone wants to save or read a model to the server it calls out a function called as Backbone.sync

Wednesday 31 December 2014

Bootstrap Interview Questions and Answers for Experienced

Bootstrap is Javascript framework which is used for building the rich web applications with minimal effort.Bootstrap, a sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development. Current Version of Bootstrap is v3.3.1. You can download from http://getbootstrap.com/.






Question: Who developed the Bootstrap?
Mark Otto and Jacob Thornton at Twitter


Question: What are the key components of Bootstrap?
  • Plenty of CSS files
  • Scaffolding
  • List of layout components
  • JavaScript Plugins
  • Customize your components


Question: Why Use Bootstrap?
  • Easy to use
  • Responsive features
  • Mobile-first approach
  • Browser compatibility
  • Fluide & Fixed Layout available


Question: From where we can download the Bootstrap?
http://getbootstrap.com/



Question: Can we include bootstrap CDN instead of download the Bootstrap?
Yes sure, we can do from following
<!-- Latest compiled and minified CSS -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"></link>
Question: What is class loaders in Bootstrap?
Class loader is a part of Java Runtime Environment which loads Java classes into Java virtual environment.



Question: What are different types of layout available in Bootstrap?
  • Fluid Layout
  • Fixed Layout



Question: What is Fluid Layout in Bootstrap?
Fluid layout adapts itself to different browser. Means design automatic adjust according to browser size.


Question: What is Fixed Layout in Bootstrap?
Fixed layout doesn't adapts itself to different browser but it can be responsive.



Question: What is responsive layout?
Responsive layout which is able to adapt itself to different sizes as well, but when resizing, the number of columns changes according to the available space.



Question: What is difference between Fluid Layout and responsive Layout?
Fluid layout adapts itself to different browser window sizes, all the values used are calculated proportionally to the viewport size, so when resizing, all the columns are resized.

Responsive layout is able to adapt itself to different sizes as well. When resizing, the number of columns changes according to the available space.



Question: What function you can use to wrap a page content?
.container 


Question: How to classified pagination in bootstrap?
Add class "pagination" on your page for pagination.
.disabled, .active are available
.pagination-Ig, .pagination-sm to get different sizes



Question: What is Jumbotron?
Jumbotron is used for content that you want to highlight like some slogan OR marketing headline.


Question: What to display code in bootstrap?
you can use following tags
<code></code>



Question: What is Modal plugin used for in Bootstrap?
Modal Plugin is a child window that is layered over its parent window


Question: What is Bootstrap Container in Bootstrap?
Bootstrap container is a class which is useful and creating a centred area in the page for display.


Question: What is Bootstrap collapsing elements?
Bootstrap collapsing elements enables you to collapse any element without using external JavaScript.


Question: How to add badge to list group in Bootstrap?
<span class="badge"></span> in LI Tag



Question: What is Media Object?
Media objects in Bootstrap enables to put media object like image, video or audio


Question: What are different types of Media Object?
.media
.media-list


Question: What is Bootstrap well?
Bootstrap well is a container which makes the content to appear sunken.



Question: What are current Stable version of Bootstrp
Version: 3.3.7, Dated: July 25, 2016

Question: In Which language Bootstrap is written?
HTML, CSS, LESS, Sass and JavaScript