<?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: LP</title>
    <description>The latest articles on DEV Community by LP (@lakpa).</description>
    <link>https://dev.to/lakpa</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%2F455119%2Fa7f85495-49bc-4c9e-8531-46a378e5a492.jpeg</url>
      <title>DEV Community: LP</title>
      <link>https://dev.to/lakpa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lakpa"/>
    <language>en</language>
    <item>
      <title>
Text-Case-Converter Using Python</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Thu, 27 May 2021 07:24:22 +0000</pubDate>
      <link>https://dev.to/lakpa/text-case-converter-using-python-1537</link>
      <guid>https://dev.to/lakpa/text-case-converter-using-python-1537</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M46e7gH4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxdgui4fuedpr0ecppow.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M46e7gH4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxdgui4fuedpr0ecppow.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Small Utility Made Using Python For Quickly Editing Text Cases Comes Handy When Dealing With Large Text&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/LP-Codes/Text-Case-Converter-Editor"&gt;https://github.com/LP-Codes/Text-Case-Converter-Editor&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Python  - Random Password Generator GUI  For Beginner's</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Thu, 08 Apr 2021 12:17:38 +0000</pubDate>
      <link>https://dev.to/lakpa/python-random-password-generator-gui-for-beginner-s-29fp</link>
      <guid>https://dev.to/lakpa/python-random-password-generator-gui-for-beginner-s-29fp</guid>
      <description>&lt;p&gt;Hello friends here is a simple Random Password Generator build using Python's PysimpleGUI Module if you want to add new feayures/suggestions kindly check out the  git link &amp;amp; push changes -&lt;a href="https://github.com/LP-Codes/Python-Random-Password-GUI/tree/master" rel="noopener noreferrer"&gt;https://github.com/LP-Codes/Python-Random-Password-GUI/tree/master&lt;/a&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%2Ffi9x88c3iy1tipvxra59.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%2Ffi9x88c3iy1tipvxra59.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import random
import string
#### module allows us to copy and paste text to and from the clipboard to your computer
import pyperclip
####  for creating gui
import PySimpleGUI as sg



sg.theme("Darkbrown")
####  Defining the window's contents
layout = [[sg.Text("Random Password Generator", font=("Helvetica", 25, "bold"))],
          [sg.Text("Select Password Length", key='-OUTPUT1-', font=("Helvetica", 10, "bold"))],
          [sg.Spin([i for i in range(1, 11)], initial_value=1,
                   size=(30, 4), key='-INPUT-')],
          #   [sg.Input(key='-INPUT-' "sd")],
          [sg.Text(size=(40, 1), key='-OUTPUT-', font=("Helvetica", 25, "bold"))],
          [sg.Button('Generate', border_width=5, pad=(25, 10), font=("Helvetica", 10, "bold")),
           sg.Button('Copy', border_width=5, pad=(25, 10), font=("Helvetica", 10, "bold")
                     # Defining the window's contents
                     ), sg.Button('Quit', border_width=5, pad=(25, 10), font=("Helvetica", 10, "bold"))]]

window = sg.Window('Lp Password Generator', layout)

####  Display and interact with the Window using an Event Loop
while True:
    event, values = window.read()

    if event == 'Generate':
        useript = values['-INPUT-']
        lower = string.ascii_lowercase
        upper = string.ascii_uppercase
        num = string.digits
        symbols = string.punctuation
        all = lower + upper + num + symbols
        temp = random.sample(all, useript)
        password = "".join(temp)
        print(password)
        sg.popup(password)
        window['-OUTPUT-'].update(password)

        window["-INPUT-"].update("1")

    if event == "Copy":
        op = window['-OUTPUT-'].get()
        pyperclip.copy(op)
        ####  Output a message to the window
        sg.popup("Password is copied to your clipboard")

    ####  See if user wants to quit or window was closed
    if event == sg.WINDOW_CLOSED or event == 'Quit':
        break

####  Finish up by removing from the screen
window.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React App For Beginner's</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Thu, 08 Apr 2021 05:00:38 +0000</pubDate>
      <link>https://dev.to/lakpa/react-app-for-beginners-3jj5</link>
      <guid>https://dev.to/lakpa/react-app-for-beginners-3jj5</guid>
      <description>&lt;p&gt;Hello friends ,&lt;br&gt;
Here is a link  &lt;a href="https://lp-codes.github.io/My-First-React-App/#/My-First-React-App/" rel="noopener noreferrer"&gt;https://lp-codes.github.io/My-First-React-App/#/My-First-React-App/&lt;/a&gt; of Live App I have tried to create using react, it might be useful for beginner's as a concept who are learning react .I have tried to cover react components such as routers ,hooks,useffect &amp;amp; using bootstrap,fontawesome,materialui ,api's with react -- There is basic home page with external media links , weather app, To-do-App with local storage &amp;amp; a Covid Tracker .Attaching some Snaps from link,&lt;br&gt;
If more info is required kindly ping me ...&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%2F58it3mnqiqzlr45jsxd0.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%2F58it3mnqiqzlr45jsxd0.PNG" alt="Alt Text"&gt;&lt;/a&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%2Fobmip3my3br92wz7vsex.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%2Fobmip3my3br92wz7vsex.PNG" alt="Alt Text"&gt;&lt;/a&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%2Fzj5kegj11zeolvajjgfg.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%2Fzj5kegj11zeolvajjgfg.PNG" alt="Alt Text"&gt;&lt;/a&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%2F98v3dd8c2b714b5hcqyn.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%2F98v3dd8c2b714b5hcqyn.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
 Git-repo - &lt;a href="https://github.com/LP-Codes/My-First-React-App/tree/gh-pages" rel="noopener noreferrer"&gt;https://github.com/LP-Codes/My-First-React-App/tree/gh-pages&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Getting Wifi Passwords using Python</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Fri, 29 Jan 2021 10:58:34 +0000</pubDate>
      <link>https://dev.to/lakpa/getting-saved-wifi-passwords-using-python-olm</link>
      <guid>https://dev.to/lakpa/getting-saved-wifi-passwords-using-python-olm</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/LP-Codes/Getting-Wifi-Passwords-using-Python"&gt;https://github.com/LP-Codes/Getting-Wifi-Passwords-using-Python&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Beginner's Python Cheat-Sheet</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Thu, 01 Oct 2020 11:48:26 +0000</pubDate>
      <link>https://dev.to/lakpa/beginner-s-python-cheat-sheet-11cn</link>
      <guid>https://dev.to/lakpa/beginner-s-python-cheat-sheet-11cn</guid>
      <description>&lt;h1&gt;
  
  
  Variables &amp;amp; Strings
&lt;/h1&gt;

&lt;p&gt;Variables are used to store values. A string is a series of characters, surrounded by single or double quotes.&lt;/p&gt;

&lt;p&gt;Hello world&lt;/p&gt;

&lt;p&gt;print("Hello world!")&lt;/p&gt;

&lt;p&gt;Hello world with a variable&lt;/p&gt;

&lt;p&gt;msg = "Hello world!"&lt;/p&gt;

&lt;p&gt;print(msg)&lt;/p&gt;

&lt;h1&gt;
  
  
  Concatenation (combining strings)
&lt;/h1&gt;

&lt;p&gt;first_name = 'albert'&lt;/p&gt;

&lt;p&gt;last_name = 'einstein'&lt;/p&gt;

&lt;p&gt;full_name = first_name + ' ' + last_name print(full_name)&lt;/p&gt;

&lt;h1&gt;
  
  
  Lists
&lt;/h1&gt;

&lt;p&gt;A list stores a series of items in a particular order. You access items using an index, or within a loop.&lt;/p&gt;

&lt;h4&gt;
  
  
  Make a list
&lt;/h4&gt;

&lt;p&gt;bikes = ['trek', 'redline', 'giant']&lt;/p&gt;

&lt;h4&gt;
  
  
  Get the first item in a list
&lt;/h4&gt;

&lt;p&gt;first_bike = bikes[0]&lt;/p&gt;

&lt;h4&gt;
  
  
  Get the last item in a list
&lt;/h4&gt;

&lt;p&gt;last_bike = bikes[-1]&lt;/p&gt;

&lt;h4&gt;
  
  
  Looping through a list
&lt;/h4&gt;

&lt;p&gt;for bike in bikes:&lt;/p&gt;

&lt;p&gt;print(bike)&lt;/p&gt;

&lt;h4&gt;
  
  
  Adding items to a list
&lt;/h4&gt;

&lt;p&gt;bikes = []&lt;br&gt;
bikes.append('trek')&lt;br&gt;
bikes.append('redline')&lt;/p&gt;

&lt;p&gt;bikes.append('giant')&lt;/p&gt;

&lt;h4&gt;
  
  
  Making numerical lists
&lt;/h4&gt;

&lt;p&gt;squares = []&lt;br&gt;
for x in range(1, 11):&lt;/p&gt;

&lt;p&gt;squares.append(x**2)&lt;/p&gt;

&lt;h4&gt;
  
  
  List comprehensions
&lt;/h4&gt;

&lt;p&gt;squares = [x**2 for x in range(1, 11)]&lt;/p&gt;

&lt;h4&gt;
  
  
  Slicing a list
&lt;/h4&gt;

&lt;p&gt;finishers = ['sam', 'bob', 'ada', 'bea'] first_two = finishers[:2]&lt;/p&gt;

&lt;h4&gt;
  
  
  Copying a list
&lt;/h4&gt;

&lt;p&gt;copy_of_bikes = bikes[:]&lt;/p&gt;

&lt;h1&gt;
  
  
  Tuples
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Tuples are similar to lists, but the items in a tuple can't be modified.
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Making a tuple
&lt;/h4&gt;

&lt;p&gt;dimensions = (1920, 1080)&lt;/p&gt;

&lt;h1&gt;
  
  
  If Statements
&lt;/h1&gt;

&lt;h3&gt;
  
  
  If statements are used to test for particular conditions and respond appropriately.
&lt;/h3&gt;

&lt;h5&gt;
  
  
  Conditional tests
&lt;/h5&gt;

&lt;p&gt;equals  x == 42&lt;br&gt;
not equal   x != 42&lt;br&gt;
greater than    x &amp;gt; 42&lt;br&gt;
or equal to x &amp;gt;= 42&lt;br&gt;
less than   x &amp;lt; 42&lt;br&gt;
or equal to x &amp;lt;= 42&lt;/p&gt;

&lt;h4&gt;
  
  
  Conditional test with lists
&lt;/h4&gt;

&lt;p&gt;'trek' in bikes&lt;br&gt;
'surly' not in bikes&lt;/p&gt;

&lt;h4&gt;
  
  
  Assigning Boolean values
&lt;/h4&gt;

&lt;p&gt;game_active = True&lt;br&gt;
can_edit = False&lt;/p&gt;

&lt;h4&gt;
  
  
  A simple if test
&lt;/h4&gt;

&lt;p&gt;if age &amp;gt;= 18:&lt;br&gt;
print("You can vote!")&lt;/p&gt;

&lt;h3&gt;
  
  
  If-elif-else statements
&lt;/h3&gt;

&lt;p&gt;if age &amp;lt; 4:&lt;br&gt;
ticket_price = 0&lt;br&gt;
elif age &amp;lt; 18:&lt;br&gt;
ticket_price = 10&lt;br&gt;
else:&lt;/p&gt;

&lt;p&gt;ticket_price = 15&lt;/p&gt;

&lt;h1&gt;
  
  
  Dictionaries
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Dictionaries store connections between pieces of information. Each item in a dictionary is a key-value pair.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  A simple dictionary
&lt;/h4&gt;

&lt;p&gt;alien = {'color': 'green', 'points': 5}&lt;/p&gt;

&lt;h4&gt;
  
  
  Accessing a value
&lt;/h4&gt;

&lt;p&gt;print("The alien's color is " + alien['color'])  &lt;/p&gt;

&lt;h4&gt;
  
  
  Adding a new key-value pair
&lt;/h4&gt;

&lt;p&gt;alien['x_position'] = 0&lt;/p&gt;

&lt;h4&gt;
  
  
  Looping through all key-value pairs
&lt;/h4&gt;

&lt;p&gt;fav_numbers = {'eric': 17, 'ever': 4} for name, number in fav_numbers.items():&lt;/p&gt;

&lt;p&gt;print(name + ' loves ' + str(number))&lt;/p&gt;

&lt;h4&gt;
  
  
  Looping through all keys
&lt;/h4&gt;

&lt;p&gt;fav_numbers = {'eric': 17, 'ever': 4} for name in fav_numbers.keys():&lt;/p&gt;

&lt;p&gt;print(name + ' loves a number')&lt;/p&gt;

&lt;h4&gt;
  
  
  Looping through all the values
&lt;/h4&gt;

&lt;p&gt;fav_numbers = {'eric': 17, 'ever': 4}&lt;/p&gt;

&lt;p&gt;for number in fav_numbers.values():&lt;/p&gt;

&lt;p&gt;print(str(number) + ' is a favorite')&lt;/p&gt;

&lt;h1&gt;
  
  
  UserInput
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Your programs can prompt the user for input. All input is stored as a string.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Prompting for a value
&lt;/h4&gt;

&lt;p&gt;name = input("What's your name? ")&lt;br&gt;
print("Hello, " + name + "!")&lt;/p&gt;

&lt;p&gt;Prompting for numerical input&lt;/p&gt;

&lt;p&gt;age = input("How old are you? ")&lt;br&gt;
age = int(age)&lt;/p&gt;

&lt;p&gt;pi = input("What's the value of pi? ")&lt;br&gt;
pi = float(pi)&lt;/p&gt;

&lt;h1&gt;
  
  
  While-Loops
&lt;/h1&gt;

&lt;p&gt;A while loop repeats a block of code as long as a certain condition is true.&lt;/p&gt;

&lt;h1&gt;
  
  
  A simple while loop
&lt;/h1&gt;

&lt;p&gt;current_value = 1&lt;/p&gt;

&lt;p&gt;while current_value &amp;lt;= 5:&lt;/p&gt;

&lt;p&gt;print(current_value)&lt;/p&gt;

&lt;p&gt;current_value += 1&lt;/p&gt;

&lt;h4&gt;
  
  
  Letting the user choose when to quit
&lt;/h4&gt;

&lt;p&gt;msg = ''&lt;/p&gt;

&lt;p&gt;while msg != 'quit':&lt;/p&gt;

&lt;p&gt;msg = input("What's your message? ")&lt;/p&gt;

&lt;p&gt;print(msg)&lt;/p&gt;

&lt;h1&gt;
  
  
  Functions
&lt;/h1&gt;

&lt;h5&gt;
  
  
  Functions are named blocks of code, designed to do one specific job. Information passed to a function is called an argument, and information received by a function is called a parameter.
&lt;/h5&gt;

&lt;h4&gt;
  
  
  A simple function
&lt;/h4&gt;

&lt;p&gt;def greet_user():&lt;br&gt;
"""Display a simple greeting."""&lt;br&gt;
print("Hello!")&lt;/p&gt;

&lt;p&gt;greet_user()&lt;/p&gt;

&lt;h4&gt;
  
  
  Passing an argument
&lt;/h4&gt;

&lt;p&gt;def greet_user(username):&lt;br&gt;
"""Display a personalized greeting."""&lt;/p&gt;

&lt;p&gt;print("Hello, " + username + "!")&lt;/p&gt;

&lt;p&gt;greet_user('jesse')&lt;/p&gt;

&lt;h4&gt;
  
  
  Default values for parameters
&lt;/h4&gt;

&lt;p&gt;def make_pizza(topping='bacon'):&lt;/p&gt;

&lt;p&gt;"""Make a single-topping pizza.""" print("Have a " + topping + " pizza!")&lt;/p&gt;

&lt;p&gt;make_pizza()&lt;br&gt;
make_pizza('pepperoni')&lt;/p&gt;

&lt;h4&gt;
  
  
  Returning a value
&lt;/h4&gt;

&lt;p&gt;def add_numbers(x, y):&lt;br&gt;
"""Add two numbers and return the sum."""&lt;br&gt;
return x + y&lt;/p&gt;

&lt;p&gt;sum = add_numbers(3, 5)&lt;br&gt;
print(sum)&lt;/p&gt;

&lt;h1&gt;
  
  
  Class
&lt;/h1&gt;

&lt;h4&gt;
  
  
  A class defines the behavior of an object and the kind of information an object can store. The information in a class is stored in attributes, and functions that belong to a class are called methods. A child class inherits the attributes and methods from its parent class.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Creating a dog class
