text:
Guitar/Writing Songs

Now that you've got some skill and control over the guitar, you want to start writing and performing your own songs. But all your famous artists have such amazing, complicated songs, it's hard to know where to begin.

This page is a general guide to writing songs on the guitar. Although it won't necessarily teach you to write a Top 40 hit, it will give you some general ideas on how to write an effective song. If you haven't already, please read the Singing and Playing section.

General Tips

 * Keep it simple. The most popular, catchy tune on the radio is probably the simplest, most oft reproduced melody in the world. But that doesn't stop you from humming it all day, does it? Never forget that when some people hear "a complex, thought-provoking piece", others hear "an over complicated mess."
 * Have confidence. Your song may not be the best in the world, but a gutsy, less talented performer is always more admired than an amazing performer that is too shy to get a single note out.
 * Keep trying. If you don't "figure it out" immediately, that doesn't mean that you never will. If something sounds terrible, try the opposite, or only use the second half of whatever your work on. The key is to keep trying different things until something clicks.
 * Don't get frustrated. If absolutely nothing is clicking, then just come back to it later. Record whatever you have, take a break, and play it again later. The song isn't going anywhere you aren't going, and it'll still be there the next day.
 * "Borrow" someone else's melody. Often the best melody is the one that already exists. The history of music (and any art, really) is checkered with people taking bits and pieces from other artists and adding their own spin to it. However, this doesn't mean you should just copy some famous song and call it your own, because chances are someone else will notice. Other songs should be used as a source of ideas, not something you can photocopy.
 * Ask someone else. You might be stuck in the same rut, but that doesn't mean anyone else is. Ask another musician (or even a regular person) what they think might fit well. Sometimes the advice will be surprising. With this method you have to be careful of copyright issues, especially if you make it big.

Turning Chords into Songs
Often players come up with a catchy riff or two, and they're not sure how to develop it into more. Songs typically are built up in layers; for example, in a band, one guitarist creates a riff, and another adds a catchy lick over top, the bass player brings in something to support it and the drummer keeps time and adds some interesting rhythms. Even though the first guitar part might still be the same, it is ultimately the contribution of the other parts that turns a few chords into a song.

The most important thing to remember when writing a song is that very little sounds good completely on its own, and generally it requires at least more than one part to make things interesting. There are many ways to add a second part to a song. For instance, some players (especially those that can finger pick) can simultaneously play a bass line on the thicker strings and a melody on the thin strings. Really complicated riffs can also sound good on their own, however these tend to be difficult to write and you may not have enough technical skill for complicated writing.

Another player can also add depth to a riff. For example, a bass player can add another sound texture, and having two players allow them to bounce melodies off one another. The song Dueling Banjos from the movie Deliverance is a good example of how two players can create an interesting, purely instrumental song.

But if none of these options are available to you, or perhaps you only like to compose songs alone, there is always one other layer you can add to any progression; your voice. Amazing singing can turn even the simplest progression into a groundbreaking song

Creating Melodies and Hooks
The main melody, often called the "hook" in popular, radio friendly music, is the catchy, often repeated words and melody that makes the song most memorable. In most songs, especially modern music, the hook is contained somewhere in the chorus. However, this is not always true, as some songs use hooks in the verses, or put hooks in both the verse and chorus.

In general, it is much easier to put words to a melody, rather than a melody to some words. Words tend to have their own syncopation, and this can make it tough to make them fit with an irregular strumming pattern. Already having words is also tough because generally the author does not want to change them.

There are certain cases where putting music to words is a better option. For instance, a rhyming poem or free verse with a regular meter can easily be made a song. Simple chord progressions lend themselves well to these sorts, especially the I - IV - V and IV - V - I.

Often when you are creating a song, a chord progression comes easily, but it is tough to figure out what goes over top. Even if it seems difficult, there are many ways to make things easier for yourself.

 * Record a chord progression, then play it back and try to hum or whistle a melody over top. Often this is enough to get things started and get you unstuck. You can accomplish the same thing by just playing the progression over and over again, but it takes a surprising amount of coordination to play a new riff and spontaneously invent a melody.

 * Record a chord progression, and then try to solo on top of it. This is similar to the first method, but actually using the fretboard can help you figure out what notes work best.

 * Isolate a particular part of the progression and repeat it over and over until you come up with some sort of start. it is best to use at least two chord changes, because just strumming the same chord all the time is uninteresting, and it tends to make coming up with a melody even more difficult.

Another approach is to begin with a melody form, and then put chords behind it to turn it into a song. This may be more challenging, especially if you already have a chord progression you really enjoy, but sometimes approaching a problem from a different angle can make things easier overall.

For instance, in the well known 'Danny Boy' or 'Derry Air' as it is sometimes called, the 'hook' is found where the melody appears to try to surge forward into the chorus and the words "But come ye back" accompany that surge in chord progression.

Use a Method
It is recommended that you work following some simple procedures instead of just trying to come up with something remarkable from scratch. Here are some guidelines on how to work step by step in order to be more efficient.

 * Choose or come up with a scale for the song before you start working on it. Although experienced guitarists might be able to follow a scale subconsciously, thus skipping this step, it is better for beginners to use a scale so as to avoid inconsistencies and to set a mood for the piece. Keep experimenting with scales until you find one that suits the tone you want to give and then start working on the song. Note that you can change scales for different parts of the song, what you shouldn't do is change scale in the middle of a single riff or melody. Also keep in mind that when you are more confident with your guitar you can break away from the scale and use notes not included in it, but the best way to work is to play along the predefined scale and play an odd note only when you want to add a different tone. This usually results in a more original melody, but is hard and might result in sounding like random notes if not used properly.

 * Keep in mind the desired result. You won't get a very good result by simply coming up with random riffs. You must always focus on what you want to create. For example, you might want to create a complicated, original riff for the intro to attract the listener's attention or you might prefer a more melodic but less memorable intro. Either way, you must always have the goal in mind instead of composing aimlessly and keeping the riffs that sound good. This way you won't end up with a style you didn't intend to create.

 * Start simple. If, for example you want a complex riff you should start with a very simple melody and then modify it gradually, by expanding it, for example, or altering the rhythm, until you get the desired result. This will not always give better results, but it's easy for beginners.

Also see the Writing Effective Songs wikibook for more help.

title: Guitar/Writing Songs


text:
JavaScript

This book is a guide to JavaScript, a scripting language widely used in web pages and web applications such as email applications. JavaScript is not to be confused with Java, which is quite a separate language for creating stand-alone applications.

''This book applies to version 1.6 and later of JavaScript. Multiple versions of JavaScript are covered in this book.''

Welcome

 * /Introduction/ (/Relation to other languages/)
 * Hello World!
 * /Placing the code/
 * /Other Script Types/

Core Language

 * /Lexical structure/
 * Automatic semicolon insertion (ASI)
 * /Reserved words/
 * /Variables and types/
 * /Numbers/
 * /Strings/
 * /Dates/
 * /Arrays/
 * /Regular expressions/
 * /Operators/
 * Program flow I: if, switch, try
 * Program flow II: loops
 * /Functions/
 * /Anonymous functions/
 * /Object-based programming/
 * /Objects/
 * /Constructors and prototypes/
 * /Inheritance/
 * /Access control/
 * /Closures/
 * /Debugging/
 * /Optimization/
 * /Strict Mode/
 * /Shell/

Document Object Model and Dynamic Websites

 * /Runtime document manipulation/
 * /Finding elements/
 * /Adding elements/
 * /Changing elements/
 * /Removing elements/
 * /Changing element styles/
 * /Event handling/
 * /W3C event handlers/
 * /Working with the mouse/
 * /Forms/
 * /Images/
 * /Cookies/
 * /LocalStorage/
 * /Design Mode/
 * /Bookmarklets/

Client-Server Programming with AJAX

 * /XMLHttpRequest/
 * /Handling HTML/
 * /Handling JSON/
 * /Handling XML/
 * /Working with files/

Miscellaneous

 * /JScript in Microsoft WSH/

Appendices

 * /Index/
 * /Links/
 * /Bookmarklets/
 * /Useful software tools/
 * /History of JavaScript/
 * /Best practices/
 * /Code structuring/
 * /Generators/
 * /Contributors/

Related books

 * ActionScript Programming
 * Authoring Webpages
 * Cascading Style Sheets
 * Coding Cookbook: JavaScript
 * HyperText Markup Language
 * Programming Ajax
 * Web Development

Wikimedia

 * JavaScript in Wikipedia
 * Web Design/An Introduction to Programming with JavaScript

de:Websiteentwicklung: JavaScript Programación en JavaScript Programmation JavaScript JavaScript JavaScript JavaScript JavaScript JavaScript JavaScript Javascript Книга JavaScript யாவாக்கிறிட்டு JavaScript JavaScript

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

title: JavaScript


text:
Cookbook talk:Cuisine of Germany

Isn't the division into regions somewhat rudimentary? Wouldn't a chapter for each land make more sense? I see this would be the end of the Suabian chapter, so maybe there should be even more chapters according to regions.

 * That would be great. There are so much and big differences between the different regions, even between Suabian Meals and Bavarian Meals..

How can somebody insert the Austrian Cuisine into the chapter "Cuisine of Germany"? I will move this to Cuisine of Austria.

title: Cookbook talk:Cuisine of Germany


