text:
User talk:Alex beta

Please feel free to leave your comments here. (Alex beta 18:45, 27 Nov 2004 (UTC))

Spanish speakers
If you wish to leave a comment in Spanish, please do so at Alex beta (Spanish version)

Hey, Alex, cool, go ahead and write about modal logic! --publunch 07:02, 29 Nov 2004 (UTC)

Hmm. Progress on the propositional logic is rather slow. Though in theory I have the time to do this, things don't always work out that way. When writing the Spanish edition, you can translate my stuff and then fill in the gaps, which are only too obvious. Then you can fill in the gaps in the English text by translating what you have written in Spanish back to English. Then perhaps with help I could translate the entire work into French. Actually the fact that different language versions are slightly different is an interesting feature of wikipedia and wikibooks.

By the way, someone on #wikipedia asked me to use a 'fictitious name space', so rather than have pages called 'tautology', I have to call them 'Introduction to logic:tautology'. This is to avoid conflicts with other wikibooks.

Anyway, I'd be pleased to know a little bit about you, e.g. what are your philosophical interests, where did you learn philosophy, do you have a personal website anywhere, etc.

--publunch 11:47, 2 Dec 2004 (UTC)

Howdy. Tanks for getting in touch, and for your very encouraging comments. You were right to infer that my course would be a little less formal. I hate the stuffiness of philosophy, it's such a turn off. Although technical language, and precise definitions are required at an advanced level, they are hardly required at the beginning.

Thanks again. No doubt, I will be talking to you again! --Abc123

Question for Alex Beta
Hi. I'm a high school teacher in Marion, NC. We have a World Philosophy course at our school, and I thought it might be interesting to have the students participate in one of your modules. Regardless, I would like to. Can you give me some direction? I thank you for your time.
 * Hello. As you do not seem to have a wikibooks account open, I suppose I will have to answer here (I hope you check back soon). I am not completely sure about what you mean with "having students participate". Of course, participation is very welcome here at wikibooks. We are having some admin problems with the wikiversity right now, however, and work here has seemed to slow down very significantly during the last couple of months.

 * If you wish to participate writing courses, you only have to open an account (free, no long forms). Just click on "log in" at the top-right of this page. You just need to pick a nickname and type your password in twice.

 * If by "participating" you mean participating in one of the courses, then the answer is complicated. As I said before, we are having admin problems here, as some users have suggested that wikiversity should be moved out of wikibooks, perhaps as a consequence of the first on-line wikiversity course being taught (these users consider the scope of Wikiversity beyond the scope of wikibooks).

 * In any case, I would be willing to help as much as possible. So, if you have any questions, please ask away. All questions and suggestions welcome. (Alex beta 15:20, 3 October 2005 (UTC))

My focus in philosophy is epistemology, but I see enormous overlap with lingustics and biology, particularly sensory and brain biology. My sense is that somebody needs to start creating a unified theory, but the task is overwhelming for one person. I'm hoping to find co-equal collaborators, and think that wiki is the way to go. Interested? Thoughts? Suggestions?

Are old essays any use to the philosophy wikiversity department?
I have many a philosophy essay sitting around on my computer I'm happy to release under the WP license. If you're interested, let me know. If you're not, well, I don't blame you. --212.84.98.214 15:47, 4 August 2006 (UTC) Sorry I forgot to say, I'm wikipedia:en:User:Cfp. (I have now created a wikibooks account but I'd rather be contacted on my WP one.)--Cfp 22:04, 4 August 2006 (UTC)

Soliciting some minor support in new project
Hello! I'm contacting you, as you seem to be one of only a couple active people in the Phil Dept. here.

I'm a visiting Asst. professor at Virginia Tech. I'll be teaching a course in Politial Philosophy (Ancient to Renaissance) this next semester, and plan on putting together an open source alternative textbook. I'll be a mildly annotated collection of selections from original source material, along with historical/critical introductions to each of the authors.

I'm contacting you because it would be very helpful to me to get someone to help me with formatting, cleaning up entries, and so forth. I don't have much experience with wikibooks. Anyhow, if you or someone you know might be interested in casually overseeing my work on this project over the next semester, that'd be great!

Feel free to contact me by email if you have questions, comments, suggestions, etc.

Thanks!

D.E. Wittkower

 * Alex beta doesn't seem to have been active since this April. (He might appear and prove me wrong of course.) It does sound a great idea what you are planning, so don't let that put you off. If he doesn't appear in the next few days I will see if I can drum up someone else to help you (or failing that help you myself, though I am liable to be quite busy next term and I haven't done any philosophy in a while). --Cfp 00:46, 6 August 2006 (UTC)

 * Department of Philosophy I've started a department of philosophy at Wikiversity. Koavf 17:31, 20 August 2006 (UTC)

 * Dear Mr./Mrs. Wittkower, I would like to apologize for not having answered your message earlier. I realise that it is very improbable that you will read this, but I will answer just in case. I have been absent for many months, but I would be delighted to help if you are still interested. (Alex beta 14:00, 23 December 2006 (UTC))

Looking for help
Dear Alex Beta: My name is Ivan Robaina Bychko and I am a almost 20 years old Cuban wikipedian and universitary student. I am very intersted in Philosophy and logic and I am working to write an article at my university about the history of philosophy, since it seems that no university teacher is willing to help, it seems you are the right guy for it. I do not have internet connectivity (only wikipedia and e-mail), but I think we could contact via e-mail, please, if you are willing to help me, let me know at my e-mail: nayesda.daria@medired.scu.sld.cu Thanks, Ivan

title: User talk:Alex beta


text:
Statistics/Distributions/Geometric

Geometric Distribution
There are two similar distributions with the name "Geometric Distribution".

 * The probability distribution of the number X of Bernoulli trials needed to get one success, supported on the set { 1, 2, 3, ...}

 * The probability distribution of the number Y = X − 1 of failures before the first success, supported on the set { 0, 1, 2, 3, ... }

These two different geometric distributions should not be confused with each other. Often, the name shifted geometric distribution is adopted for the former one. We will use X and Y to refer to distinguish the two.

Shifted
The shifted Geometric Distribution refers to the probability of the number of times needed to do something until getting a desired result. For example:

 * How many times will I throw a coin until it lands on heads?
 * How many children will I have until I get a girl?
 * How many cards will I draw from a pack until I get a Joker?

Just like the Bernoulli Distribution, the Geometric distribution has one controlling parameter: The probability of success in any independent test.

If a random variable X is distributed with a Geometric Distribution with a parameter p we write its probability mass function as:

$$P\left( X=i \right) =p\left( 1-p\right)^{i-1}$$

With a Geometric Distribution it is also pretty easy to calculate the probability of a "more than n times" case. The probability of failing to achieve the wanted result is $$\left( 1-p\right)^k$$.

Example: a student comes home from a party in the forest, in which interesting substances were consumed. The student is trying to find the key to his front door, out of a keychain with 10 different keys. What is the probability of the student succeeding in finding the right key in the 4th attempt?

$$P\left( X=4 \right) =\frac{1}{10}\left( 1-\frac{1}{10}\right)^{4-1}=\frac{1}{10}\left( \frac{9}{10}\right)^{3}=0.0729$$

Unshifted
The probability mass function is defined as:
 * $$f(x) = p(1-p)^x \,$$ for $$x \in \{0, 1, 2, \dots \}$$

Mean

 * $$\operatorname{E}[X] = \sum_i f(x_i) x_i = \sum_0^{\infin} p (1-p )^x x$$

Let q=1-p
 * $$\operatorname{E}[X] = \sum_0^{\infin}(1-q) q^x x$$
 * $$\operatorname{E}[X] = \sum_0^{\infin}(1-q)q q^{x-1} x$$
 * $$\operatorname{E}[X] = (1-q)q\sum_0^{\infin} q^{x-1} x$$
 * $$\operatorname{E}[X] = (1-q)q\sum_0^{\infin} \frac{d}{dq}q^x$$

We can now interchange the derivative and the sum.
 * $$\operatorname{E}[X] = (1-q)q\frac{d}{dq}\sum_0^{\infin} q^x$$
 * $$\operatorname{E}[X] = (1-q)q\frac{d}{dq}{1 \over 1-q}$$
 * $$\operatorname{E}[X] = (1-q)q{1 \over (1-q)^2}$$
 * $$\operatorname{E}[X] = q{1 \over (1-q)}$$
 * $$\operatorname{E}[X] = {(1-p ) \over p }$$

Variance
We derive the variance using the following formula:

 * $$\operatorname{Var}[X] = \operatorname{E}[X^2] - (\operatorname{E}[X])^2$$

We have already calculated E[X] above, so now we will calculate E[X2] and then return to this variance formula:

 * $$\operatorname{E}[X^2] = \sum_i f(x_i) \cdot x^2$$
 * $$\operatorname{E}[X^2] = \sum_0^{\infin} p(1-p)^x x^2$$

Let q=1-p
 * $$\operatorname{E}[X^2] = \sum_0^{\infin} (1-q)q^x x^2$$

We now manipulate x2 so that we get forms that are easy to handle by the technique used when deriving the mean.
 * $$\operatorname{E}[X^2] = (1-q)\sum_0^{\infin} q^x [(x^2-x)+x]$$
 * $$\operatorname{E}[X^2] = (1-q)\left[\sum_0^{\infin} q^x (x^2-x)+\sum_0^{\infin}q^x x\right]$$
 * $$\operatorname{E}[X^2] = (1-q)\left[q^2\sum_0^{\infin} q^{x-2} x(x-1)+q\sum_0^{\infin}q^{x-1} x\right]$$
 * $$\operatorname{E}[X^2] = (1-q)q\left[q\sum_0^{\infin} \frac{d^2}{(dq)^2}q^x+\sum_0^{\infin}\frac{d}{dq}q^x\right]$$
 * $$\operatorname{E}[X^2] = (1-q)q\left[q\frac{d^2}{(dq)^2}\sum_0^{\infin} q^x+\frac{d}{dq}\sum_0^{\infin}q^x\right]$$
 * $$\operatorname{E}[X^2] = (1-q)q\left[q\frac{d^2}{(dq)^2}{1 \over 1-q}+\frac{d}{dq}{1 \over 1-q}\right]$$
 * $$\operatorname{E}[X^2] = (1-q)q\left[q{2 \over (1-q)^3}+{1 \over (1-q)^2}\right]$$
 * $$\operatorname{E}[X^2] = {2q^2 \over (1-q)^2}+{q \over (1-q)}$$
 * $$\operatorname{E}[X^2] = {2q^2 +q(1-q) \over (1-q)^2}$$
 * $$\operatorname{E}[X^2] = {q(q+1) \over (1-q)^2}$$
 * $$\operatorname{E}[X^2] = {(1-p)(2-p) \over p^2}$$

