text:
Physics with Calculus/Mechanics/Scalar and Vector Quantities

Introduction
The study of Mitchel Joens is intimately tied in with the study of mathematics. Sometimes, the direction of a number or quantity is as important as the number itself. Mathematicians in the 19th century developed a convenient way of describing and interacting with quantities with and without direction by dividing them into two types: scalar quantities and vector quantities. Scalar quantities have a magnitude but no direction. Vector quantities have both a magnitude and a direction. For instance, one might describe a plane as flying at 400 miles per hour. However, simply knowing the speed of the airplane is not nearly as useful as knowing the speed and direction of the airplane, so a more accurate description may be a plane flying at 400 miles per hour southeast. we use the concept of scalars and vectors by applying it to the physical quantities so that we can understand their properties and characteristics in a more convenient way.

Scalar Quantities
Scalar quantities are numbers that have a magnitude but no direction. Scalars are represented by a single letter, such as $$ a $$. Some examples of scalar quantities are mass (five kilograms), temperature (twenty-two degrees Celsius), and numbers without units (such as three).

Vector Quantities
Vectors are a geometric way of representing quantities that have direction as well as magnitude. An example of a vector is force. If we are to fully describe a force on an object we need to specify not only how much force is applied, but also in which direction. Another example of a vector quantity is velocity -- an object that is traveling at ten meters per second to the east has a different velocity than an object that is traveling ten meters per second to the west. This vector is a special case, however, sometimes people are interested in only the magnitude of the velocity of an object. This quantity, a scalar, is called speed which has magnitude but no given direction.

When vectors are written, they are represented by a single letter in bold type or with an arrow above the letter, such as $$ \mathbf{A} $$ or $$ \vec A $$. Some examples of vectors are displacement (e.g. 120 cm at 30°) and velocity (e.g. 12 meters per second north). The only basic SI unit that is a vector is the meter. All others are scalars. Derived quantities can be vector or scalar, but every vector quantity must involve meters in its definition and unit.

Unit Vectors

Strictly speaking, vectors exist separately from any coordinate systems. As vectors are geometric objects, we do not need to define a coordinate system in order to talk about vectors—or even to perform most operations on vectors. For example, consider the triple of numbers: number of apples, number of bananas, and number of carrots you have. Say that you calculate the triple in one coordinate system and get (1,2,3). If you rotate your coordinate system, and recalculate, you will have (1,2,3) again. Thus, the triple does not have the most important property of a vector -- that is transform like the coordinate system.

Nevertheless, it is often convenient to introduce a coordinate system. In three dimensions, for many problems the rectangular, or Cartesian coordinate system (named after French mathematician René Descartes) turns out to be convenient, and this coordinate system can be defined in terms of unit vectors.

A unit vector is a vector pointing in a given direction with a magnitude of one. Essentially, it merely indicates direction. In a Cartesian system the three unit vectors are called i, j, and k (or, in handwriting, with a little "hat" on top, as $$\hat{i}$$, $$\hat{j}$$, and $$\hat{k}$$). Colloquially, you might refer to the directions of the unit vectors as "east", "north", and "up". One could just have easily chosen i as up, j as east, and k as north. In choosing i, j, and k, once i and j are chosen, k must point to a particular direction, so that a common convention called "right-hand rule" holds. Mathematically, this can be compactly expressed as,

$$\hat{k} = \hat{i} \times \hat{j}$$,

but we will expand more on this as we describe "cross products" later on.

Unit vectors are generally chosen to be orthogonal. That is, each unit vector is perpendicular to each of the others. While unit vectors do not need to be orthogonal, working with a coordinate system defined by orthogonal unit vectors will be convenient in most cases. There are two other major coordinate systems used in physics—cylindrical coordinates and spherical coordinates. These will be introduced at a later time as necessary.

Vector Components
Every vector may be expressed as the sum of its n unit vectors.

$$\vec{A} = a_x~\hat{i} + a_y~\hat{j} + a_z~\hat{k}$$

The quantities ax, ay, and az are called the vector components of vector A. Sometimes they are represented simply as an ordered triple (e.g. (ax,ay,az)) especially when the choice and ordering of three unit vectors are not ambiguous.

Negation
Negation can also mean one vector isn't equal to the other so it can be expained like this: $$\vec{A}\neq\vec{B}$$ $$-\vec{A} = -(a_x~\hat{i} + a_y~\hat{j} + a_z~\hat{k}) = -a_x~\hat{i} - a_y~\hat{j} - a_z~\hat{k}$$

Considering a vector represented graphically by an arrow, the negative of a vector would be represented by a vector of the same length but opposite direction.

Scalar Multiplication
$$k\vec{A} = ka_x~\hat{i} + ka_y~\hat{j} + ka_z~\hat{k}$$

Note that vector negation is merely multiplication by a scalar, where that scalar is -1. A scaled vector represented graphically would point in the same direction as the original vector but have its magnitude scaled by a factor of k.

Addition

$$\begin{align}\vec{A} + \vec{B} &= (a_x~\hat{i} + a_y~\hat{j} + a_z~\hat{k}) + (b_x~\hat{i} + b_y~\hat{j} + b_z~\hat{k}) \\ &= (a_x + b_x)~\hat{i} + (a_y + b_y)~\hat{j} + (a_z + b_z)~\hat{k}\end{align}$$

Two vectors can be added graphically by placing the tail of the second vector (here, B) coincidental with the tip of the first vector (A). The resultant vector A + B is the vector drawn from the tail of A to the tip of B.

Any number of vectors can be added in this fashion. Vector addition is commutative:

$$\vec{A} + \vec{B} + \vec{C} = \vec{C} + \vec{B} + \vec{A}$$

and associative:

$$(\vec{A} + \vec{B}) + \vec{C} = \vec{A} + (\vec{B} + \vec{C})$$

Dot Product
When we multiply two vectors, we can either apply a multiplication rule that produces a scalar as the end result, or one that produces a vector as the end result. The first one that produces a scalar is called dot product. In mathematical texts, this is often called inner product, and some older texts will refer to this as scalar product (not to be confused with scalar multiplication); they are all the same. Dot product has all the usual properties of products, such as associativity, commutativity, and the distributive property. Geometrically, dot product is defined as:

$$\vec{A}\cdot \vec{B} = A B \cos(\theta)$$,

where $$\theta$$ is the angle between $$\vec{A}$$ and $$\vec{B}$$. Note that since $$\cos(0) = 1$$, if $$\vec{A}$$ is parallel to $$\vec{B}$$, then $$\vec{A} \cdot \vec{B} = AB$$. On the other hand, since $$\cos(90^\circ) = 0$$ if $$\vec{A}$$ is perpendicular to $$\vec{B}$$, then $$\vec{A} \cdot \vec{B} = 0$$. Using this as the guiding rule, we find below relationship:

$$\begin{align} \hat{i} \cdot \hat{i} = \hat{j} \cdot \hat{j} = \hat{k} \cdot \hat{k} = 1 \\ \hat{i} \cdot \hat{j} = \hat{j} \cdot \hat{k} = \hat{k} \cdot \hat{i} = 0\end{align}$$.

Using this, we can define dot product in terms of component vectors as follows:

$$\vec{A}\cdot\vec{B} = (A_x~\hat{i} + A_y~\hat{j} + A_z~\hat{k})\cdot(B_x~\hat{i} + B_y~\hat{j} + B_z~\hat{k}) = A_x B_x + A_y B_y + A_z B_z$$.

You are encouraged to expand out the multiplication explicitly, using the distributive property and find which terms cancel to zero and which products become 1.

Cross Product
The second multiplication rule for product of two vectors yields yet another vector. This multiplication rule is a very special one—in fact, it is a special property of 3-dimensional space that we can define a vector multiplication is this way and still obtain a vector. This rule will not work when limited to 2-D, and in any dimensions greater than 3, an extension of this rule will not result in another vector (cf. dot product can be naturally extended or limited to any dimensions to produce a scalar). This multiplication is called cross product, and in other texts, you may find terms outer product and vector product. The product can be defined with the two rules, first specifying the product vector's direction, and the second specifying its magnitude:
 * 1) $$\vec{A}\times\vec{B}$$ is perpendicular to $$\vec{A}$$ and $$\vec{B}$$ (that is, perpendicular to the plane defined by these two vectors). This leaves two possible directions along the line perpendicular to the plane. One of the two directions is called by a "right-hand rule": Hold out index finger, middle finger, and the thumb so that they are all perpendicular to each other. Let the index finger point towards direction of $$\vec{A}$$, and the middle finger towards $$\vec{B}$$. Then the thumb points towards the direction of $$\vec{A}\times\vec{B}$$. The ordering is important here (note exchanging A and B makes the thumb point in the opposite direction).
 * $$|\vec{A} \times \vec{B} | = A B \sin(\theta)$$, where $$\theta$$ is again the angle between $$\vec{A}$$ and $$\vec{B}$$.

Applying this definition to unit vectors again, we find following relationships: $$\begin{align} \hat{i} \times \hat{j} &= - \hat{j} \times \hat{i} = \hat{k} \\ \hat{j} \times \hat{k} &= - \hat{k} \times \hat{j} = \hat{i} \\ \hat{k} \times \hat{i} &= - \hat{i} \times \hat{k} = \hat{j} \\ \hat{i} \times \hat{i} &= \hat{j} \times \hat{j} = \hat{k} \times \hat{k} = 0 \end{align}$$. And in terms of components, we have (after a tedious algebra): $$\vec{A} \times \vec{B} = (A_y B_z - B_y A_z)~\hat{i} + (A_z B_x - B_z A_x)~\hat{j} + (A_x B_y - B_x A_y)~\hat{k}$$.

It turns out we can write this complicated relationship as a determinant of a 3 x 3 matrix: $$\vec{A} \times \vec{B} = \left| \begin{matrix} \hat{i} & \hat{j} & \hat{k} \\ A_x & A_y & A_z \\ B_x & B_y & B_z \end{matrix} \right|$$. Some properties of cross product, such as $$\vec{A} \times \vec{B} = - \vec{B} \times \vec{A}$$ and $$\vec{A} \times \vec{A} = 0$$ can be derived as a property of the determinant of the matrix.

Useful Properties of Dot Product and Cross Product
Both the dot product and the cross product distribute over vector addition.

$$\vec{A}\cdot(\vec{B}+\vec{C})=\vec{A}\cdot\vec{B}+\vec{A}\cdot\vec{C}$$

$$\vec{A}\times(\vec{B}+\vec{C})=\vec{A}\times\vec{B}+\vec{A}\times\vec{C}$$

$$(\vec{A}+\vec{B})\times\vec{C}=\vec{A}\times\vec{C}+\vec{B}\times\vec{C}$$

The dot product of two vectors is proportional to the cosine of the angle between them, and their cross product is proportional to the sine of the angle between them.

$$\vec{A}\cdot\vec{B}=\|\vec{A}\|\|\vec{B}\|\cos(\theta)$$

$$\|\vec{A}\times\vec{B}\|=\|\vec{A}\|\|\vec{B}\|\sin(\theta)$$

As we have seen already, the dot product is associative and commutative.

$$\vec{A}\cdot(\vec{B}\cdot\vec{C})=(\vec{A}\cdot\vec{B})\cdot\vec{C}$$

$$\vec{A}\cdot\vec{B}=\vec{B}\cdot\vec{A}$$

It is important to remember that the cross product has neither of these properties. Instead of being commutative, it is anticommutative.

$$\vec{A}\times\vec{B}=-\vec{B}\times\vec{A}$$

