Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Date Parsing using SimpleDateFormat
The SimpleDateFormat class has parse() method, which tries to parse a string according to the format stored in the given SimpleDateFormat object.Exampleimport java.util.*; import java.text.*; public class DateDemo { public static void main(String args[]) { SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd"); String input = args.length == 0 ? "1818-11-11" : args[0]; System.out.print(input + " Parses as "); Date t; try { t = ft.parse(input); System.out.println(t); } catch (ParseException e) { System.out.println("Unparseable using " + ft); } } }A sample run of the above program would produce the following result −Output1818-11-11 Parses as Wed Nov 11 00:00:00 EST 1818
Read MoreBootstrap active Contextual class
The Bootstrap active contextual class applies hover color to a particular row or cell. You can try to run the following code to implement the active contextual classExample Bootstrap Table Subject Marks Student Maths 90 Amit Science 80 Aman English 85 Rahul
Read MoreDate Formatting Using printf
Date and time formatting can be done very easily using the printf method. You use a two-letter format, starting with t and ending in one of the letters of the table as shown in the following code.Exampleimport java.util.Date; public class DateDemo { public static void main(String args[]) { // Instantiate a Date object Date date = new Date(); // display time and date String str = String.format("Current Date/Time : %tc", date ); System.out.printf(str); } }This will produce the following result ...
Read MoreIndicate a close icon with Bootstrap
To set a close icon in Bootstrap, use the .close class.You can try to run the following code to set a close icon −Example Bootstrap Example Here's the close icon × Close icon
Read MoreUsage of Bootstrap label class
Bootstrap label class is used to add labels such as tips, count, etc.Let us see an example to implement label classExample Bootstrap Example Tools 40 QA 1000
Read MoreBootstrap 4 .card-header-tabs class
Use the card-header-tabs in Bootstrap to style navigation links in card header − Drupal Commerce WooCommerce The header tabs are set on Unordered List using nav-tabs and card-header-tabs class as shown above −Let us see an example to learn how to create Bootstrap 4 card header − Example Bootstrap Example E-commerce Technologies Drupal Commerce WooCommerce Prestashop Shopify Add title here Add content here
Read MoreBootstrap Form Input
The most common form text field is the input field. This is where users will enter most of the essential form data. Bootstrap offers support for all native HTML5 input types: text, password, datetime,datetime-local, date, month, time, week, number, email, url, search, tel, and color. The proper type declaration is required to make Inputs fully styled. You can try to run the following code to learn how to work with form input in BootstrapExample Bootstrap Form Input Player Rank
Read MoreBootstrap .btn-xs class
To create extra small buttons, use the .btn-xs class.You can try to run the following code to implement btn-xs class in Bootstrap −Example Bootstrap Example The following are extra small buttons: Extra small Primary button Extra small button
Read MoreResponsive grid with Bootstrap
To create a responsive grid in Bootstrap, use the .col-*-* class in Bootstrap.In the below example, we have 4 divs −Example Bootstrap Example This is div1. This is div2. This is div3. This is div4.
Read MoreBootstrap .form-control-static class
Use the class .form-control-static on a when you need to place plain text next to a form label within a horizontal form.You can try to run the following code to implement the .form-control-static class −Example Bootstrap Example Email: amit@example.com Password:
Read More