
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

249 Views
Introduction Let us try to understand the C# program to estimate the size of the file using LINQ. We will be understanding the LINQ (Language Integrated Query) and its methods and classes and how with their help, we will get the desired output. Language Integrated Query aka LINQ is used to generate queries in C# language. Previously we had to use other relational languages like SQL and XML. It provides more power to the C# language or any other .NET language. The syntax used to query the database in LINQ is the same as that of querying for data ... Read More

8K+ Views
Introduction Creating a file and writing in it is the basics of file handling. Here, we are going to discuss a way to write a C# program to create the file and write to the file. File handling or file management in layman's terms the various processes such as making the file, reading from it, writing to it, appending it, and so on. The viewing and writing of files are the two most common operations in file management. Input and output happen due to the streams which provide a generic view of a sequence of bytes. Stream is an ... Read More

2K+ Views
Rankine cycle is the heart of any thermal power plant. A basic Rankine cycle has four processes, viz. reversible adiabatic work interactions in turbine and pump and isobaric heat interactions in boiler and condenser. A schematic of a thermal power plant is shown in the figure given below. To increase the efficiency of a Rankine cycle Regeneration has been used i.e. bleeding steam to turbine and mixing it with feed water in feed water heater. Different processes in the cycle have to be modelled with the help of data from stream tables. Therefore, it becomes very essential to have ... Read More

2K+ Views
When it comes to working with data sequences in Python, tuples are one of the excellent choices due to their immutability and efficiency. Fortunately, Python provides several built-in functions to simplify and speed up working with tuples, especially when you need to access the index of each element in a for-loop. This article will explore two approaches to accessing the index in a tuple for loop: the range() function and the enumerate() function. What is a Tuple in Python? Tuples in Python are a set of immutable elements separated by a comma. For example, consider the following tuple definition − ... Read More

2K+ Views
NumPy Multidimensional Arrays As the name suggests, Multidimensional Arrays are a technique that can be described as a way of defining and storing data in a format that has more than two dimensions (2D). Python allows the implementation of Multidimensional Arrays by nesting a list function inside another list function. Here are some examples on how we can create single and multidimensional arrays in Python using Numpy. Single Dimensional Array Example import numpy as np simple_arr = np.array([0, 1, 2, 3, 4]) print(simple_arr ) Output [0 1 2 3 4] Algorithm Import the NumPy library Use ... Read More

369 Views
In Haskell, we will convert String Value to Byte value by using ord , B.pack and fromNum functions. In the first example, we are going to use (stringToBytes = map ord ) function and in the second example, we are going to call (stringToBytes = B.pack) function. And in the third example, we are going to use (byteList = map fromEnum str) function. Algorithm Step 1 − The Data.Char module is imported. Step 2 − The stringToBytes function is defined using ord function as, Step 3 − The program execution will be started from main function. The main() function ... Read More

261 Views
In Haskell, We can use listArray and toList functions as well as list comprehension to convert set of string to array of string. In the first example, we are going to use (setToArray set = listArray (1, Set.size set) (Set.toList set)) function and in the second example, we are going to call (setToArray set = listArray (1, Set.size set) (toList set)) function directly from the main function. And in the third example, we are going to use (setToArray set = array (1, Set.size set) [(i, x) | (i, x) Array Int String setToArray set = listArray (1, Set.size set) ... Read More

837 Views
Haskell programming has internal functions like fromList, Set.fromList and foldr functions that can be used to convert list to set. In the first example, we are going to use (listToSet = Set.fromList) function and in the second example, we are going to call (set = Set.fromList xs) function directly from the main function. Whereas in third example, we are going to use (listToSet = foldr Set.insert Set.empty) function. Algorithm Step 1 − The qualified Data.Set module is imported. Step 2 − The listToSet function is defined using fromList function as, listToSet = Set.fromList. Step 3 − The program execution ... Read More

736 Views
In Haskell, we will convert List to a Map by using fromList and foldl functions. This can also be done using recursion and pattern matching. In the first example, we are going to use (listToMap xs = Map.fromList xs) function and in the second example, we are going to use (listToMap xs = List.foldl' (\acc (k, v) -> Map.insert k v acc) Map.empty xs) function. In the third example, we are going to use base and recursive case of the recursive function. Algorithm Step 1 − The qualified Data.Map module is imported. Step 2 − The listToMap function is ... Read More

1K+ Views
In Haskell, we will convert String to an Array by using listArray and intersperse functions. In the first example, we are going to use (stringToArray s = listArray (0, length s - 1) s) function and in the second example, we are going to use (stringToArray s = s) function. In the third example, we are going to use (stringToArray s = intersperse ' ' s). Algorithm Step 1 − The stringToArray function is defined Step 2 − The program execution will be started from main function. The main() function has whole control of the program. It is written ... Read More