text:
Folkstyle Wrestling/Rules

The Objective
There are three basic victory conditions in a wrestling match:
 * Pinning your opponent (Win By Fall)
 * Scoring more points than your opponent in the time alotted (Win By Decision)
 * Scoring 15 points more than your opponent at any point during the match (Win By Technical Fall)
 * In team tournaments and meets, different points are awarded to the team, depending on whether or not a pin occurred, how large the point spread was at the end of the match one.

The Format

 * Three periods
 * Can be different amount of time for periods depending on the league
 * For College the Norm is usually 3-2-2
 * For High School the Norm is usually 2-2-2
 * For Modified and Youth the Norm is usually 1-1-1

The Three Positions

 * Neutral
 * Referee's Position
 * Top
 * Optional/Freestyle
 * Bottom

Ways to Score
There are 5 ways to score-

 * Takedown- Defined as taking opponent from feet to mat. This is worth 2 points.

 * Escape- Defined as escaping opponent's control and facing him. This is worth one point.

 * Reversal- Defined as coming from mat, and taking opponent to mat, in a single move/move combo, which is worth 2 points.

 * Nearfall- Points gained when opponent's back/shoulders break the 45 degree plane with respect to the mat for a duration of time. A two-four count awards you 2 points, then a 5 count awards you 3 points.
 * Riding Time-Defined as being in control on the mat, for a long period of time, usually used in collegiate wrestling. If one wrestler has more than 1 minute more of riding time than his opponent, he is awarded 1 point at the end of regulation time.

Penalties

 * Stalling
 * Fleeing the mat

 * locking hands around waist on ground without 2points of body

Note:(When a wrestler lifts another off the mat, it is the lifting wrestler's responsibility to ensure the other's safe return to the mat.)

 * Locking hands strictly around an opponent's waist while on the mat.

 * Potentially Dangerous
 * Choking
 * Full Nelson
 * Body Figure Four
 * Head Scissors
 * Chicken wing (extended past a certain point)
 * Arm across the back above 90 Degrees

 * Unsportsmanlike conduct
 * Swearing
 * Striking
 * Unnecessary Roughness
 * Grabbing of the singlet
 * Throwing your headgear
 * physically hurting your opponent for revenge of previous match
 * Smack Talking
 * Pulling opponents head gear off or making it an obstruction of view

title: Folkstyle Wrestling/Rules


text:
Circuit Theory/Bode Plots

Bode Plots
Bode plots plot the transfer function. Since the transfer function is a complex number, both the magnitude and phase are plotted (in polar coordinates). The independent variable ω is swept through a range of values that center on the major defining feature such as time constant or resonant frequency. A magnitude plot has dB of the transfer function magnitude on the vertical axis. The phase plot typically has degrees on the vertical axis.

Example 1
Previously the transfer function was found to be:
 * $$H(s) = \frac{\mathbb{V}_{cr}(s)}{\mathbb{V}_s(s)} = \frac{1}{CLs^2 + \frac{Ls}{R} + 1} = \frac{1}{s^2 + 2s + 1} $$

MatLab has a short hand notation method for entering this information where the coefficients are listed (high power to low power)(numerator first, then denominator). For this example f = tf([1],[1 2 1]) Leaving the colon off the end should display the transfer function. The next step is to plot it: grid on bode(f) The result is a low pass filter. Rather than understand how to create these plots (not trivial), the goal is to interpret the plot .. (which is almost the same thing). But at this point, the goal is to exercise MatLab.

Example 2
Previously the transfer function was found to be:
 * $$\frac{\mathbb{I}_o}{\mathbb{V}_s} = \frac{1000s^3 + 5*10^9s}{s^4 + 5*10^6*s^3 + 2.000015*10^{12}*s^2 + 3.5*10^{13}*s + 5*10^{13}}$$

f = tf([1000 0 5*10^9 0],[1 5*10^6 2.000015*10^12 3.5*10^13 5*10^13]) grid on bode(f)

Magnitude Graph
Bode magnitude plots are dB which is both a measure of power and voltage and current simultaneously. The vertical dB axis is not an approximation or relative to anything. The vertical axis is an accurate number. The horizontal, dependent axis could be radians/sec or Hz.

Phase Graph
The Bode Phase Plot is a graph where the radial frequency is plotted along the X axis, and phase shift of the circuit at that frequency is plotted on the Y-axis. Axis could be in radians or degrees, frequency could be in radians per second or Hz.

Poles and Zeros
A transfer function has 7 features that can be realized in circuits. Before looking at these features, the terms pole, zero and origin need to be defined. Start with this definition of a transfer function:
 * $$H(j\omega) = \frac{Z(j\omega)}{P(j\omega)}$$

 * Zeros are roots in the numerator.
 * Poles are roots in the denominator.
 * The origin is where s = jω = 0 (no real part in a Bode analysis). When the frequency is zero, the input is DC. This is where after a long time caps open and inductors short.

The 7 possible features in a transfer function are:
 * A constant
 * Zeros at the origin (s in the numerator)
 * Poles at the origin (s in the denominator)
 * Real Zero (an s+a factor in the numerator)
 * Real Pole (an S+a factor in the denominator)
 * Complex conjugate poles
 * Complex conjugate zeros

The bode and bodeplot functions are available in the MatLab Control system toolbox. BodePlotGui does the same thing and is discussed here. BodePlotGui was developed at Swarthmore through an NSF grant. There is a summary of the Swathmore Bode Diagram tutorial.

Circuit simulation software can plot bode diagrams also.

Bode Equation Format
let us say that we have a generic transfer function with poles and zeros:

 * $$H(j\omega) = \frac{(\omega_A + j\omega)(\omega_B + j\omega)}{(\omega_C+ j\omega)(\omega_D + j\omega)}$$

Each term, on top and bottom of the equation, is of the form $$(\omega_N + j\omega)$$. However, we can rearrange our numbers to look like the following:

 * $$\omega_N(1 + \frac{j\omega}{\omega_N})$$

Now, if we do this for every term in the equation, we get the following:

 * $$H_{bode}(j\omega) = \frac{\omega_A \omega_B}{\omega_C \omega_D}

\frac{(1 + \frac{j\omega}{\omega_A})(1 + \frac{j\omega}{\omega_B})} {(1 + \frac{j\omega}{\omega_C})(1 + \frac{j\omega}{\omega_D})}$$

This is the format that we are calling "Bode Equations", although they are simply another way of writing an ordinary frequency response equation.

DC Gain
The constant term out front:

 * $$\frac{\omega_A \omega_B}{\omega_C \omega_D}$$

is called the "DC Gain" of the function. If we set $$\omega \to 0$$, we can see that everything in the equation cancels out, and the value of H is simply our DC gain. DC then is simply the output when the input's frequency is zero.

Break Frequencies
in each term:

 * $$(1 + \frac{j\omega}{\omega_N})$$

the quantity $$\omega_N$$ is called the "Break Frequency". When the radial frequency of the circuit equals a break frequency, that term becomes (1 + 1) = 2. When the radial frequency is much higher than the break frequency, the term becomes much greater than 1. When the radial Frequency is much smaller than the break frequency, the value of that term becomes approximately 1.

Approximations
Bode diagrams are constructed by drawing straight lines (on log paper) that approximations of what are really curves. Here is a more precise definition.

The term "much" is a synonym for "At least 10 times". "Much Greater" becomes "At least 10 times greater" and "Much less" becomes "At least 10 times less". We also use the symbol "<<" to mean "is much less than" and ">>" to mean "Is much greater than". Here are some examples:

 * 1 << 10
 * 10 << 1000
 * 2 << 20 Right!
 * 2 << 10 WRONG!

For a number of reasons, Electrical Engineers find it appropriate to approximate and round some values very heavily. For instance, manufacturing technology will never create electrical circuits that perfectly conform to mathematical calculations. When we combine this with the < > operators, we can come to some important conclusions that help us to simplify our work:

If A << B:
 * A + B = B
 * A - B = -B
 * A / B = 0

All other mathematical operations need to be performed, but these 3 forms can be approximated away. This point will come important for later work on bode plots.

Using our knowledge of the Bode Equation form, the DC gain value, Decibels, and the "much greater, much less" inequalities, we can come up with a fast way to approximate a bode magnitude plot. Also, it is important to remember that these gain values are not constants, but rely instead on changing frequency values. Therefore, the gains that we find are all slopes of the bode plot. Our slope values all have units of "decibel per decade", or "db/decade", for short.

At Zero Radial Frequency
At zero radial frequency, the value of the bode plot is simply the DC gain value in decibels. Remember, bode plots have a log-10 magnitude Y-axis, so we need to convert our gain to decibels:

 * $$Magnitude = 20\log_{10}(DC Gain)$$

At a Break Point
We can notice that each given term changes its effect as the radial frequency goes from below the break point, to above the break point. Let's show an example:

 * $$(1 + \frac{j\omega}{5})$$

Our breakpoint occurs at 5 radians per second. When our radial frequency is much less than the break point, we have the following:

 * $$Gain = (1 + 0) = 1$$

 * $$Magnitude = 20\log_{10}(1) = 0db/decade$$

When our radial frequency is equal to our break point we have the following:

 * $$Gain = |(1 + j)| = \sqrt{2}$$

 * $$Magnitude = 20\log_{10}(\sqrt{2}) = 3db/decade$$

And when our radial frequency is much higher (10 times) our break point we get:

 * $$Gain = |(1 + 10 j)| \approx 10$$

 * $$Magnitude = 20\log_{10}(10) = 20db/decade$$

However, we need to remember that some of our terms are "Poles" and some of them are "Zeros".

Zeros
Zeros have a positive effect on the magnitude plot. The contributions of a zero are all positive:

 * Radial Frequency << Break Point : 0db/decade gain.
 * Radial Frequency = Break Point : 3db/decade gain.
 * Radial Frequency >> Break Point : 20db/decade gain.

Poles
Poles have a negative effect on the magnitude plot. The contributions of the poles are as follows:

 * Radial Frequency << Break Point : 0db/decade gain.
 * Radial Frequency = Break Point : -3db/decade gain.
 * Radial Frequency >> Break Point : -20db/decade gain.

Conclusions
To draw a bode plot effectively, follow these simple steps:

 * 1) Put the frequency response equation into bode equation form.
 * 2) identify the DC gain value, and mark this as a horizontal line coming in from the far left (where the radial frequency conceptually is zero).
 * 3) At every "zero" break point, increase the slope of the line upwards by 20db/decade.
 * 4) At every "pole" break point, decrease the slope of the line downwards by 20db/decade.
 * 5) at every breakpoint, note that the "actual value" is 3db off from the value graphed.

