CSS has a mechanism that allows you to set up custom properties and then use them in CSS definitions as if they are variables. For example: /* CSS Variables */ :root { –primary: #fff; –dark: #333; –light: #fff; –shadow: 0 1px 5px rgba(104, 104, 104, 0.8); } When defining CSS variables, there are two syntactical … Continue reading CSS: How to define and use variables
Author: Chris Nielsen
PHP: How to print information about variables, arrays, and objects
To print information about variables, arrays or objects in PHP, we can use the following functions: print_r() var_dump() var_export() print_r( ) According to this explanation on stackoverflow.com, print_r(): Outputs a human-readable representation of any one value Accepts not just strings but other types including arrays and objects, formatting them to be readable Useful when debugging … Continue reading PHP: How to print information about variables, arrays, and objects
PHP: How to output text, variables, and HTML markup using print and echo
In PHP there are two ways to “print” HTML markup, text, and variables, using print and echo. These are essentially interchangeable, though print is slower, so best practice is to use echo. “print” has a return value of 1 (so it can be used in expressions), while “echo” does not. print can take one argument, … Continue reading PHP: How to output text, variables, and HTML markup using print and echo
PHP: How to test your code online
Here are some online web apps that people have written that make it possible to test your PHP code online. write php online http://www.writephponline.com/ PHPTester http://phptester.net/ ideaone.com https://ideone.com/
Python and PHP: A comparison of the language basics
In this table I will compare some basic programming syntax and conventions between the Python and PHP programming languages. Programming element Python PHP Code commenting PHP supports Python and JavaScript conventions # Single line comment “””This is a multi-line comment block. This is a multi-line comment block.””” # Single line comment // Single line comment/*This … Continue reading Python and PHP: A comparison of the language basics
JavaScript: How to use gulp-watch
Assuming Gulp is already installed for your project, and your gulpfile.js file is already created, this article describes how to use the gulp-watch plugin. Here is what tutorialspoint.com says about gulp-watch: The Watch method is used to monitor your source files. When any changes to the source file is made, the watch will run an … Continue reading JavaScript: How to use gulp-watch
JavaScript: How to create Gulp tasks
Once we’ve confirmed that Gulp is installed in our project: JavaScript: How to install Gulp via NPM we are ready to start using Gulp to see what it can do. Step 1: Create a gulpfile.js file In the root directory of our project, we need to create a file called “gulpfile.js”. This file will contain … Continue reading JavaScript: How to create Gulp tasks
JavaScript: How to install Gulp via NPM
Gulp is a Node.js package that acts as a plugin to automate all kinds of web development workflow tasks. According to the official gulp website: gulp is a toolkit for automating painful or time-consuming tasks in your development workflow, so you can stop messing around and build something. To install Gulp, we need to install … Continue reading JavaScript: How to install Gulp via NPM
JavaScript: How to use NPM to install packages
NPM or “npm” stands for Node Package Manager. It is the default package manager for the JavaScript runtime environment Node.js. The NPM program is installed on your computer when you install Node.js. The website npmjs.com contains hundreds of thousands of free open source code packages that can be downloaded and used via npm. Downloading Individual … Continue reading JavaScript: How to use NPM to install packages
JavaScript: Intro to Web Game Development – Part 7: add title screen and settings
As of the previous article, the game can be considered to be in a “complete” state, but I want to add a few features, such as a title screen, some options such as score to win, ball speed, and game colors. I also want to add a link back to the title screen from the … Continue reading JavaScript: Intro to Web Game Development – Part 7: add title screen and settings