text:
Talk:Bicycles/Maintenance and Repair/Cleaning parts

There are also devices that you can use to clean your chain. I've not really had much help with these, as they just get the solution mucky, but chains stay dirty because of the dirty gears. I suggest sticking with a rag. - RealGrouchy 02:05, 21 Jun 2004 (UTC)

bicycle chains
To clean chains I take off the chain and let it sit overnight in a solvent (like gasoline).

Someone else left this comment without signing it. All I can say is yikes! Here's a brief item on why this is a really bad idea.--Dhodges 18:05, 20 January 2007 (UTC)


text:
JavaScript/First program

Here is a single JavaScript statement, which creates a pop-up dialog saying "Hello World!":

For the browser to execute the statement, it must be placed inside a HTML  element. This element describes which part of the HTML code contains executable code. It will be described in further detail later.

The  element should then be nested inside the   element of an HTML document. Assuming the page is viewed in a browser that has JavaScript enabled, the browser will execute (carry out) the statement as the page is loading.

This basic 'Hello World' program can then be used as a starting point for any new program that you need to create.

Exercises
1. Copy and paste the basic program into a file, and save it on your hard disk as 'exercise_1-1.html'. You can run it in different ways: What happens?
 * By going to the file with a file manager and opening it using a web browser.
 * By starting your browser and then opening the file from the menu.
 * By starting your browser and then specify the URL to 'exercise_1-1.html' with the file protocol. Please note that a) there are 3 slashes after 'file:' and b) replace 'temp' with the name of your directory.
 * Windows:  (it's Windows syntax, nevertheless use slash instead of backslash)
 * Linux:

2. Save the above file as 'exercise_1-2.html'. Replace the double quotes in the line  with single quotes, so it reads   and save the result. If you open this file in the browser, what happens?

JavaScript/Il nostro primo programma JavaScript/Składnia języka JavaScript/Hello World!

title: JavaScript/First program


text:
User:Lugworm

G'day, I'm from Newcastle, N.S.W. Australia. Male (an old one) and I will write more when I have decided what to say about myself.

title: User:Lugworm


text:
User:Markhurd

See my Wikipedia user page.

title: User:Markhurd


text:
Introduction to Psychology/Child and Adolescent Psychology/Childhood and History

Introduction
(translated from French) Talking about child psychologie or genetic psychology embrasses the same subject studied.

Il arrive que l'on parle indifféremment de psychologie de l'enfant (même si l'adolescence en fait parde) ou de psychologie génétique. Maù l'angle du point de vue n'est pas tout a fait le même: lorsque l'on parle de psychologie de l'enfant on souligne son objet d'étude qui est l'enfance; en parlant de psychologie génétique nous privilégions la genèse des fonctions chez l'enfant (intelligence, affectivité, développement psychomoteur, etc.), ce n'est nullement une référence à la génétique biologique.

Si la psychologie générale s'est progressivement détachée de la philosophie au cours du XVRle[?] siècle il ne s'agissait au début que de spéculations métaphysiques; il était encore moins question de l'enfant.

La psychologie s'est émancipée comme science au cours du x~xe[?] siècle par la méthode dite expérimentale, methode qui consiste a observer les réactions précises d'une fonction donnée (attention, mémoire, sens de l'observation pour ne citer que quelques exemples) d'un individu précis dans une situation dite standardisée, et a[accent grave] observer les variations de la fonction de l'individu en fonction d'une variation de la situation standardisée.

Cette naissance de la psychologie scientifique se faisait avec les adultes (nous évoquerons plus loin la place particulière de la psychologie de l'enfant dans l'histoire~ 1 de la psychologie et notamment des théses de Freud considérant que le I développement de l'enfant était dominé par la sexual~té infantile). Malgré les résistances rencontrées par la psychanalyse et le scandale qu'elles provoquèrent dans une époque puritaine (début du xx~ siècle), elles firent de nombreux adeptes.

En y regardant de plus près nous nous rendons compte que le concept de «l'enfance~ n'est pas propre à la psychologie. Une mulatude de sciences s'intéressent à l'enfance et à son évolution. Citons d'abord la médecine qui a apporté de nombreuses connaissances sur la croissance somahique (corporelle) et neurologique de l'enfant, sur les varinaions physiologiques de tel ou tel organe du

I corps au cours de la croissance. La psychologie de l'enfant étudie la na~ssance et le foncaonnement de la vie psychique de l'enfant sous son double aspect affecaf et intellectuel. Nous y reviendrons tout au long de ce avre. Mais d'autres disciplines ont commencé à s'intéresser à l'enfance dès le xïx' siècle; par exemple au milieu du x~x siècle le législateur a commencé d réglementer puis interdire le travail des enfants; I'enfant devenait un sujet de droit intéressant cette discipline. Puis des histonens ont établi que la nenon de « I'enfance » n'existait pas dans l'Antiquité et s'était lentement consatuée à travers les siècles depuis le Moyen Age. La sociologie, qui étudiait la transformanon de la famille avec l'arrivée de l'industrialisahon et la migrahon des campagnes vers les villes, s'intéressait aussi à la place de l'enfant dans cene fami11e changeante. Il y a l'ethnologie qui étudie, entre autres, les modes d'éducahon et la place de l'enfant dans d'autres sociétés que celle du mod21e occiden~.

Nous pouvons parfois relever une certaine cacophonie lorsque l'on parle de l'enfance et il convient de préciser de quel point de vue on la considére et avec quels ouals de

I que11e discipline on l'étud~e.

 * Ci-après nous donnerons quelques exemples (non exhausuifs) de «I'enfance~ comme sujet d'autres disàplines.

1- L'ENFANCE ET L'HISTOIRE

 * Les historiens se sont intéressés au concept del'enfance surtout depuis la publication d'un livre devenu célètre, L'Enfant et la Vie famitale sous

I I'Ancien Régime de Philippe Ariès; on notera aussi les travaux de Michelle Perrot sur la famille et la vie privée et d'Elisabeth Badinter sur l'amour

I maternel. Ariès étudie la représentation de l'enfant dans l'art à travers les

 * siècles et il a noté qu'avant les xe et xe siècles l'enfant était représenté comme un petit adulte c'est à dire reconnaissable uniquement par sa petite taille. Ce n'est qu'à partir du xe siècle que l'art (la peinture et la sculpture) accorde une morphologie propre à l'enfant représenté.

En partant de ce constat et en étudiant les modes de vie des populations (en France) à travers l'histoire, Ariès distingue deux périodes:

1 1'epériode:

• La société traditionnelle se représentait mal l'enfant et encore moins I'adolescent. La durée de l'enfance était réduite à sa période la plus fragile

quand l'enfant n'arrivait pas à se sufflre. L'enfant à peine débrouillé physiquement était mêlé aux adultes, partageant leurs travaux et leurs jeux. De trés petit enfant il devenait un homme jeune, sans passer par les étapes de la jeunesse devenues des aspects essentiels des sociétés évoluées d'aujourd'hui. La socialisation et la transmission des valeurs et savoirs n'étaient donc pas assurées par la famille, I'enfant s'éloignait vite de ses parents. L'éducation se faisait par l'apprentissage, grâce à la coexistence des enfants et des adultes. L'enfant tirait ses connaissances en aidant les adultes. Les échanges affectifs et les communications sociales avaient lieu en dehors de la famille, dans un milieu très dense et chaleureux composé de voisins, d'amis, de mâ~tres et serviteurs, d'enfants et de vieillards, de femmes et d'hommes.

2e période:

~ La 2e période commence à partir de la fin du xvlle siècle, lorsque progressivement l'école s'est substituée à l'apprentissage comme moyen d'éducation. L'enfant a cessé d'être mélangé aux adultes et d'apprendre la vie directement à leur contact. Il a été séparé des adultes et maintenu à l'écart (la scolarisation) avant d'être lâché dans le monde. Cette séparation des enfants et des adultes était due en très grande partie à la tentative de moralisation des hommes voulue par l'Eglise. Les parents s'intéressèrent aux études de leurs enfants et la famille devint ainsi un lieu d'affection. Pour Ariès le sentiment de famille est né avec la scolarisation intense de la jeunesse.

D'autres historiens ont affiné cette étude de l'enfance à travers les époques. Il semble donc maintenant assuré que la place accordée à l'enfant est variable suivant les sociétés et qu'elle s'est considérablement modiÉée à partir du xlxe siècle, sous l'effet du culte de la matemité. C'est à cette époque que l'enfant devient l'objet d'un attachement spécifique qui ne fera que cro^~tre avec les progrès de la médecine, puis la généralisation de la contraception dans les sociétés industrielles. Il semble aller de soi que plus le taux de mortalité diminue, plus la perte d'un enfant est douloureuse. De même, plus l'enfant est désiré consciemment, plus sa place est censée devenir importante dans l'affect parental. Cest dans ce contexte et dans la crise de la famille bourgeoise que sont nées la psychologie de l'enfant et la psychanalyse.


text:
JavaScript/Links

Featured weblinks:
 * JavaScript portal at developer.mozilla.org
 * JavaScript Reference at developer.mozilla.org
 * JavaScript Guide at developer.mozilla.org
 * Gecko DOM Reference at developer.mozilla.org

 * JavaScript Reference at msdn.microsoft.com

 * JavaScript
 * ECMAScript
 * JavaScript engine

 * Wikiversity: Topic:JavaScript
 * Advanced JavaScript

 * JavaScript Tutorial at w3schools.com
 * JavaScript Reference at w3schools.com
 * About: Focus on JavaScript from Stephen Chapman at javascript.about.com

 * ecmascript.org
 * ecma-international.org
 * http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

Discussion forums, bulletin boards:
 * HTML, CSS and JavaScript at coderanch.com
 * JavaScript Workshop forums at jsworkshop.com
 * Forum: Client-side technologies at webxpertz.net

More Web sites:
 * JavaScript tutorials at webreference.com
 * Videos from Douglas Crockford on JavaScript
 * JavaScript at epanorama.net
 * JavaScript Tutorials at pickatutorial.com
 * JavaScript Essentials at techotopia.com - An online JavaScript book designed to provide Web developers with everything they need to know to create rich, interactive and dynamic Web pages using JavaScript.
 * JavaScript Tutorials at yourhtmlsource.com
 * www.quirksmode.org - over 150 useful pages for CSS and Javascript tips & cross-browser compatibility matrices.
 * Wiki: I wanna Learn JavaScript at c2.com - A list of links to Web resources on JavaScript
 * Unobtrusive JavaScript at onlinetools.org - a guide on how to write JavaScript so that your site degrades gracefully (i.e., if the browser does not support or has turned off JavaScript, your site is still usable).

zh:编程:JavaScript:相关站点

title: JavaScript/Links


text:
Veterinary Medicine/Domestication

Rats
Rattus Norvegicus, the Norway rat, is also known as the Asian Brown Rat, the Brown Rat and the Barn Rat, and is the species of domesticated pet and laboratory rats as well as the common city "sewer" rat. These animals are not nocturnal but semi-nocturnal, or crepuscular, like cats. While they are "up and down" all the time, they are generally dozy during the day, becoming active at dusk. Their close relative, Rattus Rattus -- the Asian Black Rat, Ship Rat or Roof Rat -- is more truly nocturnal: nearly comatose during the day and has developed an automatic bite reflex if disturbed in the nest during sleep cycles.

title: Veterinary Medicine/Domestication


text:
Veterinary Medicine/Comparative Anatomy

Comparative Anatomy means to describe anatomy by comparing different species or individuals. Concerning the mammals, much of the anatomy is very similar. Despite totally different outer appearance of the legs, the muscles present there are roughly the same, each tagged by a name from human anatomy. The inner organs tend to be a lot more different. While all animals have a digestive aparatus in the form of a long pipe, only the ruminants (cattle, buffalo, sheep, goat) have four rooms (compartments) in the stomach, viz., rumen, reticulum, omasum and abomasum.

title: Veterinary Medicine/Comparative Anatomy


text:
PHP Programming/headers and footers

Create the header and footer files:

Create a file called "header.php" and enter the html code that you'd like at the top of each page as follows:

Create a file called "footer.php" and enter the html code that you'd like at the bottom of each page as follows:

Now we will create a web page that uses these headers and footers. Create a file called "page.php" and enter the following html code:

We set the title for the page using (1)

We then include the header page using (2)

And we include the footer page using (3)

The final page should look like this:

Files included in this way act as if their text was inserted into the main document right at the include call. PHP then continues to process the inserted file, allowing the inserted file to access all previously defined variables and functions (so $title in header.php was replaced with the value set in page.php: "Welcome"). This can have unintended consequences if a file is included more than once. To learn how to correctly include files containing functions and classes, see PHP Include Files.

title: PHP Programming/headers and footers


text:
Talk:Cryptography/Further reading

Cryptanalysis of Number Theoretic Ciphers Samuel S. Wagstaff, Jr. Chapman & Hall / CRC ISBN: 1584881534

Making, Breaking Codes: Introduction to Cryptography Paul Garrett Prentice Hall ISBN: 0130303690

title: Talk:Cryptography/Further reading


text: File:Bioeconomics fig3 1.png

title: File:Bioeconomics fig3 1.png


text:
Talk:Cryptography/Brute force attack

Also known as the rubber hose attack, this form of attack attempts to find keys and messages by investigating the users and sites at the endpoints of the message, the sender and/or receiver. While social engineering is commonly used, it is not unknown for 'brute force' to be applied to the end users as well.

title: Talk:Cryptography/Brute force attack


text:
User:VanishedUser 390318

Mostly inactive now. For general information, see my Wikipedia en user page.

Subpages

 * /Pages: a list of pages that I've significantly modified in some way
 * /Installing Fedora Core: a specialized Wikibook in the vein of Installing Linux
 * /Zope: a temporary location for Zope until VfD goes through now at Zope

title: User:VanishedUser 390318


text:
User talk:VanishedUser 390318

If your message is very important, consider notifying me on my Wikipedia en user talk page, since I'm currently inactive on Wikibooks.

title: User talk:VanishedUser 390318


text: Catalan/Vocabulari

title: Catalan/Vocabulari


text:
Nuclear Physics/Radioactivity

Radioactivity is the conversion of one nuclear state to another. It is accompanied by the emission of particles or electromagnetic radiation. The nuclear state change can often involve a change in the atomic number of the atoms involved. The most well known forms of radiation emiited are alpha particles (helium nuclei - two protons bound with two neutrons), beta particles (energetic electrons) and gamma radiation (very high energy electromagnetic radiation). Another form of radioactivity is fission in which a nucleus splits into two smaller components.

Natural Sources of Radiation
Most sources of natural, predictable radiation come from the decay of atomic nuclei, resulting in either alpha - $$\alpha$$ or beta - $$\beta$$ particles. In general, $$\alpha$$ decay is more common among the heavier elements, as it reduces the proton:neutron ratio, while $$\beta$$ decay is much more prominent among lighter elements, as it converts a neutron into a proton.

Two prominent examples of radioactive decay are:

$$\boldsymbol{\alpha}$$ decay:

$$ U^{238} \longrightarrow Th^{234} + He^{4}(\alpha) $$

This is the first decay in the famous Uranium decay. U-238 is essentially non-radioactive (especially compared to hyper-active U-235), and has a half-life of over four billion years.

$$\boldsymbol{\beta}$$ decay:

$$ C^{14} \longrightarrow N^{14} + e(\beta) $$

This is the decay that allows for carbon dating, and has a half-life of over 5000 years.

Gamma radiation is much more difficult to come by, as emitting a gamma ray does not allow an atomic nuclei to decay. The most famous source of high-energy gamma rays is what happens when an electron and a positron annihilate:

$$ e^{+} + e^{-} \longrightarrow \gamma + \gamma $$

Since positrons are relatively rare, this is an interaction that is relatively hard to find. However there are fairly reliable sources of $$\gamma$$ radiation, including Cesium-137 and Cobalt-60. Both are useful for a wide variety of technical purposes, as well as for their utility in cancer treatment.

title: Nuclear Physics/Radioactivity


text:
Compiler Construction/Lexical analysis

Lexical Analysis
Lexical analysis is the process of analyzing a stream of individual characters (normally arranged as lines), into a sequence of lexical tokens (tokenization. for instance of "words" and punctuation symbols that make up source code) to feed into the parser. Roughly the equivalent of splitting ordinary text written in a natural language (e.g. English) into a sequence of words and punctuation symbols. Lexical analysis is often done with tools such as lex, flex and jflex.

Strictly speaking, tokenization may be handled by the parser. The reason why we tend to bother with tokenising in practice is that it makes the parser simpler, and decouples it from the character encoding used for the source code.

For example given the input string: integer aardvark := 2, b;

A tokeniser might output the following tokens: keyword integer word aardvark assignment operator integer 2 comma word b semi_colon

What is a token
In computing, a token is a categorized block of text, usually consisting of indivisible characters known as lexemes. A lexical analyzer initially reads in lexemes and categorizes them according to function, giving them meaning. This assignment of meaning is known as tokenization. A token can look like anything: English, gibberish symbols, anything; it just needs to be a useful part of the structured text.

Consider the following table:

Tokens are frequently defined by regular expressions, which are understood by a lexical analyzer such as lex. The lexical analyzer reads in a stream of lexemes and categorizes them into tokens. This is called "tokenizing." If the lexer finds an invalid token, it will report an error.

Following tokenizing is parsing. From there, the interpreted data may be loaded into data structures, for general use, interpretation, or compiling.

Consider a text describing a calculation : "46 - number_of(cows);". The lexemes here might be: "46", "-", "number_of", "(", "cows", ")", and ";". The lexical analyzer will denote lexemes 4 and 6 as 'number' and - as character, and 'number_of ' as a separate token. Even the lexeme ';' in some languages (such as C) has some special meaning.

The whitespace lexemes are sometimes ignored later by the syntax analyzer. A token doesn't need to be valid, in order to be recognized as a token. "cows" may be nonsense to the language, "number_of" may be nonsense. But they are tokens nonetheless, in this example.

Finite State Automaton
We first study what is called a finite state automaton, or FSA for short. An FSA is usually used to do lexical analysis.

An FSA consists of states, starting state, accept state and transition table. The automaton reads an input symbol and moves the state accordingly. If the FSA reaches the accept state after the input string is read until its end, the string is said to be accepted or recognized. A set of recognized strings is said to be a language recognized by the FSA.

Suppose this language in which each string starts with 'ab' and ends with one or more 'c'. With state class, this can be written like this: State s0 = new State , s1 = new State , s2 = new State , s3 = new State ; s0.setTransition ('a', s1); s1.setTransition ('b', s2); s2.setTransition ('c', s3); s3.setTransition ('c', s3);

State r[] = s0.move (inputString); if (Arrays.asList (r).contains (s3)) System.out.println ("the input string is accepted."); else System.out.println ("the input string is not accepted.");

Suppose an input string "abccc". Then the automaton moves like: s0 -> s1 -> s2 -> s3 -> s3 -> s3.

Simple Hand-Written Scanning
In this section, we'll create a simple, object-oriented scanner / lexer for a simple language implemented in Object Pascal. Consider the following EBNF: program    ::= { instruction } instruction ::= "print" expr | "var" IDENTIFIER ":=" expr expr       ::= simple-expr [ ("<" | "<>" ) simple-expr ] simple-expr ::= factor { ( "+" | "-" ) factor } factor     ::= INTEGER | IDENTIFIER where INTEGER   = [0-9]+ IDENTIFIER = [A-Za-z_][A-Za-z0-9_]* From the above EBNF, The tokens we're about to recognize are: IDENTIFIER, INTEGER, keyword "print", keyword "var", :=, +, -, <, <>, EOF and unknown token. The chosen tokens are intended for both brevity and the ability to recognize all types of token's lexeme: exact single character (+, -, <, EOF and unknown), exact multiple character (print, var, := and <>), infinitely many (IDENTIFIER, INTEGER and unknown), overlapping prefix (< and <>) and overlapping as a whole (IDENTIFIER and keywords). Identifier and keywords here are case-insensitive. Note that some lexemes are classified to more than one type of lexeme.

The Token Class
The base class of a token is simply an object containing line and column number where it's declared. From this base class, tokens with exact lexeme (either single or multiple characters) could be implemented as direct descendants. Next, we need to create descendant for token with variadic lexeme: The only difference from the base token class is the lexeme property, since it possibly has infinitely many forms. From here, we create descendant classes for tokens whose lexeme is infinitely many: That's all for the token, on to the lexer.

The Lexer Class
A lexer consists of its position in the source code (line and column), the stream representing the source code, current (or last recognized / formed) token and last character read. To encapsulate the movement in the source code, reading character from the stream is implemented in GetChar method. Despite its maybe simple look, the implementation could be complicated as we'll see soon. GetChar is used by public method NextToken, whose job is to advance lexer movement by 1 token ahead. On to GetChar implementation: As stated earlier, GetChar's job is not as simple as its name. First, it has to read one character from the input stream and increment the lexer's column position. Then it has to check whether this character is one of the possible line endings (our lexer is capable of handling CR-, LF- and CRLF-style line ending). Next is the core of our lexer, NextToken: As you can see, the core is a (probably big) case statement. The other parts is quite self documenting and well commented. Last but not least, the constructor: It sets up the initial line and column position (guess why it's 1 for line but 0 for column :)), and also sets up the first token available so CurrentToken would be available after calling the constructor, no need to explicitly call NextToken after that.

Test Program
As an exercise, you could try extending the lexer with floating point numbers, strings, numbers with base other than 10, scientific notation, comments, etc.

Compiling Channel Constant
Lexical Analysis Tool

Scanning via a Tool - JavaCC
JavaCC is the standard Java compiler-compiler. Unlike the other tools presented in this chapter, JavaCC is a parser and a scanner (lexer) generator in one. JavaCC takes just one input file (called the grammar file), which is then used to create both classes for lexical analysis, as well as for the parser.

In JavaCC's terminology the scanner/lexical analyser is called the token manager. And in fact the generated class that contains the token manager is called ParserNameTokenManager. Of course, following the usual Java file name requirements, the class is stored in a file called ParserNameTokenManager.java. The ParserName part is taken from the input file. In addition, JavaCC creates a second class, called ParserNameConstants. That second class, as the name implies, contains definitions of constants, especially token constants. JavaCC also generates a boilerplate class called Token. That one is always the same, and contains the class used to represent tokens. One also gets a class called ParseError. This is an exception which is thrown if something went wrong.

It is possible to instruct JavaCC not to generate the ParserNameTokenManger, and instead provide your own, hand-written, token manager. Usually - this holds for all the tools presented in this chapter - a hand-written scanner/lexical analyser/token manager is much more efficient. So, if you figure out that your generated compiler gets too large, give the generated scanner/lexical analyzer/token manager a good look. Rolling your own token manager is also handy if you need to parse binary data and feed it to the parsing layer.

Since, however, this section is about using JavaCC to generate a token manager, and not about writing one by hand, this is not discussed any further here.

Defining Tokens in the JavaCC Grammar File
A JavaCC grammar file usually starts with code which is relevant for the parser, and not the scanner. For simple grammars files it looks similar to:

options { LOOKAHEAD=1; }

PARSER_BEGIN(ParserName) public class ParserName { // code to enter the parser goes here } PARSER_END(ParserName)

This is usually followed by the definitions for tokens. These definitions are the information we are interested in in this chapter. Four different kinds, indicated by four different keywords are understood by JavaCC when it comes to the definition of tokens:

 * TOKEN
 * Regular expressions which specify the tokens the token manager should be able to recognize.

 * SPECIAL_TOKEN
 * SPECIAL_TOKENs are similar to TOKENS. Only, that the parser ignores them. This is useful to e.g. specify comments, which are supposed to be understood, but have no significance to the parser.

 * SKIP
 * Tokens (input data) which is supposed to be completely ignored by the token manager. This is commonly used to ignore whitespace. A SKIP token still breaks up other tokens. E.g. if one skips white space, has a token "else" defined, and if the input is "el se", then the token is not matched.

 * MORE
 * This is used for an advanced technique, where a token is gradually built. MORE tokens are put in a buffer until the next TOKEN or SPECIAL_TOKEN matches. Then all data, the accumulated token in the buffer, as well as the last TOKEN or SPECIAL_TOKEN is returned.

 * One example, where the usage of MORE tokens is useful are constructs where one would like to match for some start string, arbitrary data, and some end string. Comments or string literals in many programming languages match this form. E.g. to match string literals, delimited by ", one would not return the first found " as a token. Instead, one would accumulate more tokens, until the closing " of the string literal is found. Then the complete literal would be returned. See Comment Example for an example where this is used to scan comments.

Each of the above mentioned keywords can be used as often as desired. This makes it possible to group the tokens, e.g. in a list for operators and another list for keywords. All sections of the same kind are merged as if just one section had been specified.

Every specification of a token consists of the token's symbolic name, and a regular expression. If the regular expression matches, the symbol is returned by the token manager.

Simple Example
Lets see an example:

// // Skip whitespace in input // if the input matches space, carriage return, new line or a tab, // it is just ignored // SKIP: { " " | "\r" | "\n" | "\t" }

// Define the tokens representing our operators // TOKEN: { < PLUS: "+" > | < MINUS: "-" > | < MUL:  "*" > | < DIV:  "/" > }

// // Define the tokens representing our keywords // TOKEN: { < IF:   "if" > | < THEN: "then" > | < ELSE: "else" > }

All the above token definitions use simple regular expressions, where just constants are matched. It is recommended to study the JavaCC documentation for the full set of possible regular expressions.

When the above file is run through JavaCC, a token manager is generated which understands the above declared tokens.

Comment Example
Eliminating (ignoring) comments in a programming language is a common task for a lexical analyzer. Of course, when JavaCC is used, this task is usually given to the token manager, by specifying special tokens.

Basically, a standard idiom for JavaCC has evolved on how to ignore comments. It combines tokens of kind SPECIAL_TOKEN and MORE with a lexical state. Lets assume we e.g. have a programming language where comments start with a --, and either end with another -- or the end of the line (this is the comment schema of ASN.1 and several other languages). Then a way to construct a scanner for this would be:

// // Start of comment. Don't return as token, instead // shift to special lexical state. // SPECIAL_TOKEN: { <"--"> : WithinComment }

// // While inside the comment lexicals state, look for end // of comment (either another '--' or EOL). Don't return // the (accumulated data). Instead switch back to normal // lexical state //  SPECIAL_TOKEN: {    <("--" | "\n" )> : DEFAULT }

// // While inside the comment state, accumulate all contents //  MORE: { <~[]> }

title: Compiler Construction/Lexical analysis


text:
Teaching Assistant in France Survival Guide/Living

Once you've found a place to live and filled enough paperwork to avoid being deported, you can relax a bit and enjoy your surroundings. You'll suffer through periodic intervals of démarches administratives, but remember that you only work 12 hours a week and have ample vacation time.

Responsibilities
Your teaching responsibilities will depend on your school level you work and where you work. (The assistantship program is not well standardized across the country or even across académies).

In any case, the work will almost certainly be better described as “teaching” than “assisting:” you will make lessons on your own, teach class on your own, and often discipline students on your own. This may come as a surprise, since everything about the assistantship program implies the opposite (the name, the salary…).

The first classes
You will have a week to two of "observation" before you actually begin teaching. Take advantage of this time to see how teachers interact with their students — it can be quite different than in the US. Attend as many classes as you can, especially with the teachers you'll be working with (but you could even attend ones in other subjects — it's interesting), and insist on observing before you jump into teaching. It helps a lot.

Your first few classes will probably be the most difficult to prepare for since you won't know what to expect. Fortunately, you can take advantage of your “new, interesting foreigner” status to entrance the students for at least the first few lessons without really teaching very much.

When you first appear in front of the class, introduce yourself in English with detail appropriate for the students’ English knowledge (name, age, home country, etc…). Before everyone's eyes glaze over completely, stop and ask “Qu'est-ce que vous avez compris?” Through comprehension and guesswork, they should eventually recite most of what you said.

Continuing your introduction, ask the students if they have any questions about your home country. They should have a lot of questions, more than you'll likely want to answer. When this becomes tedious, you can move on to a lesson about the anglophone countries of the world — the only required material is the classroom's world map — and before you know it your three quarters of an hour will be up.

One way or another, you’ll need a copy of the class roll to learn the students’ names. That is, unless you remember names like Anaïs the first time you hear them. Get a roll from the teacher or administration office, or make your own.

It's also a good idea to let the kids introduce themselves — it gets them to talk instead of talking about yourself. Give them a model, then when they tell you something, ask open ended (not yes or no) questions about it — what kind of movies do you like? Where do you play basketball? etc.

If you are teaching high school, expect the first few lessons to be more demanding. The kids will likely understand nearly everything you say in English, so you will need to have a lesson or an activity for every class.

One important piece of advice from the assistant from the UK to anyone going to a collège or lycée: Don't ever, ever speak French in class. Your aim is to get them speaking English, not French, and if you start by speaking French, they'll know you can, and won't bother making the effort to communicate in English. Your perfect English is going to be way better for them than slightly flawed French! It might be harder at first, but they'll get used to it. If they don't understand, repeat, rephrase until they do. Give them the benefit of assuming they CAN understand English, and that if they don't get something at first, they will after a bit of explanation - remember to be patient. Insist on an English-only classroom as one of your rules from the beginning, along with giving you as much respect as their normal teacher - tell them you'll exclude them and never teach them again if they disrespect you - usually works as they often see the classes with you as more fun than normal class! You do need to set down rules from the beginning - no good doing it three months when you're having a few problems getting them to speak or to behave!

A different opinion on speaking French in the classroom from a French and English teacher having a stint as an assistant: Sometimes it's just much easier, quicker and more effective to quickly translate into French. The students understand, feel comfortable and speak LOTS of English in my classes :) And the empty threat of "tell them you'll exclude them and never teach them again if they disrespect you" is just ridiculous. You have absolutely no say in who you teach. And most students wouldn't disrespect you anyway, so don't worry!

Lessons you can live with
Since you're only paid to work twelve hours a week, and you’re assigned twelve hours in front of students, you’ll probably be reluctant to do much class preparation work. But out of charity for your students and your own self esteem, you should probably devote some time to it.

You will feel better about your job if you teach your students something new with every lesson. Don't get too caught up the official vocabulary lists and séance guidelines. The best way for you, a native language speaker, to contribute is to pass on useful, popular vocabulary.

Work in language units (family, animals, food…) and come up with games. There are a lot of things you can do with a minimum of preparation, and a lot of things you can reuse. Just don't repeat the same exercises too much or you’ll bore the students into misbehaving.

You may also bore yourself. One thing that helps is to keep a detailed record of everything you do with every class in every session. This will help you make sure that you can repeat your lessons for all of your students. Depending on your school and teachers, you may have one group of kids twice a week or just once a month. You might have one student at a time; you might have 30.

It's not easy to teach English to French kids of any age. If you're not a natural teacher, you may get frustrated. Don't expect too much help from the teachers. Either they'll be eager to help you, or you'll just be a way for them to get an hour off. Remember that it's a part-time job, and that you're in France to learn French, travel and drink wine. Class time passes and, every couple of months, you get two weeks off.

Too little work?
You will discover that you have a lot of free time on your hands. This can be a good thing, but this can also be very depressing. Twelve hours a week is already very little, and many assistants never even work this much (especially in a lycée situation). This is because your classes depend on the teachers you work with, and if they don't work, you don't work. Whether there's a strike (which happens often), they're sick, they can't organize the lessons to fit you in because they're behind, the students have to have a test, it's the day right before or right after vacations... And then they forget to let you know you aren't needed so you go to work and voilà, no students.

You could travel with all your free time, but the €750 salary doesn't really permit much of that. Trains are expensive in France (check out the SNCF website for prices), though certainly not as expensive as in the UK. A Carte 12-25 will help cut costs too. Do whatever you can to find extra things to do. Do not depend on your assistant job as your life, because it's not much of a life. It's not an engaging job. If you're lucky and extremely outgoing, you'll make friends with teachers at your school. Some of the teachers will see you as a way to get some time off, others may possibly even see you as a nuisance. Some assistants have found that "French people aren't very friendly in general, and you're a foreigner who's only there temporarily - DON'T expect a warm welcome". Many other assistants, however, experience quite the opposite and you may be pleasantly surprised at the warm welcome you receive! Probably there will be other assistants around to hang out with. The feeling of having very little to do and having very few obligations can be a shock after the rigorous university life which typically precedes the assistant experience. However, it's worth bearing in mind that the assistantship is what you make of it. Depending on your school and the work you are expected to do, putting in a bit of extra effort during the week can be rewarding and fantastic CV fodder!

If you're in large town or a city, give private English lessons. This work will be fairly easy to obtain if you live in a sizable town or city and if you advertise yourself as soon as you arrive as "Anglais Langue Maternelle". Set yourself up from the beginning. Schedule as many students as possible, and don't worry if it seems like a lot, because every week a few of them will cancel for one reason or another. Look for places you can leave "petites annonces" - university billboards, the local newspaper, bookstores or even the laundromat. If your French needs work, say you want to do conversation exchanges. If there's a university, you'll have even better luck as students will call you for translations or to do their homework for them. Asking about €10 an hour is normal.

French business
You are probably used to handling much of your personal business over the phone. The idea of going to a local office to talk about a billing issue seems quaint. Why not just call the free customer service number, wait on hold for a few minutes, and settle things from the comfort of your living room?

This is not the way things are done in France. First of all, free numbers are rare. Most customer service numbers in France are toll numbers that cost much more than calling a standard number in France, or even calling the United States! With the discount phone company TELE2, calls to the U.S. cost 0.06 € a minute; calling the SNCF for information on the latest train strike will run you 0.34 € per minute.

Even if you are willing to pay the high price of the call, you will find you can't accomplish very much as the minutes are ticking away. You'll be working in a foreign language without the aid of gestures and aren't likely to get much empathy from your interlocutor.

The better alternative is to use services over the Internet or, if so equipped, over the Minitel.

If necessary, show up in person. If it's possible to make an appointment somewhere, make one. Otherwise, wait in line. That way you won't waste any money, and your chances of resolving the problem are better. As a teaching assistant with more free time than disposable income, it's the sensible choice.

Before launching into your problem, it is extremely important that the French person you are dealing with perceives you as polite. You should ALWAYS start the conversation with "bonjour" and a smile, which will cause them to overlook all your grammatical mistakes and then some! If you omit this, the French person will often tell you very coldly that there is nothing to be done. Again, thank them at the end of the interview whether they were able to help you or not. You may have to deal with them again. And don't say anything unkind in English--even if they don't speak English, a colleague might.

Travel
Language assistants have all of the vacations that students have. That means you have about a week off at the end of October, two weeks off at the end of December, a week off in February, and two weeks off in April. Don't go home unless you have to. Instead, take advantage of France's central location and travel as much as you can.

Trains
As mentioned elsewhere in this survival guide, the Carte 12-25 is essential for young assistants, saving you 25 – 50% on every trip. If you're over 25, you can still benefit from Prem's fares (which must be reserved on the Web from two weeks to two months in advance, with no possibility of changing or cancelling the ticket). Take a Prem's to Paris and then a night Prem's to Rome, for example.

For complicated SNCF reservations (excepting Prem's), find out if your town has a Boutique SNCF separate from the train station. There, you can sit down with a usually capable employee and work out a complicated itinerary of which the Web site is incapable.

Don't be afraid of night trains. Traveling in a sleeper car is an effective way to get somewhere far away without wasting too much time. Usually it costs a bit more to travel in a couchette (sometimes you can opt instead for a siège inclinable), but with a Prem's fare it's the same price. Furthermore, in many night trains, special compartments have been created for women travelling alone (compartiment pour femmes voyageant seules). When you travel overnight on some international trains (to Italy, for instance), the ticket controller will usually hang onto your ticket and your passport all night. This is nerve-wracking, but you can't do anything about it. Remember to put your belongings somewhere safe while you're sleeping.

It is possible to buy Eurail passes before you leave the USA (or for your parents or friends to buy them in the USA and send them to you). You can get a train pass good for 30 days with unlimited travel for much less than you would pay purchasing tickets on a case-by-case basis. Depending on whether your city has a TGV, it's possible to get away even for an afternoon. With a day off, and a TGV available, it's possible to go from anywhere in France to Paris, spend the day, and be back for tomorrow morning's class.

Depending on how close you are to another country, you might also benefit from that country's or that region's train service. If you're in the Southwest and want to go into Spanish Basque Country, look into Euskotren which extends all the way to the SNCF station at Hendaye. Within other countries there are whole train and bus networks, just as in France. In Spain, there is Renfe, Autores, and Alsa. Spanish trains aren't great, and the Spanish seem to get around mainly in buses, which are cheaper and faster.

In Italy, there's Trenitalia. The Italian version of their website is much more useful, and even if you don't speak Italian you can probably navigate it with your knowledge of French. Italian trains are cheap and frequent. They tend to move slowly and sometimes off-schedule, but their ticket machines make it seem easy to get anywhere. Prices of Italian trains depend on the distance you're traveling and what kind of train you are in. Look at a few different fares on the machine before you decide. Prices from Naples to Rome, for example, vary from 10 € to 30 €.

Resist the temptation to buy a Eurail pass. Unless you can determine that it will save you money, it probably won't. Furthermore, many Eurail pass-holders have to pay supplements on certain trains (like the TGV and night trains).

Don't forget to validate your train ticket when necessary. Most countries require it.

Planes
Apart from trains, you might be able to take advantage of cheap European airlines, like RyanAir, Easyjet, and Volare. Sometimes you have to fly through London, but if you're near another hub airport (such as in Nice or Lyon), you might not. Keep in mind that these airlines have extremely rigid luggage limits and arrival times. You might forfeit your ticket by arriving less than an hour in advance. Also keep in mind when using these discount airlines that the planes often land in small airports outside of the destination city named (planes heading for Brussels land in Charleroi, a town nearby.) Usually these airports don't have close connections to train stations, so you will probably have to buy a ticket for the shuttle bus the airlines provide in order to get into town.

Cars
Americans are allowed to rent cars in France, and sometimes this is the best option if you're traveling with three or four other people. Rates vary, and there is usually a surcharge for those under 25. 1088006266314& Expedia]

For driving directions, the best site is Mappy. On their site you can select directions for toll roads or free roads, and unlike Mapquest, they give you toll and gas costs. This is useful when making a budget.

On that note, you should know that there are two ways to drive around France. One is on the modern and expensive Autoroutes, the other is on the free, but slower, routes nationales. If you're not in a hurry, the free option is nice. But remember that your kilometers are probably limited in a rental car, and that free roads use more of them. Plan accordingly.

Make sure you don't surpass your kilometrage, because it gets expensive per kilometer once you're over. Also, make sure the gas tank is full when you return the car or you'll be charged la peau des fesses.

Lodging
Similarly, if you're traveling with a bunch of friends, consider renting an apartment for a long weekend in foreign city. Flatsbydays has great rates in Barcelona. That way, you can buy your food in a grocery store and not have to go out for every meal and cup of coffee. If you must stay in a hotel, shop around before reserving. Eurocheapo has good, cheap suggestions for numerous European capitals. You might also benefit from last-minute hotel sites, like Rates to Go. Even if you're staying in a hotel, you can drop by the local market and stock up on foods you don't have to cook, such as pastries, fresh fruit, and cured meats, and save yourself quite a bit of money.

Most European cities have an abundance of pension hotels, which are in between a hotel and a hostel. You have your own room but share a bathroom with other people. Many of these establishments do not take reservations. They ask you to just show up in the morning and see what's available. This may seem totally illogical, but if you get to a city in the morning you're sure to find something quickly.

If you're driving a long distance and need to stay somewhere on the road, look into Formule1 hotels. Rooms are in between 20€ and 30€ per night for up to three people (but the entire system is automated, so no one will notice if you walk in with four or even eight people).

Another good option, whether for short or longer stays, is a youth hostel. You don't even have to be young. Merely buy a hostel card (either at the hostel or even before you leave the USA). They are sparse (you'll usually have to share a room with up to 20 other people), but they include breakfast and the best have lockers and safes for valuables. Some hostels have more private rooms, and if they're not full, it's easy to get one of these. Be warned, you will have to share a bathroom, and the hostels are notorious for particularly virulent strains of athlete's foot, so wear flip-flops in the shower! Some hostels will take reservations; if you arrive without a reservation and they are full, most will call around to the next hostel down the road. Most hostels close between 9 am and 3 pm, so make sure you take what you need with you for the day if you're planning to stay longer than one night.

The rumors about thieves are true. Be unreasonably cautious with your belongings at all times, especially on trains and at beaches. Don't fall asleep in a public place, and don't carry anything important in your back pocket.

Renting an apartment
Some owners who rent directly also offer help with various administrative procedures for your move in: EDF, telephone, internet, bank, rental insurance, CAF….


text:
Electronics/Amplifiers

Circuit Models for Amplifiers
Amplifier is a electronic device that increases the voltage, current or power of a signal. And amplifier used to wireless communication system and broadcasting and audio equipment of all kinds.

Amplifier are generally put in four categories These models apply irrespective of the complexity of the internal circuit of the amplifier. The values of the model parameters can be found either by analyzing the amplifier circuit or by performing measurements at the amplifier teminals.
 * 1) voltage amplifier,
 * 2) current amplifier,
 * 3) transresistance amplifier and
 * 4) transconductance amplifier.

