text:
Talk:Visual Language Interpreting

Thanks to those who began this project! Trevor Blake 19:27 (PST) 1 May 2004.

This project was definitely begun by one person, and all praise and respect to them for doing so. But since this is a wikibook, all of us are equal collaborators. Therefore I'm not sure it's going to be possible to make statements about 'how complete that target is.' Suppose two or more contributors disagree about how complete that target is? I can imagine a nice, detailed lengthy entry being viewed as not complete by a trained expert because it lacks certain information and also being viewed as not complete by a trained expert becuase it needs editing and removal of unneccessary details. I am not opposed at all to the existance of a collaborative project with more controls, more of a 'lead editor' with final say-so, but it shouldn't happen at wikibooks. Wikibook's strength is (to some) its weakness: we're all chefs in this kitchen.

Therefore, I propose two things. First, use this discussion page. Sometimes it will be clear why a change or addition or deletion should occur, and a contributor should just go for it. For things that might benefit from being explained, use this discussion page. Don't just change something, come here and discuss it and let others see why it was changed. Second, as an example of the first, I am going to propose that the 'how complete that target is' section be deleted rather than just delete it myself. I've explained why I think that should happen, now I'd like to hear what other people think. --Trevor Blake 15:27, 2 May 2004 (UTC)

I like what I'm hearing. Dan Parvaz 21:11 (EDT) 2 May 2004

I certainly don't mind removing the progress indicators. In my mind, I would have like to have seen some indication of "textual maturity". This isn't a text for experts. I don't even think of it as a text by experts, at least not in the traditional sense. We are all well-versed in some area or another.

I did do some moving around before I got here. The material on the front page relating to some visual languages as well as what appeared to be a college paper on consecutive interpreting seemed a bit out of place up front, so I moved them wholesale to the "Tools" page where they appear in the outline. For the moment, I have left them unaltered, but there are some details which need looking at:

 * The consecutive paper was clearly written to be a self-contained unit, and not part of a broader treatment of interpreting, A certain amount of "dismantling" and "re-incorporating" is probably needed to make it part of an overall story, i.e., let's talk about interpreting, and by the way, here's how consecutive work fits into that picture.

 * I'm not a huge fan of Wikipedia entries being copied into the text. I quickly created the article on Cued Speech, so that there'd be something to reference, but ideally someone who actually works as a CST should be able to fill that in. The same applies to ASL, etc. What makes sense here is to describe the various languages in the context of settings, interpreting challenges, etc. And the Wikipedia articles absolutely need to be heavily linked into the book

Anyway,that'll probably do for now... Glad to see folks are emailing and contributing! --Dan Parvaz 21:11 (EDT) 2 May 2004

Regarding the progress indicators, I'll let you remove them or not as you see fit. Regarding 'text maturity' I suggest it be defined in the negative: a disclaimer that this is (a) a work in progress (b) by people who are not necessarily professionals or accredited or even competant (c) not to take the place of any more reputable work (d) etc. When few of these things are true, the disclaimer could be removed and that will be a positive statement of text maturity.

Regarding text moves from front page - I agree with this change and was on my way to do just that.

Regarding moving data over from Wikipedia (or other public domain sources), I'm a fan. The more raw materails work with, especially at first, the better. It can and will all be cut to size and augmented as we go along. I look forward to experts and experienced people from all over the field joining in, but I don't think it's entirely inappropriate to venture our disclaimer-heavy thoughts here until they do. It's also true that even the top experts don't agree in all areas of study. Getting something out there, making mistakes and fixing them is just fine and very linked to the wikibook philosophy. Waiting to get things right and having authoritative content is also just fine, but less appropriate for a wikibook. Fortunately none of us have to choose only wikibooks or no wikibooks - I have some small talents to lend here, others lend their greater talents here and elsewhere, and all benefit. Again, if a person feels a need to get things more authoritative then they can and should take this text and run with it. That's what public domain is all about. --Trevor Blake 03:12, 3 May 2004 (UTC)

Christian Views of Women
First, I have to say this project is amazing!

Second, I propose the section 'Christian Views of Women' be shortened, I personally think it's a wonderful section and very interesting, but I also think it gets off the topic of 'Interpreting in the Religious Setting'. Jody Johnston

I wrote 'Christian Views of Women' for Wikipedia, and I stand by what I wrote. What I wrote was heavily edited and almost deleted outright, but what I originally wrote is what I stand by. But please note I wrote it for Wikipedia as part of that general encyclopedia, and I do not at all think it is appropriate for this Wikibook. Wikipedia and this wikibook are not the same thing, although they look the same and I write for both. That entry in Wikipedia is about Christian views of women, and this Wikibook is about visual language interpreting. If that entry is copied to this book it wasn't done by me nor do I think it's a good idea. But again, thanks for your kind words and I'm glad you enjoyed the entry. Anyone curious about it can follow the links in my name. --Trevor Blake 02:15, 4 May 2004 (UTC)

title: Talk:Visual Language Interpreting


text:
Python Programming/Input and Output

Input
Python 3.x has one function for input from user,. By contrast, legacy Python 2.x has two functions for input from user:  and.

There are also very simple ways of reading a file and, for stricter control over input, reading from stdin if necessary.

input in Python 3.x
In Python 3.x, input asks the user for a string of data (ended with a newline), and simply returns the string. It can also take an argument, which is displayed as a prompt before the user enters the data. E.g. prints out What is your name?

Example: to assign the user's name, i.e. string data, to a variable "x" you would type

In legacy Python 2.x, the above applies to what was  function, and there was also   function that behaved differently, automatically evaluating what the user entered; in Python 3, the same would be achieved via.

Links:
 * input in Built-in Functions in Library Reference for Python 3, docs.python.org
 * raw_input in Built-in Functions in Library Reference for Python 2, docs.python.org

input in Python 2.x
In legacy Python 2.x, input takes the input from the user as a string and evaluates it.

Therefore, if a script says: it is possible for a user to input:

which yields the correct answer in list form. Note that no inputted statement can span more than one line.

input should not be used for anything but the most trivial program, for security reasons. Turning the strings returned from raw_input into Python types using an idiom such as: is preferable, as input uses eval to turn a literal into a Python type, which allows a malicious person to run arbitrary code from inside your program trivially.

Links:
 * input in Built-in Functions in Library Reference for Python 2, docs.python.org

File Objects
To read from a file, you can iterate over the lines of the file using open: This will print the first character of each line. A newline is attached to the end of each line read this way. The second argument to open can be 'r', 'w', or 'rw', among some others.

The newer and better way to read from a file: The advantage is that the opened file will close itself after finishing the part within the with statement, and will do so even if an exception is thrown.

Because files are automatically closed when the file object goes out of scope, there is no real need to close them explicitly. So, the loop in the previous code can also be written as:

You can read a specific numbers of characters at a time: This will read the characters from f one at a time, and then print them if they're not whitespace.

A file object implicitly contains a marker to represent the current position. If the file marker should be moved back to the beginning, one can either close the file object and reopen it or just move the marker back to the beginning with:

Standard File Objects
There are built-in file objects representing standard input, output, and error. These are in the sys module and are called stdin, stdout, and stderr. There are also immutable copies of these in __stdin__, __stdout__, and __stderr__. This is for IDLE and other tools in which the standard files have been changed.

You must import the sys module to use the special stdin, stdout, stderr I/O handles. For finer control over input, use sys.stdin.read. To implement the UNIX 'cat' program in Python, you could do something like this: Note that sys.stdin.read will read from standard input till EOF. (which is usually Ctrl+D.)

Parsing command line
Command-line arguments passed to a Python program are stored in sys.argv list. The first item in the list is name of the Python program, which may or may not contain the full path depending on the manner of invocation. sys.argv list is modifiable.

Printing all passed arguments except for the program name itself:

Parsing passed arguments for passed minus options: Above, the arguments at which options are found are removed so that sys.argv can be looped for all remaining arguments.

Parsing of command-line arguments is further supported by library modules optparse (deprecated), argparse (since Python 2.7) and getopt (to make life easy for C programmers).

A minimum parsing example for argparse:

Parse with argparse--specify the arg type as int:

Parse with argparse--add optional switch -m to yield multiplication instead of addition:

Parse with argparse--set an argument to consume one or more items: Usage example: python ArgparseTest.py 1 3 5

Parse with argparse--as above but with a help epilog to be output after parameter descriptions upon -h:

Parse with argparse--make second integer argument optional via nargs:

Links:
 * The Python Standard Library - 28.1. sys, docs.python.org
 * The Python Standard Library - 15.4. argparse, docs.python.org
 * The Python Standard Library - 15.5. optparse, docs.python.org
 * The Python Standard Library - 15.6. getopt, docs.python.org
 * Argparse Tutorial, docs.python.org

Output
The basic way to do output is the print statement.

To print multiple things on the same line separated by spaces, use commas between them:

This will print out the following: Hello, World

While neither string contained a space, a space was added by the print statement because of the comma between the two objects. Arbitrary data types can be printed:

This will output the following: 1 2 255 511 (10+5j) -0.999

Objects can be printed on the same line without needing to be on the same line:

This will output the following: 0 1 2 3 4 5 6 7 8 9

To end the printed line with a newline, add a print statement without any objects.

This will output the following: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

If the bare print statement were not present, the above output would look like: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

You can print to a file instead of to standard output: This will print to any object that implements write, which includes file objects.

Note on legacy Python 2: in Python 2, print is a statement rather than a function and there is no need to put brackets around its arguments. Instead of print(i, end=" "), one would write print i,.

Omitting newlines
In Python 3.x, you can output without a newline by passing end="" to the print function or by using the method write:

In Python 2.x, to avoid adding spaces and newlines between objects' output with subsequent print statements, you can do one of the following:

Concatenation: Concatenate the string representations of each object, then later print the whole thing at once.

This will output the following: 12255511(10+5j)-0.999

Write function: You can make a shorthand for sys.stdout.write and use that for output. This will output the following: 2005

You may need sys.stdout.flush to get that text on the screen quickly.

Examples
Examples of output with Python 3.x:
 * from __future__ import print_function
 * Ensures Python 2.6 and later Python 2.x can use Python 3.x print function.
 * print("Hello", "world")
 * Prints the two words separated with a space. Notice the surrounding brackets, ununsed in Python 2.x.
 * print("Hello world", end="")
 * Prints without the ending newline.
 * print("Hello", "world", sep="-")
 * Prints the two words separated with a dash.
 * print("Hello", 34)
 * Prints elements of various data types, separating them by a space.
 * print("Hello " + 34)
 * Throws an error as a result of trying to concatenate a string and an integer.
 * print("Hello " + str(34))
 * Uses "+" to concatenate strings, after converting a number to a string.
 * sum=2+2; print "The sum: %i" % sum
 * Prints a string that has been formatted with the use of an integer passed as an argument. See also.

 * print ("Error", file=sys.stderr)
 * Outputs to a file handle, in this case standard error stream.

Examples of output with Python 2.x:
 * print "Hello"
 * print "Hello", "world"
 * Separates the two words with a space.
 * print "Hello", 34
 * Prints elements of various data types, separating them by a space.
 * print "Hello " + 34
 * Throws an error as a result of trying to concatenate a string and an integer.
 * print "Hello " + str(34)
 * Uses "+" to concatenate strings, after converting a number to a string.
 * print "Hello",
 * Prints "Hello " without a newline, with a space at the end.
 * sys.stdout.write("Hello")
 * Prints "Hello" without a newline. Doing "import sys" is a prerequisite. Needs a subsequent "sys.stdout.flush" in order to display immediately on the user's screen.
 * sys.stdout.write("Hello\n")
 * Prints "Hello" with a newline.
 * print >> sys.stderr, "An error occurred."
 * Prints to standard error stream.
 * sys.stderr.write("Hello\n")
 * Prints to standard error stream.
 * sum=2+2; print "The sum: %i" % sum
 * Prints a string that has been formatted with the use of an integer passed as an argument.
 * formatted_string = "The sum: %i" % (2+2); print formatted_string
 * Like the previous, just that the formatting happens outside of the print statement.
 * print "Float: %6.3f" % 1.23456
 * Outputs "Float: 1.234". The number 3 after the period specifies the number of decimal digits after the period to be displayed, while 6 before the period specifies the total number of characters the displayed number should take, to be padded with spaces if needed.
 * print "%s is %i years old" % ("John", 23)
 * Passes two arguments to the formatter.

File Output
Printing numbers from 1 to 10 to a file, one per line: With "w", the file is opened for writing. With "file=file1", print sends its output to a file rather than standard output.

Printing numbers from 1 to 10 to a file, separated with a dash:

Opening a file for appending rather than overwriting:

In Python 2.x, a redirect to a file is done like print >>file1, i.

See also ../Files/ chapter.

Formatting
Formatting numbers and other values as strings using the string percent operator:

Formatting numbers and other values as strings using the format string method, since Python 2.6:

Formatting numbers and other values as strings using literal string interpolation, since Python 3.6:

Links:
 * 5.6.2. String Formatting Operations, docs.python.org
 * 2. Built-in Functions # format, docs.python.org
 * 7.1.2. Custom String Formatting, docs.python.org
 * 7.1.3.1. Format Specification Mini-Language, docs.python.org
 * 7.1.4. Template strings, docs.python.org
 * PEP 3101 -- Advanced String Formatting, python.org
 * PEP 498 -- Literal String Interpolation, python.org

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

title: Python Programming/Input and Output


text:
Python Programming/Strings

Overview
Strings in Python at a glance:

See also chapter ../Regular Expression/ for advanced pattern matching on strings in Python.

Equality
Two strings are equal if they have exactly the same contents, meaning that they are both the same length and each character has a one-to-one positional correspondence. Many other languages compare strings by identity instead; that is, two strings are considered equal only if they occupy the same space in memory. Python uses the  operator to test the identity of strings and any two objects in general.

Examples:

Numerical
There are two quasi-numerical operations which can be done on strings -- addition and multiplication. String addition is just another name for concatenation, which is simply sticking the strings together. String multiplication is repetitive addition, or concatenation. So:

Containment
There is a simple operator 'in' that returns True if the first operand is contained in the second. This also works on substrings:

Note that 'print(x in y)' would have also returned the same value.

Indexing and Slicing
Much like arrays in other languages, the individual characters in a string can be accessed by an integer representing its position in the string. The first character in string s would be s[0] and the nth character would be at s[n-1].

Unlike arrays in other languages, Python also indexes the arrays backwards, using negative numbers. The last character has index -1, the second to last character has index -2, and so on.

We can also use "slices" to access a substring of s. s[a:b] will give us a string starting with s[a] and ending with s[b-1].

None of these are assignable.

Outputs (assuming the errors were suppressed):

Xanadu Xanadu

Another feature of slices is that if the beginning or end is left empty, it will default to the first or last index, depending on context:

You can also use negative numbers in slices:

To understand slices, it's easiest not to count the elements themselves. It is a bit like counting not on your fingers, but in the spaces between them. The list is indexed like this:

Element:    1     2     3     4 Index:   0     1     2     3     4 -4   -3    -2    -1

So, when we ask for the [1:3] slice, that means we start at index 1, and end at index 2, and take everything in between them. If you are used to indexes in C or Java, this can be a bit disconcerting until you get used to it.

String constants
String constants can be found in the standard string module. An example is string.digits, which equals to '0123456789'.

Links:
 * Python documentation of "string" module -- python.org

String methods
There are a number of methods or built-in string functions:
 * capitalize
 * center
 * count
 * decode
 * encode
 * endswith
 * expandtabs
 * find
 * index
 * isalnum
 * isalpha
 * isdigit
 * islower
 * isspace
 * istitle
 * isupper
 * join
 * ljust
 * lower
 * lstrip
 * replace
 * rfind
 * rindex
 * rjust
 * rstrip
 * split
 * splitlines
 * startswith
 * strip
 * swapcase
 * title
 * translate
 * upper
 * zfill

Only emphasized items will be covered.

is*
isalnum, isalpha, isdigit, islower, isupper, isspace, and istitle fit into this category.

The length of the string object being compared must be at least 1, or the is* methods will return False. In other words, a string object of len(string) == 0, is considered "empty", or False.

 * isalnum returns True if the string is entirely composed of alphabetic and/or numeric characters (i.e. no punctuation).
 * isalpha and isdigit work similarly for alphabetic characters or numeric characters only.
 * isspace returns True if the string is composed entirely of whitespace.
 * islower, isupper, and istitle return True if the string is in lowercase, uppercase, or titlecase respectively. Uncased characters are "allowed", such as digits, but there must be at least one cased character in the string object in order to return True. Titlecase means the first cased character of each word is uppercase, and any immediately following cased characters are lowercase. Curiously, 'Y2K'.istitle returns True. That is because uppercase characters can only follow uncased characters. Likewise, lowercase characters can only follow uppercase or lowercase characters. Hint: whitespace is uncased.

Example:

Title, Upper, Lower, Swapcase, Capitalize
Returns the string converted to title case, upper case, lower case, inverts case, or capitalizes, respectively.

The title method capitalizes the first letter of each word in the string (and makes the rest lower case). Words are identified as substrings of alphabetic characters that are separated by non-alphabetic characters, such as digits, or whitespace. This can lead to some unexpected behavior. For example, the string "x1x" will be converted to "X1X" instead of "X1x".

The swapcase method makes all uppercase letters lowercase and vice versa.

The capitalize method is like title except that it considers the entire string to be a word. (i.e. it makes the first character upper case and the rest lower case)

Example:

Keywords: to lower case, to upper case, lcase, ucase, downcase, upcase.

count
Returns the number of the specified substrings in the string. i.e.

Hint: .count is case-sensitive, so this example will only count the number of lowercase letter 'o's. For example, if you ran:

strip, rstrip, lstrip
Returns a copy of the string with the leading (lstrip) and trailing (rstrip) whitespace removed. strip removes both.

Note the leading and trailing tabs and newlines.

Strip methods can also be used to remove other types of characters.

Outputs: www.wikibooks.org .wikibooks.org .wikibooks. Note that string.lowercase and string.printable require an import string statement

ljust, rjust, center
left, right or center justifies a string into a given field size (the rest is padded with spaces).

join
Joins together the given sequence with the string as separator:

map may be helpful here: (it converts numbers in seq into strings)

now arbitrary objects may be in seq instead of just strings.

find, index, rfind, rindex
The find and index methods return the index of the first found occurrence of the given subsequence. If it is not found, find returns -1 but index raises a ValueError. rfind and rindex are the same as find and index except that they search through the string from right to left (i.e. they find the last occurrence)

Because Python strings accept negative subscripts, index is probably better used in situations like the one shown because using find instead would yield an unintended value.

replace
Replace works just like it sounds. It returns a copy of the string with all occurrences of the first parameter replaced with the second parameter.

Or, using variable assignment:

Outputs:

Hello, world HellX, wXrld

Notice, the original variable remains unchanged after the call to.

expandtabs
Replaces tabs with the appropriate number of spaces (default number of spaces per tab = 8; this can be changed by passing the tab size as an argument).

Outputs: abcdefg abc    a 13 abcdefg abc    a 17

Notice how (although these both look the same) the second string (t) has a different length because each tab is represented by spaces not tab characters.

