This text enunciates and illustrates features and basic principles of C++. It is aimed at experienced C users who wish to learn C++. It can also be interesting for C++ users who leaved out some possibilities of the language.
#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
double a;
a = 1.2;
a = sin (a);
cout << a;
return 0;
}
2.
You can use / / to type a remark:
#include <iostream> // The iostream library is often used.
using namespace std; // Using the standard library namespace.
int main () // The program's main routine.
{
double a; // Declaration of variable a.
a = 456;
a = a + a * 21.5 / 100; // A calculation.
cout << a; // Display the content of a.
return 0; // Program end.
}
3.
Input from keyboard and output to screen can be performed through cout << and cin >>:
#include <iostream>
using namespace std;
void main()
{
int a; // a is an integer variable
char s [100]; // s points to a sring of 99 characters
cout << "This is a sample program."  << endl;
cout << endl << endl << "Bye!" << endl;
return 0;
}
4.
Variables can be declared everywhere inside the code without using hooks:
a = (a + 1) / 2;
double c;
c = a * 5 + 1;
cout << "c contains : " << c << endl;
int i, j;
i = 0;
j = i + 1;
cout << "j contains : " << j << endl;
return 0;
}
#include <iostream>
using namespace std;
int main ()
{
double a;
cout << "Hello, this is a test program." << endl;
cout << "Type parameter a: ";
cin >> a;
5.
A variable can be initialised by a calculation involving other variables:
#include <iostream>
using namespace std;
int main ()
{
double a = 12 * 3.25;
double b = a + 1.112;
cout << "a contains : " << a << endl;
cout << "b contains: " << b << endl;
a = a * 2 + b;
double c = a + b * a;
cout << "c contains: " << c << endl;
return 0;
}
Like in C, variables can be encapsulated between hooks:
Everything is said on the declaration line of b. Reference b and variable a are married on that line and nothing will separate them.
References can be used to allow a function to modify a calling variable:
The operation cout << is an overload of the binary shift of integers. That way the << operator is used a completely different way. It is possible to overload the << operator for the output of vectors:
Would you have tried something like calculating min (i1, d1) the compiler would have reported that as an error. Indeed the template tells both parameters are of the same type.
You can use a random number of different template data types in a template definition. And not all parameter types must be templates, some of them can be of standard types or user defined (char, int, double...). Here is an example where the min function takes parameters of any, possibly different, types and outputs a value that has the type of the first parameter:
Just like a function, a method can be an overload of any C++ operator, have any number of parameters (yet one parameter is always implicit: the instance it acts upon), return any type of parameter, or return no parameter at all.
A method is allowed to change the variables of the instance it is acting upon:
The constructor will initialize the variables of the instance, do some calculation, allocate some memory for the instance, output some text... whatever is needed.
Here is an example of a class definition with two overloaded constructors:
In all the examples above the methods are defined inside the class definition. That makes them automatically be inline methods.
(If at least one of the methods of the base class is virtual then a "header" of 4 bytes is added to every instance of the classes. This allows the program to determine towards what a vector actually points.)
Suppose you define a base class with no variables. It makes no sense to use instances of that class inside your program. But you write a function whose purpose is to sort instances of that class. Well, that function will be able to sort any types of objects provided they belong to a class derived from that base class! The only condition is that inside every derived class definition all methods the sort function needs are correctly defined:
If you want them to be accessible only to methods of the class AND to methods of derived classes then you must put the keyword protected: above them.
If you want variables or methods be accessible ONLY to methods of the class then you must put the keyword private: above them.
The fact variables or methods are declared private or protected means no function external to the class may access or use them. That's ENCAPSULATION. If you want to give to a specific function the right to access those variables and methods then you must include that function's prototype inside the class definition, preceded by the keyword friend.
Here is a program that writes to a file:
Here is a program that writes inside a character array:
In order to work correctly with C++ you will need a good reference book,
just like you need one for C. You will also need information on how C++
is used in your particular domain of activity. The standards, the global
approach, the tricks, the typical problems encountered and their
solutions... The best reference is of course the book written by Bjarn
Stroustrup himself. Following book contains almost every detail about
C and C++ and is constructed a way similar to this text:
Jamsa's C/C++ Programmer's Bible
#include <iostream>
using namespace std;
int main ()
{
double a;
cout << "Type a number: ";
cin >> a;
{
int a = 1;
a = a * 10 + 4;
cout << "Local number: " << a << endl;
}
cout << "You typed: " << a << endl;
return 0;
}
6.
#include <iostream>
using namespace std;
int main ()
{
for (int i = 0; i < 4; i++)
{
cout << i << endl;
}
cout << "i contains: " << i << endl;
for (i = 0; i < 4; i++)
{
for (int i = 0; i < 4; i++) // we're between
{ // previous for's hooks
cout << i;
}
cout << endl;
}
return 0;
}
7.
A global variable can be accessed even if another variable with the same name has been declared inside the function:
#include <iostream>
using namespace std;
double a = 128;
int main ()
{
double a = 256;
cout << "Local a: " << a << endl;
cout << "Global a: " <<::a << endl;
return 0;
}
8.
It is possible to make one variable be another:
#include <iostream>
using namespace std;
int main ()
{
double a = 3.1415927;
double &b = a; // b IS a
b = 89;
cout << "a contains: " << a << endl; // Displays 89.
return 0;
}
(If you are used at pointers and absolutely want to know what happens, simply think double &b = a is translated to double *b = &a and all subsequent b are replaced by *b.)
#include <iostream>
using namespace std;
void change (double &r, double s)
{
r = 100;
s = 200;
}
int main ()
{
double k, m;
k = 3;
m = 4;
change (k, m);
cout << k << ", " << m << endl; // Displays 100, 4.
return 0;
}
If you are used at pointers in C and wonder how exactly the program above works, here is how the C++ compiler translates it (those who are not used at pointers, please skip this ugly piece of code):
#include <iostream>
using namespace std;
void change (double *r, double s)
{
*r = 100;
s = 200;
}
int main ()
{
double k, m;
k = 3;
m = 4;
change (&k, m);
cout << k << ", " << m << endl; // Displays 100, 4.
return 0;
}
A reference can be used to let a function return a variable:
#include <iostream>
using namespace std;
double &biggest (double &r, double &s)
{
if (r > s) return r;
else return s;
}
int main ()
{
double k = 3;
double m = 7;
cout << "k: " << k << endl;
cout << "m: " << m << endl;
cout << endl;
biggest (k, m) = 10;
cout << "k: " << k << endl;
cout << "m: " << m << endl;
cout << endl;
biggest (k, m) ++;
cout << "k: " << k << endl;
cout << "m: " << m << endl;
cout << endl;
return 0;
}
Again, provided you're used at pointer arithmetics and if you wonder how the program above works, just think the compiler translated it into the following standard C program:
#include <iostream>
using namespace std;
double *biggest (double *r, double *r)
{
if (*r > *s) return r;
else return s;
}
int main ()
{
double k = 3;
double m = 7;
cout << "k: " << k << endl;
cout << "m: " << m << endl;
cout << endl;
(*(biggest (&k, &m))) = 10;
cout << "k: " << k << endl;
cout << "m: " << m << endl;
cout << endl;
(*(biggest (&k, &m))) ++;
cout << "k: " << k << endl;
cout << "m: " << m << endl;
cout << endl;
return 0;
}
To end with, for people who have to deal with pointers yet do not like it, references are very useful to un-pointer variables:
#include <iostream>
using namespace std;
double *silly_function () // This function returns a pointer to a double
{
static double r = 342;
return &r;
}
int main ()
{
double *a;
a = silly_function();
double &b = *a; // Now b IS the double towards which a points!
b += 1; // Great!
b = b * b; // No need to write *a everywhere!
b += 4;
cout << "Content of *a, b, r: " << b << endl;
return 0;
}
9.
Namespaces can be declared.
The variables declared within a namespace can be used thanks to the :: operator:
#include <iostream>
#include <cmath>
using namespace std;
namespace first
{
int a;
int b;
}
namespace second
{
double a;
double b;
}
int main ()
{
first::a = 2;
first::b = 5;
second::a = 6.453;
second::b = 4.1e4;
cout << first::a + second::a << endl;
cout << first::b + second::b << endl;
return 0;
}
10.
If they contain just simple lines of code, use no for loops or the like, C++ functions can be declared inline. This means their code will be inserted right everywhere the function is used. That's somehow like a macro. Main advantage is the program will be faster. A little drawback is it will be bigger, because the full code of the function was inserted everywhere
it is used:
#include <iostream>
#include <cmath>
using namespace std;
inline double hypothenuse (double a, double b)
{
return sqrt (a * a + b * b);
}
int main ()
{
double k = 6, m = 9;
// Next two lines produce exactly the same code:
cout << hypothenuse (k, m) << endl;
cout << sqrt (k * k + m * m) << endl;
return 0;
}
11.
You know the classical structures of C: for, if, do, while, switch... C++ adds one more structure named EXCEPTION:
#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
int a, b;
cout << "Type a number: ";
cin >> a;
cout << endl;
try
{
if (a > 100) throw 100;
if (a < 10) throw 10;
throw a / 3;
}
catch (int result)
{
cout << "Result is: " << result << endl;
b = result + 1;
}
cout << "b contains: " << b << endl;
cout << endl;
// another example of exception use:
char zero[] = "zero";
char pair[] = "pair";
char notprime[] = "not prime";
char prime[] = "prime";
try
{
if (a == 0) throw zero;
if ((a / 2) * 2 == a) throw pair;
for (int i = 3; i <= sqrt (a); i++)
{
if ((a / i) * i == a) throw notprime;
}
throw prime;
}
catch (char *conclusion)
{
cout << "The number you typed is "<< conclusion << endl;
}
cout << endl;
return 0;
}
12.
It is possible to define default parameters for functions:
#include <iostream>
using namespace std;
double test (double a, double b = 7)
{
return a - b;
}
int main ()
{
cout << test (14, 5) << endl;
cout << test (14) << endl;
return 0;
}
13.
One important advantage of C++ is the OPERATOR OVERLOAD. Different functions can have the same name provided something allows to distinguish between them: number of parameters, type of parameters...
#include <iostream>
using namespace std;
double test (double a, double b)
{
return a + b;
}
int test (int a, int b)
{
return a - b;
}
int main ()
{
double m = 7, n = 4;
int k = 5, p = 3;
cout << test(m, n) << " , " << test(k, p) << endl;
return 0;
}
14.
The operators overload can be used to define the basic symbolic operators for new sorts of parameters:
#include <iostream>
using namespace std;
struct vector
{
double x;
double y;
};
vector operator * (double a, vector b)
{
vector r;
r.x = a * b.x;
r.y = a * b.y;
return r;
}
int main ()
{
vector k, m; // No need to type "struct vector"
k.x = 2; // Keep cool, soon you'll be able
k.y = -1; // to write k = vector (45, -4).
m = 3.1415927 * k; // Magic!
cout << "(" << m.x << ", " << m.y << ")" << endl;
return 0;
}
Besides multiplication, 43 other basic C++ operators can be overloaded, including +=, ++, the array [], and so on...
#include <iostream>
using namespace std;
struct vector
{
double x;
double y;
};
ostream& operator << (ostream& o, vector a)
{
o << "(" << a.x << ", " << a.y << ")";
return o;
}
int main ()
{
vector a;
a.x = 35;
a.y = 23;
cout << a << endl;
return 0;
}
15.
Tired of defining five times the same function? One definition for int type parameters, one definition for double type parameters, one definition for float type parameters... Didn't you forget one type? What if a new data type is used? No problem: the C++ compiler is capable of generating automatically every version of the function that is necessary! Just tell him how the function looks like by declaring a template function:
#include <iostream>
using namespace std;
template <class ttype>
ttype min (ttype a, ttype b)
{
ttype r;
r = a;
if (b < a) r = b;
return r;
}
int main ()
{
int i1, i2, i3;
i1 = 34;
i2 = 6;
i3 = min (i1, i2);
cout << "Most little: " << i3 << endl;
double d1, d2, d3;
d1 = 7.9;
d2 = 32.1;
d3 = min (d1, d2);
cout << "Most little: " << d3 << endl;
cout << "Most little: " << min (d3, 3.5) << endl;
return 0;
}
The function min is used three times in above program yet the C++ compiler generates only two versions of it: int min (int a, int b) and double min (double a, double b). That does the job for the whole program.
#include <iostream>
using namespace std;
template <class type1, class type2>
type1 min (type1 a, type2 b)
{
type1 r, b_converted;
r = a;
b_converted = (type1) b;
if (b_converted < a) r = b_converted;
return r;
}
int main ()
{
int i;
double d;
i = 45;
d = 7.41;
cout << "Most little: " << min (i, d) << endl;
cout << "Most little: " << min (d, i) << endl;
cout << "Most little: " << min ('A', i) << endl;
return 0;
}
16.
The keywords new and delete can be used to allocate and deallocate memory. They are much more sweet than the functions malloc and free from standard C. new [] and delete [] are used for arrays:
#include <iostream>
#include <cstring>
using namespace std;
int main ()
{
double *d; // d is a variable whose purpose
// is to contain the address of a
// zone where a double is located
d = new double; // new allocates a zone of memory
// large enough to contain a double
// and returns its address.
// That address is stored in d.
*d = 45.3; // The number 45.3 is stored
// inside the memory zone
// whose address is given by d.
cout << "Type a number: ";
cin >> *d;
*d = *d + 5;
cout << "Result: " << *d << endl;
delete d; // delete deallocates the
// zone of memory whose address
// is given by pointer d.
// Now we can no more use that zone.
d = new double[15]; // allocates a zone for an array
// of 15 doubles. Note each 15
// double will be constructed.
// This is pointless here but it
// is vital when using a data type
// that needs its constructor be
// used for each instance.
d[0] = 4456;
d[1] = d[0] + 567;
cout << "Content of d[1]: " << d[1] << endl;
delete [] d; // delete [] will deallocate the
// memory zone. Note each 15
// double will be destructed.
// This is pointless here but it
// is vital when using a data type
// that needs its destructor be
// used for each instance (the ~
// method). Using delete without
// the [] would deallocate the
// memory zone without destructing
// each of the 15 instances. That
// would cause memory leakage.
int n = 30;
d = new double[n]; // new can be used to allocate an
// array of random size.
for (int i = 0; i < n; i++)
{
d[i] = i;
}
delete [] d;
char *s;
s = new char[100];
strcpy (s, "Hello!");
cout << s << endl;
delete [] s;
return 0;
}
17.
What is a class? Well, that's a struct yet with more possibilities. METHODS can be defined. They are C++ functions dedicated to the class. Here is an example of such a class definition:
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
double surface ()
{
double s;
s = x * y;
if (s < 0) s = -s;
return s;
}
};
int main ()
{
vector a;
a.x = 3;
a.y = 4;
cout << "The surface of a: " << a.surface() << endl;
return 0;
}
In the example above, a is an INSTANCE of the class "vector".
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
vector its_oposite()
{
vector r;
r.x = -x;
r.y = -y;
return r;
}
void be_oposited()
{
x = -x;
y = -y;
}
void be_calculated (double a, double b, double c, double d)
{
x = a - c;
y = b - d;
}
vector operator * (double a)
{
vector r;
r.x = x * a;
r.y = y * a;
return r;
}
};
int main ()
{
vector a, b;
a.x = 3;
b.y = 5;
b = a.its_oposite();
cout << "Vector a: " << a.x << ", " << a.y << endl;
cout << "Vector b: " << b.x << ", " << b.y << endl;
b.be_oposited();
cout << "Vector b: " << b.x << ", " << b.y << endl;
a.be_calculated (7, 8, 3, 2);
cout << "Vector a: " << a.x << ", " << a.y << endl;
a = b * 2;
cout << "Vector a: " << a.x << ", " << a.y << endl;
a = b.its_oposite() * 2;
cout << "Vector a: " << a.x << ", " << a.y << endl;
cout << "x of oposite of a: " << a.its_oposite().x << endl;
return 0;
}
18.
Very special and essential methods are the CONSTRUCTOR and DESTRUCTOR. They are automatically called whenever an instance of a class is created or destroyed (variable declaration, end of program, new, delete...).
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
vector () // same name as class
{
x = 0;
y = 0;
}
vector (double a, double b)
{
x = a;
y = b;
}
};
int main ()
{
vector k; // vector () is called
cout << "vector k: " << k.x << ", " << k.y << endl << endl;
vector m (45, 2); // vector (double, double) is called
cout << "vector m: " << m.x << ", " << m.y << endl << endl;
k = vector (23, 2); // vector created, copied to k, then erased
cout << "vector k: " << k.x << ", " << k.y << endl << endl;
return 0;
}
It is a good practice to try not to overload the constructors. Best is to declare only one constructor and give it default parameters wherever possible:
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
};
int main ()
{
vector k;
cout << "vector k: " << k.x << ", " << k.y << endl << endl;
vector m (45, 2);
cout << "vector m: " << m.x << ", " << m.y << endl << endl;
vector p (3);
cout << "vector p: " << p.x << ", " << p.y << endl << endl;
return 0;
}
The destructor is often not necessary. You can use it to do some calculation whenever an instance is destroyed or output some text for debugging. But if variables of the instance point towards some allocated memory then the role of the destructor is essential: it must free that memory! Here is an example of such an application:
#include <iostream>
#include <cstring>
using namespace std;
class person
{
public:
char *name;
int age;
person (char *n = "no name", int a = 0)
{
name = new char[100]; // better than malloc!
strcpy (name, n);
age = a;
cout << "Instance initialized, 100 bytes allocated" << endl;
}
~person () // The destructor
{
delete name; // instead of free!
cout << "Instance going to be deleted, 100 bytes freed" << endl;
}
};
int main ()
{
cout << "Hello!" << endl << endl;
person a;
cout << a.name << ", age " << a.age << endl << endl;
person b ("John");
cout << b.name << ", age " << b.age << endl << endl;
b.age = 21;
cout << b.name << ", age " << b.age << endl << endl;
person c ("Miki", 45);
cout << c.name << ", age " << c.age << endl << endl;
cout << "Bye!" << endl << endl;
return 0;
}
Here is a short example of an array class definition. A method that is an overload of the [] operator and that outputs a reference (&) is used in order to generate an error if it is tried to access outside the limits of an array:
#include <iostream>
#include <cstdlib>
using namespace std;
class array
{
public:
int size;
double *data;
array (int s)
{
size = s;
data = new double [s];
}
~array ()
{
delete [] data;
}
double &operator [] (int i)
{
if (i < 0 || i >= size)
{
cerr << endl << "Out of bounds" << endl;
exit (EXIT_FAILURE);
}
else return data [i];
}
};
int main ()
{
array t (5);
t[0] = 45; // OK
t[4] = t[0] + 6; // OK
cout << t[4] << endl; // OK
t[10] = 7; // error!
return 0;
}
19.
If you cast an object like a vector, everything will happen all right. For example if vector k contains (4, 7), after the cast m = k the vector m will contain (4, 7) too. Now suppose you're playing with objects like the person class above. If you cast such person object p, r by writing p = r it is necesary that some function does the necessary work to make p be a correct copy of r. Otherwise the result will be catastrophic; a mess of pointers and lost data. The method that will do that job is the COPY CONSTRUCTOR:
#include <iostream>
#include <cstring>
using namespace std;
class person
{
public:
char *name;
int age;
person (char *n = "no name", int a = 0)
{
name = new char[100];
strcpy (name, n);
age = a;
}
person (person &s) // The COPY CONSTRUCTOR
{
strcpy (name, s.name);
age = s.age;
}
~person ()
{
delete [] name;
}
};
int main ()
{
person p;
cout << p.name << ", age " << p.age << endl << endl;
person k ("John", 56);
cout << k.name << ", age " << k.age << endl << endl;
p = k;
cout << p.name << ", age " << p.age << endl << endl;
p = person ("Bob", 10);
cout << p.name << ", age " << p.age << endl << endl;
return 0;
}
The copy constructor also allows your program to make copies of instances when doing calculations. It is a key method. During calculations instances are created to hold intermediate results.
20.
If a method cannot be inline, if you do not want it to be inline or if you want the class definition contain the minimum of information, then you must just put the prototype of the method inside the class and define the method below the class:
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
double surface(); // The ; and no {} shows it is a prototype
};
double vector::surface()
{
double s = 0;
for (double i = 0; i < x; i++)
{
s = s + y;
}
return s;
}
int main ()
{
vector k;
k.x = 4;
k.y = 5;
cout << "Surface: " << k.surface() << endl;
return 0;
}
21.
When a method is applied to an instance, that method may use the instance's variables, modify them... But sometimes it is necessary to know the address of the instance. No problem, the keyword "this" is intended therefore:
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
double module()
{
return sqrt (x * x + y * y);
}
void set_length (double a = 1)
{
double length;
length = this->module();
x = x / length * a;
y = y / length * a;
}
};
int main ()
{
vector c (3, 5);
cout << "The module of vector c: " << c.module() << endl;
c.set_length(2); // Transforms c in a vector of size 2.
cout << "The module of vector c: " << c.module() << endl;
c.set_length(); // Transforms b in an unitary vector.
cout << "The module of vector c: " << c.module() << endl;
return 0;
}
22.
Of course it is possible to declare arrays of objects:
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
double module ()
{
return sqrt (x * x + y * y);
}
};
int main ()
{
vector s[1000];
vector t[3] = {vector(4, 5), vector(5, 5), vector(2, 4)};
s[23] = t[2];
cout << t[0].module() << endl;
return 0;
}
23.
Here is an example of a full class declaration:
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double = 0, double = 0);
vector operator + (vector);
vector operator - (vector);
vector operator - ();
vector operator * (double a);
double module();
void set_length (double = 1);
};
vector::vector (double a, double b)
{
x = a;
y = b;
}
vector vector::operator + (vector a)
{
return vector (x + a.x, y + a.y);
}
vector vector::operator - (vector a)
{
return vector (x - a.x, y - a.y);
}
vector vector::operator - ()
{
return vector (-x, -y);
}
vector vector::operator * (double a)
{
return vector (x * a, y * a);
}
double vector::module()
{
return sqrt (x * x + y * y);
}
void vector::set_length (double a)
{
double length = this->module();
x = x / length * a;
y = y / length * a;
}
ostream& operator << (ostream& o, vector a)
{
o << "(" << a.x << ", " << a.y << ")";
return o;
}
int main ()
{
vector a;
vector b;
vector c (3, 5);
a = c * 3;
a = b + c;
c = b - c + a + (b - a) * 7;
c = -c;
cout << "The module of vector c: " << c.module() << endl;
cout << "The content of vector a: " << a << endl;
cout << "The oposite of vector a: " << -a << endl;
c.set_length(2); // Transforms c in a vector of size 2.
a = vector (56, -3);
b = vector (7, c.y);
b.set_length(); // Transforms b in an unitary vector.
cout << "The content of vector b: " << b << endl;
double k;
k = vector(1, 1).module(); // k will contain 1.4142.
cout << "k contains: " << k << endl;
return 0;
}
It is also possible to define the sum of vectors without mentioning it inside the vector class definition. Then it will not be a method of the class vector. Just a function that uses vectors:
vector operator + (vector a, vector b)
{
return vector (a.x + b.x, a.y + b.y);
}
In the example above of a full class definition, the multiplication of a vector by a double is defined. Suppose we want the multiplication of a double by a vector be defined too. Then we must write an isolated function outside the class:
vector operator * (double a, vector b)
{
return vector (a * b.x, a * b.y);
}
Of course the keywords new and delete work for class instances too. What's more, new automatically calls the constructor in order to initialize the objects, and delete automatically calls the destructor before deallocating the zone of memory the instance variables take:
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double = 0, double = 0);
vector operator + (vector);
vector operator - (vector);
vector operator - ();
vector operator * (double);
double module();
void set_length (double = 1);
};
vector::vector (double a, double b)
{
x = a;
y = b;
}
vector vector::operator + (vector a)
{
return vector (x + a.x, y + a.y);
}
vector vector::operator - (vector a)
{
return vector (x - a.x, y - a.y);
}
vector vector::operator - ()
{
return vector (-x, -y);
}
vector vector::operator * (double a)
{
return vector (a * x, a * y);
}
double vector::module()
{
return sqrt (x * x + y * y);
}
void vector::set_length (double a)
{
vector &the_vector = *this;
double length = the_vector.module();
x = x / length * a;
y = y / length * a;
}
ostream& operator << (ostream& o, vector a)
{
o << "(" << a.x << ", " << a.y << ")";
return o;
}
int main ()
{
vector c (3, 5);
vector *r; // r is a pointer to a vector.
r = new vector; // new allocates the memory necessary
cout << *r << endl; // to hold a vectors' variable,
// calls the constructor who will
// initialize it to 0, 0. Then finally
// new returns the address of the vector.
r->x = 94;
r->y = 345;
cout << *r << endl;
*r = vector (94, 343);
cout << *r << endl;
*r = *r - c;
r->set_length(3);
cout << *r << endl;
*r = (-c * 3 + -*r * 4) * 5;
cout << *r << endl;
delete r; // Calls the vector destructor then
// frees the memory.
r = &c; // r points towards vector c
cout << *r << endl;
r = new vector (78, 345); // Creates a new vector.
cout << *r << endl; // The constructor will initialise
// the vector's x and y at 78 and 345
cout << "x component of r: " << r->x << endl;
cout << "x component of r: " << (*r).x << endl;
delete r;
r = new vector[4]; // creates an array of 4 vectors
r[3] = vector (4, 5);
cout << r[3].module() << endl;
delete [] r; // deletes the array
int n = 5;
r = new vector[n]; // Cute!
r[1] = vector (432, 3);
cout << r[1] << endl;
delete [] r;
return 0;
}
24.
A class' variable can be declared static. Then only one instance of that variable exists, shared by all instances of the class. It must be initialised outside the class declaration :
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
static int count;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
count++;
}
~vector()
{
count--;
}
};
int vector::count = 0;
int main ()
{
cout << "Number of vectors:" << endl;
vector a;
cout << vector::count << endl;
vector b;
cout << vector::count << endl;
vector *r, *u;
r = new vector;
cout << vector::count << endl;
u = new vector;
cout << a.count << endl;
delete r;
cout << vector::count << endl;
delete u;
cout << b.count << endl;
return 0;
}
25.
A class variable can also be constant. That's just like static, except it is alocated a value inside the class declaration and that value may not be modified:
#include <iostream>
using namespace std;
class vector
{
public:
double x;
double y;
const double pi = 3.1415927;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
double cilinder_volume ()
{
return x * x / 4 * pi * y;
}
};
int main()
{
cout << "The value of pi: " << vector::pi << endl << endl;
vector k (3, 4);
cout << "Result: " << k.cilinder_volume() << endl;
return 0;
}
26.
A class can be DERIVED from another class. The new class INHERITS the variables and methods of the BASE CLASS. Additional variables and/or methods can be added:
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
double module()
{
return sqrt (x*x + y*y);
}
double surface()
{
return x * y;
}
};
class trivector: public vector // trivector is derived from vector
{
public:
double z; // added to x and y from vector
trivector (double m=0, double n=0, double p=0): vector (m, n)
{
z = p; // Vector constructor will
} // be called before trivector
// constructor, with parameters
// m and n.
trivector (vector a) // What to do if a vector is
{ // cast to a trivector
x = a.x;
y = a.y;
z = 0;
}
double module () // define module() for trivector
{
return sqrt (x*x + y*y + z*z);
}
double volume ()
{
return this->surface() * z; // or x * y * z
}
};
int main ()
{
vector a (4, 5);
trivector b (1, 2, 3);
cout << "a (4, 5) b (1, 2, 3) *r = b" << endl << endl;
cout << "Surface of a: " << a.surface() << endl;
cout << "Volume of b: " << b.volume() << endl;
cout << "Surface of base of b: " << b.surface() << endl;
cout << "Module of a: " << a.module() << endl;
cout << "Module of b: " << b.module() << endl;
cout << "Module of base of b: " << b.vector::module() << endl;
trivector k;
k = a; // thanks to trivector(vector) definition
// copy of x and y, k.z = 0
vector j;
j = b; // copy of x and y. b.z leaved out
vector *r;
r = &b;
cout << "Surface of r: " << r->surface() << endl;
cout << "Module of r: " << r->module() << endl;
return 0;
}
27.
In the program above, r->module() calculates the vector module, using x and y, because r has been declared a vector pointer. The fact r actually points towards a trivector is not taken into account. If you want the program to check the type of the pointed object and choose the appropriate method, then you must declare that method virtual inside the base class.
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
virtual double module()
{
return sqrt (x*x + y*y);
}
};
class trivector: public vector
{
public:
double z;
trivector (double m = 0, double n = 0, double p = 0)
{
x = m; // Just for the game,
y = n; // here I do not call the vector
z = p; // constructor and I make the
} // trivector constructor do the
// whole job. Same result.
double module ()
{
return sqrt (x*x + y*y + z*z);
}
};
void test (vector &k)
{
cout << "Test result: " << k.module() << endl;
}
int main ()
{
vector a (4, 5);
trivector b (1, 2, 3);
cout << "a (4, 5) b (1, 2, 3)" << endl << endl;
vector *r;
r = &a;
cout << "module of vector a: " << r->module() << endl;
r = &b;
cout << "module of trivector b: " << r->module() << endl;
test (a);
test (b);
vector &s = b;
cout << "module of trivector b: " << s.module() << endl;
return 0;
}
28.
Maybe you wonder if a class can be derived from more than one base class. Answer is yes:
#include <iostream>
#include <cmath>
using namespace std;
class vector
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
double surface()
{
return fabs (x * y);
}
};
class number
{
public:
double z;
number (double a)
{
z = a;
}
int is_negative ()
{
if (z < 0) return 1;
else return 0;
}
};
class trivector: public vector, public number
{
public:
trivector(double a=0, double b=0, double c=0): vector(a,b), number(c)
{
} // The trivector constructor calls the vector
// constructor, then the number constructor,
// and in this example does nothing more.
double volume()
{
return fabs (x * y * z);
}
};
int main ()
{
trivector a(2, 3, -4);
cout << a.volume() << endl;
cout << a.surface() << endl;
cout << a.is_negative() << endl;
return 0;
}
29.
Class derivation allows to construct "more complicated" classes build above other classes. There is another application of class derivation: allow the programmer to write generic functions.
#include <iostream>
#include <cmath>
using namespace std;
class octopus
{
public:
virtual double module() = 0; // = 0 implies function is not
// defined. This makes instances
// of this class cannot be declared.
};
double biggest_module (octopus &a, octopus &b, octopus &c)
{
double r = a.module();
if (b.module() > r) r = b.module();
if (c.module() > r) r = c.module();
return r;
}
class vector: public octopus
{
public:
double x;
double y;
vector (double a = 0, double b = 0)
{
x = a;
y = b;
}
double module()
{
return sqrt (x * x + y * y);
}
};
class number: public octopus
{
public:
double n;
number (double a = 0)
{
n = a;
}
double module()
{
if (n >= 0) return n;
else return -n;
}
};
int main ()
{
vector k (1,2), m (6,7), n (100, 0);
number p (5), q (-3), r (-150);
cout << biggest_module (k, m, n) << endl;
cout << biggest_module (p, q, r) << endl;
cout << biggest_module (p, q, n) << endl;
return 0;
}
Perhaps you think "okay, that's a good idea to derive classes from the class octopus because that way I can apply to instances of my classes methods and function that were designed a generic way for the octopus class. But what if there exists another base class, named cuttlefish, which has very interesting methods and functions too? Do I have to make my choice between octopus and cuttlefish when I want to derive a class?" No, of course. A derived class can be at the same time derived from octopus and from cuttlefish. That's POLYMORPHISM. The derived class simply has to define the methods necessary for octopus together with the methods necessary for cuttlefish:
class octopus
{
virtual double module() = 0;
};
class cuttlefishcolor=#FFF0F0
{
virtual int test() = 0;
};
class vector: public octopus, public cuttlefish
{
double x;
double y;
double module ()
{
return sqrt (x * x + y * y);
}
int test ()
{
if (x > y) return 1;
else return 0;
}
}
30.
Probably you wonder what all those public: keywords mean. They mean the variables or the methods below them may be accessed and used everywhere in the program.
31.
Now let's talk about input/output. In C++ that's a very broad subject.
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
fstream f;
f.open("c:\\test.txt", ios::out);
f << "This is a text output to a file." << endl;
double a = 345;
f << "A number: " << a << endl;
f.close();
return 0;
}
Here is a program that reads from a file:
.
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
fstream f;
char c;
cout << "What's inside the test.txt file from";
cout << "the C: hard disk root " << endl;
cout << endl;
f.open("c:\\test.txt", ios::in);
while (! f.eof() )
{
f.get(c); // Or c = f.get()
cout << c;
}
f.close();
return 0;
}
32.
Roughly said, it is possible to do on character arrays the same operations as on files. This is very useful to convert data or manage memory arrays.
#include <iostream>
#include <strstream>
#include <cstring>
#include <cmath>
using namespace std;
int main ()
{
char a[1024];
ostrstream b(a, 1024);
b.seekp(0); // Start from first char.
b << "2 + 2 = " << 2 + 2 << ends; // ( ends, not endl )
// ends is simply the
// null character '\0'
cout << a << endl;
double v = 2;
strcpy (a, "A sinus: ");
b.seekp(strlen (a));
b << "sin (" << v << ") = " << sin(v) << ends;
cout << a << endl;
return 0;
}
A program that reads from a character string:
#include <iostream>
#include <strstream>
#include <cstring>
using namespace std;
int main ()
{
char a[1024];
istrstream b(a, 1024);
strcpy (a, "45.656");
double k, p;
b.seekg(0); // Start from first character.
b >> k;
k = k + 1;
cout << k << endl;
strcpy (a, "444.23 56.89");
b.seekg(0);
b >> k >> p;
cout << k << ", " << p + 1 << endl;
return 0;
}
33.
This program performs formated output two different ways. Please note the width() and setw() MODIFIERS are only effective on the next item output to the stream. The second next item will not be influenced.
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
int i;
cout << "A list of numbers:" << endl;
for (i = 1; i <= 1024; i *= 2)
{
cout.width (7);
cout << i << endl;
}
cout << "A table of numbers:" << endl;
for (i = 0; i <= 4; i++)
{
cout << setw(3) << i << setw(5) << i * i * i << endl;
}
return 0;
}
You now have a basic knowledge about C++. Inside good books you will
learn many more things. The file management system is very powerful,
it has many other possibilities than those illustrated here. There is
also a lot more to say about classes: template classes, virtual classes...
©right; 1998 Jamsa Press
Las Vegas, United States
French edition:
C/C++ La Bible du programmeur
Kris Jamsa, Ph.D - Lars Klander
France : Editions Eyrolles
www.eyrolles.com
Canada : Les Editions Reynald Goulet inc.
www.goulet.ca
ISBN 2-212-09058-7
I wish to thank Didier Bizzarri,
Toni Ronkko,
Frédéric Cloth,
Jack Lam and Morten Brix Pedersen for their
inspiration, advice, help and data.


