Skip to main content

Posts

Showing posts from May, 2018

Jenkins address already in use on Linux

Problem : Address already in use in Jenkins. ava.io.IOException : Failed to start Jetty at winstone.Launcher. < init > (Launcher.java : 156 ) at winstone.Launcher.main(Launcher.java : 354 ) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java : 62 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java : 43 ) at java.lang.reflect.Method.invoke(Method.java : 497 ) at Main._main(Main.java : 294 ) at Main.main(Main.java : 132 ) Caused by : java.net.BindException : Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java : 437 ) at sun.nio.ch.Net.bind(Net.java : 429 ) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java : 223 ) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java : 74 ) ...

Angular 2 with NPM hello world

Step 1 : Installing Nodejs To access to the Node Package Manager (NPM) and run our server, we need to first install Nodejs. You may already have it installed. To check whether it's installed, visit your console and type: node -v If it goes unrecognized, you will need to visit Nodejs.org and visit the downloads page. Choose the installer appropriate for your OS, and install it. Once complete, reload your console/command line, and re-run the This time it should provide you with the version installed. Step 2: Installing Angular We're going to use the Angular CLI to create our Angular app. Let's install it at the command line through NPM. npm install @angular/cli -g     Give it some time to install once installed go into the any folder where you prefer to store your projects and then run the following command: ng new mean cd mean Once you're in the new project folder, we're going to run a command with the A...

Constructor in 5 mins

Q. What is constructor. Constructor is a special member function which has same name as class name and called whenever the object of that class is created. Q. What are the properties of constructor  Constructor has following properties: Constructor has same name as class name. It is used for initializing variables of class. It is called whenever object of class is created. It does not have return type, not even void. It can have parameters. Q. How many types of Constructors are there. Default Constructor        -->  public Message() No-arg  Constructor        -->   public  Message() Parametrized Constructor      -->    public Message( String str) Copy Constructor                                 Q. What are rules for writing Constructor: Constructor(s) of a ...