The model for a voltage amplifier is shown in figure 1. Real amplifiers have input and output resistance. This is reflected in the model.

 * Figure 1: A Voltage Amplifier.

Gain
Gain is the increase in the strength of a signal and is often expressed in decibels (dB). An increase of 3 dB is about equal to doubling in a linear scale. A gain of more than 1 is called amplification, while a gain of less than 1 is called Attenuation.

Gain is given different symbols depending of the type. For No load gains
 * Voltage gain is Avo,
 * Current gain Aio,
 * Transconductance Gm
 * Transresistance Rm.

Using the model, the gain with a load can be calculated.

Common Emitter

QUALITATIVE CHARACTERISTICS
 * Current Gain: ..... HIGH
 * Voltage Gain: ..... HIGH
 * Power Gain:  ..... HIGH
 * Input Impedance: ... AVERAGE
 * Output Impedance:... AVERAGE

QUANTITATIVE CHARACTERISTICS Input Resistance(base): Zb=β×re' -> β: Current Gain (Ic/Ib), where 'Ic' is Colector DC current and 'Ib' is DC Base current; -> re': Base-Emitter dynamic resistor (Ut/Ie), where Ut is thermal voltage(≈25mV at 25°C) and 'Ie' is DC emitter current; Input Resistance(general): Zg= Zb || R1 || R2, where R1 and R2 are the same as the picture above.

