text:
Embedded Systems/IO Programming

An embedded system is useless if it cannot communicate with the outside world. To this effect, embedded systems need to employ I/O mechanisms to both receive outside data, and transmit commands back to the outside world. Few Computer Science courses will even mention I/O programming, although it is a central feature of embedded systems programming. This chapter then will serve as a crash course on I/O programming, both for those with a background in C, and also for those without it.

Programming the IO Bus
When programming IO bus controls, there are 5 major variations on how to handle it- the main thread poll, the multithread poll, the interrupt method, the interrupt+thread method, and using a DMA controller.

Main thread poll
In this method, whenever you have output ready to be sent, you check if the bus is free and send it. Depending on how the bus works, sending it can take a large amount of time, during which you may not be able to do anything else. Input works similarly- every so often you check the bus to see if input exists.

Pros:

 * Simple to understand

Cons:

 * Very inefficient, especially if you need to push the data manually over the bus (instead of via DMA)
 * If you need to push data manually, you are not doing anything else, which may lead to problem with real time hardware
 * Depending on polling frequency and input frequency, you could lose data by not handling it fast enough

In general, this system should only be used if IO only occurs at infrequent intervals, or if you can put it off when there are more important things to do. If your system supports multithreading or interrupts, you should use other techniques instead.

Multithread polling
In this method, we spawn off a special thread to poll. If there is no IO when it polls, it puts itself back to sleep for a predefined amount of time. If there is IO, it deals with it on the IO thread, allowing the main thread to do whatever is needed.

Pros:

 * Does not put off the main thread
 * Allows you to define the importance of IO by changing the priority of the thread

Cons:

 * Still somewhat inefficient
 * If IO occurs frequently, your polling interval may be too small for you to sleep sufficiently, starving other threads
 * If your thread is too low in priority or there are too many threads for the OS to wake the thread in a timely fashion, data can be lost.
 * Requires an OS capable of threading

This technique is good if your system supports threading, but does not support interrupts or has run out of interrupts. It does not work well when frequent IO is expected- the OS may not properly sleep the thread if the interval is too small, and you will be adding the overhead of 2 context switches per poll.

Interrupt architecture
(The interrupt architecture uses interrupts, which we discuss in more detail in chapter Embedded Systems/Interrupts).

In this method, the bus fires off an interrupt to the processor whenever IO is ready. The processor then jumps to a special function, dropping whatever else it was doing. The special function (called an interrupt handler, or interrupt service routine) takes care of all IO, then goes back to whatever it was doing.

Pros:

 * Very efficient
 * Very simple, requires only 1 function

Cons:

 * If dealing with IO takes a long time, you can starve other things. This is especially dangerous if your handler masks interrupts, which can cause you to miss hardware interrupts from real time hardware.
 * If your handler takes so long that more input is ready before you handle existing input, data can be lost.

This technique is great as long as dealing with the IO is a short process, such as when you just need to set up DMA. If its a long process, use multithreaded polling or interrupts with threads.

Interrupts and threads

 * We discuss this technique in more detail in Embedded Systems/Interrupts

In this technique, you use an interrupt to detect when IO is ready. Instead of dealing with the IO directly, the interrupt signals a thread that IO is ready and lets that thread deal with it. Signalling the thread is usually done via semaphore- the semaphore is initialized to the taken state. The IO thread tries to take the semaphore, which fails and the OS puts it to sleep. When IO is ready, the interrupt is fired and releases the semaphore. The thread then wakes up, and handles the IO before trying to take the semaphore and being put back to sleep.

The routine the interrupt vector points at is the "first level interrupt handler". The thread that the OS later wakes up to handle the rest of the work is the "second level interrupt handler".

Pros:

 * minimum latency—instead of all other interrupts being disabled until that interrupt is completely handled, interrupts are turned back on (at the end of the first level interrupt handler) as soon as possible.
 * Does not put off the main thread
 * Allows you to define the importance of IO by changing the priority of the thread
 * Very efficient- only makes context changes when needed and does not poll.
 * Very clean solution architecturally, allows you to be very flexible in how you handle IO.
 * The second level interrupt handler can wait for a lock to be released (Embedded Systems/Locks and Critical Sections).

Cons:

 * Requires an OS capable of threading
 * Most complex solution

This solution is the most flexible, and one of the most efficient. It also minimizes the risk of starving more important tasks. Its probably the most common method used today.

DMA (Direct Memory Access) Controller
In some specialised situations, such as where a set of data must be transferred to a communications IO device, a DMA controller may be present that can automatically detect when the IO device is ready for more data, and transfer that data. This technique may be used in conjunction with many of the other techniques, for instance an interrupt may be used when the data transfer is complete.

Pros:

 * This provides the best performance, since the I/O can happen in parallel with other code execution

Cons:

 * Only applicable to a limited range of problems
 * Not all systems have DMA controllers. This is especially true of the more basic 8-bit microcontrollers.
 * Parallel nature may complicate a system

Dos.h
The Dos.h header file commonly included in many C distributions, especially on DOS and Windows systems. This file contains information on a number of different routines, but most importantly it contains prototypes for the inp and outp functions that can be used to provide port output directly from a C program. Many embedded systems however, will not have a Dos.h header file in their library, nor will they have any precompiled C routines to handle port input and output. The purpose of this chapter then, is to teach the reader how to "brew their own" input and output routines.

The <iohw.h> interface
Some C compiler distributions include the <iohw.h> interface. It allows relatively portable hardware device driver code to be written. It is used to implement the standard C++ interface.

x86 Output Routines
The x86 instruction set contains 2 instructions: in and out both functions take 2 arguments, a port number, and then another parameter to receive the data from or to send the data to (depending on which command you use).

we can define 2 functions in assembly, using the CDECL calling convention, that we can link with our C programs, and call from our C programms to handle port output and input.

Synchronous and Asynchronous
Data can be transmitted either synchronously or asynchronously. synchronous transmissions are transmissions that are sent with a clock signal. This way the receiver knows exactly where each bit begins and ends. This way, there is less susceptibility to noise and jitter. Also, synchronous transmissions frequently require extensive hand-shakeing between the transmitter and receiver, to ensure that all timing mechanisms are synchronized together. Conversely, asynchronous transmissions are sent without a clock signal, and often without much hand-shaking.

title: Embedded Systems/IO Programming


text:
Georgia Water/Statewide Plan/Advisory Committees

Chapter 6. Statewide Plan
 * 6.4. Public Participation
 * 6.4.1. Advisory Committees

Statewide Advisory Committee

 * Role of SAC
 * Membership
 * Meetings
 * Public participation

Technical Advisory Committees

 * Role of TACs
 * Membership
 * Meetings
 * Public participation
 * List of TACs by topic

Basin Advisory Committees

 * Role of BACs
 * Membership
 * Meetings
 * Public Participation
 * List of BACs
 * Savannah and Ogeechee Rivers
 * Satilla, Suwannee and St. Marys Rivers
 * Oconee, Ocmulgee and Altamaha Rivers
 * Flint and Ochlockonee Rivers
 * Chattahoochee River
 * Coosa, Tallapoosa, Tennessee Rivers
 * Georgia Coastal Area (Floridan Aquifer)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
User:JMRyan/New Page1

= Truth =

Truth in a model
We have defined satisfaction in a model with a variable assignment. We have expressed formula $$\varphi\,\!$$ being satisfied by model $$\mathfrak{M}\,\!$$ with variable assignment $$\mathrm{s}\,\!$$ as:

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \varphi\,\!$$

Now we can also say that a formula $$\varphi\,\!$$ is satisfied my model $$\mathfrak{M}\,\!$$ (not limited to a specific variable assignment) if and only if $$\varphi\,\!$$ is satisfied by $$\mathfrak{M}\,\!$$ with every variable assignment. Thus

 * $$\mathfrak{M}\ \vDash \varphi\,\!$$

if and only if

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \varphi\ \mbox{for every}\ \mathrm{s}\ .\,\!$$

If no free variables occur in $$\varphi,\,\!$$ (thatis, if $$\varphi\,\!$$ is a sentence), then $$\varphi\,\!$$ is true in model $$\mathfrak{M}\,\!$$.

Variable assignments allow us to deal with free variables when doing the semantic analysis of a formula. For two variable assignments, $$\mathrm{s_1}\,\!$$ and $$\mathrm{s_2}\,\!$$, satisfaction by $$<\!\mathfrak{M},\ \mathrm{s_1}\!>\,\!$$ differs from satisfaction by $$<\!\mathfrak{M},\ \mathrm{s_2}\!>\,\!$$ only if the formula has free variables. But sentences do not have free variables. Thus a model satisfies a sentence with at least one variable assignment if and only if it satisfies the sentence with every variable assignment. The following two definitions are equivalent:

 * $$\varphi\,\!$$ is true in $$\mathfrak{M}\,\!$$ if and only if there is a variable assignment $$\mathrm{s}\,\!$$ such that

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \varphi\ .\,\!$$

 * $$\varphi\,\!$$ is true in $$\mathfrak{M}\,\!$$ if and only if, for every variable assignment $$\mathrm{s},\,\!$$

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \varphi\ .\,\!$$

The latter is just a notational variant of:

 * $$\varphi\,\!$$ is true in $$\mathfrak{M}\,\!$$ if and only if

 * $$\mathfrak{M}\ \vDash \varphi\ .\,\!$$

