
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

452 Views
The HashSet, LinkedHashSet and TreeSet are the set interface class mainly used to store the elements. HashSet − A HashSet is a container instance which stores the unique elements only in a non synchronized manner to handle the high-performance operations involving with the set. The set allows the null values which does not follow the order of insertion. LinkedHashSet − The LinkedHashSet is a cloned data structure which have the both facilities of a hashtable and linked list as a set interface. The ordered version of a LinkedHashSet always works as a doubly linked list on over the input elements. TreeSet ... Read More

945 Views
Generally, time is given in hours or minutes or seconds and from the given seconds, we can calculate the number of days, months and years. There are different modules and functions available in python such as datetime, time and divmod() which helps us to calculate the date month and year from seconds. Using Datatime module Datetime module offers classes to manipulate the dates and times. This module provides various functions and methods such as date, time, datetime, timedelta, minyear, maxyear, UTC etc. In the datetime method of datetime module we have the function utcfromtimestamp() which takes the seconds as ... Read More

16K+ Views
Generally, the age of a person is calculated by subtracting the birth year with the current year then the age of the person will be generated in years. In the same way we can calculate the age of a person by using the python modules datetime, dateutil and timedelta. General Calculation of Age in years Current year - Birth year Example In this example we are implementing the general way of calculating the age using pythn language by passing the current year and birth years as the inputs to created function age_calculator() then the total age will be generated ... Read More

3K+ Views
LinkedHashMap is a class that is identical to HashMap, however it additionally provides a feature that tracks the order wherein components are inserted. The sequence wherein elements were added isn't preserved by using HashMap, even though it does permit for quick element insertion, search, and deletion. By keeping a linked list of every entry in the map, LinkedHashMap addresses this issue. The elements are saved in the sequence that they were introduced thanks to this linked list. As a result, while iterating over a LinkedHashMap, the elements are returned according to how they were added. Methods Used To iterate LinkedHashMap ... Read More

2K+ Views
Acceleration, final velocity, initial velocity and time are the terms related to physical science which are widely used to study the motion and mechanics. Let’s see each one in detail. Acceleration Acceleration is the rate at which an object changes its velocity over the given time. It is denoted by a. Mathematically it is defined as the change in velocity divided by the change in time, the following is the formula. The unit of acceleration is meters per second $\mathrm{(m/s^2)}$ $\mathrm{a \:=\:(\Delta;\:vf − \Delta;vi)/\Delta;t}$ Where, $\mathrm{\Delta\:vi}$ is the Initial velocity $\mathrm{\Delta\:vf}$ is the Final velocity $\mathrm{\Delta\:t}$ is the ... Read More

3K+ Views
The HashTable is a fundamental data structure that operates on the basis of key hashcodes without preserving the insertion order. It prohibits duplicate keys but allows for duplicate values. Remarkably, it accommodates a wide range of objects for both keys and values, fostering heterogeneity. Null values for keys and values are not allowed, though, as doing so would cause a RunTimeException called a NullPointerException. The HashTable implements the serializable and cloneable interfaces in terms of interfaces, but it fails to implement the RandomAccess interface. Additionally, all the methods within the HashTable are synchronized, ensuring thread safety for HashTable objects. When ... Read More

307 Views
The LinkedHashMap Class is similar to HashMap. But it has an additional feature in comparison to HashMap. The LinkedList class belongs to the java.util package. A doubly linked list is how LinkedList stores its elements. Given that our operations typically include insertion and deletion, LinkedList is the best option. The java.util package contains the LinkedList collection framework. It acts as an implementation of the non-contiguous LinkedList data structure, which saves elements in memory. Methods Used There are five main methods that you can use for iterating HashMap − Using the for loop Making use of a while loop Using ... Read More

221 Views
In Python profiling is the measure of performance of different parts of a program to check and identify the areas of optimization and bottlenecks. We have many tools to perform profiling for the python code which includes built in modules, libraries and IDEs (Integrated development environments). There are different types of profiling of the python code, let’s see them one by one. Using Line profiling Line profiling is the technique used to measure the execution time of each individual line of the program. It helps us to identify which line is taking more execution time and to identify the tight ... Read More

354 Views
Flask is one of the web frameworks which provide libraries to build light weight web applications in python. It is a micro framework, developed by Armin Ronacher who runs an international group of python enthusiasts (POCCO). Flask works on WSGI toolkit and jinja2 template engines. For creating the profile application using python flask and MySQL we have to follow the below mentioned steps one by one. Step − 1 Install the virtual environment by executing the below mentioned command in the command prompt. pip install virtualenv Once the virtual environment is created we can create the new virtual environment into ... Read More

220 Views
The ProcessPoolExecutor class in python is part of the concurrent.futures module, is a high level interface for asynchronously executing functions using the processes and threads. The ProcessPoolExecutor allows us to execute the multiple functions in parallel using the multiple processes, which is particularly useful to CPU bound tasks that benefit in the parallelization process. Multiprocessing and Multithreading Before going to see about the ProcessPoolExecutor class we have to know about the Multiprocessing and Multithreading. Multiprocessing and Multithreading are the techniques used to achieve the parallelism process and they are different in the way they manage and create concurrent tasks. Multiprocessing ... Read More