Common Collector

QUALITATIVE CHARACTERISTICS Current Gain: ..... HIGH Voltage Gain: ..... ≈1 Power Gain:  ..... LOW Input Resistance: ... HIGH Output Resistance:... LOW

Common Base

QUALITATIVE CHARACTERISTICS Current Gain: ..... ≈1 Voltage Gain: ..... HIGH Power Gain:  ..... AVERAGE Input Resistance: ... LOW Output Resistance:... HIGH

FET Configurations
As with BJT configurations, there are three FET configurations, each one corresponding to one of the terminals of the transistor.

Biased Voltage Class
Transistors may be biased in a variety of classes. A trade off of linearity and power consumption is usually made where a Class A

Class A
The transistor is "on" all the time. We say 360 degrees of conduction, representing an entire period of the sine waveform. Ideally, this class produces very little distortion, however consumes a lot of power and is also least preferred.

This is the most linear of the classes, meaning the output signal is a truer representation of what was imputed. Here are the characteristics of the class: 1. The output device (transistor) conducts electricity for the entire cycle of input signal. In other words, they reproduce the entire waveform in its entirety. 2. These amps run hot, as the transistors in the power amp are on and running at full power all the time. 3. There is no condition where the transistor(s) is/are turned off. That doesn't mean that the amplifier is never or can never be turned off; it means the transistors doing the work inside the amplifier have a constant flow of electricity through them. This constant signal is called "bias". 4. Class A is the most inefficient of all power amplifier designs, averaging only around 20%.