To use a tab size of 4 instead of 8:

Outputs: abcdefg abc a 13

Please note each tab is not always counted as eight spaces. Rather a tab "pushes" the count to the next multiple of eight. For example:

Output: **************** 16

Outputs: abc*****abc*****abc 19

split, splitlines
The split method returns a list of the words in the string. It can take a separator argument to use instead of whitespace.

Note that in neither case is the separator included in the split strings, but empty strings are allowed.

The splitlines method breaks a multiline string into many single line strings. It is analogous to split('\n') (but accepts '\r' and '\r\n' as delimiters as well) except that if the string ends in a newline character, splitlines ignores that final character (see example).

The method split also accepts multi-character string literals:

Unicode
In Python 3.x, all strings (the type str) contain Unicode per default.

In Python 2.x, there is a dedicated unicode type in addition to the str type: u = u"Hello"; type(u) is unicode.

The topic name in the internal help is UNICODE.

Examples for Python 3.x:
 * v = "Hello Günther"
 * Uses a Unicode code point directly in the source code; that has to be in UTF-8 encoding.
 * v = "Hello G\xfcnther"
 * Specifies 8-bit Unicode code point using \xfc.
 * v = "Hello G\u00fcnther"
 * Specifies 16-bit Unicode code point using \u00fc.
 * v = "Hello G\U000000fcnther"
 * Specifies 32-bit Unicode code point using \U000000fc, the U being capitalized.
 * v = "Hello G\N{LATIN SMALL LETTER U WITH DIAERESIS}nther"
 * Specifies a Unicode code point using \N followed by the unicode point name.
 * v = "Hello G\N{latin small letter u with diaeresis}nther"
 * The code point name can be in lowercase.
 * n = unicodedata.name(chr(252))
 * Obtains Unicode code point name given a Unicode character, here of ü.
 * v = "Hello G" + chr(252) + "nther"
 * chr accepts Unicode code points and returns a string having one Unicode character.
 * c = ord("ü")
 * Yields the code point number.
 * b = "Hello Günther".encode("UTF-8")
 * Creates a byte sequence (bytes) out of a Unicode string.
 * b = "Hello Günther".encode("UTF-8"); u = b.decode("UTF-8")
 * Decodes bytes into a Unicode string via decode method.
 * v = b"Hello " + "G\u00fcnther"
 * Throws TypeError: can't concat bytes to str.
 * v = b"Hello".decode("ASCII") + "G\u00fcnther"
 * Now it works.
 * f = open("File.txt", encoding="UTF-8"); lines = f.readlines; f.close
 * Opens a file for reading with a specific encoding and reads from it. If no encoding is specified, the one of locale.getpreferredencoding is used.
 * f = open("File.txt", "w", encoding="UTF-8"); f.write("Hello G\u00fcnther"); f.close
 * Writes to a file in a specified encoding.
 * f = open("File.txt", encoding="UTF-8-sig"); lines = f.readlines; f.close
 * The -sig encoding means that any leading byte order mark (BOM) is automatically stripped.
 * f = tokenize.open("File.txt"); lines = f.readlines; f.close
 * Automatically detects encoding based on an encoding marker present in the file, such as BOM, stripping the marker.
 * f = open("File.txt", "w", encoding="UTF-8-sig"); f.write("Hello G\u00fcnther"); f.close
 * Writes to a file in UTF-8, writing BOM at the beginning.

Examples for Python 2.x:
 * v = u"Hello G\u00fcnther"
 * Specifies 16-bit Unicode code point using \u00fc.
 * v = u"Hello G\U000000fcnther"
 * Specifies 32-bit Unicode code point using \U000000fc, the U being capitalized.
 * v = u"Hello G\N{LATIN SMALL LETTER U WITH DIAERESIS}nther"
 * Specifies a Unicode code point using \N followed by the unicode point name.
 * v = u"Hello G\N{latin small letter u with diaeresis}nther"
 * The code point name can be in lowercase.
 * unicodedata.name(unichr(252))
 * Obtains Unicode code point name given a Unicode character, here of ü.
 * v = "Hello G" + unichr(252) + "nther"
 * chr accepts Unicode code points and returns a string having one Unicode character.
 * c = ord(u"ü")
 * Yields the code point number.
 * b = u"Hello Günther".encode("UTF-8")
 * Creates a byte sequence (str) out of a Unicode string. type(b) is str.
 * b = u"Hello Günther".encode("UTF-8"); u = b.decode("UTF-8")
 * Decodes bytes (type str) into a Unicode string via decode method.
 * v = "Hello" + u"Hello G\u00fcnther"
 * Concatenates str (bytes) and Unicode string without an error.
 * f = codecs.open("File.txt", encoding="UTF-8"); lines = f.readlines; f.close
 * Opens a file for reading with a specific encoding and reads from it. If no encoding is specified, the one of locale.getpreferredencoding is used[VERIFY].
 * f = codecs.open("File.txt", "w", encoding="UTF-8"); f.write(u"Hello G\u00fcnther"); f.close
 * Writes to a file in a specified encoding.
 * Unlike the Python 3 variant, if told to write newline via \n, does not write operating system specific newline but rather literal \n; this makes a difference e.g. on Windows.
 * To ensure text mode like operation one can write os.linesep.
 * f = codecs.open("File.txt", encoding="UTF-8-sig"); lines = f.readlines; f.close
 * The -sig encoding means that any leading byte order mark (BOM) is automatically stripped.

Links:
 * Unicode HOWTO for Python 3, docs.python.org
 * Unicode HOWTO for Python 2, docs.python.org
 * Processing Text Files in Python 3, curiousefficiency.org
 * PEP 263 – Defining Python Source Code Encodings, python.org
 * unicodedata — Unicode Database in Python Library Reference, docs.python.org
 * Get a list of all the encodings Python can encode to, stackoverflow.com

title: Python Programming/Strings


text:
Python Programming/Exceptions

Python 2 handles all errors with exceptions.

An exception is a signal that an error or other unusual condition has occurred. There are a number of built-in exceptions, which indicate conditions like reading past the end of a file, or dividing by zero. You can also define your own exceptions.

Overview
Exceptions in Python at a glance:

Raising exceptions
Whenever your program attempts to do something erroneous or meaningless, Python raises exception to such conduct:

This traceback indicates that the  exception is being raised. This is a built-in exception -- see below for a list of all the other ones.

Catching exceptions
In order to handle errors, you can set up exception handling blocks in your code. The keywords  and   are used to catch exceptions. When an error occurs within the  block, Python looks for a matching   block to handle it. If there is one, execution jumps there.

If you execute this code: Then Python will print this:

You can't divide by zero!

If you don't specify an exception type on the  line, it will cheerfully catch all exceptions. This is generally a bad idea in production code, since it means your program will blissfully ignore unexpected errors as well as ones which the  block is actually prepared to handle.

Exceptions can propagate up the call stack:

In this code, the  statement calls the function. That function calls the function, which will raise an exception of type ValueError. Neither  nor   has a  /  block to handle ValueError. So the exception raised propagates out to the main code, where there is an exception-handling block waiting for it. This code prints:

That value was invalid.

Sometimes it is useful to find out exactly what went wrong, or to print the python error text yourself. For example:

Which will print:

Sorry, 'the_parrot' has apparently joined the choir invisible.

Custom Exceptions
Code similar to that seen above can be used to create custom exceptions and pass information along with them. This can be very useful when trying to debug complicated projects. Here is how that code would look; first creating the custom exception class:

And then using that exception:

Recovering and continuing with
Exceptions could lead to a situation where, after raising an exception, the code block where the exception occurred might not be revisited. In some cases this might leave external resources used by the program in an unknown state.

clause allows programmers to close such resources in case of an exception. Between 2.4 and 2.5 version of python there is change of syntax for  clause.

 * Python 2.4

 * Python 2.5

Built-in exception classes
All built-in Python exceptions

Exotic uses of exceptions
Exceptions are good for more than just error handling. If you have a complicated piece of code to choose which of several courses of action to take, it can be useful to use exceptions to jump out of the code as soon as the decision can be made. The Python-based mailing list software Mailman does this in deciding how a message should be handled. Using exceptions like this may seem like it's a sort of GOTO -- and indeed it is, but a limited one called an escape continuation. Continuations are a powerful functional-programming tool and it can be useful to learn them.

Just as a simple example of how exceptions make programming easier, say you want to add items to a list but you don't want to use "if" statements to initialize the list we could replace this: Using exceptions, we can emphasize the normal program flow—that usually we just extend the list—rather than emphasizing the unusual case:

title: Python Programming/Exceptions


text:
Waves/Geometrical optics Introduction

As was shown previously, when a plane wave is impingent on an aperture which has dimensions much greater than the wavelength of the wave, diffraction effects are minimal and a segment of the plane wave passes through the aperture essentially unaltered.

This plane wave segment can be thought of as a wave packet or ray consisting of a superposition of wave vectors very close in direction and magnitude to the central wave vector of the wave packet. In most cases the ray simply moves in the direction defined by the central wave vector, i. e., normal to the orientation of the wave fronts.

However, this is not true when the medium through which the light propagates is optically anisotropic, i. e., light traveling in different directions moves at different phase speeds. An example of such a medium is a calcite crystal. In the anisotropic case, the orientation of the ray can be determined once the dispersion relation for the waves in question is known, by using the techniques developed in the previous section.

If light moves through some apparatus in which all apertures are much greater in dimension than the wavelength of light, then we can use the above rule to follow rays of light through the apparatus. This is called the geometrical optics approximation.

This approximation can be applied to any wave theory.

title: Waves/Geometrical optics Introduction


text:
Cookbook:Chocolate Pear Bake

| Dessert

