Sreemaha has Published 68 Articles

Execute a script when the media is ready to start playing in HTML?

Sreemaha

Sreemaha

Updated on 30-May-2020 22:50:00

102 Views

Use the oncanplay attribute to define when an audio/ video is ready to start playing.ExampleYou can try to run the following code to learn how to execute a script when the media is ready to start playing −                       ... Read More

HTML 5 local Storage size limit for sub domains

Sreemaha

Sreemaha

Updated on 04-Mar-2020 04:57:24

412 Views

HTML5's localStorage databases are size-limited. The standard sizes are 5 or 10 MB per domain. A limit of 5 MB per origin is recommended.The following is stated −User agents should guard against sites storing data under their origin's other affiliated sites, e.g. storing up to the limit in a1.example.com, a2.example.com, ... Read More

How to set the audio output of the video to mute in HTML?

Sreemaha

Sreemaha

Updated on 03-Mar-2020 10:27:59

314 Views

Use the muted attribute to set the audio output of the video to mute. You can try to run the following code to implement muted attribute −Example                                        Your browser does not support the video element.          

How to specify the URL of the resource to be used by the object in HTML?

Sreemaha

Sreemaha

Updated on 03-Mar-2020 09:40:41

89 Views

Use the data attribute in HTML to specify the URL of the resource to be used by the object in HTML.ExampleYou can try to run the following code to implement the data attribute −           Demonstration                

How to remove an element from an array in Java

Sreemaha

Sreemaha

Updated on 24-Feb-2020 11:11:49

839 Views

Following example shows how to remove an element from array. Exampleimport java.util.ArrayList; public class Main {    public static void main(String[] args) {       ArrayList objArray = new ArrayList();       objArray.clear();       objArray.add(0, "0th element");       objArray.add(1, "1st element");       objArray.add(2, ... Read More

Why is char[] preferred over String for storing passwords?

Sreemaha

Sreemaha

Updated on 24-Feb-2020 10:31:39

129 Views

Yes, Storing password in String object is not safe for following reasons −String objects are immutable and until garbage collected, they remain in memory.String being plain text can be tracked in memory dump of the application.In log, String based password may be printed which can cause a problem.Char[] can be ... Read More

The most elegant ways to iterate the words of a java string.

Sreemaha

Sreemaha

Updated on 24-Feb-2020 10:25:38

2K+ Views

Just split the string based on space and then iterate it. See the example below −Examplepublic class Tester {    public static void main(String[] args) {       String test = "I love learning Java";       String[] subStrings = test.split(" ");       for(String subString: subStrings) {          System.out.println(subString);       }    } }OutputI love learning Java

How to declare a constructor in Java?

Sreemaha

Sreemaha

Updated on 19-Feb-2020 07:16:09

1K+ Views

While declaring the constructors you should keep the following points in mind.A constructor does not have a return type.The name of the constructor is same as the name of the class. A class can have more than one constructor.Examplepublic class Sample {    int num;    public Sample() {     ... Read More

Getting month name instead of numeric month number in report in SAP

Sreemaha

Sreemaha

Updated on 13-Feb-2020 12:37:25

2K+ Views

There are various methods this can be donea) Use the Function module MONTH_NAME_GET - This Function module is used to return all the month and names in the respective language.b) You can also use the below formula −cstr(monthname(month({inputdate})))where “inputdate” is the date for which month name is required.c) Find the ... Read More

Query MDG tables via SAP Studio

Sreemaha

Sreemaha

Updated on 13-Feb-2020 12:22:25

207 Views

An answer to your question is a big “YES”. You can execute queries against the tables either if you are using an ABAP program or also you can execute these queries from native SQL environment.For E.g.DATA: lt_TBL LIKE TABLE OF KNA1. SELECT * from KNA1 INTO lt_TBL up to 5 ... Read More

Advertisements