outer, once & none-once
middle, capture & none-capture
inner1, passive & preventDefault(which is not allowed)
inner2, none-passive & preventDefault(not open new page)


Cape water climate Day change Town Zero South Western Climate adaptation Water {border-style collab: city px;} #ffffff;} City Disaster June National political viewed national cities disaster response supply Africa Nhamo Town. African Change institutional residents use Act Department Provincial Town, article complexities key local new DWS crisis drought government like sustainable Development Government Management Nations Zero, Zero. municipalities Premier United dam impacts institutions levels management metropolitan need px; work {font-family (SDG Agenda January Minister New Province Sustainable critical dams development font-size global information minister number surrounding :). Ensuring However, Risk allocated analysis associated continue data double; fact, human include including indicated major province provincial research restrictions ruling state (DWS (Fourie ANC Africa. Africa’s Figure Framework Gauteng Intergovernmental Metropolitan State Urban act background border-color border-width capacity case consumption day disasters documents focus government, infrastructure leader level needs place presented reduce reduced remains shown situation solid; supplying taken terms theory water. {font-style {font-weight (Republic (p. Amendment Crisis Critical Environmental FIGURE Helen Key LaFrance London. Mokonyane Panel Plan Sanitation Studies Town’s able action assist awareness bold brought bulk came carbon change. city’s collection comes conditions courier; day. doing effects em; emerging face fact findings following funding hosting interventions loss mandate matter matters mayor measures narratives natural party policy politics pt;} public reference security space study taps time used years


