Friday, November 1, 2024

Top10 Platforms for Freelance Writing and Earning Money in 2024 - Best of Lot

Are you a writer looking to make some extra cash on the side? Or are you a full-time freelance writer looking for new platforms to expand your portfolio and find more clients? Look no further! Here are 10 platforms that can help you earn money as a freelance writer. Freelance writing is a great way to earn money on the side or even as a full-time career. With the rise of the internet and the increasing demand for content, there are now many platforms that connect businesses with freelance writers.

In this article, we will introduce you to 10 platforms that can help you earn money as a freelance writer. Whether you are a beginner looking for your first writing gig or an experienced writer looking for new opportunities, these platforms have something to offer.

Thursday, October 31, 2024

Top 10 Courses to Learn Artificial Intelligence for Beginners in 2025 - Best of Lot

 Artificial Intelligence (AI) is transforming industries and revolutionizing the way we live and work. To stay ahead in this rapidly evolving field, it is crucial to continually update your knowledge and skills. Fortunately, Udemy and Coursera offer a wide range of courses that provide comprehensive training in various aspects of AI. In this article, we have curated a list of the top 10 courses on Udemy and Coursera in 2025, each with an expansive description. We will also provide essential details such as course duration, instructor information, course fee, and course rating. Whether you are a beginner or an experienced professional, these courses will equip you with the necessary tools to excel in the field of AI.

How to Create Config Server in Microservices Architecture with Spring Cloud Config Server

The ability of microservices architecture to deconstruct big monolithic programmes into smaller, independent, and controllable services has led to its enormous growth in popularity in recent years. It can be difficult to manage configuration across numerous microservices, though, as each service may call for a separate set of configurations. To solve this problem, configurations for microservices are centralised and managed by a separate Config Server. In this post, we'll examine what a Config Server is, why it's crucial for microservices, and how to use Spring Cloud Config Server to construct it.

Tuesday, October 29, 2024

Top 10 AI Tools for Bloggers and Writers in 2025

 Artificial Intelligence (AI) has revolutionized various industries, and the field of writing and blogging is no exception. AI-powered tools for bloggers and writers have emerged, offering innovative solutions to enhance creativity, streamline workflows, and improve content quality. In this article, we present the top 10 AI tools specifically designed for bloggers and writers. These tools leverage AI technologies such as natural language processing, machine learning, and data analytics to help writers generate ideas, improve grammar, enhance productivity, and optimize content for better engagement. Let's explore these cutting-edge AI tools and discover how they can empower bloggers and writers.

Monday, October 28, 2024

Top 20 Machine Learning Libraries for AI Engineers in 2024 - Best of Lot

 Artificial Intelligence (AI) has emerged as a transformative technology, revolutionizing various industries and driving innovation. With the increasing accessibility of AI, numerous free tools have become available, enabling individuals and businesses to explore and leverage AI capabilities. In this article, we present the top 20 free Machine Learning libraries to try in 2024. These tools cover a wide range of AI applications, including machine learning, natural language processing, computer vision, and more. Let's dive into the exciting world of AI tools and discover how they can empower innovation and automation.

What is Payload in REST API? How to send Payload using HTTP Post Request and HttpClient

Hello and welcome to the blog post. In this comprehensive article we are going to take a look at an interesting topic. I’m sure you all are familiar with client-server architecture. If not let me recap it quickly for you. 

A Client is a machine (or a web-browser) that request for desired results from the  server. In other words, clients initiate requests for services or resources, while servers provide those services or resources upon request. The client-server model forms the foundation of many networked applications and systems, where clients and servers communicate and collaborate to fulfill various tasks and deliver services.

What is a Payload?

When a client sends a request to a server, the payload typically contains the data or parameters required by the server to process the request. For example, in a client-server architecture for a web application, the payload of an HTTP request sent by the client may include parameters for a form submission, JSON data for an API request, or a file to be uploaded.

On the server side, when the server sends a response back to the client, the payload contains the data or information requested by the client. This can include HTML content, JSON responses, file attachments, or any other data relevant to the specific request made by the client.

Payload in REST API

