Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Samual Sam
Page 6 of 151
How To Set Up and Configure NFS on Ubuntu 16.04
Network File System (NFS) is a distributed filesystem protocol that allows you to access shared folders from remote systems over a network. NFS enables you to mount remote directories as if they were local, providing a seamless way to share storage space between multiple clients across different locations. To complete this setup, you will need two Ubuntu 16.04 systems with sudo privileges connected via a private network — one acting as the NFS server and another as the NFS client. Installing NFS Server Package On the server machine, install the nfs-kernel-server package which enables directory sharing capabilities. ...
Read MoreHow to Install PlayOnLinux
Wine is a compatibility layer that allows you to run Microsoft Windows applications on Linux and other UNIX-based operating systems (macOS, FreeBSD, Solaris). PlayOnLinux is a graphical frontend for Wine that simplifies the installation and configuration of popular Windows applications and games by automatically setting up Wine environments with the correct settings and dependencies. What is PlayOnLinux PlayOnLinux provides an intuitive interface that eliminates much of the complexity involved in configuring Wine manually. It includes: Automated Scripts − Pre-configured installation scripts for hundreds of Windows applications Multiple Wine Versions − Ability to use different Wine versions ...
Read MoreHow to Install Git on Linux
Git is a popular open-source version control system that tracks changes in files and coordinates work among multiple developers. Unlike traditional version control systems like CVS or SVN, Git uses a distributed model where each developer has a complete copy of the project history. This article covers the basic steps for installing Git on Linux systems, configuring it, and creating your first repository. Git vs Traditional Version Control Systems Traditional version control systems store data as a list of files with changes made to each file over time. Git takes a different approach by thinking of data as ...
Read MoreC# program to find Largest, Smallest, Second Largest, Second Smallest in a List
Finding the largest, smallest, second largest, and second smallest elements in a list is a common programming task in C#. Using LINQ methods like Max(), Min(), OrderBy(), and Skip() provides an elegant solution for these operations. Syntax To find the largest element − list.Max() To find the smallest element − list.Min() To find the second largest element − list.OrderByDescending(x => x).Skip(1).First() To find the second smallest element − list.OrderBy(x => x).Skip(1).First() Using LINQ Methods The most straightforward approach uses LINQ extension ...
Read MoreHow to use C# BinaryWriter class?
The BinaryWriter class in C# is used to write binary data to a stream in a binary format. It is part of the System.IO namespace and provides methods to write primitive data types like integers, strings, doubles, and booleans directly to a stream as binary data. Unlike text-based writing, BinaryWriter stores data in its native binary representation, making it more efficient for storage and faster to read back using BinaryReader. Syntax Following is the syntax for creating a BinaryWriter instance − BinaryWriter writer = new BinaryWriter(stream); Following is the syntax for writing data ...
Read MoreWhat is the difference between virtual and abstract functions in C#?
In C#, both virtual and abstract methods enable polymorphism but serve different purposes. Virtual methods provide a default implementation that can be overridden, while abstract methods have no implementation and must be overridden by derived classes. Understanding the difference between these two concepts is crucial for implementing proper inheritance hierarchies and achieving runtime polymorphism in your applications. Syntax Following is the syntax for declaring a virtual method − public virtual returnType MethodName() { // default implementation } Following is the syntax for declaring an abstract method − ...
Read MoreHow to use C# FileStream class?
The FileStream class in C# provides a stream for file operations such as reading from and writing to files. It is part of the System.IO namespace and allows byte-level access to files on the file system. FileStream is useful when you need direct control over file operations, especially for binary data or when working with large files efficiently. Syntax Following is the basic syntax for creating a FileStream object − FileStream fileStream = new FileStream(path, FileMode, FileAccess); The FileMode parameter specifies how the file should be opened − FileMode.OpenOrCreate // ...
Read MoreC# program to convert an array to an ordinary list with the same items
Converting an array to a list is a common operation in C#. There are several ways to achieve this conversion, from manual iteration to using built-in methods that make the process more efficient and concise. Using Manual Loop The most straightforward approach is to create an empty list and add each array element using a loop − using System; using System.Collections.Generic; public class Program { public static void Main() { int[] arr = { 23, 66, 96, 110 }; var ...
Read MoreC# Object Creation of Inherited Class
In C# inheritance, when creating objects of derived classes, the base class constructor is called first, followed by the derived class constructor. This ensures that the base class is properly initialized before the derived class adds its own functionality. The derived class inherits member variables and methods from the base class. When instantiating a derived class object, you can use the base keyword to explicitly call the base class constructor and pass required parameters. Syntax Following is the syntax for calling a base class constructor from a derived class − public class DerivedClass : BaseClass ...
Read MoreWhat is abstraction in C#?
Abstraction is a fundamental concept in object-oriented programming that focuses on hiding complex implementation details while showing only the essential features of an object. In C#, abstraction allows you to define what an object does without specifying how it does it. Abstraction and encapsulation work together − abstraction defines the interface and essential behavior, while encapsulation hides the internal implementation details from the outside world. Key Concepts of Abstraction Hide complexity − Users interact with simplified interfaces without knowing internal workings Focus on essential features − Only relevant methods and properties are exposed Provide common interface ...
Read More