<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: viyashdoss</title>
    <description>The latest articles on DEV Community by viyashdoss (@viyash).</description>
    <link>https://dev.to/viyash</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1019040%2Ff4ff50b7-05c5-4429-a434-d7f5f18f966f.png</url>
      <title>DEV Community: viyashdoss</title>
      <link>https://dev.to/viyash</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viyash"/>
    <language>en</language>
    <item>
      <title>Django</title>
      <dc:creator>viyashdoss</dc:creator>
      <pubDate>Tue, 04 Apr 2023 10:55:57 +0000</pubDate>
      <link>https://dev.to/viyash/django-156g</link>
      <guid>https://dev.to/viyash/django-156g</guid>
      <description>&lt;h2&gt;
  
  
  Settings file:
&lt;/h2&gt;

&lt;p&gt;All project-specific parameters, including database connection, static files, middleware, installed apps, and more, are stored in the settings file in Django. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is the secret key?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To secure Django applications, cryptographic hashing and signing are done using secret keys, which are random strings of characters.&lt;/li&gt;
&lt;li&gt;It is employed for activities like creating secure cookies and preventing CSRF attacks.&lt;/li&gt;
&lt;li&gt;To stop hackers from gaining access to private data, the secret key must be maintained safe, With the Django.core.management.utils.get the random secret key() function, you can create a reliable secret key. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are the default Django apps inside it? Are there more?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Static files, sessions, messages, and content types are the default Django apps that are listed in the settings file. Django offers more third-party apps too. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is middleware? What are the different kinds of middleware? Read up a little on each security issue.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Middleware is a tool that can be used to add extra features to the way your web application handles requests and responses. Different types of middleware can help address various security issues, like preventing CSRF (Cross-Site Request Forgery) attacks, protecting against XSS (Cross-Site Scripting) attacks, and preventing clickjacking.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The different kinds of middleware available include authentication middleware, caching middleware, logging middleware, compression middleware, and error handling middleware. Each type of middleware serves a different purpose, such as verifying the identity of users trying to access protected resources, improving the performance of web applications by storing frequently accessed data, capturing and storing logs of various activities and events, compressing content before sending it to the client and catching and handling errors that may occur during the execution of a web application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CSRF
&lt;/h3&gt;

&lt;p&gt;CSRF (Cross-Site Request Forgery): A CSRF attack is when an attacker tricks a user into acting on a website without their knowledge or consent. To prevent this, Django includes built-in protection that requires a secret token to be included in POST requests, which ensures that the request is coming from a legitimate source.&lt;/p&gt;

&lt;h3&gt;
  
  
  XSS
&lt;/h3&gt;

&lt;p&gt;XSS (Cross-Site Scripting): XSS is a type of attack where an attacker injects malicious code into a web page, which can then be executed by unsuspecting users. To prevent this, Django includes built-in protection that automatically escapes any user-provided data in templates and form fields.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clickjacking
&lt;/h3&gt;

&lt;p&gt;Clickjacking is a type of attack where an attacker tricks a user into clicking on a button or link that is invisible or hidden on a web page. To prevent this, Django includes built-in protection that adds a special header to responses that prevents them from being embedded within other sites.&lt;/p&gt;

&lt;h3&gt;
  
  
  Any other middleware that is there?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Session Middleware&lt;/strong&gt;: This middleware handles the creation and management of user sessions, which can be used to store user-specific data across multiple requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content Security Policy Middleware&lt;/strong&gt;: This middleware helps protect against XSS attacks by specifying which sources of content are allowed to be loaded on a page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CorsMiddleware&lt;/strong&gt;: This middleware allows you to specify which domains are allowed to access your site's resources, which can help prevent unauthorized access from other sites.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  WSGI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It will serve as a start point for a webserver.&lt;/li&gt;
&lt;li&gt;Django is designed to work with the WSGI (Web Server Gateway Interface) standard, which allows it to be deployed on a wide variety of web servers and platforms. When you create a new Django project using the start project command, it automatically generates a basic WSGI configuration file for you, which you can customize as needed to fit your specific deployment requirements. This makes it easy to deploy a Django application to a variety of production environments, including popular web servers like Apache and Nginx.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Models file:
&lt;/h2&gt;

&lt;p&gt;The model's file in Django defines the database schema for a project using Python classes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is on deleting Cascade?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On delete cascade is a database constraint that automatically deletes related records in child tables when a record is deleted in the parent table.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A broad understanding of Fields and Validators available to you?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In Django, models are used to define the structure and behaviour of data that will be stored in a database. Fields are used to define the type of data that will be stored in each field of a model. For example, a CharField is used to store a string of text, while an IntegerField is used to store a numerical value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validators are functions that can be used to check the validity of data before it is saved to the database. For example, we might use a validator to check that a user-entered email address is in a valid format. Validators can be attached to fields in a model to ensure that the data stored in those fields is valid according to your requirements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Understanding the difference between Python module and Python class?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A Python module is a file containing Python code, while a Python class is a blueprint for creating objects.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Django ORM:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Using ORM queries in Django Shell
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The Django ORM is a high-level Python API for interacting with relational databases.&lt;/li&gt;
&lt;li&gt;The ORM queries can be tested in the Django shell, which provides an interactive Python environment to execute code. To open the shell use the below command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  python manage.py shell
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Turning ORM to SQL in Django Shell
&lt;/h3&gt;

