Krantik Chavan has Published 278 Articles

What is overloading a unary operator in C++?

Krantik Chavan

Krantik Chavan

Updated on 11-Feb-2020 07:21:47

376 Views

The single operators operate on one quantity and following are the samples of single operators − - The increment ( ) and decrement (--) operators. The compiler distinguishes between the different meanings of an operator by examining the types of its operands.The unary operators operate on a single operand and ... Read More

When should you use 'friend' in C++?

Krantik Chavan

Krantik Chavan

Updated on 11-Feb-2020 04:58:06

303 Views

A friend function of a class is defined outside that class' scope but it has the right to access all private and protected members of the class. Even though the prototypes for friend functions appear in the class definition, friends are not member functions.A friend can be a function, function ... Read More

What are the applications of C++ programming?

Krantik Chavan

Krantik Chavan

Updated on 10-Feb-2020 11:05:19

2K+ Views

C++ is a widely used programming language that is used for writing large-scale commercial applications for end-users. Some of the major applications built using C++ by major software vendors and giants are −Google − Google file system, Google Chromium browser, and MapReduce large cluster data processing are all written in ... Read More

How can we export data to a CSV file along with columns heading as its first line?

Krantik Chavan

Krantik Chavan

Updated on 07-Feb-2020 05:41:38

197 Views

For adding the column values we need to use UNION statement. It can be demonstrated with the help of the following example −ExampleIn this example data from student_info will be exporting to CSV file. The CSV file will have the first line as the name of the columns.mysql>(SELECT 'id', 'Name', ... Read More

HTML5 Canvas Transformation

Krantik Chavan

Krantik Chavan

Updated on 30-Jan-2020 07:07:31

377 Views

HTML5 canvas provides methods that allow modifications directly to the transformation matrix. The transformation matrix must initially be the identity transform. It may then be adjusted using the transformation methods.ExampleLet us see an example of canvas transformation:                    function drawShape(){ ... Read More

Client side validation with HTML and without JavaScript

Krantik Chavan

Krantik Chavan

Updated on 29-Jan-2020 10:53:36

285 Views

To display HTML5 client-side validation error bubbles, use the required attribute.You do not need to have javascript for client side validations like empty text box would never be submitted because HTML5 introduced a new attribute called required which would be used as follows and would insist to have a value: ... Read More

Attributes and usage of

Krantik Chavan

Krantik Chavan

Updated on 29-Jan-2020 08:40:07

840 Views

The HTML5 and tags make it simple to add media to a website. You need to set src attribute to identify the media source and include a controls attribute so the user can play and pause the media.The HTML5 video tag can have a number of attributes to ... Read More

Which punctuation character can be used as the delimiter between MySQL time parts?

Krantik Chavan

Krantik Chavan

Updated on 29-Jan-2020 06:50:19

95 Views

As in the case of date values, MySQL also permits us to use a relaxed format for time. We can use any punctuation character between time parts as a delimiter. Some examples are as follows −mysql> Select timestamp('2017-10-20 04+05+36'); +----------------------------------+ | timestamp('2017-10-20 04+05+36') | +----------------------------------+ | 2017-10-20 04:05:36     ... Read More

Not able to get the value of radio select setting dynamically in AngularJS

Krantik Chavan

Krantik Chavan

Updated on 29-Jan-2020 06:34:33

200 Views

To get the value of radio select, add [$index] to each ng-model like the following: India USThe above would give you the result dynamically in AngularJS.

In MySQL, how can I insert date and time automatically while inserting NULL values to the other columns?

Krantik Chavan

Krantik Chavan

Updated on 29-Jan-2020 05:20:45

916 Views

In MySQL, we can insert current date and time automatically to a column on inserting the NULL values in other columns by declaring that column as DEFAULT CURRENT_TIMESTAMP. In this case, we cannot declare the column NOT NULL in which we want to insert NULL values.mysql> Create Table Testing1(Name Varchar(20), ... Read More

Advertisements