And then you are done!

Courtesy of UCB

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

title: Circuit Theory/Bode Plots


text:
Folkstyle Wrestling/Stance and Movement

Having a good stance is one of the most important skills to have in wrestling. As you will learn, a good stance is vital to your success. Throughout the book, we will be referring back to your stance and movement, so make sure that you master it now. A good stance will allow you to both defend against an opponents attack and initiate your own offensive moves. The finer points of the stance will be decided by your wrestling style (which you should already be formulating, based on the information in the last chapter) but the basic stance remains the same. Your knee's should be bent (to varying degrees based on style), your head should be up (more on this in the next chapter), and your weight should be distributed evenly throughout your foot (more on this in the next chapter as well). You may think that your stance is supposed to be comfortable... It's not. In order for you to get the maximum amount of both offense and defense, you are going to have to stand in an uncomfortable position. Figuring out your ultimate wrestling strategy will be discussed near the end of the book, but for now it is best to master all the different stances, so as to keep your options open. The different choices that you have during your stance include:
 * Purpose:

 * 1) Staggered Stance Or Square Stance
 * 2) Straight Back or Curled Back
 * 3) Forward Lean or Regular Lean
 * 4) High Stance or Low Stance
 * 5) Fingers Forward or Palms Forward

Let's go through all of these options in detail:

 * 1) Staggered or Square Stance
 * Movement
 * Don't Cross Feet
 * Lead Leg Movement in Staggered Stance
 * Forward Lean Versus Regular, Movement Changes

title: Folkstyle Wrestling/Stance and Movement


text:
User talk:128.227.69.138

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:128.227.69.138


text:
Apache Ant/Best Practices

Here are some of the Ant best practices that have been identified for creating maintainable Ant build files. Best Practices are not enforced by any compiler but they are conventions that allow people that are maintaining many projects to become quickly familiar with your build process.

Learn Ant Best Practices
Building your Ant Vocabulary
 * Study ant build scripts for other Open Source projects
 * Learn domain-specific targets such as building jar files, doing XML transforms or complex installs
 * Depending on diversity of tasks this might take a few hours to a few weeks

What to do about local file system paths
/Local Property Files/

/Local File Systems/

Standard Targets

 * /Standard Targets/

title: Apache Ant/Best Practices


text:
Biblical Studies/Christianity/Famous works of non-fiction

 * /Mere Christianity/ by C.S. Lewis
 * C(live) S(taples) Lewis (1898-1963) − British author, literary scholar, and Christian apologist. He wrote more than 40 books, the best-known being, The Screwtape Letters (1942). This satire is a masterpiece of diabolical wit and moral wisdom involving a correspondence between two devils, Screwtape, one of the upper echelon in Satan's "Lowerachy," and his nephew, "Dear Wormwood," a junior devil with an earthly mission, wherein the human "patient" is under close scrutiny. The Allegory of Love (1936), his major critical work, is a study of love in medieval literature. /Mere Christianity/, an expanded series of 1943 BBC radio chats, is most admired and influential across a wide spectrum of Christians, which may attest to the author's success in accomplishing the aim of restating theology in a way that avoids many controversies. He also wrote a well-known science-fiction trilogy and the /Chronicles of Narnia/ fantasies for children.


text:
Formal Logic

Written by volunteers and editors at Wikibooks, A Wikimedia Foundation Project

Detailed Content s

Brief Contents
 * 1) Preliminaries
 * 2) Sentential Logic
 * 3) Predicate Logic
 * 4) Identity Theory

title: Formal Logic


text:
Horticulture/Potato

Growing Conditions
Reducing the ground until completely free from root-weeds helps in potato husbandry; though in many seasons one cannot complete these operations without losing the proper time for planting, which never ought to come after the first of May, if circumstances do not absolutely prevent it.

Cutting the seed into small slips does not provide any advantage, for the strength of the stem at the outset depends in direct proportion upon the vigor and power of the seed-plant. Accordingly, make the seed plant large, rarely smaller than the fourth-part of the potato; and in the case of small seed-potatoes one may profitably use half of the potato. At all events, rather err in using over-large seed than in making it too small; because, by the first error, no great loss can ever be sustained; whereas, by the other, a feeble and late crop may result. With properly cut seed, it requires from ten to twelve hundredweight of potatoes to plant an acre (1.2 to 1.5 t/ha) of ground, where the rows lie twenty-seven inches (700 mm) apart; but this quantity depends greatly upon the size of the potatoes used; large potatoes may require a greater weight, but the extra quantity will abundantly pay off in the superiority of the crop which large seed usually produces.

Cultivation should go twelve inches deep, if the soil will allow it; after this, the gardener should open a hole (about six inches (150 mm) deep and not more than twelve inches (300 mm) in diameter).

There are two common alternate methods of growing potatoes by the amateur gardener. The first is container growing. One seed potato should be placed 15cm (6in) deep in a container which is 30cm (1ft) or more in diameter. Normal potting compost can be used. The amount of potatoes will obviously be small, but it's fun for the small garden.

The second method is to cover the planting area for early varieties with black polythene, simply held down with earth or bricks. The potatoes are planted at normal depth by cutting a '+' shaped hole in the plastic and planting with a trowel. The advantages are that the soil is warmed by the black polythene, giving the young plants protection from frost. The potatoes should be ready for harvest a couple of weeks earlier than normal.

Harvest
Potatoes are ready for harvest when the foliage first starts to die and turn yellow. Early (new) potatoes can be lifted earlier (no earlier than June) to get the very tastiest potatoes. In this case, harvest them about a week after the potato plant flowers first appear. New potatoes only produce a couple of handfuls of potatoes per plant, so dig up the whole plant.

Maincrop potatoes will be ready for harvest in mid-Autumn (start of September at the earliest). For all potatoes, dig them up from the side of the ridge (a fork or spade are both fine) to avoid damaging the potatoes. The foliage can be placed on the compost heap only if it completely free from disease - if not, burn it. If you don't need all the potatoes from a plant at one time or if you want a few early in the season, simply burrow around the roots with your hands and remove the potatoes you need. The remaining potatoes will continue to grow.

Remove any soil clinging to the potatoes and leave them on the soil for a few hours to dry out - if they are stored damp, they will rot. Leaving them on the soil surface in the sun will harden the skin slightly, doubling the storage time - this is especially important for maincrop potatoes. Store the potatoes in boxes or sacks, checking them every few days, removing all but those in good condition. Damaged or blemished potatoes should be eaten immediately.

One word of caution, some potato flowers may well turn to berries which are definitely poisonous. Eaten in sufficient amounts the berries can be fatal. You may wish to remove them if children are likely to see them.

Store up potatoes for winter and spring use; and as one should keep them as long through summer as possible, make every endeavor to preserve them from frost, and from sprouting in the spring months. For frost protection, cover them well with straw when lodged in a house, and by a thick coat of earth when deposited in a pit; to prevent sprouting, pick them carefully at different times, when they begin to sprout, and dry them sufficiently by exposure to the sun, or by a gentle toast of a kiln.

==Pests and Diseases
== Potatoes grown from stock certified as free from disease and planted in soil not occupied by potatoes the previous season, are relatively free from pests and diseases. The most common ailments to affect potatoes are potato blight (see next paragraph), scab, slugs, and wireworm. There is little protection available that can effectively solve these problems.

Potato blight has two phases - the first attacks the leaves, the second attacks the potatoes themselves. If your potatoes are attacked by the blight, there is no cure. However, cut the foliage back to 5cm (2in) from the ground at the first signs of infection. This will prevent the blight from getting to the potatoes themselves. With no foliage, the potatoes will not give of their best, but they will continue to grow for a month or so.

title: Horticulture/Potato


text:
User:MathMan64~enwikibooks/Current Work

User:MathMan64/Arithmetic

= Addition =

Addition is based on counting. For example, Pat and Chris each have a few rocks in their collections. Pat counts her rocks and finds that she has 3 rocks. Chris counts his collection and he has 5 rocks. When they combine their collections and count them all, the total they get is 8 rocks. 3 rocks plus 5 rocks equals 8 rocks.

The total is also call the sum. When counting the total, it obviously does not matter whether Pat counts hers first or Chris counts his first. 5 + 3 = 8 as well as 3 + 5 = 8. This concept works for any addition situation.

 * When adding, it does not matter which number is first.

One-digit numbers
Knowing the basic addition facts for all the one-digit numbers is crucial for doing arithmetic efficiently. Adding any number to zero always gives the original number. No matter how many rocks Pat has, if Chris has none, together they have a sum thatis the same as Pat's amount.

The addition of digits other than zero must be memorized. Use the table below to review these facts. Find one number to be added, in the left column; find the other in the top row. The sum is where the column and row meet.

Multi-digit numbers
Pat went on a day trip. In the morning she traveled for 3 hours. In the afternoon she traveled 8 miles. How long was her trip altogether?

This question cannot be answered (unless there is more information available, such as an average travel speed.)

 * Only the same kind of things can be added.

This concept is used in adding multi-digit numbers. (It is also used in adding fractions, and letters in algebra.)

When adding multi-digit numbers, the digits must be aligned so that the digits in the same place values are one under another.

Example: 14 + 36

title: User:MathMan64~enwikibooks/Current Work


text:
User:MathMan64~enwikibooks/Playground

Special features of the TI calculators

 * Ans variable
 * How to navigate the menus
 * Storing values
 * Fixing the STAT edit page when it gets messed up
 * Setting the numeric format
 * Where in the math menus are the math functions
 * and what do they do
 * Programming supplements

Applications of list arithmetic

 * Solving equations with two answers
 * Quadratic Eq
 * Law of Sines triangles finding two sides
 * Reducing fractions
 * Solving systems of equations slowly

Graphing examples for TI-Lists

 * Families of graphs
 * Use {1,-1} for plus and minus in conics
 * Envelopes and midlines for sinusiodal curves

Programming examples for TI-Lists

 * Implementing data structures

Advanced stuff for TI-Lists

 * Names for lists other than L1 thru L6
 * Lists and matrices
 * Complex numbers in lists

title: User:MathMan64~enwikibooks/Playground


text:
User talk:MathMan64~enwikibooks/Playground

A playground is much more versatile than a sandbox.