We then return to the variance formula
 * $$\operatorname{Var}[X] = \left[{(1-p)(2-p) \over p^2}\right] - \left({1-p \over p}\right)^2$$
 * $$\operatorname{Var}[X] = {(1-p) \over p^2}$$

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

title: Statistics/Distributions/Geometric


text:
User:Alpharigel~enwikibooks

Books In Progress
Grand Theft Auto: San Andreas

title: User:Alpharigel~enwikibooks


text:
Trigonometry/Graphs of Sine and Cosine Functions

The graph of the sine function looks like this:
 * sin.svg

Careful analysis of this graph will show that the graph corresponds to the unit circle. x is essentially the degree measure (in radians), while y is the value of the sine function.

The graph of the cosine function looks like this:
 * cos.svg

As with the sine function, analysis of the cosine function will show that the graph corresponds to the unit circle. One of the most important differences between the sine and cosine functions is that sine is an odd function (i.e. $$\sin(-\theta)=-\sin(\theta)$$ while cosine is an even function (i.e. $$\cos(-\theta)=\cos(\theta)$$.

Sine and cosine are periodic functions; that is, the above is repeated for preceding and following intervals with length $$2\pi$$.
 * Sine_cosine_plot.svg

Exercises
For what value of $$\theta$$ does $$\sin(\theta)=\cos(\theta)$$ ? (Choose a value between 0° and 90° or equivalently in radians between 0 and $$\frac{\pi}{2}$$).

 * Convince yourself you are right by drawing the triangle and using SOH-CAH-TOA.


text:
Ruby Programming/Syntax/Variables and Constants

A variable in Ruby can be distinguished by the characters at the start of its name. There's no restriction to the length of a variable's name (with the exception of the heap size).

Summary
The first character indicates the scope:
 * Local variables - lowercase letter or underscore
 * Instance variables - @
 * In class scope, instance variables belong to the object that is the class
 * To define instance variables on the objects that belong to the class, use @ inside initialize
 * Class variables - @@
 * Global variables - $
 * Constants - uppercase letter

For more information on variable scopes related to classes, see Ruby Programming/Syntax/Classes.

Local Variables
Example: foobar _foobar A variable whose name begins with a lowercase letter (a-z) or underscore (_) is a local variable or method invocation.

A local variable is only accessible from within the block of its initialization. For example: i0 = 1 loop { i1 = 2 puts defined?(i0)	# true; "i0" was initialized in the ascendant block puts defined?(i1)	# true; "i1" was initialized in this block break } puts defined?(i0)	# true; "i0 was initialized in this block puts defined?(i1)	# false; "i1" was initialized in the loop

Instance Variables
Example: @foobar A variable whose name begins with '@ ' is an instance variable of self. An instance variable belongs to the object itself. Uninitialized instance variables have a value of nil.

Class Variables
A class variable is shared by all instances of a class and begins with '@@'. Example: @@foobar

An important note is that the class variable is shared by all the descendants of the class. Example:

This shows us that all our classes were changing the same variable. Class variables behave like global variables which are visible only in the inheritance tree. Because Ruby resolves variables by looking up the inheritance tree *first*, this can cause problems if two subclasses both add a class variable with the same name.

Global Variables
Example: $foobar A variable whose name begins with '$ ' has a global scope; meaning it can be accessed from anywhere within the program during runtime.

Constants
Usage: FOOBAR A variable whose name begins with an uppercase letter (A-Z) is a constant. A constant can be reassigned a value after its initialization, but doing so will generate a warning. Every class is a constant.

Trying to access an uninitialized constant raises the NameError exception.

How constants are looked up
Constants are looked up based on your scope or via the scope resolution operator (i.e. '::'). For example

class A   A2 = 'a2' class B     def go        A2       end end end instance_of_b = A::B.new a2 = A::A2

Another example class Foo BAR = 123 end puts Foo::BAR
 * 1) => 123

Pseudo Variables

 * Execution context of the current method, which could refer to an instance, class, or module.

 * The sole-instance of the  class. Expresses nothing.

 * The sole-instance of the  class. Expresses true.

 * The sole-instance of the  class. Expresses false.

 * These are contents of capturing groups for regular expression matches. They are local to the current thread and stack frame!

(nil also is considered to be false, and every other value is considered to be true in Ruby.) The value of a pseudo variable cannot be changed. Substitution to a pseudo variable causes an exception to be raised.

Pre-defined Variables
Many pre-defined variables are useful when dealing with regular expressions or Ruby interpreter parameters.

{| class="wikitable" ! Name !! Aliases !! Description
 * || || The exception information message set by the last 'raise' (last exception thrown).
 * || || Array of the backtrace of the last exception thrown.
 * || || The string matched by the last successful pattern match in this scope.
 * || || The string to the left of the last successful match.
 * || || The string to the right of the last successful match.
 * || || The last group of the last successful match.
 * to  ||  || The Nth group of the last successful regexp match.
 * || || The information about the last match in the current scope.
 * || || The flag for case insensitive, nil by default (deprecated).
 * ||,  or   || The input record separator, newline by default.
 * || or  || The output record separator for the print and IO#write. Default is nil.
 * || or  || The output field separator for the print and Array#join.
 * ||,  or   || The default separator for String#split.
 * || or  || The current input line number of the last file that was read.
 * || || An object that provides access to the concatenation of the contents of all the files given as command-line arguments, or $stdin (in the case where there are no arguments). Read only.
 * ||  ||  || The destination of output for Kernel.print and Kernel.printf. The default value is $stdout.
 * || || The last input line of string by gets or readline.
 * ||  ||  || Command line arguments given for the script.  Also known as
 * ||,  or   || The process number of the Ruby running this script.
 * || || The status of the last executed child process.
 * ||  || Load path for scripts and binary modules by load or require.
 * ||  or   || The array contains the module names loaded by require.
 * ||  ||   ||   ||   || The status of the -d switch.  Assignable.
 * ||  || Character encoding of the source code.
 * ||  || The verbose flag, which is set by the -v switch.
 * ||  ||   ||   ||   ||  " which defines the longer names listed in the table above. To include these names, just require the English library as follows.
 * || or  || The current input line number of the last file that was read.
 * || || An object that provides access to the concatenation of the contents of all the files given as command-line arguments, or $stdin (in the case where there are no arguments). Read only.
 * ||  ||  || The destination of output for Kernel.print and Kernel.printf. The default value is $stdout.
 * || || The last input line of string by gets or readline.
 * ||  ||  || Command line arguments given for the script.  Also known as
 * ||,  or   || The process number of the Ruby running this script.
 * || || The status of the last executed child process.
 * ||  || Load path for scripts and binary modules by load or require.
 * ||  or   || The array contains the module names loaded by require.
 * ||  ||   ||   ||   || The status of the -d switch.  Assignable.
 * ||  || Character encoding of the source code.
 * ||  || The verbose flag, which is set by the -v switch.
 * ||  ||   ||   ||   ||  " which defines the longer names listed in the table above. To include these names, just require the English library as follows.
 * || || The status of the last executed child process.
 * ||  || Load path for scripts and binary modules by load or require.
 * ||  or   || The array contains the module names loaded by require.
 * ||  ||   ||   ||   || The status of the -d switch.  Assignable.
 * ||  || Character encoding of the source code.
 * ||  || The verbose flag, which is set by the -v switch.
 * ||  ||   ||   ||   ||  " which defines the longer names listed in the table above. To include these names, just require the English library as follows.
 * ||  || Character encoding of the source code.
 * ||  || The verbose flag, which is set by the -v switch.
 * ||  ||   ||   ||   ||  " which defines the longer names listed in the table above. To include these names, just require the English library as follows.
 * ||  || The verbose flag, which is set by the -v switch.
 * ||  ||   ||   ||   ||  " which defines the longer names listed in the table above. To include these names, just require the English library as follows.
 * ||  ||   ||   ||   ||  " which defines the longer names listed in the table above. To include these names, just require the English library as follows.

Without ‘English’:

$\ = ' -- '   "waterbuffalo" =~ /buff/ print $", $', $$, "\n"

With English:

require "English" $OUTPUT_FIELD_SEPARATOR = ' -- ' "waterbuffalo" =~ /buff/ print $LOADED_FEATURES, $POSTMATCH, $PID, "\n"

Pre-defined Constants
Note that there are some pre-defined constants at parse time, as well, namely __FILE__  (current file) __LINE__  (current line) and __dir__   (current directory) __method__ (current method) (new in Ruby 2.0)

A list of predefined global constants can be found in the Ruby language documentation. Among the notable ones are:


text:
Trigonometry/Remembering Trig Formulae

Remembering Formulae
This page is about how to remember trig formulas - so it is more than just a summary of trig formulae.

You will need to have read most of the rest of the book for this page to be useful to you.

The Blue-Box Formulae
In any triangle the angles always sum to $$180^{\circ}$$

In a right angled triangle The square of the hypotenuse is equal to the sum of the squares of the other two sides.

 * $$Soh-Cah-Toa$$

$$ \displaystyle{ \begin{array}{ccc} \sin(A)&=&\displaystyle\frac{\text{opposite side}}{\rm hypotenuse}\\ \\ \cos(A)&=&\displaystyle\frac{\text{adjacent side}}{\rm hypotenuse}\\ \\ \tan(A)&=&\displaystyle\frac{\text{opposite side}}{\text{adjacent side}} \end{array} }$$

Tips on checking and remembering Formulae
This page contains some trigonometric identities. It does not contain all trigonometric identities. It couldn't possibly. As well as the trigonometric identities for 'double angles' such as:
 * $$\cos(2t)=\cos^2(t)-\sin^2(t)$$

there exist trigonometrical identities for treble angles, quadruple angles and so on. We could not list them all. Also the same formula can be presented in different disguises as we'll see below.

It's useful to learn some of the trig identities and to know how to quickly and easily derive one trigonometric identities from another.

Checking Formulae
It is also very important to be able to check that the formulae you come up with make sense. We know that $$\cos(0^\circ)=1$$. If your formula for $$\cos(2t)$$ does not give the answer 1 when $$t=0$$ then it is wrong! Don't stop there though. You can work out where you went wrong and save yourself making the same mistake again. How do you do that?

If you worked out the formula for $$\cos(2t)$$ from the formula for $$\cos(A+B)$$ you need to check through the steps you took. If the mistake isn't obvious, try putting $$A=0$$ and $$B=0$$. It is very very easy to get a sign wrong, a plus for a minus, when working with equations quickly. It is only through practice that you will become both fast at it and accurate.

Identities Based on the Pythagorean Theorem
Some of the most fundamental trigonometric identities are those derived from the Pythagorean Theorem. These are defined using a right triangle:

At this stage in the course the Pythagorean Theorem should be second nature to you. If you have not yet learned it, learn it now.
 * $$a^2+b^2=c^2$$

$$a$$ and $$b$$ of course are the legs or the adjacent and opposite edges, and $$c$$ is the hypotenuse, the longest side, the side that does not include the right angle. This formula only works for a right angle triangle. If the angle shown as a right angle in the diagram were obtuse, larger than a right angle, then $$c^2$$ would be larger than the Pythagorean sum. If the angle shown as a right angle were smaller than a right angle, then $$c^2$$ would be smaller than $$a^2+b^2$$.

Pythagorean Theorem in Terms of sine and cosine
The Pythagorean Theorem is the same thing as
 * $$\sin^2(A)+\cos^2(A)=1$$

We know this from the earlier in the book where we introduced $$\rm sine$$ and $$\rm cosine$$. The $$\sin^2(A)+\cos^2(A)=1$$ identity should be second nature to you too, but you should also be able to derive it from the Pythagorean relation.
 * The $$\rm cosine$$ is the adjacent side when the hypotenuse is one.
 * The $$\rm sine$$ is the opposite side when the hypotenuse is one.

We can see it's true from a right triangle that has a hypotenuse that is 'c' rather than one. Dividing the Pythagorean relation through by $$c^2$$ gives us

 * $$\left(\frac{a}{c}\right)^2+\left(\frac{b}{c}\right)^2=\left(\frac{c}{c}\right)^2=1$$

And we have already seen from soh-cah-toa that the sine of A is $$\left(\frac{a}{c}\right)$$ and the cosine of A is $$\left(\frac{b}{c}\right)$$.

Identities based on Addition Formula
We saw the addition formula earlier.

Letters are Arbitrary
The letters in these equations $$A$$ and $$B\,$$ are arbitrary. We could equally use $$\omega$$ and $$\theta$$. We're pointing this out because we happen to have a diagram on this page that has angles $$A$$, $$B$$ and $$C$$ in it, and we want to make it clear that that was for Pythagoras and we're not talking about that diagram any more. In these equations you can also always substitute actual values, e.g. replace $$A$$ by $$\pi$$ and they'd still be true. Or you could replace $$A$$ by $$2t$$ or $$\pi-t$$and they'd still be true.

Addition Formula
The addition formula for cosine is:
 * $$\cos(A+B)=\cos(A)\cos(B)-\sin(A)\sin(B)$$

and is worth learning. But don't learn the next one:

'Subtraction' Formula

 * $$\cos(A-B)=\cos(A)\cos(B)+\sin(A)\sin(B)$$

Learning the second formula is extra effort that does not really gain you anything. You can get it instantly by replacing $$B$$ by $$-B$$ in the first equation. The only things on the right hand side that will change are the terms that had $$B$$ in them. The $$\cos(B)$$ is unchanged because $$\cos(-B)=\cos(B)$$. The minus sign before the second term changes because $$\sin(-B)=-\sin(B)$$.

Checking the 'subtraction' formula
Now do a quick check. If $$A=B$$ then $$cos(A-B)$$ is $$\cos(0)$$ which is one, right? And on the right hand side we have $$\cos^2(A)+\sin^2(A)$$, which is also one. Looks good.

It is much better to remember it this way, because you are doing less rote learning and you're also becoming more fluent with the algebra.

Double Angle Formula
You can immediately get to the next formula by putting B equal to A in the addition formula. This is a double angle formula.
 * $$\cos(2A)=\cos^2(A)-\sin^2(A)$$

Half Angle Formula
Replace A by $$\frac{A}{2}$$ in the previous result and you get the half angle formula.
 * $$\cos(A)=\cos^2\bigl(\tfrac{A}{2}\bigr)-\sin^2\bigl(\tfrac{A}{2}\bigr)$$

Cos^2A=\2cos^2A-1

Sum of two shifted Cosines
For the next formula, you could just plough through the algebra...
 * $$\cos(x+\theta)+\cos(x-\theta)=\dots$$

Waves in and out of phase
Before we do, notice that we are adding two cosine waves, the first shifted left and the second shifted right. We've seen this before when we looked at waves in and out of phase. We're going to get another sinusoidal wave. The expression is fairly symmetric, and actually we can quickly show that the expression gives an even function, that is that the value for $$-x$$ is the same as for $$x$$ :

 * $$\cos(-x+\theta)+\cos(-x-\theta)=$$ using $$\cos(x)=\cos(-x)$$ we get to:
 * $$\cos(x-\theta)+\cos(x+\theta)=$$ and now swapping the two terms:
 * $$\cos(x+\theta)+\cos(x-\theta)$$ which is the original expression.

with practice you'll be able to see those steps and that the expression is an even function immediately.

A sinusoidal wave that is an even function - well it is something based on cosine. We're expecting the formula will simplify to give us something like:
 * $$A\cos(x)$$

Where $$A$$ will depend on $$\theta$$.

Values to Check With
When $$\theta=0^\circ$$ (try it in the original formula) we expect A to be 2. When $$\theta=90^\circ$$ we expect A to be 0, as the two cosine waves are $$180^\circ$$ out of phase. So now to plough through the algebra:
 * $$\cos(x+\theta)+\cos(x-\theta)=$$
 * $$\cos(x)\cos(\theta)-\sin(x)\sin(\theta)+\cos(x)\cos(-\theta)-\sin(x)\sin(-\theta)=$$
 * $$\cos(x)\cos(\theta)-\sin(x)\sin(\theta)+\cos(x)\cos(\theta)+\sin(x)\sin(\theta)=$$
 * $$\cos(x)\cos(\theta)+\cos(x)\cos(\theta)=$$
 * $$2\cos(\theta)\cos(x)$$

And to check we try with $$\theta=0^\circ$$ and get $$2\cos(x)$$, and we check with $$\theta=90^\circ$$ and get $$0\times\cos(x)$$ , as we hoped.

Knowing roughly what we expected made it easier to get the algebraic steps right. We knew where we were going. We knew we weren't going to end up with four separate terms, some would have to cancel or combine in some other way.

Identities based on Sine and Cosine rules

 * $$\frac{a}{\sin(A)}=\frac{b}{\sin(B)}=\frac{c}{\sin(C)}$$.

This is easy to remember because it is so symmetrical. You do not even need to remember which way up the ratios are as this is also true:
 * $$\frac{\sin(A)}{a}=\frac{\sin(B)}{b}=\frac{\sin(C)}{c}$$.

What you do need to remember is how the triangle is labelled for it to be true.

With the cosine law formula:
 * $$a^2+b^2-2ab\cos(\theta)=c^2$$

It is best to think of it as a more general version of Pythagoras' theorem. The a and b have to be on equal footing, so ab as a multiplier is reasonable.

 * If you are familiar with 'units' in physics, then use the fact that units must match up. The quantities $$a,b,c$$ are measurements of length. It is no good adding $$a^2$$ to $$-2(a+b)\cos(\theta)$$ . One might have units Km2 the other units of Km. Adding $$a^2$$ to $$-2ab\cos(\theta)$$ the units, e.g: Km2, do match.

In some more detail, it has got to be minus for $$-2ab\cos(\theta)$$. That's because for $$\theta<90^\circ$$ we need $$c^2$$ to be less than for Pythagoras' theorem.

How can you remember and be sure the 2 is right? Think of an equilateral triangle with each side of length 1. The angle $$\theta=60^\circ$$ and $$\cos(60^\circ)=0.5$$. We need the 2 to get the right answer 1 + 1 + 2x1x1x0.5 = 1.

Ratio identities

 * $$\tan(A)=\frac{\sin(A)}{\cos(A)}$$

This is one definition of tan, and is something you should just learn.

Identities based on symmetry
These symmetry identities are best remembered by remembering the graphs for these functions. Have a look at the graphs again if you don't remember them.

$$0,\frac{\pi}{2},\pi,\frac{3\pi}{2},2\pi$$ are landmarks on the graphs of sine and cosine, and you should know what happens for both those functions at those landmarks. When you have that knowledge the following symmetry identities are easy to write down, because you can see them visually.

Shifting Left

 * $$\cos(\pi+A)=-\cos(A)\quad\sin(\pi+A)=-\sin(A)\quad\tan(\pi+A)=\tan(A)$$

The identities above are visualised as shifting the graph left by $$\pi$$. It's a half cycle, and both cosine and sine change signs - and hence tan does not change sign, because when it is expressed as a ratio of sine over cosine both the top and bottom change signs.

Reflecting in $$x=\frac{\pi}{2}$$

 * $$\cos(\pi-A)=-\cos(A)\quad\sin(\pi-A)=\sin(A)\quad\tan(\pi-A)=-\tan(A)$$

In the above we are reflecting the graph about the vertical line $$x=\frac{\pi}{2}$$. Spend enough time looking at this on the graph to see that that is true. It is important to do that to remember this trick for remembering what happens.

Now sine has a maximum at $$x=\frac{\pi}{2}$$ (it has the value one) and it is symmetric about that x value, so $$\sin(\pi-A)=\sin(A)$$. Cosine is zero at $$x=\frac{\pi}{2}$$. Reflecting cosine in the line $$x=\frac{\pi}{2}$$ reverses the sign. $$\cos(\pi-A)=-\cos(A)$$

Co-function identities

 * $$\cos(A)=\sin\left(\frac{\pi}{2}-A\right)$$
 * $$\sin(A)=\cos\left(\frac{\pi}{2}-A\right)$$

The above two formulas are most easily seen from the right-triangle definition of cosine and sine. The two acute angles in such a triangle add up to $$\frac{\pi}{2}$$, and we are just giving the ratios of sides lengths in terms of a different angle's trig function.
 * $$\cos(A)=\sin\left(\frac{\pi}{2}+A\right)$$
 * $$\sin(A)=-\cos\left(\frac{\pi}{2}+A\right)$$

These two formulae are 'the same' as the previous formulae. We get there in two steps. First subtracted pi from the angle on the right hand side, which inverts the sign, and inverted the sign to compensate. Next invert the sign of the angle on the right hand side. For cosine on the right we are done. For sine on the right we have to invert its sign since inverting the angle's sign changed the sign of the result.

Yes - keeping track of signs is tricky, and always needs care.

title: Trigonometry/Remembering Trig Formulae


text:
Cultural Anthropology

Anthropology is the holistic and scientific study of humanity. Cultural Anthropology focuses on contemporary human cultures, their beliefs, myths, values, practices, technologies, economies and other domains of social and cognitive organization. The detailed descriptions of culture, or ethnography, are based upon a methodology of primary data collection through participant observation with living human populations.

This textbook aims to provide an introduction to the field of cultural anthropology. The initial chapters introduce the concept of culture and review the historical, theoretical, and methodological influences on the field. Chapters four through twelve discuss the major domains of the study of culture; symbolism, communication, ritual, production, healing, rights, reproduction, kinship, conflict, and globalization. These chapters provide ethnographic examples (both etic and emic perspectives) and case studies to support the central concepts in each chapter. Additional case studies are available via the Anthrobase website and others can be developed in wikibook format and integrated through links in this book.

Table of Contents

 * Chapters:
 * Introduction to Anthropology and Culture
 * /History of Anthropological Theory/
 * /Anthropological Methods/
 * /Communication and Language/
 * Play, Sport, and Arts
 * /Ritual and Religion/
 * /Production, Inequality and Development/
 * /Health and Healing/
 * /Human Rights/
 * /Marriage, Reproduction and Kinship/
 * /Social Stratification, Power and Conflict /
 * /Globalization and Migration/

 * Ethnographic Case Studies
 * Anthrobase is an online searchable, open source database of full text ethnographies. Nearly 100 of them are in English

General Tasks
at bottom of each chapter
 * 1) Repair and reformat references using intext citation format and insert =References=
 * 1) Dewikify Chapters moving key terms to /Glossary
 * Please add key terms from all chapters to this page alphabetically under the appropriate Letter A-Z.
 * Use the definition given in the wikibook.
 * Please bold and link key terms in text to this page rather than the wikipedia article.
 * When removing the wikilinks from the text feel free to maintain links to wikipedia within the glossary as a source of more information.

 * 1) Edit and improve quality of chapter content.
 * 2) Create PDF