The information supplied in the body of an HTTP request is referred to as a payload in the RESTful API architecture. It represents the data that is being sent from the client to the server or the other way around. Depending on the content type supplied in the request headers, the payload may be in one of several forms, including JSON, XML, or plain text.

The payload carries the necessary data required to perform operations on the server or to retrieve specific resources. For example, when creating a new resource, the payload would typically contain the data that needs to be stored on the server. When updating an existing resource, the payload would include the modified data.

What is an HttpClient? 

HttpClient is a powerful Java package that offers quick and efficient way for submitting HTTP requests and receiving server responses. Starting with Java 11, it is a part of the Java SE standard library and offers a comprehensive API for interacting with HTTP-based services.

HttpClient's main objective is to make it easier for client applications to communicate with RESTful APIs, web services, and other HTTP-based endpoints. The low-level aspects of creating and managing connections, dealing with request and response bodies, modifying headers, controlling timeouts, and dealing with redirection are abstracted away.

You can perform various HTTP operations like GET, POST, PUT, DELETE by using HttpClient. It supports both synchronous and asynchronous request processing and offers a number of configuration options for customization.

Let’s take an example on how to send a POST request to REST API using HttpClient

import com.fasterxml.jackson.databind.ObjectMapper;

import java.net.URI;

import java.net.http.HttpClient;

import java.net.http.HttpRequest;

import java.net.http.HttpResponse;

import java.net.http.HttpHeaders;

import java.net.http.HttpResponse.BodyHandlers;


public class HttpClientExample {

    public static void main(String[] args) throws Exception {

        // Create an instance of HttpClient

        HttpClient httpClient = HttpClient.newHttpClient();


        // Define the URL of the REST API endpoint

        String url = "http://api.example.com/users";


        // Create a User object

        User user = new User("John Doe", 30);


        // Serialize the User object to JSON

        ObjectMapper objectMapper = new ObjectMapper();

        String requestBody = objectMapper.writeValueAsString(user);


        // Build the HTTP request

        HttpRequest request = HttpRequest.newBuilder()

                .uri(URI.create(url))

                .header("Content-Type", "application/json")

                .POST(HttpRequest.BodyPublishers.ofString(requestBody))

                .build();


        // Send the request and receive the response

        HttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString());


        // Extract the User object from the response

        String responseBody = response.body();

        User responseUser = objectMapper.readValue(responseBody, User.class);


        // Print the response User object

        System.out.println("Response User: " + responseUser);

    }

}


class User {

    private String name;

    private int age;


    // Constructors, getters, and setters


    @Override

    public String toString() {

        return "User{" +

                "name='" + name + '\'' +

                ", age=" + age +

                '}';

    }

}


In this example, we have a User class representing the user object. We use the ObjectMapper from the Jackson library to serialize the User object to JSON format. 

We then create an HttpRequest object with the necessary details, including the URI, headers (in this case, "Content-Type" is set to "application/json"), and the request body containing the serialized User object. 

After sending the request using httpClient.send(), we receive the response as an HttpResponse object. We extract the response body as a JSON string. 

Finally, we deserialize the response JSON string back into a User object using objectMapper.readValue(). The resulting User object represents the response payload, which we can use as needed.


Sending Payload to REST API using HTTP POST Request and HttpClient in Java

import java.net.URI;

import java.net.http.HttpClient;

import java.net.http.HttpRequest;

import java.net.http.HttpResponse;

import java.net.http.HttpHeaders;

import java.net.http.HttpEntity;

import java.net.http.HttpHeaders;

import java.net.http.HttpRequest.BodyPublishers;

import java.net.http.HttpResponse.BodyHandlers;


public class HttpClientExample {

    public static void main(String[] args) throws Exception {

        HttpClient httpClient = HttpClient.newHttpClient();


        String jsonPayload = "{\"name\": \"Someone \", \"email\": \"someone@example.com\"}";


        HttpRequest request = HttpRequest.newBuilder()

                .uri(URI.create("http://example.com/api/resource"))

                .header("Content-Type", "application/json")

                .POST(BodyPublishers.ofString(jsonPayload))

                .build();


        HttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString());


