Vrundesha Joshi has Published 289 Articles

How to use singleton dialog using synchronized in android?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

282 Views

Before getting into example, we should know what singleton design pattern is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency and creating a central point of access for an application to access its data store.Synchronized means only ... Read More

How to detect integer overflow in C/C++?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

378 Views

The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than either values added. So for example, ... Read More

How to create and release a save point in JDBC?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

959 Views

When you set a save point you define a logical rollback point within a transaction. If an error occurs past a save point, you can use the rollback method to undo either all the changes or only the changes made after the save point.Savepoint interface gives you the additional transactional ... Read More

Regular cast vs. static_cast vs. dynamic_cast in C++ program

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

682 Views

static_cast − This 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_cast − This cast is used for handling polymorphism. You ... Read More

Difference between private, public, and protected inheritance in C++

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

3K+ Views

Data hiding is one of the important features of Object Oriented Programming which allows preventing the functions of a program to access directly the internal representation of a class type. The access restriction to the class members is specified by the labeled access modifiers: public, private, and protected sections within ... Read More

How to concat two or more columns with separator in Android sqlite?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

176 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Plotting Google Map using folium package?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

1K+ Views

Folium is a very powerful python library which let you create seveal kind of Leaflet maps. As Leaflet/folium maps are interactive, so they are ideal for making dashborad building.InstallationInstalling folium is very easy using pip −$pip install foliumLike you can see from the below screenshot, you just need to type ... Read More

How to create a table in JDBC using another table?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

464 Views

You can create a table same as an existing table using the following syntax:CREATE TABLE new_table as SELECT * from old_table;Assume we have a table named dispatches with 5 records as shown below:+-------------+--------------+--------------+--------------+-------+----------------+ | ProductName | CustomerName | DispatchDate | DeliveryTime | Price | Location       | +-------------+--------------+--------------+--------------+-------+----------------+ ... Read More

How to get particular date records from time stamp in Android sqlite?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

712 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Working with PDF files in Python?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

1K+ Views

Python is a very versatile language as it provides huge set of libraries to work on different requirements. We all work on Portable Document Format (PDF) files. Python provides different ways to work with pdf files. In this we are going to use python library called PyPDF2 to work with ... Read More

Advertisements