In this CSS Video Tutorial I’ll show you how to layout a whole web page using Cascading Style Sheets. I’ll create headers, content areas, footers and numerous sidebars. I’ll also show you how to make major changes to a website layout with a limited amount of coding.
All of the code used can be found in the article above and also follows the video tutorial. If you have any questions or comments leave them below. You can use the code in any way that you wish.
A while back I did a series of tutorials on MySQL. However, because you guys requested a more example heavy MySQL tutorial I’m now going to provide that.
If you want to check out the previous tutorial I have it in both text and video format here:
In this video, I go over the basics of using MySQL. For example: Creating Tables, Data Types, Entering Information, Deleting Tables and Basic MySQL commands.
If you have any questions or comments leave them below.
In this PHP video tutorial I’ll show you how to work with exception handling.
When an error occurs in your code this code is referred to as an exception. Meaning the code runs fine Except if the user of the code does certain things. When these Exceptions occur an error is thrown and handled by code that lies somewhere else in your code.
I specifically cover the following topics in the video:
# Creates a file descriptor and assigns it to $file
# The second attribute opens the file for read only purposes
# You can access any file online with this same function
# r+ – Read and Write from beginning of file
# w – Write only to beginning of file
# w+ – Delete contents and read and write to file
# a – Write only to the end of the file
# a+ – Read and Write to the end of the file
$file = fopen(“customers.txt”, “r”);
# While the end of file hasn’t been met print lines to screen
while (!feof($file))
{
# fgets() returns all the characters up to a newline or EOF
# You can also specify the number of characters to return in the 2nd attribute
echo fgets($file). “<br />”;
}
echo “<br />”;
# You can also read a file into an array
$customers = file(“customers.txt”);
foreach ($customers as $customer)
{
list($name,$street,$city,$state) = explode(“,”, $customer);
$state = trim($state);
echo “Name: ” . “$name <br />”;
echo “Street: ” . “$street <br />”;
echo “City: ” . “$city <br />”;
echo “State: ” . “$state <br /><br />”;
}
I while back I created my second most popular tutorial of all time on Illustrator CS5s new features. It’s available here by the way Illustrator CS5 Tutorial.
I received a request from Vera to demonstrate how to recreate her wedding invitations. So in the video below I show you how to use the pen tool, how to figure out what font is used in a graphic and a bunch of other things.
The website I use to analyze fonts is called What the Font. The two sites I use most to get free fonts include 1001 Fonts and Da Font.
I also show you how to turn a blurry Jpeg into an EPS file and review everything not covered in the other tutorials in this Illustrator CS5 tutorial.
In this PHP video tutorial I cover Object Oriented Programming with PHP. I specifically go over the following topics:
Encapsulation
Classes
Objects
Public
Private
Constructors
Destructors
__set
__get
And more….
All of the code from the tutorial is available after the video. Use it in anyway that you like. I’ll continue covering OOP with PHP in the next video tutorial in this series.
<?php
# Encapsulation lets you hide the code behind an interface so you can protect the code
# and so your user need not understand the code to use it
# A class is a blueprint you use to create objects
# Objects contain the data (attributes) and actions (methods) needed to perform its tasks
# Inheritance is done when you create a new class from another, thus borrowing the data
# and methods that can be found there.
# Polymorphism allows a class to perform differently based on how it is being used.
# Polymorphism can be used to a certain extent with PHP in that you can use common
# method and attribute names for similar classes
# Any use of this is a reference to a specific object and that objects attributes and methods
class Animal
{
public $name; # Public variables can be accessed directly by anyone
private $age; # Private variables are only accessed by class methods, but not subclasses
protected $money; # Protected is like private except can be accessed by inherited classes
const POUNDID = 12345; # A constants value can never change
# A static attributes value is shared by all objects of the class
# You refer to static attribute like this self::$numOfAnimals, not with $this
private static $numOfAnimals = 0;
public function __construct($age)
{
echo “__construct was called”. “<br />”;
$this->setAge($age);
}
public function __destruct()
{
echo “__destruct was called”. “<br />”;
}
# __set can be used to perform error checking before assigning values to private attribs
function __set($attribName, $attribValue)
{
echo “__set was called for “. $attribName. “<br />”;
$this->$attribName = $attribValue;
}
# __get can be used to perform error checking before returning values from private attribs
function __get($attribName)
{
echo “__get was called for “. $attribName. “<br />”;
return $this->$attribName;
}
public function getAge()
{
return $this->age;
}
public function setAge($sentAge)
{
$this->age = $sentAge;
}
}
$dog = new Animal(8); # Create an object dog of class Animal
$dog->name = “Grover”; # Assign a value to the public attribute name
$dogName = $dog->name; # Retreive value from public attribute name
$dog->setAge(8); # Call the setAge() method for the dog object
$dog->age = 9; # Try to set a private attribute that makes a call to __set
echo $dog->age. “<br />”; # Try to get a private attribute that makes a call to __get
echo “The dogs name is ” . $dogName . “<br />”;
echo “The dogs age is ” . $dog->getAge() . “<br />”;
echo “The pounds ID number is “. $dog::POUNDID. “<br />”;
In part 5 of my Web Design and Programming tutorial I will cover the following topics:
How to turn a string into an array
How to turn an array into a string
How to sort an array
How to pull data from a file and store it in an array
And, I’ll also go over a bunch of other functions specific to arrays. If you missed part 1 of this tutorial it is available here Web Design and Programming.
All of the code in this tutorial will follow the video. Use it in any way that you would like.
If you have any questions or comments leave them below and I’ll answer them.
<?php
# An array is just a big box containing many similar boxes
# This information is similar to each other
# All the the information or values have a coresponding key or label associated with it
# An array can contain any combination of numbers, strings or other arrays
# Create basic array with key value pairs
/* $myInfo = array(“Name” => “Derek”, “Street” => “123 Main St”, “City” => “Pittsburgh”);
# Get the value by calling for the key associated with it
echo “My name is “, $myInfo[“Name”], “<br /><br />”;
$moreInfo = array(“State” => “PA”, “Age” => 35);
# Merge 2 arrays into one
$myInfo = array_merge($myInfo, $moreInfo);
# Iterate through the array with the foreach looping device
foreach( $myInfo as $key => $value)
{
echo $key, ” “, $value, “<br />”;
}
echo “<br /><br />”;
# Search for a key in an array
if(array_key_exists(“Name”, $myInfo)) echo “The name stored is “, $myInfo[“Name”];
echo “<br /><br />”;
# Search for a value in an array
$citySearch = array_search(“Pittsburgh”, $myInfo);
echo “The key for the city is “, $citySearch;
echo “<br /><br />”;
print_r (array_keys($myInfo)); # Short cut to provide the arrays keys
echo “<br /><br />”;
print_r (array_values($myInfo)); # Short cut to provide the arrays keys & values
echo “<br /><br />”;
In this web design and programming video tutorial I’ll show you how to use looping statements with PHP. If you missed the first part of this tutorial it is here Web Design and Programming.
Here I continue covering Web Design and Programming using all of the most used languages being HTML, CSS, JavaScript, PHP, MySQL, etc. If you missed my first video, you should watch that first Web Design and Programming part 1.
In this specific tutorial I’ll cover the following:
I have received tons of requests for tutorials. So, I’ve decided to create a massive tutorial that answers them all. In this tutorial I’ll focus on Web Design and Programming using all of the tools required. You should check out my Learn HTML Tutorial if you haven’t ahead of time.
I’ll continue this tutorial, with your input, until you can do pretty much anything in Web Design and Programming. Leave questions and comments below, because you are going to totally control everything I cover here.
I’ll start off with the basics of PHP and move on from there with tons of examples. Of course, all of the code used will follow the video.
// You can use short tags but it is not recommended doesn’t work in 6
# You can also comment code like this
/* Here is a
multiline comment
*/
echo “<p>Random Text</p>”;
print(“<p>You can print with braces</p>”);
print “<p>or without
them!</p>”;
$randVar = “Cats”;
echo “<p>”, $randVar, ” are funny</p>”;
printf(“<p>My name is %s I’m %d years old and
pi is equal to %.2f</p>”, ‘Derek’, 35, 3.14);
// Variables must start with a $ then letter or _ and then numbers
// Variables are case sensitive & don’t require definition before use
$boolEx1 = false; // 0 or false equals false
$boolEx2 = 1; // true equals any number but 0
Here I continue to teach you how to use the Tkinter GUI module built into Python. I build an application that allows you to input files, edit them and then save them. I specifically show you how to make the following GUI widgets with Tkinter:
Menu Bars
Multi-Line Editable Text Boxes
Drop Down Menus
If you haven’t seen the previous Tkinter tutorial you should definitely check it out below first. Otherwise this won’t make any sense.
In this Python Video Tutorial, I will show you how to create databases using the Python SQLite module. SQLite is great because it:
Provides most of the basic database structure you want
Doesn’t require you to have an actual database server running
Provides SQL querying capabilities
Is included with Python by default
You enter and retrieve information from an SQLite database just like you do with any other database, by using SQL. Here is a tutorial on how to program with SQL if you don’t know how SQL Statements Video Tutorial. In that tutorial I focus on MySQL, but everything a say about SQL is nearly identical.
In this video tutorial on how to use Python, I will focus on how to use an interesting Python Module called Shelve. Shelve allows you to store data in files similar to how a database works. It is very easy to use and provides a convenient way to take advantage of the power of Python dictionaries while providing you with the ability to change the data.
I’ll continue in the next tutorial to cover another interesting Python Module called SQLite. It is a Module that can be used as if it was a database meaning: