
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

312 Views
Exponential functions are widely used in mathematics and computer science to represent the growth or decay of various phenomena. In Golang, there are several ways to find the base-10 exponential of a given number. In this article, we will explore some of these methods. Understanding the Base-10 Exponential The base-10 exponential of a given number can be defined as the power to which the number 10 must be raised to obtain the given number. For example, the base-10 exponential of 1000 is 3, because 10 to the power of 3 is 1000. Similarly, the base-10 exponential of 0.01 is -2, ... Read More

2K+ Views
In object-oriented programming, the concept of inheritance allows the creation of a new class that is a modified version of an existing class, inheriting the properties and methods of the base class. Golang doesn't support traditional inheritance, but it provides the concept of interface embedding, which is a powerful way of reusing code. What is Interface Embedding? Interface embedding is a way of composing interfaces by combining two or more interfaces into a single interface. It allows you to reuse the methods of one interface in another interface without having to redefine them. It also provides a way of extending ... Read More

4K+ Views
Go is a statically typed programming language, which means that the type of a variable is determined at compile time. This feature allows the Go compiler to perform optimizations and improve performance. To write efficient and maintainable code in Go, it is important to know the type of a variable. In this article, we will discuss different ways to find the type of a variable in Go. Using fmt.Printf One way to find the type of a variable in Go is to use the Printf function from the fmt package. Printf allows us to format and print values to the ... Read More

285 Views
Golang is a statically typed language, which means that the data types of variables are defined at the time of declaration. It is important to know the type of an object or variable when developing software applications. In this article, we will explore different ways to find the type of an object in Golang. Using the Reflect Package The reflect package in Golang provides a way to inspect the types of variables. The TypeOf function in the reflect package returns a Type object that represents the type of the given value. Example package main import ( ... Read More

766 Views
In Go, converting an integer variable to a string can be accomplished in various ways. There are built-in functions and packages that can be used for this task. This article will explore different ways to convert an integer variable to a string in Go. strconv.Itoa() Function The strconv package provides a function called Itoa() which is used to convert an integer to its string representation. This function takes an integer value as an argument and returns its string representation. Example package main import ( "fmt" "strconv" ) func main() { ... Read More

392 Views
In Golang, variables can be declared using the var keyword or the short declaration operator :=. While both ways allow the programmer to define variables, they have some differences that make them suitable for different scenarios. In this article, we will discuss the difference between the var keyword and the short declaration operator and when to use them. Var Keyword in Golang In Golang, the var keyword is used to declare variables with a specified type. It is a way of explicitly declaring the type of the variable. The syntax of the var keyword is as follows − var variableName ... Read More

645 Views
The set covering is a well-known NP-hard problem in the combinational optimization technique. We call the set cover problem NP-Hard because there is no polynomial real-time solution available for this particular problem. An algorithm called greedy heuristic is a well-known process for the set cover problem. Here is an example − Let U be the universe of elements, {S1, S2, .....Sm} be collection of subsets of the set, U and Cost(S1), C(S2), ......Cost(Sm) be costs of subsets. 1)Let I is the set of elements included so far. Initialize the process I = {} 2) Do following ... Read More

223 Views
Shuffle() is collection class method in Java, works in a random manner based on the permutation logic on a specific group of list elements. Tree are two distinct types of method in a shuffle class(), depending on the particular parameters. Java Collections shuffle(list) Method. Java Collections shuffle(list, random) Method. In this method, we can arrange the characters randomly to generate some random values. Then we will apply the suffle method on it. To perform the vector shuffle, we can use Fisher-Yates shuffle algorithm. In this method, we can learn a linear scan on a vector and swap each ... Read More

163 Views
The credibility of an efficient coding language depends upon how well it can manage the date and time. In a Java Virtual Environment we get some inbuilt facilities like date, time and calendar to handle the problem related to date and time. java. until date class - In Java, there are many contains those are very important for the program. Date class deals with the operation about the date and time. They are those type of classes which comes with the feature of cloneable, Serializable and comparable interfaces. Extract the current date and time - There are two types ... Read More

6K+ Views
Nesting of methods is a hybrid function calling method in Java, which can call another method in the same class. There are two types of nested classes are available in a Java environment. Non-static nested class (also known as , the inner class) Static nested class A non-static nested class (or, inner class) is a defined class within a particular class. It also contains some outer classes with some access authorities. In this method, we can use "." operator to create the instance of the inner class by using an outer class. On the other hand; a static ... Read More