The example model
On the previous page, we looked at the following model and variable assignment.

For the model $$I_{\mathfrak{M}}\ :\,\!$$

 * $$|\mathfrak{M}|\ =\ \{1,\, 2,\, 3\}\ .\,\!$$
 * $$I_{\mathfrak{M}}(a^0_0)\ =\ 0\ .\,\!$$
 * $$I_{\mathfrak{M}}(b^0_0)\ =\ 1\ .\,\!$$
 * $$I_{\mathfrak{M}}(c^0_0)\ =\ 2\ .\,\!$$
 * $$I_{\mathfrak{M}}(f^2_0)\ =\ \mathfrak{f}^2_0\ \mbox{such that:} \quad \mathfrak{f}^2_0(0,\, 0) = 2,\ \mathfrak{f}^2_0(0,\, 1)\ =\ 1,\ \mathfrak{f}^2_0(0,\, 2) = 0,\,\!$$
 * $$\mathfrak{f}^2_0(1,\, 0) = 1,\ \mathfrak{f}^2_0(1,\, 1)\ =\ 0,\ \mathfrak{f}^2_0(1,\, 2) = 2,\ \mathfrak{f}^2_0(2,\, 0) = 0,\,\!$$
 * $$\mathfrak{f}^2_0(2,\, 1) = 2,\ \mbox{and}\ \mathfrak{f}^2_0(2,\, 2) = 1\ .\,\!$$
 * $$I_{\mathfrak{M}}(\mathrm{F^2_0})\ =\ \{<\!0,\ 1\!>,\ <\!1,\ 2\!>,\ <\!2,\ 1\!>\}\ .\,\!$$

For the variable assignment $$\mathrm{s}\ :\,\!$$

 * $$\mathrm{s}(x_0)\ =\ 0\ .\,\!$$
 * $$\mathrm{s}(y_0)\ =\ 1\ .\,\!$$
 * $$\mathrm{s}(z_0)\ =\ 2\ .\,\!$$

Example results
We noted the following results:

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \mathrm{F}(a, b),\ \mathrm{F}(b, c),\ \mbox{and}\ \mathrm{F}(c, b)\ .\,\!$$

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \not\vDash \mathrm{F}(a, a))\ .\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \mathrm{F}(a, f(a, b))\ .\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \not\vDash \mathrm{F}(f(a, b), a)\ .\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \mathrm{F}(c, b) \rightarrow \mathrm{F}(a, b)\ .\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \not\vDash \mathrm{F}(c, b) \rightarrow \mathrm{F}(b, a)\ .\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \not\vDash \forall x\, \forall y\, (\mathrm{F}(x, y) \rightarrow \mathrm{F}(y, x))\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \exists x\, \exists y\, (\mathrm{F}(x, y) \land \mathrm{F}(y, x))\,\!$$

We also noted above that for sentences (though not for formulae in general), a model satisfies the sentence with at least one variable assignment if and only if it satisfies the sentence with every variable assignment. Thus the results just listed hold for every variable assignment, not just $$\mathrm{s}\,\!$$.

Applying our definition of truth, we get:

 * $$(1) \quad \mathrm{F}(a, b),\ \mathrm{F}(b, c),\ \mbox{and}\ \mathrm{F}(c, b)\ \mbox{are True in}\ \mathfrak{M}\ .\,\!$$
 * $$(2) \quad \mathrm{F}(a, a)\ \mbox{is False in}\ \mathfrak{M}\ .\,\!$$
 * $$(3) \quad \mathrm{F}(a, f(a, b))\ \mbox{is True in}\ \mathfrak{M}\ .\,\!$$
 * $$(4) \quad \mathrm{F}(f(a, b), a)\ \mbox{is False in}\ \mathfrak{M}\ .\,\!$$
 * $$(5) \quad \mathrm{F}(c, b) \rightarrow \mathrm{F}(a, b)\ \mbox{is True in}\ \mathfrak{M}\ .\,\!$$
 * $$(6) \quad \mathrm{F}(c, b) \rightarrow \mathrm{F}(b, a)\ \mbox{is False in}\ \mathfrak{M}\ .\,\!$$
 * $$(7) \quad \forall x\, \forall y\, (\mathrm{F}(x, y) \rightarrow \mathrm{F}(y, x))\ \mbox{is false in }\ \mathfrak{M}\ .\,\!$$.
 * $$(8) \quad \exists x\, \exists y\, (\mathrm{F}(x, y) \land \mathrm{F}(y, x))\ \mbox{is true in}\ \mathfrak{M}\ .\,\!$$

This corresponds to the goals (1)–(8) of the previous page. We have now achieved those goals.

The example model
On Models page, we also considered an infinite model $$I_{\mathfrak{M_2}}\ :\,\!$$

 * $$|\mathfrak{M}_2| = \{0, 1, 2, ...\}\,\!$$
 * $$I_{\mathfrak{M}_2}(a^0_0)\ =\ 0\ .\,\!$$
 * $$I_{\mathfrak{M}_2}(b^0_0)\ =\ 1\ .\,\!$$
 * $$I_{\mathfrak{M}_2}(c^0_0)\ =\ 2\ .\,\!$$
 * $$I_{\mathfrak{M}_2}(f^2_0)\ =\ \mathfrak{f}^2_0\ \mbox{such that}\ \mathfrak{f}^2_0(u, v) = u + v\ .\,\!$$
 * $$I_{\mathfrak{M}_2}(\mathrm{F^2_0})\ =\ \{<\!x,\ y\!>:\ x < y\}\ .\,\!$$

We can reuse the same variable assignment from above, namely $$\mathrm{s}\ :\,\!$$

 * $$\mathrm{s}(x_0)\ =\ 0\ .\,\!$$
 * $$\mathrm{s}(y_0)\ =\ 1\ .\,\!$$
 * $$\mathrm{s}(z_0)\ =\ 2\ .\,\!$$

Example of extended varable assignment
On the Models page, we listed the following goals for our defintions.

 * $$f(a, b)\ \mbox{resolves to}\ 1\ \mathrm{in}\ \mathfrak{M}_2\ .\,\!$$

This does not require our definition of truth or the definition of satisfaction; it is simply requires evaluating the exended variable assignment. We have for any $$\mathrm{s}\,\!$$ on defined on $$I_{\mathfrak{M}}\,\!$$:

 * $$\overline{\mathrm{s}}(f(a, b))

\ =\ I_{\mathfrak{M}}(f)\,(\ \overline{\mathrm{s}}(a),\, \overline{\mathrm{s}}(b)\ ) \ =\ \mathfrak{f}^2_0(\ \overline{\mathrm{s}}(a),\, \overline{\mathrm{s}}(b)\ )\,\!$$
 * $$=\ \mathfrak{f}^2_0(\ I_{\mathfrak{M}}(a),\, I_{\mathfrak{M}}(b)\ )

\ =\ \mathfrak{f}^2_0(0,\, 1)\,\!$$
 * $$=\ 0 + 1\ =\ 1\ .\,\!$$

Example results without quantifiers
We also listed the following goal on the Models page.

 * $$(9) \quad \mathrm{F}(a, b)\ \mbox{and}\ \mathrm{F}(b, c)\ \mbox{are True in}\ \mathfrak{M}_2\ .\,\!$$
 * $$(10) \quad \mathrm{F}(c, b)\ \mbox{and}\ \mathrm{F}(a, a)\ \mbox{are False in}\ \mathfrak{M}_2\ .\,\!$$

First we note that:

 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \mathrm{F}(a, b)\ \ \mbox{because}\ <\!\overline{\mathrm{s}}(a),\, \overline{\mathrm{s}}(b)\!>\ =\ <\!0,\, 1\!>\ \in\ I_{\mathfrak{M}}(\mathrm{F})\ \,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \vDash \mathrm{F}(b, c)\ \ \mbox{because}\ <\!\overline{\mathrm{s}}(b),\, \overline{\mathrm{s}}(c)\!>\ =\ <\!1,\, 2\!>\ \in\ I_{\mathfrak{M}}(\mathrm{F})\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \not\vDash \mathrm{F}(c, b)\ \ \mbox{because}\ <\!\overline{\mathrm{s}}(c),\, \overline{\mathrm{s}}(b)\!>\ =\ <\!2,\, 1\!>\ \notin\ I_{\mathfrak{M}}(\mathrm{F})\,\!$$
 * $$<\!\mathfrak{M},\ \mathrm{s}\!>\ \not\vDash \mathrm{F}(a, a)\ \ \mbox{because}\ <\!\overline{\mathrm{s}}(a),\, \overline{\mathrm{s}}(a)\!>\ =\ <\!0,\, 0\!>\ \notin\ I_{\mathfrak{M}}(\mathrm{F})\ .\,\!$$

Indeed:

 * $$<\!0,\, 1\!>\ \in\ I_{\mathfrak{M}}(\mathrm{F})\ \ \mbox{because}\ \ 0 < 1\,\!$$
 * $$<\!1,\, 2\!>\ \in\ I_{\mathfrak{M}}(\mathrm{F})\ \ \mbox{because}\ \ 1 < 2\,\!$$
 * $$<\!2,\, 1\!>\ \notin\ I_{\mathfrak{M}}(\mathrm{F})\ \ \mbox{because}\ \ 2 \not< 1\,\!$$
 * $$<\!0,\, 0\!>\ \notin\ I_{\mathfrak{M}}(\mathrm{F})\ \ \mbox{because}\ \ 0 \not< 0\ .\,\!$$

