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 by Samual Sam
Page 86 of 151
Date 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 MoreMove columns to the right with Bootstrap
To move columns to the right, use the .col-*-offset-* class in Bootstrap.You can try to run the following code to implement itExample Bootstrap Example This is div1. This is div2.
Read MoreBootstrap Form Radio Button
Use radio class if you want to limit the user to just one selection i.e. adding radio buttons. Use.radio-inline class to a series of radios for controls appear on the same line.You can try to run the following code to implement Bootstrap Forms radio buttonExample Bootstrap Forms Favourite TV Series Suits House of Cards
Read MoreBootstrap block level help text
Bootstrap form controls can have a block level help text that flows with the inputs. To add a full width block of content, use the .help-block after the .The following example demonstrates thisExample Bootstrap Example Example of Help Text A longer block of help text that breaks onto a new line and may extend beyond one line.
Read MoreSet a pill menu with Bootstrap
To set a pill menu in Bootstrap, use the .nav nav-pills class in BootstrapExample Bootstrap Example Web Development The following are the web dev technologies: HTML5 jQuery JavaScript CSS Ajax ES6
Read MoreSeparate links in the dropdown menu with a thin horizontal border with Bootstrap
Use the .divider class in Bootstrap to separate links in the dropdown menu with a thin borderExample Bootstrap Example Beverages The following are the beverages available in India: Beverages Gatorade Sting Red Bull Pepsi Coca Cola
Read MoreCustomize links using disabled class for unclickable links
You can try to run the following code to customize links using disabled classExample Bootstrap Example Coding Examples The following are the examples: Code1 Code2 Code3 Code4 Code5 ← Prev Next →
Read MoreCopyOnWriteArraySet Class in Java
Class declarationpublic class CopyOnWriteArraySet extends AbstractSet implements SerializableCopyOnWriteArraySet class uses CopyOnWriteArrayList internally for all of its operations and thus possesses the basic properties of CopyOnWriteArrayList.CopyOnWriteArraySet is a thread-safe.CopyOnWriteArraySet is to be used in Thread based environment where read operations are very frequent and update operations are rare.Iterator of CopyOnWriteArraySet will never throw ConcurrentModificationException.Any type of modification to CopyOnWriteArraySet will not reflect during iteration since the iterator was created.Set modification methods like remove, set and add are not supported in the iteration. This method will throw UnsupportedOperationException.CopyOnWriteArraySet MethodsFollowing is the list of important methods available in the CopyOnWriteArraySet class.Sr.No.Method & ...
Read MoreCallback using Interfaces in Java
In the case of Event-driven programming, we pass a reference to a function which will get called when an event occurs. This mechanism is termed as a callback. Java does not support function pointers. So we can not implement the same direction. But using interfaces we can achieve the same very easily.In the example below, we've made a callback when a button is clicked. See the steps −Create an interface ClickEventHandler with a single method handleClick().Create a ClickHandler class which implements this interface ClickEventHandler.Create a Button class which will call ClickHandler when it's click method is called.Test the application.Example//Step 1: ...
Read MoreBootstrap .checkbox-inline class
Use .checkbox-inline class to a series of checkboxes for controls to appear on the same line. You can try to run the following code to implement the .checkbox-inline classExample Bootstrap Forms Best IDE (You can select more than one) NetBeans IDE Eclipse IDE
Read More