The cross product is not even associative. For example, consider $$(\vec{A}\times\vec{A})\times\vec{B}$$. Since the sine of the angle between $$\vec{A}$$ and itself is 0, $$\vec{A}\times\vec{A}=\vec{0}$$, and so $$(\vec{A}\times\vec{A})\times\vec{B}=\vec{0}$$. On the other hand, $$\vec{A}\times(\vec{A}\times\vec{B})$$ is not zero, since $$\vec{A}$$ and $$\vec{A}\times\vec{B}$$ are perpendicular. In fact, if $$\vec{A}$$ and $$\vec{B}$$ were perpendicular, its direction would be opposite to that of $$\vec{B}$$. Check this yourself using the right hand rule.

The component of $$\vec{A}$$ parallel to $$\vec{B}$$ is given by

$$\left(\frac{\vec{B}\cdot\vec{A}}{\vec{B}\cdot\vec{B}}\right)\vec{B}$$

and the perpendicular component of $$\vec{A}$$ is given by

$$\left(\frac{\vec{B}\times\vec{A}}{\vec{B}\cdot\vec{B}}\right)\times\vec{B}$$.

This leads to some interesting properties involving combinations of the products, such as

$$(\vec{B}\cdot\vec{B})\vec{A}=(\vec{A}\cdot\vec{B})\vec{B}+(\vec{B}\times\vec{A})\times\vec{B}$$,

$$\vec{A}\times(\vec{B}\times\vec{C})=(\vec{A}\cdot\vec{C})\vec{B}-(\vec{A}\cdot\vec{B})\vec{C}$$, and

$$(\vec{A}\times\vec{B})\cdot(\vec{C}\times\vec{D})=(\vec{A}\cdot\vec{C})(\vec{B}\cdot\vec{D})-(\vec{A}\cdot\vec{D})(\vec{B}\cdot\vec{C})$$.

Links
Previous:The SI Unit System Top:Measurement Next:Significant Figures


text:
Physics with Calculus/Mechanics/Newton's Laws

Newton's laws describe what causes motion of objects. There are three laws, which can be briefly stated:

 * First law: In an inertial reference frame, unless acted on by a net force, an object at rest stays at rest.
 * Second law: In an inertial reference frame, force is equal to mass times acceleration ($$\vec{F} = m \vec{a}$$)
 * Third law: For every force, there is an equal and opposite reaction force ($$\vec{F}_{\mathrm ab} = - \vec{F}_{\mathrm ba}$$)

Each of these laws will be discussed in more detail in each section.

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


text:
Systems Theory/Isomorphic Systems

Isomorphism
Isomorphism is the formal mapping between complex structures where the two structures contain equal parts. This formal mapping is a fundamental premise used in mathematics and is derived from the Greek words Isos, meaning equal, and morphe, meaning shape. Identifying isomorphic structures in science is a powerful analytical tool used to gain deeper knowledge of complex objects. Isomorphic mapping aids biological and mathematical studies where the structural mapping of complex cells and sub-graphs is used to understand equally related objects.

Isomorphic Mapping
Isomorphic mapping is applied in systems theory to gain advanced knowledge of the behavior of phenomena in our world. Finding isomorphism between systems opens up a wealth of knowledge that can be shared between the analyzed systems. Systems theorists further define isomorphism to include equal behavior between two objects. Thus, isomorphic systems behave similarly when the same set of input elements is presented. As in scientific analysis, systems theorists seek out isomorphism in systems so to create a synergetic understanding of the intrinsic behavior of systems. Mastering the knowledge of how one system works and successfully mapping that system’s intrinsic structure to another releases a flow of knowledge between two critical knowledge domains. Discovering isomorphism between a well understood and a lesser known, newly defined system can create a powerful impact in science, medicine or business since future, complex behaviors of the lesser understood system will become revealed.

Methods
General systems theorists strive to find concepts, principles and patterns between differing systems so that they can be readily applied and transferred from one system to another. Systems are mathematically modeled so that the level of isomorphism can be determined. Event graphs and data flow graphs are created to represent the behavior of a system. Identical vertices and edges within the graphs are discovered to identify equal structure between systems. Identifying this isomorphism between modeled systems allows for shared abstract patterns and principles to be discovered and applied to both systems. Thus, isomorphism is a powerful element of systems theory which propagates knowledge and understanding between different groups. The archive of knowledge obtained for each system is increased. This empowers decision makers and leaders to make critical choices concerning the system in which they participate. As future behavior of a system is more well understood, good decision making concerning the potential balance and operation of a system is facilitated.

Uses
Isomorphism has been used extensively in information technology as computers have evolved from simple low level circuitry with a minimal external interface to highly distributed clusters of dedicated application servers. All computer scientific concepts are derived from fundamental mathematical theory. Thus, isomorphic theory is easily applied within the computer science domain. Finding isomorphism between lesser undeveloped and current existing technologies is a powerful goal within the IT industry as scientists determine the proper path in implementing new technologies. Modeling an abstract dedicated computer or large application on paper is much less costly than building the actual instance with hardware components. Finding isomorphism within these modeled, potential computer technologies allows scientists to gain an understanding of the potential performance, drawbacks and behavior of emerging technologies. Isomorphic theory is also critical in discovering “design patterns” within applications. Computer scientists recognized similar abstract data structures and architecture types within software as programs migrated from low level assembler language to the currently used higher level languages. Patterns of equivalent technical solution architectures have been documented in detail. Modularization, functionality, interfacing, optimization, and platform related issues are identified for each common architecture so to further assist developers implementing today’s applications. Examples of common patterns include the “proxy” and “adapter” patterns. The proxy design pattern defines the best way to implement a remote object’s interface, while the adapter pattern defines how to build interface wrappers around frequently instantiated objects. Current research into powerful, new abstract solutions to industry specific applications and the protection of user security and privacy will further benefit from implementing isomorphic principles.

Comparing real vs model
The most powerful use for isomorphic research occurs when comparing a synthetic model of a natural system and the real existence of that system in nature. System theorists build models to potentially solve business, engineering and scientific problems and to gain a valid representation of the natural world. These models facilitate understanding of our natural phenomena. Theorists work to build these powerful isomorphic properties between the synthetic models they create and real world phenomena. Discovering significant isomorphism between the modeled and real world facilitates our understanding of the our own world. Equal structure must exist between the man-made model and the natural system so to ensure an isomorphic link between the two systems. The defined behavior and principles built inside the synthetic model must directly parallel the natural world. Success in this analytical and philosophical drive leads man to gain a deeper understanding of himself and the natural world he lives in.

title: Systems Theory/Isomorphic Systems


text:
Cookbook:Boiling Rice

The simplest way of cooking rice as a part of a main meal is to boil it. There are two main methods: the absorption technique, and the free simmering technique.

Absorption
This you need to experiment to get the amounts and time correct. Here's the technique that works for Basmati rice

 * Measure the rice into a saucepan that is at least four times as big as the amount of rice you need.
 * Wash the rice: nearly fill the saucepan with water, and stir the rice. The water should become somewhat cloudy as some of the starch is washed off the rice. Drain the water, and repeat a few times until the water is (almost) clear.
 * Drain the rice. You don't have to be too exact about this.
 * Add cold water to the pan - about double the volume of the rice.
 * Add a pinch of salt (amount depending on the amount of rice) and any other flavourings. (A crushed cinnamon blade is nice.)
 * Bring the rice to the boil, cover the pan, and let it simmer for ten minutes.
 * Turn off the heat, and let the rice stand for five minutes to absorb any remaining water and become soft.

This technique works for different kinds of rice but you need to work out by trial and error how much water to add, and how long to let the rice simmer. Instead of water you can use stock to flavour the rice.

Free simmering
This is a much simpler technique; however it usually results in rice that is considered by many as "too wet".

 * Fill a large pot with water (at least five times the amount of rice to be cooked) and bring to a boil.
 * While the water is coming to a boil, wash the rice (as above)
 * When the water boils, add salt to taste and add rice.
 * Boil the rice gently until it is cooked to a firmness you like (boil until swollen). Do not stir while boiling. Do not over cook (do not cook so long that it bursts).
 * Drain as gently as possible (do not stir), cover, and allow to "soak." Lining the inside of the lid with a cloth or paper towel assists in achieving fluffy rice.
 * It can soak off heat for 10 minutes or so and be ready to be fluffed with a fork and served. Or it can soak on very low heat for up to an hour, if necessary.

title: Cookbook:Boiling Rice


text:
User:Aratuk~enwikibooks

Hello.

Same me as Wikipedia.

title: User:Aratuk~enwikibooks


text:
Radiation Oncology/Leukemia

 * Subpages:
 * Acute Lymphoblastic Leukemia (ALL)
 * Small Lymphocytic Lymphoma (SLL) / Chronic Lymphocytic Leukemia (CLL)

Epidemiology
Leukemias are the most common cancer of childhood and the number one cause of cancer related death in children. 32% of cancers in children under 15. This varies by year, with leukemia representing 17% of cancers in the first year of life, peaking at 46% for 2-3 year olds, and 9% for nineteen year olds. Total cases of leukemia is 7.24 per 100,000 for age 0-5, 3.8 per 100,000 for ages 5-9, decreasing to about 2.5 for ages 10-19.

Incidence in Children: (SEER 1975-1995, age-adjusted)
 * Acute lymphoblastic leukemia - 2.9 per 100,000
 * 74% of leukemias in children. Incidence decrease
 * Burkitt's lymphoma and lymphoblastic lymphoma are now considered forms of ALL.
 * Acute myeloid leukemia - 0.52 per 100,000
 * about 14% of leukemias in children;
 * Chronic myeloid leukemia - 0.13 per 100,000 (less than 7% of childhood leukemias)
 * Chronic lymphocytic leukemia - rare (about 0.02 per million)
 * Others - rare

ALL and AML have the incidence at younger ages (<5 years) then decrease. AML incidence rises after age 10, causing 36% of leukemias at age 15-19, but ALL is still the most common leukemia in the older age group (50%).

Incidence in Adults: (SEER 1997-2001, age-adjusted)
 * Chronic lymphocytic leukemia - 3.53 per 100,000
 * increases sharply with age - 0.78 (age 20-54), 7.34 (55-64), 15.1 (65-74), 24.9 (75+)
 * median age 60 yo
 * higher in males by about 2:1. somewhat higher in whites than blacks.
 * 5-15% will evolve into a more aggressive lymphoid malignancy
 * Acute myeloid leukemia - 3.77 per 100,000
 * increases sharply with age - 1.66 (age 20-54), 5.9 (55-64), 13.8 (65-74), 21.7 (75+)
 * higher in males by about 2:1. somewhat higher in whites than blacks
 * Acute lymphocytic leukemia - 1.5 per 100,000
 * incidence increases slightly with age but highest in childhood
 * somewhat higher in males than females, whites than blacks
 * Chronic myeloid leukemia - 1.6 per 100,000
 * increases with age
 * higher in males than females (by about 1.5:1). somewhat higher in whites than blacks

Risk of Relapse

 * Clinical
 * Age
 * WBC count
 * Biological
 * Histology/immunophenotype
 * Cytogenetics
 * Gene identification
 * Response based
 * Morphology (BM Bx/aspirate)
 * Minimal Residual Disease
 * Lymphomatous presentation (PMID 1855175)

Risk groups:
 * Low - age 2-9 inclusive, WBC < 10,000; no L2 morphology and boys with plts < 100,000
 * Intermediate - all others; includes pts who are low risk but have L2 morphology or boys with plts < 100,000
 * High - WBC > 50,000; pts who are intermediate risk but have L2 morphology

