Articles on Trending Technologies

Technical articles with clear explanations and examples

Difference between System Testing and Acceptance Testing

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 22-Feb-2023 2K+ Views

Testing is a major step for the successful delivery of any application. On the basis of the level of execution of testing, we can classify testing into two categories − System Testing and Acceptance Testing. Read this article to learn more about system testing and acceptance testing and how they are different from each other. What is System Testing? System Testing is a type of testing which is used to validate the functionality of a developed software product. It is also known as black box testing. This testing involves the behavioral as well as functional testing of the software product ...

Read More

Difference Between Syntax and Semantics

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 22-Feb-2023 21K+ Views

Syntax defines the rules and regulations that help write any statement in a programming language, while semantics refers to the meaning of the associated line of code in the programming language. Read this article to learn more about syntax and semantics and how they are different from each other. What is Syntax? In a programming language, Syntax defines the rules that govern the structure and arrangement of keywords, symbols, and other elements. Syntax doesn't have any relationship with the meaning of the statement; it is only associated with the grammar and structure of the programming language. A line of ...

Read More

Golang Program to check a directory is exist or not

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 8K+ Views

In golang we have different inbuild function like Stat(), Open() and mkdir() to check whether a directory exist or not . Here we are using three functions. in the first one we are using the Stat() function present in the os package while in the second and third example we are using Open() and mkdir() function respectively to implement the result. Method 1: Using os.stat() Method The os package provides the Stat() function to get information about a file or directory. If the directory exists, the function returns a FileInfo structure, otherwise, it returns an error. Syntax func ...

Read More

Golang Program to remove a specified directory

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 5K+ Views

Golang provides several methods to remove a specified directory, including using the os and filepath packages. Removing a directory is a critical operation, and caution should be exercised when performing this task. This article will discuss the different methods to remove a directory in Golang, along with the syntax and algorithm for each method. Method 1: Using The os Package The os package in Golang provides several functions to perform operating system-related operations, including removing a directory. The Remove function of the os package is used to remove a directory. Syntax Remove(dirName) The Remove() function is present in os ...

Read More

Difference between Stack and Queue Data Structures

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 22-Feb-2023 4K+ Views

Primarily, there are two types of data types − Primitive and Non-primitive. Primitive data types are predefined types of data, which are supported by the programming language. Non-primitive data types are not defined by the programming language, but are instead created by the programmer. With this brief introduction to data types, let's start this article and differentiate Stack and Queue data structures. Both Stack and Queue are types of data structures to store data in a particular order. A stack data structure is a type of linear list which allows the insertion or deletion of an element ...

Read More

Golang Program to get the list the name of files in a specified directory

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 5K+ Views

In Golang, we have two internal functions - ReadDir() and Walk function to get a list of filenames prenent in a specific directory. Here we have write three examples. In the first example We will use the ReadDir() function present in ioutil package while in the second one we are using the walk function present in the filepath package. Method 1: Using ioutil PACKAGE The ioutil package in Golang provides several functions to perform input/Output operations, including reading the files and directories. The ReadDir() function of the ioutil package is used to get the list of files in a specified ...

Read More

Golang Program to print the home directory of the current user

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 2K+ Views

The Go programming language provides various methods to obtain the home directory of the current user. This information can be useful in many applications, such as file management, system configuration, etc. In this article, we will discuss different methods to get the home directory in Go along with syntax and examples. Method 1: Using os.UserHomeDir() The os.UserHomeDir() function is part of the Go standard library and is the simplest and most efficient method to get the home directory of the current user. Here is an example that demonstrates the usage of os.UserHomeDir() Syntax func UserHomeDir() (string, error) The UserHomeDir() ...

Read More

Difference Between SOP and POS

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 22-Feb-2023 14K+ Views

SOP (Sum of Product) and POS (Product of Sum) are the methods of representing a reduced logic expression. The basic difference between the two is that SOP expresses a Boolean function as a sum (logical OR) of product (logic AND) terms, while POS expresses a logic function as a product (logic AND) of sum (logic OR) terms. Read this article to learn more about SOP and POS and how they are different from each other. What is SOP? Sum of Product (SOP) is a method of representing a logic function by using minterms. The expression of a SOP includes product ...

Read More

Golang Program to get the List of filenames matching the specified wild card pattern

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 4K+ Views

One of the features of Go is the ability to search and retrieve files based on a specified pattern. In this article, we will discuss different methods to get the list of filenames that match a specified wildcard pattern in Go, and provide syntax and examples for each method. Method 1: Using the "filepath.glob" The "filepath.Glob" method is the easiest and most straightforward way to retrieve the list of filenames that match a specified wildcard pattern. The function takes a pattern as input and returns a slice of strings that match the pattern. Syntax filenames, err := filepath.Glob(pattern) The ...

Read More

Golang Program to check if a file is directory or a file

Akhil Sharma
Akhil Sharma
Updated on 22-Feb-2023 4K+ Views

In Go, a directory is a special type of file that holds other files and directories. A directory is used to organize files on a file system and provides a structure to the file system. Go provides several functions in the os package to work with directories, including: os.mkdir, os.remove, os.open, etc. Syntax func Stat(name string) (fi FileInfo, err error) The Stat() function is present in os package and is used to check the status of a particular directory. The function takes a string parameter name, which represents the path of the directory. It returns a FileInfo structure, fi, ...

Read More
Showing 40311–40320 of 61,297 articles
Advertisements