V Jyothi

V Jyothi

54 Articles Published

Articles by V Jyothi

54 articles

How to specify that the audio/video will start over again, every time it is finished in HTML?

V Jyothi
V Jyothi
Updated on 24-Jun-2020 385 Views

Use the loop attribute to specify that the audio/ video will start over again. You can try to run the following code to implement loop attribute −Example                                        Your browser does not support the video element.          

Read More

When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used in C++?

V Jyothi
V Jyothi
Updated on 23-Jun-2020 4K+ Views

const_castcan be used to remove or add const to a variable. This can be useful if it is necessary to add/remove constness from a variable.static_castThis is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coersion and can also be called explicitly. You should use it in cases like converting float to int, char to int, etc.dynamic_castThis cast is used for handling polymorphism. You only need to use it when you're casting to a derived class. This is exclusively to be used in inheritence when you cast from base class to derived class.reinterpret_castThis is ...

Read More

How to allow long and unbreakable words to be broken and wrap to the next line in JavaScript?

V Jyothi
V Jyothi
Updated on 23-Jun-2020 419 Views

Use the wordWrap property in JavaScript to allow long words to be broken and wrap to the next line.ExampleYou can try to run the following to learn how to work with wordWrap property −                    #box {             width: 150px;             height: 150px;             background-color: lightblue;             border: 1px solid black;          }                     Set                ThisisDemoText.ThisisDemoText.ThisisDemoText.ThisisDemoText.Thisis DemoText.ThisisDemoText.                      function display() {             document.getElementById("box").style.wordWrap = "break-word";          }          

Read More

Which event occurs in JavaScript when an element's content is cut?

V Jyothi
V Jyothi
Updated on 23-Jun-2020 172 Views

The oncut event occurs when an element’s content is cut. You can try to run the following code to learn how to work with an oncut event in JavaScript −Example                          function cutFunction() {             document.write("Text cut!");          }          

Read More

How to add properties and methods to an object in JavaScript?

V Jyothi
V Jyothi
Updated on 23-Jun-2020 288 Views

To add properties and methods to an object in JavaScript, use the prototype property.ExampleYou can try to run the following code to learn how to work with prototype −           JavaScript prototype property                function book(title, author) {             this.title = title;             this.author = author;          }                              var myBook = new book("Amit", "Java");          book.prototype.price = null;          myBook.price = 500;          document.write("Book title is : " + myBook.title + "");          document.write("Book author is : " + myBook.author + "");          document.write("Book price is : " + myBook.price + "");          

Read More

What is the role of special characters in JavaScript Regular Expressions?

V Jyothi
V Jyothi
Updated on 23-Jun-2020 318 Views

The frequency or position of bracketed character sequences and single characters can be denoted by a special character. Each special character has a specific connotation. The +, *, ?, and $ flags all follow a character sequence.Sr.NoExpression & Description1p+It matches any string containing one or more p's.2p*It matches any string containing zero or more p's.3p?It matches any string containing at most one p.4p{N}It matches any string containing a sequence of N p's5p{2, 3}It matches any string containing a sequence of two or three p's.6p{2, }It matches any string containing a sequence of at least two p's.7p$It matches any string with p ...

Read More

How to define custom JavaScript exceptions?

V Jyothi
V Jyothi
Updated on 23-Jun-2020 216 Views

To learn how to define and implement custom JavaScript exceptions, you can try to run the following code −Example                                         Click the following to see the result:                          

Read More

How can I delete MySQL temporary table?

V Jyothi
V Jyothi
Updated on 22-Jun-2020 689 Views

As we know that MySQL temporary table would be deleted if the current session is terminated. But of still in between the session we want to delete the temporary table than with the help of the DROP statement we can delete the temporary table. It can be understood with the help of the following example −ExampleIn this example, we are deleting the temporary table named ‘SalesSummary’ −mysql> DROP TABLE SalesSummary; Query OK, 0 rows affected (0.00 sec)The above query will delete the table and it can be confirmed from the query below −mysql> Select * from SalesSummary; ERROR 1146 (42S02): ...

Read More

How can we match the values having backslashes, like ‘a\\\\b’, from MySQL column?

V Jyothi
V Jyothi
Updated on 22-Jun-2020 893 Views

With the help of an RLIKE operator, we can perform such kind of matching. The only concept is about to use a number of backslashes in MySQL query. The example below will make it clearer −We have the following table having values such as ‘a\b’ and ‘a\b’.mysql> select * from backslashes; +------+-------+ | Id   | Value | +------+-------+ |    1 | 200   | |    2 | 300   | |    4 | a\b  | |    3 | a\b   | +------+-------+ 4 rows in set (0.10 sec)Now suppose if we want to match the ...

Read More

What role data type plays when I insert an empty string into a MySQL column which is declared as NOT NULL?

V Jyothi
V Jyothi
Updated on 22-Jun-2020 231 Views

The representation of an empty string in result set depends on data type when we insert an empty string into a MySQL column which is declared as NOT NULL. As we know that on inserting empty string we are providing value to MySQL that has integer representation as INT 0.Now, if that column is having INTEGER data type then MySQL would show 0 in the result set as that empty string has been mapped to zero as an integer.Examplemysql> create table test(id int NOT NULL, Name Varchar(10)); Query OK, 0 rows affected (0.19 sec) mysql> Insert into test(id, name) ...

Read More
Showing 1–10 of 54 articles
« Prev 1 2 3 4 5 6 Next »
Advertisements