Thursday, October 29, 2015

Materials and Components

1.Which capacitor-store higher amount of energy?
Air capacitor Paper capacitor Mica capacitor Plastic film capacitor

2.In paramagnetic materials
permanent magnetic dipoles exist but the interaction between neighbouring dipoles is negligible permanent magnetic dipole do not exist permanent magnetic dipoles exist and the interaction between neighbouring dipoles is very strong permanent magnetic dipole moment may or may not exist

3.The core of a coil has a length of 10 cm. The self inductance is 8 mH. If the core length is doubled, all other quantities remaining the same, the self inductance will be
32 mH 16 mH 8 mH 4 mH

4.Two materials having temperature coefficients of 0.004 and 0.0004 respectively are joined in series. The overall temperature coefficient is likely to be
0.08 0.04 0.001 0.0001

5.The number of valence electrons in pentavalent impurity is
5 4 3 1

Wednesday, October 28, 2015

AngularJS Questions and Answers

8) List out the differences between java Script and angular JS expressions?
Below are the list of differences between java script and angular JS
  • In Javascript expressions are being evaluated from the global window whereas in angularJS it is being evaluated from scope object.
  • Conditions, Loops and Exceptions are not supported in AngularJS as in Javascript.
9) Explain controller in AngularJS?
Controller is constructor function in AngularJS. Controller can be attached to DOM using “ng-controller” attribute.
10) Which and all browsers support AngularJS?
All major browsers like – Chrome, Safari, Firefox, Opera 15+, IE 9+ will support AngularJS.
11) How AngularJS is used to handle the security hurdles?
Below are the list of security hurdles handled by AngularJS –
  • Used for preventing CSS attacks
  • Used for preventing XSRF protection
  • Used for preventing HTML injection

Tuesday, October 27, 2015

JQuery Interview Questions and Answers

9) How to show the alert message on button click in Jquery?
Jquery is one of the most powerful libraries what we have and it provides event handling. This scenario can be handled by “OnClick” of the button. Below is the code snippet –
<input type=”button” id=”myButton” onclick=”alert(‘Hi’)” />
10) What is the meaning of Selectors in Jquery?
In javascript we have several methods to find the controls like – “getElementByName” and “getElementByID”, which is used to find the control based on Name of the control and ID of the control respectively. Similarly in Jquery we have find the controls using selectors. Below are some of the selectors -
  • “*” - To Find all the elements of the page.
  • “#” – Used to find the control by ID.
  • “.” - Used to find the control by Class.
11) In ASP.NET, Jquery will be added in Content and Master pages both?
No. If the Jquery file added in master page then content pages will going to use that.
12) What is the advantage of using minified version of Jquery?
Advantage of using minified verison of Jquery will mainly be performance. Size of the minified jquery file will be around 76KB where as the normal Jquery file size will be around 180KB.
13) Can you give an example of selecting an element based on its class name ?
Below is the sample code snippet –
$(‘.MyControl’).Hide()
14) What are the difference between “Length” and “Size” in Jquery?
Both are used to find number of elements in an object. “Length” will be used commonly because it’s faster compared to “size” because “length” is a property and “size” is a method.
15) How can we set the page title in Jquery?
Below is the code snippet used to set the page title -
$(function(){
$(document).attr(“title”, “A4 Academics”);
});
16) What is the use of Jquery Connect?
Connect method is used to bind one function to another and it’s used to execute the function when a function is executed from another object.
17) How to use AJAX in Jquery?
Jquery supports AJAX calls, below is the code snippet of AJAX in Jquery –
$.ajax({
url: ‘MyURL',
success: function(response) {
//My Code goes here
},
error: function(err) {
//My Code goes here }
});

Monday, October 26, 2015

HTML/HTML5 Interview Questions and Answers

11) How to use <form> in HTML?
Below is the syntax of <form> in HTML form –
<form action="[URL]">
When form is submitted then form data has been sent to URL, which is specified in the URL attribute. URL is referred to server side program.