Adults with ALL:
 * High risk: age > 35, WBC > 30,000, null cell phenotype, Ph+, remission after more than 4 weeks of intensive chemo
 * Have a 18-28% chance of continuous CR at 5 yrs
 * Regular risk
 * 60% 5-yr DFS

CNS disease
See also: Radiation Oncology/CNS/CSF involvement

CNS 1 - Negative cytology (no blasts) CNS 2 - +cytology, < 5 WBC/microliter CNS 3 - +cytology, >=5 WBC/microliter, or any CN lesion

 * Gilchrist 1994

CNS involvement at diagnosis in 3% of children with ALL. CNS involvement is more common in ALL, rare in AML (except for the variant acute myelomonocytic leukemia, AMML), and rare in CML and CLL. Risk in AMML is 20%. 5-10% risk in adults with ALL.

Roles for Radiation

 * CNS prophylaxis
 * CNS Therapy (active disease)
 * TBI
 * Testis prophylaxis(sanctuary sites)
 * Palliation
 * Treatment of chloromas

BMT
Indications for allogeneic hematopoietic stem cell transplantation (HSCT):
 * relapse, unfavorable cytogenetics, induction failure.

High risk patients (relapsed or t(9;22) (Philadelphia) may benefit from BMT

Conditioning regimens prior to HSCT: purpose is to prevent graft rejection and eliminate leukemic cells. Regimen may consist of chemotherapy alone or chemotherapy + TBI. There is a suggestion of improved outcomes with TBI.

TBI - Socié et al, Blood 2001

CNS prophylaxis
Indications:
 * CNS involvement at time of diagnosis
 * High risk disease
 * <1 yo, >10 yo
 * WBC > 100,000
 * T-cell ALL with WBC > 50,000
 * bcr-abl translocation (Philadelphia chromosome)
 * lymphomatous presentation

PCI for CNS prophylaxis as frontline treatment for patients with ALL led to an increase in survival in the 1960s. Toxicity from PCI is significant. Earlier trials used 24 Gy. Later trials showed that the dose can be reduced to 12-18 Gy or eliminated entirely if appropriate systemic and intrathecal chemotherapy is used.

Treatment of CNS disease

 * See also: Radiation Oncology/CNS/CSF involvement

Therapeutic Cranial Irradiation -5% of those on initial presentation -CNS failure

See appropriate protocol for chemotherapy regimen, individual risk-adapted, and response criteria to stratify by risk category.

 * Dose
 * Varies on protocol
 * 24 Gy in past, no longer used.
 * 18 Gy (standard dose) associated with decreased risk of CNS complications
 * PMID 11443604 - Waber DP, Shapiro BL, Carpentieri SC, et al.: Excellent therapeutic efficacy and minimal late neurotoxicity in children treated with 18 grays of cranial radiation therapy for high-risk acute lymphoblastic leukemia: a 7-year follow-up study of the Dana-Farber Cancer Institute Consortium Protocol 87-01. Cancer 92 (1): 15-22, 2001.
 * 12 Gy has been used more recently in European trials
 * PMID 10828010 - Schrappe M, Reiter A, Ludwig WD, et al.: Improved outcome in childhood acute lymphoblastic leukemia despite reduced use of anthracyclines and cranial radiotherapy: results of trial ALL-BFM 90. German-Austrian-Swiss ALL-BFM Study Group. Blood 95 (11): 3310-22, 2000.

 * Fraction size
 * Usually 180
 * Sometimes 160 (thought to be lower neurocognitive effects)

 * Volume
 * Cranial radiation only (no spinal irradiation)
 * (need ref)
 * Areas to watch
 * Cribiform plate (reported site of failure for medulloblastoma)
 * Temporal lobes

Treatments: CCG trials from 1971-78 used cranial RT + intrathecal MTX but no spinal RT. CSI was found to be more effective than cranial RT in treating pts with CNS relapse. (Willougby, MRC, PMID 816410, 1976) CCG trials from 1978-83 used 24 Gy cranial + 12 Gy spinal given during consolidation phase along with systemic and intrathecal chemo.
 * CNS disease at diagnosis was not an independent prognostic factor, thereby indicating the effectiveness of CNS treatment regimens used.

CCG trials from 1983-89 used more intensive chemotherapy. Reduced spinal dose to 6 Gy in those treated with intensive consolidation phase in order to limit hematopoietic toxicity.

Toxicity

 * Finnish Cancer Registry; 2007 PMID 17687156 -- "Scholastic achievements of childhood leukemia patients: a nationwide, register-based study." (Harila-Saari AH, J Clin Oncol. 2007 Aug 10;25(23):3518-24.)
 * Retrospective. 371 patients with leukemia diagnosis, <16 years old, born 1974-1986. Five matched controls from Population Registry of Finland. Information on 9th grade school analyzed
 * If cranial irradiation: lower overall marks (mean -0.24 on scale 4-10), and lower marks for all school subjects
 * If chemo alone: females <7 at diagnosis had worse school marks
 * Conclusion: Cranial irradiation impairs scholastic achievement; also chemo alone in females before school age

 * 1981 PMID 6948611 -- "Neurologic sequelae of methotrexate and ionizing radiation: a new classification." (Bleyer WA, Cancer Treat Rep. 1981;65 Suppl 1:89-98.)
 * Review of data
 * Conclusion: concurrent CNS irradiation and chemotherapy most neurotoxic. Single modalities safer, with HD-MTX least neurotoxic

Review articles

 * CNS treatment: PMID 12525506 — "Toward optimal central nervous system-directed treatment in childhood acute lymphoblastic leukemia." Pui CH et al. J Clin Oncol. 2003 Jan 15;21(2):179-81.
 * CNS treatment: PMID 16215818, 2005 — "Leukemic and lymphomatous meningitis: incidence, prognosis and treatment." Chamberlain MC et al. J Neurooncol. 2005 Oct;75(1):71-83.
 * ALL treamtent: PMID 16407512 — "Treatment of Acute Lymphoblastic Leukemia." Pui CH et al. NEJM. 2006 Jan 12;354(2):166-178.

title: Radiation Oncology/Leukemia


text:
Final Cut Pro/Introduction

A Word before We Begin
This book is intended to be a guide for anybody who wants to learn more about Final Cut Pro. It is a tutorial, and an alternative to a typical book that one might find on a brick and mortar bookstore shelf for approximately $50. Ideally, it is part of a series of computer manuals that will increase the technical capabilities of individuals interested in all forms of electronic and computer media.

Anybody is welcome to add their thoughts to this book. Newbies, amateurs, and professionals all have content that will help flesh this book out and make it complete.

A wikibook is a community project. This is a book that requires a substantial amount of time and energy to complete. It can benefit greatly from even modest contributions from readers and editors. For example, even as a reader, you can fix bugs and typos in the text in order to improve the book. If you find an opportunity to make a correction or improvement, simply click "edit," make your changes, and click save. Other users, especially those who have devoted large amounts of energy and time to this book and the wiki world in general, will eventually review your changes and confirm their appropriateness.

If you are unsure of how you can help, you can visit the "discussion" page and ask there. In general, to make a small change, you don't need to ask first, and you can just use common sense to determine if your change is appropriate. We trust your judgment.

A large portion of this book will eventually utilize screen captures. As you contribute, please don't let your lack of screen captures deter you from contributing portions of text that would benefit from eventual images.

History
Please see the wikipedia entry for Final Cut Pro for a short history of Final Cut Pro and how the software came to be.

Linear Editing
In the early days of film, editors literally made cuts in film when performing an edit. They would then tape or splice another segment of film onto the cut. Film editing was originally non-linear, an editor could place any amount of film in between any two frames and it would still be playable. When editing moved to video, the process became linear. One could only edit in one direction in the timeline. The editor would start with a clip, then add a second clip to the end of the first clip, then add another to the end and so on until the video was completed. If the editor wanted later to add a clip between the second and third clips, for instance, he would have to record everything again after the newly inserted clip, for this clip would be over the original editing.

Just think about using a typewriter (if you remember those) instead of a text-editing software: You should either retype the whole page again or erase the third and subsequent paragraphs, insert the new one, and then rewrite everything from the third paragraph on. A typewriter would be a "linear" writing machine where any computer with a text editing software (where you can cut, copy, paste, edit your text easily) would be "non-linear".

Now, the non-linear process is available to video as well as film.

Format
This book will begin by focusing on the DV (miniDV and DVCAM) format, as it is the most common format used by Final Cut Pro users. The firewire 400 cable that connects a DV deck or DV camera to an Apple computer enables users to edit without any additional hardware. Eventually, we will compose additional chapters or supplements to chapters that will encompass additional formats.

Main, Next

title: Final Cut Pro/Introduction


text:
Horn/Technique/Posture

Correct posture is important to comfortably producing a good tone on the horn, as with any wind instrument. Using a poor posture can result in wavering pitch, inadequate air support, pinched or hollow sound, and various other playing difficulties.

While playing, the player's back and neck must always be in line. It is recommended that hornists (and most wind instrumentalists) sit with their backs off the back of the chair and feet flat on the floor for a slight "leaning forward" feeling. The most important thing to remember is that the posture must be as upright as possible without causing any excess tension; the entire body must be as relaxed as possible to avoid tension creeping into the sound.

Only the tips of the fingers should be placed on the valve levers. This allows for faster depression of valves, allowing the player to change pitches properly.

Correct posture will allow one to adjust dynamics more correctly and produce a better sound.

title: Horn/Technique/Posture


text:
Talk:Final Cut Pro

Every chapter could use some help.

Please indicate whether or not you think the chapters need reorganization as well.

Please visit the Wikipedia guide: How_to_edit_a_page for more information.

title: Talk:Final Cut Pro


text:
Final Cut Pro/Program Layout

Final Cut Pro's standard view consists of four main windows: the browser (in the top-left corner by default), the viewer (in the top middle, by default), the canvas (top right, by default) and the timeline (at the bottom).

The Browser
As in most digital non-linear editing applications, the Browser is not an interface to the computer's filesystem. It is an entirely virtual space in which references to clips (aliases) are placed, for easy access, and arranged in folders called 'bins'. Since they are only references to clips that are on the media drive of the computer, moving or deleting a source file on the media hard drive destroys the link between the entry in the Browser and the actual media. This results in a 'media offline' situation, and the media must be 'reconnected'. Final Cut Pro can search for the media itself, or the user can do this manually. If multiple clips are offline at the same time, Final Cut can reconnect all the offline media clips that are in the relative directory path as the first offline media clips that is reconnected.

The Browser contains two type of tabs, one for projects and one for effects. They both behave like an explorer window. The projects tab will show the various bins, media, clips, and sequences that you have imported into Final Cut, along with any associated information. Column headings are very versatile and able to be rearranged. By clicking and dragging, you can move entire column headings around.

You can also have multiple projects open at once. Every project will open under a separate tab. By clicking and dragging the project tab outside of the browser window, you can make the tab independent of the browser. This is useful for sharing media between multiple projects.

The Effects tab is the other available tab in the Browser window. Take a look and orient yourself with the various filters and transitions available in the sub folders. In order to use each effect, you can simply click and drag the filters to media in the Timeline.

Viewer
The viewer has tabs for each channel of the selected clip's audio, in which the waveform for the audio can be viewed and scrubbed, and where its volume can be keyframed. The filters tab is where effects for the clip appear and where their parameters can be adjusted and keyframed. If the clip selected is a generator (such as an oval shape), a control tab appears for changing its geometrical properties. Finally, the viewer's motion tab contains tools to adjust the scale, opacity, cropping, rotation, distortion, drop shadow, motion blur and time remapping properties of the clip. Mini-timelines to the right of each parameter allow the property to be keyframed.

Canvas
The canvas outputs the contents of the Timeline. To add clips to the Timeline, besides dragging them there, it is possible to drag clips from the Browser or Viewer onto the Canvas, where the 'edit overlay' is displayed. The edit overlay has seven drop zones, into which clips can be dragged in order to perform different edits. The default is the 'overwrite' edit, which overwrites at an in point or the space occupied after the playhead with the incoming clip. The 'insert' edit slots a clip into the sequence at the in point or playhead's position, keeping the rest of the video intact, but moving it all aside so that the new clip fits. There are also drop zones to have the application automatically insert transitions. The 'replace' edit replaces a clip in the Timeline with an incoming clip, and the 'fit to fill' edit does the same thing, but at the same time, it adjusts the playback speed of the incoming clip so that all of it will fit into the required space [in the Timeline]. Finally there is the 'superimpose' edit, which automatically places the dropped clip on the track above the clip in the Timeline, with a duration equal to the clip below it. Unless an in or out point are set, all edits occur from the position of the playhead in the Timeline.

Using the wireframe view on the canvas, the clip can be manipulated directly - dragging it around in the canvas to change its position, for example, or resizing it. Precise adjustment controls for these things are in the viewer.

The Timeline
Main

title: Final Cut Pro/Program Layout


text:
Using GNOME/Differences KDE

 * In terms of the basic desktop layout, KDE more-closely follows a Windows style with a taskbar, start menu, and various other things. On the other hand, GNOME takes the Mac OS X approach, placing the task bar on top of the screen and a separate bar for currently-open applications (the Task Bar).
 * GNOME and KDE each have their own set of usability and accessibility guidelines:
 * GNOME Human Interface Guidelines
 * KDE Human Interface Guidelines
 * GNOME is built with the GTK toolkit while KDE uses Qt.
 * GNOME is mainly written in C and KDE in C++.
 * While KDE's interface is built using Qt toolkit, GTK is a very popular toolkit for Linux and so most apps have better integration with GNOME.

title: Using GNOME/Differences KDE


text:
ActionScript Programming

ActionScript is a scripting language developed by Adobe (formerly Macromedia) for its Flash animation studio. ActionScript is similar to JavaScript with its syntax and functionality. The latest version, ActionScript 3.0, released together with Flash CS3, emphasizes Object oriented programming more so than previous versions. ActionScript is a proprietary language designed to control animations and create advanced interactive applications such as slide-shows, games, quizzes, tutorials, and websites. ActionScript 3.0 has grown substantial capabilities in comparison with previous versions. ActionScript may be difficult to learn for beginners with no programming experiencing, however, it becomes easier to grasp with repeated practice and use.

This tutorial is designed for use with Actionscript 2.0. Changes for ActionScript 3.0 will be listed as well.

Part I

 * /PartI/Getting Started/
 * /AS In A Nutshell/

Chapter 1 - Properties

 * Page 1:
 * X, Y Coordinates
 * Width, Height Measures
 * XScale, YScale
 * Visible
 * Rotation
 * Quality
 * Name
 * Alpha
 * Page 2:
 * XMouse, YMouse
 * CurrentFrame
 * TotalFrames
 * URL
 * Target
 * DropTarget
 * FocusRect
 * FramesLoaded
 * SoundBufTime

Chapter 2

 * Operators (1)
 * Comments

Chapter 3 – Data types

 * General and difference between Number and String data types
 * String
 * Methods
 * charAt
 * charCodeAt
 * concat
 * fromCharCode
 * indexOf
 * lastIndexOf
 * slice
 * split
 * substr
 * substring
 * toLowerCase
 * toUpperCase
 * Properties
 * length
 * Number
 * Methods
 * toStringtoString
 * valueOf
 * Boolean
 * Methods
 * toString
 * valueOf
 * Date
 * Methods
 * Arrays
 * Properties
 * Length
 * Methods
 * concat
 * join
 * pop
 * push
 * reverse
 * shift
 * slice
 * sort
 * sortOn
 * splice
 * toString
 * unshift
 * String.split (method)
 * Objects
 * Scopes of variables
 * Global variables
 * Timeline variables
 * Local variables

Chapter 4

 * Conditions/Loops (part 1)
 * If, else if, else
 * Operators (part 2)
 * Conditions/Loops (part 2)
 * For
 * For .. In

Authors and contributors
Ruben Vardanyan

Contributors
Wolf Warrior

title: ActionScript Programming


text:
User talk:Neil3

Thank you very much for your contribution to the introduction to the course on the history of Ancient Philosophy. I feel that it is in fact a very good starting point. I like the way you mention the fact that we do not usually pay enough attention to eastern philosophy in the west. I have written a small article on the history of Japanese philosophy, and I will include it shortly. I hope we receive some contributions on the history of Chinese and Indian philosophy. This could hopefully give readers an overview of a philosophical tradition that has been greatly neglected in the west.(Alex beta 10:37, 7 Mar 2005 (UTC))

title: User talk:Neil3


text:
Talk:Ada Programming/Ada 2005

New Character Set
-- suruena 11:54, 7 Mar 2005 (UTC)
 * IMHO it should be better (more understandable) to use an English word to show the use of 32 bits identifiers. The identifier Übertrag is not very useful for non german speakers. Something like Déjà vu, but that sounds like a common name for an identifier. Or maybe the example could simply be the definition of constant Pi in Ada.Numerics

type Price_In_€ is delta 0.01 digits 8; -- ManuelGR 20:46, 8 Mar 2005 (UTC)
 * As far as I know these two examples are already possible in Ada 95, since ISO Latin-1 has to be supported in identifiers. Will be € supported? That would be a good example:

-- suruena 14:47, 13 Mar 2005 (UTC)
 * It's true, both Übertrag and Déjà vu are allowed in Ada 95, so we must change that example. I don't known whether Price_In_€ is a legal Ada 2005 identifier (Price_In_$ is not), but at least it is not rejected by GCC 3.4.3 (using switches -gnatiw -gnatW8 for UTF-8 character set). Anyway, until we are sure the euro sign is valid in identifiers I would use another example, like putting the standard constant Pi and saying that russians and indians will be able to use their mother tonge in Ada.

Ada 200Y
As stated in the Ada 2006 FAQ, the "nickname" of the next revision of Ada isn't clear yet (the community decides this name, and there is no agreement). The new standard probably will be accepted in early 2006, however some voices are saying that the name should be Ada 2005 because it has been named that way during some time, and because Ada 2006 do not sounds well. I don't have any preferences, but IMHO maybe we should put every reference to the next revision simply as "Ada 200Y", explaining in this page that the nickname isn't decided yet. --surueña 11:23, 2005 Jun 5 (UTC)

 * For new content, I agree in using Ada 200Y. For the current content I suggest to wait how it evolves before changing anything. ManuelGR 19:46, 5 Jun 2005 (UTC)

According to the "Rationale for Ada 2005" published in http://www.adacore.com/ada_2005.php (right box):

 * This is currently being reviewed and the final approved standard should emerge in the first half of 2006. There has been much discussion on whether the language should be called Ada 2005 or Ada 2006. For various reasons the WG9 meeting in York in June 2005 decided that the vernacular name should be Ada 2005.

So we should not take the contrary to the WG9. Now it is clear that the standard will be published in 2006 but the language will preserve its currently popular name. I will undo my changes, so all the references go back to Ada 2005. ManuelGR 19:14, 14 July 2005 (UTC)

contents structure, library
The nesting level of Library seems broken. I feel guilty of that. Could someone in the know have a look, and get things right again?

The programs' sources could be compiled but they aren't on sf. I'm not yet familiar with how one arranges that. I could send a .tar if anyone wants it.

gb

 * The nesting level is now fixed, I have removed a minor section title because there was too much nesting. About Sourceforge, you can become a member of the project and then you can upload all the sources you want, otherwise you can send to me the examples (using the "E-mail this user" link on my userpage ManuelGR) and I will upload them to the CVS. ManuelGR 16:17, 23 October 2005 (UTC)

bean counting algorithm
actually, the introductory paragraph at the start of the bean counting subjection states an exercise that is more extensive than its semi-solution. It's a WiKi, o.K.? :-)

gb

 * this is now fixed. gb 02:55, 1 November 2005 (UTC)

Container Lib
Well, while a description of the container lib was in desperate need I think it would better be placed in either in the Library section ot the book Ada_Programming/Libraries/Ada.Containers, Ada_Programming/Libraries/Ada.Containers.Vectors or inside a new feature page Ada_Programming/Containers.

This is the "overview" page and the text is allready detailed for "overview". Nothing wrong with detailed - it deserves it't own space

--Krischik T 12:15, 3 November 2005 (UTC)

 * I think so, it deserves its own space. Let's wait to hear what Georg Bauhaus thinks about it. ManuelGR 19:40, 4 November 2005 (UTC)

 * I agree. gb 18:31, 5 November 2005 (UTC)

Given that we all agree, I will copy the content to Ada_Programming/Containers. I think that one is the best page since the demo covers more than one container (so not for Ada_Programming/Libraries/Ada.Containers.Vectors, Ada_Programming/Libraries/Ada.Containers.Maps, etc) and it is more tutorial-oriented than reference-oriented, so not for the parent package Ada_Programming/Libraries/Ada.Containers either. Containers will be a main topic for Ada 2005 tutorials, won't they? ManuelGR 22:46, 22 November 2005 (UTC)

title: Talk:Ada Programming/Ada 2005


text:
A-level Chemistry/OCR (Salters)

This Wikibook is about A-level Chemistry, designed to follow the OCR (Salters) syllabus, but is not endorsed by OCR. It will hopefully be useful as a revision guide or for alternative explanations to the ones in your textbook or from your tutor.

Chemistry for Life (2850)

 * /The Elements of Life/
 * /Developing Fuels/

Chemistry of Natural Resources (2848)

 * /Elements from the Sea/
 * /The Atmosphere/
 * /The Polymer Revolution/

Skills for Chemistry (2852)

 * /Open-Book Paper/
 * /Experimental Skills/

Chemistry of Materials (2849)

 * /What's in a Medicine?/
 * /Designer Polymers/
 * /Engineering Proteins/
 * /The Steel Story/

Chemistry by Design (2854)

 * /Aspects of Agriculture/
 * /Colour by Design/
 * /The Oceans/
 * /Medicines by Design/
 * /Visiting the Chemical Industry/

The Chemistry

 * /Alkenes/
 * /Alkynes/
 * Amino acids
 * Atomic orbitals
 * Born-Haber cycles
 * Buffer solutions
 * Complexes
 * Electronic configurations
 * Hydrogen
 * Isomerism
 * Molecular geometry
 * Reactions of arenes
 * Spectroscopy
 * Vacuum filtration
 * Weak acids
 * Yield

Goodies

 * Chemical Ideas table of contents
 * Table of functional groups met during the course
 * Table of substances met during the course
 * Table of constants met during the course
 * Table of physical quantities met during the course
 * Periodic table of the elements

Index

 * Salters Advanced Chemistry Wikibook index

title: A-level Chemistry/OCR (Salters)


text:
User:Charlie123

I'm currently working on London among other books. I live in the wonderful United Kingdom.

title: User:Charlie123


text:
Final Cut Pro/Starting a Project

The First Project

 * 1) Open Final Cut Pro.
 * 2) Click on FILE > Save Project As
 * 3) Give your project a name. We’ll name ours “First Project,” and we’ll save it under the Documents folder of the current user.