&lt;/h4&gt;

&lt;p&gt;class Dog():&lt;/p&gt;

&lt;p&gt;"""Represent a dog."""&lt;/p&gt;

&lt;p&gt;def &lt;strong&gt;init&lt;/strong&gt;(self, name):&lt;/p&gt;

&lt;p&gt;"""Initialize dog object."""&lt;/p&gt;

&lt;p&gt;self.name = name&lt;/p&gt;

&lt;p&gt;def sit(self):&lt;/p&gt;

&lt;p&gt;"""Simulate sitting.""" print(self.name + " is sitting.")&lt;/p&gt;

&lt;p&gt;my_dog = Dog('Peso')&lt;/p&gt;

&lt;p&gt;print(my_dog.name + " is a great dog!")&lt;/p&gt;

&lt;p&gt;my_dog.sit()&lt;/p&gt;

&lt;h4&gt;
  
  
  Inheritance
&lt;/h4&gt;

&lt;p&gt;class SARDog(Dog):&lt;/p&gt;

&lt;p&gt;"""Represent a search dog."""&lt;/p&gt;

&lt;p&gt;def &lt;strong&gt;init&lt;/strong&gt;(self, name):&lt;/p&gt;

&lt;p&gt;"""Initialize the sardog."""&lt;/p&gt;

&lt;p&gt;super().&lt;strong&gt;init&lt;/strong&gt;(name)&lt;/p&gt;

&lt;p&gt;def search(self):&lt;/p&gt;

&lt;p&gt;"""Simulate searching.""" print(self.name + " is searching.")&lt;/p&gt;

&lt;p&gt;my_dog = SARDog('Willie')&lt;/p&gt;

&lt;p&gt;print(my_dog.name + " is a search dog.")&lt;/p&gt;

&lt;p&gt;my_dog.sit()&lt;/p&gt;

&lt;p&gt;my_dog.search()&lt;/p&gt;

&lt;p&gt;I&lt;br&gt;
 Reading a file and storing its lines&lt;/p&gt;

&lt;h1&gt;
  
  
  Working With Files
&lt;/h1&gt;

&lt;p&gt;filename = 'LP.txt'&lt;/p&gt;

&lt;p&gt;with open(filename) as file_object: lines = file_object.readlines()&lt;/p&gt;

&lt;p&gt;for line in lines:&lt;/p&gt;

&lt;p&gt;print(line)&lt;/p&gt;

&lt;h4&gt;
  
  
  Writing to a file
&lt;/h4&gt;

&lt;p&gt;filename = 'journal.txt'&lt;/p&gt;

&lt;p&gt;with open(filename, 'w') as file_object:&lt;/p&gt;

&lt;p&gt;file_object.write("I love programming.")&lt;/p&gt;

&lt;h4&gt;
  
  
  Appending to a file
&lt;/h4&gt;

&lt;p&gt;filename = 'journal.txt'&lt;/p&gt;

&lt;p&gt;with open(filename, 'a') as file_object:&lt;/p&gt;

&lt;p&gt;file_object.write("\nI love making games.")&lt;/p&gt;

&lt;h1&gt;
  
  
  Exception Handling
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Exceptions help you respond appropriately to errors that are likely to occur. You place code that might cause an error in the try block. Code that should run in response to an error goes in the except block. Code that should run only if the try block was successful goes in the else block.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Catching an exception
&lt;/h4&gt;

&lt;p&gt;prompt = "How many tickets do you need? "&lt;br&gt;
num_tickets = input(prompt)&lt;/p&gt;

&lt;p&gt;try:&lt;br&gt;
num_tickets = int(num_tickets)&lt;br&gt;
except ValueError:&lt;br&gt;
print("Please try again.")&lt;/p&gt;

&lt;p&gt;else:&lt;br&gt;
print("Your tickets are printing.")&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>JavaScript Cheat Sheet</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Tue, 29 Sep 2020 09:38:16 +0000</pubDate>
      <link>https://dev.to/lakpa/javascript-cheat-sheet-111g</link>
      <guid>https://dev.to/lakpa/javascript-cheat-sheet-111g</guid>
      <description>&lt;h1&gt;
  
  
  JavaScript Basics
&lt;/h1&gt;

&lt;p&gt;Let’s start off with the basics – &lt;strong&gt;how to include JavaScript in a website&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can include JavaScript in your HTML in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Writing the code in your HTML&lt;/li&gt;
&lt;li&gt;Including it as a link to an external file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the most part, you will include the JavaScript as an external file.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Script Tag
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt; tag is what we use to includes our JavaScript. It's a lot like the    &amp;lt;link&amp;gt; tag you've already been using to include your CSS files.
&amp;gt;&amp;lt;script type="text/javascript"&amp;gt;
alert("This alert box was called with the onload event");
&amp;lt;/script&amp;gt;    
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Using the script tag to include an external JavaScript file
&lt;/h4&gt;

&lt;p&gt;To include an external JavaScript file, we can use the script tag with the attribute src. You've already used the src&lt;br&gt;
attribute when using images. The value for the src attribute should be the path to your JavaScript file.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script type="text/javascript" src="path-to-javascript-file.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This script tag should be included between the &lt;/p&gt; tags in your HTML document.

&lt;p&gt;&lt;strong&gt;Including Comments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Comments are important because they help other people understand what is going on in your code or remind you if you&lt;br&gt;
forgot something yourself. Keep in mind that they have to be marked properly so the browser won’t try to execute them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In JavaScript you have two different options:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single-line comments&lt;/strong&gt; — To include a comment that is limited to a single line, precede it with //&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-line comments&lt;/strong&gt; — In case you want to write longer comments between several lines, wrap it in /* and */ to&lt;br&gt;
avoid it from being executed&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Variables in JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variables are stand-in values that you can use to perform operations. You should be familiar with them from math class.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;var, const, let&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You have three different possibilities for declaring a variable in JavaScript, each with their own specialties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;var — The most common variable. It can be reassigned but only accessed within a function. Variables defined with var
move to the top when the code is executed.&lt;/li&gt;
&lt;li&gt;const — Can not be reassigned and not accessible before they appear withinthe code.&lt;/li&gt;
&lt;li&gt;let — Similar to const, the let variable can be reassigned but not re-declared.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variables can contain different types of values and data types. You use = to assign them:&lt;/p&gt;

&lt;p&gt;Numbers&lt;br&gt;
 var age = 23 &lt;/p&gt;

&lt;p&gt;Variables — var x Text (strings) — var a = "init"&lt;/p&gt;

&lt;p&gt;Operations — var b = 1 + 2 + 3 &lt;/p&gt;

&lt;p&gt;True or false statements — var c = true&lt;/p&gt;

&lt;p&gt;Constant numbers — const PI = 3.14 &lt;/p&gt;

&lt;p&gt;Objects — var&lt;br&gt;
name = {firstName:"John", lastName:"Doe"} &lt;/p&gt;

&lt;p&gt;There are more possibilities. Note that variables are case sensitive. That&lt;br&gt;
means lastname and lastName will be handled as two different variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Objects are certain kinds of variables. They are variables that can have their own values and methods. The latter are&lt;br&gt;
actions that you can perform on objects.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var person = {
firstName:"John",
lastName:"Doe",
age:20,
nationality:"German"
 };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The Next Level: Arrays&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next up in our JavaScript cheat sheet are arrays. Arrays are part of many different programming languages. They are a&lt;br&gt;
way of organizing variables and properties into groups. Here’s how to create one in JavaScript:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var fruit = ["Banana", "Apple", "Pear"];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now you have an array called fruit which contains three items that you can use for future operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you have created arrays, there are a few things you can do with them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;concat() — Join several arrays into one indexOf() — Returns the first position at which a given element appears in an&lt;/li&gt;
&lt;li&gt;array join() — Combine elements of an array into a single string and return the string &lt;/li&gt;
&lt;li&gt;lastIndexOf() — Gives the last
position at which a given element appears in an array &lt;/li&gt;
&lt;li&gt;pop() — Removes the last element of an array &lt;/li&gt;
&lt;li&gt;&lt;p&gt;push() — Add a new   element at the end &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;reverse() — Sort elements in a descending order &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;shift() — Remove the first element of an array&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;slice() — Pulls a copy of a portion of an array into a new  array &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sort() — Sorts elements alphabetically &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;splice() — Adds elements in a specified way and position &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;toString() — Converts elements to strings &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;unshift() —Adds a new element to the&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;beginning valueOf() — Returns the primitive value of the specified object&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have variables, you can use them to perform different kinds of operations. To do so, you need operators.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Operators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;br&gt;
    + — Addition&lt;br&gt;
*&lt;br&gt;
    - — Subtraction&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;— Multiplication&lt;/li&gt;
