Abhinaya has Published 62 Articles

Execute a script when the element is being clicked in HTML?

Abhinaya

Abhinaya

Updated on 03-Mar-2020 12:32:25

2K+ Views

Use the onclick attribute to execute a script when the element is clicked in HTML.ExampleYou can try to run the following code to implement onclick attribute −           Click                      function display() {             document.getElementById("test").innerHTML = "You clicked the button!";          }          

Execute a script when the user opens or closes the
element in HTML?

Abhinaya

Abhinaya

Updated on 03-Mar-2020 06:51:55

85 Views

When a user opens or closes the element, the ontoggle event fires. You can try to run the following code to implement ontoggle event attribute −Example           Details       You need to join office from Feb23                More Information          Timings: 9 to 5:30          Office location: Hyderabad                            function myFunction() {             alert("Timings, office location, etc");          }          

How to display the background color of an element in HTML?

Abhinaya

Abhinaya

Updated on 02-Mar-2020 12:44:56

743 Views

Use the bgcolor attribute in HTML to display the background color of an element. It is used to control the background of an HTML element, specifically page body and table backgrounds.Note − This attribute is not supported in HTML5.ExampleYou can try to run the following code to learn how to implement ... Read More

Why do we use modifiers in C/C++?

Abhinaya

Abhinaya

Updated on 26-Feb-2020 11:17:42

218 Views

A modifier is used to alter the meaning of the base type so that it works in accordance with your needs. For example, time cannot be negative and it makes sense to make it unsigned. C++ allows the char, int, and double data types to have modifiers preceding them. The ... Read More

What does the method trimToSize() do in java?

Abhinaya

Abhinaya

Updated on 20-Feb-2020 12:21:01

99 Views

The trimToSize() method of the java.util.ArrayList class trims the capacity of this ArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an ArrayList instance.Exampleimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String args[]) {       ArrayList ... Read More

What does the method clear() do in java?

Abhinaya

Abhinaya

Updated on 20-Feb-2020 12:15:41

1K+ Views

The clear() method of the class java.util.ArrayList removes all of the elements from this list. The list will be empty after this call returns.Exampleimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) {       ArrayList arrlist = new ArrayList(5);       arrlist.add(20);   ... Read More

How to create and write JSON array to a file in java?

Abhinaya

Abhinaya

Updated on 19-Feb-2020 12:26:38

3K+ Views

Java provides javax.json.Json package which contains classes to read a JSON array:Exampleimport java.io.FileOutputStream; import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonWriter; public class JSONArrayToFile {    public static void main(String args[]) throws Exception {       JsonArray value = Json.createArrayBuilder()          .add(Json.createObjectBuilder()          .add("id", ... Read More

How to divide an array into half in java?

Abhinaya

Abhinaya

Updated on 19-Feb-2020 11:21:36

13K+ Views

Using the copyOfRange() method you can copy an array within a range. This method accepts three parameters, an array that you want to copy, start and end indexes of the range.You split an array using this method by copying the array ranging from 0 to length/2 to one array and length/2 ... Read More

Checking SAP configuration for Plant Maintenance

Abhinaya

Abhinaya

Updated on 18-Feb-2020 05:49:29

794 Views

Plant maintenance (PM) status can be categorized into two status:System status and User status. System status is used by the system for recognizing business transactions for a certain object type. Ideally System status cannot be changed by Users. They are defined by SAP and hence are immutable.Whereas User status relies ... Read More

Missing SAP Java Connector libraries JCo- librfc32.dll, com.sap.utils and com.sap.mw

Abhinaya

Abhinaya

Updated on 13-Feb-2020 12:51:47

193 Views

Please note that all these library files - librfc32.dll, com.sap.utils and com.sap.mw come under JCo 2.1. With release of JCo 3.0, it’s classes were also relocated from packages com.sap.mw.jco.* to com.sap.conn.jco.*For running with SAP JCo 3.0, you need these files at runtime - sapjco3.jar and sapjco3.dll (on Windows). You can ... Read More

Advertisements