Bootstrap 4 .flex-*-column class

Ricky Barnes
Published on 21-Jul-2018 08:54:15
Use the .flex-*- column class in Bootstrap to show flex items vertically on different screen sizes:Set it vertically on small, medium, large, etc screen size. Let us see it on small and medium screen size:Small Screen Size<p>Flex on different screen size (Small)</p> <div class="d-flex flex-sm-column mb-3">   <div class="p-2 bg-warning">One</div> ... Read More

Display flex items vertically in Bootstrap 4

Kristi Castro
Published on 21-Jul-2018 08:15:55
To display flex items vertically, use the flex-column class in Bootstrap 4 −<div class="d-flex flex-column mb-3">Now set the flex-items in it −<div class="d-flex flex-column mb-3">   <div class="p-2 bg-info">One</div>   <div class="p-2 bg-warning">Two</div>   <div class="p-2 bg-info">Three</div>   <div class="p-2 bg-danger">Four</div>   <div class="p-2 bg-info">Five</div> </div>Let us see an example ... Read More

Bootstrap Event when the modal is about to be hidden

Kristi Castro
Published on 21-Jul-2018 08:13:08
The hide.bs.modal event in Bootstrap fires when the modal is about to be hidden.Firstly, hide the Bootstrap modal on button click −$("#button1").click(function(){   $("#newModal").modal("hide"); });Now, use the hide.bs.modal class and generate the alert when the modal is about to hide on button click −$("#newModal").on('hide.bs.modal', function () {   alert('The modal ... Read More

Bootstrap 4 .border-right-0 class

Kristi Castro
Published on 21-Jul-2018 08:05:25
Use the border-right-0 class in Bootstrap to remove the right border.To remove the right border −<div class="mystyle border border-right-0">   Rectangle is missing the right border. </div>Style the div as −.mystyle {   width: 350px;   height: 170px;   margin: 10px; }You can try to run the following code to ... Read More

Bootstrap 4 .border-primary class

Kristi Castro
Published on 21-Jul-2018 07:59:55
Add a blue border to an element in Bootstrap 4 using the border-primary class as shown below:Set the class as −<div class="demo border border-primary">   Blue Border </div>You can try to run the following code to implement the border-primary class −ExampleLive Demo<!DOCTYPE html> <html lang="en">   <head>     <title>Bootstrap ... Read More

Set a light grey border to an element in Bootstrap 4

Kristi Castro
Published on 21-Jul-2018 07:56:12
To set a light grey border to an element, use the border border-light class in Bootstrap 4.Adding a light border is easy as shown below −<div class="demo border border-light">   This element has light border </div>You can try to run the following code to implement the border-light-class −ExampleLive Demo<!DOCTYPE html> ... Read More

Cloning in Java

Samual Sam
Published on 20-Jul-2018 14:33:42
Object class has a clone method which can be used to copy the values of an object without any side-effect in case instance variables are of primitive types. But in case of instance variables as objects, as only references are copied, side-effect plays its role. This problem can be solved ... Read More

clone() method in Java

karthikeya Boyini
Published on 20-Jul-2018 14:26:37
Java provides an assignment operator to copy the values but no operator to copy the object. Object class has a clone method which can be used to copy the values of an object without any side-effect. Assignment operator has a side-effect that when a reference is assigned to another reference ... Read More

Checking internet connectivity in Java

Samual Sam
Published on 20-Jul-2018 14:20:56
Internet connectivity can be checked using java.net.URL and java.net.URLConnection class. Following are the required steps.Create a URL object and pass it the URL say GoogleCall URL.openConnection() method to get a URLConnection object.Call URLConnection.connect() method to check the internet connectivity. connect() method opens a communications link to the resource referenced by ... Read More

Checked vs Unchecked exceptions in Java

karthikeya Boyini
Published on 20-Jul-2018 13:59:15
Checked exceptionsA checked exception is an exception that occurs at the compile time, these are also called as compile time exceptions. These exceptions cannot simply be ignored at the time of compilation, the programmer should take care of (handle) these exceptions.For example, if you use FileReader class in your program ... Read More
Advertisements