A chocolate pear bake is a dessert that resembles a brownie in appearance, yet contains no flour, instead using whipped egg whites to provide structure. The pear adds a nice mild fruit tone to the chocolate.

Ingredients

 * 7 oz (200 g) semisweet chocolate, chopped or in chips
 * ½ cup (120 g) butter or margarine
 * 4 eggs, separated
 * ½ cup (120 g) white granulated sugar
 * 2 pears, sliced
 * Lightly whipped cream, to serve

Procedure

 * 1) Grease a 9 x 9-inch (22 x 22 cm) baking dish, and preheat the oven to 325°F (170°C).
 * 2) In a double boiler, melt the chocolate and butter or margarine. When melted, remove from the heat.
 * 3) Whisk the egg yolks and sugar together until they become thick and pale yellow.
 * 4) In a separate bowl, whisk the egg whites until firm.
 * 5) Combine the chocolate and egg yolk mixture, and mix well.
 * 6) Beginning with about ⅓ the egg whites, gently fold them into the chocolate/egg yolk mixture.
 * 7) Add the slices of pear, and stir once or twice. Add the entire mixture to the baking dish.
 * 8) Bake for 35–40 minutes, until the bake is springy yet firm to the touch.
 * 9) Serve hot with whipped cream.

Notes, tips, and variations

 * Substitute sliced peaches, apples, or orange segments for the pears.
 * You are able to get all of these ingredients from your local grocery store.

Warnings

 * Overmixing after the egg whites have been added to the batter can result in the bake being too dense.

title: Cookbook:Chocolate Pear Bake


text:
Modern Physics/Gravity

Newtons Law of Gravitation

 * 1) The Law of Gravitation
 * 2) Gravitational Field
 * 3) Gravitational Flux
 * 4) Flux from Multiple Masses
 * 5) Kepler's Laws
 * 6) Use of Conservation Laws
 * 7) Effects of Relativity

 * Problems

Modern theories of Gravitation

 * 1) General relativity

Speculative theories

 * 1) Brans-Dicke theory

title: Modern Physics/Gravity


text:
General Mechanics/Fundamental Principles of Dynamics

Aristotle
Aristotle expounded a view of dynamics which agrees closely with our everyday experience of the world. Objects only move when a force is exerted upon them. As soon as the force goes away, the object stops moving. The act of pushing a box across the floor illustrates this principle -- the box certainly doesn't move by itself!

However, if we try using Aristotle's dynamics to predict motion we soon run into problems. It suggests that objects under a constant force move with a fixed velocity but while gravity definitely feels like a constant force it clearly doesn't make objects move with constant velocity. A thrown ball can even reverse direction, under the influence of gravity alone.

Eventually, people started looking for a view of dynamics that actually worked. Newton found the answer, partially inspired by the heavens.

Newton
In contrast to earthly behavior, the motions of celestial objects seem effortless. No obvious forces act to keep the planets in motion around the sun. In fact, it appears that celestial objects simply coast along at constant velocity unless something acts on them.

This Newtonian view of dynamics — objects change their velocity rather than their position when a force is exerted on them — is expressed by Newton's second law:

where $$\vec F$$ is the force exerted on a body, $$m$$ is its mass, and $$\vec a$$ is its acceleration. Newton's first law, which states that an object remains at rest or in uniform motion unless a force acts on it, is actually a special case of Newton's second law which applies when $$\vec F=\vec0$$.

It is no wonder that the first successes of Newtonian mechanics were in the celestial realm, namely in the predictions of planetary orbits. It took Newton's genius to realize that the same principles which guided the planets also applied to the earthly realm as well.

In the Newtonian view, the tendency of objects to stop when we stop pushing on them is simply a consequence of frictional forces opposing the motion. Friction, which is so important on the earth, is negligible for planetary motions, which is why Newtonian dynamics is more obviously valid for celestial bodies.

Note that the principle of relativity is closely related to Newtonian physics and is incompatible with pre-Newtonian views. After all, two reference frames moving relative to each other cannot be equivalent in the pre-Newtonian view, because objects with nothing pushing on them can only come to rest in one of the two reference frames!

Einstein's relativity is often viewed as a repudiation of Newton, but this is far from the truth — Newtonian physics makes the theory of relativity possible through its invention of the principle of relativity. Compared with the differences between pre-Newtonian and Newtonian dynamics, the changes needed to go from Newtonian to Einsteinian physics constitute minor tinkering.

Newton's first law:
"An object at rest tends to stay at rest and an object in motion tends to stay in motion with the same speed and in the same direction unless acted upon by an external force".