Because of the way they are usually designed, Class A amplifiers are very inefficient. They do not need to be built in this way, but for every watt of output power, they can typically waste 4-5 watts as heat. They are usually very large, heavy and because of the 4-5 watts of heat energy released per watt of output, they run very hot, needing lots of ventilation (not at all ideal for a car, and rarely acceptable in a home). This is not due to the amplifier type, but the fact that even many design engineers do not fully understand how they work and often copy their designs from previous ones. The upside is that these amps are the most enjoyed of all amplifiers. When properly designed, the Class A amp gives the best representation of musical detail, with no clipping of the waveform. As a result the sound is cleaner and more linear; that is, it contains much lower levels of distortion.

They are the most accurate of all amps available, but at greater cost to manufacture, calling for tight tolerances and additional components for cooling and heat regulation.

Class AB
The transistor is "on" for slightly more than half the cycle (>180 degrees) of a sine wave and is the most common configuration used in push-pull audio power amplifiers. In push-pull amplifiers, Class AB produces mostly odd order distortion, however it is far more power efficient than Class A. Odd order distortion is not considered pleasing to hear in audio power amplifiers. This distortion can easily be removed with the addition of a simple negative feedback loop into the system as shown by the diagram below:

This type of amplifier is extremely easy to build and is the industry standard for audio amplifiers.