Ritual & Religion Chapter

 * 1) Consider what 'world religions' descriptions should be maintained or deleted - or if all should be moved to new chapter.
 * 2) Re-write priest & priestess section
 * 3) possible deletion of "Vaschnavism"
 * 4) Re-write lengthy Judaism and Christianity sections
 * 5) Clarify "Cargo Cult"
 * 6) Clarify "African Religions"
 * 7) Possible shortening/restoration of "Pastafarian" section
 * 8) Move "Additional-Information-Taiwanese People and Culture" to more appropriate place

Social groups chapter

 * 1) Black and White Relations- I want to see how other races in other countries deal with each other.
 * 2) Integrate content or links to An introduction to antiracist activism for teachers and students

Health, Healing & Human Rights Chapter

 * 1) Move "Cultural imperialism" chapter to globalization chapter

Globalization & Migration Chapter

 * 1) Clarify on "How Globalization Affects the Five Modes of Production" -more critical thought needed
 * 2) Clarify on section "Globalization of Hip-Hop"

title: Cultural Anthropology


text:
User:Gbiten~enwikibooks

I'm here.

title: User:Gbiten~enwikibooks


text:
Talk:Music Theory/Metal

I want to add/correct some things about the metal article. Well, I don't think metal has been "invented" in the US. Well the real creators of metal are the 60's/70's bands Black Sabbath, Led Zeppelin among others. In their music are the riffs and patterns that became so typical for Metal Music to be heard first (and especially in Black Sabbath's music). Well I don't think it is necessary/useful to split up Heavy Music into so many different styles, I'd say the only styles within metal music are:

 * Heavy Metal
 * Speed Metal
 * Hard Rock

