In this C++ video tutorial, we show how to create an empty C++ project in Visual Studio 2019, add a .cpp file to the project, and compile a simple program. These steps will be used at the start of most of the remaining videos, but they will not be repeated.
In this C++ video tutorial, we show how to create an empty C++ project in Visual Studio 2019, add a .cpp file to the project, and compile a simple program. These steps will be used at the start of most of the remaining videos, but they will not be repeated.
The purpose of this lesson is to introduce the concept of arrays and to show the various syntax used for initializing, filling them with data, and then accessing that data from them. An array is object that holds a collection of data items. In PHP, arrays can hold multiple types of data items, unlike some other languages.
This lesson explains how various numerical operations are applied in PHP. These operations include the basic arithmetic operators, the assignment operators, the increment and decrement operators, and the random number generator.
This lesson explains how the various kinds of conditional statements operate in PHP. A conditional is a command that executes a portion of code under certain conditions. The conditional statements that we look at here are the if, else if, else, the ternary operator, and the spaceship operator.
This CSS lesson explains how to position HTML elements via the float and clear properties. Float and clear provide us with a method of positioning that is different from the position property. Here, we will explain how these properties can be used to affect the position of elements.
This lesson presents the basis for programmatic decision making in PHP via boolean expressions. A boolean expression is an expression made up of boolean values that are joined together by logical operators. Those boolean values may be generated by comparisons that performed via comparison operators. Putting comparisons together with logical operators allows us to generate a rich set of operations for programmatic decision making.
This lesson explains the four basic data types of PHP and how their conversions are handled: boolean, int, floating-point, and string. When a variable is displayed inside a string, the value of the variable is automatically converted to a string type. Automatic conversions occur in PHP under other various circumstances, like arithmetic operations, and we must understand how and when those occur. Lastly, we can cause controlled type conversions with type casts.
This lesson describes the four string literals that are used in PHP. These four literals give us different methods for representing strings of characters in a program for the sake of convenience. Some are better for displaying variable names. Some are better for variable values. Finally, some are better for creating strings with quotations inside them.
The purpose of this lesson is to explain how variables are used in PHP. PHP variable names are always preceded by a dollar sign. Variables are not strongly typed, as they are in many other languages. In fact, the type of a variable can be changed at any time to any other type. To help understand how to use variables, PHP provides several functions that are employed in this lesson: gettype(), print_r(), var_dump(), and get_defined_vars().
The purpose of this lesson is to explain how a web server processes PHP to create a web page when one is requested. Before learning PHP, you should have a solid grasp of HTML and CSS; you should watch our HTML and CSS courses if you need to to learn them. Also, you should have XAMPP installed and know how to set up a web server as I did in PHP lesson 0.
The purpose of this tutorial is to demonstrate how to set up the Apache web server to run PHP programs. To follow along with this video, you will need to have XAMPP installed. If you have not already installed XAMPP, follow the directions in our video entitled "How to install XAMPP for PHP" before continuing.
The purpose of this tutorial is to demonstrate how to install XAMPP so that it can be used to run PHP programs. The XAMPP installation contains several components, but the primary one that we are concerned with is the Apache web server which will be used to run PHP programs.
This lesson demonstrates how to position HTML elements via the position property. There are five different values for the position property: static, absolute, relative, fixed, and sticky. This lesson will examine how each of these positioning methods functions.
The last lesson described the CSS box model for HTML elements. This lesson explains how to size the regions of the box model. There is some complexity to this sizing, since we can set the sizes of each side of the box model individually. To allow this flexibility requires some intricacies that will be explained in this lesson.
This video gives a solution to the Putnam 2020 problem of finding the number of natural numbers N such 2020 divides N, N has at most 2020 decimal digits, and the decimal digits are a sequence of ones followed by a sequence of zeros.
This video gives a solution to the Cambridge Interview Problem of finding the max(ab + bc + cd) where a, b, c, and d are natural numbers and a+ b + c + d = 63.
The basis of HTML is elements, each of which is inherently styled via the CSS box model. The box model consists of the content region, a region of padding around the content that forms a space between the content and its border, the border region which provides a frame around the content, and a margin region that provides spacing between the element and all other elements.
When an element is placed on a page and its size is set, it is possible that the content of the element may not fit completely within the element. This frequently happens, especially when a page is resized to display on multiple devices. When the content does not fit within an element, it triggers an overflow condition, which CSS provides several ways to handle via the overflow property.
Sizing elements is the central aspect of HTML page layout. For sizing, we set the CSS width and height properties of an element. CSS offers a variety of unit specifications from pixels to absolute length units. Additionally, CSS allows us to size elements relative to the font size, the screen size, and the size of the parent element.
Colors are one of the most prominent and ubiquitous style properties. They are used for text, backgrounds, borders, and outlines, and are applied to most every HTML element. So, it important that to have a good understanding of color specifications.
Inline styles are the simplest type of styling in CSS, and only allow us to style one element at a time. However, they provide a good introduction to styling and give us a convenient means to clearly define the terms used in CSS styles.
CSS stands for Cascading Style Sheets, and it is used to style HTML content. While HTML defines the content that is displayed, CSS defines how that content is displayed. So, we can think of CSS as a way to modify the appearance of HTML content.
In this development video, we demonstrate how to set a task to run an application at a specific time each day. Tasks can be used to do things that should be done at regular time intervals, like checking for software updates. For simplicity, we use the command prompt application, cmd.exe, as an example program to run each day in our task. We also show how to run the task immediately to verify that it works. Opening the command prompt is not a useful thing to do every day. So, we conclude by showing how to delete the task.
In this HTML lesson, we demonstrate how to use a picture element to vary an image that is displayed based on the conditions in the environment. For example, if the web page is being displayed on a small device, like a phone, we might want to use a small image in the web page. On a full-sized computer screen, we might want to use a larger image. Picture elements allow us to select an image this way. They also provide us with many other properties that we can consider for varying images, like the aspect ratio, color properties, device type, etc. All of these make pages customizable to a wide variety of devices.
In this HTML lesson, we demonstrate how to use HTML, CSS, and JavaScript together to program a space game. The CSS and JavaScript portions are embedded in the head at the top of the code file, while the HTML is in the body at the bottom. We make use of CSS for all of the game animations, and the events and interactivity are programmed in JavaScript. HTML is used to code the static elements of the game. This code ties together the material from previous lessons.
In this HTML lesson, we demonstrate how to use JavaScript in an HTML document. This is an HTML lesson and not a JavaScript lesson. So, we will focus on how to include JavaScript in order that you can recognize it when you see it. JavaScript is a language of its own that we cover elsewhere, and this lesson is meant to give you the ability to recognize JavaScript when you see it in used in HTML.
In this HTML lesson, we demonstrate various methods for using styles in HTML. The subject of styles is beyond the scope of this HTML lesson, and this lesson is not meant to teach CSS styling. Rather it is meant to show how styles can be used so that style code can be recognized when it is seen. To this end, we demonstrate the three basic methods for incorporating styles in HTML: inline with a style attribute, embedded with a style element, and externally with a link element or import.
In this HTML lesson, we demonstrate how to use the figure element. A typical figure consists of an image with a caption below it to provide a description of the image. Although that is what we most often think of as a figure, figures can be many things: images, poetry, paintings, programs, drawings, etc. Anything that is put together with a short description is appropriate for a figure. Semantically, a figure should be tightly bound to the article that it is contained in, unlike an aside element.
In this HTML lesson, we demonstrate how to create a four-in-a-row game in HTML. It is a two-player game where the players take turns placing chips of their own color. If a player gets four of his chips in a line, he wins. Chips are placed by clicking a square once to place a red chip or twice to place a blue chip. The rules can be varied: you can restrict the chip placement to the bottom of a column or allow the players to place them anywhere on the board.
In this HTML lesson, we demonstrate how to encode images in Base64 and embed them into an image element in an HTML document. Ordinary image elements use a file on the local file system or a file at a remote URL as the source for image data. Base64 encoding allows us to include the data for an image directly in an image element so that the image does not rely on an external resource, like a file that is local or at a remote URL. Base64 uses one of 64 characters to represent 6 bits of data or 64 possible values. A conversion program for creating base64 encodings is available on our lesson page.
In this HTML lesson, we demonstrate how to insert SVG into HTML documents. SVG stands for Scalable Vector Graphics, and it is a large topic that we will take up in another series. Here, we only intend to show how SVG can be included in HTML. We show that it can be inserted directly as an element. However, SVG can be saved in its own image file. These files can then be used as a source for an image element, just like any other image file.
In this HTML lesson, we demonstrate how to use the progress and meter elements. The progress element is used to indicate the level of completion of a task. For example, we might use a progress element to indicate the amount of a file that has been uploaded. A meter, on the other hand, is used to measure something that varies over time. We might use a meter to indicate speed, as we do with a speedometer. These two elements are similar, but their purposes are distinct.
In this HTML lesson, we demonstrate the advanced features of HTML tables. First, we introduce the caption element and the rowspan and colspan attributes. Then we show how column groups can be used to style columns and groups of columns of a table. Next, we demonstrate how the thead, tbody, and tfoot elements can be used to style groups of rows. Finally, we put everything together in one table and introduce the scope attribute.
In this HTML lesson, we demonstrate how to use the developer tools to get basic debugging information. We can open the developer tools on any HTML document by pressing the Fn and F12 keys, simultaneously. These tools can help us debug HTML documents by showing the elements of document, along with their associated regions. These regions are the margin, border, padding, and the content region.
In this HTML lesson, we explain how and why elements are taken out of the HTML standard. First, we demonstrate that some deprecated elements remain supported by browsers long after they are deprecated. Typically, deprecated elements are removed for a specific reason, but valid alternative methods remain for achieving a similar effect without the deprecated elements. Additionally, we have elements that are not deprecated, but their usage is merely discouraged: b, i, u, s, and small. These discouraged elements also have more suitable alternatives that are favored in HTML.
In this HTML lesson, we demonstrate how to use the address and time elements, as well as the datetime attribute. We begin with a simple example of an address element. Then we give a few examples to demonstrate how the address element is used to provide contact information about the author or owner of the document. After that, we provide a simple demonstration of the time element. Next, we show how to use the datetime attribute to specify a precise machine-readable time description. Finally, we show that the datetime attribute can be used in the delete and insert elements.
In this HTML lesson, we demonstrate how to encode various types of specialized text. We begin with the abbr and cite elements that are used for abbreviations and citations. Then we add aside and dfn elements. Next, we cover the more eccentric elements: details, summary, and dialog. Finally, we explain the computer-related elements: kbd, code, var, and sample.
In this HTML lesson, we demonstrate how the pre element is used to maintain formatting within text. We begin with a simple example and a comparison between the paragraph and pre elements. Since preformatted text is ideal for programming, we give an example of a C++ program in a pre element and explain the potential pitfalls. Finally, we demonstrate how the other elements can be used within a pre element and show that text in a pre element does not wrap by default.
In this HTML lesson, we demonstrate how to write a tic-tac-toe game using the techniques of our previous lessons. The main HTML file that we have is a set of nine iframe elements that we position with line breaks. Inside the iframes, we place a document for each square that allows us to select an "X" or "O" for the square. These selections are made via an image map. Squares are selected sequentially until the game is over and someone wins.
In this HTML lesson, we demonstrate how to use iframes to embed HTML pages within other HTML pages. We begin with a simple iframe and show how to open our website inside it. Next, we demonstrate how to recursively include a page within itself. Finally, we show how make a recursive inclusion of three pages and use it to demonstrate the target attribute for links.
In this HTML lesson, we demonstrate how to use image maps to link to other images and HTML documents. Image maps allow us to link a region within an image to another image or an HTML document. This is done via the map and area elements. We can even link to other documents with image maps and link back via an image map. There are several different shapes that we can use to to specify links with an image map, and we can use multiple areas within one image map to link to different images or documents.
In this HTML lesson, we demonstrate how to nest lists inside each other. First, we demonstrate the proper format for nesting lists and give an example of nested unordered lists. Next, we show how to nest ordered lists and change their markers to create an outline. Then we give an example of a mixed ordered and unordered nested list. Finally, we give a demonstration of several ways to nest an ordered list inside a definition list.
In this HTML lesson, we demonstrate how to make definition lists. We begin with a basic example of a definition list, where each term element is followed by its description element. Next, we give an example of a list of words with several definitions for each word; this is typical for commonly used words. Then we have a list of technical terms that includes the use of HTML entities. After this, we show the flexibility of definition lists by using one to create a list of concepts and explanations for which we provide some additional formatting. Finally, we use a definition list to represent a list of questions, answers, and citations.
In this HTML lesson, we explain how to use the video element to allow for video playback. The video element is similar to the image and audio elements in that it contains a source attribute, which can designate any location on the internet. There are some simple attributes of the video element, which can be added to enable various features: controls, autoplay, loop, and muted. We also have the width and height attributes to control the size of the video. Lastly, we have the preload attribute, which can be used to preload the video or just the metadata.
In this HTML lesson, we explain how to use the audio element to play sound. The audio element is similar to the image element in that both contain a source attribute, which can come from anywhere on the internet. There are several simple attributes of the audio element, which can be added to enable various features: controls, autoplay, loop, and muted. Lastly, we have the preload attribute, which can be used to preload the video or just the metadata.
In this HTML lesson, we provide guidance on how to comment code and explain the comment element. We begin with a simple example to demonstrate the syntax and show that comments do not appear on the page. Then we are given a small example to show where we might use a comment and compare comments to our other method of hiding content. Next, we give a practical example of how to code a web page with comments and show how to use comments to edit HTML.