<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Supriya Ghevade on Medium]]></title>
        <description><![CDATA[Stories by Supriya Ghevade on Medium]]></description>
        <link>https://medium.com/@supriyaghevade77?source=rss-d941ed93e6de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*aDRqHX_Jh8KRZTa5TkKmkg.jpeg</url>
            <title>Stories by Supriya Ghevade on Medium</title>
            <link>https://medium.com/@supriyaghevade77?source=rss-d941ed93e6de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:41:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@supriyaghevade77/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Angular Basics]]></title>
            <link>https://medium.com/@supriyaghevade77/angular-basics-3224e4dcb60f?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/3224e4dcb60f</guid>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Sat, 29 Feb 2020 10:57:24 GMT</pubDate>
            <atom:updated>2020-02-29T10:57:24.623Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>1. What is the need for Angular?</strong></p><p>→Angular is a binding framework. which simplifies binding code between object and HTML UI.</p><p><strong>2. What is a directive in Angular?</strong></p><p>→A directive is a function that executes whenever the Angular compiler finds it in the DOM(Document Object Mapper).</p><p>There are four types of the directive -</p><p>i. Component Directives:- It used in the main class. It provides metadata that determines how the component should be processed and used at run time. <br>ii. Attribute Directives:- It is used to change the look and behavior of your DOM element. For example ngClass, ngStyle. <br>iii. Structural Directives:-It starts with a ( * ) sign. These directives are used to manipulate or handle and change the structure of your DOM element. For example *ngIf, *ngFor, *ngSwitch. <br>iv. Custom Directives:- This is used for reusable components.</p><p><strong>3. What is the use of Node and the importance of NPM?</strong></p><p>→Node is runtime javascript. It helps to run javascript outside the browser. take a js file and run outside the browser.</p><p>NPM-Node Package Manager. NPM has a huge command list.</p><p>ex-suppose we want install jquery then fire command and automatically install jquery.</p><p>c:&gt;CustomerApp\npm install jquery.</p><p><strong>4. Explain package.json file and what the npm command to create it?</strong></p><p>→Package.json has all javascript framework references and npm has given a package.json. In this package.json file, you can make an entry to all javascript references and load those one go.</p><p><strong>5. What is the term Angular One?</strong></p><p>→Angular 1 is an AngularJS.</p><p><strong>6. What is the term MVW?</strong></p><p>→(Model view whatever)Before we start coding let’s visualize the coding step. Angular is a binding framework so it follows the mvw architecture. It binds the HTML UI and Model. Follow the following sequence</p><p>1.Create a Model</p><p>2.Create Component</p><p>3.Create a Module</p><p>4.Create HTML UI</p><p>→Model- In this folder will have Business typescript classes.</p><p>Component-In this folder will have binding the code HTML UI and Model.</p><p>Module-In this folder will have a logical group of the component.</p><p>Html UI/View-In this folder will have HTML UI, layouts, CSS.</p><p><strong>7. What does npm install command do?</strong></p><p>→Npm command update himself. Node_Module installs using this command.</p><p><strong>8. What is the need for Angular CLI</strong></p><p>→npm install –g @angular /CLI</p><p>Angular Command Line Interface.which helps to get everything that requires angular.CLI is nothing but automation to create a project.</p><p><strong>9. What does -g means in npm command?</strong></p><p>→The -g command install the package globally.</p><p><strong>10. Explain the semantic versioning of package.json?</strong></p><p>→When we install package then done versioning resolution. their are three type versioning major(break change),minor(New feature),revision(bugs fix).</p><p>The direct major version is not updated. first revision then minor</p><p>then automatically major version will change.</p><p>If we have a tile sign only install the latest revision.If we have carrot sign only install latest minor revision</p><p><strong>11. What is ^ and ~ sign in package.json</strong></p><p>→The ^ carrot sign latest Minor revision. And the tile ~ tile sign latest revision version.</p><p><strong>12. What is npm init?</strong></p><p>→It is used to install a new or existing package.</p><p><strong>13.What ng -v, -o and npm -v?</strong></p><p>→ng -v= for version</p><p>ng -o=</p><p>npm -v=</p><p><strong>14.what is ng serve and ng build?</strong></p><p>→ng serve-ng serve builds the application and starts a web server.</p><p>ng build-Compiles an Angular app into an output directory named dist/ at the given output path. Must be executed from within a workspace directory.</p><p><strong>15. What are the components and modules in Angular?</strong></p><p>→Component has code behind. And it binds model and UI. The model is typescript. The view has a UI layout coloring. A module is a group of the component.</p><p>Module helps<strong> to lazy loading</strong> so whenever we need model is loaded and those js and view file loaded</p><p><strong>16. When should we use [] vs ()?</strong></p><p>→[]-Object to UI</p><p>[]is get called from object to view</p><p>()-UI to Object</p><p>() is get called from view to object</p><p><strong>17. What is the template URL?</strong></p><p>→TemplateURL is @ component.There is a property called template URL. It tells that which component is bind which UI.</p><p><strong>18. Why do we need selectors?</strong></p><p>→The selector is nothing but the placeholder inside the index. HTML page when the angular load. It loads the UI inside that selector.</p><p><strong>19. Explain the bootstrapping of the Angular framework?</strong></p><p>→Angular.json loads the index.html page run go and kick on of main.ts file actual kick of module. And module kicks of component. The component takes UI and Put in selector.selector is in the index.</p><p><strong>20. Why do we need typescript in Angular?</strong></p><p>→“TypeScript is a sugar-coated Object-oriented programming language over JavaScript”.</p><p><strong>21.Naming convention ( angular style guide) for angular folder and class?</strong></p><p>→ Names of folders and files should clearly convey their intent. For example, app/CustomerApp/Customercomponent.ts may contain a component that manages the list of a component.</p><p><strong>22.What is routing and how to implement it?</strong></p><p>→Routing means navigation from one to next as a user perform application task.</p><p><strong>23. How to do routing from the HTML and from the component?</strong></p><p>→In HTML file &lt;a&gt; tag we pass [ router-Link ] and map to pathname of routing.ts file. To load the component.ts file we have &lt;router-outlet&gt; tag where we put inside &lt;div&gt; tag to load particular component.</p><p><strong>24. What is the advantage of Lazy loading?</strong></p><p>→Lazy Loading helps to load the modules on demand.</p><p>Lazy Loading can be useful for increasing your app performance and decreasing the initial size of the bundle transmitted to the user’s browser.</p><p><strong>25. What does LoadChildren do?</strong></p><p>→The LoadChildren properly tells the router to fetch the module.ts when and only when the user navigates to route path, then merge the two router configurations and finally activate the declared component.</p><p><strong>26. What is forRoot and forChild?</strong></p><p>→forRoot() contains injector configuration which is global; such as configuring the Router.</p><p>forChild() has no injector configuration, only directives such as Router-Outlet and Router-Link.</p><p><strong>27. What is JSON server</strong></p><p>→JSON-server is a fake server API when you install it creates a file name db.json.</p><p><strong>28. How to loop in Angular?</strong></p><p>→*ngFor Directive in Angular. ngFor is a built-in template directive that makes it easy to iterate over something like an array or an object and create a template for each item.</p><p><strong>29. How to call a (click) event in component?</strong></p><p>→Usually, you would do this with an output (event) binding, which can be done in the HTML-Template: The “(click)” is the so-called output or event binding. Basically, every time the button is clicked, the given function (in this case “onClick”) is called.</p><p>The “$event” is a predefined variable in Angular, which holds the actual output, in this case, a ClickEvent.</p><p><strong>30. What is NgModule?</strong></p><p>→Angular apps are modular and Angular has its own modularity system called <em>NgModules</em>. They can contain components, service providers, and other code files whose scope is defined by the containing NgModule. They can import functionality that is exported from other NgModules, and export selected functionality for use by other NgModules.</p><p><strong>31. How to make HTTP calls?</strong></p><p>→Importing HTTP in the App.component</p><p>We do not need to create an object of HTTP using the new keyword, it will be dependency injected via the constructor. On the constructor component, we have defined the object injection of HTTP.</p><p>constructor(public httpClient:Http){ }</p><p>object of injected httpClient we use for HTTP post get put delete in particular methods</p><p><strong>32.Whats an observer in HTTP?</strong></p><p>→Angular HTTP uses something called as observable. So angular is an observer and it subscribes to observable like HTTP response. In other words, it’s listening to data coming from the server.</p><p>So the below code says that we will be making a GET call to “api/customers” URL and when the data comes we will send the successful data to the “Success” function and when an error occurs we will get it in “Error” function.</p><pre>var observable = this.http.get(“api/customers”, options);</pre><pre>observable.subscribe(res =&gt; this.Success(res),</pre><pre>res =&gt; this.Error(res));</pre><p>Below is the code of Error and Success function. In “Success” function we are converting the response to JSON and assigning it to “Customers” collection which is in the component. If we have error we are displaying it in the browser cons</p><pre>Error(err)</pre><pre>{</pre><pre>Console.debug(err.json());</pre><pre>}</pre><pre>Success(res)</pre><pre>{</pre><pre>this.Customers = res.json().data;</pre><pre>}</pre><p><strong>33.Difference between all Angular version?</strong></p><p>→</p><p><strong>34. What is the subscribe method in HTTP?</strong></p><p>→The constructor takes as its argument the <strong>subscriber function</strong> to run when the observable’s <strong>subscribe</strong>() <strong>method</strong> executes. A <strong>subscriber function</strong> receives an Observer object and <strong>can</strong> publish values to the observer’s next() <strong>method</strong>.</p><p><strong>35. How to share global data across Components?</strong></p><p>→Using Services in angular.</p><p><strong>36. How to debug VS code?</strong></p><p>→for debug, we need to install ‘Debugger for chrome’ Extention.</p><p><strong>35. How can we create reusable UI controls in Angular?</strong></p><p>→Using Input, Output and Event Emitter.</p><p><strong>36. What are the input outputs?</strong></p><p>→Exchange data between components. Input is used to receive data in whereas Output is to send data out.</p><p><strong>37. How does output emitter work in Angular?</strong></p><p>→Output sends data out by exposing event producers, usually EventEmitter objects.</p><p><strong>38. How to call one component in other components?</strong></p><p><strong>→Invoking</strong> method from <strong>one component to another component</strong> (if they are not parent and child), can <strong>only</strong> be possible …. service.ts: import {Subject} from ‘rxjs/Subject’; private emitter: Subject&lt;any&gt; = new Subject&lt;any&gt;(); <strong>set</strong>() { this.emitter.next({command: ‘<strong>set</strong>’, params:{<strong>a</strong>:<strong>1</strong>, b:2}); }; …</p><p>Using services..</p><p><strong>39. What is ViewChild?</strong></p><p>→ViewChild returns the first element that matches a given component, Directive or template reference selector.</p><p><strong>40. How do you validations in Angular?</strong></p><p>→Validations are normally applied to user interfaces (Forms) and User interfaces have controls and on the controls, we apply validations.</p><p>we have FormGroup, FormGroup has FormControls and FormControls has one or many validations</p><p><strong>standalone elements:</strong></p><p>All controls specified inside the HTML FORM tag which have angular validation applied should have validation.</p><p>If a HTML control inside Angular form validation does not have validation you can do one of the below things to remove the exception: -</p><p>o You need to specify that it’s a standalone control.</p><p>o Move the control outside the HTML FORM tag.</p><p>&lt;input type=”text” [ngModelOptions]=”{standalone:true}”</p><p><strong>41. What is the importance of Reactiveforms?</strong></p><p>→However, Reactive forms are synchronous and are usually considered when working with a database. We write the code for validation inside the component class and also map the objects to the form controls on the view.</p><p>our focus is to work with Reactive Forms which follow the model-driven approach to work with user input and handle it dynamically.</p><p>We will create a Form, using FormGroup, FormControl, FormBuilder class, etc. The very first step is to import ReactiveFormsModule in the app.module.ts</p><p><strong>42. How can we show an error message as per the validations?</strong></p><p>→“CurrentCustomer.FromGroup.valid” check all the validation of FromGroup.But if we want to check individual validation. For that use the “has-error” function.</p><p>“CurrentCustomer.FromGroup.Controls[‘CustomerNameControl’].hasError(required)”check that CustomerNameControl has required the validation rule been fulfilled.Displaying error message in div tag which visible or not visible is depending on the has error return true or false.</p><p>“!” not is before hasError is said that if hasError is true then hidden should be false.</p><p>&lt;div [hidden]=”!(CurrentCustomer.formGroup.controls[‘CustomerNameControl’].</p><p>hasError(‘required’))”&gt;Customer name is required &lt;/div&gt;</p><p><strong>43. How can we enable and disable UI as per validation?</strong></p><p>→When the user starts filling data and fulfilling the validation we would like to check if all validations are fine and accordingly show an error message or enable/disable UI control.</p><p>In order to check if all validation fine then we use “valid” property in fromGroup</p><p>Ex-given one button for disable depending upon whether validation is valid or not.</p><p>&lt;input type=”button”</p><p>value=”Click” [disabled]=”!(CurrentCustomer.formGroup.valid)”/&gt;</p><p>where “[disabled]” is an angular attribute used for to show HTML control disable or enable.</p><p><strong>44. Explain Formgroup, formcontrol, and validation?</strong></p><p>→we have FormGroup, FormGroup has FormControls and FormControls has one or many validations</p><p>Three steps-</p><p>1. Create FormGroup.</p><p>2. Create FormControl and with proper validations.</p><p>3. Map those validations to the HTML Form</p><p>Validation structure put in the model. Because a model represents a real-world entity like a person, user, admin, product, etc.</p><p>A model has Data and Behavior. So the right place where validations should be present in this Layer.</p><p>We need to import five validator components NgForm, FormGroup, FormControl, and validators. All validator components are present in the “@angular/form”.</p><p>NgForm: — Angular tags for validation.</p><p>FormGroup: — Helps us to create a collection of validation.</p><p>FormControl and Validators: — Helps us to create individual validation inside FormGroup.</p><p>FormBuilder: — Helps us to create the structure of Form group and Form controls. Please note one Form group can have many FormControls.</p><p>First, create an object of fromGroup which we will have a collection of validations. The FromGroup object will be constructed using the “fromBuilder” class.</p><p>Once the fromGroup object is created then add FromControl in the FromGroup collection.To add a control we use addControl. The first parameter in “addControl” method is the name of the validation and second is the Angular validator type to be added.</p><p>this.formBookGroup.addControl(‘BookNameControl’, new FormControl(‘’,Validators.required));</p><p><strong>If we want composite validation then you need to create a collection and add it using “Compose” method.</strong></p><p>var validationcollection = [];</p><p>validationcollection.push(Validators.required);</p><p>validationcollection.push(Validators.pattern(“^[A-Z]{1,1}[0–9]{4,4}$”));</p><p>this.formGroup.addControl(‘CustomerCodeControl’, new FormControl(‘’, Validators.compose(validationcollection)));</p><p><strong>Apply FromGroup to html form:</strong></p><p>For that we need “FromGroup” tag in that we need to specify the “FromGroup” object via customer object.</p><p>&lt;form [formGroup]=”CurrentCustomer.formGroup”&gt;&lt;/form&gt;</p><p><strong>45.What are different states of FormValidation , dirty , pristine.touched ?</strong></p><p>→FromGroup has lots of validation Properties some properties are as follows</p><p>Dirty- This property signals if Value has been modified</p><p>Pristine- This property says if the field has changed or not.</p><p>Touched- When the lost focus for that control occurs.</p><p>Untouch- The field is not touched.</p><p><strong>46. Explain Angular life cycle hooks and the sequence?</strong></p><p><strong>→Life cycle</strong></p><p><strong>Constructor</strong></p><p><strong>ngOnChange-</strong> Any logic attached to the method of this interface</p><p><strong>ngOnInit-</strong> Angular will call the method of this interface once when the input property of the component gets initialized.</p><p><strong>ngDocheck-</strong>On a Child Component</p><p><strong>ngAfterContentInit-</strong>On child Component instance.AfterContentInit is called only during the first check.</p><p><strong>ngAfterContentChecked-</strong> The method of this interface is called after ngAfterContentInit, anytime angular discovers a change in the properties of a projected component.</p><p><strong>ngAfterViewInit- </strong>AfterViewInit is also a component only interface. Angular calls the method of this interface is once when the properties of a view child are initialized. In simple terms, ViewChild(@ViewChild) is an angular decorator that helps us access the properties of a child component inside the parent component</p><p><strong>ngAfterViewChecked- </strong>This is also for component only. The method of this Interface is a call anytime angular discover a change in the properties of a child component.</p><p><strong>ngOnDestroy-</strong> The method of this interface is called Just before the last breathe of a dying component and directives.</p><p><strong>48. What are the pipes?</strong></p><p>→Pipes take in data input and transform data into a different output.</p><p>Using the expression “{{}}” and “|”</p><p>Syntax-{{‘Input data’|filter(Uppercase)èfinal output.</p><p><strong>49. How to create Custom pipes?</strong></p><p>→First import “Pipe” and “PipeTransform” from the core as these classes are the building blocks for pipes.</p><p>import { Pipe, PipeTransform } from ‘@angular/core’;</p><p>we need to create a “GradePipes” class that implements the “PipeTransform” interface and has “@Pipe” decorated on the top of it. Every pipe class should have a “transform” method as it is small “t” “r”… “transform” which has an input parameter i.e. customer amount which will be provided in the UI.</p><pre>@Pipe({name: ‘GradePipes’})</pre><pre>export class GradePipes implements PipeTransform {</pre><pre>transform(value:number): string {</pre><pre>if(value &lt; 100){</pre><pre>return “Simple Customer”;</pre><pre>}</pre><pre>else{</pre><pre>return “Gold Customer”;</pre><pre>}</pre><pre>}</pre><pre>}</pre><p>In “@Pipe” decorator we have also specified a “name”. This name will be used in the UI to make call to the pipe</p><p><strong>Applying the grading pipe on the UI</strong></p><p>finally, we need to call the pipe in the HTML UI. We need can now call “GradePipes” as shown in the below code. “CurrentCustomer.CustomerAmount” is the input and the pipe is “GradePipes”.</p><p>{{ CurrentCustomer.CustomerAmount|GradePipes}}</p><p><strong>50. What is Jasmine, Karma?</strong></p><p>→A tool called <strong>Karma</strong> is a JavaScript test runner created by the AngularJS team. <strong>Jasmine</strong> is the testing framework that we talked about in the getting started with unit testing for AngularJS post, and <strong>Karma</strong> provides helpful tools that make it easier for us to call our <strong>Jasmine</strong> tests whilst we are writing code.</p><p><strong>51. How to testing in Angular?</strong></p><p>→ The ng <strong>test</strong> command builds the app in watch mode and launches the Karma <strong>test</strong> runner. The last line of the log is the most important. It shows that Karma ran three <strong>tests</strong> that all passed.</p><p><strong>52. What are typings?</strong></p><p>→It gives you intelligent of methods which are in jquery library</p><p><strong>53. How to integrate Jquery with Angular?</strong></p><p>→First, we install jquery and then install @types/jquery and then import it in your component. By importing the jquery you will get all the IntelliSense of the jquery.</p><p><strong>54. What is DI, IOC, how to implement, advantage</strong></p><p>→ Dependency injection where we change at one place it should reflect in various places. Inversion Of Control is the principle and we can use it by providing it in the constructor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3224e4dcb60f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are the different mechanisms of parsing data in MVC?]]></title>
            <link>https://medium.com/@supriyaghevade77/what-are-the-different-mechanisms-of-parsing-data-in-mvc-d2dd3b775a85?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2dd3b775a85</guid>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[viewbag]]></category>
            <category><![CDATA[dataview]]></category>
            <category><![CDATA[temp-data]]></category>
            <category><![CDATA[sessions]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 12:58:03 GMT</pubDate>
            <atom:updated>2020-02-05T12:58:03.898Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>View Data</li><li>View Bag</li><li>Temp Data</li><li>Session Variable</li></ul><blockquote><strong>ViewData</strong></blockquote><p>View data is parsing from the controller to view or action to view. ViewData is derived from ViewDataDictionary which is a dictionary type.</p><p><strong>In Action syntax of View Data:</strong></p><p>ViewData[“MyTime”]=DateTime.now.ToString();</p><p><strong>In View syntax of View Data:</strong></p><p>@ViewData.[“MyTime”]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*bdl_jL3R1HSZFaqO2oswow.png" /><figcaption>ViewData</figcaption></figure><p><strong>OUTPUT:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*6EdELfCGiEJcQlIeOY0Wgg.png" /><figcaption>The output of view data</figcaption></figure><blockquote><strong>ViewBag</strong></blockquote><p>View bag is parsing from the controller to view or action to view. But different in syntax. And output also the same as the view data.</p><p><strong>In Action syntax of view bag:</strong></p><p>ViewBag.MyTime=DateTime.now.ToString()</p><p><strong>In View syntax of view bag:</strong></p><p>@ViewBag.MyTime</p><p><strong>Note:</strong> View bag and View data do not maintain data from action to action or controller to controller. So, View Bag and View Data only maintain data from the controller to view.</p><blockquote><strong>Temp Data</strong></blockquote><p>When you want to data maintain from action to view and action to action then you should use <strong>temp data.</strong></p><p><strong>In action syntax of temp data:</strong></p><p>TempData[“DateTimeTemp”]=DateTime.now.ToString()</p><p>here DateTimeTemp is variable of temp data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*OFDfJwQkhW5jrTpedQ43Ig.png" /><figcaption>Temp data</figcaption></figure><p>See here temp data is survived from one action to another but view data is getting null.</p><p><strong>Note:</strong> Temp data is survived only for one request. The second request will be null.</p><blockquote><strong>Session Variable:</strong></blockquote><p>The session is survived until you close the browser.</p><p>As a new learner to MVC recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLp7nSImO5vk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLp7nSImO5vk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLp7nSImO5vk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/df2b9aa1809d7e2c2fb13866da7e9f19/href">https://medium.com/media/df2b9aa1809d7e2c2fb13866da7e9f19/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2dd3b775a85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MVC]]></title>
            <link>https://medium.com/@supriyaghevade77/mvc-7eb427fc7476?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eb427fc7476</guid>
            <category><![CDATA[mvc5]]></category>
            <category><![CDATA[dot-net-framework]]></category>
            <category><![CDATA[startup-file]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[mvc-core]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Mon, 03 Feb 2020 12:37:19 GMT</pubDate>
            <atom:updated>2020-02-04T12:27:19.237Z</atom:updated>
            <content:encoded><![CDATA[<h3>MVC Core</h3><p><strong>Q-1] Why MVC?</strong></p><p>MVC stands for “Model-View-Controller”.MVC is a new standard design pattern in the software development world.MVC is used to design a modern user interface. Because MVC is a separate view from your model and controller. It is a design pattern a structure for keeping display and data separate to allow each to change without affecting the other.</p><p>MVC is an application design model comprised of three interconnected parts.</p><p>They include Model, Controller, View</p><p>Model-Implementing Business Logic, This will have a model of classes Controller-handling requests, This will have a binding of code, and mapping to business logic View-presenting and formatting output, This has an HTML code.</p><p>MVC is easier to change code each of these layers.</p><ul><li>Difference between MVC and Webform.</li></ul><p><em>MVC is not a replacement for the ASP.net webform. Microsoft has provided an alternative approach to build an application.</em></p><ol><li>View-based architecture</li></ol><p>View-based architecture for an action-based requirement.Because Microsoft keeps the rare thing so first hit come to the view.</p><p>2. Behind code is not reusable</p><p>3.HTML is not the only response type</p><p>simple end-user is sending the response in HTML. if it is javascript then it is sending JSON if it is else it is sending XML.</p><p>4.Flexible combination of view + Data.</p><p>In MVC first hit comes to the action and he picks up the model attached with a view to send different responses but in a webform, it is not possible because in webform view is already fix because the first hit comes to view.</p><p>5.Testing</p><p>In web form testing behind code is very difficult because it is tightly coupled.MVC provides is a very nice unit testing approach to the project.</p><p><strong>Q-2] .Net framework vs .Net Core</strong></p><blockquote>.Net Framework</blockquote><p>The .Net framework is a software development platform developed by <strong><em>Microsoft</em></strong>. The framework meant to create an application, which would run on the <strong><em>window platform</em></strong>.</p><p>The first version of the .Net framework was released in 2002. The version is called .Net framework 1.0 and the current version is 4.7.1.</p><p>The .Net framework is used to create both form-based and web-based applications. Web services can also be developed using the .Net framework.</p><p>The .Net framework also supports various programming languages Like Visual basic and c#. So the developer can choose and select the programming language and develop the required application.</p><blockquote>.NET Core</blockquote><p>The .net core is a free and open-source managed computer software framework for Windows, Linux, and macOS operating systems. It is cross-platform.</p><p>.Net core 1.0 announced on November 12, 2014, was released on June 27, 2016, along with Visual Studio 2015 update 3, which enables .Net core development.NET Core 1.0.4 and .NET Core 1.1.1 were released along with .NET Core Tools 1.0 and Visual Studio 2017 on March 7, 2017.</p><p>.NET Core 2.0 was released on August 14, 2017, along with Visual Studio 2017 15.3, ASP.NET Core 2.0, and Entity Framework Core 2.0..NET Core 2.1 was released on May 30, 2018. .NET Core 2.2 was released on December 4, 2018.</p><p>.NET Core 3 was announced on May 7, 2019, at Microsoft Build. Version 3.0.0 was released on September 23, 2019.</p><p><strong>Q-3] MVC 5 vs MVC Core</strong></p><blockquote>MVC 5</blockquote><p>ASP.NET MVC 5 is the latest version of the popular ASP.NET MVC technology that enables you to build dynamic websites using the Model-View-Controller technology, with an emphasis on a clean architecture, test-driven development, and extensibility.</p><blockquote>MVC Core</blockquote><p>ASP.NET Core is a lean and composable framework for building web and cloud applications. ASP.NET Core is a fully open source. Being fully open source is not an easy task, Microsoft has done some amazing work on making it work across Windows, Mac, Linux OS.</p><p><strong>1] Single aligned web stack for ASP.NET MVC Core and Web APIs</strong></p><p>ASP.NET MVC 5 will give us the option of choosing MVC or Web API or both while creating a web application. It was because web stack for MVC 5 and Web API was not the same.<br>ASP.NET Core MVC now has a single aligned web stack for MVC and Web API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*8hNFn4cH3Vuso6zIa8VmOQ.png" /><figcaption>Single aligned ASP.net MVC Core</figcaption></figure><p><strong>2]Project Structure Changes</strong></p><p>ASP.NET Core MVC solution explorer on the right-hand side, there is no Web.config, Global.asax. Then how it deals with configuration settings, authentication and application start specific code execution.<br><strong>appsettings.json, custom configuration files</strong> are some files that do those work of missing files from ASP.NET MVC 5. There are many changes if we look at folder by folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*ysRFnv5E-U0oct6cIp5imA.png" /><figcaption>Project structure of MVC Core and MVC 5</figcaption></figure><p><strong>3]ASP.NET Core targets Full .NET and .NET Core</strong></p><p>.Net Core</p><p>.Net Core is a general-purpose development platform proposed by Microsoft and the .Net community on GitHub. It is cross-platform, supporting Windows,macOS, and Linux, and can be used in the device, cloud, and IoT scenarios.</p><p>We can develop the ASP.net Core app that is run on either Windows or Linux or Mac.</p><p><strong>Q-4] Program.cs file.</strong></p><p>→start the webserver</p><p><strong>Q-5] What is MVC routing?</strong></p><p>Routing is the process through which the application matches an incoming URL and executes the corresponding method.</p><p><strong>Q-6] What is startup.cs?</strong></p><p>→Startup.cs is load initial configuration. There are three sessions in startup.cs file constructor, configure Services, configure.</p><p><strong>Q-7] What is Configure() and ConfigureService()?</strong></p><p>→In startup.cs file both of this method executed one after another. first executed ConfigureService() then Configure(). In ConfigureService() method.This two method helps you to define which services you want to use and how you want to configure them.</p><p>Configure Services-Add the services</p><p>Configure-Added the services</p><p><strong>Q-8] What is appsetting.json?</strong></p><p>→appsetting.json has the parameters and configurations needed for the website. Parameters like connection strings</p><p><strong>Q-9] What is routing?</strong></p><p>→Routing is mapping. It is a user-friendly URL i.e. Controller and Action. Eg.<strong>https://localhost//Customer/Add</strong>. Here Customer is the controller and Add is the action. Routing is nothing but creating URLs and whenever those URLs, patterns occur on the browser it will invoke an appropriate controller and the actions.</p><p>Routes are defined in startup.cs code. Route describes how the URL path should be matched to action. Routes are also used to generate URLs to sent out in responses.</p><p>As a new learner to MVC Core recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fipio9ze57X8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dipio9ze57X8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fipio9ze57X8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec29f496e80474829eedffcf60b8080f/href">https://medium.com/media/ec29f496e80474829eedffcf60b8080f/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eb427fc7476" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time Conversion Code in C#]]></title>
            <link>https://medium.com/@supriyaghevade77/time-conversion-code-in-c-92beebfff002?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/92beebfff002</guid>
            <category><![CDATA[datetime]]></category>
            <category><![CDATA[csharp-learn-step-by-step]]></category>
            <category><![CDATA[conversion-time]]></category>
            <category><![CDATA[csharp-tutorial]]></category>
            <category><![CDATA[csharp-step-by-step]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Wed, 15 Jan 2020 12:05:37 GMT</pubDate>
            <atom:updated>2020-01-15T12:08:05.590Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Problem:</strong></p><p>Given a time in 12 -hour AM/PM format, convert it to military (24-hour) time.</p><p>Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.</p><p><strong>Function Description</strong></p><p>The timeConversion function should return a new string representing the input time in a 24-hour format.</p><p>timeConversion has the following parameter(s):</p><ul><li>s: a string representing time in hour format</li></ul><p><strong>Input Format</strong></p><p>A single string s containing time in 12-hour clock format (i.e.:hh:mm: ss AM or hh:mm: ss PM), where 01≤hh≤12 and 00≤mm, ss≤59.</p><p><strong>Output Format</strong></p><p>Convert and print the given time in 24-hour format, where 00≤hh≤23.</p><p><strong>Sample Input 0</strong></p><p>07:05:45 PM</p><p><strong>Sample Output 0</strong></p><p>19:05:45</p><p><strong>Code:</strong></p><pre>using System;</pre><pre>using System.Collections.Generic;</pre><pre>using System.IO;</pre><pre>using System.Linq;</pre><pre>class Solution</pre><pre>{</pre><pre>static void timeConversion(string s)</pre><pre>{</pre><pre>DateTime d = DateTime.Parse(s);</pre><pre>Console.WriteLine(&quot;24 Hour Format:&quot;);</pre><pre>Console.WriteLine(d.ToString(&quot;HH:mm:ss&quot;));</pre><pre>Console.ReadLine();</pre><pre>}</pre><pre>static void Main(string[] args)</pre><pre>{</pre><pre>string s = &quot;07:05:45 pm&quot;;</pre><pre>timeConversion(s);</pre><pre>}</pre><pre>}</pre><p><strong>OUTPUT:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*jYqCU6xlashTmYO0d6IwLA.png" /></figure><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92beebfff002" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IL-Intermediate Language Code]]></title>
            <link>https://medium.com/@supriyaghevade77/il-intermediate-language-code-1ddf91b936fc?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ddf91b936fc</guid>
            <category><![CDATA[intermediate-language]]></category>
            <category><![CDATA[csharp-learn-step-by-step]]></category>
            <category><![CDATA[jit]]></category>
            <category><![CDATA[il-code]]></category>
            <category><![CDATA[csharp-tutorial]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Fri, 10 Jan 2020 10:32:42 GMT</pubDate>
            <atom:updated>2020-01-10T10:32:42.930Z</atom:updated>
            <content:encoded><![CDATA[<p><em>It is nothing but a partially compiled code or half compiled code.</em></p><p>Higher-level language(human known) is compiled lower-level language(machine known). So need<strong> a compiler.</strong></p><p>Look at c,c++ is directly compile and when it compiles that time the source code will be configured for the machine in which it is located. This is called a <strong>full compilation.</strong></p><p><em>one drawback of full compilation, the source code is optimal for that only developer system but on an end-user system, this code is not run in optimal because of its lower configuration.</em></p><p><strong>What is half compilation?</strong></p><p>When higher-level language is compiled that time not checking environment like Operating system, which processor 64 /32 bit.only syntax checking. This called <strong>half compilation.</strong></p><p><strong>What is the IL code?</strong></p><p>Microsoft visual studio supports too many languages. In some different users have different machine configurations and different operating systems unknown to visual studios. That is the main problem. To avoid this problem Microsoft Creates a code that is called as IL Code.</p><p><strong>Why is Il half compiled and not full compiled?</strong></p><p>during runtime, the compiler figures out what is Operating System, hardware Configuration and compile an<strong> optimal </strong>code as per that environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*0BZpk6gps7unUKqXM41AEg.png" /></figure><p><strong>Who compiles the Il code to machine language.</strong></p><p>When Il code is executing on an end-user machine then .Net think was JIT and according to their compile Il code into machine language.</p><p><strong>JIT(Just In Time)</strong></p><p>JIT is not all compilation. Because jit unknown something, where it run and where it changes so it run at last movement and just in time.</p><p><strong>How</strong></p><p><strong>per file</strong>-Complete C# file and compile it machine language</p><p><strong>per method</strong>- Take some method or function only that compile and send that compile code in memory.</p><p><strong>code fragment</strong>-It takes only 3 or 4 lines and compile into machine language.</p><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ddf91b936fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code to automate the grade rounded process in C#]]></title>
            <link>https://medium.com/@supriyaghevade77/code-to-automate-the-grade-rounded-process-in-c-319172791cb5?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/319172791cb5</guid>
            <category><![CDATA[forech-loop]]></category>
            <category><![CDATA[list-in-csharp]]></category>
            <category><![CDATA[csharp-step-by-step]]></category>
            <category><![CDATA[csharp-tutorial]]></category>
            <category><![CDATA[learn-code-step-by-step]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Wed, 08 Jan 2020 11:19:32 GMT</pubDate>
            <atom:updated>2020-01-08T11:19:32.265Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Problem:</strong></p><p>Given the initial value of grade for each n students, write code to automate the grade rounding process.</p><p>Grading policy:</p><p>I]Every student receives a grade in the inclusive range from 0 to 100.</p><p>II] Any grade less than 40 is a failing grade.</p><p>To round each student’s grade according to these rules:</p><p>I] If the difference between the grade and the next multiple of 5 is less than 3, round grade up to the next multiple of 5.</p><p>II] If the value of grade is less than 38, no rounding occurs as the result will still be a fail grade.</p><p>For example,</p><p>Grade=84 will be rounded to 85 but grade=29 will not be rounded because the rounding would result in a number that is less than 40.</p><p><strong>Function Description:</strong></p><p>The function gradingStudents should return an integer array consisting of rounded grades.</p><p>gradingStudents has the following parameter(s):</p><ul><li>grades: an array of integers representing grades before rounding.</li><li>gradesCount: Number of student.</li></ul><p><strong>Input Format:</strong></p><p>The first line contains a single integer,n, the number of students.<br>Each line I of the n subsequent lines contains a single integer, grades[i], denoting student I‘s grade.</p><p><strong>Output Format</strong></p><p>For each grade [i], print the rounded grade on a new line.</p><p><strong>Sample Input :</strong></p><pre>4<br>73<br>67<br>38<br>33</pre><p><strong>Sample Output:</strong></p><pre>75<br>67<br>40<br>33</pre><p><strong>Explanation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*wt1_-Wng_g0qiuO76P0VQw.png" /></figure><ol><li>student 1 received a grade 73, and the next multiple of 5 from 73 is 75. Since 75–73&lt; 3, the student grade is rounded to 75.</li><li>student 2 received a grade 67, and the next multiple of 5 from 67 is 70. Since 70–67= 3, the student grade will not be modified and the student final grade is 67.</li><li>student 3 received a grade 38, and the next multiple of 5 from 38 is 40. Since 40–38&lt; 3, the student grade will be rounded to 40.</li><li>student 4 received a grade 33, It below 38 so the grade will not be modified and the student final grade is 33.</li></ol><p><strong>Code:</strong></p><pre>using System.CodeDom.Compiler;</pre><pre>using System.Collections.Generic;</pre><pre>using System.Collections;</pre><pre>using System.ComponentModel;</pre><pre>using System.Diagnostics.CodeAnalysis;</pre><pre>using System.Globalization;</pre><pre>using System.IO;</pre><pre>using System.Linq;</pre><pre>using System.Reflection;</pre><pre>using System.Runtime.Serialization;</pre><pre>using System.Text.RegularExpressions;</pre><pre>using System.Text;</pre><pre>using System;</pre><pre>class Result<br>{<br>     public static List&lt;int&gt; gradingStudents(List&lt;int&gt; grades, int     gradesCount)<br>      {<br>           for (int i = 0; i &lt; gradesCount; i++)<br>           {<br>                if (grades[i] &lt; 38)<br>                {<br>                }<br>                else<br>                {<br>                    int leftover = grades[i] % 5;<br>                    if (leftover &gt; 2)<br>                    {<br>                        grades[i] += 5 - leftover;<br>                    }<br>                }<br>           }<br>           return grades;<br>     }</pre><pre>   class Solution<br>   { <br>      public static void Main(string[] args)<br>      { <br>           int gradesCount =4;<br>           Console.WriteLine(gradesCount);<br>           List&lt;int&gt; grades = new List&lt;int&gt;();<br>                    grades.Add(73);<br>                    grades.Add(67);<br>                    grades.Add(38);<br>                    grades.Add(33);<br>            foreach (int i in grades)<br>            {<br>               Console.WriteLine(i);<br>            }<br>      List&lt;int&gt; result = Result.gradingStudents(grades, gradesCount);<br>            Console.WriteLine(&quot;Final grade&quot;);<br>            Console.WriteLine(String.Join(&quot;\n&quot;, result));<br>            Console.ReadLine();<br>     }</pre><pre>  }</pre><pre>}</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*OHwnM56s5CjI5DIx0iskcw.png" /></figure><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=319172791cb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Plus Minus]]></title>
            <link>https://medium.com/@supriyaghevade77/plus-minus-48d61fed03f7?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/48d61fed03f7</guid>
            <category><![CDATA[csharp-learn-step-by-step]]></category>
            <category><![CDATA[csharp-tutorial]]></category>
            <category><![CDATA[csharp-code]]></category>
            <category><![CDATA[fraction-in-csharp]]></category>
            <category><![CDATA[dotnet-step-by-step]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Mon, 06 Jan 2020 11:37:05 GMT</pubDate>
            <atom:updated>2020-01-06T11:37:05.062Z</atom:updated>
            <content:encoded><![CDATA[<h3>Calculation the fractions of array elements in C#</h3><p>Calculate the fractions of array elements that are positive, negative and zeros. Display the decimal value of each fraction on a new line.</p><p>For example,</p><p>The single array arr=[1,1,0,-1,-1]there are 5 elements, two positive, two negative and one zero. Their ratios would be 2\5=0.400000,2\5=0.400000 and 1\5=0.500000. It should be printed as</p><pre>0.400000<br>0.400000<br>0.500000</pre><p><strong>Function Description</strong></p><p>The plus-minus function should print out the ratio of positive, negative and zero items in the array, each on a separate line rounded to six decimals.</p><p>plus-minus has the following parameter(s):</p><ul><li>arr: single array of integers</li><li>n:array elements</li></ul><p><strong>Input Format</strong></p><p>The first line contains an integer,n, denoting the size of the array.<br>The second line contains n space-separated integers describing an array of numbers .</p><p>arr(arr[0],arr[1],…….,arr[n-1])</p><p><strong>Sample Input</strong></p><pre>6<br>-4 3 -9 0 4 1</pre><p><strong>Sample Output</strong></p><pre>0.500000<br>0.333333<br>0.166667</pre><p><strong>Explanation</strong></p><p>There are 3 positive numbers, 2 negative numbers, and 1 zero in the array.<br>positive:3\6=0.500000 , negative:2\6=333333 and zeros:1\6=166667.</p><p><strong>Code:</strong></p><pre>using System.CodeDom.Compiler;</pre><pre>using System.Collections.Generic;</pre><pre>using System.Collections;</pre><pre>using System.ComponentModel;</pre><pre>using System.Diagnostics.CodeAnalysis;</pre><pre>using System.Globalization;</pre><pre>using System.IO;</pre><pre>using System.Linq;</pre><pre>using System.Reflection;</pre><pre>using System.Runtime.Serialization;</pre><pre>using System.Text.RegularExpressions;</pre><pre>using System.Text;</pre><pre>using System;</pre><pre>class Solution</pre><pre>{ // Complete the plusMinus function below.</pre><pre>static void plusMinus(int[] arr, int n)</pre><pre>{</pre><pre>float p = 0, ne = 0, z = 0, pos = 0, neg = 0, zero = 0;</pre><pre>for (int i = 0; i &lt; n; i++)</pre><pre>{</pre><pre>if (arr[i] &gt; 0)</pre><pre>++p;</pre><pre>else if (arr[i] &lt; 0)</pre><pre>++ne;</pre><pre>else if (arr[i] == 0)</pre><pre>++z;</pre><pre>}</pre><pre>pos = p / n;</pre><pre>neg = ne / n;</pre><pre>zero = z / n;</pre><pre>Console.WriteLine(pos.ToString(&quot;N6&quot;));</pre><pre>Console.WriteLine(neg.ToString(&quot;N6&quot;));//N6 numeric format string;</pre><pre>Console.WriteLine(zero.ToString(&quot;N6&quot;));</pre><pre>Console.ReadLine();</pre><pre>}</pre><pre>static void Main(string[] args)</pre><pre>{</pre><pre>Console.WriteLine(&quot;Enter n number of array&quot;);</pre><pre>int n = Convert.ToInt32(Console.ReadLine());</pre><pre>Console.WriteLine(&quot;Enter single integer array element&quot;);</pre><pre>int[] arr = Array.ConvertAll(Console.ReadLine().Split(&#39; &#39;), arrTemp =&gt; Convert.ToInt32(arrTemp));</pre><pre>plusMinus(arr, n);</pre><pre>}<br>}</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*vzyPv0YzO6v-kqTHNIXR5g.png" /></figure><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48d61fed03f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JIT]]></title>
            <link>https://medium.com/@supriyaghevade77/jit-866617dd9b3?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/866617dd9b3</guid>
            <category><![CDATA[per-method]]></category>
            <category><![CDATA[code-fragment]]></category>
            <category><![CDATA[dotnet-step-by-step]]></category>
            <category><![CDATA[pre-jit]]></category>
            <category><![CDATA[just-in-time]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Fri, 03 Jan 2020 09:45:21 GMT</pubDate>
            <atom:updated>2020-01-03T09:45:21.906Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Just In Time</em></p><p>JIT is part of Common Language Runtime (CLR). JIT is compiled IL code into assembly language. JIT does not compile all code at a time because it unknown something where it run and where it changes so it run the last movement or just in time.</p><p><strong>How JIT run?</strong></p><p><strong>Per file</strong>-Complete C# file and compile it machine language.</p><p><strong>Per method/function</strong>-Take some method and function only that compile and send that compile code in memory.</p><p><strong>Code fragment</strong>-JIT take 3 nad 4 lines of code and compile into machine language.</p><p>Three types of JIT Compilation:</p><p>This three type differentiates between compilation and cache</p><p>1]Pre-JIT-It is a full compilation, not dynamic compilation. Full compilation done by Ngen.exe.Run Ngen.exe compile .Net Core into full machine language.</p><p>2]Econo-JIT-The compilation is done on-demand bases but compiled code not store in cache. It uses when low RAM .eg in mobile</p><p>3]Normal-JIT-the compilation done on-demand bases.eg.method one is compiled then it compiles method stored into the cache means into RAM.</p><p><strong>How can I force my compilation to Econo jit or Normal jit?</strong></p><p>No. it is done internally.</p><p>The choice of Econo jit and Normal jit decided internally. Econo jit is chosen when a device has the limitation of memory and CPU cycle issues like window CE is a powered device. When their no limitation of memory and CPU power is higher then Normal jit is used.</p><p>Pre-jit is implemented by using Ngen.exe.</p><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=866617dd9b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.Net Framework]]></title>
            <link>https://medium.com/@supriyaghevade77/net-framework-73f9907a687?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/73f9907a687</guid>
            <category><![CDATA[csharp-learn-step-by-step]]></category>
            <category><![CDATA[csharp-tutorial]]></category>
            <category><![CDATA[dotnet-step-by-step]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[dotnet-framework]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Thu, 02 Jan 2020 07:41:36 GMT</pubDate>
            <atom:updated>2020-01-02T07:41:36.170Z</atom:updated>
            <content:encoded><![CDATA[<p>The .Net framework is a software development platform developed by <strong><em>Microsoft</em></strong>. The framework meant to create an application, which would run on the <strong><em>window platform</em></strong>.</p><p>The first version of the .Net framework was released in 2002. The version is called .Net framework 1.0 and the current version is 4.7.1.</p><p>The .Net framework is used to create both form-based and web-based applications. Web services can also be developed using the .Net framework.</p><p>The .Net framework also supports various programming languages Like Visual basic and c#. So the developer can choose and select the programming language and develop the required application.</p><p><strong>.Net Framework architecture:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*SMlIYpyVZXS5Pt484Mc63g.png" /><figcaption>.Net Framework Architecture Diagram.</figcaption></figure><p>.Net Framework Component as follows-</p><p><strong>Language :</strong></p><p>WinForms-This is used for developing a forms-based application, which would run on end-user machines. Notepad is an example of a client-based application.</p><p>ASP.net-This is used for developing web-based applications, which are made to run on any browser eg. Internet Explorer, Chrome and Firefox.</p><p>i)The web application would be processed on the server, which would have internet information installed.</p><p>ii)Internet information service or IIS is a Microsoft component, which is used to execute an ASP.net application.</p><p>iii)The result of the execution is sent to the client machine and output shown on the browser.</p><p>ADO.net-This technology is used to develop the application to interacts with Databases such as Oracle or Microsoft SQL Server.</p><p>Microsoft always ensures that .Net frameworks are in compliance with all the supported Windows operating systems.</p><p><strong>.Net framework Design Principle:</strong></p><ol><li>Interoperability</li><li>Security</li><li>Memory Management</li><li>Portability</li><li>Simplified Deployment</li></ol><p><strong>Library:</strong></p><p>Class Library-</p><p>The .Net framework includes a set of standard class libraries. The class library is a collection of methods and functions that can be used for core purposes.</p><p><strong>Common Language Runtime:</strong></p><p>CLR is an execution engine in the .net framework. Where all the .net framework runs under the supervision of this CLR. The Common Language Infrastructure or CLI is a platform on which programs are executed.</p><p>The CLI is the following key feature:</p><p><strong>&gt;</strong>Exception Handling: Exceptions are errors that occur when the application is executed.</p><p>Garbage Collection:</p><p><strong>&gt;</strong>Garbage collector is a feature of CLR which is an unused manage object and reclaim memory.</p><p>Example:</p><p>If the database connection is no longer required. then the application has finished all operations.</p><p><strong>&gt;</strong>Working with various programming language:</p><ul><li>Language-The first level of the programming language itself. The languages are VB.net and C#.</li><li>Compiler-The second level Compiler for <strong>each programming language has a separate compiler</strong>. The VB.net has a VB.net compiler and C# have C# Compiler.</li><li>Common Language Interpreter-This is the last level of the .net framework. This level is used for run .net program developed in any programming language. So the subsequent compiler sends the program to the CLI layer to run the .net application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*WJO5GGDfRb8qAesZJ3DJmw.png" /><figcaption>Common Language Interpreter Diagram</figcaption></figure><h3>.Net Core</h3><p>The .net core is a free and open-source managed computer software framework for Windows, Linux, and macOS operating systems. It is cross-platform.</p><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73f9907a687" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LINQ]]></title>
            <link>https://medium.com/@supriyaghevade77/linq-4ad65276c7dc?source=rss-d941ed93e6de------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ad65276c7dc</guid>
            <category><![CDATA[dotnet-step-by-step]]></category>
            <category><![CDATA[csharp-learn-step-by-step]]></category>
            <category><![CDATA[csharp-code]]></category>
            <category><![CDATA[linq]]></category>
            <category><![CDATA[csharp-tutorial]]></category>
            <dc:creator><![CDATA[Supriya Ghevade]]></dc:creator>
            <pubDate>Tue, 31 Dec 2019 11:42:42 GMT</pubDate>
            <atom:updated>2019-12-31T11:42:42.723Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Language-Integrated Query</em></p><p><strong>LINQ is a uniform programming model for any kind of data access. LINQ enables to query and manipulate data independently of the data source.</strong> It is integrated with C# and VB, thereby eliminating the mismatch between programming languages and databases, as well as providing a single querying interface for different types of data sources.</p><p>For example, SQL is a Structured Query Language used to save and retrieve data from a database. In the same way, LINQ is a structured query syntax built-in C# and VB.net to retrieve data from different types of data sources such as object collections, ADO.Net DataSet, XML Docs, web service, and MS SQL Server and other databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*8MQ9ahlVoVK2cXH2ofV_AQ.png" /><figcaption>LINQ Usage</figcaption></figure><p>LINQ queries return results as an object. It uses an object-oriented approach to the result set and doesn’t worry about transforming different formats of results into objects. It’s like a query language that can query any data source and any transform LINQ also provides full type safety and compile-time checking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*iUehn8kVhC09zdjgy98kMg.png" /></figure><p>LINQ can serve as a good entity for the middle tier. So it will sit in between the UI and data access layer.</p><p>LINQ has generated a query and fire any kind of data source like SQL, Excel, etc. It helps to do transformation any kind of data source probably have one to many relationships, hierarchy relationship.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*L8br-akAfT5rM0Uz24TCFg.png" /><figcaption>LINQ Query</figcaption></figure><p>Here using List&lt;&gt;. The record is found from the Customer. Where temp is object of Customers of DbSet</p><p>The<strong> DbSet </strong>class represents an entity set that can be used for creating, read, update, and delete operations.</p><p>The context class (derived from <strong>DbContext</strong>)must include the <strong>DbSet</strong> type properties for the entities which map to database tables and views.</p><h3>Why LINQ?</h3><p>Readable code: <strong>LINQ</strong> makes the code more readable so other developers can easily understand and maintain it. The same <strong>LINQ</strong> syntax can be used to query multiple data sources. Compile-time safety of queries: It provides the type checking of objects at compile time.</p><p><strong>LINQ API:</strong></p><p>Write LINQ queries for the classes that implement IEnumerable&lt;T&gt; or IQuerable&lt;T&gt; interface. Use System.Linq namespace to use Linq.</p><p>Enumerable:</p><p>The Enumerable class includes extension methods for the classes that implement IEnumerable&lt;T&gt; interface, for example, all the built-in collection classes implement IEnumerable&lt;T&gt; interface and so we can write LINQ queries to retrieve data from the built-in collections.</p><p>Queryable:</p><p>The Queryable class includes extension methods for classes that implement the IQueryable&lt;t&gt;interface. The IQueryable&lt;t&gt; interface is used to provide querying capabilities against a specific data source where the type of data is known. For example, Entity Framework API implements IQueryable&lt;t&gt; interface to support LINQ queries with underlaying databases such as MS SQL Server.</p><p>Also, there are APIs available to access third party data; for example, LINQ to Amazon provides the ability to use LINQ with Amazon web services to search for books and other items. This can be achieved by implementing the IQueryable interface for Amazon.</p><p>As a new learner to c# recommending to see below project series: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ad65276c7dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>