Issues with this type of amplifier include poor efficiency, size and cost. A typical class ab amplifier will have a power efficiency of 40-80%. Because of this they require large heat sinks to cool the transistors, this also increases the cost of the amplifier due to the extra material to create these heat sinks.

This is the compromise of the bunch. Class AB operation has some of the best advantages of both Class A and Class B built-in. Its main benefits are sound quality comparable to that of Class A and efficiency similar to that of Class B. Most modern amp designs employ this topology.

Its main characteristics are: In fact, many Class AB amps operate in Class A at lower output levels, again giving the best of both worlds The output bias is set so that current flows in a specific output device for more than a half the signal cycle but less than the entire cycle. There is enough current flowing through each device to keep it operating so they respond instantly to input voltage demands. In the push-pull output stage, there is some overlap as each output device assists the other during the short transition, or crossover period from the positive to the negative half of the signal.

There are many implementations of the Class AB design. A benefit is that the inherent non-linearity of Class B designs is almost totally eliminated, while avoiding the heat-generating and wasteful inefficiencies of the Class A design. And as stated before, at some output levels, Class AB amps operate in Class A. It is this combination of good efficiency (around 50) with excellent linearity that makes class AB the most popular audio amplifier design.

There are quite a few excellent Class AB amps available. This is the design I recommended for most general-use applications in home and car. Usually, parts choice rivals that of Class A amps, and dollar for dollar these are some of the best values in stereo amplification. There can be some variation in design principle, but generally these are well-designed amps since their function is very well-understood by audio designers.