Final Cut Pro has an auto save feature that will prompt you to save your project if you haven’t already. It can't perform an autosave unless the project has been saved at least once first.

When you open Final Cut Pro for the first time, you will encounter the Easy Setup Window, and you will be asked to choose a scratch disk. For now, select DV NTSC for the Easy Setup, and set your scratch disk to an external hard drive or second hard drive. If you don’t have an external or second hard drive, you can use your main/internal hard drive to edit your project. Storing media on the main hard drive is not ideal; if you eventually fill up your hard drive, you can affect system performance, but it can be done.

Previous, Main, Next

title: Final Cut Pro/Starting a Project


text:
Final Cut Pro/Establishing System Settings

There are two menus that are important to look at before you begin importing video and editing in the timeline: the User Preferences and the System Settings.

First let's take a look at the User Preferences:

Go to FINAL CUT PRO > User Preferences

User Preferences
There are five tabs under the User Preferences control panel.

Levels of Undo
This can be set from 0 to 99. The default is 10. I generally prefer more than ten, but I also don’t need 99 levels of undo. The higher the number you pick, the more memory you are devoting to saving your history of edits. For now, set the Levels of Undo to 30

List Recent Clips
The list of recent clips pop up menu is located on the lower right corner of The Viewer window. You can set this to be as high as 20, but the default of 10 clips is usually fine.

Multi-Frame Trim Size
This number determines how many frames forward or backward the trim buttons work in Trim Mode. Along with the multi frame button in Trim Mode, there will always be a +1 and -1 trim button, so feel free to try different number you feel might suit you. You can set this to be as high as 99. Try 10 to start.

Real Time Audio Mixing
The number of tracks that can be mixed and that you can listen to in real time is dependent on your processor speed, the number of audio filters used in your sequence, your hard disk data transfer rate, and the amount of memory allocated to Final Cut Pro. This number can be set up to 99; its default is 8. Typically eight is enough to begin projects with, although if you add a lot of sound effect tracks and music tracks, you may want to bump this number up to 10 or 12. It is a handy adjustment to have available, but generally 8 is enough.

Audio Playback Quality
Unless you are performing a detailed audio mix at the end of your editing process, set this to low to enable you to hear the greatest number of mixed tracks and audio filters in real time. When you are recording your sequence to tape, Final Cut Pro uses the high setting regardless of what you have selected for the playback quality.

Audio Outputs
Previous, Main, Next


text:
Japanese/Vocabulary/Astronomy

Japonais/Vocabulaire/Astronomie

title: Japanese/Vocabulary/Astronomy


text:
German/Appendices/Vocabulary/Travel

(The plural article is always "die".)

title: German/Appendices/Vocabulary/Travel


text:
User:Cburnett

See my user page here: WikiPedia:User:Cburnett

Books of interest:
 * Microprocessor Design
 * Python
 * Ruby

title: User:Cburnett


text:
German/Appendices/Vocabulary/Family

Kinship
(The plural article is always "die".)

verb/adjective
Vocabulary/Family

title: German/Appendices/Vocabulary/Family


text:
Turing/Loops

Loops are things that keep on repeating and repeating until you tell it to stop. There are two types of loops that we'll be learning: for-loops and regular loops.

For-loops increase the value of an integer i (or anything else) by a given amount (default: 1), until it has reached its upper limit.

for i : 1 .. 10 %Start with 1, end with 10, increase i by 1 (i.e. 1,2,3...10) put i end for

That's all there is to it! Whatever's in the middle will be executed each time the loop is run. This program will print all numbers from 1 to 10.

Now there are a few things you may have noticed. Firstly, we haven't declared i. Actually, you're not supposed to declare for-loop variables. In fact, if you do, then it won't work!

What if we want to print all multiples of 5 between 1 and 103?

for i : 0 .. 103 by 5 put i end for

Excellent! You're now a for-loop guru! Loops are pretty simple, and the syntax is almost the same. So why would you want to use normal loops instead of for-loops? For-loops are used when you know how many times to repeat it. However, sometimes the amount of times you repeat depends on how many lines there are in a text file. More often, you'll want a program to loop until the user tells you to exit. This is what we'll be doing.

var word : string

loop put "Enter any word you want, and I'll tell you what it is! (type 'exit' to exit)" get word exit when word = "exit"

put "You entered ", word end loop

That's pretty self explanatory. We're getting a string from the user, and if the string is exit, then we exit. Turing is a very easy program to use, and it avoids complicated syntax, which becomes handy in cases like this; 'exit when' means exactly that, you exit when the following case is true.

title: Turing/Loops


text:
Turing/Data files

What are datafiles? Why would you need them?

Data files are simple text files that Turing can read and write from. Sometimes, especially in contests, the data entered will be in a text file rather than the user entering it when they run the program. In this tutorial, you will learn how to read from and write to data files.

Let's start with reading, which is used more often. You first declare an integer variable. This is required from Turing. Then, you'll use the  and   statements to read from it.

var inp : int %Turing requires this integer variable var ctr : int := 0 %Counter variable, initial value 0 var tmp : string %Holds each line of the datafile

open : inp, "INPUT.txt", get %open the file INPUT.txt for reading

loop exit when eof(inp) %Exit when the end-of-file is reached ctr += 1 get : inp, tmp %Read the [ctr]th line from the data file, and store it in the string variable tmp put ctr, "th line reads: ", tmp end loop

You may have noticed  in the above code. EOF means end-of-file, so we're telling Turing to exit the loop once it has reached the end of the file. If you don't do this, you'll get an error because Turing will try and read past the end of the file!

title: Turing/Data files


text:
Web Development/What's needed to develop a website?

This section means to serve as an introduction to the rest of Section 3: Resources.

The Simple Website
Web development is fairly easy to learn and get into. This is mainly because it is so accessible, and because a simple website requires very little overhead or experience to create. To create a simple website, one will need to have the following:

 * 1) Domain Name - the common place the user will find your site on the World Wide Web. For example, www.yournamehere.com is a domain name. You can purchase your own domain or get a free one offered by many different online companies. Domains have come down in price drastically over recent years, and can now be found for under $10 USD.
 * 2) Webhost - this is a company that will "host" your domain and web pages. By "uploading" your "data"—transferring the files that makeup your website—to their server, you give the consumer access to your page on the Internet.
 * 3) Text Editor program and a little knowledge of HTML - HTML, or Hypert-text markup language is the most basic of the web-languages. All you really need to develop a web page is some basic knowledge of HTML and the Windows program Notepad (the Macintosh equivalent is TextEdit). A page written in this "markup language" can contain images, links, text formatting, etc., and its file extension is .html. After you type your page into one of these free programs (or many other pay programs), upload the file to your hosting. A user's browser will then be able to decipher the HTML.
 * 4) FTP Program - FTP stands for file transfer protocol, and is the most common method of uploading your files to your hosting. When you register a domain name and secure space online for your data, your webhost will give you an FTP user name and password. By typing these into one of the numerous free FTP programs, you can access your web space and upload your website.

Note: HTML is not covered in this course, but several HTML tutorials can be found online.

Human Resources
As for the more advanced websites, a staff is usually required to maintain and keep up the site. Aside from knowledge of HTML and webspace, people may be required to do miscellaneous jobs such as graphic design, advanced coding, customer relations, network administration, etc.

Capital
Capital, varying with the complexity of the website's goals, is also needed. For a simple website run by one person, the expenses may be as small as paying for the domain and yearly hosting fees. As websites get more complex and intricate, the amount of capital increases proportionally.

As a common sense rule, the bigger the website you want, the more people, money, and technology you're going to need. This section should serve as a guide for planning resource gathering and management, and to give you an idea of what's needed to start up and maintain a website.


text:
Turing

Part 1: A simple 'hello world' program, user input

Part 2: If statements, cases

Part 3: Loops

Part 4: Data files

Part 5: Procedures, functions, and processes

Part 6: Arrays, flexible arrays

Part 7: Graphics

/Questions/: Solutions will be listed on a separate page. It is recommended that you should not look at them until you have completed the problem. (unless you cannot figure it out).

/Help/: Post your Turing questions here!

/Authors/

title: Turing


text:
Turing/Authors

Faraaz Damji (Frazzydee) has just learnt Turing in February 2005, but has had some experience with other languages. He hopes he will be able to help newcomers, and welcomes questions on his talk page.

title: Turing/Authors


text:
Turing/Questions

Question 1: Fractorials
A fractorial is very similar to a factorial. A fractorial of a n means that 1 to n over that number is a whole number.

For example, 5 fractorial is 60, because 1/60 + 2/60 + 3/60 + 4/60 + 5/60 is a whole number.

Write a program that will find the fractorial of any given number. It should ideally get input from a data file. Sample input will be given, and your program should not take over 2 minutes per result. Solution

title: Turing/Questions


text:
Turing/Solution 1

var n : int         %User input var ctr : int := 0  %Counter variable var gotit : boolean %Stores if fractorial is found

get n

loop ctr := 0 %ctr is NEVER actually used as zero, since that would cause a division by 0 error.

loop gotit := true     %Initially assume that fractorial has been found, and change to false if found otherwise ctr += n          %Increase counter by n        for i : 1 .. n    %Try n/1, n/2, n/3... until n/i. If all are whole numbers, then answer has been found if ctr / i not= ctr div i then gotit := false end if       end for exit when gotit = true end loop

if gotit = true then put "Fractorial (", n, ") = ", ctr exit end if end loop

While you might try ctr += 1 initially, it will quickly become evident that this is too slow. Through logical reasoning and some experimentation, you should be able to discover that the fractorial of n is a multiple of n.

title: Turing/Solution 1


text:
Turing/Procedures, functions, and processes

Both computer programmers and mathematicians have quickly learned that with complicated problems, it can become near impossible to try and solve everything at the same time. Instead, we try to reduce the problem that we know how to solve. This can be done easily and efficiently with procedures and functions.

First, let's deal with procedures. When you call a procedure inside a program, it jumps to that procedures, executes the code, and goes back.

Sample procedure code coming soon

You can think of functions like variables that calculate things. They return a value when you call them, so they can be used just like variables. This code should help you understand:

Here is a program that will print a string backwards.

function flipWord (w : string) : string var tmp : string := ""

for decreasing i : length (w) .. 1       tmp := tmp + w (i) end for result tmp end flipWord

%%%%%%%%%%MAIN PROGRAM%%%%%%%%%% var word : string

put "Enter word" get word : *  %bypasses token-oriented input

put flipWord (word)

There are actually a couple new things. First, the more simple, is the word  in the for-loop. This tells Turing to decrease by one. As you can see, functions allow us to keep our main program nice and neat. It will become imperative to use functions in larger programs, as they can get very complicated!

If you were wondering what 'token-oriented input' meant, it's just telling Turing NOT to consider space to mean that the next variable is being put in. This allows spaces in the word variable.

Processes are like procedures, except they can run concurrently with other parts of your code. This means that, if you're using a loop, your process won't stop you from doing whatever else you need. This is especially useful in cases like playing music, where you need other code to be able to run while the music is playing.

Processes are used similarly to procedures; however, one must replace the word  with. Additionally, processes cannot be started by simply calling them. You must prefix the process name with the command.


text:
Turing/If statements, cases

If statements are just that. They say, "If a is true, then do the following, if not, do this instead"

Here's a simple program for you that tests if someone is an adult.

var age : nat %Can't have negative age

get age

if age < 18 then put "You are not an adult!" else put "You are an adult!" end if

This program is saying: "Ask the user for their age. If it's under 18, then they're not an adult.  If it's not under 18, then they are.  Note that else statements do not check if they are greater/equal to 18, they just check if they are not under 18.  This will suffice for our purposes

But what if we want to test for seniors too? This can be accomplished with an  statement:

... if age < 18 then put "You are not an adult!" elsif age > 64 then put "You are a senior!" else put "You are an adult!" end if

This is saying "If they are under 18, they're not an adult. If they're not under 18, then check if they're older than 64; if so, they are a senior.  If neither of the above cases are true, then they are an adult.

Cases are like funny if-statements. They're pretty easy to understand, but you probably won't use them until later. Still, they fall under the same category as if statements, so you might as well get used to them now.

title: Turing/If statements, cases


text:
Turing/Help

Welcome to the Turing help desk. Have a question? Feel free to ask it here, and somebody will try to answer your question promptly.

In what situations does Turing really work great ?

 * In what situations does Turing really work great ? When would I choose Turing over some other language on the Programming languages bookshelf such as Programming:QBasic or Programming:Prolog or Python Programming ?
 * Who uses Turing ?
 * Are there any major programs written in Turing ?
 * Can Turing run on my PC ?
 * Can Turing run on my [[Embedded Systems/PIC ?
 * How do I install the Turing compiler/interpreter/IDE on my computer ?

i0 := --DavidCary 00:20, 4 October 2005 (UTC)

 * Hi David. Sorry for the late response. #sorrynotsorry Turing is used primarily as a learning tool, and was designed as such.  Since it was made for ease-of-use rather than speed or versatility, the only reason you might use Turing is for a simple program, or if you're just getting started with programming.
 * Mostly high school students
 * To my knowledge, no.
 * Yes, turing runs on windows. It also runs on linux and  mac.
 * If you can get linux on it ;)
 * Not that I know of, but I'm not sure.
 * You'll have to buy a copy from holtsoft. If you are a student, and your school/board has purchased a license, you can get a copy for free.
 * Under windows, installation is very simple. I don't use it that often and I haven't used it in a while, so I'm not sure if there are any important notes for installing it on other systems.

 * Hope that helped! -Frazzydee|✍ 03:29, 5 January 2006 (UTC)

passing parameters
why is not passing parameters bad programming style? If it works without passing parameters, why not use global variables?
 * The reasons may vary depending on the program. One of the most common reasons is that your procedures/functions may ultimately be included in a library, where people using your programs will want to just pass the parameters straight to it rather than figuring out all the variable needed. -Frazzydee|✍ 04:23, 24 May 2005 (UTC)

increasing and decreasing a counter by an increasing and decreasing amount??
So i need to increase a value by zero, then one, then -1, 2, -2, 3, -3... and i have no idea on how to do it. i've been trying to use some variation on

loop counter:=counter+1 a:=a+(-1)**counter end loop but its just doing a+0, a-1, a+1, a-1, a+1 instead of a+0, a-1,a+1,a-2,a+2 HELP!

 * I'm not sure I completely understand your question...wouldn't that end up just equalling 0 if you're subtracting and then adding by the same number? -Frazzydee|✍ 11:58, 24 May 2005 (UTC)

It's going a+0, a-1, a+1, a-1, a+1 because -1**1=-1, -1**2=+1, -1**3=-1, -1**4=+1...etc. Try: var y : int var z : int for x:1..10 y:=x z:=x put "a+", y    put "a-", z end for

Slowing Down Your Program
How can I slow down the rate at which my program outputs(put) information to the screen? Please help! Urgent!

Answer:
 * Use delay(n), where n is the number of milliseconds you want the program to pause for. Example:

delay(1000)

will make the program pause for one second before executing the next line. -Frazzydee|✍ 22:53, 6 Jun 2005 (UTC)

how do you skip lines
is there any way you could skip a line under a certain condition

Example

if x=2 "now i need the computer to avoid the data from line 32 to 45"

 * In most cases, you can just store it to a temporary variable in those lines:

var tmp : string if x=2 then for i : 1 .. 14         get : inp, tmp end for end if

 * However, I've had cases where you can't store it to a variable at all, and I'm not sure how to get around that. If you find out how, please post it here! :) -Frazzydee|✍ 02:48, 9 Jun 2005 (UTC)

GOLF SIMULATION ASSIGNMENT
I am in grade 10, and we were just asked to make a simulation program. With variables such as wind, gravity, etc. Anyways, I've been sick for the past week or so and haven't got anything done because I don't have turing at my home. Can anyone send me a program which will simulate a golf shot? It has to have variables such as wind gravity slice and hook of the shot, and the user can enter things such as if he /she is a amateur or pro golfer, therefore affecting how close their shot will be to the hole. Can anyone PLEASE send me a program that will do this. I am in HUGE need. THANKS!

Hi! Please tell me why this code does not work in turing. it crashes
procedure info (var base, height, L1, L2, L3 : int) put "Please enter the base of the triangle" get base put "Please enter the height of the triangle" get height put "Please enter the 1st length of the triangle" get L1   put "Please enter the 2nd length of the triangle" get L2   put "Please enter the 3rd length of the triangle" get L3 end info

procedure area (var b, h, Area_Triangle : int) Area_Triangle:=b*h div 2 end area

procedure pmeter (var L1, L2, L3, Perimeter_Triangle : int) Perimeter_Triangle := L1 + L2 + L3 end pmeter

procedure areapmeter (var finalarea, finalperimeter, Area_Triangle, Perimeter_Triangle : int) put "The Area of the triangle is", finalarea, "The Perimeter of the triangle is,", finalperimeter finalarea := Area_Triangle finalperimeter := Perimeter_Triangle end areapmeter

 * You have redundant variables like b and base and you defined finalarea and final perimeter after the put. Get rid of the redundant variables and you should be fine:

%Declare the variables var base, height, L1, L2, L3, Area_Triangle, Perimeter_Triangle : int %Enter in values put "Please enter the base of the triangle" get base put "Please enter the height of the triangle" get height put "Please enter the 1st length of the triangle" get L1   put "Please enter the 2nd length of the triangle" get L2   put "Please enter the 3rd length of the triangle" get L3   %Display Area_Triangle := base * height div 2 Perimeter_Triangle := L1 + L2 + L3   put "The Area of the triangle is ", Area_Triangle put "The Perimeter of the triangle is ", Perimeter_Triangle

Centering Text
Could anybody tell me the different ways I can center text in Turing?

 * Look up locate in the help file. You will need to know the length of the string to center it properly. -Frazzydee|✍ 03:32, 5 January 2006 (UTC)

Exercises
How do i write a program that allows the user to input any base 10 number then outputs the number into binary?

var tmp : int var tmpc : string := ""

get tmp

loop tmpc += intstr(tmp mod 2) tmp := tmp div 2 exit when tmp=0 end loop

put tmpc

for decreasing i : length(tmpc) .. 1   put tmpc(i).. end for

 * This just keeps on dividing by 2 and recording the remainder, then it reads it backwards. Hope that helped, and sorry for the late response. -Frazzydee|✍ 03:48, 5 January 2006 (UTC)

strings
outputs a word and determines if the centre word is an uppercase or lowercase?

why won't it out put my inputed word!! after it's been altered
if choice = 3 then loop put "title"      %---use quotations---% put "line"

%setting outputs locate (3, 1) put "Enter a pattern:" locate (4, 1) put "Enter a pattern to substitute" put "it with:" locate (6, 1) put "Enter a word to change:"

%getting inputs locate (3, 18) get pattA : * locate (5, 10) get pattB : * locate (6, 25) get word : *

if index (word, pattA) not= 0 then loop pos := index (word, pattA) exit when pos = 0 beg_word := word (1 .. pos - 1) end_word := word (pos .. *) new_word := beg_word + end_word word := new_word end loop end if

cls put title put line locate (7, 1) put word

end loop end if

Making A RPG Game In Turing
Is it possible to make a RPG in turing? I can make a very basic battle system with hp and such. However I want to make it so you can level up and use items and all that. With a weapon making system of some kind.

Turing is an extremely limited programming tool/language, making an RPG with level ups and weapons would be extremely difficult if not impossible. This is because Turing is used mainly as a learning tool for beginner programmers to show them the basic elements of programming, a better programming language to use would be Java maybe, or C++, I really do not recommend the use of Turing to create a complex game such as the one you describe

I have made a simple (it has levels atk etc.) text based rpg but it is hard to make graphics in my game so instead I want for a retro look if you like doing these kind of things you should go to this website.

http://compsci.ca/v3/index.php?pf=120&h=1&start=0

connect four
I need help writing a program for a video connect four game. I just had pneumonia and have missed 2 weeks or so of school. This project is due very soon and I'm not very good at turing. Please help me, that would be greatly appreciated. Thank you so much.

Of course you can make an RPG in Turing. Now, it won't be the graphical equal to Final Fantasy X, but you can make something that looks like a game from the Nintendo/Super Nintendo era without much trouble at all.

Mastermind
I need to create the game mastermind in Turing code for school. I am extremely lost and confused. I would deeply appreciate the code if someone has it or even just some general help. Thanks

how do I write a program that allows the user to click and make an LED light hooked up to a paper car, hooked up to an experimentor box blink

I know it
What am I doing wrong, I know it but I can't remember?

case label := "a" put "no" label := "b" put "yes" label := "c" put "no" label := "d" put "no" label := "e" put "no" end case Answer:
 * := sets the value of a variable. You should be using = for comparison (eg. comparing the value of label to "a").  Try that, and come back if it still doesn't work...sorry, but I don't have time to test it myself right now :( -Frazzydee|✍ 22:58, 26 February 2006 (UTC)

A chat program, with a GUI
I've got 95% of the code complete. I'm stumped at the actual transfer of information though! I can open a connection, and connect, but I have no way of passing information between the server and the client! Can someone help?

 * You should be able to use get and put, IIRC. Is there any reason why "get : ns, stringvar" won't work? (where ns is your netstream and stringvar is a string variable).  If you're still having trouble, post your code somewhere and I'll take a look at it. -Frazzydee|✍ 23:00, 26 February 2006 (UTC)

umm yee I just wanted to know like i understand the how the loops work but I don't understand how you get the program to loop so that it starts over again if the user prompts it to like for example. in the case such as you have the program run then you get to the end and you loop it so it says exit program if word = no( the user says no i don't want to play again) but how do you get it to start over if the user says yes they do want to start over again?

Linking
I'm working on a turing project for school (grade 10 FTW), and I have to create a welcome screen to use in all of my programs. The problem is, I made a really nice one (at least nice for what we've learned so far) but the code it really long. I don't want to have to copy that into the top of my program every time. Is there a line of code that I can put into the top of each program to tell it to run the welcome screen first, then continue on to the rest of the program?

You can use include.

For example, if your welcome screen is in a file called welcome.t, you would write

include "welcome.t"

at the beginning of each of your assignments.

Make sure welcome.t is in the same directory as your assignment, though.

Too many Variables.
I am trying to make a Sudoku game, which has turned out to be a long script. Is there a way I could group variables together to make thing simpler. e.g. loop if a1 = {anyone of the Variable groups} then a1 := a1+1

== Hi, I was wondering if anyone could tutor me for turing 4.1.1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Hello, while I won't Tudor you, you may find it helpful to look up arrays in the turing reference.

var sampleArray1: array 1..9,1..9 of int   %Creates an array

var sampleArray2: array 1..3,1..6 of int:  %Creates an array and assigns puts values into the array =init(1,1,1,1,1,1,   1,1,1,1,1,1,    2,2,2,5,6,2) sampleArray1(1,3):=6   %Assigns the integer 6 to index 1,3 of the array

I hope this helps :)

HELP!
Hey, can anyone tell me what the problem is with this code? It's a program for a rock paper scissors game. var p1 : char var p2 : char var exit_char : string (1) var p : char var P : char