&lt;li&gt;/ — Division&lt;/li&gt;
&lt;li&gt;(...) — Grouping operator, operations within brackets are executed earlier than those outside&lt;/li&gt;
&lt;li&gt;% — Modulus (remainder )&lt;/li&gt;
&lt;li&gt;++ — Increment numbers&lt;/li&gt;
&lt;li&gt;-- — Decrement numbers&lt;/li&gt;
&lt;li&gt;Comparison Operators&lt;/li&gt;
&lt;li&gt;== — Equal to&lt;/li&gt;
&lt;li&gt;=== — Equal value and equal type&lt;/li&gt;
&lt;li&gt;!= — Not equal&lt;/li&gt;
&lt;li&gt;!== — Not equal value or not equal type&lt;/li&gt;
&lt;li&gt;&amp;gt; — Greater than&lt;/li&gt;
&lt;li&gt;&amp;lt; — Less than&lt;/li&gt;
&lt;li&gt;&amp;gt; = — Greater than or equal to&lt;/li&gt;
&lt;li&gt;&amp;lt;= — Less than or equal to&lt;/li&gt;
&lt;li&gt;? — Ternary operator&lt;/li&gt;
&lt;li&gt;Logical Operators&lt;/li&gt;
&lt;li&gt;&amp;amp;&amp;amp; — Logical and&lt;/li&gt;
&lt;li&gt;|| — Logical or&lt;/li&gt;
&lt;li&gt;! — Logical not&lt;/li&gt;
&lt;li&gt;Bitwise Operators&lt;/li&gt;
&lt;li&gt;&amp;amp; — AND statement&lt;/li&gt;
&lt;li&gt;| — OR statement&lt;/li&gt;
&lt;li&gt;~ — NOT&lt;/li&gt;
&lt;li&gt;^ — XOR&lt;/li&gt;
&lt;li&gt;&amp;lt;&amp;lt; — Left shift&lt;/li&gt;
&lt;li&gt;&amp;gt; &amp;gt; — Right shift&lt;/li&gt;
&lt;li&gt;&amp;gt; &amp;gt; &amp;gt; — Zero fill right shift&lt;/li&gt;
&lt;li&gt;&amp;gt; &amp;gt; &amp;gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript functions are blocks of code that perform a certain task. A basic function looks like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function name(parameter1, parameter2, parameter3) {
// what the function does
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;As you can see, it consists of the function keyword plus a name. The function’s parameters are in the brackets and you&lt;br&gt;
have curly brackets around what the function performs. You can create your own, but to make your life easier – there are&lt;br&gt;
also a number of default functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outputting Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A common application for functions is the output of data. For the output, you have the following options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;alert() — Output data in an alert box in the browser window&lt;/li&gt;
&lt;li&gt;confirm() — Opens up a yes/no dialog and returns true/false
depending on user click &lt;/li&gt;
&lt;li&gt;console.log() — Writes information to the browser       console,good for debugging purposes&lt;/li&gt;
&lt;li&gt;document.write() — Write directly to the HTML document prompt() — Creates a dialogue for user input&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Global Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Global functions are functions built into every browser capable of running JavaScript.&lt;/p&gt;

&lt;p&gt;decodeURI() — Decodes a Uniform Resource Identifier (URI) created by encodeURI or similar decodeURIComponent() — Decodes a URI component &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;encodeURI() — Encodes a URI into UTF-8 encodeURIComponent() — Same but for URI components &lt;/li&gt;
&lt;li&gt;eval() —
Evaluates JavaScript code represented as a string &lt;/li&gt;
&lt;li&gt;isFinite() — Determines whether a passed value is a finite number&lt;/li&gt;
&lt;li&gt;isNaN() — Determines whether a value is NaN or not Number() &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loops are part of most programming languages. They allow you to execute blocks of code desired number of times with&lt;br&gt;
different values:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (before loop; condition for loop; execute after loop) {
// what to do during the loop
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You have several parameters to create loops:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; for — The most common way to create a loop in JavaScript  * while — Sets up conditions under which a loop executes do while&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If – Else Statements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These types of statements are easy to understand. Using them, you can set conditions for when your code is executed. If&lt;br&gt;
certain conditions apply, something is done, if not – something else is executed.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (condition) {
// what to do if condition is met
} else {
// what to do if condition is not met
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;A similar concept to if else is the switch statement. However, using the switch you select one of several code blocks to&lt;br&gt;
execute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Strings are what JavaScript calls to text that does not perform a function but can appear on the screen.&lt;/p&gt;

&lt;p&gt;var person = "John Doe"; In this case, John Doe is the string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Escape Characters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, strings are marked with single or double-quotes. If you want to use quotation marks in a string, you need&lt;br&gt;
to use special characters:&lt;/p&gt;

&lt;p&gt;\' — Single quote \" — Double quote Aside from that you also have additional escape characters:&lt;/p&gt;

&lt;p&gt;\ — Backslash \b — Backspace \f — Form feed \n — New line \r — Carriage return \t — Horizontal tabulator \v — Vertical&lt;br&gt;
tabulator&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;String Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are many different ways to work with strings:&lt;/p&gt;

&lt;p&gt;charAt() — Returns a character at a specified position inside a string charCodeAt() — Gives you the Unicode of a&lt;br&gt;
character at that position concat() — Concatenates (joins) two or more strings into one fromCharCode() — Returns a&lt;br&gt;
string created from the specified sequence of UTF-16 code units indexOf() — Provides the position of the first&lt;br&gt;
occurrence of a specified text within a string lastIndexOf() — Same as indexOf() but with the last occurrence, searching&lt;br&gt;
backward match() — Retrieves the matches of a string against a search pattern replace() — Find and replace specified&lt;br&gt;
text in a string search() — Executes a search for a matching text and returns its position slice() — Extracts a section&lt;br&gt;
of a string and returns it as a new string split() — Splits a string object into an array of strings at a specified&lt;br&gt;
position substr() — Similar to slice() but extracts a substring depending on a specified number of characters&lt;br&gt;
substring() — Also similar to slice() but can’t accept negative indices toLowerCase() — Convert strings to lower case&lt;br&gt;
toUpperCase() — Convert strings to upper case valueOf() — Returns the primitive value (that has no properties or&lt;br&gt;
methods) of a string object&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Regular Expression Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Regular expressions are search patterns used to match character combinations in strings. The search pattern can be used&lt;br&gt;
for text search and text to replace operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern Modifiers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;e — Evaluate replacement i — Perform case-insensitive matching g — Perform global matching m — Perform multiple line&lt;br&gt;
matching s — Treat strings as a single line x — Allow comments and whitespace in the pattern U — Ungreedy pattern&lt;br&gt;
Brackets&lt;br&gt;
[abc] — Find any of the characters between the brackets&lt;br&gt;
[^abc] — Find any character which is not in the brackets&lt;br&gt;
[0-9] — Used to find any digit from 0 to 9&lt;br&gt;
[A-z] — Find any character from uppercase A to lowercase z&lt;br&gt;
(a|b|c) — Find any of the alternatives separated with |&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Metacharacters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;. — Find a single character, except newline or line terminator \w — Word character \W — Non-word character \d — A digit&lt;br&gt;
\D — A non-digit character \s — Whitespace character \S — Non-whitespace character \b — Find a match at the&lt;br&gt;
beginning/end of a word \B — A match not at the beginning/end of a word \0 — NUL character \n — A new line character \f&lt;br&gt;
— Form feed character \r — Carriage return character \t — Tab character \v — Vertical tab character \xxx — The character&lt;br&gt;
specified by an octal number xxx \xdd — Character specified by a hexadecimal number dd \uxxxx — The Unicode character&lt;br&gt;
specified by a hexadecimal number XXXX Quantifiers n+ — Matches any string that contains at least one n n* — Any string&lt;br&gt;
that contains zero or more occurrences of n n? — A string that contains zero or one occurrence of n n{X} — String that&lt;br&gt;
contains a sequence of X n’s n{X,Y} — Strings that contain a sequence of X to Y n’s n{X,} — Matches any string that&lt;br&gt;
contains a sequence of at least X n’s n$ — Any string with n at the end of it ^n — String with n at the beginning of it&lt;br&gt;
?=n — Any string that is followed by a specific string n ?!n — String that is not followed by a specific string ni&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Numbers and Math&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, you can also work with numbers, constants and perform mathematical functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Number Properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MAX_VALUE — The maximum numeric value representable in JavaScript MIN_VALUE — Smallest positive numeric value&lt;br&gt;
representable in JavaScript NaN — The “Not-a-Number” value NEGATIVE_INFINITY — The negative Infinity value&lt;br&gt;
POSITIVE_INFINITY — Positive Infinity value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Number Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;toExponential() — Returns the string with a rounded number written as exponential notation toFixed() — Returns the&lt;br&gt;
string of a number with a specified number of decimals toPrecision() — String of a number written with a specified&lt;br&gt;
length toString() — Returns a number as a string valueOf() — Returns a number as a number&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Math Properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;E — Euler’s number LN2 — The natural logarithm of 2 LN10 — Natural logarithm of 10 LOG2E — Base 2 logarithm of E LOG10E&lt;br&gt;
— Base 10 logarithm of E PI — The number PI SQRT1_2 — Square root of 1/2 SQRT2 — The square root of 2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Math Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;abs(x) — Returns the absolute (positive) value of x acos(x) — The arccosine of x, in radians asin(x) — Arcsine of x, in&lt;br&gt;
radians atan(x) — The arctangent of x as a numeric value atan2(y,x) — Arctangent of the quotient of its arguments ceil(&lt;br&gt;
x) — Value of x rounded up to its nearest integer cos(x) — The cosine of x (x is in radians)&lt;br&gt;
exp(x) — Value of Ex floor(x) — The value of x rounded down to its nearest integer log(x) — The natural logarithm (base&lt;br&gt;
E) of x max(x,y,z,...,n) — Returns the number with the highest value min(x,y,z,...,n) — Same for the number with the&lt;br&gt;
lowest value pow(x,y) — X to the power of y random() — Returns a random number between 0 and 1 round(x) — The value of x&lt;br&gt;
rounded to its nearest integer sin(x) — The sine of x (x is in radians)&lt;br&gt;
sqrt(x) — Square root of x tan(x) — The tangent of an angle Dealing with Dates in JavaScript You can also work with and&lt;br&gt;
modify dates and time with JavaScript. This is the next chapter in the JavaScript cheat sheet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting Dates&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Date() — Creates a new date object with the current date and time Date(2017, 5, 21, 3, 23, 10, 0) — Create a custom date&lt;br&gt;
object. The numbers represent a year, month, day, hour, minutes, seconds, milliseconds. You can omit anything you want&lt;br&gt;
except for a year and month. Date("2017-06-23") — Date declaration as a string Pulling Date and Time Values getDate() —&lt;br&gt;
Get the day of the month as a number (1-31)&lt;br&gt;
getDay() — The weekday as a number (0-6)&lt;br&gt;
getFullYear() — Year as a four-digit number (yyyy)&lt;br&gt;
getHours() — Get the hour (0-23)&lt;br&gt;
getMilliseconds() — The millisecond (0-999)&lt;br&gt;
getMinutes() — Get the minute (0-59)&lt;br&gt;
getMonth() — Month as a number (0-11)&lt;br&gt;
getSeconds() — Get the second (0-59)&lt;br&gt;
getTime() — Get the milliseconds since January 1, 1970 getUTCDate() — The day (date) of the month in the specified date&lt;br&gt;
according to universal time (also available for day, month, full year, hours, minutes etc.)&lt;br&gt;
parse — Parses a string representation of a date and returns the number of milliseconds since January 1, 1970 Set Part&lt;br&gt;
of a Date setDate() — Set the day as a number (1-31)&lt;br&gt;
setFullYear() — Sets the year (optionally month and day)&lt;br&gt;
setHours() — Set the hour (0-23)&lt;br&gt;
setMilliseconds() — Set milliseconds (0-999)&lt;br&gt;
setMinutes() — Sets the minutes (0-59)&lt;br&gt;
setMonth() — Set the month (0-11)&lt;br&gt;
setSeconds() — Sets the seconds (0-59)&lt;br&gt;
setTime() — Set the time (milliseconds since January 1, 1970)&lt;br&gt;
setUTCDate() — Sets the day of the month for a specified date according to universal time (also available for day,&lt;br&gt;
month, full year, hours, minutes etc.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DOM Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The DOM is the Document Object Model of a page. It is the code of the structure of a webpage. JavaScript comes with a&lt;br&gt;
lot of different ways to create and manipulate HTML elements (called nodes).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Node Properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;attributes — Returns a live collection of all attributes registered to an element baseURI — Provides the absolute base&lt;br&gt;
URL of an HTML element childNodes — Gives a collection of an element’s child nodes firstChild — Returns the first child&lt;br&gt;
node of an element lastChild — The last child node of an element nextSibling — Gives you the next node at the same node&lt;br&gt;
tree level nodeName —Returns the name of a node nodeType — Returns the type of a node nodeValue — Sets or returns the&lt;br&gt;
value of a node ownerDocument — The top-level document object for this node parentNode — Returns the parent node of an&lt;br&gt;
element previousSibling — Returns the node immediately preceding the current one textContent — Sets or returns the&lt;br&gt;
textual content of a node and its descendants&lt;br&gt;
&lt;strong&gt;Node Methods&lt;/strong&gt;&lt;br&gt;
appendChild() — Adds a new child node to an element as the last child node cloneNode() — Clones an HTML element&lt;br&gt;
compareDocumentPosition() — Compares the document position of two elements getFeature() — Returns an object which&lt;br&gt;
implements the APIs of a specified feature hasAttributes() — Returns true if an element has any attributes, otherwise&lt;br&gt;
false hasChildNodes() — Returns true if an element has any child nodes, otherwise false insertBefore() — Inserts a new&lt;br&gt;
child node before a specified, existing child node isDefaultNamespace() — Returns true if a specified namespaceURI is&lt;br&gt;
the default, otherwise false isEqualNode() — Checks if two elements are equal isSameNode() — Checks if two elements are&lt;br&gt;
the same node isSupported() — Returns true if a specified feature is supported on the element lookupNamespaceURI() —&lt;br&gt;
Returns the namespace URI associated with a given node lookupPrefix() — Returns a DOMString containing the prefix for a&lt;br&gt;
given namespace URI if present normalize() — Joins adjacent text nodes and removes empty text nodes in an element&lt;br&gt;
removeChild() — Removes a child node from an element replaceChild() — Replaces a child node in an element Element&lt;br&gt;
Methods getAttribute() — Returns the specified attribute value of an element node getAttributeNS() — Returns string&lt;br&gt;
value of the attribute with the specified namespace and name getAttributeNode() — Gets the specified attribute node&lt;br&gt;
getAttributeNodeNS() — Returns the attribute node for the attribute with the given namespace and name&lt;br&gt;
getElementsByTagName() — Provides a collection of all child elements with the specified tag name&lt;br&gt;
getElementsByTagNameNS() — Returns a live HTMLCollection of elements with a certain tag name belonging to the given&lt;br&gt;
namespace hasAttribute() — Returns true if an element has any attributes, otherwise false hasAttributeNS() — Provides a&lt;br&gt;
true/false value indicating whether the current element in a given namespace has the specified attribute&lt;br&gt;
removeAttribute() — Removes a specified attribute from an element removeAttributeNS() — Removes the specified attribute&lt;br&gt;
from an element within a certain namespace removeAttributeNode() — Takes away a specified attribute node and returns the&lt;br&gt;
removed node setAttribute() — Sets or changes the specified attribute to a specified value setAttributeNS() — Adds a new&lt;br&gt;
attribute or changes the value of an attribute with the given namespace and name setAttributeNode() — Sets or changes&lt;br&gt;
the specified attribute node setAttributeNodeNS() — Adds a new namespaced attribute node to an element Working with the&lt;br&gt;
User Browser Besides HTML elements, JavaScript is also able to take into account the user browser and incorporate its&lt;br&gt;
properties into the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Window Properties&lt;/strong&gt;&lt;br&gt;
closed — Checks whether a window has been closed or not and returns true or false defaultStatus — Sets or returns the&lt;br&gt;
default text in the status bar of a window document — Returns the document object for the window frames — Returns&lt;br&gt;
all  elements in the current window history — Provides the History object for the window innerHeight — The inner&lt;br&gt;
height of a window’s content area innerWidth — The inner width of the content area length — Find out the number&lt;br&gt;
of   elements in the window location — Returns the location object for the window name — Sets or returns the&lt;br&gt;
name of a window navigator — Returns the Navigator object for the window opener — Returns a reference to the window that&lt;br&gt;
created the window outerHeight — The outer height of a window, including toolbars/scrollbars outerWidth — The outer&lt;br&gt;
width of a window, including toolbars/scrollbars pageXOffset — Number of pixels the current document has been scrolled&lt;br&gt;
horizontally pageYOffset — Number of pixels the document has been scrolled vertically parent — The parent window of the&lt;br&gt;
current window screen — Returns the Screen object for the window screenLeft — The horizontal coordinate of the window (&lt;br&gt;
relative to the screen)&lt;br&gt;
screenTop — The vertical coordinate of the window screenX — Same as screenLeft but needed for some browsers screenY —&lt;br&gt;
Same as screenTop but needed for some browsers self — Returns the current window status — Sets or returns the text in&lt;br&gt;
the status bar of a window top — Returns the topmost browser window&lt;br&gt;
&lt;strong&gt;Window Methods&lt;/strong&gt;&lt;br&gt;
alert() — Displays an alert box with a message and an OK button blur() — Removes focus from the current window&lt;br&gt;
clearInterval() — Clears a timer set with setInterval()&lt;br&gt;
clearTimeout() — Clears a timer set with setTimeout()&lt;br&gt;
close() — Closes the current window confirm() — Displays a dialogue box with a message and an OK and Cancel button&lt;br&gt;
focus() — Sets focus to the current window moveBy() — Moves a window relative to its current position moveTo() — Moves a&lt;br&gt;
window to a specified position open() — Opens a new browser window print() — Prints the content of the current window&lt;br&gt;
prompt() — Displays a dialogue box that prompts the visitor for input resizeBy() — Resizes the window by the specified&lt;br&gt;
number of pixels resizeTo() — Resizes the window to a specified width and height scrollBy() — Scrolls the document by a&lt;br&gt;
specified number of pixels scrollTo() — Scrolls the document to specified coordinates setInterval() — Calls a function&lt;br&gt;
or evaluates an expression at specified intervals setTimeout() — Calls a function or evaluates an expression after a&lt;br&gt;
specified interval stop() — Stops the window from loading&lt;br&gt;
&lt;strong&gt;Screen Properties&lt;/strong&gt;&lt;br&gt;
availHeight — Returns the height of the screen (excluding the Windows Taskbar)&lt;br&gt;
availWidth — Returns the width of the screen (excluding the Windows Taskbar)&lt;br&gt;
colorDepth — Returns the bit depth of the color palette for displaying images height — The total height of the screen&lt;br&gt;
pixelDepth — The color resolution of the screen in bits per pixel width — The total width of the screen&lt;br&gt;
&lt;strong&gt;JavaScript Events&lt;/strong&gt;&lt;br&gt;
Events are things that can happen to HTML elements and are performed by the user. The programming language can listen&lt;br&gt;
for these events and trigger actions in the code. No JavaScript cheat sheet would be complete without them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mouse&lt;/strong&gt;&lt;br&gt;
onclick — The event occurs when the user clicks on an element oncontextmenu — User right-clicks on an element to open a&lt;br&gt;
context menu ondblclick — The user double-clicks on an element onmousedown — User presses a mouse button over an element&lt;br&gt;
onmouseenter — The pointer moves onto an element onmouseleave — Pointer moves out of an element onmousemove — The&lt;br&gt;
pointer is moving while it is over an element onmouseover — When the pointer is moved onto an element or one of its&lt;br&gt;
children onmouseout — User moves the mouse pointer out of an element or one of its children onmouseup — The user&lt;br&gt;
releases a mouse button while over an element&lt;br&gt;
&lt;strong&gt;Keyboard&lt;/strong&gt;&lt;br&gt;
onkeydown — When the user is pressing a key down onkeypress — The moment the user starts pressing a key onkeyup — The&lt;br&gt;
user releases a key&lt;br&gt;
&lt;strong&gt;Frame&lt;/strong&gt;&lt;br&gt;
onabort — The loading of a media is aborted onbeforeunload — Event occurs before the document is about to be unloaded&lt;br&gt;
onerror — An error occurs while loading an external file onhashchange — There have been changes to the anchor part of a&lt;br&gt;
URL onload — When an object has loaded onpagehide — The user navigates away from a webpage onpageshow — When the user&lt;br&gt;
navigates to a webpage onresize — The document view is resized onscroll — An element’s scrollbar is being scrolled&lt;br&gt;
onunload — Event occurs when a page has unloaded&lt;br&gt;
&lt;strong&gt;Form&lt;/strong&gt;&lt;br&gt;
onblur — When an element loses focus onchange — The content of a form element changes (for , &lt;br&gt;
and )&lt;br&gt;
onfocus — An element gets focus onfocusin — When an element is about to get focus onfocusout — The element is about to&lt;br&gt;
lose focus oninput — User input on an element oninvalid — An element is invalid onreset — A form is reset onsearch — The&lt;br&gt;
user writes something in a search field (for )&lt;br&gt;
onselect — The user selects some text (for  and )&lt;br&gt;
onsubmit — A form is submitted&lt;br&gt;
&lt;strong&gt;Drag&lt;/strong&gt;&lt;br&gt;
ondrag — An element is dragged ondragend — The user has finished dragging the element ondragenter — The dragged element&lt;br&gt;
enters a drop target ondragleave — A dragged element leaves the drop target ondragover — The dragged element is on top&lt;br&gt;
of the drop target ondragstart — User starts to drag an element ondrop — Dragged element is dropped on the drop target&lt;br&gt;
&lt;strong&gt;Clipboard&lt;/strong&gt;&lt;br&gt;
oncopy — User copies the content of an element oncut — The user cuts an element’s content onpaste — A user pastes the&lt;br&gt;
content in an element&lt;br&gt;
&lt;strong&gt;Media&lt;/strong&gt;&lt;br&gt;
onabort — Media loading is aborted oncanplay — The browser can start playing media (e.g. a file has buffered enough)&lt;br&gt;
oncanplaythrough — The browser can play through media without stopping ondurationchange — The duration of the media&lt;br&gt;
changes onended — The media has reached its end onerror — Happens when an error occurs while loading an external file&lt;br&gt;
onloadeddata — Media data is loaded onloadedmetadata — Metadata (like dimensions and duration) are loaded onloadstart —&lt;br&gt;
The browser starts looking for specified media onpause — Media is paused either by the user or automatically onplay —&lt;br&gt;
The media has been started or is no longer paused onplaying — Media is playing after having been paused or stopped for&lt;br&gt;
buffering onprogress — The browser is in the process of downloading the media onratechange — The playing speed of the&lt;br&gt;
media changes onseeked — User is finished moving/skipping to a new position in the media onseeking — The user starts&lt;br&gt;
moving/skipping onstalled — The browser is trying to load the media but it is not available onsuspend — The browser is&lt;br&gt;
intentionally not loading media ontimeupdate — The playing position has changed (e.g. because of fast forward)&lt;br&gt;
onvolumechange — Media volume has changed (including mute)&lt;br&gt;
onwaiting — Media paused but expected to resume (for example, buffering)&lt;br&gt;
Animation animationend — A CSS animation is complete animationiteration — CSS animation is repeated animationstart — CSS&lt;br&gt;
animation has started Other transitionend — Fired when a CSS transition has completed onmessage — A message is received&lt;br&gt;
through the event source onoffline — The browser starts to work offline ononline — The browser starts to work online&lt;br&gt;
onpopstate — When the window’s history changes onshow — A  element is shown as a context menu onstorage — A Web&lt;br&gt;
Storage area is updated ontoggle — The user opens or closes the  element onwheel — Mouse wheel rolls up or down&lt;br&gt;
over an element ontouchcancel — Screen-touch is interrupted ontouchend — User’s finger is removed from a touch-screen&lt;br&gt;
ontouchmove — A finger is dragged across the screen ontouchstart — A finger is placed on the touch-screen&lt;br&gt;
&lt;strong&gt;Errors&lt;/strong&gt;&lt;br&gt;
When working with JavaScript, different errors can occur. There are several ways of handling them:&lt;/p&gt;

&lt;p&gt;try — Lets you define a block of code to test for errors catch — Set up a block of code to execute in case of an error&lt;br&gt;
throw — Create custom error messages instead of the standard JavaScript errors finally — Lets you execute code, after&lt;br&gt;
try and catch, regardless of the result Error Name Values JavaScript also has a built-in error object. It has two&lt;br&gt;
properties:&lt;/p&gt;

&lt;p&gt;name — Sets or returns the error name message — Sets or returns an error message in a string from The error property can&lt;br&gt;
return six different values as its name:&lt;/p&gt;

&lt;p&gt;EvalError — An error has occurred in the eval() function RangeError — A number is “out of range” ReferenceError — An&lt;br&gt;
illegal reference has occurred SyntaxError — A syntax error has occurred TypeError — A type error has occurred URIError&lt;br&gt;
— An encodeURI() error has occurred The JavaScript Cheat Sheet in a Nutshell JavaScript is gaining much importance as a&lt;br&gt;
programming language. It is increasingly the go-to language for building web properties thanks to its proven track&lt;br&gt;
record and benefits.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Python in 10 minutes</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Wed, 19 Aug 2020 07:39:53 +0000</pubDate>
      <link>https://dev.to/lakpa/python-in-10-minutes-57oj</link>
      <guid>https://dev.to/lakpa/python-in-10-minutes-57oj</guid>
      <description>&lt;p&gt;It’s probably not so much a tutorial as it is a cross between a tutorial and a cheat-sheet, so it will just show you some basic concepts to start you off. Obviously, if you want to really learn a language you need to program in it for a while. I will assume that you are already familiar with programming and will, therefore, skip most of the non-language-specific stuff.&lt;/p&gt;

&lt;h2&gt;Properties&lt;/h2&gt;

&lt;p&gt;Python is &lt;strong&gt;strongly typed&lt;/strong&gt; (i.e. types are enforced), &lt;strong&gt;dynamically, implicitly typed&lt;/strong&gt; (i.e. you don’t have to declare variables), &lt;strong&gt;case sensitive&lt;/strong&gt; (i.e. var and VAR are two different variables) and &lt;strong&gt;object-oriented&lt;/strong&gt; (i.e. everything is an object).&lt;/p&gt;

&lt;h2&gt;Getting help&lt;/h2&gt;

&lt;p&gt;Help in Python is always available right in the interpreter. If you want to know how an object works, all you have to do is call &lt;code&gt;help(&amp;lt;object&amp;gt;)&lt;/code&gt;! Also useful are &lt;code&gt;dir()&lt;/code&gt;, which shows you all the object’s methods, and &lt;code&gt;&amp;lt;object&amp;gt;.__doc__&lt;/code&gt;, which shows you its documentation string:&lt;/p&gt;

&lt;pre&gt;&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;help(5)
Help on int object:
(etc etc)

&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;dir(5)
['__abs__', '__add__', ...]

&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;abs.__doc__
'abs(number) -&amp;gt; number

Return the absolute value of the argument.
&lt;/pre&gt;

&lt;h2&gt;Syntax&lt;/h2&gt;

&lt;p&gt;Python has &lt;strong&gt;no mandatory statement termination characters&lt;/strong&gt; and &lt;strong&gt;blocks are specified by indentation&lt;/strong&gt;. Indent to begin a block, dedent to end one. Statements that expect an indentation level end in a colon (:). &lt;strong&gt;Comments&lt;/strong&gt; start with the pound (#) sign and are single-line, multi-line strings are used for &lt;strong&gt;multi-line comments&lt;/strong&gt;. &lt;strong&gt;Values are assigned&lt;/strong&gt; (in fact, objects are &lt;strong&gt;bound&lt;/strong&gt; to names) with the &lt;em&gt;equals&lt;/em&gt; sign (“=”), and &lt;strong&gt;equality testing&lt;/strong&gt; is done using two &lt;em&gt;equals&lt;/em&gt; signs (“==”). You can increment/decrement values using the += and -= operators respectively by the right-hand amount. This works on many datatypes, strings included. You can also use multiple variables on one line. For example:&lt;/p&gt;

&lt;pre&gt;&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myvar = 3
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myvar += 2
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myvar
5
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myvar -= 1
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myvar
4
"""This is a multiline comment.
The following lines concatenate the two strings."""
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mystring = "Hello"
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mystring += " world."
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(mystring)
Hello world.
# This swaps the variables in one line(!).
# It doesn't violate strong typing because values aren't
# actually being assigned, but new objects are bound to
# the old names.
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myvar, mystring = mystring, myvar
&lt;/pre&gt;

&lt;h2&gt;Data types&lt;/h2&gt;

&lt;p&gt;The data structures available in python are &lt;strong&gt;lists, tuples and dictionaries&lt;/strong&gt;. Sets are available in the &lt;code&gt;sets&lt;/code&gt; library (but are built-in in Python 2.5 and later). Lists are like one-dimensional arrays (but you can also have lists of other lists), dictionaries are associative arrays (a.k.a. hash tables) and tuples are immutable one-dimensional arrays (Python “arrays” can be of any type, so you can mix e.g. integers, strings, etc in lists/dictionaries/tuples). The index of the first item in all array types is 0. Negative numbers count from the end towards the beginning, -1 is the last item. Variables can point to functions. The usage is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;sample = [1, ["another", "list"], ("a", "tuple")]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mylist = ["List item 1", 2, 3.14]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mylist[0] = "List item 1 again" # We're changing the item.
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mylist[-1] = 3.21 # Here, we refer to the last item.
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mydict = {"Key 1": "Value 1", 2: 3, "pi": 3.14}
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mydict["pi"] = 3.15 # This is how you change dictionary values.
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mytuple = (1, 2, 3)
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;myfunction = len
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(myfunction(mylist))
3
&lt;/pre&gt;

&lt;p&gt;You can access &lt;strong&gt;array ranges&lt;/strong&gt; using a colon (:). Leaving the start index empty assumes the first item, leaving the end index assumes the last item. Indexing is inclusive-exclusive, so specifying &lt;code&gt;[2:10]&lt;/code&gt; will return items &lt;code&gt;[2]&lt;/code&gt; (the third item, because of 0-indexing) to &lt;code&gt;[9]&lt;/code&gt; (the tenth item), inclusive (8 items). Negative indexes count from the last item backwards (thus -1 is the last item) like so:&lt;/p&gt;

&lt;pre&gt;&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;mylist = ["List item 1", 2, 3.14]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(mylist[:])
['List item 1', 2, 3.1400000000000001]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(mylist[0:2])
['List item 1', 2]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(mylist[-3:-1])
['List item 1', 2]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(mylist[1:])
[2, 3.14]
# Adding a third parameter, "step" will have Python step in
# N item increments, rather than 1.
# E.g., this will return the first item, then go to the third and
# return that (so, items 0 and 2 in 0-indexing).
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(mylist[::2])
['List item 1', 3.14]
&lt;/pre&gt;

&lt;h2&gt;Strings&lt;/h2&gt;

&lt;p&gt;Its strings can use either single or double quotation marks, and you can have quotation marks of one kind inside a string that uses the other kind (i.e. “He said ’hello’.” is valid). Multiline strings are enclosed in _triple double (or single) quotes_ (“”“). Python strings are always Unicode, but there is another string type that is pure bytes. Those are called &lt;em&gt;bytestrings&lt;/em&gt; and are represented with the &lt;code&gt;b&lt;/code&gt; prefix, for example &lt;code&gt;b'Hello \xce\xb1'&lt;/code&gt;. . To fill a string with values, you use the % (modulo) operator and a tuple. Each %s gets replaced with an item from the tuple, left to right, and you can also use dictionary substitutions, like so:&lt;/p&gt;

&lt;pre&gt;&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print("Name: %s\
Number: %s\
String: %s" % (myclass.name, 3, 3 * "-"))
Name: Stavros
Number: 3
String: ---

strString = """This is
a multiline
string."""

# WARNING: Watch out for the trailing s in "%(key)s".
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print("This %(verb)s a %(noun)s." % {"noun": "test", "verb": "is"})
This is a test.

&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;name = "Stavros"
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;"Hello, {}!".format(name)
Hello, Stavros!
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(f"Hello, {name}!")
Hello, Stavros!
&lt;/pre&gt;

&lt;h2&gt;Flow control statements&lt;/h2&gt;

&lt;p&gt;Flow control statements are &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, and &lt;code&gt;while&lt;/code&gt;. There is no &lt;code&gt;switch&lt;/code&gt;; instead, use if. Use for to enumerate through members of a list. To obtain a sequence of numbers you can iterate over, use &lt;code&gt;range(&amp;lt;number&amp;gt;)&lt;/code&gt;. These statements’ syntax is thus:&lt;/p&gt;

&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; print(range(10))
range(0, 10)
&amp;gt;&amp;gt;&amp;gt; rangelist = list(range(10))
&amp;gt;&amp;gt;&amp;gt; print(rangelist)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

for number in range(10):
    # Check if number is one of
    # the numbers in the tuple.
    if number in (3, 4, 7, 9):
        # "Break" terminates a for without
        # executing the "else" clause.
        break
    else:
        # "Continue" starts the next iteration
        # of the loop. It's rather useless here,
        # as it's the last statement of the loop.
        continue
else:
    # The "else" clause is optional and is
    # executed only if the loop didn't "break".
    pass # Do nothing

if rangelist[1] == 2:
    print("The second item (lists are 0-based) is 2")
elif rangelist[1] == 3:
    print("The second item (lists are 0-based) is 3")
else:
    print("Dunno")

while rangelist[1] == 1:
    print("We are trapped in an infinite loop!")
&lt;/pre&gt;

&lt;h2&gt;Functions&lt;/h2&gt;

&lt;p&gt;Functions are &lt;strong&gt;declared with the &lt;code&gt;def&lt;/code&gt;&lt;/strong&gt; keyword. &lt;strong&gt;Optional arguments&lt;/strong&gt; are set in the function declaration after the mandatory arguments by being assigned a default value. For &lt;strong&gt;named arguments&lt;/strong&gt;, the name of the argument is assigned a value. Functions can return a tuple (and using tuple unpacking you can effectively return &lt;strong&gt;multiple values&lt;/strong&gt;). &lt;strong&gt;Lambda functions&lt;/strong&gt; are ad hoc functions that are comprised of a single statement. Parameters are passed &lt;strong&gt;by reference&lt;/strong&gt;, but immutable types (tuples, ints, strings, etc) &lt;em&gt;cannot be changed in the caller by the callee&lt;/em&gt;. This is because &lt;strong&gt;only the memory location of the item is passed&lt;/strong&gt;, and &lt;strong&gt;binding another object to a variable discards the old one&lt;/strong&gt;, so immutable types are replaced. For example:&lt;/p&gt;

&lt;pre&gt;# Same as def funcvar(x): return x + 1
funcvar = lambda x: x + 1
&amp;gt;&amp;gt;&amp;gt; print(funcvar(1))
2

# an_int and a_string are optional, they have default values
# if one is not passed (2 and "A default string", respectively).
def passing_example(a_list, an_int=2, a_string="A default string"):
    a_list.append("A new item")
    an_int = 4
    return a_list, an_int, a_string

&amp;gt;&amp;gt;&amp;gt; my_list = [1, 2, 3]
&amp;gt;&amp;gt;&amp;gt; my_int = 10
&amp;gt;&amp;gt;&amp;gt; print(passing_example(my_list, my_int))
([1, 2, 3, 'A new item'], 4, "A default string")
&amp;gt;&amp;gt;&amp;gt; my_list
[1, 2, 3, 'A new item']
&amp;gt;&amp;gt;&amp;gt; my_int
10
&lt;/pre&gt;

&lt;h2&gt;Classes&lt;/h2&gt;

&lt;p&gt;Python supports a limited form of &lt;strong&gt;multiple inheritance&lt;/strong&gt; in classes. &lt;strong&gt;Private variables and methods&lt;/strong&gt; can be declared (by convention, this is not enforced by the language) by adding a leading underscore (e.g. &lt;code&gt;_spam&lt;/code&gt;). We can also bind &lt;strong&gt;arbitrary names&lt;/strong&gt; to class instances. An example follows:&lt;/p&gt;

&lt;pre&gt;class MyClass(object):
    common = 10
    def __init__(self):
        self.myvariable = 3
    def myfunction(self, arg1, arg2):
        return self.myvariable

    # This is the class instantiation

&amp;gt;&amp;gt;&amp;gt; classinstance = MyClass()
&amp;gt;&amp;gt;&amp;gt; classinstance.myfunction(1, 2)
3
# This variable is shared by all instances.
&amp;gt;&amp;gt;&amp;gt; classinstance2 = MyClass()
&amp;gt;&amp;gt;&amp;gt; classinstance.common
10
&amp;gt;&amp;gt;&amp;gt; classinstance2.common
10
# Note how we use the class name
# instead of the instance.
&amp;gt;&amp;gt;&amp;gt; MyClass.common = 30
&amp;gt;&amp;gt;&amp;gt; classinstance.common
30
&amp;gt;&amp;gt;&amp;gt; classinstance2.common
30
# This will not update the variable on the class,
# instead it will bind a new object to the old
# variable name.
&amp;gt;&amp;gt;&amp;gt; classinstance.common = 10
&amp;gt;&amp;gt;&amp;gt; classinstance.common
10
&amp;gt;&amp;gt;&amp;gt; classinstance2.common
30
&amp;gt;&amp;gt;&amp;gt; MyClass.common = 50
# This has not changed, because "common" is
# now an instance variable.
&amp;gt;&amp;gt;&amp;gt; classinstance.common
10
&amp;gt;&amp;gt;&amp;gt; classinstance2.common
50

# This class inherits from MyClass. The example
# class above inherits from "object", which makes
# it what's called a "new-style class".
# Multiple inheritance is declared as:
# class OtherClass(MyClass1, MyClass2, MyClassN)
class OtherClass(MyClass):
    # The "self" argument is passed automatically
    # and refers to the class instance, so you can set
    # instance variables as above, but from inside the class.
    def __init__(self, arg1):
        self.myvariable = 3
        print(arg1)

&amp;gt;&amp;gt;&amp;gt; classinstance = OtherClass("hello")
hello
&amp;gt;&amp;gt;&amp;gt; classinstance.myfunction(1, 2)
3
# This class doesn't have a .test member, but
# we can add one to the instance anyway. Note
# that this will only be a member of classinstance.
&amp;gt;&amp;gt;&amp;gt; classinstance.test = 10
&amp;gt;&amp;gt;&amp;gt; classinstance.test
10
&lt;/pre&gt;

&lt;h2&gt;Exceptions&lt;/h2&gt;

&lt;p&gt;Exceptions in Python are handled with &lt;strong&gt;try-except [exceptionname]&lt;/strong&gt; blocks:&lt;/p&gt;

&lt;pre&gt;def some_function():
    try:
        # Division by zero raises an exception
        10 / 0
    except ZeroDivisionError:
        print("Oops, invalid.")
    else:
        # Exception didn't occur, we're good.
        pass
    finally:
        # This is executed after the code block is run
        # and all exceptions have been handled, even
        # if a new exception is raised while handling.
        print("We're done with that.")

&amp;gt;&amp;gt;&amp;gt; some_function()
Oops, invalid.
We're done with that.
&lt;/pre&gt;

&lt;h2&gt;Importing&lt;/h2&gt;

&lt;p&gt;External libraries are used with the &lt;code&gt;import [libname]&lt;/code&gt; keyword. You can also use &lt;code&gt;from [libname] import [funcname]&lt;/code&gt; for individual functions. Here is an example:&lt;/p&gt;

&lt;pre&gt;import random
from time import clock

randomint = random.randint(1, 100)
&amp;gt;&amp;gt;&amp;gt; print(randomint)
64
&lt;/pre&gt;

&lt;h2&gt;File I/O&lt;/h2&gt;

&lt;p&gt;Python has a wide array of libraries built in. As an example, here is how &lt;strong&gt;serializing&lt;/strong&gt; (converting data structures to strings using the &lt;code&gt;pickle&lt;/code&gt; library) with file I/O is used:&lt;/p&gt;

&lt;pre&gt;import pickle
mylist = ["This", "is", 4, 13327]
# Open the file C:\\binary.dat for writing. The letter r before the
# filename string is used to prevent backslash escaping.
myfile = open(r"C:\\binary.dat", "wb")
pickle.dump(mylist, myfile)
myfile.close()

myfile = open(r"C:\\text.txt", "w")
myfile.write("This is a sample string")
myfile.close()

myfile = open(r"C:\\text.txt")
&amp;gt;&amp;gt;&amp;gt; print(myfile.read())
'This is a sample string'
myfile.close()

# Open the file for reading.
myfile = open(r"C:\\binary.dat", "rb")
loadedlist = pickle.load(myfile)
myfile.close()
&amp;gt;&amp;gt;&amp;gt; print(loadedlist)
['This', 'is', 4, 13327]
&lt;/pre&gt;

&lt;h2&gt;Miscellaneous&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conditions can be chained&lt;/strong&gt;: &lt;code&gt;1 &amp;lt; a &amp;lt; 3&lt;/code&gt; checks that a is both less than 3 and greater than 1.&lt;/li&gt;
&lt;li&gt;You can use &lt;code&gt;del&lt;/code&gt; to &lt;strong&gt;delete variables or items in arrays&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List comprehensions&lt;/strong&gt; provide a powerful way to create and manipulate lists. They consist of an expression followed by a &lt;code&gt;for&lt;/code&gt; clause followed by zero or more &lt;code&gt;if&lt;/code&gt; or &lt;code&gt;for&lt;/code&gt; clauses, like so:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;lst1 = [1, 2, 3]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;lst2 = [3, 4, 5]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print([x * y for x in lst1 for y in lst2])
[3, 4, 5, 6, 8, 10, 9, 12, 15]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print([x for x in lst1 if 4 &amp;gt; x &amp;gt; 1])
[2, 3]
# Check if a condition is true for any items.
# "any" returns true if any item in the list is true.
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;any([i % 3 for i in [3, 3, 4, 4, 3]])
True
# This is because 4 % 3 = 1, and 1 is true, so any()
# returns True.

# Check for how many items a condition is true.
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;sum(1 for i in [3, 3, 4, 4, 3] if i == 4)
2
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;del lst1[0]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;print(lst1)
[2, 3]
&lt;strong&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/strong&gt;del lst1
&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;Global variables&lt;/strong&gt; are declared outside of functions and can be read without any special declarations, but if you want to write to them you must declare them at the beginning of the function with the &lt;code&gt;global&lt;/code&gt; keyword, otherwise Python will bind that object to a new local variable (be careful of that, it’s a small catch that can get you if you don’t know it). For example:&lt;/li&gt;&lt;/ul&gt;

&lt;pre&gt;number = 5

def myfunc():
    # This will print 5.
    print(number)

def anotherfunc():
    # This raises an exception because the variable has not
    # been bound before printing. Python knows that it an
    # object will be bound to it later and creates a new, local
    # object instead of accessing the global one.
    print(number)
    number = 3

def yetanotherfunc():
    global number
    # This will correctly change the global.
    number = 3&lt;/pre&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>python</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How to install AirCrack-ng  on Windows 10</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Wed, 19 Aug 2020 07:11:17 +0000</pubDate>
      <link>https://dev.to/lakpa/how-to-install-aircrack-ng-on-windows-10-1g2b</link>
      <guid>https://dev.to/lakpa/how-to-install-aircrack-ng-on-windows-10-1g2b</guid>
      <description>&lt;h4&gt;Requirements&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Have a Windows computer.&lt;/li&gt;
&lt;li&gt;Have a connection to the internet.&lt;/li&gt;
&lt;li&gt;Download Aircrack-ng: &lt;a href="https://download.aircrack-ng.org/aircrack-ng-1.2-win.zip"&gt;https://download.aircrack-ng.org/aircrack-ng-1.2-win.zip&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Steps: &lt;/h4&gt;

&lt;p&gt;First Step: Download and uncompress the Aircrack-ng file. Personally, I prefer to move the .rar file to the desktop to have a more clear working area. If your web browser does not ask you where to save the file, then just go to your "Downloads" section of your file explorer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9U9H2qQ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmdZvLpJ1tv2izkn6rXLcAchWgY9piZfqLycGcm5EJ4y2p/how%2520to%2520uncompress%2520the%2520file.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9U9H2qQ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmdZvLpJ1tv2izkn6rXLcAchWgY9piZfqLycGcm5EJ4y2p/how%2520to%2520uncompress%2520the%2520file.png" alt="how to uncompress the file.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how it should look:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m73toY13--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmNohzMraaHNerw7vEktGrCdDGimE2cLBV4E1SdczCEtuq/Download%2520and%2520uncompress%2520the%2520file.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m73toY13--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmNohzMraaHNerw7vEktGrCdDGimE2cLBV4E1SdczCEtuq/Download%2520and%2520uncompress%2520the%2520file.png" alt="Download and uncompress the file.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Second Step: Determine if your Windows architecture is 64-bit or 32-bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--up3hvnvP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmZBemsbpLR4Dzb55eDFAtegaQFoNg4bYnfrbAZYXuwtHs/How%2520to%2520see%2520the%2520architecture%2520of%2520your%2520Windows.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--up3hvnvP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmZBemsbpLR4Dzb55eDFAtegaQFoNg4bYnfrbAZYXuwtHs/How%2520to%2520see%2520the%2520architecture%2520of%2520your%2520Windows.jpg" alt="How to see the architecture of your Windows.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should get something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RWwnlNRg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmSUm3wzvQ6TQyHMhAwWRFfQjjEYBKq4MY6UpmF2Ayu9om/This%2520is%2520the%2520architecture%2520of%2520your%2520Windows.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RWwnlNRg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmSUm3wzvQ6TQyHMhAwWRFfQjjEYBKq4MY6UpmF2Ayu9om/This%2520is%2520the%2520architecture%2520of%2520your%2520Windows.jpg" alt="This is the architecture of your Windows.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Third Step: Go to your 'Local Disk (C:) and open the folder "Program Files" or "Program Files (x86)" depending on your windows architecture. Since my Windows is 64-bit I will choose the 'Program Files' folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u1i2MQTJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmSFU4BJhKPwrfyvTuGiq9n5KSzEpa1dKE2Ueg9pBAJoSB/Directory%2520where%2520the%2520Aircrack-ng%2520folder%2520must%2520go.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u1i2MQTJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmSFU4BJhKPwrfyvTuGiq9n5KSzEpa1dKE2Ueg9pBAJoSB/Directory%2520where%2520the%2520Aircrack-ng%2520folder%2520must%2520go.png" alt="Directory where the Aircrack-ng folder must go.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, copy and paste the Aircrack-ng folder that you uncompressed before inside the "Program Files" folder.&lt;/p&gt;

&lt;p&gt;The Aircrack-ng folder should look like this inside the "Program Files" folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ybDDxGL5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmXD6DkDxwm7Ck9wxN6sYehhnzWBWjE7taXU7V296piFuU/How%2520the%2520Aircrack-ng%2520should%2520look%2520in%2520the%2520folder%2520program%2520files.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ybDDxGL5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmXD6DkDxwm7Ck9wxN6sYehhnzWBWjE7taXU7V296piFuU/How%2520the%2520Aircrack-ng%2520should%2520look%2520in%2520the%2520folder%2520program%2520files.png" alt="How the Aircrack-ng should look in the folder program files.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After pasting the "Aircrack-ng" folder inside the "Program files" or "Program Files (x86)" you have to go inside of that folder.&lt;/p&gt;

&lt;p&gt;Once inside the folder you will have to open the "bin" folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4890tzZe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmSs89HKJcwLS3cRmjAcJKWQXtMJToj9Trz276Fo3qssx4/Open%2520the%2520bin%2520folder%2520inside%2520the%2520Aircrack-ng%2520folder.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4890tzZe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmSs89HKJcwLS3cRmjAcJKWQXtMJToj9Trz276Fo3qssx4/Open%2520the%2520bin%2520folder%2520inside%2520the%2520Aircrack-ng%2520folder.png" alt="Open the bin folder inside the Aircrack-ng folder.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Depending on your Windows architecture you will choose the folder according to your Windows. In my case I chose the "64-bit" folder since my Windows architecture is 64-bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AYlTigJd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmWAQ2iHYWUNvWAvZL8xgrFPFzhhi5NdWKxNeQyza5Forz/Depending%2520on%2520your%2520Windows%2520architecture%2520you%2520will%2520choose%2520either%252032bits%2520or%252064bits%2520.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AYlTigJd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmWAQ2iHYWUNvWAvZL8xgrFPFzhhi5NdWKxNeQyza5Forz/Depending%2520on%2520your%2520Windows%2520architecture%2520you%2520will%2520choose%2520either%252032bits%2520or%252064bits%2520.jpg" alt="Depending on your Windows architecture you will choose either 32bits or 64bits .jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once inside your corresponding folder, you will have to copy the address of that folder as it is shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZzkENa9j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmTjEzB3bpckUzomGu2aWvWnX7EmQ9fTGBhcQZNXAppZMe/Copy%2520the%2520directory%2520address.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZzkENa9j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmTjEzB3bpckUzomGu2aWvWnX7EmQ9fTGBhcQZNXAppZMe/Copy%2520the%2520directory%2520address.jpg" alt="Copy the directory address.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fourth Step: Now, you will have to go to "This PC" properties once again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9_BLX5W0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmZBemsbpLR4Dzb55eDFAtegaQFoNg4bYnfrbAZYXuwtHs/How%2520to%2520see%2520the%2520architecture%2520of%2520your%2520Windows.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9_BLX5W0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmZBemsbpLR4Dzb55eDFAtegaQFoNg4bYnfrbAZYXuwtHs/How%2520to%2520see%2520the%2520architecture%2520of%2520your%2520Windows.jpg" alt="How to see the architecture of your Windows.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you get the window below, you will have to left click on "Advanced system settings" as it is on the picture shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZyRWk4f5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmdrYgVaek6fBPZPrkoZnzGafTYqhgKnqBjj4cuoYBXNU6/Now%2520click%2520on%2520Advanced%2520system%2520settings.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZyRWk4f5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmdrYgVaek6fBPZPrkoZnzGafTYqhgKnqBjj4cuoYBXNU6/Now%2520click%2520on%2520Advanced%2520system%2520settings.jpg" alt="Now click on Advanced system settings.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you will have to click on the button that says "Environment Variables..."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Bz8jRys2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmPgnmmmytPCrb5dgbHaVt1hgS9x9wrsRQTnf5rsPFJDZd/Click%2520on%2520Environment%2520Variables.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Bz8jRys2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmPgnmmmytPCrb5dgbHaVt1hgS9x9wrsRQTnf5rsPFJDZd/Click%2520on%2520Environment%2520Variables.jpg" alt="Click on Environment Variables.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you got inside "Environment Variables" you should get a screen just like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aTPSxsYL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmdgkYRJGY8BTuboShhoX76DqGMKARpDk449GLMAp6PU5G/Click%2520on%2520New.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aTPSxsYL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmdgkYRJGY8BTuboShhoX76DqGMKARpDk449GLMAp6PU5G/Click%2520on%2520New.jpg" alt="Click on New.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you got this window, you will have to click the "New" button pointed with the arrow.&lt;/p&gt;

&lt;p&gt;In this new window, you have to write (path) inside the "Variable name:" box. Then, you will have to paste the address that you copied before in step #4 inside the "Variable value:" box. All the procedures are shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UOOynwHY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmaSZshrRufqm3LiPJHC8MmAABeZPW89ba3CLxhWzFo6Et/Set%2520variable%2520name%2520and%2520variable%2520value.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UOOynwHY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmaSZshrRufqm3LiPJHC8MmAABeZPW89ba3CLxhWzFo6Et/Set%2520variable%2520name%2520and%2520variable%2520value.jpg" alt="Set variable name and variable value.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, just click "OK" on all the windows that are open. Also, click on "Apply" if you see the option.&lt;/p&gt;

&lt;p&gt;Final Step: Go to your desktop and press the keys "Ctrl + R" to open the "Run" program. Inside "Run" type "cmd" as it is shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hX-w8U8H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmcobSksYKznXqTo3uFz1nWgc39skKDba9Uy94f6KqLbNf/Press%2520Ctrl%2520%252B%2520R%2520and%2520then%2520type%2520cmd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hX-w8U8H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmcobSksYKznXqTo3uFz1nWgc39skKDba9Uy94f6KqLbNf/Press%2520Ctrl%2520%252B%2520R%2520and%2520then%2520type%2520cmd.jpg" alt="Press Ctrl + R and then type cmd.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then press "OK"&lt;/p&gt;

&lt;p&gt;You should get a window like this one below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bPPM6vK9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmbgGz1Fg74wFs3nFaxAALyKkKNiQ52ShQGJ9MLyoAf9b4/Type%2520aireplay-ng%2520on%2520the%2520cmd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bPPM6vK9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/640x0/https://steemitimages.com/DQmbgGz1Fg74wFs3nFaxAALyKkKNiQ52ShQGJ9MLyoAf9b4/Type%2520aireplay-ng%2520on%2520the%2520cmd.jpg" alt="Type aireplay-ng on the cmd.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that you have opened the "cmd" you will have to type "aireplay-ng" inside the "cmd".&lt;/p&gt;

&lt;p&gt;Then, press enter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SZF90Dp4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmS1sPV6zCdnnk2ddW1pXKQeaqM9ZEinPEWwupe1dG4QJE/If%2520you%2520get%2520something%2520like%2520this%2520then%2520you%2520are%2520ready%2520to%2520go..jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SZF90Dp4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://steemitimages.com/DQmS1sPV6zCdnnk2ddW1pXKQeaqM9ZEinPEWwupe1dG4QJE/If%2520you%2520get%2520something%2520like%2520this%2520then%2520you%2520are%2520ready%2520to%2520go..jpg" alt="If you get something like this then you are ready to go..jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should get a set of information just like it is on the picture above.&lt;/p&gt;

&lt;p&gt;Now you are done and ready to use it.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>computerscience</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Java Programming language Basics Concepts</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Wed, 19 Aug 2020 07:06:38 +0000</pubDate>
      <link>https://dev.to/lakpa/java-programming-language-basics-concepts-1140</link>
      <guid>https://dev.to/lakpa/java-programming-language-basics-concepts-1140</guid>
      <description>&lt;h2&gt;&lt;/h2&gt;

&lt;h4&gt;Java is a very popular programming language. Java can be used to develop anything and almost everything like web applications, web servers, application servers, mobile applications and so on&lt;/h4&gt;

&lt;h2&gt;Basics&lt;/h2&gt;

&lt;h3&gt;Sample Java program&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;import java.util.Date;

public class HelloWorld {
    public static void main(String[] args) {
        Date now = new Date();
        System.out.println("Hello World!");
        System.out.println("now: " + now);
    }
}&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;import - used to import java libraries&lt;/li&gt;
&lt;li&gt;class keyword - to declare a class in java.&lt;/li&gt;
&lt;li&gt;public keyword - access modifier represents visibility. Public is visible to all.&lt;/li&gt;
&lt;li&gt;static keyword - no need to create an object to invoke the static method. There is no need to create an object to invoke the main method and it's invoked by JVM and saves memory.&lt;/li&gt;
&lt;li&gt;void - return type of the method and it doesn't return any value.&lt;/li&gt;
&lt;li&gt;main - starting point of the program.&lt;/li&gt;
&lt;li&gt;String[] args - for command line arguments&lt;/li&gt;
&lt;li&gt;System.out.println() - used to print statement.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;To Compile a Java program&lt;/h3&gt;

&lt;p&gt;Go to Command prompt and navigate to the folder where java files are stored.&lt;/p&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;javac example.java&lt;/pre&gt;

&lt;h3&gt;To Run Java program&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;java example &lt;/pre&gt;

&lt;h3&gt;Comments&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;//&lt;/code&gt; - single line comment&lt;/p&gt;

&lt;h2&gt;Data types&lt;/h2&gt;

&lt;p&gt;Two groups of data types&lt;/p&gt;

&lt;h3&gt;1. Primitive data types&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th&gt;Data type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Range&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;used to store whole numbers&lt;/td&gt;
&lt;td&gt;-2,147,483,648 to 2,147,483,647&lt;/td&gt;
&lt;td&gt;4 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;short&lt;/td&gt;
&lt;td&gt;used to store whole numbers&lt;/td&gt;
&lt;td&gt;-32,768 to 32,767&lt;/td&gt;
&lt;td&gt;2 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;long&lt;/td&gt;
&lt;td&gt;used to store whole numbers&lt;/td&gt;
&lt;td&gt;-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807&lt;/td&gt;
&lt;td&gt;8 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;byte&lt;/td&gt;
&lt;td&gt;used to store whole numbers&lt;/td&gt;
&lt;td&gt;-128 to 127&lt;/td&gt;
&lt;td&gt;1 byte&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;used to store fractional numbers&lt;/td&gt;
&lt;td&gt;6 to 7 decimal digits&lt;/td&gt;
&lt;td&gt;4 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;double&lt;/td&gt;
&lt;td&gt;used to store fractional numbers&lt;/td&gt;
&lt;td&gt;15 decimal digits&lt;/td&gt;
&lt;td&gt;8 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;can either store true or false&lt;/td&gt;
&lt;td&gt;either true or false&lt;/td&gt;
&lt;td&gt;1 bit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;char&lt;/td&gt;
&lt;td&gt;used to store a single character&lt;/td&gt;
&lt;td&gt;one character&lt;/td&gt;
&lt;td&gt;2 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;Examples&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;int x = 99999; 
short x = 999; 
long x = 99999999999L;
byte x = 99;
double x = 99.99d;
boolean isAvailable = true;
char division = 'A';&lt;/pre&gt;

&lt;h3&gt;2. Non-Primitive data types&lt;/h3&gt;

&lt;p&gt;Non-primitive data types specifies the complex data values. For example, strings, arrays and classes can be referred as Non-primitive data types.&lt;/p&gt;

&lt;h2&gt;Variables&lt;/h2&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;data-type variable-name = value;&lt;/pre&gt;

&lt;h3&gt;Naming convention of variables&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Case sensitive.&lt;/li&gt;
&lt;li&gt;Must should begin with a &lt;code&gt;lower case letter&lt;/code&gt;. For second word should be a capital like this: firstName, pinCode etc.&lt;/li&gt;
&lt;li&gt;Cannot contain white spaces like first name.&lt;/li&gt;
&lt;li&gt;special characters like &lt;code&gt;$&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt; can be used to begin a variable name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Types of Variables&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Local Variables&lt;/li&gt;
&lt;li&gt;Instance Variables&lt;/li&gt;
&lt;li&gt;Static Variables&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;Class Sum {
    int n1 = 10; // value of Instance  Variables are are instance specific.
    static int n2 = 20; //static variable is Common for all the instances of the class.
    void sum(){
        int n3 = 30; //local variable and they are Inside the body of a method.
        int total = n1+n2+n3;
    }
}&lt;/pre&gt;

&lt;h2&gt;Data Conversions&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;String to Number&lt;code&gt;int i = Intege­r.p­ars­eIn­t(­str); double d = Double.pa­rse­Dou­ble­(s­tr);&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Other types to String&lt;code&gt;String str = String.va­lue­Of(­va­l);&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Operators&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th&gt;Operator type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Arithmetic Operator&lt;/td&gt;
&lt;td&gt;+ , - , * , / , %&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;comparision Operator&lt;/td&gt;
&lt;td&gt;&amp;lt; , &amp;gt; , &amp;lt;= , &amp;gt;=, != , ==&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bitwise Operator&lt;/td&gt;
&lt;td&gt;&amp;amp; , ^ , |&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logical Operator&lt;/td&gt;
&lt;td&gt;&amp;amp;&amp;amp; , &lt;code&gt;||&lt;/code&gt;, !&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Assignment Operator&lt;/td&gt;
&lt;td&gt;= , += , -= , *= , /= , %=&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto-increment and Auto-decrement Operators&lt;/td&gt;
&lt;td&gt;++ , --&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ternary Operator&lt;/td&gt;
&lt;td&gt;? :&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;Arrays&lt;/h2&gt;

&lt;p&gt;Array is a collection of similar data which is stored in continuous memory addresses.&lt;/p&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;data-type[] array-name; // one dimensional array
data-type[][] array-name; // two dimensional array&lt;/pre&gt;

&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;String[] mobiles = {"iPhone", "Samsung", "OnePlus"};
for (int i = 0; i &amp;lt; mobiles.length; i++) {
  System.out.println(mobiles[i]);
}
mobiles[1] = "Oppo"; // change an array element&lt;/pre&gt;

&lt;h2&gt;Conditional Statements&lt;/h2&gt;

&lt;h3&gt;1. If&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;if(conditional-expression)
{
    //code
}&lt;/pre&gt;

&lt;h3&gt;2. If-else&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;if(conditional-expression)
{
    //code
} else {
    //code
}&lt;/pre&gt;

&lt;h3&gt;3. If-else-if ladder&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;if(conditional-expression-1)
{
    //code
} else if(conditional-expression-2) {
    //code
} else if(conditional-expression-3) {
    //code
}
....
else {
    //code
}&lt;/pre&gt;

&lt;h3&gt;4. Nested-If&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;if(conditional-expression-1) {    
     //code    
          if(conditional-expression-2) {  
             //code
             if(conditional-expression-3) {
                 //code
             }  
    }    
}&lt;/pre&gt;

&lt;h3&gt;5. Switch&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;switch(conditional-expression){    
case value1:    
 //code    
 break;  //optional  
case value2:    
 //code    
 break;  //optional  
...    
    
default:     
 //code to be executed when all the above cases are not matched;    
} &lt;/pre&gt;

&lt;h2&gt;Loops&lt;/h2&gt;

&lt;h3&gt;1. For&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;for(Initialization; Condition; Increment/decrement){  
//code  
} &lt;/pre&gt;

&lt;h3&gt;2. While&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;while(condition){  
//code 
}  &lt;/pre&gt;

&lt;h3&gt;3. Do-While&lt;/h3&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;do{  
//code 
}while(condition); &lt;/pre&gt;

&lt;h2&gt;Collections&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th&gt;Collection&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Set&lt;/td&gt;
&lt;td&gt;Set is a collection of elements which can not contain duplicate values. Set is implemented in HashSets, LinkedHashSets, TreeSet etc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List&lt;/td&gt;
&lt;td&gt;List is a ordered collection of elements which can have duplicates. Lists are classified into ArrayList, LinkedList, Vectors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue&lt;/td&gt;
&lt;td&gt;FIFO approach, while instantiating Queue interface you can either choose LinkedList or PriorityQueue.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deque&lt;/td&gt;
&lt;td&gt;Deque(Double Ended Queue) is used to add or remove elements from both the ends of the Queue(both head and tail)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Map&lt;/td&gt;
&lt;td&gt;Map contains key-values pairs which don't have any duplicates. Map is implemented in HashMap, TreeMap etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;char charAt(int index)&lt;/td&gt;
&lt;td&gt;returns char value at the specific index&lt;/td&gt;
&lt;td&gt;str.charAt(0) //prints o&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;int compareTo(String str)&lt;/td&gt;
&lt;td&gt;to compare two strings lexicographically&lt;/td&gt;
&lt;td&gt;Str1.compareTo(Str2) //returns 0 if str1 and str2 are equal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;int length()&lt;/td&gt;
&lt;td&gt;returns string length&lt;/td&gt;
&lt;td&gt;str.length()&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;static String format(String format, Object... args)&lt;/td&gt;
&lt;td&gt;returns a formatted string.&lt;/td&gt;
&lt;td&gt;String.format("String is %s",str);&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String substring(int beginIndex, int endIndex)&lt;/td&gt;
&lt;td&gt;to return substring from given begin index to end index.&lt;/td&gt;
&lt;td&gt;str.substring(0,3) //prints one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String substring(int beginIndex)&lt;/td&gt;
&lt;td&gt;to return substring from given begin index&lt;/td&gt;
&lt;td&gt;str.substring(3) //prints compiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;boolean contains(CharSequence s)&lt;/td&gt;
&lt;td&gt;returns true or false after matching the sequence given in the string&lt;/td&gt;
&lt;td&gt;str.contains("compiler") // returns true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;static String join(CharSequence delimiter, CharSequence... elements)&lt;/td&gt;
&lt;td&gt;returns a joined string.&lt;/td&gt;
&lt;td&gt;String.join("..","Hello","Happy", "Learning"); //returns Hello..Happy..Learning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;boolean equals(Object another)&lt;/td&gt;
&lt;td&gt;checks the equality of string with another and returns true if they are equal.&lt;/td&gt;
&lt;td&gt;str1.equals(str2);&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;boolean isEmpty()&lt;/td&gt;
&lt;td&gt;to check if the given string is empty.&lt;/td&gt;
&lt;td&gt;str.isEmpty() // returns false&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String concat(String str)&lt;/td&gt;
&lt;td&gt;concatenates the provided string with the another string.&lt;/td&gt;
&lt;td&gt;str.concat(" is used to compile code online")&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String replace(char old, char new)&lt;/td&gt;
&lt;td&gt;replaces all occurrences of the specified char value with new char value.&lt;/td&gt;
&lt;td&gt;str.replace('r','t');&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String replace(CharSequence old, CharSequence new)&lt;/td&gt;
&lt;td&gt;replaces all occurrences of the specific CharSequence with new one.&lt;/td&gt;
&lt;td&gt;str.replace('one','Online');&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;static String equalsIgnoreCase(String another)&lt;/td&gt;
&lt;td&gt;compares another string with out considering case.&lt;/td&gt;
&lt;td&gt;str1.equalsIgnoreCase(str2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String[] split(String regex, int limit)&lt;/td&gt;
&lt;td&gt;returns a split string matching regex and limit. here limit is optional&lt;/td&gt;
&lt;td&gt;str.split("\s")//splits string based on whitespaces&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;int indexOf(String substring, int fromIndex)&lt;/td&gt;
&lt;td&gt;returns the specified substring index starting with given index. here index is optional&lt;/td&gt;
&lt;td&gt;str.indexOf("compiler",2);&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String toLowerCase()&lt;/td&gt;
&lt;td&gt;returns a string in lowercase.&lt;/td&gt;
&lt;td&gt;str.toLowercase();&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String toUpperCase()&lt;/td&gt;
&lt;td&gt;returns a string in uppercase.&lt;/td&gt;
&lt;td&gt;str.toUpperCase();&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String trim()&lt;/td&gt;
&lt;td&gt;removes beginning and trailing spaces of a given string.&lt;/td&gt;
&lt;td&gt;str.trim();&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;h3&gt;1. Class&lt;/h3&gt;

&lt;p&gt;Class is the blueprint of an object and &lt;code&gt;class&lt;/code&gt; keyword is required to create a class.&lt;/p&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;class class_name {  
    fields;  
    methods;  
}&lt;/pre&gt;

&lt;h3&gt;2. Object&lt;/h3&gt;

&lt;p&gt;Object is a basic unit in OOP, and is an instance of the class.&lt;/p&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;class_name obj_name;&lt;/pre&gt;

&lt;h3&gt;3. Abstraction&lt;/h3&gt;

&lt;p&gt;Data abstraction is a technique which provides only the required data to be visible or accessible to outside world. &lt;code&gt;abstract&lt;/code&gt; keyword is used for classes and methods.&lt;/p&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;abstract class Mobiles { // abstract class
  public abstract void features();   // abstract method
  public void method-name() {
    //code
  }
}&lt;/pre&gt;

&lt;h3&gt;4. Encapsulation&lt;/h3&gt;

&lt;p&gt;Encapsulation is a mechanism to protect private hidden from other users. It wraps the data and methods as a single bundle. &lt;code&gt;private&lt;/code&gt; is the keyword used to declare the variables or methods as private. You can make public &lt;code&gt;set&lt;/code&gt; and &lt;code&gt;get&lt;/code&gt; methods to access private variables.&lt;/p&gt;

&lt;h3&gt;5. Polymorphism&lt;/h3&gt;

&lt;p&gt;Polymorphism gives the meaning many forms, usually it occurs when multiple classes are present and have been inherited.&lt;/p&gt;

&lt;pre class="wp-block-syntaxhighlighter-code"&gt;class Child-class extends Parent-Class {
//code
}&lt;/pre&gt;



</description>
      <category>java</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Basic Linux Commands For Beginners</title>
      <dc:creator>LP</dc:creator>
      <pubDate>Wed, 19 Aug 2020 06:44:09 +0000</pubDate>
      <link>https://dev.to/lakpa/basic-linux-commands-for-beginners-2mkc</link>
      <guid>https://dev.to/lakpa/basic-linux-commands-for-beginners-2mkc</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;All Linux commands are case sensitive&lt;/em&gt;.&lt;/strong&gt; The commands get executed when you press enter key after typing the command. The output of the command will be shown in the terminal itself.&lt;/p&gt;

&lt;p&gt;Linux includes a lot of commands. In this Linux commands cheat sheet, I will take you through the most important ones so that you get familiar with them and can easily work on the Linux terminal.&lt;/p&gt;

&lt;p&gt;To execute the commands, you will need a computer running Ubuntu or any other Linux distros. In Ubuntu, you can launch the terminal by pressing button Ctrl-Alt-T or by clicking the ‘Activities’ button at the top left of the screen and typing ‘shell’ or ‘terminal’ or other common synonyms.&lt;/p&gt;

&lt;p&gt;If you don’t have Linux OS, but you want to practice Linux commands, you can use any online Linux terminal. Many Linux terminals are available online free of cost to practice Linux commands.&lt;/p&gt;



&lt;h2&gt;Complete List Of Linux Commands&lt;/h2&gt;

&lt;h3&gt;Basic Linux Commands&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;#1) pwd: &lt;/strong&gt;pwd command prints the current working directory. It will give you the absolute path i.e. from the root till the current directory in which you are in. This command helps you avoid getting lost in the terminal window. You will know in which directory you are.&lt;/p&gt;

&lt;p&gt;By default, the present working directory is the home directory when you have opened the terminal for the first time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;pwd&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/1Command-pwd.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0ieUys6y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/1Command-pwd.png" alt="1Command pwd"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#2) whoami: &lt;/strong&gt;This command will display the username for the user who is currently logged in to the Linux terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;whoami&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/2-Command-whoami.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Oq0xdXHJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/2-Command-whoami.png" alt="whoami command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#3) clear: &lt;/strong&gt;When the terminal gets filled up with lots of commands and their output, you can use clear command to clear up your terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#4) exit: &lt;/strong&gt;exit command will simply close off the terminal session.&lt;/p&gt;

&lt;h3&gt;Linux Commands To Display Date, Time, Calendar&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;#1) date: &lt;/strong&gt;This command displays the current time and date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;date&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/3-Command-date.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zvi98yHb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/3-Command-date.png" alt="Command date"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#2) cal: &lt;/strong&gt;cal stands for the calendar. By default, the cal command will display the calendar of the current month. At the time of writing this article, the current month was March 2020 and hence in the output, you can see that it has shown March 2020 calendar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;cal&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/4-Command-cal.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hUbiBny1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/4-Command-cal.png" alt="Command cal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you want to display the calendar of the whole current year, you can give command &lt;strong&gt;‘cal -y’&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can also specify the year. &lt;strong&gt;For Example,&lt;/strong&gt; if you want to see the calendar of 2019, you can give command &lt;strong&gt;‘cal 2019’ – &lt;/strong&gt;This will display the calendar of the year 2019.&lt;/li&gt;
&lt;li&gt;Also, if you want to see the calendar of a specific month of a specific year, say January 2019, you can execute command &lt;strong&gt;‘cal 1 2019’ – &lt;/strong&gt;this will show January 2019 calendar. Here, ‘1’ denotes the first month of the year i.e. January.&lt;/li&gt;
&lt;li&gt;You can also see the calendar of three months together –the previous month, current month, and next month. The command for this operation is &lt;strong&gt;‘cal -3’&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/5-cal-3.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7PN6_Jh0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/5-cal-3.png" alt="cal -3 command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Commands To Navigate The Linux File System&lt;/h3&gt;

&lt;p&gt;The Linux file system has a tree-like structure which is also called a directory tree. It is used to organize information.&lt;/p&gt;

&lt;p&gt;The directory tree is very similar to a family tree and so it's a directory or a file having the parent. However, each directory or a file has exactly one parent.&lt;/p&gt;

&lt;p&gt;Now, we will take a look at how the Linux file system is structured. First, we have the root directory which is the first or the top-most directory in our tree. It is represented by a forward slash (/). Under the root, you will find many subdirectories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let us look at some important subdirectories:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bin&lt;/strong&gt;: This directory contains executable programs and commands that can be used by all the users on the system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Opt: &lt;/strong&gt;This stands for optional. This directory contains commercial software products that are not installed by default on your system. &lt;strong&gt;For Example,&lt;/strong&gt; if you are using ubuntu, you must have noticed that Google Chrome is not installed by default on your system and if you want to install Google Chrome, you will find it located underneath the Opt directory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Temp: &lt;/strong&gt;temp stands for temporary. In this directory, you will find temporary files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Var: &lt;/strong&gt;It contains variable data that frequently changes over time. These include log files, email pools, and user databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home: &lt;/strong&gt;Linux is a multi-user environment which means that many users can access a system simultaneously. Each user is allocated a dietary inside the home directory.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Now, let us learn commands that will help us to navigate the directory tree.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(i) pwd: &lt;/strong&gt;We have already discussed this command above in detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(ii) ls:&lt;/strong&gt; ls stands for list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The syntax for ls command is:&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;em&gt;ls [OPTIONS] [FILES]&lt;/em&gt;&lt;/pre&gt;

&lt;p&gt;This command lists the directory content. If you simply execute ls command without giving any options and files, it will list in alphabetical order all the directories and files that are underneath your current working directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/6-ls.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--81WRYKqf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/6-ls.png" alt="ls command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/7-ls-output.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sSBo1yZ0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/7-ls-output.png" alt="ls output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can use the ls command with various options and arguments:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a) ls -l&lt;/strong&gt;&lt;strong&gt;:&lt;/strong&gt; This shows the content with a detailed listing. -l stands for the long option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b) ls -lh: &lt;/strong&gt;It is used to display the human-friendly file sizes. -h stands for humans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c) Ls -lha&lt;/strong&gt;: This command is used to display all hidden files. -a includes hidden files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example for these commands:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ls&lt;br&gt;ls -l&lt;br&gt;ls -lh&lt;br&gt;ls -lha&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/ls-command.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GbYL0rHy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/ls-command.jpg" alt="ls command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;d) ls /: &lt;/strong&gt;As / represents a root directory, this command will show all the files and folders present inside the root directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;e) ls ~: &lt;/strong&gt;As ~ represents the home directory, so this command will display the contents of your home directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;ls ~&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/9-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c2depE-J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/9-1.png" alt="Command: ls"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;f) ls ..: &lt;/strong&gt;This command will display the contents of the parent directory because .. represents the parent directory. Suppose, right now I am in the test directory inside my home directory. If I execute command ls .. here then it will display the contents of the parent directory of test which is my home directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commands executed in below example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ls ~&lt;br&gt;cd test&lt;br&gt;pwd&lt;br&gt;ls ..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/10-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NzhbXaxv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/10-1.png" alt="ls .."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;g)&lt;/strong&gt; You can also list the contents of a file by giving its absolute pathname.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;ls /home/cpf657/kaushapx/test/parent&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/11-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KjMSS5CJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/11-1.png" alt="Command: ls /home/cpf657/kaushapx/test/parent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, you can also use a relative pathname.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(iii) cd: &lt;/strong&gt;Another useful command in navigating through the filesystem is cd. cd stands for change directory.&lt;/p&gt;

