<?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 Priti Patil on Medium]]></title>
        <description><![CDATA[Stories by Priti Patil on Medium]]></description>
        <link>https://medium.com/@patilpritishivaji?source=rss-5f6dc03e3a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MuwQuSuAmrdTibLDvioqhQ.jpeg</url>
            <title>Stories by Priti Patil on Medium</title>
            <link>https://medium.com/@patilpritishivaji?source=rss-5f6dc03e3a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 21:41:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@patilpritishivaji/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[JS Shadowing and IIFE]]></title>
            <link>https://medium.com/@patilpritishivaji/js-shadowing-and-iife-ec89b4aa8d67?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec89b4aa8d67</guid>
            <category><![CDATA[shadowing]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 16:57:19 GMT</pubDate>
            <atom:updated>2025-03-27T16:41:16.986Z</atom:updated>
            <content:encoded><![CDATA[<p>Here I am sharing my old, favorite and first blog.</p><h3>Shadowing in JavaScript :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*d81PB3N14qgObhXVPvcxhg.png" /></figure><ul><li>Simply put, shadowing is the process of making an exact copy of something.</li><li>In programming, when a function or variable declared within an inner class has the same name as a function or variable declared in an outer class, then shadowing occurs.</li><li>So there are two concepts:</li></ul><ol><li>Variable Shadowing</li><li>Function Shadowing</li></ol><ul><li>We can say that the outer variable or function is shadowed by the inner variable or function.</li><li>We can also say that the inner variable or function is a mask of the outer variable or function.</li></ul><h3>Variable Shadowing:</h3><ul><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*w3RFUOQ1iQgQz8kQJtwAOQ.png" /></figure><ul><li>Output:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*q-mjrXsRZhUxxsaGiiH4TQ.png" /></figure><ul><li>In the above code, variable a declared in the outer scope has the value 10 and variable b declared in the inner scope has the value 5.Because of shadowing, it shows the inner scope value after a function call. If we display the variable a in the outer class, then it shows 10.</li></ul><p>i.e</p><p>alert(a); //10</p><h3>Function Shadowing:</h3><ul><li>Example:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*RkH_adH2nTeNX7fjZ36W0g.png" /></figure><ul><li>Output:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/0*nSxH3QdfyMMFPSt0.PNG" /></figure><ul><li>In the above example, we declared two functions with the same name. The first function wants to display Hii!! and the second wants to display Hello!!. As we see above output it shows Hello!! only.</li><li>It is because the second function shadows the first. So it only shows the second function output.</li><li>If we want to display both functions, we can use the <em>IFE </em>concept. This means we declare the first function as “ife” and the second remains the same.</li><li>How do we make the first function iife?… we will see later in this blog.</li><li><em>“The shadowing is not used by the programmers because, for lengthy projects, it is impossible to find the errors in the whole program if we give the same names. So programmers prefer unique names.”</em></li></ul><h3>IIFE:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*zuLyeEHn5fbol4jiH0gAgA.png" /></figure><ul><li>IIFE stands for “Immediately Invoked Function Expression.”</li><li>IIFE is a self-invoking function, i.e., it automatically invokes when a definition is completed.</li><li>IIFE contains parenthesis (), which are important here; these parenthesis contain expressions, not statements.</li><li>IIFE has variables and methods that are not accessible from outside. If we want to access them, we must pass a global window object as a parameter.</li><li>Syntax:</li></ul><p>( function(){</p><p>//statements or code</p><p>}) ();</p><ul><li>Example 1:</li></ul><p>//IIFE without passing arguments</p><p>(function (){</p><p>var a=”Learn”;</p><p>function simple(a){</p><p>var b=” Angular”;</p><p>alert(a+b);</p><p>}</p><p>simple(a);</p><p>}) ();</p><ul><li>Output:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/0*bFwW38s7gI6Oq3KY.PNG" /></figure><ul><li>Example 2:</li></ul><p>//IIFE with passing arguments</p><p>var a=”Learn”;</p><p>( function(n) {</p><p>function simple(n) {</p><p>var c=” JavaScript”;</p><p>alert(n+c);</p><p>}</p><p>simple(n);</p><p>}) (a);</p><ul><li>Output:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/0*o01zCymwB-shxCyd.PNG" /></figure><h4>Advantage of IIFE:</h4><p>1) IIFE is an self invoking function.</p><p>2) If the variables and functions defined in IIFE then they don’t conflict with other variables and functions even if they have same name.</p><p>3) They are useful for one time execution of task.</p><p>I hope you understand the concepts of JS shadowing and IIFE. Also, suggest the next topic for the article.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec89b4aa8d67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IL and JIT in C#]]></title>
            <link>https://medium.com/@patilpritishivaji/il-and-jit-in-c-5a3e6824610d?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a3e6824610d</guid>
            <category><![CDATA[compilation]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 15:23:13 GMT</pubDate>
            <atom:updated>2023-02-09T15:34:40.411Z</atom:updated>
            <content:encoded><![CDATA[<p>Compilation Steps :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*VII6BJzAD2UFBREyLj-a9w.png" /></figure><h3>IL :</h3><ul><li>IL stands for “intermediate language.”</li><li>This term is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language).</li><li>Using a JIT (just-in-time) compiler, we can use IL on any computer architecture.</li><li>The IL is the object-oriented programming language used by.NET framework compilers.</li><li>The IL includes two types of instruction sets: base instructions (CPU instructions) and object-model instructions (high-level).</li><li>In C#, before the code gets compiled into machine code, it compiles into IL code.</li></ul><p><strong><em>To obtain the IL code, follow these steps:</em></strong></p><p>1) Build the program first.</p><p>2) Open the programme in File Explorer.</p><p>3) A folder with the.dll (dynamic link library) extension is associated with console applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*csdBHb539hHVDW6v_KTe4w.png" /></figure><p>4) Open the vs developer command prompt and type “ildasm” and enter. We can see a window now, and we’re going to drop the.dll into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWMqAFDPwrc_K9jlCZJxLQ.png" /></figure><p>5) Click on the console app until we see the void main, and open the void main for IL code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*SYoFvXWAcDEMGvF27DFtlg.png" /></figure><h3>JIT :</h3><ul><li>The JIT stands for Just-in-time.</li><li>The language specific compiler converts source code to IL and JIT compiler converts IL to machine code.</li><li>The JIT compiler is used to speed-up the execution.</li><li>The JIT compiler uses less memory as methods that required at run-time only compiled into machine code.</li><li>The JIT has three types :</li></ul><p>1) Pre-JIT compiler : The pre-JIT compiler is used to compile all source codes compiled into machine code at same time in a single-cycle.</p><p>2) Normal-JIT compiler : The normal-JIT compiler is used when source code that are required at run-time compiled into machine code at first time. If the methods are not required anymore they are stored in cache for future use.</p><p>3) Econo-JIT compiler : The econo-JIT compiler is used when source code that are required at run-time compiled into machine code. If the methods are not required anymore, they are removed.</p><p>I hope you understand the IL and JIT.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a3e6824610d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP .NET Session Management]]></title>
            <link>https://medium.com/@patilpritishivaji/asp-net-session-management-a9fa4eae0366?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9fa4eae0366</guid>
            <category><![CDATA[session-management]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Tue, 17 Jan 2023 06:29:03 GMT</pubDate>
            <atom:updated>2023-01-17T06:31:32.122Z</atom:updated>
            <content:encoded><![CDATA[<h3>ASP .NET Session Management</h3><p>Let’s understand cookies, sessions, stateless and stateful protocol.</p><h3>Q. Why is the HTTP protocol referred to as “stateless”?</h3><ul><li>The HTTP protocol is referred to as “stateless” because the http server does not keep any records.</li><li>When a client requests something from the server, the server treats each request independently (it does not consider whether it has been requested previously or not).</li><li>We can also say that when the client ends the process of any task, the connection between the server and browser also terminates.</li><li>In the below example, we can see that after accessing the browser, when we again access it, the value of i starts again from 0.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*uATWOX4DTnXiVZLpYoIKaw.png" /></figure><h3>Stateless Protocol :</h3><ul><li>Stateless protocols are those in which the client sends a request to the server and the server responds with the current state.</li><li>The server is not required to keep client information for each client who makes multiple requests.</li></ul><p><em>Some important features of the stateless protocol are:</em></p><ul><li>They simplify the server design.</li><li>They require fewer resources because the system does not keep records and session details.</li><li>They don’t need any references for any packets.</li></ul><h3>Q. How to make the HTTP protocol stateful?</h3><ul><li>To make the HTTP protocol stateful, we can use session management techniques.</li><li>It uses data from a previous request in the present request.</li><li>It uses the same connection for a series of client-server interactions for a limited time.</li><li>We can see in the example below that we used sessions, and the value is incremented whenever we access before terminating the task.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*60S75LwVjTdvGnXxpbvCZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*6jVqujmoELHimiCtumvgvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*pb8D6oe_YWKRhRgG1aU1QA.png" /></figure><h3>Q. What are cookies?</h3><ul><li>Cookies are state management techniques that we can use to store information for later use.</li><li>Cookies are small text files that are stored temporarily in the browser’s memory or permanently on the hard disk.</li></ul><h3>Q. What are sessions?</h3><ul><li>We can say that “session” means a time period for something.</li><li>In session variables, we can store the user’s information and destroy the session when the user logs out.</li><li>It stores values as an object like a dictionary, so typecasting is necessary while retrieving the value.</li><li>To avoid the null exception, we must do a null check before retrieving the value.</li><li>The session passes data from the controller to the view.</li><li>We also have some session behaviour attributes like default, required, read-only, and disabled.</li></ul><h3>Example :</h3><p>1) When we inspect the cookies :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hfUkQEtW9s01Mr6MkfS5RQ.png" /></figure><p>2) When we delete cookies, the task gets terminated, and session variables are set to their default values again. We can also see that the size is changing :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rtWoQ5FO2m_1QBgKLhy0dg.png" /><figcaption>Delete cookies</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkuwedGA72UIGUUzoVildA.png" /><figcaption>New cookie</figcaption></figure><p>I hope you understand the concept of Session Management.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9fa4eae0366" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Casting and Conversion in C#]]></title>
            <link>https://medium.com/@patilpritishivaji/casting-and-conversion-in-c-22a64016e73f?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/22a64016e73f</guid>
            <category><![CDATA[conversion]]></category>
            <category><![CDATA[casting]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Tue, 15 Nov 2022 16:04:00 GMT</pubDate>
            <atom:updated>2022-11-18T14:10:58.355Z</atom:updated>
            <content:encoded><![CDATA[<h3>Casting :</h3><p>Casting means copying or converting a value from one data type to another. Casting is divided into two types :</p><h4>1) Implicit casting :</h4><ul><li>Implicit casting is done automatically by the compiler when we pass a smaller type value to a larger type.</li><li>If we assign a larger data type to a smaller data type, then it won’t work here.</li><li>From smaller to larger data types : byte &gt; short &gt; int &gt; long &gt; float &gt; double.</li><li>Also, before converting, the compiler checks for compatibility, which means that only numeric data types are compatible with one another; there is no conversion between numeric and char or boolean.</li><li>Also, char and boolean are not compatible with each other.</li><li>There are many compilation errors (missing cast) when types are not compatible with each other.</li><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*V-d9IB2XzbnhKge_uFFcPg.png" /></figure><h4>2) Explicit casting :</h4><ul><li>If we want to assign a value of a larger data type to a smaller data type, we perform explicit casting.</li><li>The explicit casting is done manually by the user according to their needs by placing the data type in parenthesis in front of the value.</li><li>This is used for incompatible data types where automatic casting cannot be done.</li><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*lN2K3jgaiyTD4abqG-2uaA.png" /></figure><h3>Conversion :</h3><ul><li>The conversion means converting one type to another.</li><li>Conversion is the same as casting, but here we use the Convert.To() function for conversion.</li><li>Some conversion methods are :</li></ul><ol><li>ToBoolean() : Converts a type to a boolean value.</li><li>ToInt32() : Converts a type to a 32-bit integer.</li><li>ToSingle() : Converts a type to a small floating point number.</li><li>ToString() : Converts a type to a string.</li><li>ToDateTime() : Converts a type(int or string) to date-time structure.</li></ol><ul><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJWj9CtcdyW2x07FCDXdpA.png" /></figure><p>I hope you understand the concept of Casting and Conversion in C#.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22a64016e73f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Garbage Collector and Memory leak in C#]]></title>
            <link>https://medium.com/@patilpritishivaji/garbage-collector-in-c-b0528773e929?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0528773e929</guid>
            <category><![CDATA[memory-leak]]></category>
            <category><![CDATA[garbage-collector]]></category>
            <category><![CDATA[csharp-programming]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Wed, 21 Sep 2022 13:21:04 GMT</pubDate>
            <atom:updated>2022-11-18T14:08:48.801Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s start with the memory leak.</p><h3>Memory Leak :</h3><ul><li>If a programme does not return or release allocated memory space even after the execution is done, then it results in slower or unresponsive system behavior, which is called a “memory leak”.</li><li>A <strong>memory leak</strong> may also happen when an object is stored in <strong>memory</strong> but cannot be accessed by the running code.</li><li>Even though we have a GC(garbage collector), memory leaks easily happen.</li></ul><p><em>Some common reasons for memory leaks are :</em></p><p><strong>1. Events :</strong></p><ul><li>The most common cause of memory leaks is .NET event listeners. We create an event and forget to remove it.</li><li>We can avoid this by unsubscribing to the subscribed event, using weak-handlers, etc.</li></ul><p><strong>2. Static :</strong></p><ul><li>Static objects live at the GC root and they are never collected by the collector.</li><li>As we all know, the static instances stay forever in memory, which causes a memory leak.</li></ul><p><strong>3. Cache :</strong></p><ul><li>Because all collections rely on cache, the cache eventually runs out of space.</li></ul><p>We can check memory usage by following this path :</p><p><em>Debug&gt;Performance profiler &gt;Memory usage &gt;Start</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*QFSoUocrjSZtrN07WT7pJw.png" /></figure><h4>How is stack memory cleared ?</h4><ul><li>The stack memory is cleared automatically at the end of the method.</li><li>The CLR(Common Language Runtime) takes charge of clearing stack memory.</li><li>The stack uses primitive data types, i.e. the primitive data types clear their memory as self-response. They don’t need GC.</li><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*-KcVZ7gMSYMZIDxSuL98tQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*1gTnwhUBGpWQv9nRFQFPRQ.png" /></figure><h3>Garbage Collector :</h3><ul><li>The garbage collector is an automatic memory manager which is responsible for the allocation and release of memory.</li><li>We can also say that “GC means regaining the memory assigned to objects which are not in use”.</li><li>GC always works on a managed heap.</li></ul><p><strong><em>What is managed and unmanaged code ?</em></strong></p><ul><li>Objects that are created and managed under the CLR are called managed code.</li><li>Unmanaged code refers to objects that are created and managed outside of the CLR (for example, database connections).</li></ul><p><strong><em>When does garbage collection occur?</em></strong></p><ul><li>When there isn’t enough memory to allocate objects, the GC must collect and release garbage memory to make memory available for new allocations.</li><li>If the system has low physical memory, then garbage collection is necessary.</li><li>As we now know, GC occurs automatically, but if we call the GC.Collect () method in an uncertain situation, GC also occurs.</li></ul><h4>Phases in GC :</h4><p>Their are 3 phases in GC :</p><p>1. Generation 0 :</p><ul><li>They are considered to be short-lived objects.</li><li>The newly crated objects are placed here.</li></ul><p>2. Generation 1 :</p><ul><li>These are considered as a buffer between short-lived and long-lived objects.</li></ul><p>3. Generation 2 :</p><ul><li>They are considered long-lived objects.</li><li>The static members and global variables are placed here.</li></ul><p><em>Some points you may know :</em></p><ul><li>When GC starts scanning for objects, it first scans Generation 0 and then determines which objects are needed again and shifts them into Generation 1. If they needed it again, they shifted to Generation 2.</li><li>When processing starts, GC starts creating a tree, and which objects are not present are considered garbage and destroyed, and GC gets memory back.</li><li>When the GC process comes to an end, it’s GC’s responsibility to re-assign the memory addresses of destroyed objects to living objects.</li></ul><p><strong>Benefits of GC:</strong></p><ul><li>We don’t need to free memory manually.</li><li>It efficiently allocates objects on a managed heap.</li><li>It keeps memory available for future use also.</li></ul><p><strong>Example :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*UiOuutH30OcS4FAxJy9L-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*jee9ZSSzbCq_veXRKAAZ7Q.png" /></figure><p>I hope you understand the concept of garbage collector.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0528773e929" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backup , restore and scripts in SQL]]></title>
            <link>https://medium.com/@patilpritishivaji/backup-restore-and-scripts-in-sql-1359a70e04d9?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1359a70e04d9</guid>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[restore]]></category>
            <category><![CDATA[script]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Tue, 06 Sep 2022 10:02:45 GMT</pubDate>
            <atom:updated>2022-11-18T14:26:09.187Z</atom:updated>
            <content:encoded><![CDATA[<h3>Backup database, Restore database and Generate scripts in SQL Server</h3><h3>SQL Backup :</h3><ul><li>The backup copies the data or log records from the database to a device such as a disc.</li><li>This copy can be used to restore or recover the data after failure.</li><li>There are three main types of backup :</li></ul><h4>1. Full backup :</h4><ul><li>It is a backup of the whole database.</li></ul><h4>2. Differential backup :</h4><ul><li>It is based on the latest full backup of a complete or partial database.</li></ul><h4>3. Log backup :</h4><ul><li>It is the backup of transaction logs that has all log records that were not backed up in the previous log backup.</li></ul><p><strong><em># Steps for backing up a database :</em></strong></p><p>1) Connect to the database and expand the database. Select the database which we want to backup :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*oBKCwYx04_qNm5wBBbngQw.png" /></figure><p>2) Select the backup type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*ftVXlDDmfrRKQN0wXxMo9g.png" /></figure><p>3) You can add a new destination and add the.bak extension :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*179MG9mU5LKLrF-hSZg2tQ.png" /></figure><p>4) Then click on “Ok” and the database backup is completed :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*eEQOP0GsDEv65oEGftB83A.png" /></figure><p>5) You can check whether the backup was created successfully or not in the destination folder :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*W_minM3Tx92rIF0BMr2VBw.png" /></figure><h3>SQL Restore :</h3><ul><li>A restore is a process of restoring or recovering data from a backup file.</li></ul><p><strong><em># Steps for restoring the database :</em></strong></p><p>1) Click on database =&gt; Restore database :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*qpEH1UHskmk6flzGMJAeIw.png" /></figure><p>2) Then click on device and select backup device :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*7lSsjzQLnhz1yGMZ1RrYfw.png" /></figure><p>3) Give a name to the database :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*yi6fkCQHdCiYPIyuHxSasA.png" /></figure><p>4) The database has been restored successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*_e8JHNgAT9PnBPlZZOqpYA.png" /></figure><p>5) And refresh database to see restored database :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*awqY3HJvSWOJmfyWdbJfXw.png" /></figure><h3>SQL Scripts :</h3><ul><li>We can create or generate scripts for transferring databases between instances.</li><li>An SQL script is a set of SQL commands which are stored as a file in SQL scripts.</li></ul><p><strong><em># Steps for generating scripts :</em></strong></p><p>1) Click on database =&gt; Task =&gt; Generate scripts :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*NFDbGkANG97zdOSFxowXaQ.png" /></figure><p>2) After clicking next, choose the entire database or a specific object :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*P70BMdNS_GYnJK5E58mT8Q.png" /></figure><p>3) Click on “Save as script file” and change the destination file name if you want :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*Ar3RZKnXmeEJ8WhngM-p_A.png" /></figure><p>4) We can see the scripts are saved. Now click on Finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*aaQcwYC3JWXyV29mcwep6w.png" /></figure><p>5) Open the destination folder and verify if the script is generated or not :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*YqQ7MB0vAv1FcoDih2jPPA.png" /></figure><p>6) Click on the script file, and we can see the set of commands :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*WTSvCkumLHxXFPveOpVLhg.png" /></figure><p>I hope you understand how to backup the database, restore the database, and generate scripts in SQL.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1359a70e04d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stack and Heap in C#]]></title>
            <link>https://medium.com/@patilpritishivaji/stack-and-heap-in-c-e431c1a1c0f2?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e431c1a1c0f2</guid>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[reference-type]]></category>
            <category><![CDATA[value-type]]></category>
            <category><![CDATA[heap]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Tue, 23 Aug 2022 15:40:28 GMT</pubDate>
            <atom:updated>2022-11-18T14:03:09.869Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s start with value type and reference type.</p><p>The Value type and the Reference type are the two data types which are divided on the basis of how they store their values in memory.</p><h4>Value Type :</h4><ul><li>A data type is said to be a value type if it holds a data value in its own memory.</li><li>Variables of this data type directly contain values.</li><li>The data types which are value types are : bool, byte, int, char, float, enum, short, long, struct,decimal, double, etc.</li><li>If a variable is passed by value type, then the system creates another copy of that variable.</li><li>Because of this, if a value is changed for one variable, it won’t affect another.</li><li>It uses a stack for storing data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_mWFDwoPLUjB7JCI063Cxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D3JVZxnCuSkVOTXKbHrFGQ.png" /></figure><h4>Reference Type :</h4><ul><li>The reference type doesn’t store its value directly.</li><li>It stores the address(stack) where the value(heap) is being stored.</li><li>A reference type contains a pointer which points to another memory location where the data is stored.</li><li>It uses stacks as well as heaps for storing data.</li><li>The data types which are reference types are : Array, Class, String etc.</li><li>When a variable is passed by reference type, it does not make another copy like it does when passed by value type.</li><li>As it passes through variable address, when we change one value, the second also gets changed as they point to one location.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUN3HS6Zh_MC9z_ZKXOA_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5GEehOe0J4sv23fJthjcUA.png" /></figure><blockquote>String is a reference type but immutable. Means once we assigned a value, it won’t be changed later. If we change string value, compiler creates new object in memory and point variable to new location. So it won’t change the original value.</blockquote><h3>Stack and Heap :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*YTMaCQtb4OzM1rSeTxSU_w.gif" /></figure><h4>Stack :</h4><ul><li>The stack is a LIFO(Last-In-First-Out) data structure where the data can be added and deleted from the top of the stack.</li><li>A stack is a linear data structure having contiguous blocks.</li><li>All variables in the stack are of value-type.</li><li>Stack allows us to access local variables only.</li><li>The allocation of memory is static.</li><li>The access time is longer compared to the heap.</li><li>The memory deallocation is done when the method completes its execution.</li></ul><h4>Heap :</h4><ul><li>The heap is an area of memory where data can be added and deleted in any order.</li><li>A heap is a hierarchical data structure having random order.</li><li>Variable declarations in heap are of the reference type.</li><li>The heap allows us to access global variables.</li><li>The allocation of memory is dynamic.</li><li>The access time is less compared to the stack.</li><li>The memory deallocation is done by the user using a garbage collector.</li></ul><p>The structure of a stack and a heap for the above example is :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZhUtk7Y02thfFsST-57-Q.jpeg" /></figure><p>I hope you understand the concept of stack and heap.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e431c1a1c0f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Boxing & Unboxing in C#]]></title>
            <link>https://medium.com/@patilpritishivaji/boxing-unboxing-in-c-11f9cc36e635?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f9cc36e635</guid>
            <category><![CDATA[boxing]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[unboxing]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 15:08:09 GMT</pubDate>
            <atom:updated>2022-11-18T14:05:29.739Z</atom:updated>
            <content:encoded><![CDATA[<h3>Boxing and Unboxing in C#</h3><h3>Boxing :</h3><ul><li>Boxing is the process of converting a value-type to a reference-type.</li><li>CLR(Common Language Runtime) wraps a value inside System.Object instance and stores it on managed heap(memory).</li><li>In simple words, boxing is used to store the value type in the garbage collected heap.</li><li>Boxing is an implicit conversion of value type to object.</li><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*13WXWpUyGf5yR0oZof7iIw.png" /></figure><p>In the above example, “a” is an int(value-type) with a value of “200”. After that, object ‘o’ copies value from ‘i’, i.e boxing. This statement creates an object reference ‘o’ on the stack and references a value of type int(‘i’) on the heap.</p><ul><li>We can also perform explicit boxing, but it is not required.</li><li>Example :</li></ul><p>int i=235;</p><p>object o=(object)i; //explicit boxing</p><ul><li>Boxing always makes a copy of value. So, changing the value of one variable will not affect the other, as shown in the above example.</li><li>The casting of boxed value is not permitted.</li></ul><h3>Unboxing :</h3><ul><li>Unboxing is the process of converting a reference-type to a value-type.</li><li>Unboxing is the explicit conversion of an object to a value type.</li><li>We can also say that unboxing is the process of retrieving value from a boxed object.</li><li>The unboxing operation consists of :</li></ul><ol><li>Checking the object instance to ensure it is a boxed value.</li><li>Copying a value from an instance to a value-type variable.</li></ol><ul><li>Example :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*RFqDmsd7yuSfPflqfLfRaQ.png" /></figure><p>In the above example, ‘a’ is an int(value-type) with a value of ‘50’. After that, object ‘o’ copies value from ‘i’, i.e boxing. This statement creates an object reference ‘o’ on the stack and references a value of type int(‘i’) on the heap.Following that, int ‘b’ copies the value from object ‘o,’ i.e. unboxing.The result of this statement is that it copies the value from the heap and stores it on the stack (into value-type ‘b’).</p><blockquote>“For unboxing an item, the item references an object that must be first boxed by value-type.”</blockquote><p><strong>Conclusion :</strong></p><ul><li>Boxing and unboxing degrade the performance, so developers always avoid using it. We can use generics to avoid this.</li><li>Boxing and unboxing consume more memory and time.</li><li>Both increase overhead and lack safety measures.</li></ul><p>I hope you understand the concept of boxing and unboxing.</p><p>Thank You😊!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f9cc36e635" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NgRx : State Management Solution for Angular]]></title>
            <link>https://medium.com/@patilpritishivaji/ngrx-state-management-solution-for-angular-5102c1193ba7?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5102c1193ba7</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[ngrx]]></category>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 16:02:44 GMT</pubDate>
            <atom:updated>2022-08-10T05:19:03.300Z</atom:updated>
            <content:encoded><![CDATA[<h3>NgRx : State Management Solution for Angular</h3><h4>An Introduction to the NGRX — Concepts with Example</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z7R7BYKmgnP9WISG.png" /></figure><p>In this article, I want to introduce you to the concepts in NGRX. NGRX stands for angular reactive extension based on the redux pattern.</p><h4>Why do we need state management ?</h4><p><strong>Case</strong> : The actual problem is that if we refresh any page, we will lose the application state stored in the angular services. So, if we use the angular services to keep the application state, it is necessary to use a backend to save the application state. Then, we should fetch the state from the backend when the page reloads again. But there will be multiple HTTP requests even if it is not needed to load every time.</p><p>The state is not just data; it will decide what should be visible on the UI. For smaller applications, it is fine to use components and services for application state management. But, it would become difficult to manage the application state when our application is complex and big. Then we can use state management to keep our state stored until we leave the page.</p><p><strong>State :</strong></p><ol><li>State represents every single piece of data in our application, like session, config, and user preference data.</li><li>State is an object tree which represents all data.</li><li>Everything is stored in a single object tree. The state is SPOT(single point of truth) and it is read only.</li></ol><h4>Introduction to NGRX :</h4><p>Before going to NgRx, let me brief you about Redux and RxJs :</p><p>&gt; Redux is a state management pattern.<em> </em>The main idea behind state management using the Redux pattern is that we have a <strong>single central store</strong> to keep all application’s state in one place.</p><p>&gt; RxJS is used for making async requests. Using RxJS, Angular components can subscribe to events using observables.</p><p><strong>NgRx :</strong></p><ol><li>NgRx is an angular-specific state management solution which allows us to create client-side databases with data(CRUD operations).</li><li>It minimises the number of http requests to the server by storing them in state.</li><li>It allows us to have a much improved user experience with minimum load (refreshing, updating).</li><li>The UI immediately reflects the data modification without multiple calls to the server.</li></ol><p><strong>NgRx Packages/Components :</strong></p><ol><li><strong>Store</strong> : It holds the current state and all reducers. It is used to dispatch actions and get state updates. It uses observables to manage state in an Angular application. The primary advantage of using the NgRx Store is that it stores all state in a single tree that is accessible from any part of the application.</li></ol><p>Example :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*NojtFAdwpxWtLli8EnOSEg.png" /><figcaption>Calling action using store</figcaption></figure><p>2.<strong> Action</strong> : It describes all the changes in the state of the application. Actions are classes that hold information that is passed to reducers or that triggers side effects(if API calls).</p><blockquote><em>Actions have two parameters:</em></blockquote><blockquote><em>a) A unique identifier (must be marked as read-only).</em></blockquote><blockquote><em>b) A payload property that is optional and represents the data being passed to the action.</em></blockquote><p>Examples :</p><p>//Parameters example</p><p>export class LoginButtonClicked {</p><p>public readonly type = LoginActionTypes.LoginButtonClicked;</p><p>constructor(public payload: LoginRequestPayload) {}</p><p>}</p><p>export type UserActions = LoginButtonClicked</p><p>//Created Action example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*syU-IbmbASNNoop1UEWIvA.png" /><figcaption>Action</figcaption></figure><p>3. <strong>Reducer</strong> : It is a pure function that takes action and current state as parameters and returns a new state object. It ties the store and actions together by using the dispatched action to carry out a state transition.</p><p>Example :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*h3itqTepfrrNwnJsvN4nqQ.png" /><figcaption>Reducer</figcaption></figure><p>4. <strong>Selector</strong> : Selectors are pure functions used for obtaining a part of the state from the store. Selectors show how our application listens to the state changes. It uses the select function to call the selector as shown in the below code.</p><p>Example :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*ESqVantEauhE30bmhik2MA.png" /><figcaption>Calling selector using store</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5qhjXNL6z4SgNRQlPbyZpQ.png" /><figcaption>Selector</figcaption></figure><p>5. <strong>Effects </strong>: They are used to handle side effects for the store which are dependent on the HTTP requests. It sends HTTP requests and, based on the response, it dispatches new actions. Within Effects, we can manage various tasks, i.e., communication with the API, long-running tasks, etc.</p><blockquote>Finally, I can show you the output :</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g1xVelMIt6AfZz0XzXAefg.png" /><figcaption>Output</figcaption></figure><p>Some Key Concepts :</p><ol><li>Dispatch : It is a function exposed by the Store&lt;&gt; to emit an action to the reducer to perform the action. In the store explanation, I have given you the image of the code which contains the dispatch function.</li><li>Spread operator : The spread operator (…) allows us to quickly copy all or part of an existing object into another object. In the reducer, we have used the spread operator to copy the previous state and create a new instance for the current state.</li></ol><p>I hope you have understood and gained some knowledge from this article. Please let us know if you have any questions or comments.</p><p>Thank You !!!😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5102c1193ba7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL server for beginners]]></title>
            <link>https://medium.com/@patilpritishivaji/sql-server-for-beginners-e3f76f3cb728?source=rss-5f6dc03e3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3f76f3cb728</guid>
            <dc:creator><![CDATA[Priti Patil]]></dc:creator>
            <pubDate>Sun, 19 Apr 2020 14:04:34 GMT</pubDate>
            <atom:updated>2020-04-19T14:04:34.915Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article we are going to study the basics of SQL server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*ompSZADawoS-kWD7zpukRA.png" /></figure><blockquote>The SQL server is a relational database management system (RDBMS).</blockquote><blockquote>1) The SQL server is a database system which is used for storing and retrieving data when another software application or user require it.</blockquote><blockquote>2) This software application may run on same computer or another computer across network using internet.</blockquote><h4>History -</h4><ul><li>The SQL server was developed by “Microsoft”.</li><li>It is released in 1989 and the version is SQL Server 1.0 having 16-bit server.</li><li>The SQL server supports microsoft windows server operating system till 2016.</li><li>In 2017, microsoft adds the linux operating system which supports linux platforms : ubuntu, Red Hat Enterprise Linux, Docker engine.</li></ul><h4>Versions -</h4><ul><li>Currently the following versions are supported by microsoft :</li></ul><ol><li>SQL server 2012</li><li>SQL server 2014</li><li>SQL server 2016</li><li>SQL server 2017</li><li>SQL server 2019</li></ol><ul><li>The current version is Microsoft SQL server 2019.</li></ul><h4>Editions -</h4><blockquote>Enterprise -</blockquote><ul><li>The SQL server enterprise edition includes the core database engine and services with range of tools.</li><li>It is used at large scale and provide security, machine learning.</li></ul><blockquote>Standard -</blockquote><ul><li>The SQL server standard edition includes core database engine along with stand-alone services.</li></ul><blockquote>Developer -</blockquote><ul><li>It is similar to enterprise edition and mainly used for build, test and demo.</li></ul><blockquote>Workgroup -</blockquote><ul><li>The SQL server workgroup edition includes core database functionality but does not include the services.</li></ul><blockquote>Express -</blockquote><ul><li>The SQL server express edition includes core database engine which is free edition of SQL server.</li><li>The express edition includes advanced services and used in small scale applications.</li><li>The express edition includes SQL Server Management Studio and it is limited to using one processor.</li></ul><blockquote>Azure -</blockquote><ul><li>Microsoft Azure SQL database is a special edition of microsoft SQL server.</li><li>Azure is a cloud-based version of Microsoft SQL server.</li></ul><h4>Use of SQL server -</h4><ul><li>To create the database.</li><li>To maintain the database.</li><li>For analyzing and generating reports of data using different services.</li></ul><blockquote>In this article we studied the history and basics of SQL server.</blockquote><p>For more understanding watch below video -</p><p><a href="https://youtu.be/o9D6G-LVp5U">https://youtu.be/o9D6G-LVp5U</a></p><h3>Thank you!!!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3f76f3cb728" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>