Found 26504 Articles for Server Side Programming

Bash program to check if the Number is a Prime or not

sudhir sharma
Updated on 13-Nov-2019 11:53:01

19K+ Views

Bash also known as GNU bash is a command language and unix shell script is a command line interpreter for operating system. It was designed by Brian Fox and was a free software which replaced Bourne shell. It first released in 1989 and some became go to for login shell for linux based operating systems like macOS, Linux based softwares, etc.Prime number is a number that has only two factors i.e. the number itself and 1. For example, 2 , 3 , 5, 7 , 11 , 13 , 17 , 19 , 23 , 29….Here we are given a ... Read More

bar() function in C graphics

sudhir sharma
Updated on 13-Nov-2019 11:47:23

2K+ Views

bar() function is a C graphics function that is used to draw graphics in the C programming language. The graphics.h header contains functions that work for drawing graphics. The bar() function is also defined in the header file.Syntaxvoid bar(int left, int top, int right, int bottom );The bar() function is used to draw a bar ( of bar graph) which is a 2-dimensional figure. It is filled rectangular figure. The function takes four arguments that are the coordinates of (X, Y) coordinates of the top-left corner of the bar {left and top } and (X, Y) coordinates of the bottom-right ... Read More

Bands in Radio frequency Spectrum in C program

sudhir sharma
Updated on 13-Nov-2019 11:43:05

622 Views

Radio frequency (RF) is the oscillation of an A.C. current or an A.C. voltage or any other oscillating body in the frequency range of 20KHz to 300 GHz.Radio frequency spectrum of a device is the frequency range that the device can capture, process or repercate. Generally the frequency range is 20Hz to 20KHz.A band is a frequency range that is divided from very low frequency to extremely high frequency. These bands are small ranges of frequency that are used to provide small parts of the spectrum.Bands In Radio Frequency SpectrumFrequency Range is range of continuous that has an upper limit ... Read More

C++ Balanced expressions such that given positions have opening brackets

sudhir sharma
Updated on 13-Nov-2019 11:30:34

254 Views

A balanced expression of parentheses is an expression that contains pairs of all sort of parentheses together in a correct order. this means that for every opening parentheses there is a closing parentheses in proper order of parentheses i.e. { }.Expression − {([][]{})({}[]{})}Output − balancedNow, in this problem we have to create all possiblebalanced expressions from the given number of brackets.And the condition is that the given position have opening brackets.In this problem, we are given an integer n and an array of position of the brackets of length 2n and we have to find the number of balanced expressions ... Read More

C++ Balanced expression with replacement

sudhir sharma
Updated on 09-Jul-2020 05:51:04

404 Views

A balanced expression of parentheses is an expression that contains pairs of all sort of parentheses together in a correct order.this means that for every opening parentheses there is a closing parentheses in proper order of parentheses i.e. { }.let's take a few examples to understand the concept better −Expression − {([][]{})({}[]{})}Output − balancedExplanation − we can see that for every opening parentheses there is a closing parentheses. all the parentheses lying between an opening parentheses and closing parentheses in Pairs.Output − not balanceExplanation − there are some unordered pairs of parentheses which makes the the expression unbalanced.In this problem ... Read More

Balance pans using given weights that are powers of a number in C++ program

sudhir sharma
Updated on 09-Jul-2020 05:51:39

185 Views

STATEMENT − Balance pans using given weights that are powers of a number.DESCRIPTION − In this problem we are given a pan based weighing machine. we are given a weight T and some other weights whose values are powers of a number a. We need to balance the pans using the given weights.Now, based on this we have this equation, T + (some power of a) = (some other power of a)Now, we should remember that there is exactly one weight corresponding to a power value.Example, T = 12 : a = 4Using the below values, we can balance the ... Read More

Bakhshali Approximation for computing square roots in C program

sudhir sharma
Updated on 09-Jul-2020 05:52:06

713 Views

Bakhshali approximation is a method of computing the square root of a number which is not a perfect square. Now, lets brush-related terms to easily understand the concept.Square root of a number x is a number that satisfies the following condition, y2 = x.Perfect Square is a number whose square roots are w. For example 16 is perfect square as its roots are 4 and 4.There are multiple methods defined mathematically to find the square root of a number. In this tutorial, we are going to learn about Bakhshali approximation to find the square root of a number.It is a ... Read More

Introduction to Backtracking

sudhir sharma
Updated on 02-Nov-2023 00:22:40

27K+ Views

Backtracking is a technique based on algorithm to solve problem. It uses recursive calling to find the solution by building a solution step by step increasing values with time. It removes the solutions that doesn't give rise to the solution of the problem based on the constraints given to solve the problem.Backtracking algorithm is applied to some specific types of problems, Decision problem used to find a feasible solution of the problem.Optimisation problem used to find the best solution that can be applied.Enumeration problem used to find the set of all feasible solutions of the problem.In backtracking problem, the algorithm ... Read More

Array Representation Of Binary Heap

sudhir sharma
Updated on 13-Nov-2019 10:20:04

4K+ Views

The complete binary tree that follows the properties of heap ordering is called binary heap.Based on the ordering of binary heap, it can be of two types −min Heap is the heap in which the value of node is greater than or equal to the value of its parent node. The root node of min heap is smallest.max Heap is the heap in which the value of node is smaller than or equal to the value of its parent node. The root node of max heap is greatest.The values of binary heap is typically represented as an array. The array ... Read More

Uri.IsBaseOf(Uri) Method in C#

AmitDiwan
Updated on 13-Nov-2019 07:08:36

164 Views

The Uri.IsBaseOf() method in C# is used to determine whether the current Uri instance is a base of the specified Uri instance.SyntaxFollowing is the syntax −public bool IsBaseOf (Uri uri);Above, the parameter Uri is the specified Uri instance to test.ExampleLet us now see an example to implement the Uri.IsBaseOf() method −using System; public class Demo {    public static void Main(){       Uri newURI1 = new Uri("https://www.tutorialspoint.com/index.htm");       Console.WriteLine("URI = "+newURI1);       Uri newURI2 = new Uri("https://www.tutorialspoint.com/");       Console.WriteLine("URI = "+newURI2);       if(newURI1.Equals(newURI2))          Console.WriteLine("Both the URIs ... Read More

Advertisements