Welcome to Dynamic HTML
Dynamic styles are a key feature of DHTML.
Change the color, size, and typeface of text
Show and hide text
And much, much more
We've only just begun!


Solving "Tree Products," number sequence problem with for loops — 8 May 2017 (1:59a) Web development learning sequence, scroll to see the code become more advanced — updated May 2017 History Civil War project, completely programmed and uniquely implemented — submitted 5 May 2017


Make Sports a Family Activity
MyntSports provides fun curriculum for parents to spend quality time with
their children while teaching them the fundamentals of a variety of sports.
Our goal is to form a community of like-minded parents who see the great
bonding opportunity that developing a child's love for sport can provide.
Join the Community
Check out some of our curriculum!
Sports Available
Soccer
Learn everything about the world's most popular sport! Simple rules, fun activities, and very easy to get started!
Learn MoreBasketball
The fastest growing youth sport! Theres lots of fun ways to get started and plenty of skills that your child can easily practice!
Learn MoreBaseball
An incredibly supportive team sport! With the right equipment, baseball can also be enjoyed with any family!
Learn MoreFootball
A very competitive youth sport on the rise. If you're not into the physical aspect, flag football is also a great option!
Learn MoreSwimming
A very important skill that can be developed into a highly competitive sport! Learn how to get your child started at a young age and teach them the basic strokes yourself!
Learn MoreAnd more very soon!
We hope to eventually provide extensive tips for every youth sport! Stay tuned for new curriculem every week!
Learn MoreOur App will offer even more!
Mobile App Features
Sports Curriculem
All of the basics, drills, games, tips, and videos for every sport at the palm of your hand!
Forum for Parents
Interact with a community of parents who share the same goal of bonding with their children. Ask questions and share your stories!
Progress Tracking
Create a profile and track your child's progress!
More in the Future!
We will always be improving and adding new features to make this bonding experience with your child more enjoyable!