12) What is hyperlink in HTML?
Hyperlinks can be used in images and for texts. Below is the examples of using hyperlinks –
<a href=”My URL “>…</a>
13) Explain <ul> in HTML?
In HTML <ul> defined for unordered list. <li> tags will be used along with <ul>.
<ul>
<li>Add</li>
<li>Subtract</li>
<li>Divide</li>
</ul>
14) Explain type and value attributes of <li> in HTML?
Type attribute in <li> is used to specify the style of bullet point of an item in list.
Value attribute in <li> tag is used to set the value of list item in list.
Syntax for type and value of <li>
<li type="a">Add</li>
<li value="100">Add</li>
15) How to set the focus to the element in HTML?
Below is the sample code to set the focus for HTML element –
<input type="text" id="mytestinput" name="mytestinput" ...>
<script type="text/javascript">
document.myform.mytestinput.focus();
</script>

Sunday, October 25, 2015

Javascript Interview Questions and Answers

11) What is “SetTimeOut” function in javascript?
“SetTimeOut” function is used to call the function given as a parameter after some time delay. Below is the javascript code for the same –
setTimeout(function(){ alert("Text to Show"); }, 5000);
12) What is “SetInterval” function in javascript?
“SetInterval” function is used to call the function (given as a parameter) repeatedly after some time delay. Below is the javascript code for the same –
setInterval (function(){ alert("Text to Show"); }, 5000);
13) What is “ClearInterval” function in javascript?
“ClearInterval” function is used to clear the time set from function – “SetInterval()”.
14) How to give comments in javascript?
  • For single line comment – “//”
  • For multi-line comments – “/* */”
15) Why to use “===” operator in javascript?
“===” operator is called strict operator and it returns true when both the values are same and returns false when the values are not same.

Thursday, October 22, 2015

AngularJS Questions and Answers

1) What is AngularJS?
AngularJS is developed by Google and it is an open source framework and it is used to create one page web apps or single page application using JavaScript, HTML and CSS.
2) What are the uses of AngularJS?
Below are the uses of AngularJS –
  • It uses MVC pattern.
  • Allows to create our own directive for making components reusable. 
  • Used for two way binding i.e, connecting model and view.
  • Supports Dependency Injection (DI)
3) Explain the features of AngularJS?
Below are the list of AngularJS features –
  • Model
  • View
  • Controller
  • Scope
  • Data Binding
  • Services
  • Filters
  • Directives
  • Testable
4) Explain scope in AngularJS?
Scope will act like a glue between view and controller and scopes are arranged in hierarchical structure

Wednesday, October 21, 2015

JQuery Interview Questions and Answers

1) What is Jquery?
Jquery is javascript library and it is used for HTML DOM access (manipulating and traversing of HTML DOM elements). It provides most powerful feature of event handling as well.
2) Explain we can use Jquery?
Jquery can be used along with other libraries. It works with simple and complex javascript and AJAX.
3) How we can use Jquery in ASP.NET?
We can use Jquery by downloading the jquery and use it in our project or can use CDNs available from Google, Microsoft and give the CDN URL in ASPX page.
4) Explain difference between Jquery and Javascript?
Jquery is a library and Javascript is a language and Jquery provides full-fledged support for javascript language.

Tuesday, October 20, 2015

Javascript Interview Questions and Answers

1) What is Javascript?
Javascript is a client side scripting language which is understood by the browsers and will be added in the HTML code.
2) Explain Javascript Types?
Below are some javascript types –
  • Boolean
  • String
  • Number
  • Null
  • Object
  • Function
  • Undefined
3) Why to use NaN in javascript?
“NaN” function is used check the number in the argument. If it does not contain number then it will return true else it will return false.
4) Explain negative infinity?
“Negative Number” is a number which is obtained from dividing the negative number by zero.
5) Can javascript code be broken into multiple lines?
Yes it is possible to break the javascript code to multiple lines using backslash ‘\’.
Eg: document.write(“My Test \a Content”);

