Posts

Showing posts from September, 2017

Angular CLI installation and creating sample application

Image
Read this document and follow the steps to install and create Angular CLI sample application. Before installing Angular Cli, we need to install nodejs latest version download from nodejs.org . Click on this link to follow the spets to instal  nodejs To know nodejs installed or not you can execute this commands in the terminal node –v npm –v Once conformed nodejs installed properly. Execute the below command in terminal to install Angular Cli. npm install –g @angular/cli You can get the above command from angular cli website. ( https://cli.angular.io/ ) This will take a while to complete the installation. You will see the below screen once installation completed. To check whether angular cli installed properly or not, go to the terminal and execute the below command. ng -v You will see the below screen as the response of the above command execution. Now we are good to go to work in angular cli. Next, we need to create the angular cli project with the...

Odd numbers in given range of values in java with example

Read this article to know how to find the ODD number in given range of values. The below example, we have taken two Integer values from where to where we need to find the ODD numbers. In general, will identify the EVEN/ODD numbers by modulo(%) operator with 2. If the modulo returned value will be equal to 0 the given number is an EVEN number otherwise ODD number. if (i % 2 == 1 ) The above condition will be true when i value is an ODD number only. First will write the small program to find the number is EVEN/ODD in the given range of the values and the total count of EVEN and ODD numbers. public class EvenOrAOdd { public static void main ( String [] args ) { int l = 2 ,r = 7 ,evenCount = 0 ,oddCount = 0 ; for ( int i = l;i <= r;i ++ ) { if (i % 2 == 1 ) { System . out . println(i + " is ODD number" ); oddCount ++ ; } else { System...

Visual Studio Code installation in Windows 10 for AngularJS

Image
Visual studio code is one of the open source software which will be good to install for AngulaJS 2 practice. Download the Visual Studio from official website  https://code.visualstudio.com/ . Once download completes, click on the isntallable file to Run the downloaded file and click on Yes to windows to start installation. Click on Next button to continue Visual Studio Code installation. Accept the agreement and click on Next button to continue installation. Choose the installation directory if you want to install in any other directory than the normal installation and click on Next button to proceed further installation. Write the shortcut name which you want to see in Start menu and click on Next button to continue further installation. Select the additional tasks which all should perform and click on Next button. Now, Visual Studio is ready for actual installation. Click on Install button to start installation process. You can see the installtion progress in...

Differences between BeanFactory and ApplicationContext

Read this article to know what are the differences between BeanFactory and ApplicationContext in Spring Framework. BeanFactory and ApplicationContext interfaces are acts as IOC container. BeanFactory locates in org.springframework.beans.factory package and ApplicationContext locates in org.springframework.context path. ApplicationContext build on top of BeanFactory. So, ApplicationContext will provide the additional functionalities over BeanFactory. Simple integration with Spring AOP, Message Resource Handling (I18N), Event Propagation and application layer specific context(WebApplicationContext) are additional features available with ApplicationContext. Because of these features ApplicationContext is better to use than the BeanFactory. Instantiation of BeanFactory and ApplicationContext: BeanFactory: BeanFactory will use the XmlBeanFactory() class to instantiate. XmlBeanFactory() will use the Resource object to load the bean configuration file. Resource resource = new ...