Sai Subramanyam has Published 102 Articles

Loop through a hash table using Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 11:01:51

1K+ Views

Now let us create a forEach function that'll allow us to loop over all key-value pairs and call a callback on those values. For this, we just need to loop over each chain in the container and call the callback on the key and value pairs.ExampleforEach(callback) {    // For ... Read More

The HashTable Class in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 10:58:43

93 Views

Here is the complete implementation of the HashTable class. This could of course be improved by using more efficient data structures and collision resolution algorithms.Exampleclass HashTable {    constructor() {       this.container = [];       // Populate the container with empty arrays       // ... Read More

Binary Tree in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 10:54:43

168 Views

Binary Tree is a special data structure used for data storage purposes. A binary tree has a special condition that each node can have a maximum of two children. A binary tree has the benefits of both an ordered array and a linked list as search is as quick as ... Read More

Creating Arrays using Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 07:31:06

134 Views

There are many ways to create an Array in JavaScript. We'll look at how to create an empty array first using 2 methods.let myArr = []; let myArr = new Array();Both of the above lines create an empty array. The JavaScript community always prefers the first method as it is ... Read More

How to use a textarea (a multi-line text input field) in HTML?

Sai Subramanyam

Sai Subramanyam

Updated on 14-May-2020 07:39:04

6K+ Views

To add a multi-line text input, use the HTML tag. You can set the size of a text area using the cols and rows attributes. It is used within a form, to allow users to input text over multiple rows.Here are the attributes of tag −AttributeValueDescriptionautofocusautofocusSpecifies that on ... Read More

Inserting rows to an internal table through debug in SAP ABAP

Sai Subramanyam

Sai Subramanyam

Updated on 12-Mar-2020 12:35:38

2K+ Views

This can be done using any of the below methods −In the Tools window → Navigate to Service menu → you can add a new rowThis can also be done by using T-Code SE11 → Select the relevant table. Navigate to Table Content → DisplayMake sure Debug mode is ON. ... Read More

Source code of ABAP reports without restriction

Sai Subramanyam

Sai Subramanyam

Updated on 14-Feb-2020 08:00:24

319 Views

If you have to use RFC, you can write RFC enabled function module. You can write a new FM that allows you to retrieve program source code. To start with, you need to create a structure as shown in below and based on which you have to create a table ... Read More

How can we create multicolumn UNIQUE indexes?

Sai Subramanyam

Sai Subramanyam

Updated on 28-Jan-2020 06:26:06

56 Views

For creating multicolumn UNIQUE indexes we need to specify an index name on more than one column. Following example will create a multicolumn index named ‘id_fname_lname’ on the columns ‘empid’, ’first_name’, ’last_name’ of ‘employee’ table −mysql> Create UNIQUE INDEX id_fname_lname on employee(empid, first_name, last_name); Query OK, 0 rows affected (0.41 ... Read More

How to create array of strings in Java?

Sai Subramanyam

Sai Subramanyam

Updated on 19-Dec-2019 10:13:26

1K+ Views

In Java, you can create an array just like an object using the new keyword. The syntax of creating an array in Java using new keyword −type[] reference = new type[10];Where, type is the data type of the elements of the array.reference is the reference that holds the array.And, if ... Read More

How to unset a JavaScript variable?

Sai Subramanyam

Sai Subramanyam

Updated on 13-Sep-2019 07:44:06

15K+ Views

To unset a variable in JavaScript, use the undefined. After that, use delete operator to completely remove it.Let’s try the code snippet again.var str = “Demo Text”; window.onscroll = function() {    var y = this.pageYOffset;    if(y > 200) {       document.write(nxt);       nxt = ... Read More

Advertisements