&lt;p&gt;Suppose I am in my home directory right now and want to navigate to a directory named ‘test’ which is present inside my home directory, so I will use &lt;strong&gt;cd test&lt;/strong&gt; &lt;strong&gt;c&lt;/strong&gt;&lt;strong&gt;ommand:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;pwd&lt;br&gt;cd test&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/12-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wZeEN6LQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/12-1.png" alt="cd test command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To go to a level up, you need to execute &lt;strong&gt;cd ..&lt;/strong&gt; &lt;strong&gt;command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;pwd&lt;br&gt;cd..&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/13-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DxuEwYiD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/13-1.png" alt="cd .."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also navigate to any directory using its absolute pathname. &lt;strong&gt;For Example,&lt;/strong&gt; suppose that right now I am in the test directory under my home. Now, I want to switch to another directory called test1 which is present inside my home directory. So, I will use the cd command along with the absolute path of the test1 directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;pwd&lt;br&gt;cd /home/cpf657/kaushapx/test1&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/14-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ld4mpE5T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/14-1.png" alt="cd command along with the absolute path of test1 directory"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many options that we can use with the cd command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd /&lt;/strong&gt;: The first option that is very useful is space forward slash. So, as you know that Slash represents the root directory, &lt;strong&gt;cd / &lt;/strong&gt;will take you directly to the root directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;pwd&lt;br&gt;cd /&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/15.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hxkM3h0C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/15.png" alt="cd /"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd ~&lt;/strong&gt; : The second option that you can use is cd Tilda i.e. &lt;strong&gt;cd ~&lt;/strong&gt;. This will take you to the home directory as you can see below screenshot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;cd test&lt;br&gt;pwd&lt;br&gt;cd ~&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/16.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v4hZuvze--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/16.png" alt="cd ~"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd ..&lt;/strong&gt;: Another option that you can use with cd command is cd two dots i.e. cd ..&lt;/p&gt;