        int statusCode = response.statusCode();

        String responseBody = response.body();


        System.out.println("Status Code: " + statusCode);

        System.out.println("Response Body: " + responseBody);

    }

}


In the example above, we create a JSON payload using a sample data object. We set the HTTP method to POST, the request URL to "http://example.com/api/resource", and the content type to "application/json". The payload is then sent in the body of the request using the BodyPublishers.ofString() method. 

Finally, we retrieve and handle the response from the server.

Remember to replace "http://example.com/api/resource" with the actual endpoint URL of the REST API you want to send the payload to, and modify the payload data according to your requirements and the API's expected format.

Let me show you how to send other types of payloads from the following example.


1) Sending a Form-UrlEncoded Payload


import java.net.URI;

import java.net.http.HttpClient;

import java.net.http.HttpRequest;

import java.net.http.HttpResponse;

import java.net.http.HttpHeaders;

import java.net.http.HttpEntity;

import java.net.http.HttpHeaders;

import java.net.http.HttpRequest.BodyPublishers;

import java.net.http.HttpResponse.BodyHandlers;

import java.net.URLEncoder;

import java.nio.charset.StandardCharsets;


public class HttpClientExample {

    public static void main(String[] args) throws Exception {

        HttpClient httpClient = HttpClient.newHttpClient();


        String payload = "name=" + URLEncoder.encode("John Doe", StandardCharsets.UTF_8)

                + "&email=" + URLEncoder.encode("johndoe@example.com", StandardCharsets.UTF_8);


        HttpRequest request = HttpRequest.newBuilder()

                .uri(URI.create("http://example.com/api/resource"))

                .header("Content-Type", "application/x-www-form-urlencoded")

                .POST(BodyPublishers.ofString(payload))

                .build();


        HttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString());


        int statusCode = response.statusCode();

        String responseBody = response.body();


        System.out.println("Status Code: " + statusCode);

        System.out.println("Response Body: " + responseBody);

    }

}


In this example, we are sending a form-urlencoded payload to the REST API endpoint "http://example.com/api/resource". The payload contains two fields, name and email, which are URL-encoded using the URLEncoder.encode() method. The Content-Type header is set to "application/x-www-form-urlencoded".



2) Sending a Plain Text Payload


import java.net.URI;

import java.net.http.HttpClient;

import java.net.http.HttpRequest;

import java.net.http.HttpResponse;

import java.net.http.HttpHeaders;

import java.net.http.HttpEntity;

import java.net.http.HttpHeaders;

import java.net.http.HttpRequest.BodyPublishers;

import java.net.http.HttpResponse.BodyHandlers;


public class HttpClientExample {

    public static void main(String[] args) throws Exception {

        HttpClient httpClient = HttpClient.newHttpClient();


        String textPayload = "This is a plain text payload.";


        HttpRequest request = HttpRequest.newBuilder()

                .uri(URI.create("http://example.com/api/resource"))

                .header("Content-Type", "text/plain")

                .POST(BodyPublishers.ofString(textPayload))

                .build();


        HttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString());


        int statusCode = response.statusCode();

        String responseBody = response.body();


        System.out.println("Status Code: " + statusCode);

        System.out.println("Response Body: " + responseBody);

    }

}


In this example, we are sending a plain text payload to the REST API endpoint "http://example.com/api/resource". The payload simply contains the text "This is a plain text payload." The Content-Type header is set to "text/plain" to indicate that the payload is in plain text format.



Summary 

In summary, sending a payload to a REST API using an HTTP POST request and HttpClient in Java involves creating an HTTP request with the desired payload, specifying the necessary headers, and sending the request using the HttpClient instance. The server will process the payload and provide a response, which can be accessed and utilized accordingly.


Sunday, October 27, 2024

20 Examples of Git Commands in Linux and Windows