BENGALURU COUNCIL OF SCIENTIFIC & INDUSTRIAL RESEARCH FOURTH PARADIGM INSTITUTE Advt. No. 4PI/03(02)/2015 LOOKING FOR BRIGHT YOUNG RESEARCHERS

COUNCIL OF SCIENTIFIC & INDUSTRIAL RESEARCH FOURTH PARADIGM INSTITUTE 
Bengaluru 560 037 


Advt. No. 4PI/03(02)/2015 LOOKING FOR BRIGHT YOUNG RESEARCHERS 

CSIR-4PI looking for well qualified Project Fellows. and a Research Associate In various disciplines.

Applications are invited from B E B Tech / M E M.Tecti / MCA / MSc / PhD degree holder (in various discipline) for these temporary Positions.

For more details, please Visit our website www.csir4pi.in .

More Details : http://www.cmmacs.ernet.in/images/Advt4PI.pdf

Completed applications in the prescribed format must be submitted by email only to recruit@csir4pi.in

CLOSING DATE FOR RECEIPT OF COMPLETED APPLICATIONS: 10th  Nov. 2015.

Monday, October 19, 2015

HTML/HTML5 Interview Questions and Answers

1) What is HTML?
HTML (HyperText Markup Language) is a markup language for web pages. So HTML will have HTML elements, which is enclosed in angular brackets.
2) What are tags in HTML?
Tags are content in HTML to format the HTML properly. It uses symbols like “<” and “>” to enclose the tags. “/” symbol is used for closing the tag.
3) What is XHTML?
XHTML will follow XML rules. So it means it is a case sensitive. HTML pages can be changed to XHTML. So during this process we have to find the images, line breaks etc. to include the closing tags. XHTML is compatible with XML.
4) What is DHTML?
DHTML is a combination of HTML and client side scripting languages like – javascript, css etc. Good example for this would be navigation menu in web page.
5) How we can insert comment in HTML?
Below is the example for writing the comment in HTML –
<!-- MY SAMPLE COMMENT -->

Sunday, October 18, 2015

Advanced Servlet Interview Questions and Answers

11. What is a servlet event listener?
Listeners are used to perform some logic on trigger of certain events. Listeners are java classes that is used to implement the event handling mechanism. Example for Listener:
  • Listener class can be used for auditing user login information’s.
  • Listener classes can be used to clean up session objects and free memory when user logs off.
12. Classify the type of events in an web application?
There are three kind of events:
  • Servlet Context Events: These are events triggered when there is a change in the ServletContext object.
  • HTTP Session Events: These are events triggered when there is a change in the Session object.
  • Servlet Request Events: These are events triggered when there is a change in the request object.
13. When are events triggered?
The events are triggered under two circumstances:
  • Lifecycle changes: If there is a lifecycle change on the object. For example, when session created (or) initialized (or) destroyed.
  • Attribute changes: Any attribute stored /changed in the session. For example, when a attribute “message” is stored in the session.
14. Who triggers the events?
Whenever one of the changes in lifecycle or attribute happens the events are triggered by the web container which can be captured by listeners to perform a logic.
15. What are the steps to develop a servlet listener?
  • Step 1: Create the listener class. Listener class is done by implementing the required servlet listener interface by a normal java class and overriding all the methods.
  • Step 2: Listener class is registered with the deployment descriptor file.

Friday, October 16, 2015

Opening the door to productive interactions among employees