&lt;p&gt;The two dots represent the parent directory, so you will go one step backward in the directory tree by using cd .. &lt;strong&gt;command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;cd ..&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/17.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fzZOhyeR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/17.png" alt="cd .. command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you type cd two dots again and again and again, you will eventually go to your root directory.&lt;/p&gt;

&lt;p&gt;If you want to go to some other directory inside the parent directory, then also you can use this &lt;strong&gt;command like below:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;pwd&lt;br&gt;cd ../directory1&lt;br&gt;pwd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/18.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qFwDiSBl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/18.png" alt="cd ../directory1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd –&lt;/strong&gt;: the cd space dash command takes you to the previous working directory.&lt;/p&gt;

&lt;h3&gt;Other Useful Linux Commands&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;(i) w: &lt;/strong&gt;This command will display the information on currently logged in users.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Command: &lt;/strong&gt;w&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/19.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FHXmNT1r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/19.png" alt="w"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(ii) uname: &lt;/strong&gt;This command displays the information on the Linux computer on which you are working. There are different options with which you can use this command.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;uname -a: &lt;/strong&gt;To display all the information about the Linux computer.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;em&gt;&lt;strong&gt;Command: &lt;/strong&gt;uname -a&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/20.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--psJnBqzk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/20.png" alt="uname -a"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;uname -s: &lt;/strong&gt;To display the type of kernel.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;em&gt;&lt;strong&gt;Command: &lt;/strong&gt;uname -s&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/21.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FzZ4hUEz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/21.png" alt="uname -s"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;uname -r: &lt;/strong&gt;To display the kernel release information.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;em&gt;&lt;strong&gt;Command: &lt;/strong&gt;uname -r&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/22.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FvdNBOB2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/22.png" alt="uname -r"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;uname -v : &lt;/strong&gt;To display the kernel version.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;em&gt;&lt;strong&gt;Command: &lt;/strong&gt;uname -v&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/23.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wjZQ1NTZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/23.png" alt="uname -v"&gt;&lt;/a&gt;