Version control is crucial in software development, and Git stands out as a powerful tool for managing source code. Whether you're working in a Linux or Windows environment, understanding Git commands is essential. This article explores 20 fundamental Git commands, demonstrating their application and significance. From initializing a repository to handling branches and commits, each command plays a pivotal role in maintaining a well-organized and collaborative development workflow. Whether you're a seasoned developer or a newcomer, mastering these Git commands will enhance your ability to track changes, collaborate seamlessly, and contribute effectively to software projects.

Friday, October 25, 2024

Is Frontend Master Worth It?

Frontend development has been growing rapidly in the last few years, as web applications have become more complex and interactive. Frontend Master is an online platform that provides courses and tutorials to learn front-end development. However, with so many resources available on the internet, it's difficult to know whether Frontend Master is worth investing your time and money. In this article, we'll take a closer look at what Frontend Master has to offer and whether it's worth the investment.

Thursday, October 24, 2024

5 Free Oracle and Microsoft SQL Server Online Courses [2025] - Best of lot

If you are an application developer, like someone developing a server-side application using Java or .NET or any other programming language which uses a database like Oracle and Microsoft SQL Server or a junior DBA, then you must learn these database technologies to effectively work in your Job. Even though your organization might have DBAs or Database Administrators to help you with the database, more often than not, it's application developers who end up writing SQL scripts to create data, upload data, query data, and writing complex stored procedures and triggers to implement application functionalities. DBAs job mostly does database installation, access control, security, and other database admin stuff.

Top 5 Free Servlet, JSP, Java FX, and JDBC Courses for Java Web Developers in 2025 - Best of Lot

If you are a Java developer working on a Java JEE projects like a Java Web application running on Tomcat or Glassfish, or you want to get into that by learning server-side technologies like Servlet, JSP, and JDBC, then you have come to the right place. In this article, I will share some free online courses to learn Servlet, JSP, and JDBC at your own pace. If you want to become a rockstar Java web developer, then you must have a good understanding of these essential web technologies before you learn frameworks like Spring and Hibernate. These frameworks work on top of these basic technologies, and if you don't know them, then you would often struggle to debug and troubleshoot problems in the real world.

Top 6 Dynamic Programming Online Courses for Coding Interviews in 2025 - Best of Lot

Hello guys, if you are preparing for a coding interview but struggling to solve Dynamic programing based coding problems and looking for the best resource to improve your Dynamic programming skill then you have come to the right place. Earlier, I have shared the best coding interview courses and best Recursion courses,  as well as popular  Dynamic programming problems from interviews, and today I am going to share the best online courses to learn Dynamic programming in depth.  Dynamic programming simply means that plain recursion can be optimized when there are repeated calls for some inputs.

5 Free Online Courses to Learn Kotlin in 2025 - Best of Lot

Hello guys, If you are in Android application development or server-side Java development, then you might have heard about the Kotlin programming language, created by JetBrains, the company behind popular IDEs like IntelliJIDEA, PyCharm, and WebStorm. Kotlin is also Google's official language for developing Android apps. If you don't know what Kotlin is and why you should learn Kotlin, then let me tell you that Kotlin is a mature programming language that offers many benefits over traditional programming languages like Java which has been time-tested over the last 25 years. Kotlin is designed to solve pain points of Java programming language like verbose nature and boilerplate.

Top 6 Free Courses to Learn Bootstrap Online for Beginners in 2025 - Best of Lot

Bootstrap is one of the most popular front-end libraries, which provides a customizable HTML, CSS, and JavaScript template for creating a modern and responsive website. All the beautiful websites you see these days with large fonts and slick form fields are built using Bootstrap. If you want to learn Bootstrap and looking for some excellent online courses, then you have come to the right place. In the past, I have shared advanced CSS courses to learn Flexbox, Grid, and SaaS, and in this article, I will share some of the excellent Bootstrap courses, which are also free, and you can use them to kick-start your journey with the Bootstrap framework. If you are interested in modern web development, this is the framework you must learn this year.

Top 6 Free Courses to learn PHP and MySQL in 2025 [Updated] - Best of lot