Because the formulae of (9) and (10) are sentences,

 * $$<\!\mathfrak{M}\!>\ \vDash \mathrm{F}(a, b)\ .\,\!$$
 * $$<\!\mathfrak{M}\!>\ \vDash \mathrm{F}(b, c)\ .\,\!$$
 * $$<\!\mathfrak{M}\!>\ \not\vDash \mathrm{F}(c, b)\ .\,\!$$
 * $$<\!\mathfrak{M}\!>\ \not\vDash \mathrm{F}(a, a)\ .\,\!$$

Applying the definition of truth, we find the goals of (9) and (10) achieved. The sentences of (9) are true and those of (10) are false.

Example results with quantifiers
In addition, we listed the following goal on the Models page.

 * $$(11) \quad \forall x\, \exists y\, \mathrm{F}(x, y)\ \mbox{is true in}\ \mathfrak{M}_2\ .\,\!$$
 * $$(12) \quad \forall x\, \exists y\, \mathrm{F}(y, x)\ \mbox{is false in}\ \mathfrak{M}_2\ .\,\!$$

Corresponding to (11):

 * $$(13) \quad <\!\mathfrak{M_2},\ \mathrm{s}\!>\ \vDash \forall x\, \exists y\, \mathrm{F}(x, y)\,\!$$

is true if and only if, for each i a member of the domain, the following is true of at least one j a member of the domain:

 * $$<\!\mathfrak{M_2},\ \mathrm{s}[x\!:\, i, x\!:\, j]\!>\ \vDash \mathrm{F}(x, y)\ .\,\!$$

But $$\mathrm{F^2_0}\,\!$$ was assigned the less then relation. Thus the preceeding holds if and only if, for every member of the domain, there is a larger member of the domain. Given that the domain is $$\{0, 1, 2, ...\},\,\!$$ this is obviously true. Thus, (13) is true. Given that the formula of (11) and (12) is a sentence, we find the goal expressed as (11) to be met.

Corresponding to (12):

 * $$(14) \quad <\!\mathfrak{M_2},\ \mathrm{s}\!>\ \vDash \forall x\, \exists y\, \mathrm{F}(y, x)\,\!$$

is true if and only if, for each i a member of the domain, the following is true of at least one j a member of the domain:

 * $$<\!\mathfrak{M_2},\ \mathrm{s}[x\!:\, i, x\!:\, j]\!>\ \vDash \mathrm{F}(y, x)\ .\,\!$$

This holds if and only if, for every member of the domain, there is a smaller member of the domain. But there is no member of the domain smaller than 0. Thus (14) is false. The formula of (12) and (14) fails to be satisfied by $$\mathfrak{M_2}\,\!$$ with variable assignment $$\mathrm{s}\,\!$$. The formula of (12) and (14) is a sentence, so it fails to be satisfied by $$\mathfrak{M_2}\,\!$$ with any variable assignment. The formula (a sentence) of (12) and (14) is false, and so the goal of (12) is met.

title: User:JMRyan/New Page1


text:
Introduction to Latin American Studies/American Origins/Toltecs

=Preparing to Read=

Questions to Explore
 * How did the Toltecs influence later Mesoamerican cultures such as the Aztec?
 * Why do we know so little about the Toltec civilization?

Key Terms
 * Toltec
 * Quetzalcoatl
 * Tezcatlipoca

Key People
 * Chalchiuh Tlatonac
 * Mixcoatl Totepeuh
 * Topiltzin Ce Acatl Quetzalcoatl
 * Huemac

Key Places
 * Tula (Tolán)

Vocabulary Building

=Reading= The Toltecs (or Toltec or Tolteca) were a PreColumbian Native American people who dominated much of central Mexico between the 10th and 12th century AD. Their language, Nahuatl, was also spoken by the Aztecs.

Origins

The Toltecs originated as a militaristic nomadic people, and they or their ancestors may have sacked the city of Teotihuacan (ca. 750). After they established a more settled existence, the Toltec fused the many small states in Central Mexico into an empire ruled from their capital, Tula (also known as Tolán). They were accomplished temple builders. Their influence spread through much of Mesoamerica in the post-Classic era. The Toltec influence on the Maya of Yucatán is heavy, especially evident at the city of Chichen Itza. Their pottery has been found as far south as Costa Rica.

Religous Beliefs

Some writers have alleged that the Toltecs introduced the cult of Quetzalcoatl, the plumed serpent. This is certainly not so, as this deity was commonly depicted throughout Mesoamerica for centuries earlier, going back to Olmec times. In Toltec (and later Aztec) mythology Quetzalcoatl was a rival of Tezcatlipoca, the first god who is known to have demanded human hearts as sacrifice. Thus the Toltecs seem to have introduced the habit of mass human sacrifice as later practiced by the Aztecs.

Legend and Archiology

The Toltec empire is believed to have been destroyed around 1200 CE by the nomadic warriors of the Chichimecs. The ruling family of the Aztecs claimed to descend from Toltec ancestry via the sacred city of Colhuacán.

In his writings Miguel León Portilla explains that in Nauha legend, the Toltec were the originators of all civilization, so Toltec was synonymous with artist, or artisan, and their city "Tollan" was described as full of wonders. When the Aztecs rewrote their history, they tried to show they were related to the Toltecs. Unfortunately this means that much of the tradition of the Toltecs is legend, and difficult to prove. Stories say that after the fall of Tula some of the Toltec retreated to Cholula, which did not fall until centuries later when it was burned by Hern�n Cort�s and the Spanish conquistadores.

We know very little of the Toltec rulers. They were believed to by god-like, and depending on which account of Toltec history you read, they are portrayed as more god-like or more human. In keeping with this theme, many took the names of their patron dieties and the stories of their lives mirror the lives of their namesakes. Some of the Toltec rulers are said to have included:

 * Chalchiuh Tlatonac – first Toltec king, founder of Tula
 * Mixcoatl or Mixcoatl Totepeuh
 * Topiltzin Ce Acatl Quetzalcoatl, son of Mixcoatl, the most famous Toltec ruler
 * Huemac – the last Toltec king, died in exile c. 1100 (?), some 6 years after the fall of Tula

Tula

In 1941, the Sociedad Mexicana de Antropolog�a confirmed that Tula was the capital of the Toltec, as had long been tradition and suggested by archeologists since the 19th century. Some scholars, including Laurette S�journ�, regret the decision, claiming that several seasons of excavation only revealed a minor city, not enough to justify the legend of the Toltecs. The site of Tula actually shows it to have been a large city in its prime, although the ceremonial art and architecture visible there today is less impressive than that at other Mesoamerican sites. It should be understood, however, that some chronicles from the time of the arrival of the Spanish conquistadores and later confuse the Toltec with other earlier Mesoamerican civilizations and sometimes tend to attribute all achievements of the centuries before the rise of the Aztec to the Toltec.

Toltec Influence on Modern Culture

During the late twentieth century, some Mexican shamans, including Don Miguel Ruiz, who claim to be descendants of the Toltec and inheritors of their spiritual powers, began writing and teaching for a worldwide audience, causing a renewed interest in the Toltec. Another such author is Victor Sanchez who was inspired by the writings of Carlos Castaneda.

=Responding= Refer back to the questions from Preparing to Explore. After reading about the Toltecs, how would you answer differently?

=Resources, Links, and Virtual Field Trips=

Websites

 * Timeline of PreColumbian Mesoamerica from Wikipedia

Annotated Bibliography
Library of Congress Record http://catalog.loc.gov/cgi-bin/Pwebrecon.cgi?v1=1&ti=1,1&SEQ=20051116172636&Search%5FArg=builders%20of%20the%20ancient%20world&Search%5FCode=TALL&CNT=25&PID=10308&SID=1
 * Builders of the Ancient World,


text:
Georgia Water/Regional Plans

Chapter 7. Regional Plans

 * Contributors

 * 7.1. Overview
 * 7.2. State Guidance for Regional Plans
 * 7.3. Contributors' Recommendations for Developing Regional Plans
 * 7.4. Savannah and Ogeechee Rivers
 * 7.5. Satilla, Suwannee and St. Marys Rivers
 * 7.6. Oconee, Ocmulgee and Altamaha Rivers
 * 7.7. Flint and Ochlockonee Rivers
 * 7.8. Chattahoochee River
 * 7.9. Coosa, Tallapoosa, Tennessee Rivers
 * 7.10. Georgia Coastal Area (Floridan Aquifer)

title: Georgia Water/Regional Plans


text:
Rhetoric and Composition/Parts of Speech

Nouns
A noun is the part of speech that can fit into specific morphological and syntactic frames: A noun takes inflection suffixes for plural, singular possessive and plural possessive cases (-s;-'s;-s'). A noun appears after a determiner. Nouns refer to persons, places, things, states, or qualities.

Nouns appear: after adjectives, after articles, as a subject of a sentence, as an object of a preposition, as a direct object of a transitive verb, and as an indirect object of transitive verb.