text:
User:Howeman

New User

title: User:Howeman


text:
User:Falcorian

Falcorian is a physics student at the University of California, Berkeley. He spends time on Wikipedia when he’s ignoring homework or friends, where he mainly makes minor edits, and reorganizes links to make things fit together better (he hopes). Recently he's also moved over to other wikimedia projects.

Interest

 * Warhammer 40,000
 * Star Wars
 * Science Fiction

Currently Working On

 * Bolos (see User:Falcorian/bolo for work in progress)

Wikipedia

 * Ætherverse
 * Belvedere Castle
 * Boies Penrose
 * Created Warcraft Templates:
 * Template:WarcraftBBook
 * Template:WarcraftBCharacter
 * Template:WarcraftBGame
 * Template:WarcraftBItem
 * Template:WarcraftBLocation
 * Template:WarcraftBOrganization
 * Template:WarcraftBRace

Wiktionary

 * procrustean
 * rhadamanthine
 * untrammeled

title: User:Falcorian


text:
User talk:69.123.31.43

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:69.123.31.43


text:
Common Lisp/First steps/Experienced tutorial

Basic Operations
This chapter gives some theoretical basics about structure of Lisp programs.

Syntax
Lisp operates on forms. Each Lisp form is either an atom or a list of forms. Atoms are numbers, strings, symbols and some other structures. Lisp symbols are actually quite interesting - I'll talk about them in another section.

When Lisp is forced to evaluate the form it looks whether it's an atom or a list. If it's an atom then its value is returned (numbers, strings and other data return themselves, symbols return their value). If the form is a list, Lisp looks at the first element of the list, which is called its car (an archaic term which stands for Contents of the Address part of Register). The car of a list should be a symbol or a lambda-expression (lambda-expressions would be discussed later). If it's a symbol Lisp takes its function (the function associated to that symbol - NOT its value) and executes that function with the arguments taken from the rest of the list (if it contains forms they're evaluated as well).

Example: (+ 1 2 3) returns 6. Symbol "+" is associated with the function + that performs the addition of its arguments. (+ 1 (+ 2 3) 4) returns 10. The second argument contains a form and is evaluated before being passed to the outer +.

Some interesting functions
+, -, *, / are basic operations on numbers. They can accept multiple arguments. Note that (/ 1 2) is 1/2, not 0.5 - Lisp knows rational numbers (as well as complex ones...). <, <=, = and so on are used for number comparison. Note that =, <, <= and others are polyadic:

list as the name suggests creates a list.

cons creates a pair (a pair has 2 elements and is not a list).

car or first returns the first element of the cons (pair). cdr or rest returns the second element of the cons.

or

Lists and conses
Since lists are so prominent in Lisp it's good to know what they exactly are. The truth is that, with one exception, lists consist of conses. This exception is a special list called nil - also known as . nil is a self-evaluating symbol that is used both as a falsehood constant and an empty list. nil is the only false value in Lisp - everything else is true for the purpose of if and similar constructs. The opposite of nil is t, which is also self-evaluating and represents the truth. t is, however, not a list. Let's return to the lists, then... A proper list (improper lists will not be explained here) is defined as any list that is either nil or a cons whose cdr is a proper list. (Note that since proper lists have to start from somewhere,  is nil for some finite number of cdrs.)

Basically, a proper list is a sequence of conses, such that the next cons is a cdr of a previous cons. It's easy to understand how lists are constructed if you consider a graphical representation. A cons can be represented as a rectangle divided into two squares. Each of squares can hold a value. In a proper list left square holds the element of the list, and the right square holds the next cons (or nil if it is the end of the list). Note that each cons holds exactly one element of the list. That's how (1 2 3) would look in graphical representation:

.---. | * | * | '-|---|-'  V   V   1 .---. | * | * |    '-|---|-'       V   V       2 .---. | * | * |        '-|---|-'           V   V           3  nil

So (1 2 3) is really (1 . (2. (3 . nil))). What follows from that is that (car (list 1 2 3)) is 1 and (cdr (list 1 2 3)) is (2 3). What doesn't follow from all of the above is that (car nil) and (cdr nil) are nil. This is not very consistent, because (cons nil nil) is not the same thing as nil, but it happens to be convenient.

Symbols
Symbols play the same role as variable names in other programming languages. Basically a symbol is a string associated with some values. The string can consist of any characters, including spaces and control characters. However, most symbol names do not use characters other than letters, numbers, and hyphens, because they're awkward to type. In addition, the characters "(", ")", "#", "\", ".", "|", ";", whitespace, and the double and single quote marks are likely to be misunderstood by the lisp reader; and other characters such as "*" are conventionally used only for certain purposes. By default Lisp converts what you type to uppercase.

Symbols are created as you use them. For example, when you type (setf x 1) symbol called "X" is created (remember that Lisp uppercases your input) and its value is set to 1. However it is good style to define your symbols before you use them. defvar and defparameter are used for that purpose.

A symbol can also have other parameters associated with it besides its name and value - functions, classes and so on. To get a function associated with a symbol, a special operator (these are discussed in the next chapter) function is used.

Macros and special operators
There are operators in Lisp that look like functions, but behave slightly differently. These are macros and special operators. Functions always evaluate their arguments, but occasionally this is undesirable, so these forms must be implemented.

For example, consider the ubiquitous if construct. If takes the form (if condition then else); condition is first evaluated, followed by then if condition is not nil or else if it is nil. Thus, (if t 1 2) returns 1 and (if nil 1 2) returns 2. Obviously, if cannot be implemented as a function because only one of its two final arguments will be evaluated. Thus, it is created as one of about 25 special operators, which are all predefined in the Lisp implementation.

Another special operator is quote. It returns its only argument, unevaluated. Again, this is impossible with functions, as they always evaluate their arguments. Quote is used quite often, so it can be expressed by the single character '. Thus, (quote x) is equivalent to 'x. quote may be used to quickly create lists: '(1 2 3) returns (1 2 3), '(x y z) returns (x y z) - compare that to (list x y z) which would create a list of values of x, y and z, or signal an error if no values were assigned. In fact, '(x y z) is the same value as (list 'x 'y 'z).

Macros are like special operators, but they're not hardcoded in a Lisp implementation. Instead, they can be defined in Lisp code. A lot of Lisp constructs you will be using are actually macros. Only very essential constructs are hardcoded. Of course, to the user there is no difference.

Simple programming
In this chapter I'll explain how to do simple things in Lisp. Many useful constructs will be introduced. After reading this chapter, you should be able to write simple programs.

Storing values
While storing values in variables is an important process in many programming languages, in Lisp it is used much less often. Although it is multi-paradigm, Lisp is often referred to and programmed in as a functional language. Functional languages do not allow (or at least discourage) the use of state, or stored information that implicitly changes the behavior of a function. In theory, assignments are never needed in a purely functional program. As you may have noticed, I never stored values anywhere in the previous chapter, except in the "Symbols" section. This shows that the storing of global values is rarely needed.

That being said, it is still useful to store values, and Lisp does provide for this. The macros setf and setq store values into symbols:

Setf is much more powerful than setq, as it allows the programmer to change a single part of a variable:

For this reason, setf is used more often than setq.

In other languages, assignments are usually denoted as something like x=1. The = here means something different than the mathematical = sign. Lisp reserves = for the mathematical definition, i.e. testing for numerical equality. It may appear that (setf place value) is more complicated than needed, but it is useful to remember that this facility is extensible and allows the user to remove the internal representation of data from the assignment. This is similar to reassigning the = operator in other languages (something not possible in C and some other languages).

Setf is a useful utility, despite the extra keystrokes it requires. In practice, though, you'll be using assignment less often than in other languages, because there is another way in Lisp to remember values: by binding them.

''Note: setq stands for set quote. Originally, a set function existed that would evaluate its first argument. Programmers got tired of quoting the argument, and defined this special operator. Set is now deprecated.''

Binding values
When values are bound to symbols, they are temporarily stored and then unbound, the values forgotten. With let and let* you can bind some values to some variables within some part of your program. The difference between let and let* is that let initialises its variables in parallel and let* does it sequentially.

Inside the body of let you can use variables you defined as though they're real symbols - outside of let these symbols can be unbound or have completely different values. If you call or define functions within the let body, the bindings stick around, making some interesting interactions possible (these are outside of the scope of this manual). You can even use setf on these variables and the new value would be stored temporarily. As soon as the last form in let body is executed its result is returned, and the variables are restored back to their original values.

Good programming practices generally recommend using local variables whenever possible, and limiting global variables only to when it is absolutely necessary. Thus, you should use let whenever possible, and treat setf like there is a tax on each use.

Control flow
The if operator was already explained before, but may seem hard to use at this point. This is because if allows only one form for each branch, which makes it hard to use in most situations. Fortunately, Lisp syntax gives you more freedom to define your blocks than C's curly braces or Pascal's begin/end. progn creates a very simple block of code, executing its arguments one by one and returning the result of the last one.

let and let* can also be used for this purpose, especially if you want some temporary variables inside the branches.

block creates a named block, from which you can return with return-from:

...and other forms exist, such as the, locally, prog1, tagbody and so on. Fortunately, if you're not into writing Lisp macros, if is probably the only construct where you'll have to use blocks.

As if is quite ugly when used repeatedly, there are some convenient macros in place so you won't have to use it all that often. when evaluates its first argument and, if it's not nil, evaluates the rest of its arguments, returning the last result. unless does the same if its first argument is nil. Otherwise they both return nil.

cond is slightly more complicated, but also more useful. It tests its conditions until one of them is not nil and then evaluates the associated code. This is easier to parse and better-looking than nested if's. The syntax of cond is as follows:

case is similar to cond except it branches after examining the value of some expression:

or evaluates its arguments until one of them is not nil, returning its value, or the value of last argument.

and evaluates its arguments until one of them is nil, returning its value (nil, that is) - otherwise the value of the last argument is returned.

You may notice that or and and could be used as logical operations as well - remember that everything non-nil is true.

Loops
Iteration, or evaluating a form many times, is covered by many tools evaluating something many times. The most useful tool is loop - in its simplest form it simply executes its body until the return operator is called, in which case it returns the specified value:

More complicated forms of loop are better learned through examples. Depending on the type of iteration wanted, different operators, such as for and until, are used. While loop should be enough for all kind of loops, there are other constructs for those who wouldn't like to learn its full syntax.

