- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Akhil Sharma has Published 671 Articles
Akhil Sharma
144 Views
In Golang, the functions os.openfile () and ioutil.Writefile() are used to access/open a file in read-write mode without truncating it. In this article, we will understand the functionality of these two functions using two different methods. In the first method we will use the OpenFile() function present in os package ... Read More
Akhil Sharma
2K+ Views
In Golang, we can use OS functions os.OpenFile(), os.Create() and ioutil.WriteFile to open a write-only file. Here we are going to see three different Examples to understand the functionality of these functions. In the first program we will use the OpenFile() function while in the second and third program, we ... Read More
Akhil Sharma
196 Views
In Haskell we can check whether a given number is Armstrong or not using list comprehension and sum function. Armstrong numbers, also known as narcissistic numbers, are numbers such that the sum of the cubes of their digits is equal to the number itself. For example, the number 153 is ... Read More
Akhil Sharma
376 Views
In Haskell, we can check whether a given year is a leap year is not using simple boolean expression. A leap year is a year that has an extra day (February 29th) compared to a normal year. For example, 2004 is a leap year. To determine if a year is ... Read More
Akhil Sharma
134 Views
In Haskell, we will convert Array to Set (HashSet) by using fromList, nub and foldr functions. In the first example, we are going to use ( let set = Set.fromList arr) and in the second example, we are going to use ( let set = nub arr). And ... Read More
Akhil Sharma
261 Views
In Haskell, we will convert File to byte array by using B.readFile function along with fromIntegral and foldl function. In the first example, we are going to use ( let byteArray = B.unpack bytes) and in the second example, we are going to use (let wordArray = map fromIntegral ... Read More
Akhil Sharma
134 Views
In Haskell, we will convert primitive types to objects by using accessor functions along with getName function, constructors and record syntax. In the first example, we are going to use (getName person = name person) and in the second example, we are going to use (getName (Person name _) = ... Read More
Akhil Sharma
166 Views
In haskell we can use mapM, forM as well as recursive function to create a simple right triangle star pattern. What is a Right Triangle Star Pattern? A right triangle pattern is a series of asterisks or other characters arranged in a triangular shape. In the case of a right ... Read More
Akhil Sharma
239 Views
In haskell we can use list comprehension and brute-force method to find the perfect number. What is a Perfect Number? Perfect numbers are positive integers that are equal to the sum of their proper divisors. A divisor of a positive integer n is a positive integer that divides n exactly, ... Read More
Akhil Sharma
401 Views
To check whether a given number is prime or not we are going to use mod function and list comprehension method in Haskell. What is a Prime Number? A prime number is a positive integer greater than 1 that is only divisible by 1 and itself. In other words, a ... Read More