There are different kinds of nouns in terms of their grammatical function. These can be classified into different categories:

Count nouns refers to discrete number of things that are countable. They can take the plural forms and can be preceded by articles. Examples: book, house, car.

Non count also known as mass noun and refers to things and objects that are indiscreet. Examples: rice, oil, weather.

Common nouns are any person, place, or thing. Common nouns are not capitalized. Examples: a city, the policeman, that desk.

Proper nouns are the name of a specific person, place or thing. Proper nouns are capitalized. Personal names are the best examples of proper nouns. Examples: Nicolas, Idaho, Daily News.

Collective nouns are used to name groups. Even when a collective noun is in the singular form, it can be used to refer to a group. Example: team, herd, jury

Concrete nouns words that represent objects one can see, hear, touch, smell or taste. Abstract nouns are anything one cannot see, hear touch, smell or taste.

Some examples of nouns are: Tom, table, classroom, desk, bottle, door, conscience.

Determiners
Determiners are used as modifiers of a noun phrase or words that occur before a noun. Determiners can be classified as articles, demonstratives, quantifiers, possessive noun, and possessive pronouns.

Determiners form a closed class of words that number (exclusive of ordinals) about 50 in English and include: the teacher, a college, a bit of honey, that person, those people, whatever purpose, either way, your choice.

Articles: a, an, the.

Demonstratives: this, that, these, those, which, etc. (when used with noun phrases).

Possessives: my, our, your, her, his, its, their, whose, and possessive nouns (John's, the teacher's).

Quantifiers: all, few, many, several, some, every, each, any, no etc.

Cardinal Numbers: one, two, fifty, etc.

Ordinals: first, second, last, next, etc.

Articles
There is also a special class of determiners called articles. These are the words a, an, and the and sometimes proceed nouns or other words that come before a noun.

A Definite Article (English the) is used before singular and plural nouns that refer to a particular member of a group. (The cat on the mat is black.) An Indefinite Article (English a, an) is used before singular nouns that refer to any member of a group. (A cat is a mammal.) A Partitive Article indicates an indefinite quantity of a mass noun; there is no partitive article in English, though the words some or any often have that function. An example is French du / de la / des, as in Voulez-vous du café ? ("Do you want some coffee?" or "Do you want coffee?") A Zero Article is the absence of an article (e.g. English indefinite plural), used in some languages in contrast with the presence of one. Linguists hypothesize the absence as a zero article based on the X-bar theory.

The words a and an are called indefinite articles, because they do not identify a particular person, place, or thing. The is called a definite article, because it does specify a particular person, place, or thing.

Using a and an
Determining which word to use, either a or an, is based on the first sound of the word that follows it. When a word starts with a consonant sound, use a before it. When the word begins with a vowel sound, use an before it. Be careful, sometimes the first letter of the word is not the first sound of the word (see hour and unicorn below).
 * a show
 * an amazing show
 * an octopus
 * a huge octopus
 * an hour
 * a house
 * an apple
 * a red apple
 * a unicorn
 * an angry unicorn

Singular and Plural
In order to show whether a noun is singular or plural, change the noun's spelling. A noun will take the plural inflection '-s' for most words in English. But, there might be irregular plural nouns as well. Some of the examples of irregular nouns are given below: If you are unsure how to change a word into the plural form, check your dictionary.
 * boy/boys
 * child/children
 * woman/women
 * man/men
 * syllabus/syllabi
 * ox/oxen
 * deer/deer

Possession
Nouns also undergo a morphological change to express possession (ownership) by using an apostrophe followed by the letter "s" ('s). This can denote 'singular' or 'plural' possessive. Possession is having some degree of control over something else. Generally, to possess something, a person must have an intention to possess it. A person may be in possession of some property (although possession does not always imply ownership). Like ownership, the possession of things is commonly regulated by states under property law. Languages have several means to indicate possession.

EXAMPLES:
 * girl/girl's  (singular)
 * children/children's (plural)
 * man/man's (singular)
 * woman/woman's (singular)

---If a singular noun does not end in s, add 's

The delivery boy's truck was blocking the driveway.

Bob Dole's concession speech was stoic and dignified.

The student's attempts to solve the problem were rewarded.

---If a singular common noun ends in s, add 's—unless the next word begins with s. If the next word begins with s, add an apostrophe only. (This includes words with s and sh sounds.)

The boss's temper was legendary among his employees.

The boss' sister was even meaner.

The witness's version of the story has several inconsistencies.

The witness' story did not match the events recorded on tape.

---If a singular proper noun ends in s, add an apostrophe.

Chris' exam scores were higher than any other students. --Usually singular proper nouns will be names like Chris, and Alyssa.

Pronouns
A pronoun is a word that often replaces a noun phrase, other pronouns, or other words functioning as a noun in a sentence. The word or group of words that a pronoun replaces or refers to is called the antecedent of the pronoun

Example #1 The dog is old. It walks slowly. In this sentence, the word it replaces the dog.

Example #2 Wow, that boy can throw a football. He must have thrown it 60 yards. In this sentence, the word he replaces that boy.

There are several types of pronouns: personal pronouns, possessive pronouns, intensive and reflexive pronouns, relative pronouns, interrogative pronouns, demonstrative pronouns and indefinite pronouns.

Personal Pronouns are those that refer to specific people or things. Examples: I, he, she, we, us, they. After they finished shopping they put the groceries in the trunk.

Possessive Pronouns indicate ownership. Examples: My, mine, your, our, theirs. My brother bought his car.

Intensive and Reflexive Pronouns Intensive pronouns emphasize a noun or another pronoun. The President himself called to congratulate me.

Reflexive pronouns look the same as intensive pronouns but serve a different function. They name a receiver of an action. We shopped ourselves to death.

Relative Pronouns introduce subordinate clauses and function as adjectives. The man who yelled at us to get off his lawn did not even own the property!

Interrogative Pronouns introduce questions. Who was that? Who will help me? Which do you prefer?)

Demonstrative Pronouns point out specific persons, places, things or ideas such as that, those, this, these. This is my dog.

Indefinite Pronouns refer to non-specific people or things. Examples: All, both, any, few, everyone, each, nobody, some, several, neither.

Several people cheered after the solo.

Pronouns most often replace a noun but can sometimes function as a determiner. These are called pronoun/determiners because they are in the form of a pronoun but function as an determiner.

This material was new to me. This functions as a pronoun/adjective.

Pronoun Problems

Pronouns can cause many problems for writers. Here are some tips to help you.

- Make sure the pronoun and its antecedent (the noun or pronoun to which the pronoun refers) agree. They must both be singular or plural.

Examples: My dog finished her food. (Both are singular) The dogs fought for their food. (Both are plural)

-Collective nouns should be used as singular unless they are obviously plural.

Example: The jury gave its verdict.

-Compound antecedents connected by and should be used as plural.

Example: Jack and Jill are getting married.

-Some antecedents that are indefinite and morphologically singular (anyone, each, everyone, nobody, somebody) can take they.

Examples: And everyone to rest themselves betake - Shakespeare, The Rape of Lucrece, 1549 I would have everybody marry if they can do it properly - Jane Austen, Mansfield Park, 1814 ... the detachment and sympathy of someone approaching their own death - Alan Moorehead, The Blue Nile, 1962

-Make sure the antecedent is clear.

Example: When she set the picture on the glass table, it broke.

By using it after two nouns, the reference is unclear. Which item broke? The picture or the table? When reading your writing, ask yourself these questions. If you are unclear as to which noun is the antecedent, it will be unclear for the reader as well.

-Deciding whether to use we or us

If you are unsure as to which pronoun to use, try omitting the antecedent.

Example: We/Us workers would like to have more breaks. It makes much mores sense to say We would instead of Us would.

Verbs
A verb is the main word in the predicate of a sentence. It expresses an action, describes an occurrence, or establishes a state of being. Depending on the language, a verb may vary in form according to many factors, possibly including its tense, aspect, mood and voice. It may also agree with the person, gender, and/or number of some of its arguments (subject object, etc.)

an action would be: Josh threw the ball. Jason kicked the football.

an occurrence would be: a hush descended on the crowd. a feeling warmed his heart.

a state of being would be: Jill was serious. The house is on the hill.

Principal Parts
The principal parts of verbs are the different forms that verbs take depending on how they are used in a sentence. For example, take the verb escape.

base form: to escape past tense: escaped present participle: am escaping past participle: escaped

Subject-Verb Agreement
Verbs need to agree with their subjects in number (singular or plural) and in person (first, second, or third). Find the verb and ask "who or what" is doing the action of that verb.

To make verbs agree with compound subjects, follow this example:

A pencil, a backpack, and a notebook was issued to each student.

This sentence should be edited to say:

A pencil, a backpack, and a notebook were issued to each student.

Verbs will never agree with nouns that are in prepositional phrases. To make verbs agree with their subjects, follow this example:

The direction of the three plays are the topic of my talk.

This sentence should be edited to say:

The direction of the three plays is the topic of my talk.

The subject of my talk is direction, not plays.

In the English language, verbs usually follow subjects. But when this order is reversed, the writer must make the verb agree with the subject, not with a noun that happens to precede it. For example:

Beside the house stands sheds filled with tools.

This sentence should be edited to say:

