How To Program Chapter 01 – C++

Data Hierarchy – one bit – eight bits make up one byte – one byte makes and ASCII character – many character make up a word – many words make up a field- many fields make up a record – many records make up a file.

Machine language – strings of numbers

Assembly language – English like abbreviations

High-level language – single statements to accomplish significant tasks

Member Functions and Classes – class of object and how it functions

Instantiation – creating an object of specified class

Reuse – reuse any type of class when possible

Messages and member function calls – sending a message to an object to perform a function

Attributes and data members

Encapsulation – attributes and data members are encapsulated within classes

6 Phases of a C++ program – edit – pre-process – compile – link – load – execute

loading – moving the program into memory so it can be executed

Chapter 01 Self Review Exercises

1.1 a) Apple b) IBM personal computer c) programs d) cpu unit, arithmetic logic unit, memory unit, input unit, output unit, secondary storage unit e) machine, assembly, high level f) compiler g) android h) Release canidate i) accelerometer

1.2 a) integrated development environment  – editor b) pre-processor c) linker d) loader

1.3 a) information hiding b) classes c) object oriented analysis and design d) inheritance e) UML unified modeling language f) attributes

1.4 a) input unit b) program c) Assembly d) output unit e) memory unit and secondary memory unit f) arithmetic and logic unit g) central processing unit h) high-level languages i) machine language j) central processing unit

1.5 a) Java b) Objective C c) Google d) Pascal e) C++

 

 

Posted in Uncategorized | Leave a comment

MySQL and SQLite3 with Xampp – Quick start

  1. Open command Shell through Xampp
  2. Navigate to directory your working Xampp directory ie C:\Xampp\htdocs
  3. type sqlite3 to start Sqlite command prompt with temporary database or type sqlite3 file.db to open command prompt with an existing database file.

Quick Commands

  • .exit – exits current database
  • .schema – shows database schema (tables)

Source – https://www.sqlite.org/cli.html

MySql Commands

mysql -u user -p // login to MySQL
show databases;
use database DatabaseName;
show grants;
show tables;
select user(); // shows current user
select user from mysql.user; // shows all users
show grants for 'daunc426anon'@'localhost'; // display grants for specified user
GRANT SELECT ON daunc426_blog.* TO 'daunc426anon'@'localhost' IDENTIFIED BY 'tester';
REVOKE SELECT, INSERT, UPDATE, DELETE ON daunc426_blog.* FROM 'daunc426anon'@'localhost'; // revoke privileges

 

Posted in Uncategorized | Leave a comment

The New Boston Ajax Tutorials 1-11

I thought I would take a look at learning Ajax, I’m still not completely sure what specifically defines a program to be Ajax aside from communicating and live updating client side and server side.

What did I learn from the first 11 tutorials?

index.html – When loading the web page automatically load the js in the head and call the method in the body that is used to communicate with the server running php. Add the ui elements to collect input with appropriate ids.

establish communication with server via js – 3 steps.

  1. Create xmlHttp object for communication – this is either an ActiveX object with IE or XMLHttpRequest() with chrome or firefox
  2. Create the process method that uses the xmlHttp object to communicate with the server
  3. Handle the server response depending on the xmlHttp readystate

I ran into a few bugs.

I’m not familiar with XML, I need to understand the response tags better.

When defining the xml version in near the top of foodstore.php there was a space in the string between UTF and -8 that was giving me a parsing error.

My page was not updating automatically, it required a page reload to register any change. Turns out this was caused by a bug in my php code within my xml response tags. The code was obviously hitting a wall but I was not getting an error, perhaps I can kick back events or exceptions.

Posted in Uncategorized | Leave a comment