&lt;p&gt;&lt;strong&gt;(iii) top: &lt;/strong&gt;This command will display the real-time data about your Linux machine. It shows the status summary, for how long the computer is running, average load, number of tasks running, CPU information, memory information, the status of processes, etc. You need to press Q to exit from top command.&lt;/p&gt;





&lt;p&gt;&lt;em&gt;&lt;strong&gt;Command: &lt;/strong&gt;top&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/24.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nSbmgHuM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/24.png" alt="top"&gt;&lt;/a&gt;





&lt;p&gt;&lt;strong&gt;(iv) tar: &lt;/strong&gt;tar stands for tape archive. This command is used for creating an archive file comprised of many other files, or it can also be used for extracting files from an archive file.&lt;/p&gt;





&lt;p&gt;First, let us see how to create an archived file. Suppose, I am currently at a directory called ‘parent’. Inside this parent directory, I have another directory called ‘directory1’ which contains two text files as shown in the below screenshot.&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;





&lt;p&gt;pwd&lt;br&gt;ls&lt;br&gt;ls directory1&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/25.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y4znPGCL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/25.png" alt="tar"&gt;&lt;/a&gt;





&lt;p&gt;Now, I will use the tar command to archive all the files in directory1 using the below command:&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;tar -cvf testarchive.tar directory1/&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/26.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XxS8DjxA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/26.png" alt="tar -cvf testarchive.tar directory1"&gt;&lt;/a&gt;





