
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

1K+ Views
What is 2D array in Golang? In Go programming language, a 2D array is an array of arrays, where each element of the outer array is a simple array itself. The code to declare a 2d array of size 2 X 3 can be done by writing var array [2][3]. It's important to note that 2D arrays have a fixed size, and once they are created, their size cannot be changed. If you need a dynamic 2D array, you can use a slice of slices. Here is an example of sorting a 2d array across columns − Input 3 2 1 6 4 5 ... Read More

9K+ Views
In Go Language, we have various data types to store data and the String data type is the one that is used to store a sequence of characters. The size of string variable is 1 or 8 bits. An array on the other hand is a data type that is used to store data at contiguous memory locations. Syntax func fields(s string) []string fields() function is present in strings package and is used to convert a string to an array of string. This function takes a string value as an argument and returns the corresponding array as the result. ... Read More

1K+ Views
What is the Object of a Class? Object stores Key-value pairs of data together. There are numerous methods for producing an object. Some of them will be covered in this post. In this article, we are going to use two different methods to print objects of a class in the go programming language. Method 1: Using a Structure In this method, we will first create some structures and in the main() produce objects out of them. further we will store properties to that objects and print them on the screen. This can be obtained by following Steps. Algorithm Step ... Read More

1K+ Views
In go programming language, there are two types of access modifiers i.e Exported and un-exported. Identifiers that are exported from the package in which they are specified are known as exported identifiers. They always begin with a capital letter. These are only valid in the package in which they are defined. Identifiers that are not exported from any package are referred to as un-exported identifiers that are written in lowercase. Syntax func len(v Type) int The len() function is used to get the length of a any parameter. It takes one parameter as the data type variable whose ... Read More

3K+ Views
In Golang program, a string is a data type that contains literals and characters whereas an object is a data type created from classes by keeping similar types of properties together. In this article, we will look at two methods by which we can convert a string to an object in go programming language. Syntax func Split(str, sep string) []string Split() function is used to split a string through a provided separator. This function is present in strings package and it accepts the string to split as an argument along with a separator. The function then returns the final ... Read More

6K+ Views
In this article, you will understand how to calculate local time in Node.js. The Date object works with dates and times. Date objects are created with new Date(). JavaScript will use the browser's time zone and display a date as a full text string. Node.js is an open-source and cross-platform JavaScript runtime environment.As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. Example 1 In this example, we use the toDateString and toTimeString function const dateTimeObject = new Date(); console.log("A date-time object is created") console.log(`Date: ${dateTimeObject.toDateString()}`); console.log(`Time: ${dateTimeObject.toTimeString()}`); Output A date-time object is created ... Read More

399 Views
In this article, you will understand how optional chaining works in TypeScript. Optional chaining operator (?.) accesses an object’s property. If the objects property is null or not defined, it returns ‘undefined’. Let us first understand what TypeScript is. Strongly typed programming language TypeScript, which is based on JavaScript, gives you better tools at any scale. Code written in TypeScript can be converted to execute in any JavaScript-compatible environment. JavaScript is understood by TypeScript, and type inference is used to provide excellent tooling without the need for additional code. Example 1 In this example, we use the optional chaining operator ... Read More

2K+ Views
C++ is a powerful, high-performance language widely used for system-level programming and applications. At the same time, Node.js is an open-source, cross-platform JavaScript runtime environment commonly used for web applications. By understanding the various methods for communicating JSON data between C++ and Node.js, developers can choose the best approach to their specific needs. In this tutorial, we will explore the various ways to communicate JSON data between a C++ application and a Node.js server. Three common approaches: using a RESTful API, using a message queue, and using a WebSocket Users can follow the steps below to communicate JSON data between ... Read More

251 Views
We will learn to make a get request using the AJAX by making the custom HTTP library. Let’s learn about the Get request and AJAX before we start with the tutorial. The Get request is used to get or fetch data from the API (Application programming interface). The AJAX stands for Asynchronous JavaScript and XML. The AJAX allows us to load or update new data without reloading the webpage. For example, if you have ever worked with ReactJs, it updates the data without reloading the webpage. If we reload the webpage whenever data updates, it can give a bad user ... Read More

2K+ Views
In this tutorial, we will inculcate how to replace a character at a specific index using few examples. The output will be printed on the console using fmt.Println() function. Let’s dive deep into the examples and see how it’s done. Method 1: Using Replace Function In this method, we will learn how to replace a character at a specific index using replace function. The output is printed on console using fmt.Println() function. Let’s understand this through the code. Syntax func Replace(str, oldstr, newstr string, m int) string This function is used to return the copy of the string which ... Read More