He gave this law assuming the body or the system to be isolated. If we look upon into our daily life we find that this law is applicable in reality like a bicycle stops slowly when we stop moving the pedals, this is because in our daily life there are 2 external forces which opposes the motion, these are frictional force and air resistance ( These forces aren't included in the course of an isolated system). But if these two forces are absent the above law is applicable, this can be observed in space.

Newton's second law:
"The rate change of linear momentum of an object is directly proportional to the external force on the object."

The concept behind this is - "Forces arise due to interaction between the bodies." With the help of this law we can derive this formula: $$F=ma$$. In this formula, $$\vec F$$ means the force exerted on the object, $$m$$ means the mass of the object, and $$\vec a$$ means the acceleration of the object. Also the second law of motion is universal law in nature, i.e. it consists of both the laws. Newton assumed the body to be an isolated one, thus according to second law, if there is no interaction between bodies of two different systems( means not to be an isolated one), then there is no force that can stop or shake the object from its state of being.

Suppose two bodies are interacting with each other, then each of them would be exerting force on the other( Look from each side and apply second law of motion), it is third law.

Newton's third law:
"Every action has an equal and opposite reaction"

This means if body A exerts a force on body $$B$$, then body $$B$$ exerts a force on body $$A$$ that is equal in magnitude but opposite in direction from the force from $$A$$. $$\vec{F}_{AB}=-\vec{F}_{BA}$$

 * Negative sign shows that the force is in opposite direction.


text:
General Mechanics/Work and Power

Work
When a force is exerted on an object, energy is transferred to the object. The amount of energy transferred is called the work done on the object. Mathematically work done is defined as the dot\scalar product of force and displacement, thus it is a scalar quantity. However, energy is only transferred if the object moves. Work can be thought of as the process of transforming energy from one form into another. The work W done is

 * $$	W=F\Delta x$$

where the distance moved by the object is Δx and the force exerted on it is F. Notice that work can either be positive or negative. The work is positive if the object being acted upon moves in the same direction as the force, with negative work occurring if the object moves opposite to the force.

This equation assumes that the force remains constant over the full displacement or distance( depending on the situation). If it is not, then it is necessary to break up the displacement into a number of smaller displacements, over each of which the force can be assumed to be constant. The total work is then the sum of the works associated with each small displacement. In the infinitesimal limit this becomes an integral

 * $$W=\int F(s)\,ds$$

If more than one force acts on an object, the works due to the different forces each add or subtract energy, depending on whether they are positive or negative. The total work is the sum of these individual works.

There are two special cases in which the work done on an object is related to other quantities. If F is the total force acting on the object, then by Newton's second law W=FΔx=mΔx·a. However, a=dv/dt where v is the velocity of the object, and Δx≈vΔt, where Δt is the time required by the object to move through distance Δx. The approximation becomes exact when Δx and Δt become very small. Putting all of this together results in
 * $$W_{total}=m\frac{dv}{dt}v\Delta t=\Delta t \frac{d}{dt} \frac{mv^2}{2}$$

We call the quantity mv2/2 the kinetic energy, or K. It represents the amount of work stored as motion. We can then say

 * $$W_{total}=\frac{dK}{dt}\Delta t=\Delta K$$

Thus, when F is the only force, the total work on the object equals the change in kinetic energy of the object. This transformation is known as "Work-Energy theorem."

The other special case occurs when the force depends only on position, but is not necessarily the total force acting on the object. In this case we can define a function

 * $$U(x)=-\int^x F(s)\,ds$$

and the work done by the force in moving from x1 to x2 is U(x1)-U(x2), no matter how quickly or slowly the object moved.

If the force is like this it is called conservative and U is called the potential energy. Differentiating the definition gives

 * $$F=-\frac{dU}{dx}$$

The minus sign in these equations is purely conventional.

If a force is conservative( The force whose effect doesn't depend on the path it has taken to go through), we can write the work done by it as

 * $$W=-\frac{dU}{dx}\Delta x= -\Delta U$$

where is the change in the potential energy of the object associated with the force of interest.

Energy
The sum of the potential( Energy by virtue of its position) and kinetic(Energy by virtue of its motion) energies is constant. We call this constant the total energy E:

 * $$E = K + U$$

If all the forces involved are conservative we can equate this with the previous expression for work to get the following relationship between work, kinetic energy, and potential energy:

 * $$\Delta K = W = -\Delta U$$

Following this, we have a very important formula, called the 'Conservation of Energy:

 * $$\Delta(K+U)=0$$

This theorem states that the total amount of energy in a system is constant, and that energy can neither be created nor destroyed.

Power
The power associated with a force is simply the amount of work done by the force divided by the time interval over which it is done. It is therefore the energy per unit time transferred to the object by the force of interest. From above we see that the power is

 * $$P=\frac{F \Delta x}{\Delta t}=Fv$$

where $$ v $$ is the velocity at which the object is moving. The total power is just the sum of the powers associated with each force. It equals the time rate of change of kinetic energy of the object:

 * $$P_{total}=\frac{W_{total}}{\Delta t}=\frac{dK}{dt}$$

title: General Mechanics/Work and Power


text:
Cookbook:Cuisine of Spain

| European cuisines

Introduction
The cuisine of Spain is one of the most intriguing the world has to offer. The diverse landscape, climate, and culture of Spain, combined with its rich history, create a cuisine unlike any other. The turbulent history of the Iberian Peninsula had a great influence on the cuisine of Spain, like the Romans, the Visigoths, and the Moors all left their culinary mark. The post-Franco Renaissance that encouraged richness and diversity in all aspects of life is demonstrated through the unique Spanish way of cooking. Spain is made up of 17 autonomous regions, each differing in natural resources, creating a variety of specialty dishes specific to each region. In general, Spanish cuisine relies on Mediterranean flavors - garlic, olive oil, and fresh herbs. Spanish cuisine is sophisticated, yet basic, unadorned and elegant.

Dining Customs
The meal hours and dining customs in Spain are very different from those in many other countries. Breakfast in Spain is known as "el desayuno," and it is not so much a meal, but a very small nibble in the morning. Many Spaniards will just have coffee, or "café con leche", while others have coffee and cookies, toast, cereals or a croissant.

The main meal, "la comida", is eaten in the middle of the day, but is usually more substantial than lunch. La comida is usually eaten around 2 o'clock in the home, as a family, and is an important part of Spanish customs. La comida is usually a three-course meal. Bread, water, and wine are typically served with the meal.

La cena, or dinner as we know it, is a lighter meal than la comida. This simple meal is eaten after 9 o'clock.

When dining in Spain, there are some different table manners that are an important part of proper etiquette:

 * If you are invited for a meal in a Spaniard's home, it is proper to bring a gift such as chocolates, pastries, cakes, wine, liquor or brandy, or flowers.
 * Remain standing until you are invited to sit down. You may be shown to a particular seat.
 * Do not begin eating until the hostess starts.
 * Always keep your hands visible when eating by resting your wrists on the edge of the table. It is rude to have your hands under the table!
 * The hostess gives the first toast and it is customary for the honored guest to return the toast later in the meal.
 * Use silverware for eating most foods- even fruits are eaten with a fork and knife!
 * The best way to compliment the cook is by accepting another serving when offered.
 * If you have not finished eating, cross your fork and knife on your plate with the fork over the knife.
 * Indicate you have finished eating by placing your fork and knife parallel on your plate, tines facing up, handles facing to the right.

National dishes

 * Paella recipes
 * Tapas
 * Tortilla de patatas

Andalucía
Andalucía is the region located in the southern part of Spain, that makes up part of the Iberian Peninsula. This is an area that was inhabited by Greeks, Phoenicians, Romans, Visigoths, Berbers and Arabs before being conquered by the Spanish crown. This diverse cultural heritage has greatly impacted the dishes that Spaniards in the south enjoy today. The conquest resulted in the introduction of olive oil and garlic to the Iberian Peninsula, Spain now being the largest producer of olive oil in the world. The Romans introduced Andalucíans to the cooking methods of roasting, grilling, and baking. Their most important contribution was the introduction of irrigation systems, which allowed for the cultivation of fruits, vegetables, and a variety of grains.

The Visigoths brought spinach, radishes, and some beans to Andalucía. Spain's cuisine was completely revolutionized by the Moorish conquest of 711, during which the Moors occupied the country for more than seven centuries, leaving a great culinary mark. When the Moors conquered Spain, they brought almonds, rice, sugar cane, eggplant, citrus fruits, and spices, which are all very important to Spain's cuisine.

The warm and varied landscape and climate of Andalucía has a large influence on the gastronomy. Andalucía is made up of mountain ranges, countryside and coast, which makes for a wide range of possibilities when it comes to cultivating crops. Being surrounded by both the Mediterranean Sea and the Atlantic Ocean, you are always sure to find fresh-caught seafood in most of Andalucía.

Andalucía's Specialties

 * Gazpacho
 * Flamenco Eggs (Huevos a la Flamenca)
 * Andalucían Style Aparagus (Cazuela de espárragos a la Andaluza)

Valencia
Valencia is a region of Spain that is located on the Mediterranean coast. Valencia was known as the "Garden of Spain," because of its orange groves, olive groves, rice fields, and vineyards that nowadays have become wonderful villas with their nice swimming pool. There is a variety of delicious seafoods in Valencia because it is right on the sea. The cuisine in Valencia is similar to that of Andalucía, because it is a Mediterranean diet, influenced by the Romans, Arabs, and Moors.

During the 500 year rule of the Moors, a water canal system for agriculture was built in Valencia, which contributed greatly to the growth of new crops. The Arabs brought artichokes, nuts, dried fruit, and rice, which grows abundantly in the swampy land near the Mediterranean. The mass production of rice is especially important in Valencia, because it allows the creation of Paella. The Arabs also introduced important spices in cooking, such as saffron, cinnamon, and nutmeg.

Valencia's Specialites

 * Paella valenciana
 * Arroz negro
 * Paella de marisco

Catalonia
Catalonia makes up the northeastern corner of Spain. Like the other regions, Catalonia's cuisine is predominantly Mediterranean, but the influences of other cultures can certainly be tasted. The Romans and the Greeks have impacted the cuisine, along with the French, and Italians. This has resulted in the blending of the Mediterranean diet, with dishes that can be recognized as French or Italian.

To the east, Catalonia borders on the Mediterranean Sea, the coastlines being the Costa Brava and the Costa Daurada in the Tarragona area. This location introduces a seafood cuisine, such as lobster, crayfish, sea urchins, rock fish, and many more. Inland, Catalonia is made up of valleys, and mountains, such as the Pyrenees, which contribute other important staples to the cuisine. Mushrooms grow in all parts of Catalonia, as well as other vegetables and rice. Catalonia is well known for its various sausages and mixed vegetable stews. Catalonia is also very well known for its wine and vineyards, due to the varied landscape.

Catalonia's Specialties

 * Shrimp with Garlic (Gambas al Ajillo)
 * Salsa Romesco
 * Crema Catalana
 * Mixed Seafood Sarsuela
 * Aioli (Garlic Mayonnaise)

Drinks (Bebidas)

 * Sangría
 * Granizado de Límon (Lemon Granita)
 * Horchata de Chufas
 * Sidra (Hard Cider)

Recettes de cuisine espagnole

title: Cookbook:Cuisine of Spain


text:
Guitar/Learning Songs

Now that you've got a few chords under your belt, you're ready to start learning some songs. Great! There are several ways to learn songs, and some are more accessible than others.

General Tips
There are two basic forms that appear in thousands of songs. They are the twelve bar blues and the thirty-two bar ballad. Both forms are used extensively in all genres. The blues and rock 'n 'roll genres both use the twelve-bar blues form and many songs by Chuck Berry, Eddie Cochran and Buddy Holly are twelve bar blues and therefore very easy to learn. If you are trying to learn a jazz standard then you will find that many of them are of the thirty-two bar form. Practicing and understanding these two basic forms is essential for the guitarist who wishes to learn songs.

Practice the song slowly (especially if it's a fast song) until you can play it flawlessly. Then, when you are confident with the notes you are supposed to play, increase the speed until you can play along with the song.

Using a drum-machine or metronome when practicing is essential. An alternative method for improving timing is to play along with your favorite artists.

Sheet Music
The best way is to find sheet music for the song you are trying to learn, like a tab book, available from any guitar shop. Tab books are good, because they are almost always accurate, and they not only show the notes you're supposed to play, but they give good sense of how to play the notes. Generally they include both the rhythm and lead part, even written on the same page if they are played at the same time.

Tab books are expensive and there's a learning curve associated with fluent tab reading, especially if you have no prior knowledge of music notation. Understanding music theory, even just enough to properly (and easily) read a tab book is a challenge but not insurmountable. Being able to read music, whether it's tab or notation, will improve your playing.

Online Tab
A much quicker, cheaper and often faster way to learn is to search for an online tab of the song you're looking for. Simply type "Artist Name Song Name tab" into your favorite search engine, and "voila!", you have dozens to choose from. The online tab community is thriving, and there are many popular sites where you can find tabs for most popular songs. Some sites even feature a MIDI of the song, to make learning even easier.

There are several downsides to online tab, some of which are outlined in the Tablature section. The biggest problem is lack of accuracy. Always remember that online tabs are not made by professionals like tab books, and that somewhere down the line someone was sitting at home with a CD and figured it out by trial and error. Thus, the more complicated the song, the less likely the tab you are reading is 100% accurate. But since most people don't play a song exactly as it sounds on the album (even the recording artists!), this isn't such a big deal.

Another down side is that there is a huge amount of stealing in the community, and if you are looking for an obscure tab, you might only find one actual tab, with copies of it on every site you visit. Some sites allow for multiple versions, and some use voting or comments to give you a sense of how accurate the tab is. However, don't let voting alone determine which tab you read, because if the people who vote don't know how to play the song either, then they might vote a terrible tab really high. In general, you should read two or three tabs for a song, and then from that determine how you intend to play the song. Comments on a song can contain slight revisions or alternate fingerings for chords, so it is good to check those out.

By Ear
Songs can also be learned "by ear", with no sheet music. Essentially you just listen to the song and try to figure it out, with nothing for reference. Knowledge of music theory is particularly helpful for this method. It probably sounds a lot harder to learn this way than it is, but it is a really good way to practice whatever music knowledge you have. And it is especially rewarding being able to figure out a famous musicians piece and saying "I could have made that up!"

First, you should always try and figure out the key (or scale) the song is in. Knowing the key essentially tells you two important things; what the root notes are of the chords they are playing, and the scale that is used for soloing. When you know the scale, you can also probably figure out which scale degree is supposed to be major or minor.

To figure out the key, try playing random notes on the fretboard, and when one "works", play a major or minor pentatonic scale beginning with that note. Once you have figure out a few more notes, you will probably have a good idea of what scale is being used. If that doesn't work, try humming the chords being used, and then match those tones on the guitar. Be careful you don't accidentally start humming the lead vocals, because although that will help determine the key, the chords are likely different.

Once you know what key the song is in, the rest generally follows pretty quickly. Some of the tricky bits can be one-note riffs, arpeggios, of specific voicing of the chords they are using.

If have no experience of keys and their relationship to writing songs, then figuring out songs by ear is more difficult. Essentially you need to just find the same notes or chords and write them down or remember them. Generally this involves a lot of trial and error, but working this way provides excellent ear training.

Other Guitarists
This is perhaps the best way to learn. Playing with another guitarist gives you the opportunity to ask questions about chords and rhythms, and it gives you a chance to see and hear what the song is supposed to be like when it's performed live. However, the down side is that often a guitarist learns to play a song "their way", and they don't care about how it's "really" supposed to be played. Thus, you might not be learning the song exactly, but rather a slightly different version.

Concert Videos
Another place to learn is by watching concert videos, especially on DVDs where they allow you to pick camera angles. Often they will have a camera never breaks away from lead guitarist. By following along, you can learn exactly how a particular guitarist plays a particular song live.

The downside of this is that not every artist (especially new ones) has a concert DVD. Also, the guitarist may be playing the song differently live than on the album, so depending on how accurate you intend to be with your learning and playing, watching a video may not be the best way.

Chord Progressions
Songs are created using chords. Chords are derived from scales. The chords that are derived from one diatonic scale never change. If you learn the seven chords in the key of C major, then when you find a song in that key, you can quickly work out the chord progressions that make up the song.

Chords in C major

Note that the chords in the key of C major consists of 3 major chords, 3 minor chords and 1 diminished chord. This holds true for all major keys.

Chord Theory
Songs in the key of C major will start with a C major chord and end with a C major chord. The tonic chord of C major is the chord that defines the key ( the name tonic is derived from the word tonal). If you think of music as a journey then the tonic chord is the starting point and the return point. The notes in the scale of C major are named:

I is the Tonic

II is the Supertonic

III is the Mediant

IV is the Subdominant

V is the Dominant

VI is the Relative Minor

VII is the Leading Note

VIII is the Octave

Tonic - is the first note of the scale and it is this note that determines the tonality or key, hence the name Tonic.

Supertonic – the word “super” comes from the Latin verb “superare” which means “to be above”. The second note of any scale is always above the tonic.

Mediant – the mediant refers to the fact that this note lies halfway between the tonic and the dominant.

Subdominant – the word “sub” means "to be below". This note is below the dominant.

Dominant – this note has this name because with the tonic it sets the tonality or key. The tonic and dominant notes, more than any of the others, determines the tonality of a piece of music. The fifth note of the scale is therefore a dominant factor.

Relative Minor – so called because this is the tonic note of the corresponding natural minor scale. Every major scale has a corresponding natural minor scale that contains exactly the same notes. So the relative minor of the C major scale is A natural minor. It is also called the submediant because is lies three notes below the octave as the mediant lies three notes above the tonic.

Leading-note – whenever you play a scale and arrive at this note, you will find that it naturally wants to move up to the octave note. People have a psychological expectation of music. The most important need is for the “musical journey” to have a start and end. If you were to play the C major scale and stopped at the leading-note, you would always have the sense that the scale is incomplete.

Octave – the same note as the tonic but an octave higher in sound and the end of the musical journey that a scale takes us on.

All the chords in C major take the same names given to the degrees of the scale. You can refer to the dominant note or the dominant chord.

Common Progressions
The tonic, subdominant and dominant are called the tonal chords. The supertonic, mediant and relative minor are called the modal chords. The tonal chords define tonality (key) and the modal chords suggest modality. If you play only the modal chords Am and Em from the key of C major the listener will eventually interpret the music to be in the key of A minor (aeolian mode). It must be noted that Am and Em has to be stated over a lengthy period of time. Analyzing chord progressions starts with the tonal chords:

Step One: Try the progression I-V (Tonic to Dominant)

Step Two: Try the progression I-IV (Tonic to Subdominant)

Step Three: Try the progression I-VI or I-III (Tonic to Relative Minor) or (Tonic to Mediant)

Step Four: Try the progression I-II (Tonic to Supertonic)

If you know the song starts with a C major chord and none of the above works then the song may contain chromatic chords. It is common practice to change the modal chords which are minor into their major counterparts. So D minor becomes D major and E minor becomes E major. The chromatic supertonic and the chromatic mediant are a common compositional device. Even though you have added chromatic chords the listener will still interpret the key as C major.

Try playing this progression: C - E major - Am - G

In the above chord progression you have played a chord that doesn't belong to the key of C major. The tonality of the piece is preserved by the following chords which are diatonic to the key.

How To Continue Learning

 * Take formal lessons from a qualified teacher. Be sure to seek testimonials and references.
 * Watch others play. Notice what they have to pay attention to and what seems like magic.
 * Practice arbitrary scale runs. Go up and or down 3 or 4 notes and then move up the scale with the same interval.
 * Jam up with friends who are better than you as frequently as possible
 * Get some friends along who are at the same skill level and form a band of your own
 * Listen to your favorite music and try to envision what the guitarist is doing to make the notes come out as they do.
 * Listen to different music. It may open your mind to techniques and phrasing you never imagined using before.  It may also expand your musical library.  Pick any genre you're not familiar with.  Get a feel for the timing and note choice.  Into classical?  Try bluegrass.  Headbanger?  Pick up some jazz or blues.  Then move on to your hero's heroes.  Find out what musical influences got Jimi Hendrix, B.B King or Eric Clapton primed for stardom.

A great way to continue learning if you can already play is to teach guitar to other people.

title: Guitar/Learning Songs


text:
Cookbook:Ricotta Lasagne

| Cuisine of Italy | Pasta Recipes

Lasagne is a baked pasta dish.

Ingredients

 * 1 lb (450 g) sweet Italian sausage
 * ½ lb (230 g) minced (ground) beef
 * ½ onion, chopped fine
 * 2 cloves garlic, crushed
 * 3½ tbsp sugar
 * 1 tbsp salt
 * 1½ tsp dried basil
 * ½ tsp fennel seed
 * ¼ tsp black pepper
 * ¼ cup chopped parsley, divided
 * 4 cups (1 kg / 2.2 lb) canned whole tomatoes, undrained, halved, seeds removed
 * 12 oz (340 g) tomato paste
 * ½ cup (125 ml / 4.2 oz) water
 * ½ tbsp salt
 * 2 cups (600 g / 1.3 lb) ricotta cheese
 * 1 egg
 * 16 oz (450 g) lasagna pasta
 * 16 oz (450 g) mozzarella cheese, thinly sliced (a wire cutter is nice for semi-soft cheeses like this)
 * about 3 tbsp grated Parmesan cheese

Procedure

 * 1) Remove sausage casings, and break sausage into small bits.
 * 2) Sauté sausage and ground beef in 5-quart (4.7 L) saucepan or Dutch oven over medium heat with onion and garlic until the meat is browned.
 * 3) Add sugar, 1 tablespoon salt, basil, fennel, pepper, and half the parsley; mix well.
 * 4) Add tomatoes, tomato paste and water, mashing the tomatoes a bit. Bring the sauce to a boil then reduce heat and simmer, covered and stirring occasionally for 1½ hours.
 * 5) Preheat oven to 275 F.
 * 6) Cook and drain pasta.
 * 7) In a medium bowl mix ricotta, egg, ½ teaspoon salt and remaining parsley.
 * 8) Assemble your lasagna in a inch roasting pan (listed bottom to top):
 * 9) *Bottom layer of sauce (approx. 1½ cups / 375 g / 13.2 oz)
 * 10) *Layer of pasta (overlapping slightly)
 * 11) *Layer of ½ the ricotta mixture
 * 12) *Layer of ⅓ of the mozzarella
 * 13) *Sauce layer (again, about 1½ cups / 375 g / 13.2 oz)
 * 14) *Layer of grated Parmesan sprinkled over sauce (not so much that the sauce layer is covered entirely)
 * 15) *Layer of pasta
 * 16) *Layer of remaining ricotta
 * 17) *Layer of ⅓ of the mozzarella
 * 18) *Layer of remaining sauce
 * 19) *Layer of sprinkled Parmesan
 * 20) *Layer of remaining mozzarella
 * 21) Cover the lasagna with foil and bake 30 minutes covered, then 25 minutes uncovered (or until bubbly and lightly browned). Cool for at least 20 minutes before serving.

