pause >nul
Learn Angular, MVC Core, EF Core, SQL Server Step By Step
Learn Angular MVC Core
Crack
STACK AND HEAP
- Stack always reserved in the Last in first out i.e. LIFO.
- Variable allocated on the stack are stored directly to the memory and access to this memory is very fast.
- We can use the Stack if we know exactly how much data have required to allocate before compile time. While in Heap we don't know exactly.
- Insert the data item at the top of Stack is called PUSH.
- Delete the data item at the top of Stack is called POP.
- Heap is a area of memory where chunk are allocated to store to certain kind of data object.
- Variable allocated on the Heap have their memory allocated at run time and accessing this memory bit slower.
Boxing and Unboxing
23th Day
Hey Guys, I hope that you are Enjoying with my blogs writing and in previous blog we have learnt about Memory Leak , Garbage Collector and Today's we will learn Boxing and Unboxing . Let's see
- Boxing is an implicit Conversion from value type to reference type.
- Here i=10 has stored in stack with address above shown in diagram its moving value i to o its a value type.
- Unboxing is an explicit Conversion from reference type to value type.
- And in heap o=10 its also moving from o to y its a reference type.
- Line 1: Function will run as it is for warmup period and then actual measuring will start from Line 2.
- Line2: Stopwatch measure time below of milli sec and now will start measure its ElapsedTicks.static void Heavyloop(){for(int i=0; i<100000;i++){int z = 10;//Value Typeobject x = z;// reference type}}
- static void Heavyloop(), in this function we written code for boxing and Unboxing how much time it will take in performance. For that we set stopwatch.
- stopwatch, find function how much time taking for execution.
- Now let's run this code ,sometimes give 5 digits figure or 4 digits figure
- 1st output ElapsedTicks:
- 2nd output ElapsedTicks
- 3rd output ElapsedTicks
- It means that in non Primitive Data type, Due to Boxing and Unboxing its figure digits are different most of the time may be 4 to 5 digits.
- But in case of Primitive Data type always be the same figure due to no Boxing , Unboxing occurs.
- It is similar to array, it provides more flexible way to work with group of objects.
- It can grow and shrink Dynamically. // line 1int[] salesfigures = new int[] { 1000, 2000 };// line 2ArrayList l = new ArrayList();l.Add(1);l.Add("one");Console.WriteLine("Hiii"); /line 3List<int> Is = new List<int>();Is.Add(1);
- Line 1: It is Strongly typed and there are no Boxing/Unboxing so its performance will be faster. Its resizing is difficult. This is an Array.
- Line 2: Boxing/Unboxing will be happen that's why its performance will be slower but it will be very flexible. This is the array list.
- List<T>, Dictionary< Tkey, Tvalue>, sortedlist<Tkey,Tvalue>, Queue<T>, Stack<T>, Hashset<T> are used in Generic Collection.
- There are three types of Collection
- Array
- Array list
- Generic list.
Memory Leak , Garbage Collector
22th Day
Hey Guys, I hope that you are Enjoying with my blogs writing and in previous blog we have learnt about Primitive Data Type, And then see Stack, Heap, Value Type and Reference Type and Today's we will Memory Leak , Garbage Collector
- Garbage Collector runs in the background its a background process.
- It runs un-deterministically it means we doesn't know when it will come to release space.in that case application stops for naino sec.
So we can see in the above snapshot there are no appear GC in primitive Data type.
BootStrapping Angular cycle
16th Day
Hey Guys, I hope that you are enjoying with my blogs writing and in previous blog we have created a project and used ngModel and Directives and today's we will see concepts of Bootstrapping Angular Cycle so let's see Introduction .
Angular is a binding framework that is used to create web application. Angular uses typescript to write our business logic and method but browser does not understand typescript. The browser understand JavaScript . so that's why Angular CLI come into picture.
Angular CLI is a command-line interface tool that use to initialize, develop, scaffold and maintain Angular application directly from a command shell. It help us to create projects easily and quickly.
Work of BootSrapping
- As we know that about view , model and component.
- View i.e. app.component.html
- model i.e. app.model.ts
- Component i.e. app.component.ts
- Module i.e. app.module.ts
- index.html: This is the first file which will run and this file run to main.ts and it is run to Module.
- i.e. first will run index.html->it will run to main.ts-> it will run to module.
- platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.error(err));
- In main.ts, These above code run the module.
- In this Bootstrap , AppComponent will invoked first.
- export class AppModule{} it is very simple TypeScript class
- View and Component ,connected with template url. which is mentioned in below component.
- In index.html has "<app-root></app-root>" is called selector.Gets loded into view.
Button Click And Grid: We have button and patient object, we want to add in internal collection and it should be display in table
Its Input has mentioned in previous block click here
Output:
Must refer this videos for more details:
Thank You...!
SQL Indexes Clustered and Non Clustered
Hey Guys, I hope that you are enjoying with my blogs writing and today's we will cover some "SQL SERVER" Concepts.
- Indexes Improves the performance of search or An index is one of the important paths to make the performance of SQL server database high.
- An index is a pointer to data in a table.
- It helps to speed up select queries and Where clause but it slow down data input with the Insert, Update and Delete.
- They are stored in a B- tree structure (Balance search tree) that helps SQL Server users quickly and efficiently find the rows or associated with key values.
- Defragmentation in SQL, It changes the physical ordering of data (as it loses contiguous allocation) and the retrieval becomes time consuming, resulting in slow database performance.
- There are two types of Indexes in SQL server.
SQL Backing up, Restore and script based
Hey Guys, I hope that you are enjoying with my blogs writing and today's we will cover some "SQL SERVER" Concepts.
- Backup: A copy of SQL server data that can be used to restore recover the data after failure.
- A backup of SQL server that is created at the level of database or one or more of its file or filegroup.
- Full Backup: The most basic and complete type of backup is a full backup. This type of backup makes a copy of all data to a storage device, such as disk or tape
- Incremental Backup: It is a type of backup that only copies data that has been changed or created since the previous backup activity was conducted.
- Differential Backup: A data backup that is based on the latest full backup of a complete or partial database.
- Incremental backup, sometimes called Differential backup while Differential backup are sometimes called "Cumulative backup".
- Transaction Log: It is an integral part of SQL. Every database has a transaction file that is stored within the log file that is separated from data file It records all database modification.