Saturday, 22 September 2012

Import CSV file using PHP

PHP script to import a csv file using fgetcsv() and and a simple foreach loop to display the content in a table.

Friday, 21 September 2012

Extracting email addresses from a text file using PHP REGEX

This is a simple yet effective way to extract email addresses from a .txt file.

The script reads the text file and then uses a REGEX expression to extract the email addresses from the content of the file.

Saturday, 4 August 2012

Javascript - Changing HTML elements

In this tutorial we delve into our first Javascript code!
We look at the document.getElementById() method and the onclick event.
In order to demonstrate the functionality of the script we will change the content of an HTML paragraph element with the click of a button
For more tutorial videos from Tutormeonline.co.za please visit the Tutormeonlineza Youtube channel

Javascript - What is Javascript?

For this tutorial you should already have a good knowledge of HTML and CSS.

What is Javascript?

Javascript is a scripting language that was designed to add interactivity on HTML web pages. A scripting language is a programming language that does not need to be compiled before its execution and is interpreted from the source code. That goes without saying that Javascript is therefore a scripting language is often embedded directly into the HTML page.
Don’t get confused with Javascript and JAVA! JAVA is a much more complex language and the two languages are significantly different in concept and design.

Saturday, 21 July 2012

PHP Language Structure

DATA TYPES

Data types in PHP are generally divided into two categories namely scalar and composite. A scalar variable contains only one value at a time and PHP supports four scalar types:
  1. boolean – can either be true or false.
  2. int – signed (can be positive or negative) numeric integer value.
  3. float – signed floating point value.
  4. string – collection of characters.
Compound data types are essentially containers of other data and PHP supports two types:

Wednesday, 18 July 2012

MySQL - Introduction

What is SQL
SQL stands for Structured Query Language and is used in manipulating data stored in a Relational Database Management System (RDBMS). SQL provides commands in which data can be extracted, sorted, updated, deleted and inserted. SQL can be used with many different RDBMS’s including MySQL, PostgressSQL, Oracle, Microsoft SQL Server, Access, etc.


MySQL
Officialy known as My-S-Q-L but is also referred to as My Sequel is the world’s most widely used open source RDBMS and runs as a server providing multi-user access to a number of databases. MySQL is a popular choice of database for use in web applications and is used in some of the most popular websites on the internet including

Sunday, 4 March 2012

PHP: Variable Handling Functions

  1. debug_zval_dump — Dumps a string representation of an internal zend value to output
  2. doubleval — Alias of floatval
  3. empty — Determine whether a variable is empty
  4. floatval — Get float value of a variable
  5. get_defined_vars — Returns an array of all defined variables
  6. get_resource_type — Returns the resource type
  7. gettype — Get the type of a variable
  8. import_request_variables — Import GET/POST/Cookie variables into the global scope

PHP: Array Related Functions

  1. array_change_key_case — Changes all keys in an array
  2. array_chunk — Split an array into chunks
  3. array_combine — Creates an array by using one array for keys and another for its values
  4. array_count_values — Counts all the values of an array
  5. array_diff_assoc — Computes the difference of arrays with additional index check
  6. array_diff_key — Computes the difference of arrays using keys for comparison
  7. array_diff_uassoc — Computes the difference of arrays with additional index check which is performed by a user supplied callback function
  8. array_diff_ukey — Computes the difference of arrays using a callback function on the keys for comparison

An Introduction to PHP Functions


A function is an input/output “machine”. A function accepts values, processes them and then returns an action.

1. Defining a Function
Functions are defined by using the functions statement :
function someFunction($argument, $argument){

 //function code here

}


Thursday, 1 March 2012

Hacker: Some Terms of the Trade

The notion that a hacker is this nerdy geek who sits behind his computer for days on end is, although not far off, is pretty much incorrect. The general populous might imagine these almost alien like figures of computing culture to be on a vindictive, vandalistic course of destruction as a result of some sort of troublesome childhood.

Technically this may all be vaguely correct but generally there is very little known about this tech sub-culture that has been around for, well, as long as the computer itself. Generally speaking hackers are the good guys. They are against monopolies, dictatorship and censorship and tend to have a very good sense of what's right and wrong without having any political agendas. But, as with anything good and pure, there are the bad apples.

Wednesday, 29 February 2012

Google Search: Tips and Tricks

The term "google it!" has become somewhat synonymous with that moment when what you need to know is not in your head. Whether your boss asks you to do something, and you just don't have a clue or whether you just want the definition of a word, we all tend to fall back on this phrase that has, very much so, become a part of our daily lives.

But do we use the Google search engine to its full capacity? Below are a few tricks and tips that can help you in your next google search to narrow the millions of search results down to the specific ones you're looking for.

Tuesday, 28 February 2012

Twitter: A Beginner's Guide - Part 2

In Twitter: A Beginner's Guide - Part 1 we looked at what Twitter is in a non-technical sense and touched on some of the terminology associated with the use of a Twitter account. In particular, we looked at the hashtag and the mention and what these terms mean in a practical sense. In Part 2 I will talk about some of the other basic terms including the reply and the retweet.

So before we start building a following, and perhaps even a fanbase, let's get to it!

Monday, 27 February 2012

Twitter: A Beginner's Guide - Part 1

This post is particularly for my dad who is by no means a noob in terms of technology and computers but he is, however, finding the social aspects of the internet, specifically twitter, a bit daunting... I am by no means an expert but I have learnt a few things. If anyone else finds this helpful, by all means. Feel free to leave comments or questions.


What is Twitter? - The Beginner's Guide

Depending on your interaction with Twitter you might want to gloss over the following paragraph as it applies only to the absolute beginner...

Saturday, 25 February 2012

Daemon - PC Terminology

In Unix and other operating systems a daemon is the term used for a computer program that runs as a background process as opposed to being controlled by an interactive user.

Wiki: "According to Fernando J. Corbato who worked on Project MAC in 1963 his team is the first to use the term daemon. The use of the term daemon was inspired by Maxwell's demon, an imaginary agent in physics and thermodynamics that helped to sort molecules."

In other words, the term deamon does not in this case refer to a mythical creature out of greek mythology or, for that matter, a dillusional idea of good and evil.