All java c# .net servlet jdbc c sqlserver android javascript php wcf clearcase angularjs 2

what is Jenkins?

Jenkins is an open source tool with plugin built for continuous integration purpose. The functionality of Jenkins is to keep a track of version control system and to initiate and monitor a build system if changes occur. It monitors the whole process and provides reports and notifications to alert.

Jenkins is a powerful application that allows continuous integration and continuous delivery of projects, regardless of the platform you are working on. It is a free source that can handle any kind of build or continuous integration. You can integrate Jenkins with a number of testing and deployment technologies. In this tutorial, we would explain how you can use Jenkins to build and test your software projects continuously.

Jenkins is a software that allows continuous integration. Jenkins will be installed on a server where the central build will take place.

Jenkins is a Continuous Integration server.

Basically Continuous Integration is the practice of running your tests on a non-developer machine automatically everytime someone pushes new code into the source repository.

This has the tremendous advantage of always knowing if all tests work and getting fast feedback. The fast feedback is important so you always know right after you broke the build (introduced changes that made either the compile/build cycle or the tests fail) what you did that failed and how to revert it.

If you only run your tests occasionally the problem is that a lot of code changes may have happened since the last time and it is rather hard to figure out which change introduced the problem. When it is run automatically on every push then it is always pretty obvious what and who introduced the problem.

Built on top of Continuous Integration are Continuous Deployment/Delivery where after a successful test run your instantly and automatically release the latest version of your codebase. Makes deployment a non-issue and helps you speed up your development.

There are lots of Alternatives to Jenkins, both standalone and hosted (full disclosure I am the founder of a hosted solution).

What is Continuous Integration?

Continuous Integration is a development practice that requires developers to integrate code into a shared repository at regular intervals. This concept was meant to remove the problem of finding later occurrence of issues in the build lifecycle. Continuous integration requires the developers to have frequent builds. The common practice is that whenever a code commit occurs, a build should be triggered.

why jenkins:

1. Led by Developers for Developers

2. Governance and Community

3. Stability

4. Jenkins is the Primary Platform for Plugins

5. Jenkins is Cloud-Enabled

System Requirements


JDK 1.5 or above


2 GB RAM (recommended)

Disk Space

No minimum requirement. Note that since all builds will be stored on the Jenkins machines, it has to be ensured that sufficient disk space is available for build storage.

Operating System Version

Jenkins can be installed on Windows, Ubuntu/Debian, Red Hat/Fedora/CentOS, Mac OS X, openSUSE, FReeBSD, OpenBSD, Gentoo.

Java Container

The WAR file can be run in any container that supports Servlet 2.4/JSP 2.0 or later.(An example is Tomcat 5).

What is the use of a '0' character?

 It is referred to as a terminating null character and is used primarily to show the end of a string value.

It indicated the end of array character. It is also referred as null character .'\0' is a "null character". It's used to terminate strings in C and some portions of C ++.
It indicated the end of array character.It is also referred as null character.

What is the difference between Session Cookies and Persistent Cookies?

Persistent Cookies are same as Session Cookies except that, persistent cookies have an expiration date. The expiration date indicates to the browser that it should write the cookie to the client's hard drive. Keep in mind that because a user can delete cookies from their machine that there is no guarantee that a cookie you "drop" on a user machine will be there the next time they visit your site.

Session cookies - these are temporary cookie files, which are erased when you close your browser. When you restart your browser and go back to the site that created the cookie, the website will not recognize you. You will have to log back in (if login is required) or select your preferences/themes again if the site uses these features. A new session cookie will be generated, which will store your browsing information and will be active until you leave the site and close your browser. More on session cookies.

Persistent cookies – these files stay in one of your browser's subfolders until you delete them manually or your browser deletes them based on the duration period contained within the persistent cookie's file

Session cookies are stored in memory and never written to disk. When the browers closes the cookie is permanently lost from this point on. If the cookie contains an expiration date, it is considered a persistent cookie. On the date specified in the expiration, the cookie will be removed from the disk.

What are cookies in Angular 2 ? and how to set and get the Local Storage ?

use cookies by doing following changes in system.config.js file and it worked -

  1. Add ng2-cookies to map entry 'ng2-cookies': 'node_modules/ng2-cookies'

  2. Add ng2-cookies to packages entry 'ng2-cookies':{ defaultExtension: 'js' }

Angular 1 has $cookies. Sample:

data => $cookies.put('id_token',data.id_token),

I don't know if Angular 2 has a cookies service, you can always write your own. Check out the mozilla docs. There's a sample 63 line library in javascript for accessing cookies that is partially consistent with localStorage:

data => docCookies.setItem('id_token',data.id_token),

Explain how you can deploy a custom build of a core plugin?

To deploy a custom field of a core plugin, you have to do following things

  • Stop Jenkins
  • Copy the custom HPI to $Jenkins_Home/plugins
  • Delete the previously expanded plugin directory
  • Make an empty file called <plugin>.hpi.pinned
  • Start Jenkins

here are a lot of existing Jenkins plugins, and a lot of people with Jenkins plugin development experience that you can take advantage of!

Check whether there is an existing plugin you can already use, or contribute to, then get in touch via the jenkinsci-dev mailing list, or IRC and explain your plugin idea.
Either we can point you towards an existing plugin, useful APIs, or code snippets that would be helpful.

What folders are importent in android project?

  • AndroidManifest.xml
  • build.xml
  • bin/
  • src/
  • res/
  • assets/