dotimes executes some code a fixed number of times. Its syntax is:

dotimes increments var from 0 to number and executes forms each time with that value of var, returning result in the end.

dolist iterates through a list: its syntax is the same as of dotimes except that a list replaces number. var begins as the list's car and is moved until it reaches the list's last element.

mapcar applies a function to different sets of arguments and returns a list of results, for example:

the list of arguments (1 2 3), then to (3 4 5) and then to (6 7 8).
 * 1) '+ is a shortcut for (function +). The function + is first applied to

Defining functions
Functions are defined using macro defun:

The created function is associated with the symbol function-name and can be called like any other function. It's worth mentioning that functions defined that way can be recursive or can call each other - this is an essential part of most Lisp programming. An example of a recursive function is:

As can be seen, this function simply describes an otherwise complicated operation by calling itself over and over. The process is stopped when x = 0, and x decreases with each call, eliminating (for positive integer x) the possibility of an infinite loop. Note that x, being an argument, takes on a different value for each call of the function. As seen in "Binding values" above, none of these values override any of the previous.

The special operator lambda creates an anonymous function, which you can use for a one-time purpose. Its syntax is the same except instead of "defun function-name" you write "lambda". These functions cannot be recursive. For the most part, lambda functions are used in forms such as mapcar (and funcall and apply below) to eliminate excessive repetition or memory use.

You can also bind functions temporarily with flet and labels. They are very similar to let and let*. The difference between them is that in labels a function can refer to itself, while in flet it refers to a former function with the same name instead.

Calling functions
To call a function f with arguments a1, a2, and a3, simply type

Sometimes the function which should be called is stored in a variable and you don't know its name beforehand. Or maybe you don't know how many arguments are to be passed. In those cases the functions funcall and apply become handy. Like all functions they evaluate their arguments - the first one should produce a function to be called, the rest should produce arguments. Funcall just calls the function with whatever arguments supplied. Apply checks if its last argument is a list and if it is, it treats it as a list of arguments. Compare:

User interaction
For this tutorial I've covered only the simple tasks of input and output. To read a value from the user use the read function. It will attempt to read an arbitrary Lisp expression from the input, and the value returned by read is that expression.

In that example the returned value is a list of three elements: symbol +, number 1 and symbol X (note how it got uppercased). read is one of the three functions that comprise read-eval-print loop, the core element of Lisp. This is the same function that is used to read the expressions you type at the Lisp prompt.

While read is handy for receiving numbers and lists from the user, other data-types are expected by most users to be fed to computer in a different manner. Take strings for example. To make read recognise a string one must add double quotes around it. But a normal user expects to just type  without the quotes and press Enter. So, there is a different general-purpose function used for input: read-line. read-line returns a string that contains what user typed before pressing Enter. You can then process that string to extract the information you need.

For output there is also quite a number of functions available. One that is interesting to us is princ, which simply prints a supplied value, and also returns it. This may be confusing when using it in the Lisp console:

The first aaa (without the quotes) is what is printed, while the second one is a returned value (which is printed by the print function and it is not as nice-looking). Another function that could be useful is terpri, which prints a new line to the output (the name "terpri" is historical and means "TERminate PRInt line").

For more information, return to Common Lisp.


text:
User:Grue

Hi! I am User:Grue from http://en.wikipedia.org.

Projects

 * Common Lisp Wikibook

title: User:Grue


text:
User talk:213.18.248.27

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:213.18.248.27


text:
Circuit Theory/Phasor Arithmetic

Phasor Arithmetic
This page will review phasors and phasor arithmetic topics.

Forms
Phasors have two components, the magnitude (M) and the phase angle (φ). Phasors are related to sinusoids through our cosine convention:

 * $$\mathbb{C} = |M| \angle \phi = |M| \cos (t\omega + \phi)$$

Remember, there are 3 forms to phasors:

Phasor Form

 * $$\mathbb{C} = |M| \angle \phi$$

Rectangular Form

 * $$\mathbb{C} = A + jB$$

Exponential Form

 * $$\mathbb{C} = |M|e^{j\phi}$$

Phasor and Exponential forms are identical and are also referred to as polar form.

Converting between Forms
When working with phasors it is often necessary to convert between rectangular and polar form. To convert from rectangular form to polar form:

 * $$|M| = \sqrt{A^2 + B^2}$$

 * $$\phi = \arctan \left( \frac{B}{A} \right)$$

To convert from polar to rectangular form:

A is the part of the phasor along the real axis

 * $$A = |M|\cos \left( \phi \right)$$

B is the part of the phasor along the imaginary axis

 * $$B = |M|\sin \left( \phi \right)$$

Addition
To add two phasors together, we must convert them into rectangular form:

 * $$\mathbb{C}_1 = A_1 + jB_1$$

 * $$\mathbb{C}_2 = A_2 + jB_2$$

 * $$\mathbb{C}_1 + \mathbb{C}_2 = (A_1 + A_2) + j(B_1 + B_2)$$

This is a well-known property of complex arithmetic.

Subtraction
Subtraction is similar to addition, except now we subtract

 * $$\mathbb{C}_1 = A_1 + jB_1$$

 * $$\mathbb{C}_2 = A_2 + jB_2$$

 * $$\mathbb{C}_1 - \mathbb{C}_2 = (A_1 - A_2) + j(B_1 - B_2)$$

Multiplication
To multiply two phasors, we should first convert them to polar form to make things simpler. The product in polar form is simply the product of their magnitudes, and the phase is the sum of their phases.

 * $$\mathbb{C}_1 = M_1 \angle \phi_1$$

 * $$\mathbb{C}_2 = M_2 \angle \phi_2$$

 * $$\mathbb{C}_1 \times \mathbb{C}_2 = M_1 \times M_2 \angle {\phi_1+\phi_2}$$

Keep in mind that in polar form, phasors are exponential quantities with a magnitude (M), and an argument (φ). Multiplying two exponentials together forces us to multiply the magnitudes, and add the exponents.

Division
Division is similar to multiplication, except now we divide the magnitudes, and subtract the phases

 * $$\mathbb{C}_1 = |M_1| \angle \phi_1$$

 * $$\mathbb{C}_2 = |M_2| \angle \phi_2$$

 * $${\mathbb{C}_1 \over \mathbb{C}_2} = {|M_1| \over |M_2|} \angle {\phi_1-\phi_2}$$

Inversion
An important relationship that is worth understanding is the inversion property of phasors:

 * $$\mathbb{C} = M_C\angle 0 = -M_C \angle \pi$$

Or, in degrees,

 * $$\mathbb{C} = M_C\angle 0^\circ = -M_C \angle 180^\circ$$

On the normal cartesian plane, for instance, the negative X axis is 180 degrees around from the positive X axis. By using that fact on an imaginary axis, we can see that the Negative Real axis is facing in the exact opposite direction from the Positive Real axis, and therefore is 180 degrees apart.

Complex Conjugation
Similar to the inversion property is the complex conjugation property of phasors. Complex conjugation is denoted with an asterisk above the phasor to be conjugated. Since phasors can be graphed on the Real-Imaginary plane, a 90 degree phasor is a purely imaginary number, and a -90 degree phasor is its complex conjugate:

 * $$\mathbb{C} = M \angle 90^\circ$$

 * $$\mathbb{C}^* = M \angle -90^\circ = M \angle 270^\circ$$

Essentially, this holds true for phasors with all angles: the sign of the angle is reversed to produce the complex conjugate of the phasor in polar notation. In general, for polar notation, we have:

 * $$\mathbb{C} = M \angle \phi$$
 * $$\mathbb{C}^* = M \angle -\phi$$

In rectangular form, we can express complex conjugation as:

 * $$\mathbb{C} = A + jB$$
 * $$\mathbb{C}^* = A - jB$$

Notice the only difference in the complex conjugate of C is the sign change of the imaginary part.

title: Circuit Theory/Phasor Arithmetic


text:
Ultimate

This Wikibook covers the sport Ultimate, also sometimes known as Ultimate Frisbee.

Table of Contents

 * /Introduction/
 * /Fundamentals/
 * /Basic drills/
 * /Basic tactics/
 * /Training schedule/

title: Ultimate


text:
Sanskrit/History

Sanskrit is one of the oldest known languages. It is also regarded as a highly scientific language. It is known for its conciseness, and complexity.

Many great literary texts, dating milleniums back, have been preserved as it is in Sanskrit. The reason is that the language has maintained its grammar and vocabulary. There have been new words that have been added over time, but the language retains its precise and concise form. The texts have been passed on word-for-word through the centuries.

A strong formative influence on the Sanskrit language was the grammar of Panini, which regularized and simplified the grammar. The grammatical and linguistic uniformity of some Sanskrit texts comes from editing after the texts were completed to bring them into line with Panini's rules. The epics, in particular, bear traces of such editing.

The Vedas are one such great texts and are worshipped and widely read.

Various Upanishads, Puranas and Shastras, were all written in Sanskrit and have been completely intact over time.

Srimad Bhagawad Gita, Sri Vishnu Purana, Sri Bhagawad Purana and so on..

Apart from those, many ancient texts were written in Sanskrit and are available today.

In addition to religious and philosophical texts, the tradition of Kavya court poetry flourished from maybe the sixth to the ninth century. Kavi is hot-house poetry: it prizes exotic imagery, recherche allusions, and, above all, word play.

Related to the Kavya tradition is the great poet Kalidasa, who is known above all as a poet and dramatist. His poetry shares many characteristics with Kavi, and his plays have a certain similarity of sensibility with Kavya poetry. The Abhijnaanasakuntalam retells a story from the Mahabharata, where the king Dushyanta falls in love with Sakuntala, forgets his love for her by coming in contact with a cursed ring, has a series of adventures and after a long period of time is reunited and re-enamored of Sakuntala.

title: Sanskrit/History


text:
Talk:Sanskrit/Everyday Phrases

Untitled
Need to add more words and sentences here. Sentences taken from scriptures and translated here would help in ability to read and understand sanskrit. The target audience of this textbook is probably some one who doesn't know much Sanskrit. Any examples would be helpful here, more than any thing else. Pankaj

title: Talk:Sanskrit/Everyday Phrases


text:
User:Danielduende~enwikibooks

Daniel Duende, also know to some as Daniel Carvalho, was born in Brasília (Brazil) and still lives there. (continued later)

title: User:Danielduende~enwikibooks


text:
Calculus/Surface area