Notes, tips, and variations

 * Uncooked lasagnas freeze very well so the extra work can be done well in advance. You can make several batches at a time and freeze the extras to thaw out and cook later.

title: Cookbook:Ricotta Lasagne


text:
Talk:Geometry/Angles

I've been looking over the Geometry "pages" and I saw this Angles "page." The diagrams are good, but the article needs more work as of May 2, 2004. The written discussion could be much improved.

Angles AREN'T really the intersection of 2 rays
So after my second year of teaching HS Geometry, I've come to believe that teaching angles are the intersection of 2 rays is misleading and incorrect. The "angle", as traditionally drawn, is a shorthand, or a representation for a unit of rotational measurement. But it is the ROTATION that is primary, not the Angle Diagram, as we usually see.

Let's go back to the foundations of measurement. In the measurement world, there are two parallel universes: Rotational measurement and Linear Measurement. Linear measurement is measurement of displacement from a starting location. You start here, you move for a bit, and now you are 10 meters away. In Physics, velocity, acceleration, momentum, and position are all measurements that live in the "Linear" world.

In the Rotational World, there is a completely parallel universe. We have Rotational Velocity, Rotational Acceleration, Rotational Momentum, and it is all based on an underlying measurement: Rotational Position.

'''Angles are a measurement of Rotational Position. They answer the question: How far did something turn? '''