If you want to build web applications quickly like overnight or over the weekend, then PHP and MySQL are the right choices and because of this power, they are also the best language for freelancing and startups where a quick turnaround time is required. PHP and MySQL are incredibly powerful open source technologies that allow programmers and web developers to create functional websites and apps that go way beyond basic HTML. PHP is specially designed to generate interactive and dynamic websites and is also known as the server-side scripting language, while MySQL is one of the leading relational databases along with Oracle and Microsoft SQL Server.

Top 5 Free Courses to Learn C# (C-Sharp) in 2025 - Best of Lot

Many people underestimate the power of C# and never think highly of it when they talk about programming languages. Still, the truth is that C# is one of the popular programming languages of today's world, just behind JavaScript, SQL, and Java on StackOverFlow's Developer Survey for the last couple of years. There are a lot of jobs and opportunities available for experienced C# developers. It's one of the critical languages for developers working with Microsoft technologies like Windows and SQL Server. It is also one of the most popular programming languages for developing desktop GUI, surpassing Java Swing entirely in the last couple of years. I have seen many big investment banks switched from Swing to C# for their GUI development work.

6 Best Free AZ-900 Azure Fundamentals Courses for Beginners to Learn Online in 2025

Hello guys, if you are preparing for the AZ-900 certification or Azure Fundamentals exam in 2025, one of the best certifications to start a cloud computing career, and looking for free online courses to start your preparation, then you have come to the right place. In the past, I have shared both free and paid courses to learn AWS, Azure, and Google Cloud and the best AZ-900 courses and practice tests, and today, I am going to share the best free AZ-900 courses to pass the Azure Fundamentals exam. If you are thinking of learning Cloud Computing and Microsoft Azure platform, this is the best cloud certification. 

Wednesday, October 23, 2024

Top 7 Free Selenium Courses for Beginners to Learn Online in 2025 - Best of Lot

Testing is an integral part of software development. We have long relied on manual testing by testers and QA professionals to ship quality software and find bugs, but that's not sustainable anymore. There is an increased focus on automation testing nowadays, and Selenium is leading its web drivers. If you don't know Selenium, it's a free automation testing tool for web applications. It can work with different web browsers like Chrome, Firefox, Internet Explorer, and Opera and simulate human-like behavior. Using Selenium, you can programmatically interact with all the other elements on a webpage. You can click on them, input text, extract text, and more.

Top 5 Computer Vision and OpenCV Courses to Learn in 2025 - Best of Lot

Hello guys, if you want to learn Computer Vision and OpenCV and look for the best computer vision online courses from Udemy, Coursera, and Pluralsight, you have come to the right place. Earlier, I have shared the best online courses to learn Python, Data Science, and Machine Learning from Coursera and Udemy, and in this article, I am going to share the best online training courses to learn both Computer Vision and OpenCV. The list includes courses for beginners and experienced programmers who want to learn the advanced concept of Computer Vision and Open CV.  It's one of the most existing fields of Machine Learning and Artificial Intelligence and has uses across industries like object detection, self-driving cars, robotics, and much more.

Top 5 Online Courses to learn Design Patterns in JavaScript in 2025 - Best of Lot

If you are a JavaScript web developer and want to learn design patterns to further improve your coding and development skills and looking for the best design pattern courses in JavaScript, then you have come to the right place. Earlier, I have shared the best JavaScript courses for beginners. Today, I will share the best courses to learn Design Patterns in JavaScript from Udemy, Pluralsight, Udacity, and LinkedIn Learning. These are truly great online courses that you can join to learn this valuable skill and become a better JavaScript developer. 

3 Books and Courses to Learn RESTful Web Services using Spring and Java in 2025 - Best of Lot

Hello guys, if you know the Spring framework, then there is a good chance that you have heard about the classic Spring in Action book by Craig Walls. It's one of the best books to learn Spring, and many Java developers, including me, have learned Spring from that. But, even though the Spring in Action 5th Edition is one of the best books to learn Spring framework, it's just not enough to learn the intricacies of developing a modern, full-featured RESTful Web Service using Spring Framework. It does have a chapter on developing RESTful Web Services. It nicely explains concepts like @RestController, @ResponseBody, @ResponseStatus, HTTP message converters, content negotiation, but that barely touches the surface of developing a production-quality RESTFul Web Service.