
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 26504 Articles for Server Side Programming

6K+ Views
In Swift, you can open the phone settings page with the click of a button. To open, you can use the UIApplication.shared.open() method. In Swift, you are able to use predefined expressions to open specific screens outside of the app. This predefined expression will help you to open the settings screen from your app. This is a very useful feature in iOS. Here is the Main Function if let url = URL(string:UIApplication.openSettingsURLString) { if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:], completionHandler: nil) } } Here's How This Code ... Read More

515 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

200 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

143 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

219 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

386 Views
In golang we can obtain the hash elements as a sorted array from the hash collection using iteration, sort package as well as slice function. A hash collection contains a hashmap which is used to store items in the form of key value pairs. A hashmap is implemented using a hash function. Syntax func make ([] type, size, capacity) The make function in go language is used to create an array/map it accepts the type of variable to be created, its size and capacity as arguments func append(slice, element_1, element_2…, element_N) []T The append function is used to ... Read More