Email communication has been possible only with the help of the SMTP protocol. It is used at the last layer of the OSI (Open Source Interconnection) model. The SMTP has two main parts SMTP client request and SMTP server response. The mode of communication between the client and server is established with the commands. The SMTP Response is sent with a 3-digit number along with the text messages and can be detected using the first digit of the SMTP response. Simple Mail Transfer Protocol (SMTP) SMTP is a type of Application layer protocol used to send and receive mail. It ... Read More
Google Cloud provides users with different resources and one among them is Database services. After exploring the database services from the websites, choosing the right for your concern is difficult as there are many options available. The primary purpose of these services is to store the data securely and globally. There are three types of services provided namely hybrid data distribution, regional data distribution, and multi-cloud distribution. In the below article based on the database, the services provided by them are explained. Google Cloud Database Services Deploying Database The Google Cloud database supports three main types of deployment that are ... Read More
Repeaters and bridges are both networking devices, both used to extend the range of a network, more specifically bridge provides the facility to combine various LANs (Local Area Networks) to develop a larger LAN. While repeaters are mainly used to amplify signal strength when the signal comes to the repeater it regenerates, which would be an amplified signal of the same and retransmits. Repeaters are commonly used in LANs to extend the range of a network more than the 100-meter limit of Ethernet. Bridge works at the Data Link Layer (DLL) of the model named OSI and they use MAC ... Read More
In this golang article, we will learn how to return the values from the block using external function, an anonymous function. A block is created using curly braces where the scope of variables remains inside the block and not outside of it. Example 1 In this Example, two values of x and y are added in the code block and z will be assigned the added value. Then, call the function getResult in which another x and y are added and assigned to z in the code block. package main import "fmt" func main() { ... Read More
In this golang article, we will write Go language programs to convert milliseconds to minutes and seconds using various methods. Milliseconds are converted to minutes and seconds mathematically using different set of logics. Algorithm Step 1 − Import the required packages in the program Step 2 − Create a main function Step 3 − In the main take milliseconds value and convert it into minutes and seconds using different logics mathematically Step 4 − Then, print the output using Printf function from the fmt package Example 1 In this Example, we will take the milliseconds value. Then, the ... Read More
In this article, we will learn to write Go language programs that will create multiple BEGIN and END blocks using curly braces, “conditional statements”, as well as “external functions”. A block is created using curly braces, the scope of a variable remains inside the block and not outside it. Algorithm Step 1 − Create a package main and declare fmt(format package) package in the program where main produces executable codes and fmt helps in formatting input and output. Step 2 − Create a main function Step 3 − In the main, create a first block by initializing ... Read More
In this Go language article, we will write programs to demonstrate BEGIN and END blocks using sum of numbers, iteration and two variables. Blocks are used to group the statements where the variables described in the block can only be used in that scope and not outside it. They also help in code readability Algorithm Step 1 − Create a package main and declare fmt(format package) package in the program where main produces executable codes and fmt helps in formatting input and output. Step 2 − Create a main function and in this function create two begin and end ... Read More
In Go language article, we will write programs to format time in AM-PM format using now and format package, as well as using now and format function with minutes and seconds. The current time can be obtained using Now function from the time package whereas we can format the time using Format function as we are going to use in this article. In this article we will use “now and format function” to get the formatted time in AM-PM format. Syntax funcNow() Time The Now() function is defined in time package. This function generates the current local time. To ... Read More
In Golang we can display current date and time using “now and format function”, “now function”, and “strconv package” to display the current date and time. In this article we are going to learn how to create a golang program to display current date and time using various Examples. Syntax funcNow() Time The Now() function is defined in time package. This function generates the current local time. To use this function, we have to first import the time package in our program. strconv.Quote() This function belongs to the strconv package. It’s goal is to return the output in ... Read More
In golang we can obtain the hash elements as a sorted array from the hash collection using iteration, sort package as well as slice function. A hash collection contains a hashmap which is used to store items in the form of key value pairs. A hashmap is implemented using a hash function. Syntax func make ([] type, size, capacity) The make function in go language is used to create an array/map it accepts the type of variable to be created, its size and capacity as arguments func append(slice, element_1, element_2…, element_N) []T The append function is used to ... Read More