Suppose we are given a function $$f$$ and we want to calculate the surface area of the function $$f$$ rotated around a given line. The calculation of surface area of revolution is related to the arc length calculation.

If the function $$f$$ is a straight line, other methods such as surface area formulae for cylinders and conical frusta can be used. However, if $$f$$ is not linear, an integration technique must be used.

Recall the formula for the lateral surface area of a conical frustum:

 * $$A=2\pi rl$$

where $$r$$ is the average radius and $$l$$ is the slant height of the frustum.

For $$y=f(x)$$ and $$a\le x\le b$$, we divide $$[a,b]$$ into subintervals with equal width $$\delta x$$ and endpoints $$x_0,x_1,\ldots,x_n$$. We map each point $$y_i=f(x_i)$$ to a conical frustum of width Δx and lateral surface area $$A_i$$.

We can estimate the surface area of revolution with the sum

 * $$A=\sum_{i=0}^n A_i$$

As we divide $$[a,b]$$ into smaller and smaller pieces, the estimate gives a better value for the surface area.

Definition (Surface of Revolution)
The surface area of revolution of the curve $$y=f(x)$$ about a line for $$a\le x\le b$$ is defined to be

$$A=\lim_{n\to\infty}\sum_{i=0}^n A_i$$

The Surface Area Formula
Suppose $$f$$ is a continuous function on the interval $$[a,b]$$ and $$r(x)$$ represents the distance from $$f(x)$$ to the axis of rotation. Then the lateral surface area of revolution about a line is given by

 * $$A = 2\pi\int_a^b r(x) \sqrt{1+f'(x)^2} \, dx$$

And in Leibniz notation
 * $$A=2\pi\int_a^b r(x) \sqrt{1 + \left(\tfrac{dy}{dx}\right)^2}\,dx$$

Proof:

 * $$A$$
 * $$=\lim_{n\to\infty}\sum_{i=1}^n A_i$$
 * $$=\lim_{n\to\infty}\sum_{i=1}^n 2\pi r_il_i$$
 * $$=2\pi\cdot\lim_{n\to\infty}\sum_{i=1}^n r_il_i$$
 * }
 * $$=2\pi\cdot\lim_{n\to\infty}\sum_{i=1}^n r_il_i$$
 * }
 * $$=2\pi\cdot\lim_{n\to\infty}\sum_{i=1}^n r_il_i$$
 * }

As $$n\to\infty$$ and $$\Delta x\to 0$$, we know two things:

 * 1) the average radius of each conical frustum $$r_i$$ approaches a single value
 * 2) the slant height of each conical frustum $$l_i$$ equals an infitesmal segment of arc length

From the arc length formula discussed in the previous section, we know that

 * $$l_i=\sqrt{1+f'(x_i)^2}$$

Therefore

 * $$A$$
 * $$=2\pi\cdot\lim_{n\to\infty}\sum_{i=1}^n r_il_i$$
 * $$=2\pi\cdot\lim_{n\to\infty}\sum_{i=1}^n r_i\sqrt{1+f'(x_i)^2}\Delta x$$
 * }
 * $$=2\pi\cdot\lim_{n\to\infty}\sum_{i=1}^n r_i\sqrt{1+f'(x_i)^2}\Delta x$$
 * }

Because of the definition of an integral $$\int_a^b f(x)dx=\lim_{n\to\infty}\sum_{i=1}^n f(c_i)\Delta x_i$$, we can simplify the sigma operation to an integral.

 * $$A=2\pi\int_a^b r(x) \sqrt{1+f'(x)^2} dx$$

Or if $$f$$ is in terms of $$y$$ on the interval $$[c,d]$$

 * $$A=2\pi\int_c^d r(y) \sqrt{1+f'(y)^2} dy$$

title: Calculus/Surface area


text:
Wikijunior talk:Ancient Civilizations/Akkadians

Confusing
...each floor up gets progressively smaller until you reach the top room...

I am 13 and I think that instead of using the word progressively You should say that ...each floor up gets smaller and smaller...

Wedge shaped symbols were inscribed on clay tablets with a reed stylus ...Many neighboring countries later adopted this writing method to record their own language (Eblaites, Hittites, Hurrites, Elamites)

What are wedge shaped symbols or reed stylus? I sugest giving an example.

were inscribed on clay tablets how about saying were carved into clay tablets.

...it was overcome by neighboring city-states ...

You might want to explain what a city-state is.

 * Bdavis

i think it's not fair to say jews and arabs, no offense to jews but i think arabs represent many semitic groups and jews are not as many as them also not to forget arabs are modern compared to their ancient ancestors.and logically AND is considered commutative so no big deal.

pacifist


text:
Digital Circuits/Representations

Quantity vs Numbers
An important distinction must be made between "Quantities" and "Numbers". A quantity is simply some amount of "stuff"; five apples, three pounds, and one automobile are all quantities of different things. A quantity can be represented by any number of different representations. For example, tick-marks on a piece of paper, beads on a string, or stones in a pocket can all represent some quantity of something. One of the most familiar representations are the base-10 (or "decimal") numbers, which consist of 10 digits, from 0 to 9. When more than 9 objects needs to be counted, we make a new column with a 1 in it (which represents a group of 10), and we continue counting from there.

Computers, however, cannot count in decimal. Computer hardware uses a system where values are represented internally as a series of voltage differences. For example, in most computers, a +5V charge is represented as a "1" digit, and a 0V value is represented as a "0" digit. There are no other digits possible! Thus, computers must use a numbering system that has only two digits(0 and 1): the "Binary", or "base-2", number system.

Binary Numbers
Understanding the binary number system is difficult for many students at first. It may help to start with a decimal number, since that is more familiar. It is possible to write a number like 1234 in "expanded notation," so that the value of each place is shown:

$$1234_{10} = 1 \times 10^3 + 2 \times 10^2 + 3 \times 10^1 + 4 \times 10^0 = 1000 + 200 + 30 + 4$$

Notice that each digit is multiplied by successive powers of 10, since this a decimal, or base 10 system. The "ones" digit ("4" in the example) is multiplied by $$10^0$$, or "1". Each digit to the left of the "ones" digit is multiplied by the next higher power of 10 and that is added to the preceding value.

Now, do the same with a binary number; but since this is a "base 2" number, replace powers of 10 with powers of 2:

$$1011_2 = 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 11_{10}$$

The subscripts indicate the base. Note that in the above equations:

$$1011_2 = 11_{10}$$

Binary numbers are the same as their equivalent decimal numbers, they are just a different way to represent a given quantity. To be very simplistic, it does not really matter if you have $$1011_2$$ or $$11_{10}$$ apples, you can still make a pie.

Bits
The term Bits is short for the phrase Binary Digits. Each bit is a single binary value: 1 or zero. Computers generally represent a 1 as a positive voltage (5 volts or 3.3 volts are common values), and a zero as 0 volts.

Most Significant Bit and Least Significant Bit
In the decimal number 48723, the "4" digit represents the largest power of 10 (or $$10^4$$), and the 3 digit represents the smallest power of 10 ($$10^0$$). Therefore, in this number, 4 is the most significant digit and 3 is the least significant digit. Consider a situation where a caterer needs to prepare 156 meals for a wedding. If the caterer makes an error in the least significant digit and accidentally makes 157 meals, it is not a big problem. However, if the caterer makes a mistake on the most significant digit, 1, and prepares 256 meals, that will be a big problem!

Now, consider a binary number: 101011. The Most Significant Bit (MSB) is the left-most bit, because it represents the greatest power of 2 ($$2^5$$). The Least Significant Bit (LSB) is the right-most bit and represents the least power of 2 ($$2^0$$).

Notice that MSB and LSB are not the same as the notion of "significant figures" that is used in other sciences. The decimal number 123000 has only 3 significant figures, but the most significant digit is 1 (the left-most digit), and the least significant digit is 0 (the right-most digit).

Standard Sizes

 * Nibble : a Nibble is 4 bits long. Nibbles can hold values from 0 to 15 (in decimal).

 * Byte : a Byte is 8 bits long. Bytes can hold values from 0 to 255 (in decimal).

 * Word : a Word is 16 bits, or 2 bytes long. Words can hold values from 0 to 65535 (in Decimal). There is occasionally some confusion between this definition and that of a "machine word". See Machine Word below.

 * Double-word : a Double-word is 2 words long, or 4 bytes long. These are also known simply as "DWords". DWords are also 32 bits long. 32-bit computers therefore, manipulate data that is the size of DWords.

 * Quad-word : a Quad-word is 2 DWords long, 4 words long, and 8 bytes long. They are known simply as "QWords". QWords are 64 bits long, and are therefore the default data size in 64-bit computers.

 * Machine Word : A machine word is the length of the standard data size of a given machine. For instance, a 32-bit computer has a 32-bit machine word. Likewise 64-bit computers have a 64-bit machine word. Occasionally the term "machine word" is shortened to simply "word", leaving some ambiguity as to whether we are talking about a regular "word" or a machine word.

Negative Numbers
It would seem logical that to create a negative number in binary, the reader would only need to prefix the number with a "–" sign. For instance, the binary number 1101 can become negative simply by writing it as "–1101". This seems all fine and dandy until you realize that computers and digital circuits do not understand minus sign. Digital circuits only have bits, and so bits must be used to distinguish between positive and negative numbers. With this in mind, there are a variety of schemes that are used to make binary numbers negative or positive: Sign and Magnitude, One's Complement, and Two's Complement.

Sign and Magnitude
Under a Sign and Magnitude scheme, the MSB of a given binary number is used as a "flag" to determine if the number is positive or negative. If the MSB = 0, the number is positive, and if the MSB = 1, the number is negative. This scheme seems awfully simple, except for one simple fact: arithmetic of numbers under this scheme is very hard. Let's say we have 2 nibbles: 1001 and 0111. Under sign and magnitude, we can translate them to read: -001 and +111. In decimal then, these are the numbers –1 and +7.

When we add them together, the sum of –1 + 7 = 6 should be the value that we get. However:

001 +111 000

And that isn't right. What we need is a decision-making construct to determine if the MSB is set or not, and if it is set, we subtract, and if it is not set, we add. This is a big pain, and therefore sign and magnitude is not used.

One's Complement
Let's now examine a scheme where we define a negative number as being the logical inverse of a positive number. We will use the same "!" operator to express a logical inversion on multiple bits. For instance, !001100 = 110011. 110011 is binary for 51, and 001100 is binary for 12. but in this case, we are saying that 001100 = –110011, or 110011(binary) = -12 decimal. let's perform the addition again:

001100 (12) +110011 (-12) --- 111111

We can see that if we invert 0000002 we get the value 1111112. and therefore 1111112 is negative zero! What exactly is negative zero? it turns out that in this scheme, positive zero and negative zero are identical.

However, one's complement notation suffers because it has two representations for zero: all 0 bits, or all 1 bits. As well as being clumsy, this will also cause problems when we want to check quickly to see if a number is zero. This is an extremely common operation, and we want it to be easy, so we create a new representation, two's complement.

Two's Complement
Two's complement is a number representation that is very similar to one's complement. We find the negative of a number X using the following formula:

-X = !X + 1

Let's do an example. If we have the binary number 11001 (which is 25 in decimal), and we want to find the representation for -25 in twos complement, we follow two steps:

 * 1) Invert the numbers:
 * 11001 → 00110
 * 1) Add 1:
 * 00110 + 1 = 00111

Therefore –11001 = 00111. Let's do a little addition:

11001 +00111 -- 00000

Now, there is a carry from adding the two MSBs together, but this is digital logic, so we discard the carrys. It is important to remember that digital circuits have capacity for a certain number of bits, and any extra bits are discarded.

Most modern computers use two's complement.

Below is a diagram showing the representation held by these systems for all four-bit combinations:

Signed vs Unsigned
One important fact to remember is that computers are dumb. A computer doesnt know whether or not a given set of bits represents a signed number, or an unsigned number (or, for that matter, and number of other data objects). It is therefore important for the programmer (or the programmers trusty compiler) to keep track of this data for us. Consider the bit pattern 100110:

 * Unsigned: 38 (decimal)
 * Sign+Magnitude: -6
 * One's Complement: -25
 * Two's Complement: -26

See how the representation we use changes the value of the number! It is important to understand that bits are bits, and the computer doesn't know what the bits represent. It is up to the circuit designer and the programmer to keep track of what the numbers mean.

Character Data
We've seen how binary numbers can represent unsigned values, and how they can represent negative numbers using various schemes. But now we have to ask ourselves, how do binary numbers represent other forms of data, like text characters? The answer is that there exist different schemes for converting binary data to characters. Each scheme acts like a map to convert a certain bit pattern into a certain character. There are 3 popular schemes: ASCII, UNICODE and EBCDIC.

ASCII
The ASCII code (American Standard Code for Information Interchange) is the most common code for mapping bits to characters. ASCII uses only 7 bits, although since computers can only deal with 8-bit bytes at a time, ASCII characters have an unused 8th bit as the MSB. ASCII codes 0-31 are "Control codes" which are characters that are not printable to the screen, and are used by the computer to handle certain operations. code 32 is a single space (hit the space bar). The character code for the character '1' is 49, '2' is 50, etc... notice in ASCII '2' = '1' + 1 (the character 1 plus the integer number 1)). This is difficult for many people to grasp at first, so don't worry if you are confused.