Class B
The transistor is "on" for only half the cycle (exactly 180 degrees) of a sine wave and is also very typically used in push-pull amplifier circuits. Ideally this class produces mostly odd order distortion. In audio applications it is believed that odd order distortion is not pleasing to hear. It is difficult to build a low distortion Class B amplifier and hence Class AB is almost universal.

In this amp, the positive and negative halves of the signal are dealt with by different parts of the circuit. The output devices continually switch on and off. Class B operation has the following characteristics: The input signal has to be a lot larger in order to drive the transistor appropriately. This is almost the opposite of Class A operation There have to be at least two output devices with this type of amp. This output stage employs two output devices so that each side amplifies each half of the waveform. [li Either both output devices are never allowed to be on at the same time, or the bias (remember, that trickle of electricity?) for each device is set so that current flow in one output device is zero when not presented with an input signal. Each output device is on for exactly one half of a complete signal cycle.

These amps run cooler than Class A amps, but the sound quality is not as pure, as there is a lot of "crossover" distortion, as one output device turns off and the other turns on over each signal cycle.

This type of amplifier design, or topology, gives us the term "push-pull," as this describes the tandem of output devices that deliver the audio signal to your speakers: one device pushes the signal, the other pulls the signal. They can be less expensive, because one can use two cheap output devices instead of one high-quality one in the design.

As I mentioned before, the input signal has to be lot larger, meaning that from the amplifier input, it needs to be "stepped up" in a gain stage, so that the signal will allow the output transistors to operate more efficiently within their designed specifications. This means more circuitry in the path of your signal, degrading sound even before it gets to the output stage

Class C
The transistor is "on" less than half the cycle of a sine wave. We say <180 of conduction. This class produces both even and odd order distortion, however is very efficient.

Class D
The class D amp has been developed after the short-comings of past generations, including classes A, B, AB, and C. Many people mistake the D as standing for digital. Although it is a “switching” amp, meaning it turns “on” and “off” at a specific frequency, it is a wrong assumption. D was simply the next letter in the alphabet. Consuming the least power out of its previous generations, the class D amps are generally smaller, making them ideal for mobile devices. It is because of their power efficiency, small size, and cheaper costs that the class D amps are quickly becoming the new industry standard for audio electronic. Companies such as Advanced Analog, Texas Instruments as well as other companies have released 50W stereo class d amplifiers that are the size of a penny and did not require any sort of heat sinking, something that was not possible with other types of amplifiers.

The basic design includes two MOSFET transistors in series, one pFET and one nFET being driven by a pulse width modulated (PWM) signal. Because of the properties of MOSFET transistors they are either fully on or fully off. When the transistor is off and the current is zero (so the amount of power wasted heating up the transistor is zero), or the transistor is fully on and the voltage across it is very close to zero (so the amount of power wasted heating up the transistor is again, very close to zero).

Because an analog signal needs to be transformed into a PWM signal a certain amount of distortion can occur, but the amount of distortion can be minimized. Because a PWM signal is very much like a digital signal, the sampling theorem states that if the sampling frequency is more than half the maximum frequency of the source it can be reproduced exactly. For audio signals the maximum frequency heard by humans is roughly 20kHz, so a PWM generator would only need to provide a minimum switching frequency of 40kHz. Because of the availability of faster components many class d amplifier designers will use switching frequencies closer to 400kHz to further reduce the distortion.

Issues of concern with a class d amplifier include electromagnetic emissions. Due to the presence of a medium frequency signal in the circuit, steps must be taken to reduce the emission of these signals that could interfere with other electronic devices.

Class E
(oops, class D again?) Switching amplifier These amplifiers are erroneously called "digital" amplifiers by the press and many audio "experts." Here's the skinny on Class D: While some Class D amps do run in true digital mode, using coherent binary data, most do not. They are better termed "switching" amplifiers, because here the output devices are rapidly switched on and off at least twice for each cycle. Depending on their switching frequency, they may be "switched on" or "off" millions of times a second. Class D operation is theoretically 100% efficient, but in practice, they are closer to 80-90% efficiency. This efficiency gain is at the cost of high-fidelity.

Think of Class D amps as being similar to a switchable power supply, but with audio signals controlling, or modulating, the switching action. To do this, you use a technology called Pulse Width Modulation (or PWM, a technology found in many CD players).

According to experts, audio signals can be used to modulate a PWM system to create a high power audio amplifier at fairly low voltages using very small components. Class D audio uses a fixed, high frequency signal having pulses that vary in width based on input signal amplitude. So, for example, a deep bass note creates a large pulse in the carrier signal. This can be translated into a musical signal by the on/off nature of the output devices.

Class D amplifiers are generally used for non-high-fidelity, or subwoofer applications.

There is a fifth (and, nominally, a sixth) class of amplifier, but they are rarely seen in practice in the consumer market. One is the Class G and the other Class H. These are similar in design to Class AB topologies, but both feature two power supplies that switch on or off, depending on the musical signal imputed. Using two power supplies improves efficiency enough to allow significantly more power for a given size and weight. Class G is becoming common for pro audio designs. Class H amps are designed to use the same topology as Class G, but it provides just enough voltage for optimum operation of the output devices. Again, its an attempt to increase efficiency, but at the expense of fidelity ultimately.

title: Electronics/Amplifiers


text:
User:KelvSYC/monobook.css

/* Namespace selector reference: .ns-2 - User .ns-3 - User talk

textarea { font-size: 9px; }

a { text-decoration: underline; color: #0000FF !important; }

/* CSS2.1 uses one colon for pseudo-classes, while the proposed namespace-aware CSS3 uses two (to distinguish it from an element inside another namespace). So that it is both backwards and forwards compatible, I have both here. */ a::visited { color: #7F007F !important; } a::active { color: #FF0000 !important; } a:visited { color: #7F007F !important; } a:active { color: #FF0000 !important; }

a.new { color: #FF0000 !important; } a.interwiki, a.external { color: #3366BB !important; } a.stub { color: #772233 !important; }

list-style-image: none; line-height: normal !important; }
 * 1) bodyContent ul > li, #p-nav ul > li, #p-tb ul > li, #p-lang ul > li {

position:fixed; z-index:3; width:120px; }
 * 1) p-tb, #p-nav, #p-lang, #p-personal, #p-logo {

width: 100%; position:absolute; left: 0; top: 0; z-index: 0; background:none; }
 * 1) p-search {
 * 1) p-search h5 { display: none; }
 * 2) p-search .pBody { background: none; text-align:right; border: none; }

 * 1) p-cactions { font-size: 100%; left: 125px; }
 * 2) p-cactions ul { margin: 0; }

 * 1) p-cactions li.selected { font-weight: bold; }
 * 2) p-cactions li a { text-transform: none; }
 * 3) p-cactions li { padding: 1px; }

/* hack until bug is fixed */
 * 1) p-cactions li.new a { color: #FF0000 !important; }

 * 1) p-personal { top: 155px; }
 * 2) p-nav { top: 235px; }
 * 3) p-tb { top: 340px; }

.ns-2 #p-lang { top: 430px; } .ns-2 #p-lang .pBody { max-height: 165px; overflow: auto; }

 * 1) p-lang { top: 410px; }
 * 2) p-lang .pBody { max-height: 185px; overflow: auto; }

margin: 0; background: White; border: 1px solid #aaaaaa; padding: 0 0.8em 0.3em 0.5em; }
 * 1) p-personal .pBody {

list-style-type: square; margin: 0.3em 0 0 1.5em; padding:0; text-align:left; text-transform: none; }
 * 1) p-personal ul {

display: list-item; padding:0; margin: 0 0 0 0; color:#000000; }
 * 1) p-personal li {

text-decoration:underline !important; }
 * 1) p-personal a {

li#pt-userpage { background: none }

margin: 0em 0em 1em 125px; }
 * 1) content { margin: 2.9em 0em 1em 125px; }
 * 2) footer {

 * 1) globalWrapper { font-size:100%; }

