Processes vs Thread vs Task Differences in C#

A process is a collection of virtual memory space, code, data, and system resources. A thread is code that is to be serially executed within a process. A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread. A process …

HOW TO FIX THE OOM KILLER CRASHES UNDER LINUX

Linux! Linux is great. Linux is Open Source. Any nerd wants to run Linux. But is any part of Linux really that great? This was a good question I wasn’t really able to answer until yesterday. Now I have mixed feelings but understanding the following problem better, gives even a bit more safety, also for …

How to Convert an Array Into a Generic Type in C#

The following are the topics to be exlained in this article: Convert an array to a list Convert list to an array Convert an array to a dictionary Convert dictionary to an array Convert list to a dictionary Convert dictionary to a list Let’s say we have a class called “Student” with three auto-implemented properties. …

MongoDB: Improve Performance With Indexes and Covered Queries

It may look like a trivial and basic necessary task to set up indexes on a MongoDB collection, as we often did so on RDBMS’s such as Oracle or MariaDB/MySQL. MongoDB indexes are often misunderstood and I have experienced many incorrect implementations of indexes. As with other DBMS’s, MongoDB indexes have their own specifications. In this article, I …

Advanced C# Interview Questions and Answers

What is Managed or Unmanaged Code?  Managed Code – The code, which is developed in .NET framework is known as managed code. This code is directly executed by CLR with the help of managed code execution. Any language that is written in .NET Framework is managed code. Unmanaged Code – The code, which is developed outside .NET …

Implement a Dispose method

Implementing the Dispose method is primarily for releasing unmanaged resources. When working with instance members that are IDisposable implementations, it’s common to cascade Dispose calls. Dispose() and Dispose(bool) The IDisposable interface requires the implementation of a single parameterless method, Dispose. Also, any non-sealed class should have an additional Dispose(bool) overload method to be implemented: A public non-virtual (NonInheritable in Visual Basic) IDisposable.Dispose implementation that has no parameters. A protected virtual (Overridable in Visual Basic) Dispose method …

Trie

A trie is a special tree that can compactly store strings. Tries are an extremely special and useful data-structure that are based on the prefix of a string. They are used to represent the “Retrieval” of data and thus the name Trie. Here’s a trie that stores “David”, “Maria”, and “Mario”: supported operations: 1: Insert 2:Search

Topological Sort

1:The topological sort algorithm takes a directed graph and returns an array of the nodes where each node appears before all the nodes it points to. The ordering of the nodes in the array is called a topological ordering. Well, let’s focus on the first node in the topological ordering. That node can’t have any incoming directed edges; it must have an indegree ↴ of zero. Then follow below …

Graph and its representations

A graph is a data structure that consists of the following two components:1. A finite set of vertices also called as nodes. 2: A finite set of order pair from (u,v) called as edge. The following two are the most commonly used representations of a graph.1. Adjacency Matrix ( N *N matrix where N is number of …

Design a site like this with WordPress.com
Get started