 
 Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP 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
Programming Articles - Page 364 of 3366
 
 
			
			565 Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. The matrix in java is nothing but a multi-dimensional array which represents multiple rows and columns. Here we have given a matrix which contains set of elements and as per the problem statement we have to find largest and smallest element in primary and secondary diagonal of a matrix. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1Given matrix = 21 22 23 24 25 26 27 28 29 ... Read More
 
 
			
			433 Views
A circle is a closed shape formed by tracing a point that moves in a plane such that its distance from a given point is constant. In this article we will check how to form the equation of circle from given radius and centre. We will be given a circle with point i.e (x, y), radius r and centre i.e (x1, y1). We need to form the equation of circle from given radius and centre. The equation of the circle is given by formula − $$\mathrm{(x\:-\:x1)^2\:+\:(y\:-\:y1)^2\:=\:r^2}$$ Where, (x, y) is a point. (x1, y1) is centre. And r ... Read More
 
 
			
			531 Views
A memory cache is an element of software or hardware which holds frequently accessed data in a convenient location. A cache is used to improve system performance by reducing the amount of energy it requires to access data. The memory ability establishes how much data a cache can store. While the memory cache is full, some data must be evicted in order to provide a place for new data. Following this, there is the fact that the world is ending. The Least Frequently Used (LFU) cache storage replacement policy is one of these policies. Everything in an LFU cache has ... Read More
 
 
			
			2K+ Views
A synchronization method called Lamport's Bakery method addresses the critical section issue in parallel computing systems. When more than one process needs to utilize a shared resource at once but only one process can do so, this is known as the critical section problem. To avoid conflicts and guarantee the accuracy of the system, the challenge is to make sure that each process uses the resource in a way that is mutually exclusive. Pseudo code for Lamport's Bakery Algorithm Here the Pseudo code for Lamport’s Bakery Algorithm − Initialize an array, called choosing, of size N, where N is ... Read More
 
 
			
			209 Views
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
 
 
			
			2K+ Views
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
 
 
			
			154 Views
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
 
 
			
			228 Views
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
 
 
			
			1K+ Views
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
 
 
			
			1K+ Views
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