h1, h2, h3, h4, h5, h6 { font-family: "Bitstream Vera Sans", "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; }

line-height:normal !important; }
 * 1) bodyContent * {

body { font: x-small "Bitstream Vera Sans", Verdana, "Lucida Grande", Lucida, Helvetica, Arial, sans-serif; background-attachment: fixed; }

title: User:KelvSYC/monobook.css


text:
BASIC Programming/Beginning BASIC/Your First Program

Introduction
Many texts written about programming languages show you a sample program at the beginning of the lesson to help get your feet wet. That is, to become familiar with the syntax and layout of that language. This book is no exception. This sample program will display the text "Hello, world!" to your screen.

Program Examples
Example One (FreeBASIC)

.

Explanation

 * 1) CLS stands for 'Clear Screen' and erases everything in the Command Prompt.
 * 2) PRINT displays everything in between the quotations.
 * 3) INPUT gives input and tell what to do.
 * 4) END marks the end of the program (explained later in functions.)


text:
BASIC Programming/Beginning BASIC/PRINT, CLS, and END

BASIC Programming > Beginning BASIC > Your First Program

Introduction
In the previous code example, we wrote your first BASIC program. In it, you saw examples of PRINT, CLS, and END commands. Their roles in the program may or may not have been apparent at the time, but, as they're so vital to the BASIC language, they will be discussed here.

Output
(CLS) Hello, world!" I'm making the sample program clear and understandable." This text is being printed via the PRINT command." On the next line, I'll use CLS, which will clear everything I just printed, so you won't even see the preceding text." Also, you can't give CLS a line to PRINT; it won't actually do anything" (CLS) Finally, on line 80, I'll use END, which will keep me from reaching line 90." (END) -Program end-

Discussion
From that example, it's fairly easy to deduce what each command does.

 * CLS
 * An abbreviation that stands for the words CLear Screen. In the above program, when you used CLS on line 60, all of the words that were printed to the screen were wiped away.

 * PRINT
 * Writes to the screen. There are commands for printing to other things, like a printer, but that's to be discussed later. Each new PRINT command will start printing on a new line. To insert a blank line, don't specify a string to print. The syntax for "PRINT" is: PRINT "[whatever you want to be printed here]"

 * END
 * It stops the program at that line; that is, anything that's added after that won't show. That's why the PRINT command on line 90 didn't print anything. The END command can be included in control structures to end the program if a condition is met. This will be discussed with control structures.

What is happening?
 * 1) Line 10 the display is cleared.
 * 2) Lines 20 through 50 print text to the screen.
 * 3) Line 60 clears the display.
 * 4) Line 70 shows the message you should see after you run this program.
 * 5) Line 80 ends the program.
 * 6) Line 90 shows that an END statement stops the program. No instruction following an END statement is executed.

Given the state of computer speed today you should not see the paragraph displayed by lines 20 through 50, it should be cleared by the CLS statement on Line 60 before you have a chance to see it. If you slow the program down you can see the program write the message to the screen. Line 70 is then written to the screen/display then Line 80 stops everything. Line 90 never, ever runs.


text:
Homeopathy

Contents

 * 1) Introduction
 * 2) What is Homeopathy?
 * 3) History
 * 4) Materia Medica
 * 5) Contributors

title: Homeopathy


text:
Homeopathy/Contributors

Authors of this book

 * Suhair Hassan E : Started this book

title: Homeopathy/Contributors


text:
User talk:152.163.252.104

This is member H Padleckas. I thought I was logged in when I made this edit. H Padleckas 09:00, 22 Jun 2004 (UTC)

title: User talk:152.163.252.104


text:
Civ/Sid Meier's Alpha Centauri/Strategy

Base Management
In order to give you the edge over either less experienced players or the AI, there are a variety of "tricks" and "tips" that you should remember and apply in order to squeeze every ounce of productivity that's possible to get out of your bases. Remember to regularly scroll through all of your bases using the left/right keys on the base menu, or using the F4 button to bring up a quick rough report of all your bases.

Maximizing base grid output
You should regularly check your bases to make sure that they are working from the squares that will reap the most benefit. For example, initially your base works off normal grids w/o terraform enhancements which at most reaps 1F/1M. If a scout discovers a monolith within vicinity, you should switch production to that monolith as this is not automatically done.

Sometimes, the obvious way towards maximum output might not seem so obvious- should you work a farm grid which gives you alot of food and therefore growth, or should you work the forest grid with average production?

Here are some rules of thumb:

 * Never assign people to work rocky tiles with mines. These typically give 4 minerals and nothing else. If you have Industrial Automaton, you have Supply Crawlers, and you should use crawlers to work mine squares instead. If not, then get Industrial Automation! Crawlers are ideal for extracting squares that are particularly good for a particular resource but no good at others.
 * If in doubt, plant forests. Forests will always give you a good overall production, and should you need more food for growth, you can always find a moist square to build farms.
 * Planting forests in advance is especially good in preparation for Tree Farms and Hybrid Forests. Forest squares also have a subtle effect of negating ecological damage and grant defensive bonuses.
 * If you've run out of productive squares, start turning citizens into specialists. Specialists include the doctor/librarian/technician at first, and the options increase with the discovery of more technologies. In general, a square is not productive if there isn't a mix of high mineral and energy output from that particular square. Food is largely irrelevant by the mid-game/late-game as you start getting Tree Farms.
 * After the early game, try having at least one borehole near each base, and more if your planet rating allows it (or you are able to build Centauri Preserves or Temples of Planet). Boreholes give absolutely immense benefits if you have the techs that lift mineral/energy restrictions. They should be kept in base squares and worked by citizens (rather than Supply Crawlers) since they are productive for both mineral and energy.
 * Use the Drill Aquifer command with your Formers to make rivers. This is a little-known but incredibly useful terraforming option: it acts as both a road and gives a +1 energy bonus. Do this on farm, or more usually, forest squares. Overcome the limitation of no adjacent rivers by getting formers to simultaneously drill on adjacent squares.

Base Production
Now that you are getting as much production from your base squares and crawlers as you can manage, you should try to channel this production effectively.

Some basics you should know:

 * When hurrying production, make sure the first row of minerals in the construction box is filled. Otherwise you are charged at double the cost for rushing construction from scratch.
 * The hurrying costs for the 3 types of constructions are:
 * 2 per mineral for base facilities, after the first row
 * 3 per mineral for units, after the first row
 * 4 per mineral for Secret projects, after the first row
 * If you are hurrying construction with credits, make sure that you pay only just enough so that none of your mineral production is wasted.

For micromanagers: whenever a base finishes a construction, some of the minerals produced that turn is carried over to the next item in the queue. However, the maximum amount that can be carried over is 11 minerals (assuming industry rating is 0), which means that had your base been producing 30 minerals a turn and you paid the full cost of hurrying a construction, you would have wasted 19 minerals that didn't get carried over. This is why you should do some arithmetic in your head before hurrying construction so you pay just the right amount such that none of your minerals are wasted.

An alternative method is to rush build to one turn from completion. For example, if it requires 5 turns to finish the build, and 100 energy units, add 80 and the base will supply the remaining minerals to finish it at the start of the next turn. This can be useful early in the game when energy is limited. A former, with the 10 free minerals, takes 25 energy units to rush build when it first becomes the active build. Two turns later it requires 13. Add 9 energy units (1 turn short), and it will complete on the next turn. And nudging multiple formers to completion in this manner gets them started several turns earlier on their terraforming duties.

title: Civ/Sid Meier's Alpha Centauri/Strategy


text:
User:Cconceicao

Welcome!!...

I'm 30, wife, two kids, no cat, no dog and from Portugal. I program for a living but now I also write for pleasure.

title: User:Cconceicao


text:
User:Lone Isle~enwikibooks

Hi, I signed up for WikiBooks mainly to write about games. Thus far I'm going to make some contributions to the SMAC guide which is adapted from the excellent guide by Velociryx

title: User:Lone Isle~enwikibooks


title: User:Ixfd64


text:
Talk:Intelligence Intensification/Proofs

English Usage
A couple of web dictionary searches show that falsify as a synonym for disprove is valid, but it is not a common current usage in my experience. I know the use of "disprove" in the context of the module is especially unwanted (defining proof in terms of a derivate word would be a mistake!), so can someone suggest a better word of phrase. Mark Hurd 02:58, 23 Jun 2004 (UTC)

 * I probably wrote falsify as it is the word usally used in this context in Swedish and since I knew the word existed in English. --DanielJanzon 21:19, 11 Sep 2004 (UTC)

 * I hear "falsifiable" used in the context of scientific hypotheses all the time. Nothing wrong with "falsify" here.  160.36.157.234 05:31, 26 Nov 2004 (UTC) (User:Tormod)

Scientific method
I'm adding a much more detailed version of the scientific method, if you have an objection to this, please raise it on this talk page

 * Personally I like it. Maybe it would be a good thing to make it an easier read. I think it's important that even those who aren't already familar with the concepts can read the chapter. I hope many people involved in new age cosmic foo foo will come across this book and increase their demand for proof. Maybe there is a way to include both styles (humorous half-crazy style and, possibly for some people, boring thorough approach naming the concepts with adequate names etc). --DanielJanzon 20:45, 27 May 2005 (UTC)

 * I'll try to work on making it more readable if I can find the time. What do you think about the section on inductive reasoning?