In my experience, teaching young students that angles are the intersection of two lines does not teach the true nature of an angle. I have had much more success teaching the concept of rotational measurement. Once that concept is understood, we can back down to the traditional representation, shown by two rays that share an endpoint. But until students understand the concept of rotation, the diagram involving rays simply confuses them.

title: Talk:Geometry/Angles


text:
User:AGiss~enwikibooks

You can find me here : fr:Utilisateur:AGiss

title: User:AGiss~enwikibooks


text:
Geometry/Triangle

A triangle is a type of polygon having three sides and three angles. The triangle is a closed figure formed from three straightline segments joined at their ends. The Line Segments at the ends can be called the corners, angles, or vertices of the triangle. Since any given triangle lies completely within a plane, triangles are often treated as two-dimensional geometric figures. As such, a triangle has no volume and, because it is a two-dimensionally closed figure, the flat part of the plane inside the triangle has an area, typically referred to as the area of the triangle. A triangle must have at least some area, so all three corner points of a triangle cannot lie in the same line. The sum of the lengths of any two sides of a triangle is always greater than the length of the third side. The preceding statement is sometimes called the Triangle Inequality.

Categorized by angle
The sum of the interior angles in a triangle always equals 180o. This means that no more than one of the angles can be 90o or more. All three angles can all be less than 90oin the triangle; then it is called an acute triangle. One of the angles can be 90o and the other two less than 90o; then the triangle is called a right triangle. Finally, one of the angles can be more than 90o and the other two less; then the triangle is called an obtuse triangle.

Categorized by sides
If all three of the sides of a triangle are of different length, then the triangle is called a scalene triangle. If two of the sides of a triangle are of equal length, then it is called an isosceles triangle. In an isosceles triangle, the angle between the two equal sides can be more than, equal to, or less than 90o. The other two angles are both less than 90o. If all three sides of a triangle are of equal length, then it is called an equilateral triangle and all three of the interior angles must be 60o, making it equiangular. Because the interior angles are all equal, all equilateral triangles are also the three-sided variety of a regular polygon and they are all similar, but might not be congruent. However, polygons having four or more equal sides might not have equal interior angles, might not be regular polygons, and might not be similar or congruent. Of course, pairs of triangles which are not equilateral might be similar or congruent. Further discussion of ../Congruent Triangles/ and ../Similar Triangles/ may be found in those corresponding sections.

Opposite corners and sides in triangles
If one of the sides of a triangle is chosen, the interior angles of the corners at the side's endpoints can be called adjacent angles. The corner which is not one of these endpoints can be called the corner opposite to the side. The interior angle whose vertex is the opposite corner can be called the angle opposite to the side. Likewise, if a corner or its angle is chosen, then the two sides sharing an endpoint at that corner can be called adjacent sides. The side not having this corner as one of its two endpoints can be called the side opposite to the corner. The sides or their lengths of a triangle are typicaly labeled with lower case letters. The corners or their corresponding angles can be labeled with capital letters. The triangle as a whole can be labeled by a small triangle symbol and its corner points. In a triangle, the largest interior angle is opposite to longest side, and vice versa. Any triangle can be divided into two right triangles by taking the longest side as a base, and extending a line segment from the opposite corner to a point on the base such that it is perpendicular to the base. Such a line segment would be considered the height or altitude ( h ) for that particular base ( b ). The two right triangles resulting from this division would both share the height as one of its sides. The interior angles at the meeting of the height and base would be 90o for each new right triangle. For acute triangles, any of the three sides can act as the base and have a corresponding height. For more information on right triangles, see ../Right Triangles and Pythagorean Theorem/.

Area of Triangles
If base and height of a triangle are known, then the area of the triangle can be calculated by the formula: $$S = \frac{b \times h}{2}$$ ($$S$$ is the symbol for area) Ways of calculating the area inside of a triangle are further discussed under ../Area/.

Centres
The centroid is constructed by drawing all the medians of the triangle. All three medians intersect at the same point: this crossing point is the centroid. Centroids are always inside a triangle. They are also the centre of gravity of the triangle. The three angle bisectors of the triangle intersect at a single point, called the incentre. Incentres are always inside the triangle. The three sides are equidistant from the incentre. The incentre is also the centre of the inscribed circle (incircle) of a triangle, or the interior circle which touches all three sides of the triangle. The circumcentre is the intersection of all three perpendicular bisectors. Unlike the incentre, it is outside the triangle if the triangle is obtuse. Acute triangles always have circumcentres inside, while the circumcentre of a right triangle is the midpoint of the hypotenuse. The vertices of the triangle are equidistant from the circumcentre. The circumcentre is so called because it is the centre of the circumcircle, or the exterior circle which touches all three vertices of the triangle. The orthocentre is the crossing point of the three altitudes. It is always inside acute triangles, outside obtuse triangles, and on the right vertex of the right-angled triangle. Please note that the centres of an equilateral triangle are always the same point.

title: Geometry/Triangle


text:
Using GNOME

Using GNOME is an unofficial user’s guide for GNOME 3.x and later, a desktop environment that runs on the Linux operating system. Its core goal is to provide helpful information on how to use GNOME, and its application stack with ease and proficiency. We will also go over any and all core concepts, and the terminology that goes along with it.

The screenshots in this guide have been taken while running GNOME 44.2.

This guide is currently in the process of being updated for GNOME 3.x. As a result, much of the content and features you will read about in this guide no longer exists.

Table of Contents

 * /Coverage of this guide/
 * /Terminology/
 * /What is GNOME/
 * /History of GNOME/
 * /Differences/
 * /Platforms/
 * /Installing/
 * /Login/
 * /Main desktop/
 * /Desktop area/
 * /Application windows/
 * /File manager/
 * /Menus/
 * /Panel/
 * /Applets/
 * /Preferences/
 * /Applications/
 * /Accessibility/
 * /Tips and tricks/
 * /Power users/
 * /Tools/
 * /Configuration Editor/
 * /Further reading/
 * /Glossary/

GNOMEフレームワーク

title: Using GNOME


text:
Cookbook:Cookware

Cookware holds food, generally for cooking on a range. Sometimes pots and pans are used in an oven or, if they do not include metal, in a microwave.

Dark gummy burned-on oil can be removed with acetone, widely available from hardware stores and in diluted form as nail polish remover.

Cookware and bakeware are containers in a kitchen for food preparation. Cookware are for use on a stove or range cooktop. Bakeware are for use inside an oven. Some utensils are used for both types of cooking.

There are many types of cookware and bakeware. The material are constructed affects the quality of the vessel and the quality of the food cooked. Factors to consider are the thermal conductivity, how food sticks in use, and the surface pre-preparation, i.e., seasoning, before use.

A factor to consider in selecting is the heat conductivity of the handle. If it is molded to the vessel of the same material Then precautions need to be followed in handling the vessel when hot. Avoid hollow handles because they are difficult to clean or dry. Additionally, a good cooking pot design has an "overcook edge" where the lid actually rests and the lid has a dripping edge that prevents condensation fluid from dripping from the lid when handling.

Common materials
Metal pots need to conduct heat well and be chemically unreactive to avoid altering the flavor of the food being cooked. These two factors are usually mutually exclusive and the vessel is a compromise between them. Clad vessels are attempt to get the bes of both. For example a copper pot clad or tinned with another metal.

Stainless steel
Stainless steel is good enough for most uses, although it is not as conductive as aluminium or copper. Stainless steel tends to be inexpensive and lightweight. Stainless steel has the advantage of being non reactive with most household acids. Thin-bottomed pans, often with an insignificant layer of copper, can cause uneven heating, so a layer of aluminium is often "sandwiched" in the base of the pan.

Even though stainless steel is not considered non-stick, food does not stick very strongly unless the surfaces are rough. Stainless steel is popular for saucepans and stock pots.

Stainless Steel is a poor conductor of heat so must be clad with a core of aluminium or copper to improve heating properties. High-quality stainless has a core covering the entire pan where low-quality stainless just has an aluminium or copper bottom.

Anodized aluminium
Anodizing is an electro-chemical process that molecularly alters the surface of aluminium cookware making it stick and scratch-resistant and easy to clean. A final stage in the anodizing process seals the aluminium, preventing any leaching into food. Unlike uncoated aluminium, this cookware does not react to acidic foods, and is much more durable. Unlike stainless steel, no "sandwiching" or "cladding" is needed for even heating. Anodized aluminium cookware is generally not dishwasher safe.

Cast Iron
Cast iron is denser than other pan materials, making the pans unparalleled at retaining and evenly distributing heat, but also somewhat heavy. Therefore these pans are excellent for applications such as searing, or any time when a pan must stay hot even as ingredients are added.

The pan retains its heat better than most other materials. They can also be put under a very hot grill or into a barbecue or campfire — something that would completely destroy a non-stick pan — as they are all-metal and would have to be melted to suffer damage. Contrary to popular belief, acidic foods can be cooked in cast iron, provided they are removed from the pan as soon as cooking is complete.

Cast iron pans can be used for other kinds of cooking as well, although their heaviness makes them somewhat awkward for making, say, crepes, or any other kind of cooking where the pan needs to be moved around a lot during cooking. Cast iron is also less conductive than other materials such as aluminium and copper. This results in the aforementioned excellent heat retention, but also means that cast iron cookware takes longer to heat up and cool down.

Cast iron needs to be seasoned to provide a more-or-less non-stick surface. This process involves heating oil so that it polymerizes and binds to the pan. This creates a non-stick surface chemically similar to a plastic coating. Some people see this need for seasoning as a drawback; however, because the seasoning can be removed (with steel wool, even!) and reapplied as needed, cast iron pans can be maintained in excellent condition far beyond the life of a typical non-stick pan.