put "Note: The 'ROCK-PAPER-SCISSORS' game is meant for two (2) players. \nPress any key to continue. \n\n" getch (exit_char)

put "Player 1, enter 'p' for paper, 'r' for rock, or 's' for scissors: ".. get p1 put "Player 2, enter 'p' for paper, 'r' for rock, or 's' for scissors: ".. get p2

if ((p1 = "p" or "P") and (p2 = "p" or "P")) then put "\nTie game, nobody wins." elsif ((p1 = "s" or "S") and (p2 = "s" or "S")) then put "\nTie game, nobody wins." elsif ((p1 = "r" or "R") and (p2 = "r" or "R")) then put "\nTie game, nobody wins."

elsif ((p1 = "p" or "P") and (p2 = "r" or "R")) then put "\nPlayer 1 wins, paper covers rock." elsif ((p1 = "r" or "R") and (p2 = "s" or "S")) then put "\nPlayer 1 wins, rock breaks scissors." elsif ((p1 = "s" or "S") and (p2 = "p" or "P")) then put "\nPlayer 1 wins, scissor cuts paper."

elsif ((p1 = "p" or "P") and (p2 = "s" or "S")) then put "\nPlayer 2 wins, scissor cuts paper." elsif ((p1 = "r" or "R") and (p2 = "p" or "P")) then put "\nPlayer 2 wins, paper covers rock." elsif ((p1 = "s" or "S") and (p2 = "r" or "R")) then put "\nPlayer 2 wins, rock breaks scissors."

else put "\nInvalid choice(s). Remember to enter only one letter; 'p', 'r', or 's'." end if

Answer
 * You are not using boolean properly. Rewrite (p1 = "p" or "P") to (p1 = "p" or p1 = "P"), so the first line would be:

if ((p1 = "p" or p1 = "P") and (p2 = "p" or p2 = "P")) then put "\nTie game, nobody wins."

Turing help
Can anyone help me, I need to make a scene where a cowboy jumps off a cliff onto his horse, and rides away. I can make the scene, but I cant seem to get the cowboy to jump down to the horse, and ride away. They are stick figures by the way, on a brown box.

Process and Procedures
I have a bunch of procedures and at the beginning of each i wanna put a music with a fork. i got it to work but it won't work inside the procedure because u cant' have a process in a procedure. what do i do? please help me!!

problem with strings
The following code is for a simulated game of mastermind. This is the basic code. Unfortunately, I am having trouble with some of the strings and I've high lighted it... it says *****PROBLEM AREA**** var guess1, guess2, guess3, guess4 :string                         %guesses var ans1 :int :=Rand.Int (97,101)                                  %generation of answer var ans2 :int :=Rand.Int (97,101) var ans3 :int :=Rand.Int (97,101) var ans4 :int :=Rand.Int (97,101) var nouveau_guess :int const ANS :string := chr (ans1)+chr (ans2)+chr (ans3)+chr (ans4)   %answer

put ANS

%instructions put "Pick four of the following five letters: a, b, c or d \n"

loop %prompts put "Enter your first guess: ".. get guess1

put "Enter your second guess: ".. get guess2

put "Enter your third guess: ".. get guess3

put "Enter your forth guess: ".. get guess4

var GUESS :string := guess1+guess2+guess3+guess4                 %guess

%answer completely correct if ANS=GUESS then put "YOU WIN!" exit end if

%evaluation of guess (completely correct) for i :1..4 if GUESS (i)=ANS (i) then *****PROBLEM AREA***** i must convert the guess (i) into another character so that it doesn't check it again in the following code put "Correct" end if end for

%evaluation of guess (sort of correct) for i :1..4 if GUESS (1) = ANS (i) then put "semi-correct" end if   if GUESS (2) = ANS (i) then put "semi-correct" end if   if GUESS (3) =ANS (i) then put "semi-correct" end if   if GUESS (4)= ANS (i) then put "semi-correct" end if end for end loop

Answer:
 * Not sure what is what your are trying to do in the problematic section. My guess is that you would need to change the problem area into the following:

var allRight : boolean := true for i :1..4 if GUESS(i) not= ANS(i) then allRight := false end if end for if allRight the put "Correct" exit end if

Polygon
I am doing this assignment and i need to move a polygon but i don't no how so can u please tell me how. thanks so much

clear the screen after making the polygon, then just make the same polygon right next to where it was

It probably has something to do with getch and the follow mouse procedure try looking those up and once you know how to use getch you will probably figure it out

parallel port
How do use the parallelget function. according to my understanding its more complicated than parallelget(64). Please answer in full detail as i am in g.12. what isBold text MOD and DIV. thanks. ALOT. parallelget is a function with no parameters:

procedure PGet(var val, i0, i1, i2, i3, i4: int) val := parallelget i0 := (val div 64) mod 2 i1 := (val div 128) mod 2 i2 := (val div 32) mod 2 i3 := (val div 16) mod 2 i4 := (val div 8) mod 2 end PGet

parallelget represents an already determined number, it requires no variables and that is wht parallelget(64) doesn't do anything. use it like a variable, ex. "put parallelget"

programming alphabetically
yeah, i need to make a program where i ask the user for two words, and then i put it in alphabetical order i have managed to do this by just making my variables word1, and word2, then i just put :

if word1 > word2 then put word2,"":2,word1 else put word1,"":2, word2 end if

in my program i did include the get statements and the variables... but i just put in the general idea i had for putting things alphabetically. The problem is, both words have to be either upper case, or lower case, i cant word1 as upper, and word2 as lower because lower case words are larger than upper even if the upper starts with "Z" and the lower starts with "a", my program will still display after the words are inputted, Z is before a. how do i make it so it says a before Z?

Base converter (base 2, 8, 10, 16 conversions)
hi!

i was wondering if i could get some help in converting numbers

i need to convert decimal, hexadecimal, binary and octal into each other

i know that

binary_out := intstr (decimal_in, 0, 2)

will change decimal_in to binary_out

and for decreasing n : length (binin) .. 1       if binin (n) = '1' then decout := decout + 2 ** (length (binin) - n)       end if    end for will change the number back to decimal

I am having difficulty with binary to octal/hex, octal to decimal/binary/hex, and hex to decimal/binary/octal

please help me! thanks ==> why not just convert binary string back to integer (base 10) first? Then you can use "intStr(int, 0, ) to convert to Hex or Octal string? decNumberOut := strint(binStringIn, 2) octalString := intstr(decNumberOut, 0, 8) hexString    := intstr(decNumberOut, 0, 16)

character movement
BETTER QUESTION: How do you do WASD or Left Right Up Down without gravity, more specifically how do you move UP AND DOWN? There is no site with this info and I am starting to lose my mind.

Here is the code so far:

Text.ColourBack (green) cls setscreen ("graphics:800;800,offscreenonly,nobuttonbar,title:SPEEDY SNOWMAN") var x, y : int x := 100 y := 100

var keypress : array char of boolean

Text.ColourBack (green) cls

loop Input.KeyDown (keypress)

if keypress (KEY_RIGHT_ARROW) then x := x + 5 end if

if keypress (KEY_LEFT_ARROW) then x := x - 5 end if

drawfilloval (300 + x, 200, 50, 50, white) drawfilloval (300 + x, 260, 40, 40, white) drawfilloval (300 + x, 100, 80, 80, white) drawfilloval (280 + x, 270, 5, 5, black) drawfilloval (320 + x, 270, 5, 5, black) drawfilloval (300 + x, 260, 5, 5, red) drawfilloval (278 + x, 248, 4, 4, black) drawfilloval (286 + x, 240, 4, 4, black) drawfilloval (298 + x, 235, 4, 4, black) drawfilloval (308 + x, 240, 4, 4, black) drawfilloval (318 + x, 248, 4, 4, black) drawfilloval (300 + x, 190, 6, 6, black) drawfilloval (300 + x, 210, 6, 6, black) delay (5) View.Update View.Set ("offscreenonly") cls end loop

- Alexiler

title: Turing/Help


text:
User:Amayzes

Wikipedia Links

 * Special:Whatlinkshere/User:Amayzes
 * Special:Recentchangeslinked/User:Amayzes
 * Special:Contributions/Amayzes
 * WikiPedia:User:Amayzes

title: User:Amayzes


text:
Cookbook:Brazilian Shrimp and Cassava Sauce (Bobó de Camarao)

 * Brazilian Cuisine

Ingredients

 * 3 lbs (1.2 kg) medium size shrimp
 * 3 lb (1.2 kg) yuca root
 * 2 cups onion, chopped
 * 3 cloves garlic, chopped
 * ½ cup olive oil
 * 6 medium tomatoes, peeled and seeded (or a large can of whole tomatoes)
 * ¼ cup cilantro, chopped
 * 2 cups coconut milk
 * ¼ cup palm oil (also known as dendê)
 * Salt to taste
 * Pepper to taste

Preparation

 * 1) Peel and cut the manioc and put in a pan with cold water and salt.
 * 2) Cook until tender, drain and reserve both the cooked manioc and the liquid.
 * 3) Discard any manioc fiber.
 * 4) Using a fork, mash the manioc while still hot. Use some of the liquid to help in the process. Do not use a blender or food processor.
 * 5) Peel and de-vein the shrimp.
 * 6) Sauté the onion and garlic in the olive oil until wilted.
 * 7) Add ½ of the chopped cilantro and the tomatoes, stirring well.
 * 8) Add the shrimp, and cook it for about 15 minutes.
 * 9) Add the puréed manioc. Check the amount of liquid and add more of the reserved manioc liquid to thin the mixture, if necessary.
 * 10) Add the coconut milk, the remaining cilantro and the palm oil.
 * 11) Check for salt and pepper.
 * 12) Serve over Brazilian white rice.


text:
Real Analysis/Differentiation

In this chapter, we will introduce the concept of differentiation. Differentiation is a staple tool in calculus, which should be a fact somewhat familiar to you from studying earlier mathematics. However, the reasons as to why this is true have not always been so clearly proven. This chapter prove a simple consequence of differentiation you will be most familiar with - that is, we will focus on proving each differentiation "operations" that provides us a simple way to find the derivative for common functions.

Definition
Let us define the derivative of a function.

Let $$a\in\mathbb{R}$$. Given a function $$f:\mathbb{R}\to\mathbb{R}$$, we say that ƒ(x) is differentiable at x=a if and only if $$\lim_{h \rightarrow 0} {f(a+h)-f(a) \over h}$$ exists.

The derivative of ƒ at a is denoted by $$f'(a)$$

A function is said to be differentiable on a set A if the derivative exists for each a in A. A function is differentiable if it is differentiable on its entire domain.

Definition-Derived Theorems (Differentiability Implies Continuity)
Given our definition of a derivative, it should be noted that it utilizes limits and functions. This theorem relates derivation with continuity, which is useful for justifying many of the latter theorems that will be discussed in this chapter. The proof for this theorem is simple; it requires a valid limit converging to zero to mimic the continuity definition.

$$

The proof for this is as follows:

However, the converse is not true in this case. Analyzing the proof, it is apparent that a continuous function at a does not necessarily mean that it is differentiable at a simply because it would involve removing the multiplication by 0, which is impossible given our algebraic axioms.

Properties of Differentiation
From this definition, we will create new properties of derivation. People familiar with Calculus should note that we are proving that the derivation of certain functions and operations are valid. These first theorems follow immediately from the definition.

Basic Properties
Below are the list of properties which are mentioned only for completeness, and a demonstration of how the derivation formula works.

 Constant Function