There's no need to split them up further, because they all use the same clichees all over again. Well there's one more thing to say: It's no specific thing for goth bands to use locrian mode, I suppose many of those bands don't know what locrian is. Listen to the most known goth bands, you'll hardly ever find a locrian mode in there. Much more specific for goth is the HM5 (Harmonic-Minor, 5th mode, which is also called phrygian dominant, and which is created by raising the third of the 5th step, so that in A-minor the E-minor on the 5th step becomes a e-major chord).

That's all!

--

No way; there are many differences between the metal genres listed, and I believe they are fine the way they are. The only thing I don't really like about this article is the end where it talks about how seven string guitars tuned to drop a are not uncommon. I don't agree with this and I don't like how it states it. -MetalGeoff

Heavy Metal, Speed Metal and Hard Rock? Where would NWOBHM come in then (unless it's grouped with Progressive or Power Metal)? Or NuMetal? Or even Black Metal. None of those genres even remotly resemble Heavy Metal, Speed Metal or Hard Rock.

Although I agree, Metal has way to many sub genres.

hold up
There's no such thing as "blues metal". Aerosmith and GnR are hard-rock/rock 'n' roll bands. Where on earth do you come up with this stuff? == --actually, no...if you grew up in the 80s you knew that both Aerosmith and GnR were heavy metal, but today calls hard rock. That is the problem with this whole article; it skips 2 decades, the 70s and 80s...what I have seen called "mainstream metal", but really back then was just called "heavy metal". The biggest problem with this article is the fact that none of these descriptions fit a band like Iron Maiden; any true metalhead knows that Iron Maiden was a defining sound of heavy metal. By not taking them into account, this article is useless, as are most of today's definitions of heavy metal.

Visual kei
Visual is not a music style, nor is it metal. The music style visual belongs to is J-Rock.

^ You are correct to say visual kei is (at this moment) not a music style; however, present-day visual kei artists can encompass any music style, including metal.

What?
There ar elements in this that are outright erroneous (swedish death metal wasn't popularised by In Flames etc.) and there is, well, a lack of knowledge present. I mean, for example, there is just no point in the description of progressive metal - Opeth are in a completely different genre to Dream Theatre etc. etc.) The various subgenres are totally valid though, although hair metal is exactly the same thing as glam metal, There are one or two missed out, and they're badly fleshed out. Basically, whoever wrote this dosn't have anywhere near enough knowledge to write this, or perhaps, not the time to do it properly.

Theory of metal
are there any books that discuss the actual sounds of metal (specifically the extreme sub-genres)... that's what i want, a music theory book about death metal. 64.230.107.230 (talk) 19:34, 12 February 2009 (UTC)

Absolutely baseless
I am given the impression, reading this, that the writer does not actually listen to or understand Metal in the slightest. Who wrote this? The writer seems to be focusing on "core", rather than Metal. Metal is incredibly melodic music, and rhythm is only important in "Progressive" and "Technical" Death Metal, and, in those genres, is used primarily to accent the melodies. I mean, if you look at all of the main/best genres of Metal, chronologically, you will see that they're all primarily focused on melodic progression and song structure - Heavy Metal, NWOBHM, Speed Metal, Death Metal, Black Metal, all of these focus primarily on melody, some even making copious use of harmony (NWOBHM, Speed Metal, and some Black Metal). Atonality does not mean that melodies are not melodies, just as a piece with multiple concurrent time signatures can be "in time" (this is done in Metal, occasionally - Symphony X's "The Accolade" has a short passage of this).

Speaking of song structure - song structure is incredibly important in Metal. Why is there no discussion of the riff, riff progression/self-reference, and so on? There's nothing about the overarching usage of narrative and architected structures in NWOBHM and Extreme Metal. The overall assumption appears to be that Metal is based on Rock'n'Roll's "verse-chorus" structure, which is so fundamentally incorrect as to be aggravating.

Much of the incorrect information on this page is an absolute disgrace, and should be disregarded by all until it has been rewritten in a satisfactory manner.

Change the First Paragraph
Towards the end of the first paragraph, it says that metal contains more musicianship than other rock acts. This is an opinion, and therefore does not belong in here. 209.106.46.161 (discuss) 17:47, 21 March 2011 (UTC)

Who wrote this?
I personally am disgustesd by how biased this article is, the main writers obviously have no clue what they are talking about.

Minor quibble
Ignoring the big issues for now (they've been brought up be people above), minor quibble: near the end of the section on death metal, it mentions deathcore, and goes on to say that there's dispute as to metalcore's and deathcore's status as real metal. Now, while yes, there are people out there who enjoy yelling "metalcore isn't real metal stfu poser fag", I have yet to see a recognised critic (or even a literate person) seriously consider the opinion. Yes, metalcore does take a lot from hardcore punk, but ultimately, its most striking elements are death growls, blast beats, and most tellingly, tritones. The reason I bring it up, and honestly, I wouldn't normally bother opening this can of worms, is that I'd rather not see such a popular yet unfounded statement furthered on this page 143.92.1.33 (discuss) 08:56, 7 November 2012 (UTC)

Major Quibble
I know I said I wouldn't mention these, but I will.

The genres idea is a bad one. Actually, it's a good one, but it's badly executed. As it currently stands, the article talks about subgenres of metal without talking about music theory, then talks about music theory only tangentially relating it to the aforementioned subgenres (and often makes sweeping generalisations only true for a small portion of metal subgenres, such as comments about often only having one or two chords, which is true for metalcore, some trad metal, some industrial metal, and that's about it). A better way of doing this would be to merge the two sections; either talk about each genre and the music theory behind it, or talk about the music theory as it relates to each subgenre. 143.92.1.33 (discuss) 09:02, 7 November 2012 (UTC)

NWOBHM Motorcycle gang?
I basically stopped reading when I saw this acticle say that NWOBHM mostly sings about motorcycles... this statement is based on what? It's laughable misinformation since that's not even true of the movement's biggest band, Iron Maiden. Where's the motorcycle craze in Angel Witch, Venom, Diamond Head, and Tank? It's more typical of Saxon and sometimes Motörhead, but not of the entire scene.

Who One earth thought this was a good Idea???
You cant put "core" genres together with metal genres and not expect people to pick a side, and not write horrible inaccurate stuff that they pull out of nowhere, like "melodeath came from metalcore" (which i gladly changed), and many others that i cannot think of right now, this article is mostly written by wanna be musician kids that think where a certain style came from is music theory, and seriously, this would never work because the amount of music theory involved in metal is nothing compared to the aspect of feeling it while you play it/ write it. since more than half of metal cannot be simply created by using scales or chords. I say please just erase this. And well if u actually intended to create a horrible inaccurate source for certain people to be misguided, then as nefarious as that is i guess i can respect what you are doing here, but otherwise is making metal musicians look really, really bad. Better Idea Put a warning that says. READ AT YOUR OWN PERIL!

BlackNightTerror (discuss • contribs) 05:07, 8 February 2015 (UTC) BlackNightTerror

title: Talk:Music Theory/Metal


text:
Surgical Procedures

 * 1) /Abdominoplasty/
 * 2) /Adenoidectomy/
 * 3) /Amputation/
 * 4) /Melanoma/
 * 5) /Mandibular Fractures/
 * 6) /General Surgery Guidelines/
 * 7) /Abdominal Surgery/
 * 8) Cholecystectomy
 * 9) *Open Cholecystectomy
 * 10) *Lap Cholecystectomy
 * 11) Cholecystitis
 * 12) Cholecystography
 * 13) Cholelithiasis
 * 14) Choledocholithiasis
 * 15) /General Surgery/
 * 16) /Acid Base Disorder/
 * 17) /Plastic Surgery/