Properly cared for, a cast iron pan can last for generations. Thus they are an excellent value: extremely durable, costing less than all but the cheapest non-stick pans, while outperforming all but the most expensive cookware. The main drawback is that they will rust if washed in a dishwasher or left soaking in water. Also, they should not be washed with harsh, lye-based soap, as this will remove the seasoning.

They can be effectively cleaned with a stiff brush, plastic wool, or by rubbing with a paper towel, vegetable oil, and any salt, used as a mild abrasive. Prior to putting them back in storage, if you heat them up, empty, for few minutes, any remaining dampness will evaporate. Generally these retail for no more than US $20.

Cast iron cookware has been around a long time. It is not unusual that cookware is passed down for generations. Some cooks consider cast iron a good choice for egg dishes, while others feel the iron adds an off-flavor to eggs. Cast iron is ideal for searing or frying, long-cooking stews, braised dishe. Other uses of cast-iron pans include baking, for instance for making cornbread, cobblers and cakes.

Bare cast iron must be seasoned properly and cleaned proper immediately after each use. Enamelled cast iron is cast iron that has a vitreous enamel glaze applied to the surface to allow easy thorough cleaning.

A seasoned pan has a stick-resistant coating created by polymerized oils and fats. Seasoning is a process by which a layer of animal fat or vegetable oil is applied and cooked onto cast-iron or carbon steel cookware. Typically, pre-seasoned cast iron cookware (seasoning or coating applied by the manufacturer) is stripped (removal of seasoning through either chemical, electric, or physical means) and is re-seasoned by the user, as most users have their own preferred method of seasoning. A seasoned pan is typically not placed in a conventional dishwasher or washed with soap, as this may strip the pan of its seasoning and lead to rust as well as quality and performance issues. This practice exists because of the past use of lye in soaps, however, most modern soaps no longer contain lye, but have other ingredients that may affect the cookware. Therefore, it's generally advised to avoid the use of detergents and soaps.

Because other cookware cleaning techniques like scouring or washing in a dishwasher can remove or damage the seasoning on a bare cast-iron pan, these pans should not be cleaned like most other cookware. Some chefs advocate simply wiping them out after use, or washing them with hot water and a stiff brush.< https://web.archive.org/web/20130512045102/http://www.lodgemfg.com/useandcare/seasoned-cast-iron > Others advocate washing with mild soap and water, and then re-applying a thin layer of fat or oil.< http://whatscookingamerica.net/Information/CastIronPans.htm > A third approach is to scrub with coarse salt and a paper towel or clean rag.< https://www.youtube.com/watch?v=PiQ0VOJmCbg >

Enameled Cast Iron
Enamelled cast iron cookware — typically, casseroles or Dutch ovens — enables cooks to take advantage of the heat retention of cast iron while also providing a non-stick, non-rusting, non-reactive, light-coloured surface (the light-coloured surface makes it easier to monitor how foods are browning). The thickness of the cast-iron core helps guarantee even heating and prevents "hot-spots" and warping from occurring, even on electric stoves.

Some care must be taken in use and storage, as the enamel surface is vulnerable to chipping.

The main drawback of enameled cast iron is expense, with pieces typically being 3-5 times more expensive than their cast-iron counterparts. The enamel is naturally non-stick and cleans easily, but may crack, chip, or discolour over time, particularly if improperly cleaned. Exteriors are generally available in a rainbow of colours.

Carbon Steel
Like cast iron, carbon steel needs to be seasoned and is vulnerable to acid foods. Like stainless steel, carbon steel is lightweight and inexpensive. Carbon steel can be slightly better than stainless steel on an induction-based cooktop. Carbon steel is very popular for woks, particularly the large round-bottomed ones, and is becoming more popular as an alternative to cast iron in pans.

Aluminium
Aluminium is lightweight and inexpensive. It conducts heat well, especially if it is thick. This allows for even heating and fast response to desired temperature changes.

Aluminium usually has a non-stick surface inside it. With or without a non-stick surface, aluminium is vulnerable to scratches. A connection between aluminium and Alzheimer's disease is a concern for many, although a scientific link between the two is inconclusive at best.

Uncoated aluminium is vulnerable to damage from acid foods like tomatoes. Low-grade aluminium is easy to dent. Aluminium is popular for frying pans. Aluminium is a lightweight metal with very good thermal conductivity. Uncoated and un-anodized aluminium can react with acidic foods to leach into food and change its taste. Anodized aluminium has had the naturally occurring layer of aluminium oxide thickened by an electrolytic process to create a surface that is hard and non-reactive.

Copper
In Western cooking, the best pots were made out of a thick layer of copper for good thermal conductivity and a thin layer of tin to prevent the copper from reacting with acidic foods. Copper pans provide the best conductivity, and therefore the most even heating. They tend, however, to be heavy, expensive, and to require occasional retinning. Modern copper cookware is now made with stainless steel lining rather than tin.

Copper has the highest thermal conductivity among metals used for cookware construction so has fast heating with very good heat distribution. Copper does not store ("bank") heat, and so thermal flows reverse almost immediately upon removal from heat allowing for precise temperature control for heat sensitive cooking, e.e., candy.

Copper thickness of less than .25 mm is referred to as foil and must be clad to a more rigid metal to produce a serviceable vessel. Such applications of copper are purely aesthetic and do not materially contribute to cookware performance.

Copper is reactive with acidic foods which can result in corrosion, the byproducts of which can foment copper toxicity. Lining copper pots and pans prevents copper from contact with acidic foods. The most popular lining types are tin, stainless steel, nickel and silver.

Using modern metal bonding techniques, such as cladding, copper is frequently incorporated into cookware constructed of primarily dissimilar metal, such as stainless steel, often as an enclosed diffusion layer.

Glass
Glass allows food to be observed while the lid is on. Glass is heavy, because it must be thick enough to prevent shattering. To avoid cracks, avoid sudden large temperature changes (do not drop a very hot glass pot into cold water).

While not considered non-stick, food does not stick strongly to glass unless baked-on. Glass can be used in a microwave oven. Glass is generally clear or white, the latter known as Corning Ware, a product designed for missile nose cones.

Combinations
Multi-ply pans are made from two or more the above materials. Oftentimes, oxidation-prone copper or delicate aluminium are "clad" in stainless steel or some other sturdier material, combining the best features of the many materials and blunting the disadvantages. Also, many pans come with glass lids to allow the user to see inside the pot or pan as the food cooks.

Shapes, sizes, etc.

 * crepe pan
 * Double boiler
 * Dutch oven
 * Frying pan
 * Makiyakinabe pan
 * Paella pan
 * Roasting pan
 * Pressure cooker, including multicooker as Instant Pot.
 * Saucier Pan
 * Saucepan (typically called a "2-quart (2 L) pot" or "4-quart (4 L) pot")
 * Sauté pan
 * Stock pot
 * Tava
 * Wok

ספר מתכונים/סירים ומחבתות

title: Cookbook:Cookware


text:
Using GNOME/Coverage of this guide

This guide covers :

 * What GNOME is
 * How to use it
 * The differences between GNOME and other platforms
 * The latest stable version of GNOME (2.12 at the time of writing)
 * Applications included with GNOME
 * Tips and tricks
 * Resources for power users

What this guide is not :
 * A guide to specific versions of GNOME such as Fedora GNOME or GNOME-based products such as Java Desktop or Ximian GNOME. It covers GNOME in general.
 * A Developers guide — it is intended for users. See the GNOME developer site for information on GNOME development.
 * A general manual, see the official GNOME users guide included with GNOME instead.
 * A guide to applications not part of GNOME itself, such as The GIMP or OpenOffice.org.

Back to contents page

title: Using GNOME/Coverage of this guide


text:
Using GNOME/Platforms

GNOME is written to run on the Linux operating system only. It used to use the X11 display technology, but now supports Wayland as well.

title: Using GNOME/Platforms


text:
Using GNOME/File manager

The file manager in GNOME manages your files, folders and hardware. It lets you move them, create them, rename them, copy them and delete them

The default file manager is called Nautilus. There are other file managers available, such as Velocity, GMC (used in older GNOME versions), Konqueror (from KDE) and Midnight Commander (text based file manager), but this book will focus on the default.

Table of contents

 * 1) Changes in 2.6
 * 2) Computer
 * 3) Home Folder
 * 4) Wastebasket
 * 5) Folders and Files
 * 6) Emblems and Backgrounds
 * 7) Preferences
 * 8) Connecting to servers
 * 9) Browse Folder

Back to contents page

title: Using GNOME/File manager


text:
Using GNOME/File manager changes

Nautilus underwent several changes between versions 2.4 and 2.6; most notable is the change in the default browsing method. In 2.4, the file manager used a "browse" view similar to using a Web browser; all folders opened in the same window, and it could be used to view files as well. GNOME 2.6 uses a spatial interface by default, which, in essence, makes the window the folder. Each folder opens in a separate window, and this window remembers its size, position, and even location in the file listings.

Some users of GNOME dislike the new interface; it is easy to switch back to the old one by using the Browse Folder command, or by using the GConf editor to force these changes in the file manager by default. To do this, open gconf-editor, open /apps/nautilus/preferences, and check "always-use-browser".

A "Computer" icon has also been added to the desktop, which shows disk drives; network computers; and remote FTP, SSH, and WebDAV servers.

The file chooser dialog was completely revamped, replacing the older, harder-to-use version with one resembling the Windows XP file dialog. The newer window shows the path to your location as a series of clickable buttons that will bring you back to that directory. One con of the new "open" dialog is that it no longer allows the user to type in the filename, however.

Back to contents page

title: Using GNOME/File manager changes