Beside the house stand sheds filled with tools.

Because the subject is sheds; it is plural, so the verb must be stand.

Verb Tenses
Tenses in a verb help to show when the action expressed by a verb takes place. The three simple tenses are the present tense, past tense, and future tense. Verbs also take aspect. Aspect refers to progression or completion of an action. The 'aspect' affixes are denoted by '-en' and '-ing,'which forms non finite participle forms.

---Present Tense Present tense expresses an unchanging, repeated, or reoccurring action or situation that exists only now. It can also represent a widespread truth.

Examples: The mountains are tall and white. Unchanging action Every year, the school council elects new members. Recurring action Pb is the chemical symbol for lead. Widespread truth

---Past Tense Past tense expresses an action or situation that was started and finished in the past. Most past tense verbs end in -ed. The irregular verbs have special past tense forms which must be memorized.

Examples: W.W.II ended in 1945. Regular -ed past Ernest Hemingway wrote "The Old Man and the Sea." Irregular form

---Future Tense Future tense expresses an action or situation that will occur in the future. This tense is formed by using will/shall with the simple form of the verb.

Examples: The speaker of the House will finish her term in May of 2012. The future tense can also be expressed by using am, is, or are with going to. The surgeon is going to perform the first bypass in Minnesota. We can also use the present tense form with an adverb or adverbial phrase to show future time. The president speaks tomorrow. (Tomorrow is a future time adverb.)

---Aspect: Refers to the nature of the action described by the verb. There are three aspects: indefinite (or simple), complete (or perfect), continuing (or progressive).

The three indefinite tenses, or simple tenses, describe an action but do not state whether the action is finished:

the simple past ("I went") the simple present ("I go") the simple future ("I will go")

Progressive: He is reading a book Perfect   : Mary has taken her work seriously

The simple tenses locate an action only within the three basic time frames that we've recognized, present, past, and future. There are also three complex aspects of time that can be expressed: Progressive forms: express continuing actions. Perfect forms: express actions completed before another action or time in the present, past, or future Perfect progressive forms: express actions that continue up to some point in the present, past or future.

Transitive and Intransitive Verbs
Transitive verbs help to carry out the action of a specific subject, and are followed by a noun phrase. A transitive verb must be followed by a direct object.

For Example: He         ran              to school. (Subject) (did something)   (object-where?) She cuts her hair every month. The dog runs around the tree.

Intransitive verbs do not take any object, but they do express the actions that don't require the subject to do something to something else. The intransitive verbs can stand alone in a sentence.

For Example: Katie ran. -The intransitive verb ran is a complete action by itself and doesn't need an object to complete the action. Jack fell on the steps in the entryway.

Linking Verbs
Linking Verbs link the relationship between the subject and the rest of the sentence. This type of verb explains the connection between the subject and it's complement.

The most common linking verb is "to be." The linking verb forms the main verb in a sentence and is also known as the copula.

Example: The tea is hot. There are many books on the shelf. In the above sentences, is and are serve as the linking verbs as well as the main verbs in the sentences.

Common Linking Verbs: appear           become seem             taste continue         remain

A true linking verbs are any form of be {am, is, as, were, are being, might, etc.} The true linking verbs act as the main verb in a sentence.

example: The work was very tiring.

In this sentence, was function as the linking verb which is also the main verb in the sentence. This type of sentences cannot be transformed into passive sentences because the verbs do not have a direct object (non-transitive verbs).

In your writing you can also input verbs with multiple personalities. such as appear, feel, remain, smell.

Adjectives
Adjectives modify or limit the meaning of nouns or pronouns, usually by describing, quantifying, or identifying those words and is often described as determiners. An adjective answers the question what kind, which one, how many or how much.

A describing adjective would be... Josh threw the yellow ball. A quantifying adjective would be... We caught several sunfish last weekend. A identifying adjective would be... Carol tried hard to win that race.

The most widely recognized adjectives are those words, such as big, old, and tired that actually describe people, places, or things. These words can themselves be modified with adverbs, as in the phrase very big.

Besides being used to modify a meaning, adjectives can be used to compare items.

a comparative adjective would be: This year's graduating class was smaller than last year's class. another comparative adjective would be: This year's offensive line was the smallest in the past few decades.

Finally, adjectives can be pronouns. Pronouns used as adjectives usually show ownership.

A pronoun used as an adjective would be: Shelia bought her first car yesterday. Another pronoun used as an adjective would be: The Smith's saw their dreams crumble when they were denied a mortgage.

Adjectival Phrase
An adjectival phrase is a phrase with an adjective as its head (e.g. full of toys). In English, an adjectival phrase may occur as a post-modifier to a noun (a bin full of toys), or as a predicate to a verb (the bin is full of toys and clothes).

Adverbs
Adverbs are modifiers or descriptive words, phrases, or clauses that bring detail to your sentences. An adverb answers the question where, when, how or to what extent. They modify verbs, adjectives, other adverbs, or entire clauses. Once you figure out what word you want to modify, you are able to choose which modifier you need. Many adverbs end in -ly except for always, never, very and well. The most commonly used adverb is not.

Difference between adverbs and adjectives
Adjectives and adverbs answer different questions. An adjective modifies a noun or pronoun and answers these questions:
 * Which: the latest magazine arrived.
 * What kind: a huge difference remained.
 * How many: the three books were different.

An adverb modifies a verb an answers these questions:
 * When: tomorrow, the storm will quit.
 * How often: students change majors frequently.
 * Where: the class is held here today.

When choosing between an adjective and adverb, determine the word being modified and then figure out its part of speech.

Forming adverbs
Often adverbs are formed from adjectives, but some are not derived from other words such as again, almost, always, never, here, there, now, often, seldom, well. The adverbs that are derived from adjectives can be formed by adding the suffix -ly to the ending.
 * beautifully
 * strangely
 * cleverly
 * respectfully

Remember that an -ly does not make the word an adverb. Some adjectives also end in -ly such as friendly and lovely.

Placement
The location of the adverb in a sentence can change the rhythm and emphasis dramatically.
 * Formerly, Star Wars was just three movies.
 * Star Wars was formerly just three movies.

Conjunctions
con‧junc‧tion Pronunciation Key -[kuhn-juhngk-shuhn]

Conjunctions join words, phrases or clauses within a sentence. They illustrate a relationship between the elements that are being joined.

Coordinating Conjunctions for, and, nor, but, or, yet, and so are coordinating conjunctions. These are conjunctions of two grammatically equal elements such as two nouns or two clauses. This can also be remembered through the acronym FANBOYS.

Example: I like apples and oranges.

Correlative Conjunctions come in pairs such as either...or, neither...nor, not only...but also. These conjunctions also connect two equal grammatical elements.

Example: I will have either pasta or pizza for dinner.

Subordinating Conjunctions After, although, as if, because, even though, once, in order that, and rather than are some common subordinating conjunctions. These are conjunctions that introduce a subordinate clause and illustrate a relationship with the rest of the sentence.

Example: Although I would rather party tonight, I will go to the library instead.

Conjunctive Adverbs are used to show a relationship between two independent clauses (complete sentences). Some examples are accordingly, furthermore, therefore, however.

Example: I always brush my teeth; therefore, I have no cavities.

Prepositions
Prepositions are words that come before a noun or pronoun that form a phrase that modifies another phrase within the sentence. This phrase, the prepositional phrase, usually functions as an adjective or adverb and often indicates a position or place.

Some examples of prepositions:

about, above, after, along, among, as, before, behind, below, beside, between, by, despite, during, for, in, into, like, of, onto, opposite, over, past, regarding, since, and with.

Example: He brought his furniture into the apartment.

Some common compound prepositions:

according to, except for, in front of, next to, as well as, instead of, due to, in spite of, because of, and with regard to

Prepositional Phrases begin with a preposition and most often end with a noun. The noun is known as the object of the preposition. There are several different types of prepositional phrases classified by the type of word it modifies.

Adjective prepositional phrases most often modify the noun directly before the prepositional phrase. These usually answer the questions which one? or what kind of?. Example: The thoughts of the professor were closed minded. of the professor is the prepositional phrase which modifies thoughts. What kind of thoughts? Those of the professor.

Adverbial prepositional phrases modify a verb within the sentence. These usually answer the questions ''When? Where? How? Why? Under what conditions? and To what degree?''

Example: You cannot judge a book by its cover. The prepositional phrase, by its cover, modifies the verb judge. How can you not judge a book? By its cover.

Interjections
inter·jection ---The word "interjection" literally means "thrown in between" from the Latin inter ("between") and iacere ("throw").

The part of speech that usually expresses emotion and is capable of standing alone. This uses an exclamation marker (!), also known as the exclamation point. Even when interjections are a part of a sentence, they don't directly relate to the grammar of that sentence. Interjections take on more than one of the following usages:

-sudden outburst -a form of salutation -to emphasize in the imperative mood

Words belonging to this part of speech, such as: Ugh! or Wow! Oh! Hey! Ow!

Active vs. Passive Voice
A shift between active voice and passive voice is confusing to readers and should be avoided at all times. If you do shift voice, justify it and have a reason for it.

Voice refers to the verb's ability to show whether a subject receives or acts the action received by the verb. When using the active voice, the subject performs the action.

For Example: The boy ran straight home at dinner time <The boy---the subject, did the actionhe ran.