&lt;p&gt;As you can see in the above screenshot that I have used three &lt;strong&gt;options: -c -v and -f&lt;/strong&gt;.&lt;/p&gt;





&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;-c&lt;/strong&gt; is the create option which is used to create the archive file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-v&lt;/strong&gt; is the verbose option which will list the files in the terminal window that have been added to the archive window, as you can see in the above screenshot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-f&lt;/strong&gt; option is used to give the desired name to the archive file. The filename should follow immediately after -f option.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the above example, the archive file is created, but it's not compressed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are two options to compress the archive file. These are:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-z&lt;/strong&gt;: This is the gzip option. It instructs the tar to use gzip utility to compress the archive file. It offers decent compression and reasonable speed. It’s better to add the suffix ‘.gz’ after the filename so that when someone tries to extract files from the archive, they can easily get to know the kind of compress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;tar -cvzf testarchive.tar.gz directory1/&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/27.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AT6i8Q_u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/27.png" alt="-z command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-j: &lt;/strong&gt;This is the bzip2 option. It uses a superior compression algorithm for compression. It offers better compression and slower speed. It’s better to add ‘.bz2’ the suffix after the filename so that when someone tries to extract files from the archive, they can easily get to know the kind of compress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;tar -cvjf testarchive.tar.bz2 directory1/&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/28.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ClEgZS9h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/28.png" alt="ii. -j"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s discuss the command for extracting files from an archive file. We need to use &lt;strong&gt;-x&lt;/strong&gt; i.e. extract option for this purpose. The -v and -f options behave in the same way in this case as they did for the archive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;tar -xvf testarchive.tar&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/29.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7XpyzktB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/29.png" alt="tar -xvf testarchive.tar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For extracting the files from a .tar.gz archive, you need to use -z option and for extracting the files from. tar.bz2 archive, you need to use -j option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commands:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;tar -xvzf testarchive.tar.gz&lt;br&gt;tar -xvjf testarchive.tar.bz2&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/30.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--usRBvbDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/30.png" alt="extracting the files from a .tar.gz archive"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(v) tail: &lt;/strong&gt;This command is used to enlist the last 10 lines of a file. By default, it shows the last 10 lines, but if you want to specify the number of lines then you can use -n option.&lt;/p&gt;

&lt;p&gt;The syntax is &lt;strong&gt;tail &amp;lt;filename&amp;gt; &lt;/strong&gt;, or &lt;strong&gt;tail -n &amp;lt;number of lines&amp;gt; &amp;lt;filename&amp;gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;tail DemoFile.txt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/31.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YlPpCtE6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/31.png" alt="extracting the files from a .tar.gz archive"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;em&gt; tail -n 5 DemoFile.txt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/32.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JntEauer--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/32.png" alt="tail -n 5 DemoFile.txt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(vi) sudo: &lt;/strong&gt;sudo stands for the superuser do. This command is used to perform the actions that need root or superuser permissions, like changing the password for another user, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(vii) ps: &lt;/strong&gt;This command enlists the processes that are running in the current shell.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;ps&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/33.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L--r_mzW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/33.png" alt="ps"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to see the processes running for a particular user, you need to use &lt;strong&gt;-u&lt;/strong&gt; (user) option in the command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;ps -u kaushapx&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/34.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mnEgY0eP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/34.png" alt="ps -u kaushapx"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To display every process that is running, you need to use &lt;strong&gt;-e&lt;/strong&gt; (every) option i.e. &lt;strong&gt;ps -e &lt;/strong&gt;in the command&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(viii) ping: &lt;/strong&gt;This is a highly useful command for troubleshooting network issues. It allows you to check whether you have network connectivity with another network machine.&lt;/p&gt;

&lt;p&gt;The syntax for this command is &lt;strong&gt;ping &amp;lt;ip_address_of_machine or device_name&amp;gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need to press Ctrl+C to stop the output of the ping command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example,&lt;/strong&gt; let us try to ping google's website to check whether its reachable or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;ping www.google.com&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/35.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--29XY4bvb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/35.png" alt="ping example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see in the above example that the Google IP address 216.58.192.196 has responded to the ping request and started sending packets of 64 bytes.&lt;/p&gt;

&lt;p&gt;The sequence numbers through ICMP protocol (seq=1, seq=2, and so on) tells you that there are no missed responses or packet loss. The &lt;strong&gt;ttl&lt;/strong&gt; is the time to live for a packet and this is mainly for avoiding any network flooding issues.&lt;/p&gt;

&lt;p&gt;Time is the duration it takes for the request to reach from your computer to google and then back to your computer. The shorter it is, the faster it is. In the end, the highlighted part is the summary which shows the ping statistics that can be used to monitor any network connectivity issues.&lt;/p&gt;

&lt;p&gt;If you want to ping for a specific number of times only, you can use -c (count) option. And, If you want to hear a ping, you can use -a (audible) option. &lt;strong&gt;For Example,&lt;/strong&gt; ping -ac 6 www.google.com&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(ix) passwd: &lt;/strong&gt;This command allows you to change the password. If you are changing it for yourself you just need to type passwd command alone. But, if you are changing it for someone else, you need to use this command along with sudo command.&lt;/p&gt;

&lt;p&gt;For changing your own password: &lt;strong&gt;passwd&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For changing another user password: &lt;strong&gt;sudo passwd &amp;lt;username&amp;gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;sudo passwd mary&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/36.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---HoTjL98--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/36.png" alt="passwd"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(x) mv: &lt;/strong&gt;This is a very important command. mv stands for move. This command lets you move files and folders from one directory to another. You can also rename the files with the help of this command.&lt;/p&gt;

&lt;p&gt;For moving a file to a new location in your filesystem,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax: &lt;/strong&gt;&lt;strong&gt;mv [filename] [destination-directory]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mv DemoFile.txt /home/cpf657/kaushapx/test/parent/directory2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/37.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TwCacEZD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/37.png" alt="mv"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you just want to rename a file, then you can use the following syntax.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax: mv [filename] [new_filename]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mv DemoFile.txt Hello.txt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/38.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8lNCDL6G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/38.png" alt="mv DemoFile.txt Hello.txt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also achieve file move and rename in one go as can be seen in the below example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mv Hello.txt /home/cpf657/kaushapx/test/parent/directory1/DemoFile.txt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/39.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wjjumX4m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/39.png" alt="achieve file move and rename"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xi) mkdir: &lt;/strong&gt;mkdir stands for make directory. This command is used for creating new directories in the filesystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax: mkdir [options…] [directories …]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to create a new directory inside the current directory, you can give only the directory name in the command. Otherwise, you need to give the path of the new directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/40.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U0zlme0E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/40.png" alt="mkdir"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some options that can be used with mkdir command are as follows:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;–version&lt;/strong&gt;: It displays the version and license information.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mkdir –version&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/41.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DT35ZpqH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/41.png" alt="--version"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;–help: &lt;/strong&gt;This shows all the information regarding mkdir command.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mkdir –help&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/42.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nMeoFn6X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/42.png" alt="--help"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;–&lt;strong&gt;v: &lt;/strong&gt;This is the verbose option. It will display a message for the created directory.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mkdir -v test3Dir&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/43.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TNCgcbqR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/43.png" alt="-v test3Dir"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;-p: &lt;/strong&gt;This option is used to create parent directories in the case when it does not exist for the newly-created directory.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mkdir -vp parent2/child2&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/44.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gvZtShgL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/44.png" alt="-vp parent2"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;-m: &lt;/strong&gt;This option is used to set up permissions for the newly-created directory.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;mkdir -m a=rwx [directories]&lt;/strong&gt;&lt;/p&gt;





&lt;p&gt;Suppose you only want to give read permission to a directory, then you can use the following command.&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;mkdir -vm a=r readOnlyDir&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/45.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vjS_g323--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/45.png" alt="-m"&gt;&lt;/a&gt;





