- 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
Abhinaya has Published 62 Articles
Abhinaya
151 Views
To remove first array element, use the JavaScript shift() method. JavaScript array shift() method removes the first element from an array and returns that element.ExampleYou can try to run the following code to remove first array element and return it −Live Demo JavaScript Array shift Method ... Read More
Abhinaya
2K+ Views
You can plot complex numbers on a polar plot. If you have an array of complex numbers, you can plot it using:import matplotlib.pyplot as plt import numpy as np cnums = np.arange(5) + 1j * np.arange(6, 11) X = [x.real for x in cnums] Y = [x.imag for x ... Read More
Abhinaya
1K+ Views
Java provides a ByteBuffer class which allows you to wrap an array into a byte buffer using its wrap() method. Once you did that you can replace the contents of the buffer using the position(): To select the starting position and, put(): To replace the data methods:ExampleLive Demoimport java.nio.ByteBuffer; public ... Read More
Abhinaya
67 Views
defaultThis came to handle function parameters with ease. Easily set Default parameters to allow initializing formal parameters with default values. This is possible only if no value or undefined is passed. Let’s see an exampleExampleLive Demo // default is set ... Read More
Abhinaya
54 Views
When an event is triggered, the screenY mouse event returns the vertical coordinate of the mouse pointer.ExampleYou can try to run the following code to learn how to implement screenY Mouse event in JavaScript. Click here to get the x (horizontal) and y (vertical) ... Read More
Abhinaya
199 Views
The onfocusin event triggers when an element is to lose focus. You can try to run the following code to learn how to implement onfocusout event in JavaScript.Example Write below: After losing focus, the background color of input check will change. function newFunc(x) { x.style.background = "blue"; }
Abhinaya
177 Views
If both the bits are different, then 1 is returned when Bitwise OR (|) operator is used.ExampleYou can try to run the following code to learn how to work with JavaScript Bitwise XOR Operator. document.write("Bitwise XOR Operator"); // 7 = 00000000000000000000000000000111 // 1 = 00000000000000000000000000000001 document.write(7 ^ 1);
Abhinaya
2K+ Views
You can generate these just random 128-bit strings using the random module's getrandbits function that accepts a number of bits as an argument. exampleimport random hash = random.getrandbits(128) print(hex(hash))OutputThis will give the output −0xa3fa6d97f4807e145b37451fc344e58c
Abhinaya
1K+ Views
To generate XML from a python dictionary, you need to install the dicttoxml package. You can install it using −$ pip install dicttoxmlOnce installed, you can use the dicttoxml method to create the xml. examplea = { 'foo': 45, 'bar': { 'baz': "Hello" } } ... Read More
Abhinaya
959 Views
If you want to convert a statement like −if : to a single line, You can use the single line if syntax to do so −if : Another way to do this is leveraging the short-circuiting and operator like − and If is false, then short-circuiting will kick ... Read More