&lt;p&gt;ORM queries can be turned into SQL queries in the Django shell by using the query method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  queryset = model.objects.all()
  print(queryset.query)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What are Aggregations?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Aggregations are operations performed on data to return a single result, such as count, sum, avg, max, and min.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are Annotations?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Annotations allow adding extra data to a query result, such as adding a count of related records to the main record.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is a migration file? Why is it needed?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Migration files are generated by Django to manage database schema changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are SQL transactions? (non-ORM concept)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;SQL transactions are a way to group multiple SQL queries into a single atomic operation, ensuring data consistency.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are atomic transactions?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt; Atomic transaction is the smallest set of operations to perform the required steps. Either all of those required operations happen(successfully) or the atomic transaction fails.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.djangoproject.com/en/4.0"&gt;https://docs.djangoproject.com/en/4.0&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CSS - Concepts</title>
      <dc:creator>viyashdoss</dc:creator>
      <pubDate>Thu, 02 Mar 2023 07:14:03 +0000</pubDate>
      <link>https://dev.to/viyash/css-concepts-3al5</link>
      <guid>https://dev.to/viyash/css-concepts-3al5</guid>
      <description>&lt;h1&gt;
  
  
  Box Model
&lt;/h1&gt;

&lt;p&gt;The CSS box type is like a container that has the following properties:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This section includes the primary content, such as text, images, and other media.
The height and width characteristics can be changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Padding&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The padding area is the space between the content region and the border box.
It can be applied to all sides or particular sides such as the top, right, bottom, and left.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Border&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The border area surrounds the padding and content and can be applied to all sides or particular sides such as the top, right, bottom, and left.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Margin&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The margin region is the space between the border and the outside edge of the box.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&amp;lt;style&amp;gt;

div {

  width: 300px;

  height: 200px;

border: 2 pixels of solid black;

  padding: 10px;

  margin: 20px;

}

&amp;lt;/style&amp;gt;

&amp;lt;html&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;div&amp;gt;

some content

&amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the preceding example, the innermost layer of the div element that includes the real content has a width of 300px, and the padding property surrounds the content layer and provides 10px space between the content and the border.&lt;/p&gt;

&lt;p&gt;The border property surrounds the padding layer and provides a visible border of 2 px, and the margin property is the outermost layer that surrounds the complete element.&lt;/p&gt;

&lt;h1&gt;
  
  
  Inline VS Block
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Block&lt;/strong&gt; - HTML Block Level elements commence on a new line and occupy the entire width of their parent element. They have the ability to utilize width, height, and text-align properties as they fill the entire width of their container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inline&lt;/strong&gt; - HTML inline elements consistently begin on the same line and their width is determined by their content. Most inline elements are presentational.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Block&lt;/th&gt;
&lt;th&gt;Inline&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A block level element can have both inline and block elements as children or descendants&lt;/td&gt;
&lt;td&gt;inline level elements can have only inline elements as children or descendant.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CSS property: display:block&lt;/td&gt;
&lt;td&gt;CSS property: display:inline&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  Postioning Absolute/Relative
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Aboslute&lt;/strong&gt; - When an element is assigned a position value of "absolute", its position is determined in relation to the closest ancestor element that has a specified position (as opposed to being positioned relative to the viewport, which is the case for "fixed" elements).&lt;/p&gt;

&lt;p&gt;In the absence of any such ancestor, an absolutely positioned element is placed in relation to the document body and will scroll along with the page.&lt;/p&gt;

&lt;p&gt;It's important to note that elements with absolute positioning are taken out of the normal flow of the page and may overlap with other elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relative&lt;/strong&gt; - When an element is assigned a position value of "relative", it will be positioned based on its default position. If the top, right, bottom, or left properties are specified, the element's position will be adjusted accordingly, but the surrounding content will not be affected to fill the space created by the element's displacement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div.relative {
  position: relative;
  width: 400px;
  height: 200px;
  border: 3px solid #73AD21;
}

