Sharon Christine

Sharon Christine

337 Articles Published

Articles by Sharon Christine

Page 12 of 34

Pigeonhole Sort

Sharon Christine
Sharon Christine
Updated on 15-Jun-2020 1K+ Views

This is an example of the non-comparison sorting technique. It is used where the number of items and the range of possible key values is approximately the same.To perform this sort, we need to make some holes. The number of holes needed is decided by the range of numbers. In each hole, items are inserted. Finally deleted from the hole and stored into an array for sorted order.The complexity of Pigeon-Hole Sort TechniqueTime Complexity: O(n+2^k)Space Complexity: O(2^k)Input and OutputInput: The unsorted list: 802 630 20 745 52 300 612 932 78 187 Output: Data before Sorting: 802 630 20 745 ...

Read More

Why formaction attribute is not working outside of <form> tag?

Sharon Christine
Sharon Christine
Updated on 15-Jun-2020 799 Views

We can make the formaction attribute to work outside the tag. The formaction attribute is used to specify more than one submit URLs for one form. When you submit a form, the web browser first checks for a formaction attribute.If the formaction is not present, the web browser moves on to look for an action attribute on the form element.ExampleHere’s an example of the formaction attribute with three different submit buttons −           HTML formaction attribute                                  Button1 ...

Read More

Joining two Arrays in Javascript

Sharon Christine
Sharon Christine
Updated on 15-Jun-2020 316 Views

There are two ways to join 2 arrays in Javascript. If you want to get a new array and not want to disturb the existing arrays while joining the two arrays then you should use the concat method as follows − Examplelet arr1 = [1, 2, 3, 4]; let arr2 = [5, 6, 7, 8]; let arr3 = arr1.concat(arr2); console.log(arr1); console.log(arr2); console.log(arr3);OutputThis will give the output −[1, 2, 3, 4] [5, 6, 7, 8] [1, 2, 3, 4, 5, 6, 7, 8]Note that the existing arrays were not modified. If you want to join in place, you'll need to use the ...

Read More

Searching an element in Javascript Array

Sharon Christine
Sharon Christine
Updated on 15-Jun-2020 599 Views

Javascript provides a collection of functions that you can use to find elements in an array. Let's start with the most basic one. The indexOf function goes through the entire array and returns the index of the element you searched for, if it is found else it returns -1. For example, Examplelet people = ["Harry", "Martha", "John", "Sam"]; console.log(people.indexOf("John")) console.log(people.indexOf("Jim"))OutputThis will give the output −2 -1There are other, more complex functions that you can use to make search more powerful. Let's look at find() method. The find() method returns the first object matching the condition you provide it as the ...

Read More

SAP Associate Level Exam preparation

Sharon Christine
Sharon Christine
Updated on 13-Jun-2020 145 Views

First, let me make your core basics clear.When you are referring to SAP ECC, you are referring to SAP ERP Central Component which is more or less equivalent to the prior SAP R3 System.  ABAP does not play any much part over here.But ABAP resides in the kernel of SAP which is referred to SAP BASIS.Speaking about your pointers for referenceHorst Keller - ABAP objects (For ABAP)Help.SAP.com  - (overall SAP)SAP ECC 6.0 Black book Then there are blogs, Q&A, and other online help always available. You can start from anywhere and when you move along, you will discover online assets as ...

Read More

HTML DOM Input Month step Property

Sharon Christine
Sharon Christine
Updated on 13-Jun-2020 142 Views

The HTML DOM input month step property returns and modify the value of the step attribute of input month field in an HTML document.SyntaxFollowing is the syntax −1. Returning stepobject.step2. Modifying stepobject.step = “number”ExampleLet us see an example of HTML DOM input month step property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.1rem;    }    input{   ...

Read More

Usage of Bootstrap panel-default

Sharon Christine
Sharon Christine
Updated on 12-Jun-2020 235 Views

For a basic panel, add class .panel to the element. With that, add class .panel-default to this element.You can try to run the following code to implement a panel-default classExampleLive Demo           Bootstrap Example                                                       This is demo text in a panel.                    

Read More

HTML DOM Input Button Object

Sharon Christine
Sharon Christine
Updated on 12-Jun-2020 284 Views

The HTML DOM Input Button Object serves as an input HTML element with type attribute as “button”.Let us see how to create an Input Button Object −syntaxFollowing is the syntax −var newButton = document.createElement(“INPUT”); newButton.setAttribute(“type”, ”value”);Here, value can be “button”, “submit” & “reset”.propertiesFollowing are the properties of Input Button Object −PropertyExplanationautofocusThis property returns and alter the value of autofocus attribute of an input button in HTML.defaultValueIt returns and modify the default value of an input button in HTML.disabledIt returns and alter the value of disabled attribute of an input button in HTML.formIt returns the reference of the form which enclose ...

Read More

How to show all the options from a dropdown list with JavaScript?

Sharon Christine
Sharon Christine
Updated on 20-May-2020 5K+ Views

To show all the options from a dropdown list, use the options property. The property allows you to get all the options with length property.ExampleYou can try to run the following code to get all the options from a drop-down list.Live Demo                                 One             Two             Three                                 Click the button to get all the options                function display() {             var a, i, options;             a = document.getElementById("selectNow");             options = "";             for (i = 0; i < a.length; i++) {                options = options + " " + a.options[i].text;             }             document.write("DropDown Options: "+options);          }          

Read More

What does the method fill(obj[], object val) do?

Sharon Christine
Sharon Christine
Updated on 13-Mar-2020 244 Views

The fill(Object[] a, Object val) method of the java.util.Arrays class assigns the specified Object reference to each element of the specified array of Objects.Exampleimport java.util.Arrays; public class ArrayDemo {    public static void main(String[] args) {       Object arr[] = new Object[] {10.5, 5.6, 4.7, 2.9, 9.7};       System.out.println("Actual values: ");       for (Object value : arr) {          System.out.println("Value = " + value);       }       Arrays.fill(arr, 12.2);       System.out.println("New values after using fill() method: ");       for (Object value : arr) {          System.out.println("Value = " + value);       }    } }OutputActual values: Value = 10.5 Value = 5.6 Value = 4.7 Value = 2.9 Value = 9.7 New values after using fill() method: Value = 12.2 Value = 12.2 Value = 12.2 Value = 12.2 Value = 12.2

Read More
Showing 111–120 of 337 articles
« Prev 1 10 11 12 13 14 34 Next »
Advertisements