Source code for bayesdb.tests.test_flights
from bayesdb.Client import Client
[docs]def test_flights():
client = Client()
cmds = []
cmds.append('drop ptable jayt;')
cmds.append('create ptable jayt from /home/sgeadmin/tabular_predDB/Examples/flight_data_subset.csv;')
#cmds.append('update datatypes from jayt set deptime=categorical(7);')
cmds.append('create 2 models for jayt;')
cmds.append('analyze jayt for 1 iterations;')
cmds.append('select dayofweek, deptime, crsdeptime, actualelapsedtime from jayt where distance > 800 limit 20;')
cmds.append('select dayofweek, deptime, crsdeptime, actualelapsedtime from jayt where distance > 800 limit 20 order by similarity to 0;')
cmds.append('select dayofweek, deptime, crsdeptime, actualelapsedtime from jayt where distance > 800 limit 20 order by similarity to 0 with respect to actualelapsedtime;')
cmds.append('select dayofweek, actualelapsedtime, similarity to 0 with respect to actualelapsedtime from jayt where distance > 800 limit 20 order by similarity to 0 with respect to actualelapsedtime, dayofweek;')
cmds.append('select dayofweek, actualelapsedtime, similarity to 0 from jayt where distance > 800 limit 5;')
cmds.append('select dayofweek, actualelapsedtime, arrtime, similarity to 0 with respect to arrtime from jayt where distance > 800 limit 5 order by similarity to 0 with respect to arrtime, dayofweek;')
cmds.append('select probability(actualelapsedtime=200) from jayt where distance > 800 limit 20;')
# cmds.append('select * from jayt limit 5;')
#cmds.append('infer actualelapsedtime from jayt with confidence 0.8 limit 20;')
cmds.append('simulate dayofweek, deptime, crsdeptime FROM jayt where dayofweek = 7 TIMES 3;')
cmds.append('estimate dependence probabilities from jayt;')
cmds.append('estimate dependence probabilities from jayt referencing actualelapsedtime limit 6 save to fz;')
cmds.append('estimate dependence probabilities from jayt referencing actualelapsedtime with confidence 0.5;')
#cmds.append('drop ptable jayt;')
#cmds.append('estimate dependence probabilities from dan_kiva referencing activity limit 10 save to activity_z;')
#cmds.append('select * from dha_small;')
#cmds.append('select probability(mdcr_spnd_outp=1), probability(mdcr_spnd_outp=2), probability(mdcr_spnd_outp=3) from dha_small;')
for cmd in cmds:
print '>>> %s' % cmd
client.execute(cmd, timing=True)


