What happens when we type a URL in the browser (In Depth)?


If you are reading this then i would recommend to read this  article first for a clear visibility that what we will understand in depth 🙂


Have you ever wondered, precisely – 

  • What happens in the background when we type a URL in the browser?
  • How does a web page life-cycle sequence work?
  • How browser knows, where to send request for the requested page?
  • What happens on the Web Server when a request for a web page comes in?
  • How does the Web server handle the incoming request?
  • How is the HTML that is emitted to the client generated?
  • How browser renders the page on the screen?
  • Etc…

If you are also looking answers of above mentioned questions then this article is definitely for you. In this article, we will take a deeper look at the sequence of events that take place when we visit a ASP.NET page URL –

  1. URL is…

View original post 622 more words



SQL Server : JOINS are used to retrieve data from multiple tables. A SQL Server JOIN is performed whenever two or more tables are joined in a SQL statement.

There are 4 different types of SQL Server joins:

1) INNER JOIN                       -or-              SIMPLE JOIN
2) LEFT JOIN                        -or-              LEFT OUTER JOIN
3) RIGHT JOIN                       -or-              RIGHT OUTER JOIN
4) FULL JOIN      -or-              FULL OUTER JOIN

INNER JOIN:-   INNER JOINS return all rows from multiple tables where the join condition is met.

INNER JOIN would return the…

View original post 552 more words

What is CSS Flexbox and how to use it?

Before the CSS Flexbox Layout module, there were four layout modes:

  1. Block, for sections in a web page
  2. Inline, for text
  3. Table, for two-dimensional table data
  4. Positioned, for explicit position of an element
  • CSS Flexbox is a whole module and not a single CSS property, it involves a set of properties.
  • Some of them are meant to be set on the container (parent element, known as “flex container”) whereas the others are meant to be set on the children (said “flex items”).
  • The Flexbox Layout module aims at providing a more efficient way to lay out, align and distribute space among items in a container.
  • The main idea behind the flex layout is to give the container the ability to alter its item’s width/height (and order) to best fill the available space
  • A flex container expands items to fill available free space, or shrinks them to prevent overflow.
  • Most importantly, the flexbox layout is direction-agnostic as opposed to the regular layouts (block which is vertically-based and inline which is horizontally-based).


Working with Flexbox-

  • When working with flexbox we need to think in terms of two axes — the main axis and the cross axis. The main axis is defined by the flex-direction property, and the cross axis runs perpendicular to it.
  • Items will be laid out either the main axis (from main-start to main-end) or the cross axis (from cross-start to cross-end).flex-axis

Properties for the Parent (flex container):

  • display: flex | inline-flex; – Allows us to create a flex container (a flex context for all its direct children),
    • flex-demo-1
  • flex-direction : row | row-reverse | column | column-reverse – Allows us to change the direction in which our flex items display. default is row.
    • flex-demo-direction
  • flex-wrap: nowrap | wrap | wrap-reverse; – Specifies whether the flex items should wrap or not. nowrap is default.
    • nowrap (default): all flex items will be on one line
    • wrap: flex items will wrap onto multiple lines, from top to bottom.
    • wrap-reverse: flex items will wrap onto multiple lines from bottom to top.
    • flex-demo-wrap.png
  • flex-flow: <‘flex-direction’> || <‘flex-wrap’> : is a shorthand property for setting both the flex-direction and flex-wrap properties.
  • justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly; : This defines the alignment along the main axis. It helps distribute extra free space left over when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size.
    • flex-start (default): items are packed toward the start line
    • flex-end: items are packed toward to end line
    • center: items are centered along the line
    • space-between: items are evenly distributed in the line; first item is on the start line, last item on the end line
    • space-around: items are evenly distributed in the line with equal space around them. Note that visually the spaces aren’t equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies.
    • space-evenly: items are distributed so that the spacing between any two items (and the space to the edges) is equal.
    • flex-demo-js.png
  • align-items: stretch | flex-start | flex-end | center | baseline; – property is used to align the flex items vertically.
    • stretch (default): stretch to fill the container (still respect min-width/max-width)
    • flex-start: cross-start margin edge of the items is placed on the cross-start line
    • flex-end: cross-end margin edge of the items is placed on the cross-end line
    • center: items are centered in the cross-axis
    • baseline: items are aligned such as their baselines align
    • flex-demo-ai.png
  • align-content: flex-start | flex-end | center | space-between | space-around | stretch; This aligns a flex container’s lines within when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis
    • flex-demo-ac.png


Properties for the Children (flex items):


  • order: <integer>; By default, flex items are laid out in the source order. However, the order property controls the order in which they appear in the flex container.
    • flex-demo-order.png
  • flex-grow: <number>/* default 0 */; property specifies how much a flex item will grow relative to the rest of the flex items. If all items have flex-grow set to 1, the remaining space in the container will be distributed equally to all children. If one of the children has a value of 2, the remaining space would take up twice as much space as the others 
    • flex-demo-grow.png
  • flex-shrink: <number>; /* default 1 */ – property specifies how much a flex item will shrink relative to the rest of the flex items.
  • flex-basis: <length> | auto; /* default auto */ – 
    • flex-demo-basis.png
  • flex: none | [ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ] – is a shorthand property for the flex-grow, flex-shrink, and flex-basis properties
  • align-self: auto | flex-start | flex-end | center | baseline | stretch; flex-demo-align-self.png







What is CAS, evidence, permission set & code groups?

When we want to execute any code in our environment we would first like to know from where the code came from. Depending from where it came from, then we would like to give him access rights. For instance a code compiled from your own computer would have greater rights than code downloaded from the internet.

So, Code Access security is a security model which grants or denies permission to your assembly depending on evidences like from where the code has emerged, who the publisher is? , strong names etc

What is evidence in CAS?

Evidences are like who is the publisher of the code , from which site has this code from , from which zone has it come from ( internet , intranet etc) etc.

What is a permission and permission set?

There are various permissions which you can assign to the code like Can the code create a file, can we write to registry, can the code execute reflection, can the code open file dialog box etc.

These permissions are collect permission sets and those permission sets are allocated to the code.

What is code group?

A code group is a logical grouping of code that has a specified condition for membership. Any code that meets the membership condition is included in thegroup. Code groups have associated permission sets that are evaluated during a policy grant.


So how does CAS work on runtime?

• Evidences are gathered about the assembly. In other words from where did this assembly come?
• Depending on evidences the assembly is assigned to a code group. In other words what rights does the assembly depending on the evidence gathered.
• Depending on code group the assembly is allocated security rights.
• Using the security rights the assembly is run with in those rights.



CAS is completely deprecated in .NET 4.0, there are two big changes:-

• Granting of permission is no more dependent on the .NET CAS, it’s now the job of the host. So the host who runs the .NET DLL will define what kind of rights will the assembly have. NET Framework 4.0 comes with CAS a disabled which means all applications started via Windows Explorer or the command prompt run with full trust. Hosted .NET applications, those running inside Internet Explorer or ASP.NET, will run at the trust level granted by their host, being partially trusted.

• Security transparent model is introduced which divides a .NET code in to 3 categories Security critical, Security transparent and security safe critical.