AmitDiwan has Published 10740 Articles

How to create and style borders using CSS?

AmitDiwan

AmitDiwan

Updated on 06-Jan-2020 07:41:25

113 Views

We can define borders for an element and style them using CSS. The CSS border property is used to define the border properties for an element. It is a shorthand for border-width, border-style and border-color. Furthermore, images can be specified as a border.SyntaxThe syntax of CSS border property is as ... Read More

CaseFormat Class in Java

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 11:07:50

123 Views

The CaseFormat class is a utility class for converting between various ASCII case formats −Modifier and TypeMethod and DescriptionObjectclone()Overrides Cloneable.booleanequals(Object obj)Overrides equals.String.format(double number)Specialization of format.abstract StringBufferformat(double number, StringBuffer toAppendTo, FieldPosition pos)Specialization of format.Stringformat(long number)Specialization of format.abstract StringBufferformat(long number, StringBuffer toAppendTo, FieldPosition pos)Specialization of format.ExampleLet us now see an example to ... Read More

NumberFormat class in Java

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 11:05:52

2K+ Views

NumberFormat helps you to format and parse numbers for any locale. It is the abstract base class for all number formats.Following are some of the methods of the NumberFormat class−Modifier and TypeMethod and DescriptionObjectclone()Overrides Cloneable.booleanequals(Object obj)Overrides equals.String.format(double number)Specialization of format.abstract StringBufferformat(double number, StringBuffer toAppendTo, FieldPosition pos)Specialization of format.Stringformat(long number)Specialization of ... Read More

Byte Class Fields in Java with example

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 11:00:57

202 Views

The Byte class wraps a value of primitive type byte in an object.Following are the fields for Byte class−static byte MAX_VALUE − This is constant holding the maximum value a byte can have, 27-1.static byte MIN_VALUE − This is constant holding the minimum value a byte can have, -27.static int ... Read More

Byte Class in Java

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 10:57:36

979 Views

The Byte class wraps a value of primitive type byte in an object. An object of type Byte contains a single field whose type is byte.Following are some of the methods of the Byte class −Sr.No.Method & Description1byte byteValue()This method returns the value of this Byte as a byte.2int compareTo(Byte ... Read More

What is the difference between echo, print, and print_r in PHP?

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:40:03

6K+ Views

The print and echo are both language constructs to display strings. The echo has a void return type, whereas print has a return value of 1 so it can be used in expressions. The print_r is used to display human-readable information about a variable.ExampleLet us now see an example that ... Read More

Function Overloading and Overriding in PHP

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:36:33

13K+ Views

Function Overloading in PHPFunction overloading is a feature that permits making creating several methods with a similar name that works differently from one another in the type of the input parameters it accepts as arguments.ExampleLet us now see an example to implement function overloading− Live DemoOutputThis will produce the following output−9.42648Function ... Read More

How to declare a global variable in PHP?

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:25:55

1K+ Views

A global variable can be accessed in any part of the program. However, in order to be modified, a global variable must be explicitly declared to be global in the function in which it is to be modified. This is accomplished, conveniently enough, by placing the keyword GLOBAL in front ... Read More

Comparing two dates in PHP

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:09:34

729 Views

To compare two dates in PHP, the code is as follows. Here, we have used the equality operator to compare dates −Example Live DemoOutputThis will produce the following output−Date1 = 2019-10-30 Date2 = 2019-10-30 Both the dates are equal!ExampleLet us now see another example− Live DemoOutputThis will produce the following output−Date1 = ... Read More

How to convert a date format in MySQL?

AmitDiwan

AmitDiwan

Updated on 02-Jan-2020 06:07:10

582 Views

To convert a date format, use STR_TO_DATE() −mysql> create table DemoTable2010 (    DueDate varchar(20) ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable2010 values('12/10/2019 12:34:00'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable2010 values('12/12/2011 11:00:20'); ... Read More

Advertisements