The Ultimate CSS SELECTOS Cheatsheet..

Worth to read one time friends…

https://www.adtrak.co.uk/wp-content/uploads/the_ultimate_css_selectors_cheatsheet.pdf

 

Programming is Easy…

Advertisements

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.

2

 

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.

 

References-

https://www.codeproject.com/Articles/120911/CAS-Code-access-security-NET-Security-model-FA

Data Structure?

What is a Data Structure?

  • A data structure is a systematic (or programmatic) way of organizing (or storing) the data, so that the data can be used efficiently.

OR

  • A data structure is a collection (grouping) of simple or structured data types and a set of rules (operations) for organizing and accessing the collection.

OR

  • A logical way of storing data and it also define mechanism of retrieve data.

Data Structure Types?

  • Linear : Data organize in a linear manner where data elements attached one after the other (i.e data items are placed in the memory contiguously).
    • Array
    • Stack
    • Queue
    • Linked List
  • Non – Linear : Data organize in a random manner where data elements are attached one to many (i.e a data item is connected to several other data items).
    • Tree
    • Graph

Possible Operations?

  • Traversing : Accessing each data item exactly once so that it can be processed.
  • Searching : Finding the location of the data item if it exists in the given collection of data items.
  • Insertion : Add a new data item in the structure.
  • Deletion : Removing a data item from the structure.
  • Sorting : Arranging the data items in some order.
  • Merging : Combine two data structures into one.

 

…. more to come soon.

How to style numbering on list using CSS ?

As we know that it is very easy to display a list with sequence number in HTML using Ordered list i.e

<ol>
	<li>...</li>
<ol>

numberdlist

but it is quite difficult to apply style on these auto generated numbers as per your page style.

If you are also facing this issue then this article can help you. We can easily create the numbered list using :before pseudo element and list-sequence-counter. Below is the very simple sample code to achieve this –

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
<style>
			.counter-list{
				list-style: none;
				counter-reset: list-sequence-counter;
			}

			.counter-list li{
				margin : 5px;
			}

			.counter-list > li:before{
				content: counter( list-sequence-counter);
				counter-increment: list-sequence-counter;
				margin-right: 5px;
				background: green;
				color: white;
				font-weight: bold;
				padding: 0 6px;
				border-radius: 10px;
			}
</style>

	</head>

	<body>
<ul class="counter-list">
	<li>List Item</li>
	<li>List Item</li>
	<li>List Item</li>
	<li>List Item</li>
	<li>List Item</li>
</ul>
</body>
</html>

Reference-
https://css-tricks.com/numbering-in-style/