Jennifer Nicholas has Published 329 Articles

Why we should avoid using std::endl in C++

Jennifer Nicholas

Jennifer Nicholas

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

576 Views

In this section we will see why we should avoid the std::endl while printing lines into console or a file. We use std::endl for creating a newline after the current line. For few lines of IO operations, it is not making any problems. But for large amount of IO tasks, ... Read More

Program to print hollow pyramid and diamond pattern in C++

Jennifer Nicholas

Jennifer Nicholas

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

5K+ Views

Here we will see how to generate hollow pyramid and diamond patterns using C++. We can generate solid Pyramid patterns very easily. To make it hollow, we have to add some few tricks.Hollow PyramidFor the pyramid at the first line it will print one star, and at the last line ... Read More

Difference between Parcel able and Serializable in android

Jennifer Nicholas

Jennifer Nicholas

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

332 Views

This example demonstrate about Difference between Parcel able and Serializable in androidSerializableSerializable is a markable interface or we can call as empty interface. It doesn’t have any pre-implemented methods. Serializable is going to convert object to byte stream. So user can pass the data between one activity to another activity. ... Read More

How can I make my custom objects Parcelable?

Jennifer Nicholas

Jennifer Nicholas

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

348 Views

This example demonstrates how can I make my custom objects ParcelableStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above ... Read More

How do exceptions work in C++

Jennifer Nicholas

Jennifer Nicholas

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

202 Views

In C++, Exception Handling is a process to handle runtime errors. Exception is an event which is thrown at runtime in C++. All exceptions are derived from std::exception class. It is a runtime error which can be handled. It prints exception message and terminates the program, if we don't handle ... Read More

How to delete a column from an existing table in a database using JDBC API?

Jennifer Nicholas

Jennifer Nicholas

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

606 Views

You can delete a column in a table using the ALTER TABLE command.SyntaxALTER TABLE table_name DROP COLUMN column_name;Assume we have a table named Sales in the database with 7 columns namely id, CustomerName, DispatchDate, DeliveryTime, Price and, Location as shown below:+----+-------------+--------------+--------------+--------------+-------+----------------+ | id | productname | CustomerName | DispatchDate | ... Read More

Data visualization with different Charts in Python?

Jennifer Nicholas

Jennifer Nicholas

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

233 Views

Python provides various easy to use libraries for data visualization. Good thing is that these libraries works with small or large datasets.Some of the most commonly used python libraries for data visualizations are −MatplotlibPandasPlotlySeabornBelow we are going to plot different types of visualization chart for one fixed data to better ... Read More

C++ Program to find Median of Elements where Elements are stored in 2 different arrays

Jennifer Nicholas

Jennifer Nicholas

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

133 Views

We shall consider a C++ program to find the median of elements where elements are stored in 2 different arrays.AlgorithmBegin    Function Median() has Two arrays a1[], a2[] and n = numbers of elements of the array as arguments:    Initialize i and j by 0, and n1 and n2 ... Read More

C++ Program to find the maximum subarray sum O(n^2) time (naive method)

Jennifer Nicholas

Jennifer Nicholas

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

257 Views

We shall develop a C++ program to find the maximum subarray sum O(n^2) time (naive method).AlgorithmBegin    Take the array elements as input.    Make a loop for the length of the sub-array from 1 to n, within this loop,    Make another loop nested with the previous one, calculate ... Read More

C++ Program to Implement Sorted Doubly Linked List

Jennifer Nicholas

Jennifer Nicholas

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

1K+ Views

In data structure Link List is a linear collection of data elements. Each element or node of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. Into a linked list the entry point is ... Read More

Advertisements