I heard a knock on the wooden panel, and looked up from the email I was drafting, to see a young lady standing hesitantly at the door. She looked vaguely familiar — I thought I had seen her working on the same floor as I did. I looked at her inquiringly. “I’d like to have an open door meeting with you,” she requested politely. She had spoken the magic words — all my attention was centered on her now. I motioned her in and asked her to sit down. But she continued to stand. “This may take some time,” she said, in a slightly apologetic tone. “Is this a good time or should I come later?” I did have a meeting with my leader in the next 15 minutes, so I looked for a free slot in my calendar in the afternoon and scheduled a meeting. She thanked me and left the room. The MNC I worked at actively encouraged employees to avail the Open Door Policy. According to this, any employee of the organisation could have access to any leader in the organisation, even if there was no reporting relationship. An employee could request for an open door meeting with any leader with whom he or she felt comfortable to approach, and voice any concern or suggestion, with complete confidence that he/she would be listened to with respect and without any fear of retribution. It was also emphasised to the leaders that open door concerns/suggestions must be taken to closure — it could never be a case of “out of sight, out of mind”. As I came to the end of the status review meeting with my leader that morning, I touched upon the request for open door session that I had received, just a short time back. Both of us went through a quick re-cap of the Dos and Don’ts for the session, so that I did not miss anything vital. This is what we summed up. Dos: Put the employee at ease Tell the employee that the discussion would be documented Communicate that the discussion would not be kept confidential, it would be shared with HR and other relevant stakeholders as required, to take the concern/ suggestion to closure Assure him/ her that you would get back with steps taken for closure within the stipulated time period Assure him/ her that they need not fear retribution from any quarter in the organisation Don’ts Do not make commitments or promises about the final solution Do not give the employee reason to feel that you think his concern/ suggestion is unimportant or irrelevant Do not delay in taking the next steps, however busy you may be I did have my scheduled meeting with the young lady and we spent nearly 40 minutes discussing her concern. I documented the discussion and submitted it to HR. The nature of the concern required the involvement of other leaders and so there were several rounds of discussions before we arrived at the next steps. I went back to her with the proposed action plan — the solution was not exactly what she had hoped for, but it was very clear to her that her concern had been dealt with in an unbiased manner, and also in line with the organisation’s policies. She accepted this with good grace and we agreed that we would consider the matter closed. In the case of this organisation, Open Door Policy was implemented in letter and spirit. When people moved to leadership roles, they were coached on how open door cases need to be handled. Today, open door culture exists in several organisations, where employees are encouraged to reach out to leaders to foster communication and goodwill between employees and management. However, when this is not backed by an explicit process or guidelines, related concerns cannot be handled in an objective and consistent manner. By having such a policy, an organisation is making a statement that this is not an idea that is just encouraged in theory, but rather is inter-woven into the organisational culture and practised in an effective manner.

The war to attract and retain talent With New Age companies offering fatter pay packets, established organisations are forced to review their staff engagement and reward programmes

As New Age firms dole out fatter salaries to attract the most skilled employees, companies need to strengthen their work environment, increase their staff engagement and reward policies, to hold on to talent. A war of talent is raging between the New Age companies and established organisations. These startups are not only changing the placements scenario in top B-schools, they are also hiring from leading banks and consulting firms by offering fatter pay checks. “Well-funded organisations are offering better salaries and also getting good talent. This is happening in all the New Age industries including e-commerce,” Amit Sinha, VP – business planning and people, of mobile commerce firm Paytm. “The toughest challenge facing most new technology companies these days isn’t getting funded — it’s hiring the best, most skilled employees,” Anjli Jain, founder of mobile app platform Kryptos Mobile, said and added that aggressive venture capital funded IT/ITES startups like Ola and Flipkart were offering fatter salaries, stock options and unique perks to lure and retain the best talent in India. This trend which is happening in the e-commerce and tech startup sector, is not limited to this space only and had also happened in aviation, telecom, insurance, retail and social sector as well a few years ago. “There is definitely an increase in the average salary offered to the employees. As per my understanding, there has been around 30 to 40 per cent increase in average salary. And the biggest reason for this is the aggressive goals of the funded startups combined with the availability of funds,” Aristotle Consultancy co-founder Deepak Dhamija said.

Thursday, October 15, 2015

Advanced Servlet Interview Questions and Answers