In writing, active voice is more dramatic and often users fewer words than passive voice in English. There will be introduced more in the "active and passive" section later.

Types of Sentences
In English there are three main types of sentences. They function according to the usage and pragmatics. They are also referred to as moods, in English. The fourth type of sentence might be termed as interrogative.

Indicative The indicative mood is used in factual statements. All intentions in speaking that a particular language does not put into another mood use the indicative. It is the most commonly used mood and is found in all languages. Example: "Paul is reading books." or "Paul reads books."

Imperative The imperative mood expresses commands, direct requests, and prohibitions. In many circumstances, directly using the imperative mood seems blunt or even rude, so it is often used with care. Example: "Read that book, Paul!" Subjunctive The subjunctive mood has several uses in independent clauses. Examples include discussing hypothetical or unlikely events, expressing opinions or emotions, or making polite requests (the exact scope is language-specific). Example: " God bless America."

Tag Question
A type of question where a pronoun is attached to the end of the declarative clause, where the pronoun agrees with number and gender of the subject in the declarative clause.

Tag questions are used for the purpose of emphasis.

When using tag questions there are four things to watch for:

1. What kind of verb is it?

2. What tense is the verb?

3. Is the sentence affirmative or negative?

4. Do you change the pronoun?

Some additional things to look for when using tag verbs are:

~Copy the auxiliary after the end of the declarative clause

~Insert a "do" support where the auxiliary is missing (Note that the "do" support agrees in number and tense.)

~If the declarative clause is negative, then the tag should be positive.

~If the declarative clause is positive, then the tag should be negative.

For Example: ~  We are meeting at 7 o'clock, aren't we? The tag question would be "aren't we" to make an emphasis on the first part of the sentence. ~  '''He won't drive in the storm, will he? '''        The tag question in this example is "will he"

Wh-Question
There can be nine types of Wh questions based on the sentence structure.The "Wh" words that forms the questions are:

Who (or Whom) ?-Person

What?--Object/Idea/Action

Whose?-Possession

Which?-Specific subject

When?--Time

Where?-Place

Why?---Reason

How?---Manner

The Wh word can function as the subject, object or possessive determiner of the interrogative clause.

For example: Who gave John permission to watch movies? (subject) From whom did John get permission to watch movies? (object) Whose book did John read yesterday? (possessive determiner)

There are few generalizations which can be noted here:

 * 1) If the 'Wh' is the subject then the structure of the sentence remains intact
 * 2) If the 'Wh' is not the subject then auxiliary inversion is required to form the question

To form questions with 'Wh' word?

 * 1) Begin with the 'Wh' word
 * 2) If the 'Wh' word is the subject then no change in the structure is required
 * 3) If 'Wh' word is not the subject then subject-auxiliary inversion is required
 * 4) If the auxiliary is missing, then appropriate "do" support is to be added to form the question
 * 5) The "do" support should match in tense and number and it will change the verb to bare infinitive.

The grammar used with 'Wh' questions depends on if the topic being asked about is the subject or predicate of a sentence. When using the subject pattern, you will need to input the person or thing being asked about with the appropriate 'Wh' word for that sentence.

For example: Jack is playing with Jill a. Who is playing with Jill? ('Wh' word is the subject -- somebody is doing the action of playing) b. To whom is Jack playing music? ('Wh' word is the object -- somebody is receiving the action of Jack's playing)

Clauses
A clause is a group of words with a subject and a predicate. A sentence containing a single clause is called uniclausal and a sentence with more than one clause is called multiclausal. Clauses having one finite verb, as in uniclausal or minimum of one finite verb construction in a multiclausal structure is called finite clauses. A clause having a non-finite verb is called a non finite clause.

An independent clause is part of sentence that can function as a stand-alone structure. A dependent clause on the other hand cannot function by itself and needs an independent clause to complete its meaning.

A third type of clause is known as matrix clause, which function as an independent clause but requires a complement clause to complete the meaning.

Subordinate Clause

Subordinate clauses are sometimes called dependent clauses. They begin with a subordinate conjunction or a relative pronoun and contain both a subject and a verb. Some common subordinate conjunctions are: although, since, before, because, after, if, whenever, which, and when. example: Although it was dark outside, Jill went to play basketball.

Relative Clause

A relative clause functions as a modifier and works as an adjective. It has four main features:

1. contains a subject and a verb 2. begins with a relative pronoun-who, whom, that, which, whose or a relative adverb-why, when, where 3. functions as an adjective 4. can be restrictive or non-restrictive

Example of a restrictive relative clause: Participants in this marathon who are high school students need to bring permission slips signed by their parents.

Example of non-restrictive relative clause: Participants in this marathon, who come from all over the city, must sign in by 8AM. 1.A restrictive relative clause would change the meaning if deleted, so commas aren't needed. (In the example above, the clause restricts the people who need to bring permission slips to only the high school students.)

2.A non-restrictive relative clause is just extra information about the subject and may be omitted without changing the meaning.

Complement Clause

A complement clause is a notional sentence or predication that's an argument of a predicate

example: I know that it is raining hard.

There are three types of complement clauses: ordinary, noun, and adjective

Noun Clauses

Noun clauses can function as a subject, subject complements, objects of prepositions, or direct objects. So a noun clause cannot stand apart but is always contained within a clause. A few examples of noun clauses that usually will begin with a relative pronoun are: that, whomever, whose, which, and whoever. Here the construction of the clause occurs directly after the noun phrase.

For Example: He asked when she went to the library. The italicized section is an example of a direct object function.

He was looking for whichever car was the best find. In this example, the section in italics is an object of a preposition.

For instance, in the first example for the independent clause isn't just he asked but he asked when she went to the library.

Adjective Clauses

Adjective clauses modify nouns and pronouns in other clauses.

A adjective clause always begins with a relative pronoun (that, who, whom, whose, which) or a relative adverb (where, when, why).

For Example: The test, which took an hour, earned me an A for the class. Have you seen the desk where Kelsi sat? -The parts in italics are the adjective clauses for the nouns test and desk.

Adverb Clauses

Adverb clauses modify a verb, an adjective or an adverb.

Adverb clauses begin with subordinating conjunctions: when, because, than, where, before, after

For Example: Hitchcock paved the way for directors when he created a new filmmaking style. (when... modifies the verb) Hitchcock was important because he proved that horror doesn't need gore. (because... modifies the adjective)

Ordinary Clauses

An ordinary clause functions like a complement clause using that as the most common word to form the structure. For example: That the earth is flat was a common misperception.

The italicized portion suggests an ordinary complement clause in the subject position.

Partitive
Partitive construction helps to modify count and non-count nouns.It denotes a part of a whole. The partitive noun phrase agrees in number and tense according to its appearance in the subject place.It takes the following structure:

NP (count)+of+ NP.

example: A pair of shoes is what I need. (the partitive is in italics) A lot of work is required before this project is over. (the partitive is in          italics)

Collective
This is a usage which is based on the semantic and pragmatic use of the language. A variation could be noted in Standard American English (SAE) and British English (BE).

examples: The home team has routed the visitors. (SAE) The home team have routed the visitors. (BE)

Phrasal Verb
A phrasal verb is a phrase construction which is made up of a verb and an adverbial particle or a preposition. It is also understood as an idiomatic construction where the meaning is different from the sum of its parts. It can be either prepositional (non separable) or particle verbs (separable).

prepositional: The parents called on the teacher.

particle verb: He looked the number up.


text:
Haiku

The Unofficial Handbook

Frustrated user Of Windows, Linux, and Mac: Find peace in Haiku

Contents
' NB: This is not the final contents list. Please discuss this book in the discussion page before doing anything. '
 * 1) Introduction
 * 2) Setting up Haiku
 * 3) * On a Hard Drive
 * 4) * On a PC Emulator
 * 5) ** QEMU
 * 6) ** MS Virtual PC
 * 7) ** VirtualBox
 * 8) * Troubleshooting
 * 9) Haiku Basics
 * 10) * Introduction
 * 11) * The Desktop
 * 12) * The Deskbar
 * 13) * Tracker
 * 14) Advanced Desktop Features
 * 15) * Introduction
 * 16) * Workspaces
 * 17) * Twitcher
 * 18) * Quick Switch
 * 19) * The Team Monitor
 * 20) * The 'Open With' Window
 * 21) * Opening a File through Drag and Drop
 * 22) * Clippings
 * 23) * Add-ons
 * 24) * Finding Files and Folders: Queries
 * 25) Internet and Networking
 * 26) * Introduction
 * 27) * Supported Hardware
 * 28) * Setting Up Your Internet Connection
 * 29) ** Using a Modem
 * 30) ** Using Broadband
 * 31) * E-Mail
 * 32) ** Setting Up Your E-mail
 * 33) ** E-Mail Programs
 * 34) * Web Browsers
 * 35) ** NetPositive
 * 36) ** Mozilla Firefox
 * 37) Audio and Video
 * 38) * Introduction
 * 39) * Media Hardware
 * 40) * Media Preferences
 * 41) * Sounds Preferences
 * 42) * Media Players
 * 43) ** MediaPlayer
 * 44) ** MidiPlayer
 * 45) * Digital Cameras
 * 46) * TV
 * 47) * SoundRecorder
 * 48) * CD Burning
 * 49) Preferences: Customizing your Desktop
 * 50) * Introduction
 * 51) * Backgrounds
 * 52) * DataTranslations
 * 53) * Devices
 * 54) * DriveSetup
 * 55) * FileTypes
 * 56) * Fonts
 * 57) * JoySticks
 * 58) * Keyboard
 * 59) * Keymap
 * 60) * Mouse
 * 61) * Printers
 * 62) * Screen
 * 63) * ScreenSaver
 * 64) * ScrollBar
 * 65) * Time
 * 66) * VirtualMemory
 * 67) * Workspaces
 * 68) Appendices
 * 69) * Introduction
 * 70) * Windows
 * 71) * Menus
 * 72) * Mouse
 * 73) * Keyboard
 * 74) * Shortcuts

