Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 41 of 81

Generate Fibonacci Series

Chandu yadav
Chandu yadav
Updated on 16-Jun-2020 2K+ Views

The Fibonacci sequence is like this, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ……In this sequence, the nth term is the sum of (n-1)'th and (n-2)'th terms.To generate we can use the recursive approach, but in dynamic programming, the procedure is simpler. It can store all Fibonacci numbers in a table, by using that table it can easily generate the next terms in this sequence.Input and OutputInput: Take the term number as an input. Say it is 10 Output: Enter number of terms: 10 10th fibinacci Terms: 55AlgorithmgenFiboSeries(n)Input: max number of terms.Output − The nth Fibonacci ...

Read More

Fleury’s Algorithm

Chandu yadav
Chandu yadav
Updated on 16-Jun-2020 7K+ Views

Fleury’s Algorithm is used to display the Euler path or Euler circuit from a given graph. In this algorithm, starting from one edge, it tries to move other adjacent vertices by removing the previous vertices. Using this trick, the graph becomes simpler in each step to find the Euler path or circuit.We have to check some rules to get the path or circuit −The graph must be a Euler Graph.When there are two edges, one is bridge, another one is non-bridge, we have to choose non-bridge at first.Choosing of starting vertex is also tricky, we cannot use any vertex as ...

Read More

Bootstrap Grid Structure

Chandu yadav
Chandu yadav
Updated on 12-Jun-2020 381 Views

A Grid Structure in Bootstrap looks like this −Example                                    ... ....

Read More

Bootstrap Grid System Usage

Chandu yadav
Chandu yadav
Updated on 12-Jun-2020 154 Views

Bootstrap Grid System provides the following strategy for structuring content on a web page −ContentDetermine what is most important. LayoutDesign to smaller widths first.Base CSS address mobile device first; media queries address for tablet, desktops.Progressive EnhancementAdd elements as screen size increases.

Read More

How to work with Bootstrap?

Chandu yadav
Chandu yadav
Updated on 12-Jun-2020 201 Views

To work with Bootstrap, the following are the steps − Download the latest version of Bootstrap from the official website.On reaching the page, click on DOWNLOAD for current version 4.1.1You have two options on clicking Download above,Download Bootstrap − Clicking this, you can download the precompiled and minified versions of Bootstrap CSS, JavaScript, and fonts. No documentation or original source code files are included.Download Source − Clicking this, you can get the latest Bootstrap LESS and JavaScript source code directly from GitHub.

Read More

Drawing text to HTML5 <canvas> with @fontface does not work at the first time

Chandu yadav
Chandu yadav
Updated on 01-Jun-2020 548 Views

 Drawing text in a canvas with a typeface that is loaded via @font-face does not show text correctly at first. This is because the browser has not yet loaded the font from network. Therefore, it makes use of the font, which is already available.The font has to be completed loaded before it is used. This can be ensured using tag. If you want to make sure that the font is available and have some other elements preloaded, then you can do this by using the tag as under  You can also load font like this −var newFont = ...

Read More

Get the drive format in C#

Chandu yadav
Chandu yadav
Updated on 06-Apr-2020 359 Views

Use the DriveFormat property to get the drive format in C#.Set the drive for which you want to display the format −DriveInfo dInfo = new DriveInfo("C");Now, use DriveFormat to get the drive format −dInfo.DriveFormatThe drive formats for a windows system can be NTFS or FAT32.Here is the complete code −Exampleusing System; using System.Linq; using System.IO; public class Demo {    public static void Main() {       DriveInfo dInfo = new DriveInfo("C");       Console.WriteLine("Drive Format = "+dInfo.DriveFormat);    } }OutputThe following is the output −Drive Format = NTFS

Read More

CSS pause-after property

Chandu yadav
Chandu yadav
Updated on 16-Mar-2020 96 Views

This property specifies a pause to be observed after speaking an element's content. The possible values are −time − Expresses the pause in absolute time units (seconds and milliseconds).percentage − Refers to the inverse of the value of the speech-rateproperty. For example, if the speech-rate is 120 words per minute (i.e. a word takes half a second, or 500ms), then a pause-after of 100% means a pause of 500 ms and a pause-after of 20% means 100ms.

Read More

Role of media attribute on the LINK element

Chandu yadav
Chandu yadav
Updated on 16-Mar-2020 177 Views

The media attribute on the LINK element specifies the target media of an external style sheet −Example    

Read More

How to identify and print all the perfect numbers in some closed interval [ 2, n ] using Python?

Chandu yadav
Chandu yadav
Updated on 05-Mar-2020 2K+ Views

A perfect number is a positive integer that is equal to the sum of its proper divisors. The smallest perfect number is 6, which is the sum of 1, 2, and 3.You can find perfect numbers within a given range by testing each number for the given condition in the given range. exampledef print_perfect_nums(start, end):    for i in range(start, end + 1):    sum1 = 0    for x in range(1, i):       # Check if a divisor, if it is, add to sum       if(i % x == 0):          sum1 = sum1 + x          if (sum1 == i):             print(i) print_perfect_nums(1, 300)OutputThis will give the output6 28

Read More
Showing 401–410 of 810 articles
« Prev 1 39 40 41 42 43 81 Next »
Advertisements