1. How to set values in HTTP Session?
We can set values in session object using setAttribute() method of the HTTPSession interface.
HTTPSession session = request.getSession();
session.setAttribute(String attributeName, Object value);
Let's take a web mail application where user Name and location are stored.
HTTPSession session = request.getSession();
session.setAttribute(“User”,”Tim”);
session.setAttribute(“Location”,”Bangalore”);
2. How to retrieve attributes from session?
We can retrieve attributes from the session object using getAttribute() method of the HTTPSession interface.
HTTPSession session = request.getSession();
Object var = session.getAttribute(String attributeName);
Taking a web mail application where user Name and location are stored and retrieving the values.
HTTPSession session = request.getSession();
String userName = (String)session.getAttribute(“User”);
String location = (String)session.getAttribute(“Location”);
3. How to remove attributes from session?
Values can be removed from the session object using removeAttribute() method of the HTTPSession interface.
HTTPSession session = request.getSession();
session.removeAttribute(String attributeName);
Example: Taking a web mail application where user Name and location are stored. Assume we need to remove the userName attribute “Tim” from the session, the following API needs to be fired on HTTP request object.
HTTPSession session = request.getSession();
session.removeAttribute(“User”);
4. How to invalidate a session?
Session invalidating is the process of unbinding the session object from the user thereby removing all the previously stored data in the session and freeing the memory. To invalidate a session we call the invalidate() method.
5. When session invalidate() method is used?
This is typically used when user logs off from a web application to free up the memory utilized by the session object.
HTTPSession session = request.getSession();
Session.invalidate();

Wednesday, October 14, 2015

EJB Interview Questions and Answers

8. Explain briefly about the EJB components ?
  • EJB Container : It provides runtime environment for the EJB components and services, such as Life cycle management, connection pooling and security.
  • EJB Component : It is a java class that follows the Enterprise Java Bean specification to implement the business logic of an application. Enterprise Java Bean components are deployed in container and are accessed using the remote and home interfaces of an enterprise bean.
  • EJB Object : Enterprise Java Bean container generates Enterprise Java Bean object, when a client needs to access an instance of the enterprise java bean. The Enterprise Java Bean object acts as an interface between the client and bean instances.
  • Remote Interface : It declares methods, which an enterprise bean provides to clients in order to enable them to perform business operations.
  • Home Object : Home objects are generated by Enterprise Java Bean container. Clients access Enterprise Java Bean objects that are stored at different java virtual machine, using the home object.
Task performed by EJB Object
  • Creating EJB objects
  • Searching EJB Objects
  • Removing EJB Objects
EJB Interfaces
  • Home Interface : It declares the various life cycle methods that involve operations, such as creating, finding, removing enterprise beans.
  • Local Interface : These are used when the enterprise bean and the client machine are stored in the same JVM.
9. what are the system services provided by EJB container?
Container provides system services such as:
  • Persistence
  • Security
  • Transaction
  • Connection pooling
  • Component lifecycle management
  • Threading
10. Mention the steps to call a remote method in EJB?
  • The client calls a local stub that is an object of the remote interface.
  • The stub marshals the parameters of the message into a form that can be sent over the network.
  • The call is sent over the network connection to the skeleton that is present at the server.
  • The skeleton demarshals the parameter in a form suitable for calling the EJB object.
  • The skeleton calls the EJB object that provides the middleware services, such as transaction and security.
  • The EJB object calls the instance of enterprise bean.
  • The Enterprise bean instance performs the tasks that are defined in the called method.

Tuesday, October 13, 2015

EJB Interview Questions and Answers

1. What is EJB?
Enterprise Java Beans are the server side components that run inside the EJB container and encapsulates the business logic of an enterprise application.
2. What is a J2EE container?
Containers are the interface between a component and the low level platform specific functionality that supports the component. The application server maintains control and provides services through an interface or framework known as a container.
3. What are the types of J2EE container types according to J2EE specification?
There are five defined J2EE container types (three server side and two client side). Three server side containers are as follows:
  • The server itself, which provides the J2EE runtime environment.
  • An EJB container to manage EJB components.
  • A web container to manage servlets and java server pages.