Contributers

 * George Wyatt (Gwyatg)
 * Ville Koskinen (w-ber)

Haiku Book

title: Haiku


text:
Talk:Haiku

About the contents
I've taken the contents from the BeOS manual. I'll chop and change it when I get some time. Anyone got any suggestions? --Gwyatg 01:43, 3 November 2005 (UTC)

Looks good
Well, I think it's good enough for those willing to start working on. Especially the beginning part that covers running Haiku on virtual machines.

--Hartsu 14:38, 8 November 2005

Introduction
I took the liberty to write a draft of the introduction. Excuse me the obvious Haiku love that's shining through the text, though. :) --W-ber 18:17, 16 December 2005 (UTC)

You know, I'd very much like to spend more time on this collaboration project. The ideal setup for me would be that the infamous Someone Else outlined what each chapter should contain (more than just titles), collected the facts, and then either listed them or wrote a draft text. I could then edit, extend, provide examples, screenshots, and other stuff. I don't live and breath in the BeOS land, sadly, so I don't feel confident enough in teaching others how to do things. --W-ber 18:53, 16 December 2005 (UTC)

Sorry about not being around - my interest in Linux was restored :) Anyone who wants to take the book over may.

The table of contents are based on the (BeOS 5 User's Manual), so that should give you an idea of what each chapter was to contain.

Again, I'm sorry that I won't be around anymore, but since I'm not very experienced with BeOS/Haiku it shouldn't be too much of a problem for you.

--Gwyatg 08:30, 4 January 2006 (UTC)

I don't know if this will ever be official, but I needed an easy way to add documentation as I was able to, so count me in. I will add things as I am able and have time - good documentation is a must for Haiku. Darkwyrm 01:26, 30 March 2006 (UTC)

Hi, I'm planning to work on this too. I've fleshed out the section on the Deskbar a little and plan to dig into the rest of it as time permits. Also, any objections/suggestions around moving this over to the official Haiku wiki? I think they use the same license (GFDL) and it might attract some more interest over there, which would be nice considering it's quite a big task. --Hn 11:24, 26 April 2006 (UTC)

title: Talk:Haiku


text:
High School Mathematics Extensions/Further Modular Arithmetic/Multiplicative Group and Discrete Log

Introduction
Group theory is one of the most important mathematical theories today. ...more motivation to come

Let p be a prime then the multiplicative group mod p is the set of numbers {1, 2, .., p - 1}. As the name suggests, in a mod p group, multiplication is the main and only concern. Notice that in the multiplicative group of order p - 1, every element has an inverse. This is a key requirement for a group. In general group theory, for G to be a group, it must
 * 1) be made up of a set of things
 * 2) * in this case the numbers 1 to p - 1,
 * 3) have a binary operation
 * 4) * in this case multiplication,
 * 5) be closed under the operation, i.e. if a and b are things belonging to the group then ab must also belong to the group
 * 6) * this is definitely satisfied in modulo p arithmetic
 * 7) have an identity
 * 8) * in this case the number 1
 * 9) every element has an inverse under the operation
 * 10) * in mod p since we have excluded 0 from the group this is satisfied.

Basically a group needs to have a 1 and every other element must have an inverse. In modular arithmetic, a group is very special because it is also commutative (ab = ba) where as for a general group, commutativity is not required. A commutative group is called an abelian group, named after the Norwegian mathematician, Abel.

On a side note, multiplicative groups modulo p have a finite number of elements. In general group theory, a group can have infinitely many elements.

 info -- Abel Prize The Abel's prize. ...more to come

The discrete log problem
Recall the log function defined in real numbers. Let bx = y, taking the log to be base b we get x = logb(y), so given b and y we can solve for x. But in modular arithmetics the same problem can be quite hard to solve.

Take for example, we know that 5x ≡ 172 (mod 263) for some x. Finding the x is not easy. The most simple way seems to be trying x = 2, 3, ... and so on. In fact for p a prime, and if given ax ≡ b, finding x is the so called discrete log problem and there is no known efficient way for solving it.

Lack of efficient algorithm is not the only problem though. Consider 2x ≡ 5 (mod 7), there is no solution! ...more to come

We will present a quite powerful way for solving the discrete log problem a little later in the chapter, called the Pohlig-Hellman algorithm. It works by using the Chinese Remainder Theorem and breaking the problem into components. At this moment though we should try to gain some sense of just how difficult the discrete log problem is.

Exercises
1. Find x such that 3x ≡ 6 (mod 7)

2. Find x such that 2x ≡ 48 (mod 61)

3. Find x such that 5x ≡ 172 (mod 263)

Order
The order of a group refers to the number of element in the group. E.g. the multiplicative group mod 17 has order 16. For a start we should only consider multiplicatives group mod a prime p, so a group has order p - 1. If G is a group then we denote the order of the group by |G|.

The order of an element, g, in a group G refers to the smallest number k ≠ 0 such that gk ≡ 1. We denote the order of g by |g|, so gundefined ≡ 1. There are two very important and fundamental theorems we want to discuss. The first we have met a number of times already. It states that
 * If G is a (finite) group and g is an element of the group, then
 * $$g^{|G|} = 1 \!$$

The proof of the theorem is similar to that of the FLT. Let a be an element of G and let the gi's be the elements of G. Let's consider,
 * $$a, ag_1, ag_2, ag_3, ..., ag_{|G| - 1} \!$$

there are |G| elements above, and they must all be different. To see this let's suppose the opposite, i.e. $$g_i \ne g_j \!$$ but $$ag_i \equiv ag_j \!$$ then since a belongs to a group, there must exist a-1, multiply both sides by the inverse of a we get $$g_i \equiv g_j \!$$ which is a contradiction.

Therefore, we can say the above list is just the |G| elements of G in a different order, we get
 * $$a(ag_1)(ag_2)(ag_3)\cdots (ag_{|G| - 1}) \equiv g_1g_2\cdots g_{|G| - 1} \!$$

to save some writing, let's say
 * $$s \equiv g_1g_2\cdots g_{|G| - 1} \!$$

so we have
 * $$a^{|G|}s \equiv s \!$$

but s belong to the group therefore s-1 exists, and we get
 * $$a^{|G|} \equiv 1 \!$$

as required.

The reader should be persuaded to compute the order of every element in mod 17. If that is done it should be noted that the order of every element divides 16, the order of the group. This fact is generally true and is known as the Lagrange's Theorem.

Lagrange's Theorem
Let G be a (finite) group, and let g be an element of the group. The order of g must divide the order of the group G. More symbolically, |g| divides |G|.

We will give a proof of the above, but the reader should try and come up with their own justifications.

 Proof  Let g be an element of G. We know that
 * $$g^{|G|} \equiv 1 \!$$

Let's compute the remainder of |G| divided by |g|, i.e. we find r < |g| and q such that |G| = q|g| + r. So we have
 * $$g^{|G|} = g^{|g|q + r} \equiv (g^{|g|})^qg^r \equiv g^r \equiv 1 \!$$

but r is smaller then the order of g, so r = 0. Therefore we have q|g| = |G|, and so the order of g divides the order G.

 Summary  Let G be a group and g be an element of the group, then 1. gundefined = 1, and 2. |g| divides |G|

Exercises
1. Compute the order of all the elements mod 47.

2. Compute the order of all the elements mod 137.

3. The number 3 has order 16 mod 17. Find all the other elements in mod 17 with order 16.

Generator
We have shown that in mod 17, the number 3 has order 16. This is actually very interesting, because it says that every element in the mod 17 group can be expressed as a power of 3, as can be confirmed below
 * $$3^0 \equiv 1$$
 * $$3^1 \equiv 3$$
 * $$3^2 \equiv 9$$
 * $$3^3 \equiv 27 \equiv 10$$
 * $$3^4 \equiv 30 \equiv 13 \equiv -4$$
 * $$3^5 \equiv -12 \equiv 5$$
 * $$3^6 \equiv 15 \equiv -2$$
 * $$3^7 \equiv -6 \equiv 11$$
 * $$3^8 \equiv 33 \equiv 16 \equiv -1$$
 * $$3^9 \equiv -3 \equiv 14$$
 * $$3^{10} \equiv -9 \equiv 8$$
 * $$3^{11} \equiv 24 \equiv 7$$
 * $$3^{12} \equiv 21 \equiv 4$$
 * $$3^{13} \equiv 12 \equiv -5$$
 * $$3^{14} \equiv -15 \equiv 2$$
 * $$3^{15} \equiv 6$$
 * $$3^{16} \equiv 1$$