Suppose a constant function ƒ such that $$f(x)=c \quad\forall x\in\mathbb{R}$$. This function will always have a derivative of 0 for any real number.

Given the derivation definition, we have

$$f'=\lim_{h \rightarrow 0} {f(a+h)-f(a) \over h}$$

Applying the definition of the function, we can substitute the function for c, as such

$$ \begin{align} f'&=\lim_{h \rightarrow 0} {c-c \over h} \\ &=\lim_{h \rightarrow 0} {0 \over h} \\ &=0 \\ &\blacksquare \end{align} $$

 Identity Function

Suppose an identity function ƒ such that $$f(x)=x \quad\forall x\in\mathbb{R}$$. This function will always have a derivative of 1 for any real number.

Given the derivation definition, we have

$$f'=\lim_{h \rightarrow 0} {f(a+h)-f(a) \over h}$$

Applying the definition of the function, we can substitute the function for its input, as such

$$ \begin{align} f'&=\lim_{h \rightarrow 0} {a+h-a \over h} \\ &=\lim_{h \rightarrow 0} {h \over h} \\ &=\lim_{h \rightarrow 0} {1} \\ &=1 \\ &\blacksquare \end{align} $$

Algebraic Properties
Suppose two functions f and g that are differentiable at a, these following properties apply

We will individually prove each one below

 Addition

This proof essentially creates the definition of differentiation from the two functions that make up the overall function.

$$ \begin{align} (f+g)'(a) &= \lim_{h \rightarrow 0} {(f+g)(a+h)-(f+g)(a) \over h} \\ &= \lim_{h \rightarrow 0} {(f(a+h)+ g(a+h))-(f(a)+g(a)) \over h} \\ &= \lim_{h \rightarrow 0} \left( {f(a+h) - f(a) \over h} + {g(a+h) - g(a) \over h} \right) \\ &= \lim_{h \rightarrow 0} {f(a+h) - f(a) \over h} + \lim_{h \rightarrow 0} {g(a+h) - g(a) \over h} \\ &= f'(a) + g'(a) \\ &\blacksquare \end{align} $$

 Subtraction

We will not write out a rigorous proof for subtraction, given that it can be done mentally by imagining a negated $$g(a)$$ function or retracing the addition proof with subtraction instead.

 Product

This proof works similarly to the previous proof, except that this proof requires the addition of extra terms which zero out when added together. This is a normal algebraic trick in order to derive theorems, which will be further used in the latter theorems in this chapter.

$$ \begin{align} (fg)'(x) &= \lim_{h \rightarrow 0} {f(a+h)g(a+h)-f(a)g(a) \over h} \\ &\text{next, we introduce the } f(a)g(a+h) \text{ term into the statement} \\ &= \lim_{h \rightarrow 0} {f(a+h)g(a+h)-f(a)g(a+h)+f(a)g(a+h)-f(a)g(a) \over h} \\ &= \lim_{h \rightarrow 0} {g(a+h)(f(a+h)-f(a))+f(a)(g(a+h)-g(a)) \over h} \\ &= \lim_{h \rightarrow 0} {f(a+h)-f(a) \over h}\lim_{h \rightarrow 0}{g(a+h)} + \lim_{h \rightarrow 0} {f(a)} \lim_{h \rightarrow 0} {g(a+h)-g(a) \over h} \\ &= \lim_{h \rightarrow 0} {f(a+h)-f(a) \over h} g(a+h) + f(a) \lim_{h \rightarrow 0} {g(a+h)-g(a) \over h} \\ &= f'(x)g(x) + f(x)g'(x) \\ &\blacksquare \end{align} $$

 Product of a Constant

For this proof, we will present it using two different methods.

The first method requires only the limit theorem that a constant multiple is equivalent to the limit being multiplied by the constant.

$$ \begin{align} (\lambda f)'(a) &= \lim_{h \rightarrow 0} { \lambda f(a+h) - \lambda f(a) \over h} \\ &= \lim_{h \rightarrow 0} { \lambda \left( \dfrac{f(a+h) - f(a)}{h} \right)} \\ &= \lambda \lim_{h \rightarrow 0} {f(a+h) - f(a) \over h} \\ &= \lambda f'(x) \\ &\blacksquare \end{align} $$

The second proof requires applying the product rule and constant function for differentiation.

$$ \begin{align} (\lambda f)'(a) &= g'(x)f(x) + g(x)f'(x) \\ &= 0 \cdot f(x) + \lambda f'(x) \\ &= \lambda f'(x) \\ &\blacksquare \end{align} $$

 Reciprocal

Like the other proofs before, this one will also invoke the definition at a certain point to simplify the statement into a concise, memorizable format.

$$ \begin{align} \left( \dfrac{1}{f} \right)'(a) &= \lim_{h \rightarrow 0} {\dfrac{1}{f(a+h)}-\dfrac{1}{f(a)} \over h} \\ &= \lim_{h \rightarrow 0} {\dfrac{f(a)-f(a+h)}{h \cdot f(a+h)f(a)}} \\ &= \lim_{h \rightarrow 0} {\dfrac{f(a)-f(a+h)}{h} \cdot \dfrac{1}{f(a+h)f(a)}} \\ &= \lim_{h \rightarrow 0} {-\dfrac{f(a+h)-f(a)}{h}} \cdot \lim_{h \rightarrow 0} {\dfrac{1}{f(a+h)f(a)}} \\ &= -f'(a) \cdot \dfrac{1}{f(a)f(a)} \\ &= -\dfrac{f'(a)}{[f(a)]^2} \\ &\blacksquare \end{align} $$

 Division

This proof borrows the reciprocal proof and the multiplication proof to form an easy to follow rationale.

$$ \begin{align} \left( \dfrac{f}{g} \right)'(a) &= \left(f \cdot \dfrac{1}{g} \right)'(a) \\ &= f'(a)\left(\dfrac{1}{g(a)} \right) + {f(a) \over g'(a)} \\ &= f'(a)\left(\dfrac{1}{g(a)} \right) + f(a)\left(\dfrac{1}{g(a)} \right)'\\ &= \dfrac{f'(a)}{g(a)} - \dfrac{f(a)g'(a)}{[g(a)]^2} \\ &= \dfrac{f'(a)g(a)}{[g(a)]^2} - \dfrac{f(a)g'(a)}{[g(a)]^2} \\ &= \dfrac{f'(a)g(a)-f(a)g'(a)}{[g(a)]^2} \\ &\blacksquare \end{align} $$

Chain Rule (Function Composition Theorem)
Given two functions f and g such that f is differentiable at $$g(a)$$ and g is differentiable at a, then $$ (f \circ g)'(a) = f' \circ g(a) \cdot g'(a)$$

 Proof Part 1

Unlike the previous properties, the chain rule will quickly become problematic and will definitely require an external theorem outside of algebraic manipulations to solve. To illustrate why a new theorem is required, we will begin to prove the Chain Rule though algebraic manipulations, point out the road block, then create a lemma to guide us around the issue, and thus figure out a proof. We begin with the following statements:

$$(f \circ g)'(x) = \lim_{y \rightarrow x} {f(g(y))-f(g(x)) \over y-x}$$ $$= \lim_{y \rightarrow x} {f(g(y))-f(g(x)) \over g(y)-g(x)}{g(y)-g(x) \over y-x}$$$$ = \lim_{y \rightarrow x} {f(g(y))-f(g(x)) \over g(y)-g(x)}\lim_{y \rightarrow x}{g(y)-g(x) \over y-x}$$$$ = f'(g(x))g'(x)$$

The problem is that $$g(y) - g(x)$$ may be zero at points arbitrarily close to x, and therefore $${f(g(y))-f(g(x)) \over g(y)-g(x)}$$ would not be continuous at these points. Thus we apply a clever lemma as follows:

Caratheodory's Lemma
Let $$f:\mathbb{R}\to\mathbb{R}$$

We say that $$f(x)$$ is differentiable at $$x=c$$ if and only if there exists a continuous function $$\phi :\mathbb{R}\to\mathbb{R}$$ that satisfies

$$(x-c)\phi (x)=f(x)-f(c)\forall x\in\mathbb{R}$$

 Proof

($$\Rightarrow$$)Let $$f(x)$$ be differentiable at $$x=c$$ and define function $$\phi :\mathbb{R}\to\mathbb{R}$$ such that

$$\phi (x)=\frac{f(x)-f(c)}{x-c}$$ for $$x\neq c$$ and

$$\phi (c)=f'(c)$$

It is easy to see that $$\phi (x)$$ is continuous and that it satisfies the required condition.

($$\Leftarrow$$) Let $$\phi (x)$$ be a continuous function satisfying $$(x-c)\phi (x)=f(x)-f(c)\forall x\in\mathbb{R}$$

For all $$x\neq c$$, we have that $$\phi (x)=\tfrac{f(x)-f(c)}{x-c}$$

As $$\phi$$ is continuous, $$\phi (c)=\lim_{x\to c}\phi (x)$$, that is,

$$\phi (c)=\lim_{x\to c}\frac{f(x)-f(c)}{x-c}$$ which implies that $$f(x)$$ is differentiable at $$x=c$$

 Proof Part 2

Let $$g:\mathbb{R}\to\mathbb{R}$$ be differentiable at $$c\in\mathbb{R}$$

Let $$f:\mathbb{R}\to\mathbb{R}$$ be differentiable at $$d=g(c)$$

Let the domain of f be a subset of the image of g.

Then,
 * 1) $$(f\circ g)(x)$$ is differentiable at $$x=c$$
 * 2) $$(f\circ g)'(c)=f'(g(c))g'(c)$$

Caratheodory's Lemma implies that there exist continuous functions $$\phi ,\gamma :\mathbb{R}\to\mathbb{R}$$ such that $$(x-c)\gamma (x)=g(x)-g(c)$$ and $$(g(x)-g(c))\phi (g(x))=f(g(x))-f(g(c))$$

Now, consider the function $$\eta (x)=\phi (g(x))\gamma (x)$$. Obviously, $$\eta (x)$$ is continuous.

Also, it satisfies $$(x-c)\eta (x)=(f\circ g)(x)-(f\circ g)(c)$$. Hence, by Caratheodory's Lemma, $$(f\circ g)(x)$$ is differentiable at $$x=c$$ and that $$(f\circ g)'(c)=\eta (c)=f'(g(c))g'(c)$$

Exercises
Here are some exercises to expand and train your understanding of the material.
 * 1) Find the derivatives of the following functions:
 * 2) A function of the form $size=1.2em$
 * 3) Polynomial
 * 4) Trigonometric
 * 5) Exponential
 * 6) Logarithmic
 * 7) In this chapter you have learned that being able to take the derivative implies that the function is continuous at that point. Given this, please read  Higher Order Derivatives before solving these problems
 * 8) Prove whether that the second derivative at a is also continuous at a
 * 9) Prove whether that the nth derivative at a is also continuous at a
 * 10) Some of the most popular counter examples to illustrate properties of continuity and differentiability are functions involving $$f(x)=\sin \left( \tfrac{1}{x} \right)$$
 * 11) Prove that $$f(x)=\sin \left( \tfrac{1}{x} \right)\forall x\neq 0, f(0)=0$$ is not continuous at $$x=0$$
 * 12) Prove that the function $$f(x)=x\sin (\tfrac{1}{x} )\forall x\neq 0, f(0)=0$$ is continuous but not differentiable at $$x=0$$
 * 13) Prove that $$f(x)=x^2 \sin\left( \tfrac{1}{x} \right)\forall x\neq 0, f(0)=0$$ is differentiable at $$x=0$$

title: Real Analysis/Differentiation