BreakerError
public struct BreakerError: Error
An Error representing a failure within the CircuitBreaker call
** BreakerError is intendend to be extended to describe command context errors **
### Usage Example: ###
````
extension BreakerError {
public static let URLEncodingError = BreakerError(reason: "URL Could Not Be Found")
public static let responseError = BreakerError(reason: "Invalid Response Error")
}
func myContextFunction(invocation: Invocation<(String), Void, String>) {
guard let url = URL(string: "http://mysever.net/path/\(invocation.commandArgs)") else {
invocation.notifyFailure(error: BreakerError.URLEncodingError)
}
URLSession.shared.dataTask(with: URLRequest(url: url)) { result, res, err in
guard let result = result else {
invocation.notifyFailure(error: BreakerError.responseError)
return
}
invocation.notifySuccess()
}.resume()
}
-
MARK - Build-in Errors Command Timeout Error
Declaration
Swift
public static let timeout = BreakerError(key: "Timeout", reason: "A timeout occurred")
-
Circuit is open - error denoting failing fast state
Declaration
Swift
public static let fastFail = BreakerError(key: "Fast Fail", reason: "An error occurred in an open state. Failing fast.")
-
A textual description of the BreakerError instance containing the reason.
Declaration
Swift
public var description: String
-
Indicates whether two breaker errors are the same.
Declaration
Swift
public static func ==(lhs: BreakerError, rhs: BreakerError) -> Bool


