Posts

Showing posts with the label tutorial

‘Sed’ Command In Linux: Useful Applications Explained

Image
Have you ever needed to replace some text in a file really quickly? Then you have to open up your text editor, find the line, and then type out your replacement. What if you have to do that many times? What if it isn’t also exactly the same thing and you have to run multiple searches and replace each occurrence? It gets tedious very quickly, but there’s a better way of doing it with a tool called sed. We’ve written about POSIX and went over some of the interfaces and utilities a system must provide in order to be POSIX compliant. The command line tool sed is one of those utilities that provide a feature-rich way to filter, find, substitute, and rearrange data in texts files. It is an extremely powerful tool that is very easy to get started with, but very difficult to learn through and through due to its seemingly endless number of features. First, we should note that the GNU implementation of sed, while POSIX compliant, goes above and beyond the specification to provide exte...

C# Tutorial for Beginner : Chapter 10 Array 2-Dimension

Image
Introduction An array monitors various snippets of data in single line order, a one-dimensional record list. Notwithstanding, the information related with specific frameworks (an advanced picture, a tabletop game, and so forth.) lives in two measurements. To picture this information, we require a multi-dimensional information structure, that is, a multi-dimensional array. A two-dimensional array is extremely simply an array of arrays (a three-dimensional array is an array of arrays of arrays). The accompanying declaration makes a two-dimensional array of four lines and two segments. float[,] numbers = new float[3, 20]; Example Explanation  To make you more understand to this 2-dimension array, follow this example. Given a 2 dimensional array with size 6x6 as shown below. This array is illustrated with rows and columns. The first dimension is like a line and a second dimension is like a column Array 6 x 6 We focus on the position of the blue array Focusing Ar...

Binary to Decimal Conversion and Vice Versa with Illustration and Example

Image
Introduction Radix is a Latin word for "root". Root can be considered a synonym for base in the arithmetical sense. In mathematical numeral systems, the radix or base is the quantity of one of a kind digits, including zero, used to render to numbers in a positional numeral system. For instance, in the base-10 or decimal number framework (the most well-known framework being used today), there is an aggregate of 10 digits utilized (0,1,2,3,4,5,6,7,8,9), thusly, its radix is 10. In the base-2 or binary number framework (utilized inside by almost all PCs), there are two numbers utilized (0, 1), so its radix is two. Different words that are synonymous with radix are base and root, in a arithmetic sense.  In any standard positional numeral system, a number is traditionally composed as (x) y with x as the series of digits and y as its base, in spite of the fact that for base ten the subscript is normally expected (and discarded, together with the match of enclosures), a...

C# Tutorial for Beginner : Chapter 9 Recursion

Image
Introduction A recursive function is a function which either calls itself or is in a potential loop of function calls. This empowers the function to rehash itself a few times, yielding the outcome and the finish of every iteration. In modern programming languages, if a program enables you to call a function inside a similar function, at that point it is known as a recursive call of the function. Why I mention modern programming language ? It because some old languages do not support recursive. I don't know COBOL does (it unquestionably didn't at one time), however I can't exactly envision anyone minding much either. Fortran 77 does not allow recursion but it is allowed since Fortran 90, yet requires that you utilize the recursive keyword to reveal to it that a subroutine is recursive. PL/I was essentially the same - recursion was bolstered, however you needed to unequivocally let it know what procedures were recursive. I question there are numerous more than that how...

C# Tutorial for Beginner : Chapter 8 Dictionary

Image
Introduction Dictionary in C# is same as language dictionary. Each language dictionary is a collection of words and their definitions, regularly recorded one after another in order in at least one particular dialects. Similarly, the Dictionary in C# is a collection of Keys and Values, where key resembles word and value resembles definition. The key is indistinguishable in a key-value match and it can have at most one value in the dictionary, however a value can be related with a wide range of keys. This class is characterized in the System.Collections.Generic namespace, so you should import or utilizing System.Collections.Generic namespace. Dictionary<TKey, TValue> is a generic collection where TKey means the type of key and TValue is the sort of value. Perhaps you might heard other collection about "List" or "Hashtable" before. Is there the difference between  them ? Of course there is, although "List", "Hashtable", "Dictionary...

C# Tutorial for Beginner : Chapter 7 Single-Dimension Array

Image
Introduction An array keeps a settled size consecutive group of elements of a similar type. An array is utilized to keep a group of information, however it is regularly more valuable to think about an array as an accumulation of variables of a similar type put away at bordering memory areas. Rather than pronouncing singular variable which somehow make your code become messy, for example, value0, value1, ..., until value100, you proclaim one array variable, for example, numbers and utilize value[0], value[1], and ..., value[100] to speak to singular factors. A particular element in an array is gotten to by a record. All arrays comprise of bordering memory areas. The most minimal deliver relates to the first element and the most noteworthy deliver to the last element.Okay, in this post, I will explain single-dimension array. If there single then there must be double or more, right ? Of course there more other type than single-dimension. I will discuss the other in future post. Now,...

C# Tutorial for Beginner : Chapter 6 Looping

Image
INTRODUCTION You can make loops by utilizing the emphasis statements. Emphasis statements make inserted statements be executed various circumstances, subject to the circle end criteria. These statements are executed all together, with the exception of when a bounce explanation is experienced. By utilizing a loop, you can run a statement or a block of statements more than once until the point that a predefined articulation assesses to false. This sort of loop is helpful for emphasizing over arrays and for different applications in which you know ahead of time how often you need the loop to repeat. In C#, they come in 4 distinct variations, and we will observe every last one of them. Before I explain each one of them, let me give you a flowchart followed by code implementation. Then I will give the analysis from the code. Flowchart As you can see, The main method is the blue one. This is simple program which show you basic mathematics operation. Each operation use different typ...

C# Tutorial for Beginner : Chapter 5 Class and Instance

Image
INTRODUCTION  A class resembles a blueprint of particular object. In reality, each object has some shading, shape and functionalities. For instance, the extravagance car Ferrari. Ferrari is an object of the extravagance car compose. The extravagance car is a class that indicate certain trademark like speed, shading, shape, inside and so forth. So any organization that makes a car that meet those necessities is an object of the extravagance car write. For instance, each and every car of BMW, Honda, Porsch are an object of the class called 'Extravagance Car'. Here, 'Extravagance Car' is a class and each and every physical car is an object of the extravagance car class. Image 1. Component of class Class consists of class variables, constructors, and methods. Back again to the example of the car. Every car must have a name like BMW or Honda. In class, this car's name is a variable of the class. The car performs a function that has been designed fro...

C# Tutorial for Beginner : Chapter 4 Decision Making

Image
INTRODUCTION Decision making structures requires the software engineer to indicate at least one conditions to be assessed or tried by the program, alongside a statement or statements to be executed if the condition is resolved to be true, and alternatively, different statements to be executed if the condition is resolved to be false. Following is the general type of a run-of-the-mill decision making structure found in the greater part of the programming language. It can be said this flowchart below depict how “if” statement is works : image 1. if-statemen flowchart I think it is quite clear to understand how “if” statement works. When you set a certain condition like whether a is equal to 0 (a==0) or else is true then piece of code inside if statement will run, otherwise it will not run anything. There are other type of condition statement other that if. There are if-statement which consists of a logical expression followed by one or more lines of code; if-else stateme...