Every Android project structure includes the following list of sub-folders.

1. src
2. gen
3. Android version(such as Android 2.2)
4. assets
5. res

What is Downcasting?

suppose you have a base class, and a class that derives from that base class either directly or indirectly. Then, anytime an object of that base class type is type cast into a derived class type, it is called a downcast.

When reference variable of child cl;ass refers to the object of parent class, it is known as downcasting, viceversa of upcasting. By the real time example i ll explain.

 If you want to give somebody a gift. You can chose from multiple things like pen, jewelry ,keychain etc. Now every item itself is a type of gift.When you give a gift you can chose to give it directly as item itself or as a gift by putting it inside a gift box.Now when we say gift = pen it is correct. But when we want to get a pen inside the gift box, then we need to UNWRAP the gift box like pen = (pen) (from the gift box).Let us see this in terms of the code. We have parent class gift and many children classes like Pen, KeyChain etc as mentioned above.

class Gift { }

class Pen extends Gift { }

So here upcasting means Gift objGift = new Pen() //it is automatic as pen is a gift

But down casting means Pen objPen = (Pen) (objGift) //It is explicit as gift needs to be unwrapped to get the pen inside.

UpCast -> From lower level class type to upper level class type

Downcast -> From upper level class type to lover level class type

Downcasting is assigning parent class reference object to the sub class which is not allowed in Java. However, if you do downcasting, there will not be any compiler error. But, there will be runtime exception in java.lang.ClassCastException.  Downcasting is legal in some scenarios where the actual object referred by the parent class is of sub class.

public class DownCastingExample {

	public static void main(String[] args) {
		SuperClass superClass1 = new SuperClass();
		SuperClass superClass2 = new SubClass();

		//valid downcasting
   SubClass subClass1 = (SubClass)superClass2;
        //Invalid down casting
        SubClass subClass2 = (SubClass)superClass1;

The reason it’s called a downcast is because of the way that inheritance diagrams are normally written – base classes are at the top and derived classes are down below the base classes. So, in downcasting, you are going down the inheritance diagram by taking an object of a base class (at the top), and then trying to convert into the type of one of the derived classes (going down).So,It is the casting from a general to a more specific type, i.e. casting down the hierarchy.

DownCasting is also a kinf of Boxing . Where One Class is created as Reference of the Other Class. For Example class Hotel { } class Room: Hotel { } Here Hotel contains many rooms if (room is Hotel) { Hotel m = (Hotel)room; }

How to register a View in clear case

When you create or update a snapshot view or click a view shortcut in Rational ClearCase Explorer, the snapshot view is registered in your computer registry. The Rational ClearCase integration with Windows Explorer (running in Rational ClearCase Explorer and Windows Explorer) recognizes as Rational ClearCase objects files and directories below a registered snapshot view. If a snapshot view is not registered on your computer and you access files and directories under the view root directory through Network Neighborhood, the Rational ClearCase integration with Windows Explorer does not recognize the files or directories as Rational ClearCase objects. For example, if you use Windows Explorer to navigate to a team member's snapshot view on a different computer and right-click a file in the view, Rational ClearCase options are not available. Also, if you try to perform Rational ClearCase operations from an unregistered snapshot view, the view cannot be found.

When you create a snapshot view, it is registered in the file .ccase_svreg in your home directory. When a snapshot view needs to be accessed, that file in your home directory is searched to find the path for the snapshot view root directory. If you did not create or have not updated the view that is being accessed, you must explicitly register the view.

What are the fundamentals concepts of Angular 2?

To build an Angular 2 application you define a set of components, for every UI element, screen, and route. An application will always have a root component that contains all other components. In other words, every Angular 2 application will have a component tree Application is the root component. The Filters component has the speaker input and the filter button. TalkList is the list you see at the bottom. And TalkCmp is an item in that list.

The below are general concepts that are heavily used:

  • Separation of concern
  • Dependency injection

Those form the basis of any use if Angular. For a little more specificity the below are Angular specific things you should know: 

  • The digest loop
  • Scope
  • Directives
  • Promises ($q)
  • Filters

What is the data provider to communicate sql server data base?

Every DataProvider is providing by the Microsoft as a Base class library (BCL). To communicate Sql server database we have to import a BCL called Using System.Data.SqlClient;

.NET Framework Data Provider for OLE DB

SQLOLEDBMicrosoft OLE DB provider for SQL Server
MSDAORAMicrosoft OLE DB provider for Oracle
Microsoft.Jet.OLEDB.4.0OLE DB provider for Microsoft Jet

The following table lists the data providers that are included in the .NET Framework.

.NET Framework data provider


.NET Framework Data Provider for SQL Server

Provides data access for Microsoft SQL Server. Uses the System.Data.SqlClient namespace.

.NET Framework Data Provider for OLE DB

For data sources exposed by using OLE DB. Uses the System.Data.OleDb namespace.

.NET Framework Data Provider for ODBC

For data sources exposed by using ODBC. Uses the System.Data.Odbc namespace.

.NET Framework Data Provider for Oracle

For Oracle data sources. The .NET Framework Data Provider for Oracle supports Oracle client software version 8.1.7 and later, and uses the System.Data.OracleClient namespace.

EntityClient Provider

Provides data access for Entity Data Model (EDM) applications. Uses the System.Data.EntityClient namespace.

.NET Framework Data Provider for SQL Server Compact 4.0.

Provides data access for Microsoft SQL Server Compact 4.0. Uses the System.Data.SqlServerCe namespace.