Karthikeya Boyini has Published 2383 Articles

NavigableMap clear() Method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 07:23:12

88 Views

Clear the NavigableMap in Java, using the clear() method.Let us first create a NavigableMap and add some elements to it −NavigableMap n = new TreeMap(); n.put(5, "Tom"); n.put(9, "John"); n.put(14, "Jamie"); n.put(1, "Tim"); n.put(4, "Jackie"); n.put(15, "Kurt"); n.put(19, "Tiger"); n.put(24, "Jacob");Now, use the clear() method −n.clear();The following is an example ... Read More

Animate box-shadow CSS property

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 07:21:46

937 Views

To implement animation on box-shadow property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 200px;             height: 300px;             background: yellow;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;          }          @keyframes myanim {             20% {                bottom: 100px;                box-shadow: 30px 45px 70px orange;             }          }                     Performing Animation on box-shadow          

Count the number of elements in a HashSet in Java

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 07:21:19

3K+ Views

To count the number of elements in a HashSet, use the size() method.Create HashSet −String strArr[] = { "P", "Q", "R" }; Set s = new HashSet(Arrays.asList(strArr));Let us now count the number of elements in the above Set −s.size()The following is an example to count the number of elements in ... Read More

How can I make a div with irregular shapes with CSS3 and HTM5?

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 07:17:00

449 Views

With CSS3, you can always create shapes like rectangle, triangle, etc.Let us see how −The following is a rectangle −#shape1 {    width: 300px;    height: 150px;    background: blue; }The following is a triangle −#shape2 {    width: 0;    height: 0;    border-left: 200px solid transparent;    border-bottom: 200px solid blue; }

How to draw a 3D sphere in HTML5?

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 06:45:24

532 Views

To create a 3D sphere, use the HTML5 canvas. You can use the following function in your code:function display(r) {    this.point = new Array();    this.color = "blue)"    this.r = (typeof(r) == "undefined") ? 20.0 : r;    this.r = (typeof(r) != "number") ? 20.0 : r;    this.vertexes = 0;    for(alpha = 0; alpha

Cross-origin data in HTML5 Canvas

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 06:39:27

266 Views

For cross-origin data in canvas, add the following attribute to the

How can I use Web Workers in HTML5?

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 06:33:56

110 Views

Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions and allows long tasks to be executed without yielding to keep the page responsive.Web Workers are background scripts and they are relatively heavyweight and are not intended to be used ... Read More

Is it possible to validate the size and type of input=file in HTML5?

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 06:26:06

230 Views

Yes, it is possible to validate the size and type of input type = “file”. Use jQuery to get the desired result −                                               ... Read More

Render ASP.NET TextBox as HTML5 Input type “Number”

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 06:07:18

981 Views

To render ASP.NET TextBox as HTML5 input type “Number”, set type="number" directly on the textbox.Let us see an example of ASP.NET TextBox −You can also use the following dynamically created the control −TextBox tb = new TextBox(); tb.Attributes.Add("Type", "number");

How to change date time format in HTML5?

karthikeya Boyini

karthikeya Boyini

Updated on 24-Jun-2020 13:53:24

3K+ Views

The date-time format can be changed by using custom HTML5 elements. If we wish to change or override existing Html tags then we can do so with the help of shadow DOM.We can make customizable tags like −Here is an example −However, E10 and older versions do not support customizable ... Read More

Advertisements