'' Notice! This Wikibook is by no means intended to be a guide to "at-home" surgery. Surgical illness should only be managed by a professional medical expert (e.g Surgeon). ''

title: Surgical Procedures


text:
Surgical Procedures/Abdominoplasty

Abdominoplasty or "tummy tuck" is a cosmetic surgery procedure to reshape and firm the abdomen. It involves the removal of excess skin and fat from the middle and lower abdomen in order to tighten the muscles of the abdominal wall. This type of surgery is usually sought by woman (who are not considering having any or more children) and individuals who have abdominal fat deposits which do not respond well to diet and exercise. There are two types of abdominoplasty: Complete. Requires from about two to five hours Partial. Requires from about one to two hours

A complete abdominoplasty involves five steps: An incision is made from hip to hip just above the pubic area. Another incision is made to free the navel from the surrounding skin. The skin is detached from the abdominal wall to reveal the muscles to be tightened. The skin flap is reattached with any extra skin being removed. A new hole for the navel is made and stitched into place. All stitches are dressed and any excess fluid from the site is drained.

A partial abdominoplasty involves three steps: A smaller incision is made. The skin in removed between the incision and the navel. The skin is stretched down and excess skin removed. The flap is stitched back into place. Recovery from a complete abdominoplasty can take from four to six weeks and patients are advised to take this recovery time off from work. For the first ten days, a patient may experience bruising and discomfort. A supportive abdominal binder is normally worn to ensure proper healing. Patients are advised not to smoke during recovery.

title: Surgical Procedures/Abdominoplasty


text:
Surgical Procedures/Adenoidectomy

Adenoids, or pharyngeal tonsils, are folds of lymphatic tissue covered by ciliated epithelium. They are found in the roof and posterior wall of the nasopharynx at the back of the throat behind the uvula.

Adenoids are part of the immune system as they trap inhaled viruses and produce antibodies, particularly in children. This function decreases with age as the adenoids shrink. Because of this, the problems caused by enlarged adenoids rarely occur in adults.

The condition where hypertrophy of the pharyngeal tonsils occurs is also referred to as adenoids. Enlarged adenoids can obstruct breathing through the nose, and it is common when this happens for them to be surgically removed in a procedure called adenoidectomy. This procedure is carried out through the mouth under a general anaesthetic and involves the adenoids being curetted or cauterised. Sleep apnoea, recurrent infection of the adenoids or distorted speech are also reasons for adenoidectomy. The procedure is often carried out at the same time as a tonsillectomy. Adenoidectomy is also carried in patients who have chronic ear infections caused by the adenoids blocking the eustachian tube.

title: Surgical Procedures/Adenoidectomy


text:
Surgical Procedures/Amputation

Amputation is the removal of a body extremity by trauma or surgery. As a surgical measure, it is used to control pain or a disease process in the affected limb, such as malignancy or gangrene. Amputation is a blind and final method in surgery to save the patient's life.

Types
Types of amputation include:
 * leg
 * amputation of digits(Ray)
 * partial foot amputation (transmetatarsal)
 * ankle disarticulation (Syme)
 * below-knee amputation (transtibial)
 * knee-bearing amputation
 * above knee amputation (transfemoral)
 * hip disarticulation
 * arm
 * amputation of digits(Ray)
 * metacarpal amputation
 * wrist disarticulation
 * forearm amputation (transradial)
 * elbow disarticulation
 * above-elbow amputation (transhumeral)
 * shoulder disarticulation and forequarter amputation

Hemicorporectomy is the most radical amputation. Genital modification and mutilation often involves amputating tissue, although it is usually not a result of injury or disease.

As a rule, amputations through the bone diaphysis are preferred to preserve joint function, but in oncological surgery, disarticulation is favored. (Edited by Dr. Avadh Sahi)

Epidemiology
110,000 a year in the USA ; of those 100,000 are lower limb amputations for peripheral arterial occlusive disease.

Method
A tourniquet is used in orthopaedics to limit bleeding but not in vascular surgery (where the limb is already under perfused because of arterial disease). The muscles are transected, any bleeding vessel is ligated and finally the bone is sawed through. Skin and muscle flaps are then transposed over the stump, except in amputations for gangrene when the stump is left open and allowed to heal by secondary intention.

Complications
Some amputees experience the phenomenon of phantom limbs; they feel body parts that are no longer there. These limbs can itch, ache, and feel as if they are moving. Some scientists believe it has to do with a kind of neural map that the brain has of the body, which sends information to the rest of the brain about limbs regardless of their existence.

Autoamputation
In some rare cases when a person has become trapped (on account of getting a limb stuck) in a deserted place, with no means of communication or hope of rescue, the victim has amputated his own limb: In 2003, 27-year old Aron Ralston amputated his forearm using his pocketknife and breaking and tearing the two bones, after the arm got stuck under a boulder when hiking in Utah. A month later, an Australian coal miner amputated his own arm with a Stanley knife after it became trapped when the front-end loader he was driving overturned three kilometers underground.

title: Surgical Procedures/Amputation


text:
User:Geni

User page on wikipedia

title: User:Geni


text:
Cookbook:Pan-fried Ravioli

 * Pasta

Ingredients

 * 2 tablespoons whole milk
 * 1 egg
 * ¾ cup Italian seasoned bread crumbs
 * ½ teaspoon salt (optional)
 * ½ package (25 ounces) frozen ravioli, thawed
 * 3 cups vegetable oil for frying
 * 1 tablespoon grated Parmesan cheese
 * 1 jar (16 ounces) marinara sauce

Procedure

 * 1) Combine milk and egg in a small bowl.
 * 2) Place breadcrumbs and salt in a shallow bowl.
 * 3) Dip ravioli in milk mixture, and coat with breadcrumbs.
 * 4) In a large saucepan, heat marinara sauce over medium heat until bubbling, about 5–10 minutes. Reduce the heat to simmer.
 * 5) In a large heavy pan, pour oil to depth of 2 inches. Heat oil over medium heat to 375°F.
 * 6) Fry ravioli in hot oil, a few at a time, for about 1 minute on each side or until golden.
 * 7) Drain on paper towels.
 * 8) Sprinkle with Parmesan cheese and serve immediately with hot marinara sauce.

Notes, tips, and variations

 * You can use cheese or meat raviolis, but the traditional version is made out of a square meat ravioli.

title: Cookbook:Pan-fried Ravioli


text:
Trigonometry/Applications and Models

Simple harmonic motion

Simple harmonic motion (SHM) is the motion of an object which can be modeled by the following function:

 * $$x = A \sin \left(\omega t + \phi\right)$$

or

 * $$x = c_{1} \cos\left(\omega t\right) + c_{2} \sin\left(\omega t\right)$$
 * where c1 = A sin φ and c2 = A cos φ.

In the above functions, A is the amplitude of the motion, ω is the angular velocity, and φ is the phase.

The velocity of an object in SHM is
 * $$v = A \omega \cos \left(\omega t + \phi\right)$$

The acceleration is
 * $$a = -A \omega^2 \sin \left(\omega t + \phi\right) = -\omega^2 x$$

An alternative definition of harmonic motion is motion such that
 * $$\displaystyle a = -\omega^2 x$$

Springs and Hooke's Law
An application of this is the motion of a weight hanging on a spring. The motion of a spring can be modeled approximately by Hooke's law:

 * F = -kx

where F is the force the spring exerts, x is the extension in meters of the spring, and k is a constant characterizing the spring's 'stiffness' hence the name 'stiffness constant'.

Calculus-based derivation
From Newton's laws we know that F = ma where m is the mass of the weight, and a is its acceleration. Substituting this into Hooke's Law, we get

 * ma = -kx

Dividing through by m:

 * $$a = -\frac{k}{m}x$$

The calculus definition of acceleration gives us

 * $$x'' = -\frac{k}{m}x$$

 * $$x'' + \frac{k}{m}x = 0$$

Thus we have a second-order differential equation. Solving it gives us

 * $$x = c_{1} \cos\left(\sqrt{\frac{k}{m}}t\right) + c_{2} \sin\left(\sqrt{\frac{k}{m}}t\right)$$   (2)

with an independent variable t for time.

We can change this equation into a simpler form. By letting c1 and c2 be the legs of a right triangle, with angle φ adjacent to c2, we get

 * $$\sin \phi = \frac{c_{1}}{\sqrt{c_{1}^{2} + c_{2}^{2}}}$$
 * $$\cos \phi = \frac{c_{2}}{\sqrt{c_{1}^{2} + c_{2}^{2}}}$$

and

 * $$c_{1} = \sqrt{c_{1}^{2} + c_{2}^{2}} \sin \phi$$
 * $$c_{2} = \sqrt{c_{1}^{2} + c_{2}^{2}} \cos \phi$$

Substituting into (2), we get

 * $$x = \sqrt{c_{1}^{2} + c_{2}^{2}} \sin \phi \cos\left(\sqrt{\frac{k}{m}}t\right) + \sqrt{c_{1}^{2} + c_{2}^{2}} \cos \phi \sin\left(\sqrt{\frac{k}{m}}t\right)$$

Using a trigonometric identity, we get:

 * $$x = \sqrt{c_{1}^{2} + c_{2}^{2}} \left[\sin \left(\phi + \sqrt{\frac{k}{m}}t\right) + \sin \left(\phi - \sqrt{\frac{k}{m}}t\right)\right] + \sqrt{c_{1}^{2} + c_{2}^{2}} \left[\sin \left(\sqrt{\frac{k}{m}}t + \phi\right) + \sin \left(\sqrt{\frac{k}{m}}t - \phi\right)\right]$$

 * $$x = \sqrt{c_{1}^{2} + c_{2}^{2}} \sin \left(\sqrt{\frac{k}{m}}t + \phi\right)$$   (3)

Let $$A = \sqrt{c_{1}^{2} + c_{2}^{2}}$$ and $$\omega^{2} = \frac{k}{m}$$. Substituting this into (3) gives

 * $$x = A \sin \left(\omega t + \phi\right)$$

Next Page: ../Using Fundamental Identities/

Previous Page: ../Inverse Trigonometric Functions/

Home: Trigonometry

title: Trigonometry/Applications and Models


text:
Cookbook:Banana Bread I

| Bread

This is a basic, reliable banana bread recipe. The perfect thing to do with over-ripe bananas! An alternative version of this recipe can be found here.

Procedure

 * 1) Preheat oven to 350°F (175°C).
 * 2) Lightly grease an 8 x 4-inch (20 x 10 cm) loaf pan.
 * 3) Combine all ingredients into a large mixing bowl. Beat well.
 * 4) Pour batter into pan.
 * 5) Bake on middle shelf of oven for 60 minutes, or until a toothpick inserted into the center of the loaf comes out clean.

Notes, tips, and variations

 * ½ tsp baking powder and ⅓ cup milk can be substituted for the sour milk/buttermilk and baking soda.
 * ½ cup nuts may also be added to the mixture

Conversion notes
hy:Եփութուխ:Ադամաթուզե հաց

title: Cookbook:Banana Bread I


text:
Wikijunior:Big Cats/Lion

Lions are a major symbol of wild Africa. They have been long respected in Africa for their strength and beauty. Lions are the only big cats that live in large groups. Also, they have the loudest roar of any cat, which can be heard for up to five miles!

Where do lions live?

Despite the nickname King of the jungle, lions do not live in the jungle. They live in a flat grassy plains called savannas; they usually have a certain place in the savannas where they like to stay. In ancient times, lions roamed nearly every continent. Today, they can commonly be found across central and southern Africa. There is also a small population in the Gir forest of India on the continent of Asia. Also, most people know lions as "The King of the Beasts" today.

What do lions look like?

Lions have tawny, or yellowish brown, fur. They grow to a length of about 10 feet (3 meters) and stand about 4 feet (1.2 meters) tall. Male lions are larger than the lionesses (females), weighing as much as five men or about 550 pounds (250 kilograms). The more slender lioness usually weighs about as much as 400 pounds (180 kilograms).

Adult males can be recognized by the furry mane that runs around the heads and down the neck. For some lions the mane even runs along the belly. There is no other big cat with such a dramatic difference in appearance between males and females.

Both lions and lionesses have tufts on the end of their tails, something no other cat has. If you could touch a male lion's tail, you would feel a sharp bone tucked into the tail tuft. One old legend claims that lions would use the tail spur to whip themselves into a frenzy before fighting.

What is a pride?
Lions are the most social cats, living in large groups called prides. Prides are made up of one to three related adult males, along with as many as thirty females and cubs. The females are usually closely related to each other, being a large family of sisters and daughters. Lion prides act much like packs of wolves or dogs, animals surprisingly similar to lions (but not other big cats) in behavior, and also very deadly to their prey.

The male lion is much stronger than the female. This makes him an able protector, especially when a group of females are hunting and the cubs are at risk of marauders, such as hyenas. Male lions use their muscles and fighting skills to guard the land and keep enemies away. Sometimes those enemies are other lions.

In prides, cubs are cared for not just by their mothers but by other adult females, as well. Often, one or two lionesses (female lions) will stay with the cubs while the other females hunt. If a cub becomes an orphan, it is common for it to be cared for by other females who are related to it, perhaps by a lioness who is an aunt or older sister.

According to a study on sciencedirect.com, "male lions were frequent and successful hunters. The main prey species of all male group types, but particularly nonterritorial males, was buffalo. By contrast, females preyed more frequently on the most abundant medium-sized ungulates, such as wildebeest." There are photographs of both male and female lions hunting at http://www.laocomics.com/blog/category/animals/.

When young male lions reach the age of one year, they are chased from the prides they are born into by the older male lions. If the lead male is elderly, the young male, either alone or with male siblings, will sometimes fight to take over the leadership of the pride. If the young males leave the pride, they become "rogue" males. They travel alone or may partner with other rogues, perhaps brothers. Having a partner makes it easier for a rogue lion to survive and eventually win a pride of his own. These rogue lions are often found scavenging food killed by smaller predators, such as hyenas or jackals, which can be chased away. Rogue lions hunt for themselves until they are able to take over a pride of their own!

What do lions eat, and how do they catch their prey?

Lions eat large prey, such as gazelles, antelopes, zebras, wildebeests, giraffes, and buffalo. They have been known to take down even elephants, but then only with all of the adults of the pride participating in the kill. Even elephants fear hungry lions. When food becomes scarce, lions will hunt smaller prey or sometimes eat the kills of other animals.

Most prey animals can run much faster than the average lion. Therefore, lions hunt in fairly well organized groups and stalk, or sneak up on, their prey. They may try to surround them first, then make a swift, sudden charge from the tall grass. The grass where lions live is not short and green but grows very tall and is a light brownish color most of the time. The lions' fur is the same color as this grass, making it difficult for other animals to see them. Coloring that helps to hide an animal or thing is called "camouflage".

Females do most of the hunting and work in groups although, if she has to, a single lioness is able to hunt on her own. Male lions are actually more capable hunters than females but they usually focus more on protecting the pride. Lions might spend hours stalking prey but the actual kill is made in just minutes. After a kill is made, the females let out low roars. This tells the pride to join them for a meal. Adult males eat first, followed by females, and then cubs.

To avoid the dangerous heat of the mid-day sun, lions usually hunt at night when the dim light helps to keep them hidden from their prey. Lions have very good night vision so the darkness does not pose a problem for them. Animals that are active at night like lions are called nocturnal creatures. Lions can eat 69kg of meat a day!

Fun facts

 * A male lion's roar can be heard up to 5 miles away.
 * The hunting grounds for a pride of lions can range from 8 to 150 square miles.
 * The largest lion on record was almost 11.8 feet long and weighed nearly 900 pounds.
 * Lions rarely eat an entire kill. Hyenas and vultures finish the rest.
 * A lion can run as fast as 50 mph for short distances and can leap a distance of more than 30 feet.
 * There are only a quarter the number of lions in Africa as there were just 40 years ago.
 * A lion's eyesight is five times better than a human's eyesight, and it can hear prey that is more than a mile away.
 * It may take up to 4 hours for a pride of lions to finish eating.
 * A male lion eats first, even though the females actually catch the prey.
 * After eating, a thirsty lion may drink for as long as 20 minutes.
 * Lions were once thought to be magical creatures and were worshiped as gods. Domestic cats replaced lions in that role, especially in Egypt, because they were much safer and easier to care for.
 * There can be up to 40 members in a pride with over half of them being cubs and young adults.
 * Females will often stay with the pride their entire life, while young males are driven out.
 * A lion eats 36 kg of meat a day.
 * When a male lion gets old, its mane may fall off.
 * The lion is the only social predator among the Big Cats.
 * Lions can't climb as well as leopards.
 * Lions can steal food from other predators such as cheetahs.

For more information

 * Wikipedia: Lion
 * http://www.sandiegozoo.org/animalbytes/t-lion.html - hear the sound of a roaring lion.
 * http://www.tigertouch.org/barbary/index.html - learn about the rare Barbary lions of North Africa.

Next Topic: Tigers

ca:Viquijúnior:Grans felins/Lleó Wikijunior Großkatzen/ Löwe Wikichicos/Grandes felinos/León fr:Wikijunior:Les félins/Les lions Wikijunior Grandi felini/Leone zh:Wikijunior:大猫/狮

title: Wikijunior:Big Cats/Lion


text:
PHP Programming/Classes

Basics
A class is a structure composed by three kinds of items called s, that is:
 * 1) constants;
 * 2) variables called "properties";
 * 3) functions called "methods".

Each of which is declared with a visibility that is either explicit (from "private", "protected" and "public") or implicit (that is, omission of a declaration, only allowed for methods for which the default value is "public").

An object is an instance of a class, in which its class's methods (if any) can be called, and its class's members (if any) can be provided with new values overriding the default ones.

Classes
A simple class can be defined as follows:

However, just because you've created a class doesn't mean you get to use anything in it. A class is an abstract entity. It is a way of saying "here is how to create Html-type objects, and what they do." Before you can do anything with the members of a class, you must make an instance of that class.

That is, you must actually make an "Html" object and work with that.

Objects
Once you have defined a class, you will want to try it out. Objects are instances of a class. Using objects in PHP is as follows

The new concepts in that piece are:

 * The  keyword — Used to make a new instance of an object, in this case an object of the class.
 * The  operator — Used to access a member or method of an instantiated object, in this case, the method

Now, the fact that the representation of a line break is defined within a member of the class allows you to change it. Note that the changes will only concern an instance, not the whole class. Here is an example (note that "
" is an HTML line break and "
" is an XHTML line break):

However, note that it is better to avoid modifying an instance's members: to allow the instance for possible constraint validation, one should instead add to the class (and use while dealing with instances) "get_br" and "set_br" methods to get and set the value of the member while allowing the instance to perform tests and possibly reject the change.

Scope
The scope of an item of a class defines who is allowed either to call it (for methods) or to read / change its value (for properties).

Scope definition is compulsory for properties and facultative for methods where "public" is the default value if nothing is specified.

Public
Public items can be accessed anywhere.

Protected
Protected items defined in a class are accessible to the object that instantiates this class or a subclass of this class.

Private
Private items defined in a class are accessible to the object that instantiates the class.

Constants
They are declared with  (instead of   in procedural programming) and can optionally been followed by a default value:

They can be retrieved by reflexion with:

Properties
Even though declaring class properties as public makes their use easier, it is generally not recommended. Should you decide in future versions of the class to perform any kind of check on a public property, or store it in another additional property for caching purposes, you couldn't, since the rest of the code would still use the public property without any check.

Therefore, one should prefer (except in special cases) not allowing public access to properties, and provide simple "get_foo" and "set_foo" methods to return or overwrite them, leaving open the possibility of adding complexity if required.

They can be retrieved by reflexion with:

Methods
Since the methods provide the actual interface between an object and the rest of the world, it makes sense for almost all of your methods to be in public access.

More precisely, any method intended to be called from the outside should be public. However, methods only meant for internal use and that aren't part of the interface should not be public. A typical example being an object abstracting a connection with a database while providing a cache system. Different public methods should exist to allow interaction with the outside world, but, for example, a method sending a raw SQL request to the database should not be public, as any foreign code calling it would bypass the cache and potentially cause useless load or (worse) loss of data as the database's data may be outdated (if the latent changes have taken place in the cache).

They can be retrieved by reflexion with:

Practical use
The above example doesn't make the case for classes and objects. Why go to the bother of creating all that extra structure just to access functions?

Let's give an example that can show how this sort of thing would be useful:

Some things to note:

 * The statement echo $this->source .= $message ."&lt;br /&gt;"; first changes the value of the private property $source and then prints the changed value. The changed value is saved.
 * A different copy of the $source property exists within each instance of the Html class.
 * The printLn and show functions refer to the same copy of <tt>$source</tt> that was called for their object. (When I call <tt>$elvis</tt>'s <tt>printLn</tt> function, it changes <tt>$elvis</tt>'s <tt>$source</tt> variable and the statement <tt>$elvis->show;</tt> prints the changed value of <tt>$source</tt>).
 * Using standard variables and methods, there would be a greater risk of sending the wrong content to the wrong page. Which could be horribly confusing for my website visitors.

Now we can start to see how we could save some time and trouble using classes and objects. We can now easily manage two potential web pages at once, printing the correct content to each. When done, we can merely call a page's <tt>show</tt> function to send that page's html source to the output stream.

I could add more features to all of the objects just by adding variables and functions to the governing class, and I could add more objects at will just by declaring them. In fact, the more complicated my program gets, the easier everything is to manage using object-oriented programming.

title: PHP Programming/Classes


text:
Talk:GCSE Science/Transformers

'''i need to write a basic explanation about how a simple transformer works. Can anyone help me? thanks''' -ANON

 * Well I thought my explanation in the module was pretty ok.But put what you have in mind here on this talk page and I'll be happy to discuss it with you. Theresa knott 21:39, 14 Nov 2004 (UTC)

Wrong Equation
Seems to me the equations Ip/Is= Np/Ns or, rearranging: Is= Ip * Ns/Np are wrong.

Actually, Vp/Vs=Np/Ns and since Vp*Ip=Vs*Is <==> Vp/Vs=Is/Ip, Is/Ip=Np/Ns.

 * You are absolutely correct. I mistakenly was thinking of the equation for voltage instead of current.  Sorry for the mess up. — Brim 14:40, 8 Dec 2004 (UTC)

title: Talk:GCSE Science/Transformers


text:
Ruby Programming/Syntax/Literals

Numerics
123                      # Fixnum -123                     # Fixnum (signed) 1_123                    # Fixnum (underscore is ignored) -543                     # Negative Fixnum 123_456_789_123_456_789  # Bignum 123.45                   # Float 1.2e-3                   # Float 123.45r                  # Rational, introduced in ruby 2.1 0xaabb                   # (Hexadecimal) Fixnum 0377                     # (Octal) Fixnum -0b1010                  # (Binary [negated]) Fixnum 0b001_001                # (Binary) Fixnum ?a                       # ASCII character code for 'a' (97) ?\C-a                    # Control-a (1) ?\M-a                    # Meta-a (225) ?\M-\C-a                 # Meta-Control-a (129) Note: the meaning of "?x" notation has been changed. In ruby 1.9 this means not an ASCII numeric code but a string i.e. ?a == "a"

Strings
Examples: "this is a string" => "this is a string" "three plus three is #{3+3}" => "three plus three is 6" foobar = "blah" "the value of foobar is #{foobar}" => "the value of foobar is blah" 'the value of foobar is #{foobar}' => "the value of foobar is \#{foobar}"

A string expression begins and ends with a double or single-quote mark. Double-quoted string expressions are subject to backslash notation and interpolation. A single-quoted string expression isn't; except for \' and \\.

Backslash Notation
Also called escape characters or escape sequences, they are used to insert special characters in a string.

Example: "this is a\ntwo line string" "this string has \"quotes\" in it"

For characters with decimal values, you can do this:

or embed them thus:

Interpolation
Interpolation allows Ruby code to appear within a string. The result of evaluating that code is inserted into the string: "1 + 2 = #{1 + 2}"   # => "1 + 2 = 3"

#{ expression }

The expression can be just about any Ruby code. Ruby is pretty smart about handling string delimiters that appear in the code and it generally does what you want it to do. The code will have the same side effects as it would outside the string, including any errors:

"the meaning of life is #{1/0}" => divided by 0 (ZeroDivisionError)

The % Notation
There is also a Perl-inspired way to quote strings: by using % (percent character) and specifying a delimiting character, for example:

%{78% of statistics are "made up" on the spot} => "78% of statistics are \"made up\" on the spot"

Any single non-alpha-numeric character can be used as the delimiter, %[including these], %?or these?, %~or even these things~. By using this notation, the usual string delimiters " and ' can appear in the string unescaped, but of course the new delimiter you've chosen does need to be escaped. However, if you use %(parentheses), %[square brackets], %{curly brackets} or % as delimiters then those same delimiters can appear unescaped in the string as long as they are in balanced pairs:

%(string (syntax) is pretty flexible) => "string (syntax) is pretty flexible"

A modifier character can appear after the %, as in %q[], %Q[], %x[] - these determine how the string is interpolated and what type of object is produced:

Here are some more examples:

%Q{one\ntwo\n#{ 1 + 2 }} => "one\ntwo\n3" %q{one\ntwo\n#{ 1 + 2 }} => "one\\ntwo\\n#{ 1 + 2 }" %r/#{name}/i => /nemo/i %w{one two three} => ["one", "two", "three"] %i{one two three} # after Ruby 2.0 => [:one, :two, :three] %x{ruby --copyright} => "ruby - Copyright (C) 1993-2009 Yukihiro Matsumoto\n"

"Here document" notation
There is yet another way to make a string, known as a 'here document', where the delimiter itself can be any string:

string = <<END on the one ton temple bell a moon-moth, folded into sleep, sits still. END

The syntax begins with << and is followed immediately by the delimiter. To end the string, the delimiter appears alone on a line.

There is a slightly nicer way to write a here document which allows the ending delimiter to be indented by whitespace:

string = <<-FIN on the one-ton temple bell a moon-moth, folded into sleep sits still. --Taniguchi Buson, 18th century; translated by X. J. Kennedy FIN

To use non-alpha-numeric characters in the delimiter, it can be quoted:

string = <<-"." Orchid - breathing incense into butterfly's wings. --Matsuo Basho; translated by Lucien Stryk .

Here documents are interpolated, unless you use single quotes around the delimiter.

The rest of the line after the opening delimiter is not interpreted as part of the string, which means you can do this:

strings = [< ["a long string\n", "short", "strings"]

You can even "stack" multiple here documents:

string = [< ["the first thing\n", "the second thing\n", "and the third thing\n"]

And you can even apply methods:

s = < "ABC"

Command Expansion
You can execute shell commands and run any external programs, and get the output, with backticks-quoted strings. puts `dir` domain = 'ruby-lang.org' ip = `nslookup #{domain}` .match( /\d+\.\d+\.\d+\.\d+/ ).to_s # => 151.101.85.178 puts `curl https: //en.wikibooks.org/w/index.php?title=Ruby_Programming/Syntax/Literals ` .encode( 'utf-8' ) .match( %r( /chapter_\d+/i regex_two = %r(/chapter_\d+)i #=> /\/chapter_\d+/i

Arrays
An array is a collection of objects indexed by a non-negative integer. You can create an array object by writing, by writing an optional comma-separated list of values inside square brackets, or if the array will only contain string objects, a space-delimited string preceded by.

array_one  = Array.new array_two  = []                # shorthand for Array.new array_three = ["a", "b", "c"]  # array_three contains "a", "b" and "c" array_four = %w[a b c d e f g] # array_four also contains "a", "b" and "c"

array_three[0]               # => "a" array_three[2]               # => "c" array_four[0]                # => "a" array_four[-2]               # => "f" array_four[1,3]              # => ["b", "c", "d"] array_four[0..4]             # => ["a", "b", "c", "d", "e"] array_four[0...4]            # => ["a", "b", "c", "d"]
 * 1) negative indices are counted back from the end
 * 1) [start, count] indexing returns an array of count objects beginning at index start
 * 1) using ranges. The end position is included with two periods but not with three

The last method, using, is in essence shorthand for the   method   when the substrings are separated by whitespace only. In the following example, the first two ways of creating an array of strings are functionally identical while the last two create very different (though both valid) arrays.

array_one  = %w'apple orange pear'            # => ["apple", "orange", "pear"] array_two  = 'apple orange pear'.split        # => ["apple", "orange", "pear"] array_one  == array_two                       # => true

array_three = %w'dog:cat:bird'                # => ["dog:cat:bird"] array_four = 'dog:cat:bird'.split(':')        # => ["dog", "cat", "bird"] array_three == array_four                     # => false

Hashes
Hashes are basically the same as arrays, except that a hash not only contains values, but also keys pointing to those values. Each key can occur only once in a hash. A hash object is created by writing  or by writing an optional list of comma-separated pairs inside curly braces.

hash_one  = Hash.new hash_two  = {}                             # shorthand for Hash.new hash_three = {"a" => 1, "b" => 2, "c" => 3} #=> {"a"=>1, "b"=>2, "c"=>3}

Usually Symbols are used for Hash keys (allows for quicker access), so you will see hashes declared like this:

hash_sym  = { :a => 1, :b => 2, :c => 3}   #=> {:b=>2, :c=>3, :a=>1} hash_sym  = { a: 1, b: 2, c: 3}            #=> {:b=>2, :c=>3, :a=>1}

The latter form was introduced in Ruby 1.9.

Hash ordering
Note that with 1.8, iterating over hashes will iterate over the key value pairs in a "random" order. Beginning with 1.9, it will iterate over them in the order they were inserted. Note however, that if you reinsert a key without first deleting it, or change an existing key's value, the key's order in iteration does not change.

>> a = {:a => 1, :b => 2, :c => 3} => {:a=>1, :b=>2, :c=>3} >> a.keys # iterate over, show me the keys => [:a, :b, :c] >> a[:b] = 2 > a.keys => [:a, :b, :c] # same order >> a.delete(:b) >> a[:b] = 4 # re insert now => 4 >> a.keys => [:a, :c, :b] # different order

Ranges
A range represents a subset of all possible values of a type, to be more precise, all possible values between a start value and an end value.

This may be:
 * All integers between 0 and 5.
 * All numbers (including non-integers) between 0 and 1, excluding 1.
 * All characters between 't' and 'y'.

In Ruby, these ranges are expressed by: 0..5 0.0...1.0 't'..'y'

Therefore, ranges consist of a start value, an end value, and whether the end value is included or not (in this short syntax, using two . for including and three . for excluding).

A range represents a set of values, not a sequence. Therefore, 5..0

though syntactically correct, produces a range of length zero.

Ranges can only be formed from instances of the same class or subclasses of a common parent, which must be Comparable (implementing <=>).

Ranges are instances of the Range class, and have certain methods, for example, to determine whether a value is inside a range: r = 0..5 puts r === 4 # => true puts r === 7 # => false

For detailed information of all Range methods, consult the Range class reference.

Here is a tutorial on their use.

|

title: Ruby Programming/Syntax/Literals


text:
User:Brim

My Projects:
 * Radiation Oncology
 * ARRO list of key articles

Other stuff:
 * Stuff to add
 * Radiation information
 * Reading list
 * Navbar test
 * Template test
 * Template test2

Source of good articles:
 * Cancer treatment reviews, "High-quality evidence in oncology from __ to __", published monthly. Available on Sciencedirect.

Useful tools:
 * Strip %2F from Google search URLs: link
 * Mouse-over effect: Template:H:title
 * Special:RecentChangesLinked/Category:Radiation_Oncology

title: User:Brim


text:
User:Pedant

Please contact me on my user talk page at the English-language Wikipedia

title: User:Pedant


text:
PHP Programming/Special Methods

Constructors
A constructor is a special method inside a class that is called when the object is initiated. A constructor could be used as follows:

This is the PHP5 Version:

This is the equivalent PHP4.x Version: (Note that there are no public/private keywords, and the name of the class is the constructor)

In PHP5 a constructor must be declared as public or it will not work. The name of a constructor must always be __construct in PHP5.The name of the class must be used as a constructor in PHP5.

Destructors
Destructors delete an instance of an object. The destructor is declared within the object's class, and contains other code to be executed at the time of destruction:

Note that destructors only exist in PHP5.

Why Constructors and Destructors Are Great
Why are constructors and destructors useful? Sometimes objects represent complex entities that use other resources or have other side effects, even though they appear as simple variables in your program. In these cases, special setup may be required when you create the object; you can use the constructor to do that automatically for you. Also, it can be very important to free those resources at the end of your program so that they don't get tied up from multiple runs or pageviews; the destructor can automatically handle that so you don't forget.

Here's an example that makes handling MySQL databases slightly simpler:

The class "db_link" uses 3 functions: the constructor, which automatically logs into the database for me whenever I create a new "db_link" object, a "query" function, which I can use to get records from the database, and the destructor, which automatically closes the database whenever PhP is finished with my object instance. I could do the same things as the constructor and destructor by writing special "open" and "close" functions for the database, but then I would have to call those functions every time. This way, all I have to do is make objects and use them; they can open and close themselves automatically.

Serialization and Unserialization
In certain cases, it is necessary to store an instantiated(created) object as static text for storage between program runs, usually in a file or database field. This can be stored using serialization, which creates a string from an object that can then be unserialized into a working object, including working methods and properties.

An object can be serialized with:

$serialized_testobject is a string that can then be stored as text in a file or database column, assuming it does not exceed the size limit for the column. It can be unserialized with:

Note that the test class needs to be defined as it is not defined in the serialized string. Defining the class in a different way may cause problems when unserializing. The class must have the same name.

Certain objects, however, will need to perform tasks before and after serializing to ensure consistency between runs. For example, database links will need to be destroyed when serializing and recreated when unserializing, or they will be invalidated later. The object is prepared for serialization during the user-defined __sleep method, and is prepared for work after unserializing with __wakeup, as shown below.

Here, the link is closed when serializing, and reopened when unserializing as the link would probably not have the same network state if stored in a text file for a few hours. In complex classes, many properties and other data not highly dependent on time would be stored in the serialized string, while more volatile things like file handles and database links would be closed and reopened later. An exception does exist: Large amounts of data that can be quickly generated should be destroyed or at least compacted in __sleep so they do not take up space in the serialized file. For example, an array containing algorithmically-generated entries that is 2000 entries long should be regenerated.

title: PHP Programming/Special Methods


text:
User:Murray Langton

Nearing retirement now after 35 years of programming experience, mainly as a systems/scientific applications programmer. Fluent in some 17 programming languages (some now obsolete or for defunct computers). Degrees in Maths and Economics, currently studying part-time with UK Open University for a degree in Computing.

Married with three sons (shortest and youngest is 6'4" and still growing). Enjoy cycling, camping, walking, reading (science fiction/fantasy/crime/action).

Currently working on Compiler construction.

title: User:Murray Langton


text:
Wikijunior talk:Solar System/Jupiter

Sources used

Atlas of the universe ISBN 0 540 06087 9 -first two jubiter facts
 * Jupiter_(planet) -- General data
 * -- Weight data

Walabio, thanks for fixing the mistake about how many Earths could fit in the volume of Jupiter. I forget to divide the diameter of Jupiter by two to get the radius. But don't call honest mistakes vandalism like you did on the history page. --StarryTG 02:51, 17 Dec 2004 (UTC)

The discussion about weight being the same on Earth as it is on Jupiter is flawed. Weight and mass have clear and distinct definitions, Mass is the same on Earth and Jupiter, but weight is not. I haven't corrected this because the discussion was quiet deep and I think it is worth giving it the attention it deserves

 * I changed that section because a lot of the material got moved to its own article. Now the question asks how much force there would be due to gravity rather than using the word weight. --StarryTG 21:07, 4 Apr 2005 (UTC)

Jupiter facts
I removed the following: The first is better suited for the article itself. The size of the magnetic field is notable - and indeed a fact - but: How big is the sun? How far away is saturn? What is a magnetic field? A box such of this should have "faster" facts. The second isn't a fact. - 69.22.96.91 11:01, 18 Jun 2005 (UTC)
 * Jupiter's magnetic field is the largest single thing in the solar system. It is 26 million kilometers across, making it about 20 times bigger than the Sun. It has a tail that extends past Saturn's orbit. If it could be seen from Earth, it would appear to be five times the size of the full moon.
 * Because it is so much larger than the other planets, it had been said that the solar system consists of the sun, Jupiter, and other assorted debris.
 * helium turns into liquid because the planet is very hot ?

Images not ligning up
I just added an image to "what is it made of" and it's appearing in a different section. I know there is an tag  that clears the section if there is not enough text to fully wrap the image - something like but I can't remember it. Can anyone else clean up the bottom of this page? Theresa knott 13:28, 22 July 2005 (UTC)

 * Not to worry. I've sorted it. Theresa knott 13:32, 22 July 2005 (UTC)

Io, Europa, Ganymede and Callisto
They were loved by Zeus and not by Jupiter. Only for Callisto I've found Jupiter mentioned as well. Anyway, not only because this book is for kids there should be mentioned the same mythologic story that is mentioned in the articles of the moons themselves. Knightowld 20:48, 16 March 2006 (UTC)

 * I would agree that there is a huge confusion in terms of terminology, and the fact that the names for celestial objects were chosen by people much later than the people who made up these ledgends. If you think Jupiter vs. Zeus and these planets are confusing, try Uranus, where all of the moons are named after characters in Shakespearian plays.  Or even getting more whimsical with the names of asteroids like 2309 Mr. Spock or 9007 James Bond (I'm not making either of these names up, I promise!)  Mythology can only go so far for a kids book, but it does add some extra flavor.  It certainly shouldn't be taken too literally, nor with any sort of religious fervor, even if you accept the Greek gods as your source of devine inspiration.  --Rob Horning 03:29, 18 March 2006 (UTC)

Moons
Clearly, the caspian stars are important enough to merit their own subpages, but which of the other moons are?

Discovery/Exploration of Jupiter?
I believe that this article should include the discovery and maybe the exploration of Jupiter, as these are included in almost every other article on this Wikibook. Воображение

 * It looks to me as if there's no discovery section for objects that were known to the ancients.

 * I'm not finding exploration sections, off hand. Is this covered under discovery, for those pages that have that?  It seems this would be a significant change, which doesn't make it bad but does mean it would be good to plan it out carefully.  --Pi zero (discuss • contribs) 02:25, 17 June 2013 (UTC)

 * Lack of research on my part on ancient discoveries. However, exploration then should maybe be a replacement for the ancient discoveries. The page dedicated for exploration talks more about the space shuttles and the people/dogs rather than the actual observation of the celestial objects. I do not see much need for planning; just put it right between How much Jupiter's gravity would pull on me? and Who was it named after?. If you agree, I will do this after I see your approval. Воображение

title: Wikijunior talk:Solar System/Jupiter


text:
Surgical Procedures/Melanoma

Malignant melanoma is a neoplasm arising from the melanocytes in the epidermis. It is strongly associated with fair-skinned people with excessive sunlight exposure, particularly episodes of sunburn during childhood. It is commonest in areas with high sun exposure and a predominantly Caucasian population - eg. Australia, South Africa, the "Sunbelt" region of the United States.

Macroscopic appearance

 * 1) Superficial spreading melanoma
 * 2) Nodular melanoma
 * 3) Lentigo maligna melanoma
 * 4) Acral lentiginous melanoma
 * 5) Amelanotic melanoma

Staging
The AJCC / UICC TNM system is the current staging system. T stage is assessed on total thickness of the melanoma, and further categorised by the presence or absence of ulceration.

For full current details, the cancer.gov Physician's Data Query is recommended:

Treatment
A general strategy can be summarised as:
 * 1) Confirming the diagnosis
 * 2) Staging the disease
 * 3) Deciding on best stage-appropriate treatment according to current evidence, local resources and patient physiology

This is achieved by:

 * 1) Excisional biopsy with a close border
 * 2) Further staging, if justified by clinical findings or by thickness >= 1 mm
 * 3) Definitive excision and closure
 * 4) Consideration of (staging) sentinel lymph node biopsy or (therapeutic) lymphadenectomy
 * 5) Consideration of adjuvant therapies (interferon) or clinical trials
 * 6) Consideration of treatment of any metastatic disease.

This field of surgery is developing rapidly, with major trials recently published or in progress.

title: Surgical Procedures/Melanoma


text:
How to Learn a Language

Your best starting point is to have either a pressing need, or a powerful desire to master the language. This may seem obvious, but interest combined with passion brings the best results. If you're not really enthusiastic about learning the language, then you will end up stalling or quitting. Your sustained interest is decisive - which is why courses with a teacher often work better than teaching yourself, as the structured setting and company can carry you over the inevitable slumps. If the choice of language isn't made for you, pick a language that you can use or practice often in your daily routine, or create such opportunities for yourself. Join a speaking club where the enthusiasm is infectious, or spend some time with cultural things that motivate you. Rod Ellis in "The Study of Second Language Acquisition" (1994) states "SLA research ...views motivation as a key factor in L2 learning." If possible, find materials like books, magazines, websites, radio, TV or movies in the target language as a supplement to other education. Like-minded buddies (in real life or on chat-sites, for instance) are even better. The more exposure you have to the language in actual use - whether passive (listening/viewing) or active (conversation, reading) - the better.

Table of Contents

 * 1) /Introduction/
 * 2) /Vocabulary/
 * 3) /Speaking and understanding/
 * 4) /Pronunciation/
 * 5) /Reading and writing/
 * 6) /Polishing/
 * 7) /Notes for teachers/
 * 8) /See also/

Wie man eine Sprache lernt Een vreemde taal leren 如何習得語言

title: How to Learn a Language