- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Radhakrishna has Published 93 Articles
radhakrishna
707 Views
To calculate the area and perimeter of a circle, you can try to run the following code −Example JavaScript Example function Calculate(r) { this.r = r; ... Read More
radhakrishna
5K+ Views
If you want to allow a user to upload an external file to your website, you need to use a file upload box, also known as a file select box. This is also created using the element but type attribute is set to file.ExampleLive DemoYou can try to run ... Read More
radhakrishna
739 Views
EncapsulationEncapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction.Encapsulation in Java is a mechanism for wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from ... Read More
radhakrishna
958 Views
Method overloading helps to create multiple methods with the same name to do similar action on a different type of parameters.We can use type promotion in case variables are of similar type. Type promotion automatically promotes the lower range value to higher range value. For example, byte variable can be ... Read More
radhakrishna
4K+ Views
Extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time.ExampleYou can try to run the following example to set the expiry date ... Read More
radhakrishna
664 Views
Adding semicolons after every function is optional. To avoid undesirable results, while using functions expressions, use a semicolon.Using semicolonvar display = function () { alert(“Hello World”); }; (function () { // code })();Without using semicolonvar display = function () { alert(“Hello World”); } (function () { // code })();The first function executes immediately since we have used the semicolon.
radhakrishna
934 Views
Python and javascript both have different representations for a dictionary. So you need an intermediate representation in order to pass data between them. The most commonly used intermediate representation is JSON, which is a simple lightweight data-interchange format.The dumps function converts the dict to a string. exampleimport json my_dict = { ... Read More
radhakrishna
653 Views
Use toDataURL() method to get the image data URL of the canvas. It converts the drawing (canvas) into a64 bit encoded PNG URL.ExampleYou can try to run the following code to save the canvas as an image − ... Read More
radhakrishna
56 Views
Use the onprogress attribute to execute a script when the browser is in the process of getting the media data in HTML.ExampleYou can try to run the following code to implement onprogress attribute − Your browser does not support HTML5 video. function display() { alert("Started"); }