In this part of my Java Video Tutorial I cover Java Exception handling. An exception is an object created when an error occurs.
I explain in this video the difference between run time and checked exceptions. I show you how to use try, catch and finally. We review the most common errors you will come across. I show you how to catch all and ignore individual exceptions. Yes, everything Java Exception wise will be covered.
I received many requests recently on how to display related posts on a WordPress site. The code I present in the video below will grab as many related posts as you want and display them in your WordPress post.
The code grabs related posts based off of them being in the same category. It will also work if you have a post in multiple categories.
I could have picked the related posts based off of tags, but I thought categories made more sense.
In my previous WordPress Theme Tutorial I showed you all the HTML that goes into a WordPress Theme.
In this part of the video tutorial I’ll show you all of the CSS code that you need to style the theme. If you don’t understand CSS check out this CSS Layout Tutorial. You can also learn more about the menu used here CSS Layouts and Menu Tutorial.
All of the code I use is also available either for download and it also follows the video below. Here is the code:
In this part of the WordPress Theme Tutorial I show you all of the HTML that is needed to create a WordPress Theme.
When you create a WordPress Theme you basically create a template made up from HTML, CSS and JavaScript and then pull in all of your content using PHP code. You also need a MySQL database of course.
If you don’t know anything about the above subjects you can click the link that applies to learn more about them.
It’s not very often that I make a video tutorial that I really love, but I think I did it today!
In this video tutorial I show you everything that goes into making a full website design with a Horizontal Menu.
I not only show you everything, I try to do it using the least amount of code possible. In doing that I think you will be able to easily make your own web designs.
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.
Anna wrote in and asked me to show here different ways to draw in Adobe Illustrator. Here I demonstrate a way to draw that should be easy for anyone to create beautiful illustrations.
I rely on only three tools to create this illustration:
The Pencil Tool (Shortcut N)
The Eye Dropper Tool (Shortcut I)
Send to Back (Shift Command [ on a Mac & Shift Ctrl [ on a PC)
I show you how to create a PHP / MySQL message board in this video tutorial. I start by showing you how to properly set up the database. this can be looked at as a review on how to write SQL as well.
In this web design and programming video tutorial I will review a lot of what you have been taught previously. I’ll review many topics by showing you how to make drop down boxes that are populated from data stored in a database. If you don’t completely understand everything don’t worry about it. That’s why it is a review.
All of the code from the video follows the video. I included additional comments in the code that you can better understand what is going on. You also should print out the code and refer to it as you watch the video for better comprehension.
// This function is called to reload the page and pass the values chosen by the user
function reload(form)
{
// Get the value of the dropdown named cat
var val=form.cat.options[form.cat.options.selectedIndex].value;
// Loads the new page with the stored variable values
self.location=’hamtest.php?cat=’ + val ;
}
function reload2(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
var val2=form.subcat.options[form.subcat.options.selectedIndex].value;
self.location=’hamtest.php?cat=’ + val + ‘&cat3=’ + val2 ;
}
</script>
</head>
<body>
<?php
// Getting the data from Mysql table for first list box
$quer1=mysql_query(“SELECT DISTINCT Prod_Type,PT_ID FROM Product_ID
WHERE PT_ID IN (0,1,2,3,4,7,8,14,15,16,31,32,33,34,35,36,37) order by PT_ID”);
// For second drop down list we will check if category is selected else we will display all the subcategory
$cat=@$_GET[‘cat’]; // This line is added to take care if your global variable is off
if(isset($cat) and strlen($cat) > 0){
$quer=mysql_query(“SELECT DISTINCT Manufacturer_ID.Manufacturer,Manufacturer_ID.Man_ID FROM Manufacturer_ID, Model_Numbers
where ((Manufacturer_ID.Man_ID = Model_Numbers.Man_ID) AND (Model_Numbers.PT_ID = $cat)) order by Manufacturer”);
}else{$quer=mysql_query(“SELECT DISTINCT Manufacturer,Man_ID FROM Manufacturer_ID order by Manufacturer”); }
// end of query for second subcategory drop down list box
// For Third drop down list we will check if sub category is selected else we will display all the subcategory3
$cat3=@$_GET[‘cat3’]; // This line is added to take care if your global variable is off
if(isset($cat3) and strlen($cat3) > 0){
$quer2=mysql_query(“SELECT DISTINCT Model_Num, Model_Num FROM Model_Numbers where ((Model_Numbers.Man_ID=$cat3) AND (Model_Numbers.PT_ID = $cat)) order by Model_Num”);
}else{$quer2=mysql_query(“SELECT DISTINCT Model_Num, Model_Num FROM Model_Numbers order by Model_Num”); }
// End of query for third subcategory drop down list box
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.
Well it has been a long trip, but I’m going to wrap up the Python Tutorial here. Before I stopped I wanted to answer one question posed to me which was to create a program that automated the process of getting demographics.
I didn’t have much time to perfect this and I plan to come back, but this program will grab tons of demographics for you including:
In this video tutorial I show you how to scrap websites. I introduce 2 new modules being UrlLib and Beautiful Soup. UrlLib is preinstalled on Python, but you have to install Beautiful Soup for it to work.
Beautiful Soup is available at their website. If you are using Python versions previous to Python 3.0 get this version Beautiful Soup for Python previous to 3.0. If you are using Python 3.0 or higher get this version of Beautiful Soup.
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: