Articles on Trending Technologies

Technical articles with clear explanations and examples

Regex in Python to put spaces between words starting with capital letters

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

The problem we are trying to solve here is to convert CamelCase to separate out words. We can solve this directly using regexes by finding all occurrences of a capital letter in the given string and put a space before it. We can use the sub method from the re module.For example, for the input string −AReallyLongVariableNameInJavaWe should get the output −A Really Long Variable Name In JavaWe can use "[A-Z]" regex to find all uppercase letters, then replace them with space and that letter again. We can implement it using the re package as follows −Exampleimport re # ...

Read More

Usage of Bootstrap .btn-group-* class

Arjun Thakur
Arjun Thakur
Updated on 11-Mar-2026 206 Views

To learn the usage of .btn-group-* class, you can try to run the following code:Example           Bootstrap Example                                          One          Two                      Three          Four                      Five          Six          

Read More

Bootstrap progress-bar class

George John
George John
Updated on 11-Mar-2026 309 Views

Use the progress-bar class in Bootstrap to create a progress bar.You can try to run the following code to implement progress-bar class in Bootstrap −Example           Bootstrap Example                                                       70% Complete                    

Read More

Comparison of autoboxed integer object in Java

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

When we assigned an int to Integer object, it is first converted to an Integer Object and then assigned. This process is termed as autoboxing. But there are certain things which you should consider while comparison of such objects using == operator. See the below example first.Examplepublic class Tester {    public static void main(String[] args) {       Integer i1 = new Integer(100);       Integer i2 = 100;               //Scenario 1:       System.out.println("Scenario 1: " + (i1 == i2));       Integer i3 = 100; ...

Read More

Vertical Buttongroup with Bootstrap

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

The btn-group-vertical class makes a set of buttons appear vertically stacked rather than horizontally.You can try to run the following code to work with a vertical button groupExample           Bootstrap Example                                          BCA          B.Tech                                      Masters                span class = "caret">                                        MCA                MBA                M.Tech                M.COM                                

Read More

Create an extra small button group with Bootstrap

Smita Kapse
Smita Kapse
Updated on 11-Mar-2026 332 Views

To create a large button group in Bootstrap, use the .btn-group-xs class.You can try to run the following code to implement the .btn-group-xs class −Example           Bootstrap Example                                 The following are the car brands:                BMW          Audi          Jeep          Datsun          Toyota             The following are FMCG:                ITC Limited          Colgate-Palmolive          Nestle          Britannia Industries Limited          

Read More

Comparison of double and float primitive types in Java

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 838 Views

If we compare a float and a double value with .5 or .0 or .1235 (ending with 5 or 0), then == operator returns true, otherwise it will return false. See the below example.Examplepublic class Tester {    public static void main(String[] args) {       double d1 = 2.5;       float f1 = 2.5f;       System.out.println(d1 == f1);       double d2 = 2.4;       float f2 = 2.4f;       double margin = 0.0000001;       System.out.println(compareNumbers(d2, f2, margin));    }      private static boolean compareNumbers(double d, float f, double margin) {       if(Math.abs(d - f) < margin) {          return true;       }               return false;    } }Outputtrue true

Read More

Compilation and execution of Java Program

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

Let us look at a simple code first that will print the words Hello World.Examplepublic class MyFirstJavaProgram {    /* This is my first java program.        * This will print 'Hello World' as the output        */    public static void main(String []args) {       System.out.println("Hello World"); // prints Hello World    } }Let's look at how to save the file, compile, and run the program. Please follow the subsequent steps −Open notepad and add the code as above.Save the file as: MyFirstJavaProgram.java.Open a command prompt window and go to the ...

Read More

Add dropdown menu to buttons using Bootstrap

Arjun Thakur
Arjun Thakur
Updated on 11-Mar-2026 442 Views

To add a dropdown to a button, simply wrap the button and dropdown menu in a .btn-group.You can try to run the following code to add dropdown menu to buttons −Example           Bootstrap Example                                                       Default                                             Action             Another action             Something else here                         Separated link                                             Primary                                             Action             Another action             Something else here                         Separated link                    

Read More

Bootstrap 4 .card-img-top class

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

Use the card-img-top class in Bootstrap to set the image at the top inside a card −After that add the card and card body −   Swift 4   Learn Swift 4   Begin You can try to run the following code to implement the card-img-top class in Bootstrap 4 −Example       Bootstrap Example                             SWIFT 4 Tutorial     Video Tutorial on Switft 4                         Swift 4         Learn Swift 4         Begin            

Read More
Showing 29811–29820 of 61,297 articles
Advertisements