Daniol Thomas has Published 212 Articles

Arithmetic Operators in C++

Daniol Thomas

Daniol Thomas

Updated on 10-Feb-2020 12:43:03

668 Views

C++ has 5 basic arithematic operators. They are −Addition(+)Subtraction(-)Division(/)Multiplication(*)Modulo(%)ExampleThese operators can operate on any arithmetic operations in C++. Lets have a look at an example −#include using namespace std; main() {    int a = 21;    int b = 10;    int c ;    c = a + b;    cout

What are Boolean Literals in C++?

Daniol Thomas

Daniol Thomas

Updated on 10-Feb-2020 12:10:57

274 Views

Boolean literals are literals that have either the meaning true or false. There are only two Boolean literals in C++: true and false. These literals are of type bool. You can use them as −Example#include using namespace std; int main() {    bool my_bool = true;    if(my_bool) {       cout

How to Get Started with C++ Programming?

Daniol Thomas

Daniol Thomas

Updated on 10-Feb-2020 11:12:51

546 Views

So you've decided to learn how to program in C++ but don't know where to start. Here's a brief overview of how you can get started.Get a C++ CompilerThis is the first step you'd want to do before starting learning to program in C++. There are good free C++ compilers ... Read More

How MySQL evaluates if we export the data to CSV file from a table which contains a NULL value(s)?

Daniol Thomas

Daniol Thomas

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

248 Views

If we export the data from a table having NULL values then MySQL will store \N in CSV file for the record MySQL table having NULL values. It can be illustrated with the help of the following example −ExampleSuppose if we want to export the values of the table ‘student_info’ ... Read More

Update HTML5 canvas rectangle on hover

Daniol Thomas

Daniol Thomas

Updated on 29-Jan-2020 08:09:58

429 Views

To update HTML5 canvas rectangle on hover, try to run the following code:var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d"); context.rect(20,20,150,100); context.stroke(); $(canvas).hover(function(e){    context.fillStyle = blue;    context.fill(); });

Detect compatibility of the new HTML5 tag with jQuery.

Daniol Thomas

Daniol Thomas

Updated on 29-Jan-2020 06:30:38

86 Views

Use the following to check the compatibility of the HTML5 tag :var $myEL = $(''); $myEL.appendTo('body'); var bgColor = $myEL.css('backgroundColor'); if (/rgb\(255\, 255\, 0\)/.test(bgColor))    return true; else    return false;

MediaStream in HTML5

Daniol Thomas

Daniol Thomas

Updated on 28-Jan-2020 08:07:51

244 Views

The MediaStream represents synchronized streams of media. If there is no audio tracks, it returns an empty array and it will check video stream, if webcam connected, stream.getVideoTracks() returns an array of one MediaStreamTrack representing the stream from the webcam.function gotStream(stream) {    window.AudioContext = window.AudioContext || window.webkitAudioContext;    var ... Read More

How to handle mousedown and mouseup with HTML5 Canvas

Daniol Thomas

Daniol Thomas

Updated on 27-Jan-2020 10:52:11

592 Views

To handle the mousedown and mouseup event with HTML5 Canvas,var mouseDown = false; // for mousedown canvas1.onmousedown = function(event){    dragOffset.x = event.x - mainLayer.trans.x;    dragOffset.y = event.y - mainLayer.trans.y;    mouseDown = true; } // for mouseup canvas1.onmouseup = function(event){    if(mouseDown) mouseClick(eevent    mouseDown = false; }

IE supports the HTML5 File API

Daniol Thomas

Daniol Thomas

Updated on 27-Jan-2020 08:07:43

84 Views

IE9 does not support File APIIF10 started supported File APIAn example of that would be drag and drop. Now HTML 5 came up with a Drag and Drop (DnD) API that brings native DnD support to the browser making it much easier to code up.         ... Read More

What is the correct use of schema.org SiteNavigationElement in HTML?

Daniol Thomas

Daniol Thomas

Updated on 27-Jan-2020 07:27:04

500 Views

The schema.org SiteNavigationElement extends WebPageElement. It is used to mark-up links that would make amazing contextual links.                    Home page                              My demo page          

Previous 1 ... 7 8 9 10 11 ... 22 Next
Advertisements