<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Zayed Hamadi on Medium]]></title>
        <description><![CDATA[Stories by Zayed Hamadi on Medium]]></description>
        <link>https://medium.com/@zayedh80?source=rss-bb33626c2835------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7X3k4UKQYLONYIaQP-jomw.jpeg</url>
            <title>Stories by Zayed Hamadi on Medium</title>
            <link>https://medium.com/@zayedh80?source=rss-bb33626c2835------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:30:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zayedh80/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Docker commands]]></title>
            <link>https://medium.com/@zayedh80/docker-commands-266b6c5a1bd1?source=rss-bb33626c2835------2</link>
            <guid isPermaLink="false">https://medium.com/p/266b6c5a1bd1</guid>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Zayed Hamadi]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 19:45:54 GMT</pubDate>
            <atom:updated>2025-01-20T19:45:54.466Z</atom:updated>
            <content:encoded><![CDATA[<p>Comprehensive list of Docker commands categorized by their purpose. These commands cover a wide range of operations for managing Docker containers, images, networks, and volumes.</p><h3>Basic Docker Commands</h3><ul><li>docker — version: Display the installed Docker version.</li><li>docker info: Display system-wide information about Docker.</li><li>docker help: Get help on Docker commands.</li></ul><h3>Container Management</h3><ul><li>docker run [options] IMAGE [COMMAND] [ARG…]: Run a container from an image.</li><li>docker ps: List running containers.docker ps -a: List all containers (running and stopped).docker ps -q: List only container IDs.</li><li>docker start CONTAINER: Start a stopped container.</li><li>docker stop CONTAINER: Stop a running container.</li><li>docker restart CONTAINER: Restart a container.</li><li>docker pause CONTAINER: Pause a running container.</li><li>docker unpause CONTAINER: Unpause a paused container.</li><li>docker kill CONTAINER: Kill a running container.</li><li>docker rm CONTAINER: Remove a stopped container.docker rm -f CONTAINER: Force-remove a running container.</li><li>docker logs CONTAINER: View logs of a container.docker logs -f CONTAINER: Follow the logs.</li><li>docker exec [options] CONTAINER COMMAND: Execute a command in a running container.</li><li>docker attach CONTAINER: Attach your terminal to a running container.</li><li>docker top CONTAINER: Display running processes in a container.</li><li>docker inspect CONTAINER: Get detailed information about a container.</li><li>docker stats: Display resource usage statistics of containers.</li></ul><h3>Image Management</h3><ul><li>docker images: List Docker images.docker images -q: List only image IDs.</li><li>docker pull IMAGE: Download an image from Docker Hub or a registry.</li><li>docker push IMAGE: Push an image to Docker Hub or a registry.</li><li>docker build [options] PATH: Build an image from a Dockerfile.docker build -t NAME:TAG PATH: Build with a specific name and tag.</li><li>docker tag SOURCE_IMAGE TARGET_IMAGE: Tag an image with a new name.</li><li>docker rmi IMAGE: Remove an image.docker rmi -f IMAGE: Force-remove an image.</li><li>docker history IMAGE: View the history of an image.</li><li>docker inspect IMAGE: Get detailed information about an image.</li><li>docker save IMAGE &gt; FILE.tar: Save an image to a tar file.</li><li>docker load &lt; FILE.tar: Load an image from a tar file.</li></ul><h3>Network Management</h3><ul><li>docker network ls: List all Docker networks.</li><li>docker network create NETWORK_NAME: Create a new network.</li><li>docker network inspect NETWORK_NAME: Get details of a specific network.</li><li>docker network connect NETWORK_NAME CONTAINER: Connect a container to a network.</li><li>docker network disconnect NETWORK_NAME CONTAINER: Disconnect a container from a network.</li><li>docker network rm NETWORK_NAME: Remove a network.</li></ul><h3>Volume Management</h3><ul><li>docker volume ls: List all Docker volumes.</li><li>docker volume create VOLUME_NAME: Create a new volume.</li><li>docker volume inspect VOLUME_NAME: Get details of a specific volume.</li><li>docker volume rm VOLUME_NAME: Remove a volume.</li><li>docker volume prune: Remove all unused volumes.</li></ul><h3>Swarm and Services</h3><ul><li>docker swarm init: Initialize a swarm.</li><li>docker swarm join: Join a swarm as a worker node.</li><li>docker service create [options] IMAGE [COMMAND]: Create a new service.</li><li>docker service ls: List services in the swarm.</li><li>docker service inspect SERVICE: Get detailed information about a service.</li><li>docker service scale SERVICE=REPLICAS: Scale a service to the specified number of replicas.</li><li>docker service rm SERVICE: Remove a service.</li></ul><h3>Docker Compose</h3><ul><li>docker-compose up: Create and start containers defined in a docker-compose.yml file.docker-compose up -d: Run containers in detached mode.</li><li>docker-compose down: Stop and remove containers, networks, and volumes created by docker-compose up.</li><li>docker-compose ps: List containers managed by Docker Compose.</li><li>docker-compose logs: View logs of services managed by Docker Compose.</li><li>docker-compose exec SERVICE COMMAND: Execute a command in a service’s container.</li><li>docker-compose build: Build or rebuild services.</li><li>docker-compose restart SERVICE: Restart a specific service.</li></ul><h3>System Management</h3><ul><li>docker system df: Show Docker disk usage.</li><li>docker system prune: Remove unused data (containers, images, volumes, and networks).</li><li>docker system info: Display system-wide Docker information.</li></ul><h3>Container Copying</h3><ul><li>docker cp SOURCE DEST: Copy files/folders between a container and the host.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=266b6c5a1bd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are the 4 Basic OOPs Concepts in Java?]]></title>
            <link>https://medium.com/@zayedh80/what-are-the-4-basic-oops-concepts-in-java-32680ac7d96e?source=rss-bb33626c2835------2</link>
            <guid isPermaLink="false">https://medium.com/p/32680ac7d96e</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[heritage]]></category>
            <category><![CDATA[oop-concepts]]></category>
            <category><![CDATA[oop]]></category>
            <dc:creator><![CDATA[Zayed Hamadi]]></dc:creator>
            <pubDate>Sun, 04 Aug 2024 13:02:46 GMT</pubDate>
            <atom:updated>2024-08-04T13:02:46.067Z</atom:updated>
            <content:encoded><![CDATA[<p>OOPs concepts in Java help organize code by using objects. The four main principles are encapsulation, Inheritance, Polymorphism, and Abstraction. Encapsulation keeps data and methods together, Inheritance lets classes share and reuse code from other classes. Polymorphism allows methods to work in different ways depending on the object. Abstraction hides complex details as well as shows only what is necessary. So, this article is here to explain each principle with simple examples to show how they make Java programming easier and more effective.</p><h3>4 OOP Principles Java</h3><p>OOPs concepts in Java is a paradigm that uses “objects” to design applications and programs. The four fundamental OOP principles are Encapsulation, Inheritance, Polymorphism, and Abstraction. Let’s explore each of these principles in detail with examples in Java.</p><h3>1. Encapsulation</h3><p>Encapsulation means keeping data (variables) and code (methods) together in one unit, like a class. In fact, in Java this is done by:</p><ul><li>Making class variables private.</li><li>Public getter and setter methods were used to access and change these variables.</li></ul><p>This OOP Java principle protects the data from outside changes and misuse.</p><h3>Example of Encapsulation in Java</h3><p>public class Student {</p><p>private String name;</p><p>private int age;</p><p>// Getter method for name</p><p>public String getName() {</p><p>return name;</p><p>}</p><p>// Setter method for name</p><p>public void setName(String name) {</p><p><a href="http://this.name/">this.name</a> = name;</p><p>}</p><p>// Getter method for age</p><p>public int getAge() {</p><p>return age;</p><p>}</p><p>// Setter method for age</p><p>public void setAge(int age) {</p><p>this.age = age;</p><p>}</p><p>}</p><p>In this object oriented programming in Java example, the Student class encapsulates the properties name and age and provides public methods to access and modify them.</p><h3>2. Inheritance</h3><p>Inheritance lets one class use the fields and methods of another class, making code reusable and creating a class hierarchy. In Java, you use the extends keyword to do this.</p><h3>Example of Inheritance in Java</h3><p>public class Animal {</p><p>public void eat() {</p><p>System.out.println(“This animal eats food.”);</p><p>}</p><p>}</p><p>public class Dog extends Animal {</p><p>public void bark() {</p><p>System.out.println(“The dog barks.”);</p><p>}</p><p>}</p><p>In this example, the Dog class gets the eat method from the Animal class and adds its own bark method. This shows how Dog can use both its own methods and those from Animal.</p><h3>3. Polymorphism</h3><p>Polymorphism in Java lets objects be used as if they are instances of their parent class. There are two types of polymorphism OOPs in java: compile-time polymorphism (method overloading) and runtime polymorphism (method overriding).</p><h3>Example of Polymorphism in Java</h3><p>Method Overloading (Compile-Time Polymorphism)</p><p>public class MathOperations {</p><p>public int add(int a, int b) {</p><p>return a + b;</p><p>}</p><p>public double add(double a, double b) {</p><p>return a + b;</p><p>}</p><p>}</p><p>In this example of OOPs concepts in Java, the add method has different versions with different parameters. In fact, this is called compile-time polymorphism.</p><p>Method Overriding (Runtime Polymorphism)</p><p>public class Animal {</p><p>public void sound() {</p><p>System.out.println(“Animal makes a sound”);</p><p>}</p><p>}</p><p>public class Cat extends Animal {</p><p>public void sound() {</p><p>System.out.println(“Cat meows”);</p><p>}</p><p>}</p><p>In this example, the Cat class changes the sound method. When a Cat object uses this method, the new version runs, showing runtime polymorphism.</p><h3>4. Abstraction</h3><p>Abstraction means hiding complex details and showing only what’s necessary. In Java object oriented programming, this is also done using abstract classes and interfaces.</p><h3>Example of Abstraction in Java</h3><p>Using Abstract Class</p><p>abstract class Shape {</p><p>abstract void draw();</p><p>}</p><p>class Circle extends Shape {</p><p>void draw() {</p><p>System.out.println(“Drawing a circle”);</p><p>}</p><p>}</p><p>In this example, the Shape class is abstract and has an abstract draw method. The Circle class extends Shape and provides its own draw method.</p><p>Using Interface</p><p>interface Drawable {</p><p>void draw();</p><p>}</p><p>class Rectangle implements Drawable {</p><p>public void draw() {</p><p>System.out.println(“Drawing a rectangle”);</p><p>}</p><p>}</p><p>Here, the Drawable interface defines the draw method. The Rectangle class uses this interface and gives its own draw method. In fact, if you want to learn more about OOPs concepts in Java then you can consider enrolling in a <a href="https://www.theiotacademy.co/java-development-training">Java full stack certification course</a>. It will teach you all about using OOPs as well as beneficial for starting your career in the field of software development.</p><h3>Conclusion</h3><p>In conclusion, the four key Object-Oriented Programming (OOP) principles in Java are crucial for good software design. Encapsulation keeps data safe and easy to manage. Inheritance lets you reuse code and organize classes in a hierarchy. Polymorphism makes your code flexible by allowing methods to behave differently based on the object. Abstraction hides complex details, showing only what’s needed. As well as understanding and using these principles of OOPs concepts in Java helps you write clear and maintainable code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32680ac7d96e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>