div.absolute {
  position: absolute;
  top: 80px;
  right: 0;
  width: 200px;
  height: 100px;
  border: 3px solid #73AD21;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  CSS Structural Classes
&lt;/h1&gt;

&lt;p&gt;They allow you to target specific elements like the first child, last child, or alternate elements based on their position in the hierarchy. Here are some common examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;:first-child&lt;/strong&gt; - targets the element that appears first among its siblings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:nth-child(n)&lt;/strong&gt; - targets elements at a certain position, based on an expression.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:last-child&lt;/strong&gt;- targets the element that appears last among its siblings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:nth-last-child(n)&lt;/strong&gt; - like :nth-child, but starts counting from the end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:only-child&lt;/strong&gt; - targets elements that are the only child of their parent element.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:first-of-type&lt;/strong&gt; - targets the first element of a specific type of sibling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:nth-of-type(n)&lt;/strong&gt; - targets elements of a specific type at a position determined by an expression.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:last-of-type&lt;/strong&gt; - targets the last element of a specific type of sibling.
:nth-last-of-type(n) - like :nth-of-type, but starts counting from the end.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  CSS Specifity
&lt;/h1&gt;

&lt;p&gt;It is a method used to determine which CSS rule applies to an HTML element when there are multiple rules targeting the same element. Specificity is calculated based on the type of selector used in the rule, and the number of instances of each selector in the rule.&lt;/p&gt;

&lt;p&gt;Four types of selectors in CSS:   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;type selectors, &lt;/li&gt;
&lt;li&gt;class selectors, &lt;/li&gt;
&lt;li&gt;ID selectors, &lt;/li&gt;
&lt;li&gt;attribute selectors. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The selectors are ranked in order of increasing specificity, with type selectors having the lowest specificity and ID selectors having the highest. &lt;br&gt;
&lt;strong&gt;!important&lt;/strong&gt; keyword can be applied to override specificity and force a rule to apply to an element, it is better to avoid this keyword.&lt;/p&gt;
&lt;h1&gt;
  
  
  CSS Responsive Queries
&lt;/h1&gt;

&lt;p&gt;It is used in CSS to apply styles to different devices or screen sizes. Media queries allow web developers to specify different CSS styles for different devices, resolutions, and orientations.&lt;/p&gt;

&lt;p&gt;The media query includes a media type, such as screen, print, or speech, and one or more expressions that define the conditions under which the styles should be applied. For example, you can use a media query to apply styles only to devices with a maximum width of 768 pixels, or to print styles that are optimized for printing on paper.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media (max-width: 768px) {
  body {
    background-color: blue;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Flex and Grid
&lt;/h1&gt;

&lt;p&gt;CSS Grid and Flexbox are two different properties that web developers can use to create complex and responsive web layouts.&lt;/p&gt;

&lt;p&gt;CSS Grid is a layout module that works by creating a grid of rows and columns on a webpage. Once you've created your grid, you can place content within it by specifying which grid lines and areas should be used. This makes CSS Grid really useful for creating layouts that need to be highly controlled and complex, like those you might see in a magazine or on a dashboard.&lt;/p&gt;

&lt;p&gt;Flexbox, on the other hand, is a layout module that works by creating containers that can be used to organize items on a webpage. we can use Flexbox to tell these containers how the items within them should be organized, like by specifying whether they should be laid out in a row or a column. This makes Flexbox really useful for creating layouts that need to be more flexible and responsive to different screen sizes, like a navigation menu or a gallery of images.&lt;/p&gt;

&lt;h1&gt;
  
  
  Meta Tags
&lt;/h1&gt;

&lt;p&gt;The meta tag provides information about a web page, such as its description, keywords, author, and character encoding.&lt;br&gt;
This information can be used by web browsers to display information about the page and can aid in search engine optimization.&lt;/p&gt;

&lt;p&gt;The name attribute specifies the type of metadata provided, while the content attribute contains the actual metadata content.&lt;/p&gt;

&lt;p&gt;The charset attribute specifies the web page's character encoding. &lt;/p&gt;

&lt;h1&gt;
  
  
  Reference
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.simplilearn.com/tutorials/css-tutorial/css-box-model"&gt;https://www.simplilearn.com/tutorials/css-tutorial/css-box-model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/css/css_positioning.asp"&gt;https://www.w3schools.com/css/css_positioning.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.web4college.com/css/web4-css-structural-classes.php"&gt;https://www.web4college.com/css/web4-css-structural-classes.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web.dev/learn/css/specificity/"&gt;https://web.dev/learn/css/specificity/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>flexbox</category>
      <category>webdev</category>
      <category>grid</category>
    </item>
    <item>
      <title>SQL Concepts</title>
      <dc:creator>viyashdoss</dc:creator>
      <pubDate>Wed, 22 Feb 2023 06:45:02 +0000</pubDate>
      <link>https://dev.to/viyash/sql-concepts-technical-paper-413m</link>
      <guid>https://dev.to/viyash/sql-concepts-technical-paper-413m</guid>
      <description>&lt;h2&gt;
  
  
  ACID
&lt;/h2&gt;

&lt;p&gt;ACID is a term used in transaction processing to refer to a set of four critical properties that transactions should exhibit. These four properties are atomicity, consistency, isolation, and durability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Atomicity&lt;/strong&gt; ensures that all changes made by a transaction are treated as a single operation, meaning that either all of the changes are made or none of them are.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistency&lt;/strong&gt; guarantees that the data is in a consistent state before and after the transaction is executed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Isolation&lt;/strong&gt; - Concurrent transactions will not interfere with one another, and each transaction will be executed independently of the others. Even though the requests are occurring simultaneously, But they're being processed one by one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;durability&lt;/strong&gt; ensures that once a transaction is successfully completed, the changes made to the data persist and are not lost, even in the event of a system failure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, these properties help ensure that transactions are reliable, robust, and maintain data integrity, making them critical for the proper functioning of computer systems that process transactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  CAP Theorem
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A network with numerous nodes (physical or virtual machines) simultaneously storing data is known as a distributed system. Understanding the CAP theorem is essential when creating a cloud application because all cloud apps are distributed systems.&lt;/li&gt;
&lt;li&gt;To ensure that the system continues to provide a reliable service despite these partitions, partition tolerance becomes a necessity.&lt;/li&gt;
&lt;li&gt;This indicates that in a distributed system, achieving high consistency may come at the expense of reduced availability, whereas prioritising high availability may result in poorer consistency. &lt;/li&gt;
&lt;li&gt;The CAP theorem is often referred to as Brewer's theorem.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Joins
&lt;/h2&gt;

&lt;p&gt;Joins in SQL Server allow you to retrieve data from various tables based on logical links.&lt;br&gt;
Joins specify how data from one table should be used to select rows from another table.&lt;br&gt;
Joins can be done logically using the following SQL syntax:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;INNER JOIN&lt;/strong&gt; - By using the INNER JOIN keyword, only the rows from both tables with matching columns will be selected with condition which we're giving it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LEFT JOIN&lt;/strong&gt; - The LEFT JOIN command retrieves all rows from the left table as well as the matching rows from the right table.If there is no match, the result from the right side is NULL. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RIGHT JOIN&lt;/strong&gt; - The RIGHT JOIN also is same as the left join, the only difference is retrieves from right, we can acheive right join by left also by swapping the table name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FULL JOIN&lt;/strong&gt; - When there is a match in either the left or right tables, the FULL OUTER JOIN statement returns all rows. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Aggregations, Filters in queries
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Aggregations&lt;/strong&gt; - A single output value is computed by SQL aggregate functions using various column input values. These operations are frequently combined with the SELECT statement's GROUP BY and HAVING clauses. The SQL aggregate functions that are used most frequently are &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Count() - To find the count of data.&lt;/li&gt;
&lt;li&gt;Sum() - To find sum of the column.&lt;/li&gt;
&lt;li&gt;Average() - To find avg value.&lt;/li&gt;
&lt;li&gt;Min() - To find min value.&lt;/li&gt;
&lt;li&gt;Max () - To find max value.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Filters&lt;/strong&gt; - A subset of data items within SQL and internal database types are defined by text strings known as SQL filters.&lt;br&gt;&lt;br&gt;
These filters often take the form of a SQL WHERE clause, which includes a set of comparisons that need to be met in order for a specific data item to be returned.&lt;br&gt;&lt;br&gt;
These comparisons typically involve field names and the values that correspond to those names. &lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Normalization
&lt;/h2&gt;

&lt;p&gt;Removing redundant data from your tables will increase storage effectiveness, data integrity, and scalability. This procedure is known as database normalisation.There are ways to measure a database's effectiveness in the relational paradigm.Normal forms (or NF) are the name given to these classes, and there are algorithms for converting a given database between them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In order to "normalise" an existing table, it is typically split into many ones that need to be "re-joined" or "connected" each time a query is run. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Types of Normal Forms:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;1NF&lt;/strong&gt; - According to the first normal form (1NF), a table attribute can only carry one value and cannot hold more than one value. As a result, 1NF forbids the use of composite attributes, multi-valued attributes, or any combination of the two. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;2NF&lt;/strong&gt; - A table must comply to the first normal form (1NF) before it may satisfy the second normal form (2NF) (1NF). Furthermore, the main key must be completely functionally dependent on all non-key properties in the database. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;3NF&lt;/strong&gt; - A relation is in 3NF if it is in 2NF and does not contain any transitive partial dependencies.To lessen data duplication, 3NF is used.It is also employed to ensure data integrity.The relation must be in third normal form if there is no transitive dependency for non-prime attributes. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BCNF&lt;/strong&gt; - Boyce Codd's normal form is an improved definition of 3NF. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;4NF&lt;/strong&gt; - Boyce Codd normal form and the absence of any multi-valued dependencies must both be met for a relation to be categorised as being in fourth normal form (4NF).When there are multiple values of B connected to a single value of A for a given dependency A B, this is referred to as a multi-valued dependency. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;5NF&lt;/strong&gt; - When all of the tables are divided up into as many different tables as is possible to prevent redundancy, 5NF is satisfied.Project-join normal form, or 5NF, is another name for this format. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Index
&lt;/h2&gt;

&lt;p&gt;In order to speed up data retrieval, the database search engine uses indexes as lookup tables.&lt;br&gt;
They operate similarly to an index at the end of a journal by making references to information in a table.&lt;br&gt;
The purpose of a database index is to speed up database access even though users cannot see it.&lt;/p&gt;

&lt;p&gt;In order to find all the pages in a book that are related to a particular topic, for instance, you would first look in the index, which lists the topics in alphabetical order, before moving on to one or more specific page numbers.&lt;/p&gt;

&lt;p&gt;In addition to speeding up data retrieval, indexes also stop duplicate entries from being made in the column or group of columns on which they are created. &lt;/p&gt;

&lt;p&gt;for example : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CREATE INDEX index_name
ON table_name(column_name); - To create index&lt;/li&gt;
&lt;li&gt;DROP INDEX college_index; - To drop index&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Transactions
&lt;/h2&gt;

&lt;p&gt;A transaction in SQL is a group of one or more SQL statements that communicate with a database.&lt;br&gt;
To undo the changes performed, it can be rolled back as a single logical unit or committed to a database as a single unified logical unit.&lt;br&gt;
When numerous concurrent operations or users are interacting with the database at once, transactions are essential to SQL's ability to ensure database integrity.&lt;br&gt;
By ensuring that related operations are carried out simultaneously and committed as a single logical unit, they contribute to integrity preservation. &lt;/p&gt;

&lt;h2&gt;
  
  
  Locking Mechanism
&lt;/h2&gt;

&lt;p&gt;To maintain data consistency in SQL, it is essential to utilize SQL Locks. A lock is created at the beginning of a transaction and is released when the transaction is completed in SQL . There are several types of locks available for use.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;One type is the Shared (S) Lock, which is used to read an object without making any changes to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another type is the Exclusive (X) Lock, which blocks other operations like inserting, updating, or deleting data on the locked objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Update (U) Lock is another type of lock that is similar to the Exclusive lock. However, it allows for a "read phase" and a "write phase," and some transactions may be restricted during the read phase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lastly, the Intent Lock is used to indicate that an object will be locked shortly by another type of lock.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Database Isolation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Isolation controls how transaction integrity is visible to other users and systems in database systems.&lt;/li&gt;
&lt;li&gt;A lower level of isolation makes it easier for several users to access the same data concurrently, but it also makes it more likely that users will experience concurrency impacts like losting the changes. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Triggers
&lt;/h2&gt;

&lt;p&gt;Storage-based programmes known as triggers are launched or automatically run when specific events take place.&lt;br&gt;
In reality, triggers are written to run in response to any of the following situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A DML statement is used to manipulate databases (DELETE, INSERT, or UPDATE)&lt;/li&gt;
&lt;li&gt;An explanation of the database (DDL) (CREATE, ALTER, or DROP).&lt;/li&gt;
&lt;li&gt;operating a database (SERVERERROR, LOGON, LOGOFF, STARTUP, or SHUTDOWN).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tables, views, schemas, and databases that are connected to an event can all have triggers defined on them. &lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.ibm.com/in-en/topics/" rel="noopener noreferrer"&gt;https://www.ibm.com/in-en/topics/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.scaler.com/topics/" rel="noopener noreferrer"&gt;https://www.scaler.com/topics/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.tutorialspoint.com/plsql/" rel="noopener noreferrer"&gt;https://www.tutorialspoint.com/plsql/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>go</category>
      <category>codenewbie</category>
      <category>learning</category>
    </item>
    <item>
      <title>Solid Principles - Python</title>
      <dc:creator>viyashdoss</dc:creator>
      <pubDate>Mon, 20 Feb 2023 07:02:14 +0000</pubDate>
      <link>https://dev.to/viyash/solid-principles-python-4141</link>
      <guid>https://dev.to/viyash/solid-principles-python-4141</guid>
      <description>&lt;p&gt;Solid principles are a set of instructions on how to write code for production-ready software. Every software developer has to know these crucial principles to develop any application, Solid stands for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;S&lt;/strong&gt; - Single responsibility principle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;O&lt;/strong&gt; - Open/Closed principle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L&lt;/strong&gt; - Liskov’s substitution principle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I&lt;/strong&gt; - Interface segregation principle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D&lt;/strong&gt; - Dependency inversion principle&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Single Responsibility Principle :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A class should have a single responsibility for handling processes, and if there is anything to change, it should not affect the other classes. The main objective of the single responsibility principle is to design a software component with attributes and methods that are related to each other, and it should not handle more stuff; the smaller the class, the better.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It can have any number of methods if all are coupled with each other; otherwise, we need to separate those methods into separate classes.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Class Game:

    def initializer_method(self):
        pass

    def draw_method(self):
        pass

    def running_method(self):
        pass

    def endCond_method(self):
        pass

&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the above example, we have to decouple all of the methods in the game class since some of them (draw, running) are not related to each other.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Open-Closed Principle :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Open/closed principle is all about open for extension but closed for modification.&lt;br&gt;
It is co-related to the single responsibility principle. The code which we are writing should be capable of adding extra features without breaking the existing code.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def read_file(file):
    return open(file, "r").read()

def get_text_from_url(URL):
    return text

def count_word_occurrences(word, content):
    counter = 0
    for e in content.split():
        if word.lower() == e.lower():
            counter += 1
    return counter

def csv_reader(file):
    return text

&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the above example, we are counting the number of words in a file by reading through the file as well as from the web. What happens when we want to read a file from another resource, like a CSV file? We can create a function to read CSV data and return the text as above to the count_word function.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Liskov’s Substitution Principle :
&lt;/h3&gt;

&lt;p&gt;It states that objects of a parent class should be replaceable with objects of its subclasses without breaking the existing code/application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For example, Consider the below one mixer class is inheriting the kitchen parent class, what if we want to add another class Owen which has to inherit from the Kitchen class, then we can call those methods alone will work but we have to use all the methods from the parent class.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class kitchen():

    def on():
        pass

    def off():
        pass

    def set_level():
        pass

class mixer(Kitchen):
    def on():
        pass

    def off():
        pass

    def set_level():
        pass

class mixer(Kitchen):

    def on():
        pass

    def off():
        pass

&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;So to overcome this we can create another class to set the level of the mixer and we can inherit that class and use its methods of it.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class kitchen():
    def on():
        pass
    def off():
        pass

class mixer_level(kitchen):
    def set_level():
        pass

class mixer(mixer_level):
    def on():
        pass
    def off():
        pass
    def set_level():
        pass

class mixer(Kitchen):
    def on():
        pass
    def off():
        pass

&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Interface Segregation Principle :
&lt;/h3&gt;

&lt;p&gt;A class or function should not have all the functionalities in a single method; instead, they should be separated.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In the example below, we force the function to read data from both the URL and the file; however, what if the class that invokes this function does not need to fetch data from the URL? In that case, we must create a separate class for that functionality. If the class needs to read data from both, they can initialise objects for both classes and invoke the main function.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def get_text_from_url(URL):
    pass

def count_word_occurrences(word, content):
    file_data=open(file, "r").read()
    url_data = get_text_from_url(URL)
    counter = 0
    for e in content.split():
        if word.lower() == e.lower():
            counter += 1
    return counter

&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dependency Inversion :
&lt;/h3&gt;

&lt;p&gt;This principle states that higher-level modules should not depend on lower-level modules. Instead, both should depend on abstractions. &lt;br&gt;
In the below example, Food, production is like the base class and if we want to add another food we can create another class and inherit from the food class without breaking it. In this way low  and high level classes is depending on the abstract class FOOD.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```
class FOOD:
    def bake(self): 
        pass
    def eat(self): 
        pass

class Bread(FOOD):
    def bake(self):
        print("Bread was baked")
    def eat(self):
        print("Bread was eaten")


class Production:
    def __init__(self, food):
        self.food = food 

    def produce(self):
        self. food.bake() 

    def consume(self):
        self. food.eat()  

ProduceBread = Production(Bread())
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/carbon-consulting/solid-principles-with-python-245e45f9b1f8"&gt;https://medium.com/carbon-consulting/solid-principles-with-python-245e45f9b1f8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ZSAXFDNPcIg"&gt;https://www.youtube.com/watch?v=ZSAXFDNPcIg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>solid</category>
      <category>python</category>
    </item>
    <item>
      <title>Python Strings/Lists/OOPS</title>
      <dc:creator>viyashdoss</dc:creator>
      <pubDate>Thu, 16 Feb 2023 06:39:51 +0000</pubDate>
      <link>https://dev.to/viyash/python-stringslistsoops-2bo0</link>
      <guid>https://dev.to/viyash/python-stringslistsoops-2bo0</guid>
      <description>&lt;p&gt;Every programming language has its methods for its data structures. Some of the data structures in Python include list, string, dictionary, and set.&lt;/p&gt;

&lt;h2&gt;
  
  
  List methods
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;append() - Append an element to the end of the list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[]
 l.append(5)
 print(l)
 # l=[5]
&lt;/code&gt;&lt;/pre&gt;



&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;clear() - Clears the list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2]
 l.clear()
 print(l)
 # l=[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;copy() - Makes a copy of the list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2,3]
 x=l.copy()
 print(x)
 # [1,2,3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;count() - Count the data that has been passed as an argument in the list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2,3]
 x=l.count(1)
 print(x)
 # 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;extend() - This function extends the data of another list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2,3]
 l1=[4,5,6]
 l=l.extend(l1)
 print(l)
 # [1,2,3,4,5,6]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;index() - Returns the index of the passed element.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l = [1,2,3]
 l=l.index(1)
 print(l)
 # 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;insert() - Takes two arguments, one being the position and another being the element. It will insert at the given position.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2,3]
 l.insert(0,0)
 print(l)
 #[0,1,2,3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;pop() - Removes the list's last element.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2,3]
 l.pop()
 print(l)
 # [1,2]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;remove() - Removes the first matched element; the argument has to be passed.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[1,2,3]
 l.remove(2)
 print(l)
 # [1,3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;reverse() - Reverse the order of the list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l= [1,2,3]
 print(l.reverse())
 # [3,2,1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;sort() - Sorts a list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; l=[3,1,2]
 print(l.sort())
 # [1,2,3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;






&lt;h2&gt;
  
  
  String Methods
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;capitalize() - Capitalizes the first character.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.capitalize()
 print(k)
 # String
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;casefold() - Lowers the case of a string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s = "String"
 casefold() = k
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;center() - Centres the string based on the argument.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.center(10)
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;count() - Returns the number of occurrences of the value in the string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.count(r)
 print(k)
 # 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;endswith() - Returns true if the string ends with the specified value.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.endswith(g)
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;find() - Searches the string for a specified value and returns the index of it; if not found, it returns -1.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.find(r)
 print(k)
 # -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;index() - Returns the index of a specified value after searching the string for it.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.index("r")
 print(k)
 # 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isalnum() - If all characters in the string are alphanumeric, it will return true; otherwise, it will return false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string2"
 k=s.isalnum()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isalpha() - If all characters in the string are in the alphabet, it will return true; otherwise, it will return false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.isalpha()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isascii() - Return true if all characters in the string are ASCII characters.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.isascii()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isdecimal() - This function returns True if all of the characters in the string are decimals.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="\u0033"
 k=s.isdecimal()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isdigit() - If all characters in the string are digits, it will return true; otherwise, it will return false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="1234"
 k=s.isdigit()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;islower() - If all characters in the string are lower case, it will return True; otherwise, it will return false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.islower()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isnumeric() - If all characters in the string are numeric, it will return true; otherwise, it will return false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="1234"
 k=s.isnumeric()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isprintable() - Returns true if the string contains all printable characters.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string n adf"
 k=s.isprintable()
 print(k)
 # False
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isspace() - Returns true if the string contains no whitespace; otherwise, it returns false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.isspace()
 print(k)
 # False
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;istitle() -  If all of the words in the string begin with capital letters, istitle() returns true; otherwise, it returns false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "String the Word"
 k=s.istitle()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;isupper() - True if all the characters are in upper case; otherwise, it will return false.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="STRING"
 k=s.isupper()
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;join() - Converts the elements of an iterable into a string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s=["s", "t", "r", "i", "n", "g"]
 k="".join(s)
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ljust() - Returns a left-justified string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.ljust(10)
 print(k)
 # denotes a string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;lower() - Lowers the case of a string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="StrInG"
 k=s.lower()
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;lstrip() - Removes the leftmost portion of the string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s=" string"
 k=s.lstrip()
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;replace() - Replace the matching values with the passed argument. It takes two arguments.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.replace("ing","")
 print(k)
 # str
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;rfind() - Searches the string for a given value and returns the last position it was found.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="stringr"
 k=s.rfind("r")
 print(k)
 # 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;rindex() - Searches the string for a specified value and returns the last position where it was found.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="stringr"
 k=s.rindex("r")
 print(k)
 # 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;rjust() - Returns a right-justified version of the string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.rjust(10)
 print(k)
 # character string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;rstrip() - Remove the appropriate portion of the string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string "
 k=s.rstrip()
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;split() - Splits the string based on the specified separator (the default is a space) and returns a list.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; string="string the word"
 k=s.split()
 print(k)
 # ["string", "the", "word"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;splitlines() -  splits each line and returns a list of the results.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="hello world string"
 k=s.splitlines()
 print(k)
 # ['string', 'hello world']
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;startswith() - This function looks for the letter in the string and returns True if it begins with the specified letter; otherwise, it returns False.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.startswith("s")
 print(k)
 # True
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;strip() - removes the string's trailing space.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s=" string "
 k=s.strip()
 print(k)
 # string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;swapcase() - swaps the cases so that the lower becomes the upper and the upper becomes the lower.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; string = "Word"
 k=s.swapcase()
 print(k)
 A wORD IS #STRING
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;title() - converts all of the word's first letters to uppercase.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; string = "word"
 k=s.title()
 print(k)
 String = Word
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;upper() - changes the string's case to upper case.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.upper()
 print(k)
 # STRING
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;zfill() -  prefix the number of zeros before the string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; s="string"
 k=s.zfill(7)
 print(k)
 # 0string
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;






&lt;h2&gt;
  
  
  OOPS
&lt;/h2&gt;

&lt;p&gt;Object-oriented programming is a programming model that organises software design around data and objects rather than functions and logic. An object can be defined as a data field; it has unique attributes and behaviours.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;OOPS structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Classes - It is like a combination of bundling data and functionality together. Each class instance can have attributes attached to it for maintaining its state it can also have methods to change its state.&lt;/li&gt;
&lt;li&gt;Objects - An Object is an instance of a Class, an instance is a copy of the class with actual values. Python is object-oriented programming language  it mainly focus on functions.&lt;/li&gt;
&lt;li&gt;Methods - A method is a function that belongs to  an particular object.    For example, list objects have methods called append, insert, remove and sort etc...&lt;/li&gt;
&lt;li&gt;Attributes - Class attributes are class variables that are inherited by every object of a class. The value of class attributes remain the same for every new object.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Principles&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Encapsulation&lt;/strong&gt;  - The binding up of methods and attributes, for example, a &lt;strong&gt;class&lt;/strong&gt; is a combination of attributes and methods.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt; - It's like a hiding of data; it can also help the developers more easily make additional changes over time.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Import ABC from ABC
class ClassName(ABC)
# We can make the actual class abstract by inheriting the ABC class.
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; - It's a concept of reusing the same code to avoid redundancy. This method will force the developer to reduce development time and also ensure high accuracy. There are multiple inheritances.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Single - derived from a single base or parent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbhr6b43vbhq7bzqyyq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbhr6b43vbhq7bzqyyq7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multiple - derived from multiple base classes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feiuieox2ogyom0ted897.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feiuieox2ogyom0ted897.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multilevel - deriving a class from a derived class that has been derived from a base class. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhm2yg9gdlv3zzp52pder.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhm2yg9gdlv3zzp52pder.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hierarchical: there are multiple derived classes from a single parent class.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fro447m9lpxhe8xd0lb46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fro447m9lpxhe8xd0lb46.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;polymorphism&lt;/strong&gt; - The term "polymorphism" refers to the ability to use the same method as the parent class.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     add(x, y, z) = 0:
     x + y + z = return

     print(add(2, 3))
     # 5
     print(addition(2, 3, 4))
     # 9
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/python/python_ref_string.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/python/python_ref_string.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/python/python_ref_list.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/python/python_ref_list.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.dotnettricks.com/learn/oops/understanding-inheritance-and-different-types-of-inheritance" rel="noopener noreferrer"&gt;https://www.dotnettricks.com/learn/oops/understanding-inheritance-and-different-types-of-inheritance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>lis</category>
      <category>array</category>
      <category>string</category>
      <category>oops</category>
    </item>
    <item>
      <title>CLI - commands and their uses</title>
      <dc:creator>viyashdoss</dc:creator>
      <pubDate>Wed, 01 Feb 2023 17:22:53 +0000</pubDate>
      <link>https://dev.to/viyash/cli-commands-and-their-uses-3eo3</link>
      <guid>https://dev.to/viyash/cli-commands-and-their-uses-3eo3</guid>
      <description>&lt;p&gt;1)What is the difference between Service and Application? &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service(API) is a kind of work/process which is mostly used by other programs, whereas Application(Software) is a service offered to the user or any other application to manage the process/work.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;br&gt;&lt;br&gt;
2)What are these wildcards ~, ., .., * and ??&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wildcards are special characters which are used to ease the search process. It is used for identifying multiple items but not identical data.

&lt;ul&gt;
&lt;li&gt; ~     Home directory&lt;/li&gt;
&lt;li&gt; .     Current working directory&lt;/li&gt;
&lt;li&gt; ..    Prev to the current directory&lt;/li&gt;
&lt;li&gt; *     Any number of characters.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
3)What are the different flags for the kill? Why do we use kill -9 in general?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kill command is used to kill the process in Linux systems but also we can use it to halt/interrupt/continue the process. To do that we can use the command
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;kill SignalName/ID PID&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffiqvblk2ab6f1uz2ng5x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffiqvblk2ab6f1uz2ng5x.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;br&gt;&lt;br&gt;
4)Are you clear about file permissions? Explain them. chmod and chown commands?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CHMOD cmd is used to alter the permission(Read, Write, Execute) of the file. Two different ways of representation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Absolute -

&lt;code&gt;CHMOD 755 file.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Symbolic -

&lt;code&gt;CHMOD a=rwx file.txt&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;CHOWN cmd is used to update the user/group of the file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To update the user -

&lt;code&gt;Sudo CHOWN user filename&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To update user &amp;amp; group -

&lt;code&gt;Sudo CHOWN user: group filename&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;&lt;br&gt;&lt;br&gt;
5)Usage of Ctrl+R to search previously run commands, arrow keys and tab autocompletion.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tab&lt;/strong&gt; - Autocomplete the word based on what we have typed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arrow Keys&lt;/strong&gt; - up/down keys Navigate to frequently used commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CTRL+R&lt;/strong&gt; - It's like a search box to find the previously ran command.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>cli</category>
      <category>commands</category>
    </item>
  </channel>
</rss>
