Anjana has Published 53 Articles

Check if a string contains a number using Java.

Anjana

Anjana

Updated on 06-Sep-2023 14:07:32

37K+ Views

To find whether a given string contains a number, convert it to a character array and find whether each character in the array is a digit using the isDigit() method of the Character class.ExampleLive Demopublic class ContainsExample {    public static void main(String args[]){       String sample = "krishna64"; ... Read More

How to merge table columns in HTML?

Anjana

Anjana

Updated on 02-Sep-2023 13:42:42

50K+ Views

To merge table columns in HTML use the colspan attribute in tag. With this, merge cells with each other. For example, if your table is having 4 rows and 4 columns, then with colspan attribute, you can easily merge 2 or even 3 of the table cells.ExampleYou can try ... Read More

How to create clickable areas in an image in HTML?

Anjana

Anjana

Updated on 22-Dec-2021 11:09:45

7K+ Views

To create clickable areas in an image, create an image map, with clickable areas. For example, on clicking a box, the different website opens and on clicking a triangle in the same image, a different website opens.The tag defines an area inside an image-and nested inside a tag. ... Read More

What is the usage of onreset event in JavaScript?

Anjana

Anjana

Updated on 23-Jun-2020 09:08:43

239 Views

The onreset event is useful when a form is reset. You can try to run the following code to learn how to implement onreset event in JavaScript −Example                    function resetFunct() {             alert("The form was reset");          }                      Enter age:          Enter birth month:                    

Match any string with p at the end of it.

Anjana

Anjana

Updated on 23-Jun-2020 08:40:30

81 Views

To match any string with p at the end of it with JavaScript RegExp, use the p$ Quantifier.Example           JavaScript Regular Expression                        var myStr = "Welcome to our website! Welcome";          var reg = /me$/g;          var match = myStr.match(reg);                    document.write(match);          

Set the day of the month for a specified date according to universal time?

Anjana

Anjana

Updated on 23-Jun-2020 08:17:22

45 Views

JavaScript date setUTCDate() method sets the day of the month for a specified date according to universal time.The following is the parameter for setUTCDate(dayValue) −dayValue − An integer from 1 to 31, representing the day of the month.ExampleYou can try to run the following code to set the day of ... Read More

How can we create MySQL views with column list?

Anjana

Anjana

Updated on 22-Jun-2020 13:06:25

152 Views

As we know that while creating a view, providing the list of columns is optional. But if we are providing the name of the columns while creating the view then the number of names in the list of columns must be the same as the number of columns retrieved by ... Read More

How can we delete an existing MySQL event permanently?

Anjana

Anjana

Updated on 22-Jun-2020 12:26:04

231 Views

We need to use the DROP statement to delete an existing MySQL event permanently. To illustrate it we are deleting the event named testing_event as follows −Examplemysql> DROP EVENT testing_event; Query OK, 0 rows affected (0.00 sec)

How can I use MySQL IN() function to compare row constructors?

Anjana

Anjana

Updated on 22-Jun-2020 06:38:09

67 Views

We can also use IN() function to compare row constructors. Consider the following example to make it clearer −mysql> Select (10,2) IN ((5,10),(10,2),(2,10),(100,100)); +--------------------------------------------+ | (10,2) IN ((5,10),(10,2),(2,10),(100,100)) | +--------------------------------------------+ | 1                                          | +--------------------------------------------+ 1 row in set (0.00 sec) mysql> Select (10,2) IN ((5,10),(2,10),(100,100)); +-------------------------------------+ | (10,2) IN ((5,10),(2,10),(100,100)) | +-------------------------------------+ | 0                                   | +-------------------------------------+ 1 row in set (0.00 sec)

How can we display MySQL bit values in printable form?

Anjana

Anjana

Updated on 22-Jun-2020 05:39:10

46 Views

Actually, Bit values are returned as binary values but we can also display them in the printable form with the help of following −By adding 0We can display Bit values in printable form by adding 0 to them. Following the example from the bit_testing table can be used to understand ... Read More

Advertisements