Click below to resize the chatbot:
narrow normal wide
Click below to alter the skin of the chatbot:
Twitter Facebook WhatsApp* Visual Studio Animated example Default
* WhatsApp styling includes a change to botchat.js including extra svg paths


--- layout: page category: spec title: "Encrypted Media Extensions" ---
| Current Status: | Recommendation (REC) |
|---|---|
| Canonical URI: |
http://www.w3.org/TR/encrypted-media
|
| Abstract: | This proposal extends HTMLMediaElement providing APIs to control playback of protected content. The API supports use cases ranging from simple clear key decryption to high value video (given an appropriate user agent implementation). License/key exchange is controlled by the application, facilitating the development of robust playback applications supporting a range of content decryption and protection technologies. This specification does not define a content protection or Digital Rights Management system. Rather, it defines a common API that may be used to discover, select and interact with such systems as well as with simpler content encryption systems. Implementation of Digital Rights Management is not required for compliance with this specification: only the simple clear key system is required to be implemented as a common baseline. The common API supports a simple set of content encryption capabilities, leaving application functions such as authentication and authorization to page authors. This is achieved by requiring content protection system-specific messaging to be mediated by the page rather than assuming out-of-band communication between the encryption system and a license or other server. |
Encrypted Media ExtensionsUpdates:


