Encapsulation — OOP

“ In Object-Oriented Programming (OOP), encapsulation refers to the bundling of data with the methods that operate on that data, or the restricting of direct access to some of an object’s components.”


Photo by Evgeni Tcherkasski on Unsplash

Getting Started

$ mkdir git-internals-tutorial ; cd $_ # create a new directory
$ git init # create a git repository locally
$ tree .git
.git
├── HEAD
├── config
├── hooks
├── objects
│ ├── info
│ └── pack
└── refs
├──…


Variable length parameters in python

Printing a list in python

list_of_numbers = [1, 2, 4, 5, 6, 7]
list_of_numbers = [1, 2, 4, 5, 6, 7]for number in list_of_numbers:
print(number, end=" ")
----------------------------------------------OUTPUT:1 2 4 5 6 7
list_of_numbers = [1, 2, 4, 5, 6, 7][print(number, end=" ") for number in list_of_numbers]----------------------------------------------OUTPUT:1 2 4 5 6 7


cookie in HTTP Request header

History


Running Talisman CLI on Gitlab CI


awk command line
> awk '<the script to run in quotes>' input_file

Download the Sample Input File


Show all the docker networks

docker network ls

Creating a custom network in docker

docker run -dit --name container-one alpine
docker run -dit --name container-two alpine
docker ps…


Represent an ordered pair of integers with a single integer.

Quadrants of a graph

The Algorithm

Triangular Number


Athlete’s years in career
#include <stdio.h>enum sport { cricket, football, basketball };int main() {
printf("Cricket = %d\n", cricket);
printf("Football = %d\n", football);
printf("Basketball = %d\n", basketball);
return 0;
}
OUTPUT:Cricket = 0
Football = 1
Basketball = 2


Connection Header

THE KEEP-ALIVE CONNECTION

Praveen Mathew

Developer @ThoughtWorksTechnologies

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store