Posts

Showing posts from July, 2017

loops in C#

Image
Loops repeat action so you don't have to write same logic again and again. loops helps to execute a line of code repeatedly until it reaches the defined condition. There are various loops in C# programming; i.e., While Loop, Do While loop, For loop, Foreach loop. Let's try to use each of them for a simple example. Let's understand the loop one by one with example. While Loop While loop checks the condition first and then executes the defined line of code, if the condition is true and keeps on executing as long as the condition is true. If the condition is false, it will get out of the while loop. Below we have example to demonstrate the while loop We have defined a static integer array of length 3. We need to print all the items present in the defined array. While loop will continue to print as long as defined var and whileInt is less than the length of int array as whileInt will go on increments of 1, each time the loop executes it. DoWhile Loop

Install PHP on window with IIS

Image
PHP  (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. We can install php via microsoft installer or by manually. Installing PHP on your development PC allows you to safely create and test a web application without affecting the data or systems on your live website. This article describes PHP installation as a module within the Windows using IIS Step 1: Getting PHP You can download window code from  php website . After downloading extract the folder and rename it to php. Now copy and paste it to you C drive . Step 2: Configure php.ini  Open the c:\php folder and search for php.ini-production file in the directory. Rename it to php.ini . This is the main initialization file. Edit this file and search for “ extension_dir ”. Remove the semi-colon and change the path to “ c:\php\ext ” Now search

Introduction to MVVM in WPF (Model View ViewModel)

Introduction:  MVVM Stands for Model, View, Model. MVVM is software architecture for WPF and Silverlight projects. In MVVM, project is divided into three section: Model: Database interaction layer, if we are using the web service to interact with database, all the logic's to interact with the service layer should go into the model. View : As the name says, View is nothing but presentation layer i.e. Xaml part in WPF is our presentation layer with which user interacts. ViewModel: The bridge between View and Model is View Model.The properties that are used to bind the controls of View are defined and updated in the ViewModel. The data that we need from model (database) is also passed to view by ViewModel with the help of properties. Some important concept of MVVM : 1. INotifyPropertyChanged notifies the binding control in the view that the value of the property has been changed and controls reflects the changed values. 2. Relay Command: Relay commands are implement

Installing Angular 4

Image
Angular 4 is here and it's time to get started. If you're new to Angular, you might have arrived on this page  with confusion as to how you start an actual Angular 4 project.  If that's the case, you've come to the right place! There are a few different ways to get started with an Angular 4 project. This is a step-by-step setup guide to setup Angular v.4 . First thing first we have to make sure we have below thing on our system. Node JS with NPM(Node Package Manager) Angular CLI (Command line Interface) For downloading Node JS Click Here , choose either the Windows or Mac installer based on your OS. After it's installed,   visit your console / command line and type:    node  -v                                                                                                                                             it will provide you with the current version number. Next, we need to install the   Angular-CLI . This tool all