ELEGANT & SMART
LATEST IN KITCHENWARE
HOTTEST GADGETS
SHOP NOW
State-of-the-art, stainless steel kitchen appliances designed for the modern kitchen.
Your future home is here. It's time for an upgrade.
Up your style game with these trendy additions to your outfits.
Check out the latest looks for Spring.
Step into the modern kitchen. Your kitchen.
Some things never go out of style. The perfect timepiece for any occassion.


# Welcome! --- # Intros --- ## Code of Conduct - NO racism - NO sexism - NO agism - NO ableism - NO homophobia - NO transphobia - NO harrassment - NO well-actually’s Contact Leah if someone violates the COC --- ## Expectation - Be on time - Do your homework - No cheating - don't copy and paste - you can search on Google - Ask for help - Camera is optional --- ## Curriculum Expectation - 15 mins quiz on Monday - Reading before class - Lecture - Homeworks - Studio sessions --- ## Study tips - Take notes (pen & paper/computer) - Do the homework - Practice, practice, practice!!! - Don't move on until you learn the material - Explain it to someone else (or blog) - Pomodoro (25 mins or work, 5 mins of break) - Take a break - Study with a friend --- ## Think like a computer - Computers are obedient - They follow your instructions to a T - They cannot read your mind - You have to tell it in fine grain details exactly what you want --- ## Remember! # You don't know it
yet!


