Code & Math

C++ Resources

Massachusetts Institute of Technology OpenCourseWare – Intro to C++

There is no one who dreams of technology that has not given thought to how an education at MIT could send us to the top of the Computer Scientists charts. Although most of us may not be able to attend MIT, we can still take the classes they offer, and for FREE I might add. MIT OpenCourseWare is a name you should have tattoed across your chest, forearm, or forehead, as ...

Read more →

C++ Numeric Types, Expressions, and Output

Overview of Chapter 3, Programming and Problem Solving with C++, 5th edition (2010)

C++ Data Types
C++ Data Types

* Types CHAR, SHORT, INT, and LONG are unsigned. An unsigned integer value is assumed to be only positive or zero.

Examples of Named Constant Declarations for Numberic Types:
const float PI = 3.14159;
const float E = 2.71828;
const float int = MAX_SCORE = ...

Read more →

Learn PHP in 24 Hours

SAMS Teach Yourself PHP in 24 Hours, 3rd Edition courtesy of the Association for Computing Machinery

This post was created as a reference point.

PHP Standard Data Types

There are 6 standard data types in PHP. They are:

  • Integer
  • Double
  • String
  • Boolean
  • Object
  • Array
  • There are also 2 Special Data Types. They are:

  • Resource
  • Null
  • Testing for a specific data type.

    Functions to test data types

  • is_array()
  • is_bool()
  • is_double()
  • is_int()
  • is_object()
  • is_string()
  • is_null()
  • is_resource()
  • Operators and Expressions

    An operator is a symbol or series of symbols that, when used in conjunction with values, performs an action and usually produces a new value.

    An ...

    Read more →

    JavaScript Basics

    Basics of JavaScript

    This article was created to outline the basics of the JavaScript langauge.

    JavaScript – Unsupported Browsers

    When JavaScript is run in an unsupported browser, the script itself might be displayed as text within the browser. To prevent this from happening, it is best to use the HTML comment feature to comment out the code from the script.

    For example:
    <SCRIPT TYPE="text/javascript">

    JavaScript program
    BROWSERS  -->

    HTML is commented ...

    Read more →

    Floating Point Numbers

    Floating Point Numbers

    While working on a JavaScript calculator I became stuck in what should be simple mathematics. The use of decimal points resulting in addition and subtraction caused erros in the calculations. The cause is in the way machine language calculates decimal points.

    Oracle offers some great insight into the cause and resolution: What Every Computer Scientist Should Know About Floating-Point Numbers

    The JavaScript Budget Calculator is a work in progress, to view how a machine interprets decimals check out ...

    Read more →

    Javascript Calculator

    JavaScript Calculator

    For a demo of the JavaScript calculator, click here
    *You must have a JavaScript enabled browser for the JavaScript Calculator demo to work.

    This calculator was created during a MindLeaders JavaScript tutorial. For more information on Mindreaders Tutorials and Training, go to:

    JavaScript Calculator Source Code

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
    <html xmlns=””>

    <meta content=”text/html; charset=utf-8″ http-equiv=”Content-Type” />
    <title>JavaScript Calculator</title>
    <script type=”text/javascript”>

    var total = 0;
    var lastOperation = “+”;
    var newnumber = true;

    function enterNumber(digit) {
    Read more →


    Artificial Life – Simple Animation

    One of the base things I must accomplish in the creation of a software program that emmulates the evolution and survival of life is a simplistic method of animating graphical objects. The graphics will be able to “see” and therefore will sense when they come in close contact with other objects. After a bit of research and development, I found an existing program, written in Java, that does just this.

    The artificial life simulation will take into account the cycle of ...

    Read more →
    Page 6 of 9 «...45678...»