Two client side containers are as follows:
  • An application container for standalone GUIs, console, and batch type programs.
  • An applet container, meaning a browser, usually with the java plug-in.
4. what is a J2EE component and what are its types?
It is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and that communicates with other components. There are three types of components: 
  • Client components, which correlate to the client containers. 
  • Web components - Servlets and JSPs. 
  • EJB components - are business components that run on the server, which is logic that solves or meets the needs of a particular business domain such as banking, retail, or finance.

Monday, October 12, 2015

Servlet Interview Questions and Answers

6. Explain MVC design pattern?
Model-View-Controller (MVC) is a design pattern which divides a software application into three parts namely model, view and controller.
  • A model deals with behavior of the application. It contains the data and business logic of the application. It notifies views and controllers when there is change in its state.
  • A view renders the information to the user so that it looks attractive and appealing. It takes information from the model using which it generates output.
A controller takes input from user and sends command to model or view. It controls the flow of application.
7. Explain the web application directory structure?
web application’s directory structure has document root which contains JSP files, HTML files, JavaScript files and static files such as image files. There is a directory WEB-INF under the document root which contains configuration files related to application. This configuration files can’t be served directly to the client. The WEB-INF directory contains:
  • /WEB-INF/classes/* : It contains compiled class files
  • /WEB-INF/lib/*.jar : It contains different library jar files
  • /WEB-INF/web.xml : It is a deployment descriptor that specify the web application configuration.
8. what are the two packages that deal with servlets?
Servlet API exist in two packages:
  • Javax.servlet: The classes and interfaces in javax.servlet are not protocol dependent. e.g. It can support different protocols like HTTP, FTP.
  • Javax.servlet.http: The classes and interface in this package are specific for requests using HTTP protocol. Some of the classes and interfaces in this package extend those of javax.servlet package.
9. Explain servlet class hierarchy?
  • Interface Servlet: It declares the standaed API’s which all the servlet implementations needs to define. All servlet classes must implement this interface directly or indirectly.
  • Class GenericServlet: It defines a generic, protocol independent servlet. Servlet developed to cater NON-HTTP requests.
  • Class HTTPServlet: Servlet used to cater client HTTP requests.
10. What is Servlet interface?
The Servlet interface is the abstraction of Java Servlet API. It declares the life cycle methods of a servlet. All the servlet classes must implement it either directly or indirectly by extending a class which implements the Servlet interface. E.g. HTTPServlet, GenericServlet.

Sunday, October 11, 2015

Servlet Interview Questions and Answers

1. What is a servlet?
A servlet is a java program that runs within a web server and serves the client request hence the name servlet. Servlets can receive and respond to requests from web clients working on any client-server protocol, but HTTP is predominantly used. Servlet is a server side script technology which can process client request and give back the response.
2. What is a servlet container?
A servlet container is a container for servlets which is responsible for managing the servlets. The main functions are load, initialize and execute servlets to serve client requests. When a request is received, the container decides what servlet to call based on a configuration file. Servlet container comes installed with the web servers. Examples: Tomcat, Glassfish, JBoss.
3. What is CGI?
Common Gateway Interface(CGI) was the most commonly used for server side scripting before the evolution of the java servlet technology. With traditional CGI, a new process is started for each HTTP request eating up more of the CPU cycles thus degrading the performance of the system.
4. What are the advantages of servlet over CGI?
  • When a CGI script is called, a new process is created for each and every client request. But for servlets, each request is handled by a separate thread. Hence, servlet is more efficient because process creation takes more time compared to thread creation.
  • For each new CGI requests, CGI script is copied into memory. But with servlets, there is only one copy across requests and is shared among threads.
  • In CGI multiple process serves concurrent requests. But for servlets, only single instance serves concurrent requests.