Ankitha Reddy has Published 69 Articles

Set the font variant with CSS

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:22

110 Views

To set the font variant, use the font-variant property. Set the font to small-caps and normal. You can try to run the following code to set the font-variant to small-caps with CSS − This text will be rendered as small caps

Execute a script when a Web Storage area is updated in HTML?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:22

148 Views

Use the onstorage attribute in HTML to execute on Web Storage area update. You can try to run the following code to implement onstorage attribute − Example HTML onstorage Welcome Demo text

How can we add a FOREIGN KEY constraint to the field of an existing MySQL table?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

2K+ Views

We can add a FOREIGN KEY constraint to a column of an existing MySQL table with the help of ALTER TABLE statement. Syntax ALTER TABLE table_name ADD FOREIGN KEY (colum_name) REFERENCES table having Primary Key(column_name); Example Suppose we want to add a FOREIGN KEY constraint on the table ‘Orders1’ referencing ... Read More

How can I fetch the value of REPLACE() function in the column name of our choice?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

115 Views

For fetching the values of REPLACE() function in our choice column name, we need to use the keyword ‘AS’ with REPLACE() function. Example mysql> Select Name, REPLACE(Name, 'G', 'S') AS Name_Changed from student Where Subject = 'Computers'; +--------+--------------+ | Name | Name_Changed | +--------+--------------+ | Gaurav | ... Read More

What does the method listIterator(n) do in java?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

91 Views

The listIterator(int index) method of the java.util.LinkedList class returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list. Example import java.util.*; public class LinkedListDemo { public static void main(String[] args) { ... Read More

Which PHP function is used to create a MySQL table?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

135 Views

PHP uses a mysql_query function to create a MySQL table. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows − Syntax bool mysql_query( sql, connection ); Followings are the parameters used in this function − Sr.No ... Read More

What is the role of filter() method in JavaScript?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

267 Views

JavaScript array filter() method creates a new array with all elements that pass the test implemented by the provided function. The following are the parameters − callback − Function to test each element of the array. thisObject − Object to use as this when executing callback. You can ... Read More

What does the method getFirst() do in java?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

168 Views

The getFirst() method of the class java.util.LinkedList returns the first element of the current list. Example Live Demo import java.util.*; public class LinkedListDemo { public static void main(String[] args) { LinkedList list = new LinkedList(); ... Read More

How to write PHP script to delete data from an existing MySQL table?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

374 Views

We can use the SQL DELETE command with or without the WHERE CLAUSE into the PHP function – mysql_query(). This function will execute the SQL command in a similar way it is executed at the mysql> prompt. To illustrate it we are having the following example − Example In this ... Read More

How to use remove(obj), remove(index), and removeAll() methods in Java list collections?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:21

206 Views

remove(int index) − Removes the element at position index from the invoking list and returns the deleted element. The resulting list is compacted. That is, the indexes of subsequent elements are decremented by one. removeRange(int fromIndex, int toIndex) − Removes all of the elements whose index is between fromIndex, inclusive ... Read More

Advertisements