Capital letters start with 'A' = 65 to 'Z' = 90. The lower-case letters start with 'a' = 97 to 'z' = 122.

Almost all the rest of the ASCII codes are different punctuation marks.

Extended ASCII
Since computers use data that is the size of bytes, it made no sense to have ASCII only contain 7 bits of data (which is a maximum of 128 character codes). Many companies therefore incorporated the extra bit into an "Extended ASCII" code set. These extended sets have a maximum of 256 characters to use. The first 128 characters are the original ASCII characters, but the next 128 characters are platform-defined. Each computer maker could define their own characters to fill in the last 128 slots.

UNICODE
When computers began to spread around the world, other languages began to be used by computers. Before too long, each country had its own character code sets, to represent their own letters. It is important to remember that some alphabets in the world have more than 256 characters! Therefore, the UNICODE standard was proposed. There are many different representations of UNICODE. Some of them use 2-byte characters, and others use different representations. The first 128 characters of the UNICODE set are the original ASCII characters.

For a more in-depth discussion of UNICODE, see this website.

EBCDIC
EBCDIC (Extended Binary Coded Decimal Interchange format) is a character code that was originally proposed by IBM, but was passed in favor of ASCII. IBM however still uses EBCDIC in some of its super computers, mainframes, and server systems.

Octal
Octal is just like decimal and binary in that once one column is "full", you move onto the next. It uses the numbers 0−7 as digits, and because there a binary multiple (8=23) of digits available, it has a useful property that it is easy to convert between octal and binary numbers. Consider the binary number: 101110000. To convert this number to octal, we must first break it up into groups of 3 bits: 101, 110, 000. Then we simply add up the values of each bit:

 * $$101_2 = 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 5_{8}$$
 * $$110_2 = 1 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 = 6_{8}$$
 * $$000_2 = 0_8$$

And then we string all the octal digits together:
 * 1011100002 = 5608.

Hexadecimal
Hexadecimal is a very common data representation. It is more common than octal, because it represents four binary digits per digit, and many digital circuits use multiples of four as their data widths.

Hexadecimal uses a base of 16. However, there is a difficulty in that it requires 16 digits, and the common decimal number system only has ten digits to play with (0 through 9). So, to have the necessary number of digits to play with, we use the letters A through F, in addition to the digits 0-9. After the unit column is full, we move onto the "16's" column, just as in binary and decimal.

Hexadecimal Notation
Depending on the source code you are reading, hexadecimal may be notated in one of several ways:

 * 0xaa11: ANSI C notation. The 0x prefix indicates that the remaining digits are to be interpreted as hexadeximal. For example, 0x1000, which is equal to 4096 in decimal.
 * \xaa11: "C string" notation.
 * 0aa11h: Typical assembly language notation, indicated by the h suffix. The leading 0 (zero) ensures the assembler does not mistakenly interpret the number as a label or symbol.
 * $aa11: Another common assembly language notation, widely used in 6502/65816 assembly language programming.
 * <tt> #AA11 </tt>: BASIC notation.
 * <tt>$aa11$</tt>: Business BASIC notation.
 * <tt>aa1116</tt>: Mathematical notation, with the subscript indicating the number base.
 * <tt>16#AA11#</tt>: VHDL notation for a number.
 * <tt>x"AA11"</tt>: VHDL notation for a 16 bit array of bits.
 * <tt>16'hAA11</tt>: Verilog notation, where the "16" is the total length in bits.

Both uppercase and lowercase letters may be used. Lowercase is generally preferred in a Linux, UNIX or C environment, while uppercase is generally preferred in a mainframe or COBOL environment.

For further reading

 * Floating Point/Fixed-Point Numbers

title: Digital Circuits/Representations


text:
User talk:68.124.153.82

— Laura Scudder | Talk 19:04, 14 October 2005 (UTC)

title: User talk:68.124.153.82


text:
A-level Mathematics/OCR/D1/Algorithms

=Algorithms= The following is a skeleton for the content of D1 algorithms, with the content taken from AQA, OCR, OCR MEI and Edexcel's specifications. Not all specifications include all of the following content.

What is an algorithm?
An algorithm is a precise set of instructions which, when followed, will solve a problem. They can be presented in various forms, e.g. words, pictures, flow diagrams. Recipes, knitting patterns, instructions to set a VCR or build a desk are all examples of algorithms we may encounter in everyday life.

Why use algorithms?
The main advantage of algorithms is that we can then use computational methods of solving problems. It's rather easy for one to put the numbers 2, 5, 3, 1 and 4 in ascending order, but it would take much, much longer for one to sort a list of 1000 random numbers. Also having an algorithm means that someone else can achieve the same result as you, without having to work out how to do it. Specifically having an algorithm may allow a computer to perform the actions.

Flow Diagrams
You may need to be able to follow or create flow diagrams in order to demonstrate an algorithm. There are three basic shapes used:

 * Oval, used for start & stop and input & output.
 * Rectangle, used for calculations and instructions.
 * Diamond, used for yes/no questions.

An example
Given a deck of 52 cards to be sorted according to their suit; their position in the current sequence of cards is given a number: ........... AND SO ON, until we get to the card that is one before the last card. We compare, exchange if necessary, and then stop sorting.
 * 1) What suit is card 1? It is HEARTS.
 * 2) What suit is card 2? It is SPADES. We want a deck with spades before hearts. Therefore we exchange the two cards, and go back one step. If we are already at the beginning, then ignore the need to go back one step.
 * 3) What suit is card 1 now? It is SPADES.
 * 4) What suit is card 2 now? It is HEARTS. These two cards are in the right order, therefore we do NOT interchange them, but go to the next card in the deck.
 * 5) What suit is card 3? It is HEARTS. It is the same as the previous card, therefore we carry on to the next card in the deck.
 * Next we separate the HEARTS, or some other suit, as we wish, from the 52-card deck, have now only a deck of 13 cards, and sort this smaller deck of cards according to 2,3, ... J,Q,K,A and do this with the other 3 suits too, one at a time.
 * After that we are nearly all done, combine the 4 sets of 13 cards each into a big set of 52 cards and stop.

Bubble Sort
For a set of numbers, the first number is compared to the number to the right of it.

13, 2, 4, 3, 82

13>2 so it moves to the right.

2, 13, 4, 3, 82

13>4 so it moves to the right.

2, 4, 13, 3, 82

13>3 so it moves to the right.

2, 4, 3, 13, 82

13<82 so it stays.

At the end of first pass: 2, 4, 3, 13, 82 At the end of second pass: 2, 4, 3, 13, 82 At the end of third pass: 2, 3, 4, 13 82

This set only needed 2 passes, but on a larger data set it can get quite large. The maximum number of passes is equal to the size of the set, provided the set items are unique.

Shuttle Sort
From a set of numbers, one selects the first two numbers and underlines them. These two are the ones that get sorted in the first pass. In the second pass, the range of numbers to be sorted increases by one, so the first three numbers are compared and sorted into their order. And so forth until all the numbers are covered in the range and sorted. 1st pass - 23, 2, 4, 8, 9 - 23>2 so 2 is sorted to the left. 2nd pass - 2, 23, 4, 8, 9 - 23>4 so 4 is sorted to the left. 3rd pass - 2, 4, 23, 8, 9 - The numbers are sorted 4th pass - 2, 4, 8, 23, 9 - The numbers are sorted Final set of numbers = 2, 4, 8, 9, 23 - The numbers are sorted

Quick Sort
Using the midpoint as the pivot, (or whichever value it asks you to use in the question) perform a shuttle sort on each of the sub lists. Continue until all terms but one have been used as a pivot.

Shell Sort

 * Divide the set of numbers in n/2 sublists.
 * The sublists are shuttle sorted
 * The data range is recombined and split into half the number of the previous sublists.
 * The data range are shuttle sorted again.
 * Repeat until the number of sublists = 2

Full-Bin
The 'full bin' algorithm is one in which combinations of objects which would fill a 'bin' are grouped together to fill as few bins as possible. The remaining objects are then placed in other bins. This is best illustrated by the example below (NB - this is NOT an exam question and does not represent the level of complexity that can be expected on the actual paper).

Q) A computer software company needs to publish its software on floppy disks of capacity 200kB. The files are of size 25kB, 90kB, 30kB, 120kB, 190kB, 10kB, 70kB, 40kB, 100kB, 140kB and 80kB. How many floppy disks are required? Use the 'full-bin' algorithm to arrive at a solution.

A) Start by looking along the list to find values that add up to 200. There is no particular method for this (everyone seems to do it differently), but I find it helps to find combinations that add up to full 10's etc. Fill the 'bins' with these combinations:

Bin | Files

A | 120, 80

B | 190, 10

C | 70, 40, 90

This leaves 25, 30, 100 and 140. It makes sense to get as close as possible to a full bin using the remaining values:

(140 + 25 + 30) = 195 <- so place these values in the next bin, leaving the 100 in the final bin.

Solution:

Bin | Files

A | 120, 80

B | 190, 10

C | 70, 40, 90

D | 140, 25, 30

E | 100

5 disks are required to fit all the files.

First-Fit
Place each object, in turn, in the first available space in which it will fit.

First-Fit Decreasing
Reorder the boxes in decreasing order of size using one of the sorting algorithms, before applying the first-fit algorithm to the reordered list.

title: A-level Mathematics/OCR/D1/Algorithms


text:
Dichotomous Key/Hylobatidae

1

 * (a) Completely black, without light pattern - 3
 * (b) Not black or not completely black - 2

2

 * (a) Almost completely black, but with light (whitish or yellowish) elements (facial pattern, genital tuft, hands and feet) - 5
 * (b) Not dominantly black - 10

3

 * (a) Body weight 8–15 kg; large, inflatable throat sac; males with long genital tuft (ca 13.5 cm) - Symphalangus syndactylus
 * (b) Body weight lower than 11 kg; throat sac very small or absent; genital tuft in males short and inconspicuous (less than 6 cm) - 4

4

 * (a) Body weight 5–7 kg; no throat sac; crown fur without crest - Hylobates klossii
 * (b) Body weight 6–10 kg; throat sac very small and visible only when inflated during certain vocalisations; crown fur stands straight up, with prolonged hairs forming a crest - Nomascus concolor (male)

5

 * (a) Crown without crest; body weight 4–9 kg; light cheek beard present or absent - 6
 * (b) Crown fur stands straight up, with prolonged hairs forming a crest; body weight 6–10 kg; light cheek beard - 7

6

 * (a) Fur on hands and feet white - 8
 * (b) Fur on hands and feet not white - 9

7

 * (a) Cheek beard pale yellow or orange, standing out on sides as if "brushed" outwards, with the hairs spreading out from the corners of the mouth like a fan; fur on chest rusty brown, not black - Nomascus gabriellae (male)
 * (b) Cheek beard white, rarely pale yellow, not "brushed" outwards; fur on chest black - Nomascus leucogenys (male)

8

 * (a) White face ring relatively broad and usually complete; no light corona around crown of head; hands and feet white up to wrist and ankle, respectively; genital tuft not white - Hylobates lar
 * (b) White face ring relatively thin, broad only above eyes; light corona around crown of head; hands and feet white only distally of wrist and ankle, respectively; white genital tuft - Hylobates pileatus (male)

9

 * (a) White brow band; body weight 6–9 kg; no light cheeks; distinct goatee beard; long genital tuft (ca 7.5 cm) - Hoolock hoolock (male)
 * (b) White or grey brow band (often reduced in older females); body weight 4.5–7 kg; males often with light cheeks (grey or whitish), females often without these; no distinct goatee beard; males with distinct, but relatively small genital tuft (ca 5 cm) - Hylobates agilis

10

 * (a) Back and limbs pale yellow, yellow, orange or beige brown, not grey or dark brown; black cap usually set off sharply from surrounding lighter fur, with crown fur (including cap) standing straight up body weight 6–10 kg - 11
 * (b) Back and limbs pale yellow, yellow, orange or beige brown, but also grey or dark brown; black cap, if present, with crown hairs lying flat; body weight 4–9 kg - 13

11

 * (a) Fur on chest (and sometimes belly) black or dark brown, contrasting with light back - Nomascus concolor (female), but excluding N. sp. cf. nasutus hainanus or N. sp. cf. nasutus ssp. nov.
 * (b) Fur on chest and belly light, as back - 12

12

 * (a) Face ring usually yellowish (rarely white), often not contrastingly lighter than neck or incomplete; cheek fur usually standing out on sides, as if "brushed" outwards, with the hairs spreading out from the corners of the mouth like a fan - Nomascus gabriellae (female)
 * (b) Face ring usually white and distinctly lighter than neck, often thin, but usually complete; cheek fur not standing out on sides - Nomascus leucogenys (female) or N. sp. cf. nasutus hainanus or N. sp. cf. nasutus ssp. nov. (female)

13

 * (a) Crown fur lying flat and being light beige, contrastingly lighter than dark brown cheeks; body weight 6–9 kg; a thin stripe of white hair starts from cheeks and crossing the face below the eyes goes upwards across the nasal ridge; distinct light goatee beard - Hoolock hoolock (female)
 * (b) Crown fur variably lying flat or standing up, not contrastingly lighter than cheeks; body weight 4–8 kg; no stripe of white hair below eyes and across nasal ridge; with or without distinct light goatee beard - 14

14

 * (a) Cap and ventral area black, both sharply set off from surrounding light grey fur; ventral shield three-cornered, with lower tip reaching genital area; back and limbs light grey or cream; no light face ring; thin white brow band may be present but is usually lacking; long, white temple fringes hanging over black cheek region and ears - Hylobates pileatus (female)
 * (b) Cap and ventral area may or may not be darker than surrounding fur; if these areas are black, they are rarely set off sharply and the ventral area has no distinctly three-cornered pattern; back and limbs light or dark, of variable colouration; with or without light face ring; light brow band usually present; no long, white temple fringes hanging over black cheek region and ears - 15

15

 * (a) White hands and feet; fur colouration variable: pale yellow, yellow, beige brown, hazel, dark brown (or black, see also 8a), but not grey; usually no dark cap and no dark ventral area (if present, these areas are brown or dark brown, not blackish); face ring white and usually complete - Hylobates lar
 * (b) Hands and feet not white; fur colouration variable as 15a, but may also be grey; with or without dark (dark brown or blackish) cap and dark ventral area; face ring only partly white, usually incomplete, often reduced to brow band - 16

16

 * (a) Silvery grey fur colouration; only cap and ventral area may be contrastingly darker (dark-gray or black) in some animals; brow band broad and whitish, usually distinct and sharply set off, pointed laterally of the eyes; distinct, forward projecting, whitish goatee beard - Hylobates moloch
 * (b) Fur colouration variable; grey individuals are mouse grey rather than silvery grey; cap, underparts and limbs may be contrastingly darker (dark grey, blackish brown or black) than back; hands and toes contrastingly black in some animals; brow band variable in both colouration (whitish, light grey, light buff) and extent (broad, thin, absent); no distinct, forward projecting, whitish goatee beard - 17

17

 * (a) Fur colouration variable: mouse grey, grey brown, hazel, or dark brown, but not yellow; feet may be distinctly paler than legs in some animals (but not white as in H. lar); light brow band very variable in its extent, more or less distinct, but rarely missing; usually no distinctly light cheek patches; genital tuft of male very small (ca 2.5 cm) and usually blackish - Hylobates muelleri
 * (b) Fur colouration variable: pale yellow, yellow, beige brown, grey brown, nut-brown, dark brown (or almost black, see also 9b); feet not distinctly paler than legs; brow band usually white, but may be completely absent in older blackish females; males often with grey, whitish or pale brownish cheek patches (often joined under the chin), females often without these; males with distinct, but relatively small genital tuft (ca 5 cm) which may be of contrastingly light colour in some brown animals (intermediate phase), but not contrasting with ventral fur in others - Hylobates agilis

title: Dichotomous Key/Hylobatidae


text:
Immigrating to Canada

Contents

 * /Foreword/
 * /Introduction/

Temporary status

 * /Visitor Visa/
 * /Student Visa/
 * Extending a Visa or changing Visa status
 * /Work Permit/

Permanent status

 * Applying under the Family Class
 * Applying as a Federal Skilled Worker
 * Applying as a Provincial Nominee
 * Applying as an Investor
 * Sponsorship by Canadian Citizens ("Group of Five" program)
 * Applying as a Refugee

Citizenship

 * Applying for Citizenship

Annotated Forms

 * /Application for Permanent Residence in Canada (IMM 0008)/
 * /Schedule 1: Background and Declaration (IMM 0008 SCHEDULE 1)/
 * /Application to sponsor and Undertaking (IMM 1344A)/
 * /Sponsorship Agreement (IMM 1344B)/
 * /Additional Family Information (IMM 5406)/
 * Statutory Declaration of Common-Law Union (IMM 5409) (Optional)
 * /Use of a Representative (IMM 5476)/
 * /Sponsorship Evaluation (IMM 5481)/
 * /Sponsor Questionnaire (IMM 5540)/
 * /Spouse or Common-law Partner Questionnaire (IMM 5285)/

title: Immigrating to Canada


text:
User:Orage~enwikibooks

My former account at wikibooks was user:EugeneH. But I forgot the password for it. My account at wikipedia is Orage.

Contribution(s)

 * Lab report is created and written by me.

title: User:Orage~enwikibooks


text:
User:Nackie~enwikibooks

Wikipedia:User:Nackie

title: User:Nackie~enwikibooks


text:
Immigrating to Canada/Skilled Worker Class

Introduction
The Government of Canada had a significant interest to encourage people with valuable skills to immigrate to Canada. It was for this reason that they created the Federal Skilled Worker class of immigrant to allow those with sufficient language skills, education, and experience in an occupation that is needed in Canada, to enter the country.

Basic requirements
An applicant under the Federal Skilled Worker program need not have a job already, but only must show that they are skilled enough to contribute to Canada.

Application procedure
To be eligible to apply as a Federal Skilled Worker the applicant must:
 * be 18 years old or more.
 * meet the required amount of assets given the size of the family.
 * have a score of at least 67 on the required factors.
 * have a medical examination and security clearance for the applicant and all dependants.

Minimum Assets
The applicant must show that they possess a minimum amount of assets in their bank account. The amount depends on the number of family members. These amounts can be waived if the applicant already has arranged employment.

[table last checked on March 24, 2006]

Point System
Acceptance to the federal skilled worker program depends entirely on the score awarded from a set of criteria. An applicant needs at least a score of 67 combined from the points calculated from five factors: Education (max 25pts), Language Skills (max 24pts), Experience Age(max 21pts), Arranged Employment (max 10pts), and Adaptability (max 10pts).

Alternative to the point system
In the case where the applicant does not have the required number of points, they may still make a request for "Substituted Evaluation". The immigration officer has the discretion to accept an applicant if the applicant can show that they are able to become "economically established" in Canada.

Forms
The government offers a guide to fill out the application, much of which will mirror what is in this section.

The following are the forms that are needed:
 * 1) Application for Permanent Residence in Canada (IMM 0008) form
 * 2)  Schedule 1: Background/Declaration (IMM 0008 SCHEDULE 1) form
 * 3) Additional Family Information [IMM 5406] form
 * 4) Use of a Representative [IMM 5476]  (optional) form

Processing times
All applications are mailed to the processing center in Buffalo, New York.

 * processing times


text:
European Union Law/Sources, principles and supremacy

Jurisdiction
The ECJ was quick to stamp its authority in a series of cases clarifying the position of the different types of legislation made by the institutions of the European Community.

The first case was Van Gend en Loos which established that EC law is supreme over existing Dutch law.

 * Costa v. ENEL
 * New conflicting national legislation made after EC law could not override EC law.

 * Internationalle Handelgesellschaft
 * EC law prevailed even over conflicting constitutional law. In this case it was German Basic Law, note that the German Administrative Court ignored the ECJ's ruling.

 * Simmenthal Spa
 * Conflicting national law could be disapplied immediately without waiting for it to be repealed.


text:
European Union Law/Direct Effect

Direct effect is the idea that EC law is effective immediately and without further administrative action in each of the member States.

Treaty Articles
Van Gend en Loos

Regulations
Leonisio

Directives

 * Van Duyn v. Home Office [1974]
 * Ministerio Pubblico v. Ratti [1979]
 * Marshal v. Southampton Area Health Authority
 * Foster v. British Gas
 * Paola Faccini Dori v. Recreb Srl

UK Courts

 * Felixstowe [1976]
 * Litster v. Forth Dry Dock
 * Factortame (No. 2)

title: European Union Law/Direct Effect


text:
Cookbook:Microwaved Artichoke

Basic recipe on how to cook artichokes. Similar results can be obtained using the steamed artichoke recipe, but using the microwave oven is much faster.

Ingredients

 * 1 medium artichoke
 * 1 lemon, juiced
 * Water
 * Parsley (optional)
 * 1–2 garlic cloves (optional)
 * Pepper (optional)
 * ⅛ cup (30 ml) white wine (optional)
 * Dips, such as drawn butter or mayonnaise

Procedure

 * 1) Cut off top ⅓ of the artichoke, and all but 1 inch of the stem.
 * 2) Remove base leaves and cut off the tips of the higher leaves.
 * 3) Sprinkle artichoke with lemon juice to preserve color.
 * 4) Place artichoke stem up in a microwave-safe dish tall enough to place lid without touching the artichoke.
 * 5) Fill dish with 1 inch (3 cm) of water and any of the seasonings.
 * 6) Cover and microwave on high for 6–8 minutes, and allow to rest for 1–2 minutes. The artichoke is cooked when a paring knife can be inserted into the heart without resistance.
 * 7) Remove artichoke from the dish and place upside down to drain.
 * 8) Serve whole, with one or more dips. Diners should remove a leaf, dip the base of the leaf in the dip, and eat the fleshy base of the leaf.
 * 9) When all the leaves are gone, remove the choke, cut the heart of the artichoke into bite sized pieces, and serve with the dip.

title: Cookbook:Microwaved Artichoke


text:
Bourne Shell Scripting/Variable Expansion

In the Environment module we introduced the idea of an environment variable as a general way of storing small pieces of data. In this module we take an in-depth look at using those variables: 'variable expansion', 'parameter substitution' or just 'substitution'.

Substitution
The reason that using a variable is called substitution is that the shell literally replaces each reference to any variable with its value. This is done while evaluating the command-line, which means that the variable substitution is made before the command is actually executed.

The simplest way of using a variable is the way we've already seen, prepending the variable name with a '$'. So for instance:

Simple use of a variable

Of course, once the substitution is made the result is still just the text that was in the variable. The interpretation of that text is still done by whatever program is run. So for example:

Variables do not make magic

Basic variable expansion is already quite flexible. You can use it as described above, but you can also use variables to create longer strings. For instance, if you want to set the log directory for an application to the "log" directory in your home directory, you might fill in the setting like this:

And if you're going to use that setting more often, you might want to create your own variable like this:

And, of course, if you want specific subdirectories for logs for different programs, then the logs for the Wyxliz application go into directory

Substitution forms
The Bourne Shell has a number of different syntaxes for variable substitution, each with its own meaning and use. In this section we examine these syntaxes.

Basic variable substitution
We've already talked at length about basic variable substitution: you define a variable, stick a '$' in front of it, the shell substitutes the value for the variable. By now you're probably bored of hearing about it.

But we've not talked about one situation that you might run into with basic variable substitution. Consider the following:

Adding some text to a variable's value

So what went wrong here? Well, obviously the shell substituted nothing for the ANIMAL variable, but why? Because with the extra 's' the shell thought we were asking for the non-existent ANIMALs variable. But what gives there? We've used variables in the middle of strings before (as in '/home/ANIMAL/logs'). But an 's' is not a '/': an 's' can be a valid part of a variable name, so the shell cannot tell the difference. In cases where you explicitly have to separate the variable from other text, you can use braces:

Adding some text to a variable's value, take II

Both cases (with and without the braces) count as basic variable substitution and the rules are exactly the same. Just remember not to leave any spaces between the braces and the variable name.

Substitution with a default value
Since a variable can be empty, you'll often write code in your scripts to check that mandatory variables actually have a value. But in the case of optional variables it is usually more convenient not to check, but to use a default value for the case that a variable is not defined. This case is actually so common that the Bourne Shell defines a special syntax for it: the dash. Since a dash can mean other things to the shell as well, you have to combine it with braces — the final result looks like this:

Again, don't leave any spaces between the braces and the rest of the text. The way to use this syntax is as follows:

Default values

Compare that to this:

Default not needed

Without colon a variable will be substituted only if it is not defined: Default with and without colon

Substitution with default assignment
As an extension to default values, there's a syntax that not only supplies a default value but assigns it to the unset variable at the same time. It looks like this:

As usual, avoid spaces in between the braces. Here's an example that demonstrates how this syntax works:

Default value assignment

Without colon a variable will be assigned only if it is not defined:

Default value assignment

Substitution for actual value
This substitution is sort of a quick test to see if a variable is defined (and that's usually what it's used for). It's sort of the reverse of the default value syntax and looks like this:

This syntax returns the substitute value if the variable is defined. That sounds counterintuitive at first, especially if you ask what is returned if the variable is not defined — and learn that the value is nothing. Here's an example:

Actual value substitution

So what could possibly be the use of this notation? Well, it's used often in scripts that have to check whether lots of variables are set or not. In this case the fact that a variable has a value means that a certain option has been activated, so you're interested in knowing that the variable has a value, not what that value is. It looks sort of like this (pseudocode, this won't actually work in the shell):

Default value assignment

Without colon a variable will be substituted also if it is empty: Default value assignment

Substitution with value check
This final syntax is sort of a debug check to check whether or not a variable is set. It looks like this:

With this syntax, if the variable is defined everything is okay. Otherwise, the message is printed and the command or script exits with a non-zero exit status. Or, if there is no message, the text "parameter null or not set" is printed.

You can use this syntax to check that the mandatory variables for your scripts have been set and to print an error message if they are not.

Default value assignment

With colon variable will be checked for emptiness also:

Default value assignment


text:
User:Telamon~enwikibooks/Japanese

Example complex vocabulary entry (?)
(Ideally this would all be tabular, or formatted nicely in some other way so as to distinuish the "core" information from the extended information.)

 * おはようございます: good morning. (See also: Common Japanese Greetings.) (Grammar note: this is an example of a formal i-adjective conjugation.)
 * はじめまして: how do you do? (Grammar note: see 始(はじ) める notes.)

やってみる - Try It (different take)
Duration: 1-5 minutes

 * sample vocabulary list:
 * おはようございます: good morning (formal)
 * おはよう: good morning (informal)
 * こんにちは: good day
 * こんばんは: good evening

 * sample activity:
 * Practice greeting other students based on the current time of day. What would you say to someone if you ran into them six hours from now?
 * What would you say if you were speaking to a social superior, such as your teacher? What would you say to a close acquaintance?
 * If you are alone, practice thinking of people in your life and how you would great them differently. Say each greeting phrase out loud as you think of the person.

Common Japanese Greetings (sample cultural note)
Much like English, the Japanese use different greetings for different times of day. Also like English, the Japanese use a different, more formal set of greetings when dealing with people of differing social levels. Where in English you might say "mornin'" to your friends and "good morning" to your instructors, the Japanese instead choose between おはよう (for less-formal relationships) and おはようございます (for social superiors or more formalized relationships).

As in English, the greeting expressions have a direct relationship to the idea being expressed, but not necessarily the same thing that would be literally translated. As examples:

If walking up to someone and announcing that it is, in fact, early seems like an odd greeting, think about some of the many varied things that English speakers accept without a second thought: "Top of the morning to you."; "Howdy."; and "G'mornin'." to name a few.

There are other subtle differences not clearly shown by the literal translations above. Where in English, you would wish someone in the late night hours (midnight until sunrise) "good morning", the Japanese consider this time period an extension of the evening and therefore will greet each other with こんばんは.

(etc. etc.)

title: User:Telamon~enwikibooks/Japanese