
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

3K+ Views
In Golang, we can create a struct instance using a struct literal, which is a convenient and concise way to initialize a new struct. A struct is a composite data type that groups together zero or more named values of arbitrary types. It is defined using the type keyword followed by the name of the struct and its fields. Syntax Here's an example struct − type Person struct { Name string Age int } To create a new instance of this struct using a struct literal, we can simply specify the field ... Read More

1K+ Views
In Golang, counting specific characters in a slice can be done by iterating over the slice and comparing each character with the target character. There are multiple ways to count the occurrence of a specific character in a slice, such as using a loop, a map, or the strings.Count function. In this article, we will discuss each method with examples to help you understand how to count specific characters present in a slice in Golang. Using a Loop One way to count the occurrence of a specific character in a slice is by iterating over the slice and checking each ... Read More

7K+ Views
In Go, you can copy a struct by value or by reference using pointers. When you copy a struct by value, a new copy of the struct is created in memory, and all the fields of the original struct are copied to the new one. On the other hand, when you copy a struct by reference using a pointer, both the original and the copied struct share the same memory address. In this article, we will discuss how to copy a struct type in Go using value and pointer reference. Copy Struct Using Value Reference To copy a struct using ... Read More

2K+ Views
In Golang, slices are a powerful and flexible data structure that allows you to store a sequence of elements of the same type. When working with slices, you may need to copy one slice into another slice. Fortunately, Golang provides an easy and efficient way to do this. In this article, we will discuss how to copy one slice into another slice in Golang. Using The Copy Function in Golang Golang provides a built-in copy function that allows you to copy the elements of one slice into another slice. The copy function takes two arguments: the destination slice and the ... Read More

6K+ Views
Maps are an important data structure in Golang that stores key-value pairs. Sometimes it is required to copy one map to another map. Copying a map in Golang can be done using different approaches. In this article, we will discuss some of the methods to copy a map to another map in Golang. Method 1: Using a For Loop One way to copy a map to another map is to use a for loop. Example Here is an example − package main import "fmt" func main() { map1 := map[string]int{"a": 1, "b": 2, "c": 3} ... Read More

8K+ Views
In Go, we can convert a string to a float type using the strconv package. The strconv package provides the ParseFloat function to convert a string to a float type. This function takes three arguments - the string to be converted, the bit size of the float type, and the precision of the float type. In this article, we will discuss how to convert a string to a float type in Go. Syntax The syntax of the ParseFloat function is as follows − func ParseFloat(s string, bitSize int) (float64, error) The ParseFloat function takes two arguments - the string ... Read More

4K+ Views
In Golang, it is easy to convert one data type to another using type conversion. In this tutorial, we will explore how to convert an integer to a float data type. Converting Int to Float In Golang, converting an integer to a float is a straightforward process. You can use the float64() function to convert an integer to a float data type. Example Here is an example − package main import "fmt" func main() { i := 5 f := float64(i) fmt.Println("The integer value is: ", i) ... Read More

1K+ Views
With the frequent change in technology to present the content on the web it is often needed to redesign and restructure the content of the web pages or websites. Selenium with Python is a good combination that is helpful to extract the desired content from web pages. Selenium is a free open-source automated tool that is used for evaluating web applications across multiple platforms. Selenium Test Scripts can be written in a variety of computer languages such as Java, C#, Python, NodeJS, PHP, Perl, etc. In this Python Selenium article, using two different examples, the ways to locate elements of ... Read More

6K+ Views
In this article, we will understand the concept of nested Lsit in Python and how to iterate through a nested list in Python language, Sometimes, the task is to go through each element of a list or to find the elements in a list or to use the information given in a list. In all these cases, one has to iterate through a list. The list can be made up of a single type of elements or multiple types of elements can be used in a list. The three different examples would be used to represent the different ways ... Read More

1K+ Views
Sometimes, the task is to invert a boolean array. This is often required if the files contain a column with true or false values and the need is to use the column values in the inverted manner. For example, if a CSV file contains the data column as Covid Negative status showing True for covid –ve patients and the need is to create a column of covid+ve status. In such cases, the array inversion for the boolean values is required. In this Python article, using four different examples, the different ways to invert a Boolean array with or without using ... Read More