Articles on Trending Technologies

Technical articles with clear explanations and examples

modal(options) method in Bootstrap

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 1K+ Views

If you want to set content as a Bootstrap modal, then use the .modal(options) method.For this, use jQuery to set the model on the click of a button as in the following code snippet −$(document).ready(function(){   $("#button1").click(function(){     $("#newModal1").modal({backdrop: true});   }); });Let us now implement the modal(“options”) class. Here, we have two buttons that would generate different types of modals on click. One of them would close on clicking outside the modal, but another one will not close.Here is the complete example −Example Bootstrap Example      Sample   ...

Read More

Compare the content of two StringBuilders

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 2K+ Views

Equals method is used in C# to compare the content of two StringBuilders.The following are our two StringBuilders −// first StringBuilder str1 = new StringBuilder(); str1.Append("Tim"); str1.Append("Tom"); str1.Append("Henry"); // second StringBuilder str2 = new StringBuilder(); str2.Append("John"); str2.Append("David"); str2.Append("Beth");Now use the Equals() method to compare both the methods −if (str1.Equals(str2)) {    Console.WriteLine("Contents are equal!"); }The following is the complete code −Exampleusing System; using System.Text; class Demo {    static void Main() {       // first       StringBuilder str1 = new StringBuilder();       str1.Append("Tim");       str1.Append("Tom");       str1.Append("Henry"); ...

Read More

Align media objects with Bootstrap

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 200 Views

To align media objects, use the .align class in Bootstrap. You can try to run the following code to implement the .align class.Use the .align-left class to align media to the left −Example           Bootstrap Example                                          Google Tag Manager Tutorial                                                                              Introduction                Google Tag Manager (GTM) is a free tool that makes it easy for marketers to add and update website tags.                                

Read More

Remove float from an element in Bootstrap

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 455 Views

Use the float-none class in Bootstrap to remove float from an element.The default for a text is always left; therefore removing float will place the text on the left −You can try to run the following code to remove float from an element −Example       Bootstrap Example                             Demo           This text is on the left (on small screen).       This text is on the left (on medium screen).       This text is on the left (float removed).       This text is on the left (on extra large screen).       This text is on the left (float removed).    

Read More

How to find the product of two binary numbers using C#?

Samual Sam
Samual Sam
Updated on 11-Mar-2026 669 Views

To find the product of two binary numbers, firstly set them.val1 = 11100; val2 = 10001; Console.WriteLine("Binary one: "+val1); Console.WriteLine("Binary two: "+val2);Now loop through to get the product.while (val2 != 0) {    digit = val2 % 10;    if (digit == 1) {       val1 = val1 * factor;       prod = displayMul(val1, prod);    } else    val1 = val1 * factor;    val2 = val2 / 10;    factor = 10; } Console.WriteLine("Product = {0}", prod);Above a method displayMul() is called with the first binary number.static long displayMul (long val1, long val2) ...

Read More

Iterating C# StringBuilder in a foreach loop

Samual Sam
Samual Sam
Updated on 11-Mar-2026 2K+ Views

Firstly, set a string array and StringBuilder −// string array string[] myStr = { "One", "Two", "Three", "Four" }; StringBuilder str = new StringBuilder("We will print now...").AppendLine();Now, use foreach loop to iterate −foreach (string item in myStr) {    str.Append(item).AppendLine(); }The following is the complete code −Exampleusing System; using System.Text; public class Demo {    public static void Main() {       // string array       string[] myStr = { "One", "Two", "Three", "Four" };       StringBuilder str = new StringBuilder("We will print now...").AppendLine();       // foreach loop to append elements ...

Read More

Media object in Bootstrap

Nitya Raut
Nitya Raut
Updated on 11-Mar-2026 194 Views

Use the .media-object class in Bootstrap to set the media object −Example           Bootstrap Example                                          Lolcode Tutorial                                                                              Introduction                LOLCODE is an esoteric programming language inspired by the funny things on the Internet. It is designed to test the boundaries of programming language design.                                

Read More

Stretch a flex item on different screens in Bootstrap 4

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 162 Views

To stretch a flex item on different screens in Bootstrap 4, use the .align-self-*-stretch class.To strect in on different screens, you need to use align-self-sm-stretch, align-self-md-stretch, align-self-lg-stretch, etc. Below is an example for small screen size −   A-one   B-one   C-one   D-one You can try to run the following code to stretch a flex item on different screen sizes −Example       Bootstrap Example                             Align Specific Flex Item and Stretch           A-one       B-one       C-one       D-one       Small Screen Size       A-one     B-one     C-one     D-one     Medium Screen Size         A-one     B-one     C-one     D-one     Large Screen Size         A-one     B-one     C-one     D-one      

Read More

Clear a StringBuilder in C#

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 2K+ Views

To clear a StringBuilder, use the Clear() method.Let’s say we have set the following StringBuilder −string[] myStr = { "One", "Two", "Three", "Four" }; StringBuilder str = new StringBuilder("We will print now...").AppendLine();Now, use the Clear() method to clear the StringBuilder −str.Clear();Let us see the complete code −Exampleusing System; using System.Text; public class Demo {    public static void Main() {       // string array       string[] myStr = { "One", "Two", "Three", "Four" };       StringBuilder str = new StringBuilder("We will print now...").AppendLine();       // foreach loop to append elements ...

Read More

Change the size of Bootstrap input groups

George John
George John
Updated on 11-Mar-2026 2K+ Views

Change the size of the input groups, by adding the relative form sizing classes like .input-group-lg, input-group-sm, input-group-xs to the .input-group itself.You can try to run the following code to change the size of input groups in Bootstrap:Example           Bootstrap Example                                                                   @                                                       @                                                       @                                

Read More
Showing 9811–9820 of 61,248 articles
« Prev 1 980 981 982 983 984 6125 Next »
Advertisements