&lt;p&gt;You can see in the above screenshot that the readOnlyDir is the directory with read-only permissions (dr–r–r–)&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;(xii) alias: &lt;/strong&gt;This command is used to give your name to a command or a combination of commands.&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;Syntax: alias [-p] [name[=value] … ]&lt;/strong&gt;&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;For Example,&lt;/strong&gt; if you want to rename mv command to move, you can do it as follows.&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;alias mv=move&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/46.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nolabWVh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/46.png" alt="alias"&gt;&lt;/a&gt;





&lt;p&gt;&lt;strong&gt;(xiii) cat:&lt;/strong&gt; cat stands for concatenate. This command reads data from a file and displays its content as the output on the terminal window.&lt;/p&gt;





&lt;p&gt;&lt;strong&gt;Let us see some variations of this command:&lt;/strong&gt;&lt;/p&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;cat filename: &lt;/strong&gt;This command will show the contents of a given file as output in the terminal window.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;cat LearnLinuxCommands.txt&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/47.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6RQZKR9u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/47.png" alt="cat filename"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;cat file1 file2: &lt;/strong&gt;This command will concatenate the contents of two files and will show in the output.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;cat LearnLinuxCommands.txt DemoFile.txt&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/48.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mA1sRi6_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/48.png" alt="cat file1 file2"&gt;&lt;/a&gt;





&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;cat -n filename: &lt;/strong&gt;To display the contents of a file along with its line numbers.&lt;/li&gt;&lt;/ul&gt;





&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;cat -n Demofile.txt&lt;/em&gt;&lt;/p&gt;





&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/49.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kq5qpgNJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/49.png" alt="cat -n filename"&gt;&lt;/a&gt;





&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;cat &amp;gt;newFileName: &lt;/strong&gt;This command is used to create a new file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat [source_filename] &amp;gt; [destination_filename]: &lt;/strong&gt;This command is used to copy the contents of one file to another. Note that it will replace the contents of the destination file with the contents of the source file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat [file1] &amp;gt;&amp;gt; [file2]: &lt;/strong&gt;This command will append the contents of file1 to the end of contents of file2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tac filename: &lt;/strong&gt;This command will show the contents of a file in reverse order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat -E filename: &lt;/strong&gt;This command is used to highlight the end of the line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;(xiv) chmod: &lt;/strong&gt;This command is used to set permissions on a file or directory. If you will perform ls -l on any file or directory, you will see initial characters on the output like -rwxrwxrwx. The first character ‘–‘ tells here that it’s a file if it display ‘d’ then it means that it’s a directory.&lt;/p&gt;

&lt;p&gt;The next three characters represent the permissions for the user, the next represents permissions of the group and the last three represent permissions for others. r means to read, w means write and x means execute. If in place of rwx, you anywhere see -, then it means that file permission is not granted.&lt;/p&gt;

&lt;p&gt;To set permission, you need to use the chmod command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are a total of eight digits that represent different levels of permission.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0:&lt;/strong&gt; No permission&lt;br&gt;&lt;strong&gt;1:&lt;/strong&gt; execute&lt;br&gt;&lt;strong&gt;2:&lt;/strong&gt; write&lt;br&gt;&lt;strong&gt;3:&lt;/strong&gt; write and execute&lt;br&gt;&lt;strong&gt;4:&lt;/strong&gt; read&lt;br&gt;&lt;strong&gt;5:&lt;/strong&gt; read and execute&lt;br&gt;&lt;strong&gt;6:&lt;/strong&gt; read and write&lt;br&gt;&lt;strong&gt;7:&lt;/strong&gt; read, write and execute&lt;/p&gt;

&lt;p&gt;Suppose I want to use read, write and execute permission for myself (7), read-only permission for the group (4) and read &amp;amp; execute permission for others(5), I will use 745.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ls -l DemoFile.txt&lt;br&gt;chmod -R 745 DemoFile.txt&lt;br&gt;ls -l DemoFile.txt&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/50.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y0x5zASB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/50.png" alt="chmod"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xv) chown: &lt;/strong&gt;chown stands for change owner. With this command, you can change the owner and a group owner for a file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax: chown [OPTION]… [OWNER][:[GROUP]] FILE…&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to change the owner of the file, you can use this command as:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;chown [owner_name] [file_name]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to change group owner, then you will need to use this command with sudo command as:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sudo chown [name_of_owner]:[name_of_group] [filename]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xvi) df: &lt;/strong&gt;This command shows the size, used space, available space, use percentage, and mounted on details for the filesystems of your computer.&lt;/p&gt;

&lt;p&gt;-h and -x are human-readable and exclude options respectively. -h shows the size in a human-readable format (Gb and Mb). -x option is used to exclude any filesystem that you are not interested in.&lt;/p&gt;

&lt;p&gt;In this example below, I have excluded squashfs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;em&gt; df -h -x squashes&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/df-h-x-squashfs.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K-K1Ld1W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/df-h-x-squashfs.png" alt="df -h -x squashfs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xvii) diff: &lt;/strong&gt;diff stands for the difference. This command is used to compare two text files and show differences between them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;diff [option] filename1 filename2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;diff file1 file2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/52.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xOCTlFP_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/52.png" alt="diff"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use certain options with this command, like &lt;strong&gt;-y&lt;/strong&gt; for side by side comparison, &lt;strong&gt;-W&lt;/strong&gt; for specifying line width to avoid any wraparounds, &lt;strong&gt;–suppress-common-lines&lt;/strong&gt; for suppressing common lines between two files in the diff output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;diff -y -W 70 file1 file2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;diff -y -W  70 file1 file2 –suppress-common-lines&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/53.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TooZrfHI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/53.png" alt="--suppress-common-lines"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xviii) echo: &lt;/strong&gt;echo command will print the text on the terminal window. You can also pass environment variables in echo command, as seen below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;echo Hello World&lt;br&gt;echo $USER&lt;br&gt;echo $PATH&lt;br&gt;echo $HOME&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/54.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--drId4ApR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/54.png" alt="echo command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xix) find: &lt;/strong&gt;This command is used to search for files and directories in a filesystem. You can find by providing file name, directory name, create date, modified date, file owner, file permissions, etc. You can also use wildcards in the search expression.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;find [start search from this point] [search expression] [-options] [what to find]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;find . -name “*file*”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/55.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zpuF1Nla--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/55.png" alt="find command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, this command has searched for all the files in the current directory (.), which contains the string ‘file’(*file*) in their file names (-name option).&lt;/p&gt;

&lt;p&gt;Try to use find –help to explore the various options that this command provides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xx) Kill: &lt;/strong&gt;This is a built-in command in Linux that is used to terminate a process manually. You need to supply the process id (PID) to the kill command to terminate a process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;kill PID&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xxi) history: &lt;/strong&gt;This command will show the commands that you have previously executed on the command line. To view the history of all the commands, you need to simply type &lt;strong&gt;history.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example, &lt;/strong&gt;If I want to see the last 10 commands I have executed, I will use below command as&lt;/p&gt;

&lt;p&gt;&lt;em&gt;history 10&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/56.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--blha7C3O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/56.png" alt="history command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the extreme left, you can see the numbers like 1033, 1034,.. These are the event numbers. This can be different for different computers. You can use these event numbers to repeat a specific command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;!EventNumber&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example,&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;!1033&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/57.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rtKjbAUK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/57.png" alt="!1033"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to repeat last executed command, simply type &lt;strong&gt;!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xxii) head: &lt;/strong&gt;The head command shows the top 10 lines of a file. To view the specific number of top lines, use -n option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;head -n 3 file2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/58.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vjpt9tqi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/58.png" alt="head"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xxiii) gzip: &lt;/strong&gt;This command is used to compress a file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;gzip [-options] filename&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example, &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;gzip -v file1&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/59.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nPigKImm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/59.png" alt="gzip"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use gzip –help to explore various options for gzip command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xxiv) Groups: &lt;/strong&gt;This command displays the group names in which the user is a member.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;strong&gt;groups username&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command:&lt;/strong&gt; &lt;em&gt;groups kaushapx&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/60.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bNQRseC4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/60.png" alt="Groups"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xxv) free: &lt;/strong&gt;This command tells us about the RAM and swap memory usage (used, free, shared, buffers, cached) within your computer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command: &lt;/strong&gt;&lt;em&gt;free -h&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/61.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qRzRMXkU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.softwaretestinghelp.com/wp-content/qa/uploads/2020/04/61.png" alt="free -h"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(xxvi) less: &lt;/strong&gt;This is a very useful command which you can use to view the contents of a file on the Linux terminal itself without opening the file in the editor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax: less file_name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need to press :q to come out from the output of less command.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>linux</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>GIT HUB Tutorial For Beginners </title>
      <dc:creator>LP</dc:creator>
      <pubDate>Wed, 19 Aug 2020 06:39:00 +0000</pubDate>
      <link>https://dev.to/lakpa/git-hub-tutorial-for-beginners-527</link>
      <guid>https://dev.to/lakpa/git-hub-tutorial-for-beginners-527</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Introduction&lt;br&gt;
This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull Requests. You’ll create your own Hello World repository and learn GitHub’s Pull Request workflow, a popular way to create and review code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create GitHub Account&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Access GitHub.com and click Sign up.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the free account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will receive a verification email at the address provided.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the emailed link to complete the verification process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub Workflow&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a branch from the repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create, edit, rename, move, or delete files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Send a pull request from your branch with your proposed changes to kick off a discussion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make changes on your branch as needed. Your pull request will update automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merge the pull request once the branch is ready to be merged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tidy up your branches using the delete button in the pull request or on the branches page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Working with GitHub&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;4.1 Create a Repository in GitHub&lt;/p&gt;

&lt;p&gt;A repository is usually used to organize a single project. Repositories can contain folders and files, images, videos, spreadsheets, and data sets – anything your project needs.&lt;/p&gt;

&lt;p&gt;Steps to create a new repository&lt;/p&gt;

&lt;p&gt;1.In the upper right corner, next to your avatar or identicon, click and then select New repository.&lt;/p&gt;

&lt;p&gt;2.Name your repository,write a short description,Select Initialize this repository with a README.&lt;/p&gt;

&lt;p&gt;3.On Clicking Create repository it will creates the new repository and it is ready for commit the cod&lt;/p&gt;

&lt;p&gt;4.2 Adding files to Repository&lt;/p&gt;

&lt;p&gt;We can add the files in two ways in GitHub. creating new file&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Creating files in Github itself&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Upload files from your PC&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;1.Creating files in Github&lt;/p&gt;

&lt;p&gt;• Open the repository in which you want to create a new file&lt;/p&gt;

&lt;p&gt;• Click on crete a newfile button on the top&lt;/p&gt;

&lt;p&gt;• Provide file name, enter the code you want, give some commit message &amp;amp; say commit new file it will create file in the repository&lt;/p&gt;

&lt;p&gt;2.Upload files from your PC&lt;/p&gt;

&lt;p&gt;• Open the repository in which you want to upload the files&lt;/p&gt;

&lt;p&gt;• Click on Upload Files button on the top&lt;/p&gt;

&lt;p&gt;• Add/ Drag files to add them to your repository and commit&lt;/p&gt;

&lt;p&gt;On GitHub, saved changes are called commits. Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes, so other contributors can understand what you’ve done and why.&lt;/p&gt;

&lt;p&gt;4.3 Create a Branch in GitHub&lt;/p&gt;

&lt;p&gt;Branching is the way to work on different versions of a repository at one time.&lt;/p&gt;

&lt;p&gt;By default your repository has one branch named master which is considered to be the definitive branch. We use branches to experiment and make edits before committing them to master.&lt;/p&gt;

&lt;p&gt;I want to create a new branch named feature, Here the Steps to do so.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to your new repository GitHubDemo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the drop down at the top of the file list that says branch: master.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type a branch name, feature, into the new branch text box.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the blue Create branch box or hit “Enter” on your keyboard.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here adevelopers, writers, and designers use branches for keeping bug fixes and feature work separate from our master (production) branch. When a change is ready, they merge their branch into master.&lt;/p&gt;

&lt;p&gt;4.4 Pull Request in GitHub&lt;/p&gt;

&lt;p&gt;Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch.&lt;/p&gt;

&lt;p&gt;Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red.&lt;/p&gt;

&lt;p&gt;Here I made changes in index.html, I added new line in feature/index.html. See how we can create Pull request in github.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click the Pull Request tab, then from the Pull Request page, click the green New pull request button&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the branch you made, feature, to compare with master (the original). Look over your changes in the diffs on the Compare page, make sure they’re what you want to submit&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you’re satisfied that these are the changes you want to submit, click the big green Create Pull Request button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Give your pull request a title and write a brief description of your changes. When you’re done with your message, click Create pull request!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;4.5 Merge Pull Request in GitHub&lt;/p&gt;

&lt;p&gt;In this final step, it’s time to bring your changes together – merging your feature branch into the master branch.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click the green Merge pull request button to merge the changes into master.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click Confirm merge.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go ahead and delete the branch, since its changes have been incorporated, with the Delete branch button in the purple box.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.GitHub with Git Comamd-line Tool&lt;/p&gt;

&lt;p&gt;Before you can work with Git on the command line, you will need to set some basic configurations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open your git terminal application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git --version to ensure Git is installed. Check git-scm.com to download the latest version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git config --global user.name "USER NAME", replacing USERNAME with your first and last name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git config --global user.email "EMAIL", replacing EMAIL with the email account associated with your GitHub account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Depending on your operating system, set the core.autocrlf.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• Windows users: Type git config --global core.autocrlf true.&lt;/p&gt;

&lt;p&gt;• Mac &amp;amp; Linux users: Type git config --global core.autocrlf input.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Type git config --list to see your current configurations.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.1 Clone the Repository Using the Command Line&lt;/p&gt;

&lt;p&gt;After you’ve created a repository on the remote, the next step is to clone it to your local environment.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Navigate to the Code tab of the repository on GitHub.com.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click Clone or download.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the Clone URL provided.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open your command line/terminal application and cd into the directory where you would like to copy the repository. This can be anywhere in your local file system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git clone URL. Be sure to replace URL with the Clone URL you copied in the previous step. The repository will be cloned into a new directory in this location.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type cd REPOSITORY-NAME to move into the directory of the repository you just created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git status.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;git status is a command you will use often to verify the current state of your repository and the files it contains. Right now, we can see that we are on branch master, everything is up to date with origin/master and our working directory is clean.&lt;/p&gt;

&lt;p&gt;5.2 Create Local Branches with Git&lt;/p&gt;

&lt;p&gt;Now that you have a local copy of the repository, let’s use the steps of the GitHub Flow to make a change in your project. First we will create a branch:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a new branch with a descriptive name: git branch BRANCH-NAME.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git status to see that although you created a new branch, you are still checked out to master (as indicated by the in-line response from Git).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check out to your new branch: git checkout BRANCH-NAME.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git status to verify you are now checked out to your new branch.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.3 Add Local Commits With Git&lt;/p&gt;

&lt;p&gt;After you have finished making your changes, it is time to commit them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Type git status. Remember that git status allows us to see the status of the files on our branch at any given time. Your file is listed under the heading Untracked files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git add FILE-NAME. This adds the file to the staging area and prepares it to become part of the next commit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git status again to see what has changed. Your file is now listed under the heading Changes to be committed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git commit. This tells git to collect all of the files in the staging area and commit them to version control as a single unit of work. Git will open your default text editor where you can enter the commit message.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type the commit message, save and quit your editor.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;o   The default text editor associated with git is vi in most cases, which requires that you type :wq to save and quit after entering your commit message.&lt;/p&gt;

&lt;p&gt;o   Alternatively, you can bypass vi altogether and enter your commit message inline with git commit -m "your message"&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; To see the history of commits, type git log.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.4 Open a Pull Request on GitHub using Git&lt;/p&gt;

&lt;p&gt;Now that you have made some local commits, it is time to send your changes to the remote copy of your repository on GitHub.com and create a Pull Request:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Type git push -u origin BRANCH-NAME to push your commits to the remote, and set a tracking branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter your GitHub username and password, if prompted to do so.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Pull Request on GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fill out the body of the Pull Request with information about the changes you’re introducing.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since this is your repository, you probably don’t have anyone to collaborate with (yet). Go ahead and merge your Pull Request now:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On GitHub.com, navigate to the Pull Request that you just opened.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scroll down and click the big green Merge Pull Request button.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.5 Git Pull&lt;/p&gt;

&lt;p&gt;After you merge your Pull Request, you will need to update your local copy of the repository:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In your command line, type git checkout master.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type git pull&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>github</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>git</category>
    </item>
  </channel>
</rss>