If g is so that every other element in G can be expressed as a power of g then g is called the generator of G, in the sense that g can be used to generate every other element. In other books, g may also be called a primitive element.

It is a remarkable fact that if p is a prime then the multiplicative group mod p has a generator. A proof will be given later. For now let's discuss the implications of this fact. For a start, if g is a generator, then it makes sense to talk about log to the base g, which in number theory is called the index to base g, because every element h = gx, so indg(h) = x. Therefore if we are given
 * $$h \equiv k^x \!$$

for some unknown x, we take the index of both sides
 * $$\operatorname{ind_g}(h) = x\ \operatorname{ind_g}(k) \!$$

make x the subject, we get
 * $$x = \frac{\operatorname{ind_g}(k)}{\operatorname{ind_g}(h)} \!$$

we have essentially converted a general discrete log problem to a discrete log problem to the base g, where g is a generator. Therefore, if we can solve the discrete log problem to a base g, then we have solved every discrete log problem.

But solving the discrete log problem to a base g (generator) is also very hard. Actually finding a generator is not easy either.

Let's get back to the mod 17. Notice that there are actually 8 generators. They are 3, 10, 5, 11, 14, 7, 12 and 6. It is not a coincidence that φ(17 - 1) also equals 8.

Exercises
1. Find all the generators of 41.

2. Given that 6 is a generator mod 41. Find the discrete log to the base 6 of 17 (mod 41).

3. How many generators are there in mod 709. Note that 708 = 22 × 3 × 59.

...more to come

Existence of a generator
In this section, we will show that there must exist a generator in mod p prime. Suppose an abelian (multiplicative) group G has order p - 1 (i.e. {1,2,3,...p - 1} are the elements of G and arithmetic is performed mod p), let g be the element of G of maximal order, i.e. |g| ≥ |h| for any element h in G.

Now consider the equation
 * $$x^{|g|} \equiv 1 \pmod{p} \!$$

or equivalently
 * $$x^{|g|} - 1\equiv 0 \pmod{p} \!$$

the element g definitely satisfies the above equation, but so does any power of g. It can be confirmed
 * $$(g^a)^{|g|} \equiv (g^{|g|})^a \equiv 1^a \equiv 1 \!$$

in other words, we can factorise the polynomial as follows
 * $$x^{|g|} - 1 = (x - 1)(x - g)(x - g^2)\cdots (x - g^{|g|-1}) \equiv 0 \!$$

We can show that only powers of g can satisfy the above equation. Suppose otherwise, i.e. if an element h is not a power of g, but h also satifies hundefined ≡ 1, then substitute h into the equation above, we get
 * $$h^{|g|} - 1 = (h - 1)(h - g)(h - g^2)\cdots (h - g^{|g|-1}) \equiv 0 \!$$

since by assumption h is not a power of g, so none of the terms above is zero, therefore they must have inverses. Multiply each term by its inverse. We end up with
 * $$1 \equiv 0 \!$$

which is absurd! Contradiction! Therefore only powers of g can satisfy xundefined ≡ 1 (mod p).

Now if we show that every element in G must satisfy xundefined ≡ 1, then we are done. Let's suppose there is an element h such that h does not satisfy the equation, then |h| does not divide |g|. Thereofore we must have
 * $$|gh| = \frac{|g||h|}{\gcd{(|g|,|h|)}}$$

(see exercise if this is unclear) which is greater than |g|. But this is a contradiction of the fact that g has maximal order! Therefore every element of G must be a power of g and so g is the generator of G.

The above shows that in mod p prime, there is always a generator, but it doesn't tell us how to find one. As of today, there is no widely known efficient algorithm for finding the generator for a general p.

Exercises
0. (Optional) Show that lcm(a,b)×gcd(a,b) = ab, where lcm(x,y) denotes the lowest common multiple of x and y. E.g. lcm(5,7) = 35 and lcm(14,49) = 98.

1. Show in mod p, |ab| = lcm(|a|,|b|) where lcm(x,y) denotes the lowest common multiple of x and y. E.g. lcm(5,7) = 35 and lcm(14,49) = 98.

Subgroup
...more to come

*Pohlig-Hellman Algorithm*
We are now ready to learn about the Pohlig-Hellman algorithm for finding the discrete log. As mentioned above, it works by breaking the problem into components. We will probably need a calculator for this section.

Let's consider a simple case first. Let p = 113 and given 3 is a generator mod 113, we want to find a x such that 3x ≡ 38. We can assume that
 * x = 0, 1, 2, ..., or 111

(as x112 ≡ 1 ≡ x0 ). So x is like a value in mod 112 = 247. By the CRT x can be uniquely represented as a two-tuple.

Let's assume
 * $$x \equiv a_0 + 2a_1 + 2^2a_2 + 2^3a_3 \pmod{2^4} \!$$

we represented x in the funny way above so that we can obtain the values more easily (as will be clear soon), and
 * $$x \equiv b \pmod{7} \!$$.

where $$a_i$$ takes value 0 or 1, and b takes value 0, 1, 2, 3, 4, 5, or 6.

The algorithm is completed in three stages, we will describe each in turn. Firstly, we want to compute the values of $$a_0, a_1, a_2$$ and $$a_3$$. We compute the following values we did this so we can look it up later.
 * 1) $$3^{0\frac{112}{2}} \equiv 3^0 \equiv 1$$
 * 2) $$3^{1\frac{112}{2}} \equiv 3^{56} \equiv -1 \equiv 112$$

Now consider
 * $$a = 38^\frac{p - 1}{2} \equiv 3^{x\frac{p - 1}{2}} \equiv 3^{(a_0 + a_12 + a_22^2 + a_32^3)\frac{p - 1}{2}} $$

and so
 * $$a = 3^{(a_0\frac{p - 1}{2} + a_1(p - 1) + a_22(p - 1) + a_32^2(p-1))} \equiv 3^{(a_0\frac{p - 1}{2})}$$

now we compare a to the values computed above, if a equals 1 then we can conclude that $$a_0$$ = 0, otherwise if a equals -1 then we can conclude that $$a_0$$ = 1. So we have uncovered the value of $$a_0$$.

To find out $$a_1$$ we notice that
 * $$38^{\frac{p-1}{2}}3^{-a_0\frac{p-1}{2}} \equiv 3^{(x - a_0)\frac{p - 1}{2}} \equiv 3^{(a_1(p - 1) + a_22(p - 1) + a_32^2(p-1))} \!$$

so compute

now if a = 0 then $$a_1 = 0$$ and $$a_1 = 1$$ otherwise.
 * $$a \! $$ ||$$ = \!$$ ||$$38^{\frac{p-1}{2^2}}3^{-a_0\frac{p-1}{2^2}} \equiv 3^{(x - a_0)\frac{p - 1}{2^2}} \!$$
 * || $$ \equiv \!$$|| $$3^{(a_1\frac{p - 1}{2} + a_2(p - 1) + a_32(p-1))}$$
 * || $$ \equiv \!$$|| $$3^{(a_1\frac{p - 1}{2})} \!$$
 * }
 * || $$ \equiv \!$$|| $$3^{(a_1\frac{p - 1}{2})} \!$$
 * }

In the same way, compute
 * $$38^{\frac{p-1}{2^3}}3^{(-a_0-2a_1)\frac{p-1}{2^3}} $$

and then
 * $$38^{\frac{p-1}{2^4}}3^{(-a_0-2a_1-2^2a_2)\frac{p-1}{2^4}} $$

to determine the values of $$a_2$$ and $$a_3$$.

Now to determine the value of b. Let's compute the following 7 values
 * 1) $$3^{0\frac{112}{7}} \equiv 3^0 \equiv 1$$
 * 2) $$3^{1\frac{112}{7}} \equiv 3^{16} \equiv 49 $$
 * 3) $$3^{2\frac{112}{7}} \equiv 3^{32} \equiv 28 $$
 * 4) $$3^{3\frac{112}{7}} \equiv 3^{48} \equiv 16 $$
 * 5) $$3^{4\frac{112}{7}} \equiv 3^{64} \equiv 106 $$
 * 6) $$3^{5\frac{112}{7}} \equiv 3^{80} \equiv 109 $$
 * 7) $$3^{6\frac{112}{7}} \equiv 3^{96} \equiv 30 $$

then we compute
 * $$a = 38^{\frac{112}{7}} \equiv 3^{x\frac{112}{7}} \equiv 3^{b\frac{112}{7}}$$

and compare with the values computed above to obtain b.

If we have computed the values of a 's correctly, then we should see that
 * $$a_0 = 1$$
 * $$a_1 = 1$$
 * $$a_2 = 1$$
 * $$a_3 = 1$$

and
 * b = 6.

Now solve
 * $$x \equiv 1 + 2 + 2^2 + 2^3 \equiv 15 \pmod{16} \!$$
 * $$x \equiv 6 \pmod{7} \!$$

to obtain x = 111. Therefore 3111 = 38.

The combination of simultaneous modular equations is done via chinese remainder theorem:
 * $$x = a*7*(7^{-1} \mod{16})+b*16*(16^{-1} \mod{7}) \pmod{112}$$
 * $$x = 15*7*7+6*16*4 \pmod{112} = 111$$

...more to come