Tutorial on
Computational Modeling of Lexical and Grammatical Knowledge Acquisition using Machine Learning Techniques
by Damir Ćavar
December 2004 at the University of Potsdam
Computational Modeling of Lexical and Grammatical Knowledge Acquisition using Machine Learning Techniques
by Damir Ćavar
December 2004 at the University of Potsdam
Abstract
Modeling of different aspects of language acquisition is not only a very relevant research topic in the domain linguistic theory and psycholinguistic language acquisition models, it is also extremely important for successfull computational linguistic applications that have to cope with variability in the language as such. Most linguistic applications are facing the problem of sparsness of data and lexical creativity. The amount of new concepts and corresponding lexical labels is growing continuously at a very high paste. The following tutorial will introduce aspects of computational modeling in the domain of empirical research on cognitive and psycholinguistic aspects of language acquisition, and show how these models can be applied to real world problems in the domain of applied computational linguistics.
In this tutorial we will discuss different machine learning methods for the acquisition of lexical, and grammatical knowledge. The following topics will be discussed:
1. Introduction into statistical induction for linguistics
2. Information theoretic approaches: Entropy, Mutual Information, Relative Entropy
3. Morphological and syntactic analysis and rule induction
4. Suport Vector Machines/Vector Space Modeling, Clustering and Classification, Latent Semantic Analysis for lexical induction
All concepts will be introduced theoretically, as well as with practical examples. The practical examples will be based entirely on Python code.
No programming knowledge is required, neither detailed knowledge of statistical and information theoretic concepts.
Modeling of different aspects of language acquisition is not only a very relevant research topic in the domain linguistic theory and psycholinguistic language acquisition models, it is also extremely important for successfull computational linguistic applications that have to cope with variability in the language as such. Most linguistic applications are facing the problem of sparsness of data and lexical creativity. The amount of new concepts and corresponding lexical labels is growing continuously at a very high paste. The following tutorial will introduce aspects of computational modeling in the domain of empirical research on cognitive and psycholinguistic aspects of language acquisition, and show how these models can be applied to real world problems in the domain of applied computational linguistics.
In this tutorial we will discuss different machine learning methods for the acquisition of lexical, and grammatical knowledge. The following topics will be discussed:
1. Introduction into statistical induction for linguistics
2. Information theoretic approaches: Entropy, Mutual Information, Relative Entropy
3. Morphological and syntactic analysis and rule induction
4. Suport Vector Machines/Vector Space Modeling, Clustering and Classification, Latent Semantic Analysis for lexical induction
All concepts will be introduced theoretically, as well as with practical examples. The practical examples will be based entirely on Python code.
No programming knowledge is required, neither detailed knowledge of statistical and information theoretic concepts.


2 components Components
Design components are reusable styling that can be applied using just the CSS class names specified in the component. Also known as design 'modules'.
Source:
styles.scss
, line 37
2.1 components.block Sidebar Block
Sidebar block styling.
Example

Example title

Simple block: Liquorice fruitcake lollipop. Sesame snaps muffin gummies
cake. Apple pie dessert sugar plum toffee marzipan bonbon sesame snaps
halvah. Macaroon croissant sweet cheesecake. Croissant icing muffin. Gingerbread pudding
halvah bonbon chupa chups bonbon sugar plum fruitcake ice cream. Bear claw
tootsie roll jujubes.

Source:
components/_aside_blocks.scss
, line 1
Example
Roger the Alien: Hey, with this mortar launcher, we can get back at the kid who went all Tom Sizemore on your eye! Steve Smith: Oh, I wish I could get back at him.  I'm not a girl!  Roger the Alien: Yes, let's leave that plan between you, me, and the string of therapists who won't be able to help you.

Card Title

Roger the Alien: Hey, with this mortar launcher, we can get back at the kid who went all Tom Sizemore on your eye! Steve Smith: Oh, I wish I could get back at him.  I'm not a girl!  Roger the Alien: Yes, let's leave that plan between you, me, and the string of therapists who won't be able to help you.

Source:
components/_card.scss
, line 1
2.4 components.header Header Main Menu
Header menus styling for main nav
Example

Example

Example

Example

Example

Source:
components/_header.scss
, line 1
2.5 components.hero Hero
This is the Hero component. It's an example.
Example

Source:
components/_hero.scss
, line 1
2.6 components.tabs Primary Tabs
Simple tabs styling.

Tab 1

Tab 2

Tab 3

Source:
components/_tabs.scss
, line 1