text:
Guide to Unix/Commands/File Editing

Unix and Unix-like operating system come with a multitude of terminal editors. An editor codified in POSIX is vi, widely available on Unix variants. A small selection of other terminal editors follows.

joe
A plain-text editor with syntax-coloring support whose editing keys are based on MicroPro's word processor WordStar.

Links:
 * joe man page, freebsd.org
 * Joe's Own Editor, joe-editor.sourceforge.net

pico
Pico is an easy-to-learn text editor originally designed for composing e-mail in Pine.

Links:
 * pico man page, freebsd.org

nano
GNU nano is a clone of Pico. The license is GNU GPL V3. Nano runs in a console window. Some commands are invoked using Control + key combinations; other commands are invoked using Meta + key, where Meta includes pressing Alt simultaneously or pressing Esc before.

A Windows version can be obtained from files.lhmouse.com; the source code seems to be at github. Windows version used to be hosted at SourceForge, up to a 2002 version 1.0.8.

''Warning: Some nano versions have hard line wrapping enabled by default. As a consequence, when you enter characters into a long line, nano automatically inserts a newline into it to limit its length. When inadvertent, this can cause trouble, especially when editing configuration files. You can disable the hard wrapping temporarily via Meta + L (Alt + L), or by running nano with -w option, or by placing "set nowrap" into .nanorc configuration file.''

Help is available by pressing F1 or Control + G. You can search in the help by pressing slash (/); to find next occurrence, press N.

Keyboard shortcuts are listed in the help. Some of them are listed at the bottom two lines all the time unless hidden. Nano does not use the CUA keyboard shortcut convention familiar from some operating systems, so it does not use Control + C and Control + V for copying and for pasting. Keyboard shortcuts include the following:
 * Control + X: Quit the editor, or if more than one buffer is opened, close the current buffer.
 * Control + S: Save the current buffer without asking for a file name or confirmation unless there is no file name associated with the current buffer yet.
 * Control + O: Save the current buffer, asking for confirmation of the file name even if the buffer already has a file name.
 * Control + R: Insert the content of a file into the current buffer, or if so set via Alt + F, into a new buffer.
 * Control + W: Search. After pressing the shortcut, options such as regex search can be enabled by further shortcuts appearing at the bottom.
 * Alt + R: Search and replace. Regex option is available.
 * Shift + arrow keys or home and end: Selects a region.
 * Control + K: Cut the current selection, or if there is no selection, the current line. The cut text is placed into nano-internal cut buffer rather than to the system clipboard.
 * Control + U: Paste what has been cut with Control + K, thus "uncut". Does not paste the system clipboard content, it seems.
 * And more.

Links:
 * nano man page, freebsd.org
 * GNU nano: documentation, nano-editor.org
 * nano source code, git.savannah.gnu.org
 * GNU nano, wikipedia.org
 * Useful Nano Keyboard Commands, staffwww.fullcoll.edu
 * hard line wrapping should be disabled by default, savannah.gnu.org

vi
A powerful editor based on ex. For details see the Wikibooks Learning the vi Editor.

Vim is a vi-compatible editor with more features.

Links:
 * vi, opengroup.org
 * vi man page, man.cat-v.org
 * vi man page, freebsd.org
 * Vim home page, vim.org

emacs
A very powerful editor that is used by many programmers. See also Emacs.

Links:
 * GNU Emacs Manuals Online, gnu.org

zile
A light-weight, feature-reduced clone of Emacs.

Links:
 * zile man page, freebsd.org
 * GNU Zile, gnu.org

Links

 * , wikipedia.org
 * , wikipedia.org
 * TextEditor, wiki.debian.org
 * List of applications # Text editors, wiki.archlinux.org
 * Text editor, wiki.gentoo.org
 * Most Popular Developer Environments by Occupation in Stack Overflow Developer Survey 2017, stackoverflow.com
 * Most Popular Development Environments in Stack Overflow Developer Survey 2019, stackoverflow.com
 * Integrated development environment in Stack Overflow Developer Survey 2022, stackoverflow.co
 * Top IDE index, pypl.github.io
 * What text editors in terminal do you use and why?, quora.com

title: Guide to Unix/Commands/File Editing


text:
User:Pfctdayelise/Uyghur/Introduction/Why

Why learn Uyghur?

 * To support the Uyghur people. Learning a different language is a way to share in the culture of the people who speak it. It is one of the best ways to break down the fear and stereotypes that result from ignorance. With the Uyghur name most commonly being associated with terrorists since 2001, it is a timely decision.
 * To directly stand by your belief in the value of linguistic diversity. Even in Xinjiang, Uyghur schools full of Uyghur children are increasingly teaching directly in Han Chinese (Mandarin). Uyghur people are learning their own language as if it was a foreign one. Even Xinjiang University now teaches all its courses in Han Chinese. There are some ten million Uyghur speakers and it is unlikely to become extinct in our lifetime, but if the treatment and attitude towards it continue, it may well become endangered.
 * To get an edge over your fellow polyglots. If you can speak Uyghur you will be able to quickly learn several related languages of central Asia. These languages are rarely spoken in the Western world and will definitely "value-add" in a global job-market more than French or Spanish!

Why is this Wikibook necessary? The only resources that exist to learn Uyghur in English are:
 * An Uyghur-English Dictionary by Henry Shwarz (1992 - no Arabic script)
 * Spoken Uyghur by Reinhard Hahn (1991)
 * Lonely Planet Central Asia Phrasebookby Justin Jon Rudelson (1998)

It's pretty unbelievable that the most recent book to learn Uyghur is a travel phrasebook that is not even solely focused on Uyghur... and it's almost a decade old!

There are more substantial resources available in Chinese and even Russian to learn Uyghur. But for English? Nada. Creating and using this Wikibook is a great opportunity to encourage more people to learn Uyghur (or just learn about it). Because Wikibooks is available under the GNU Free Documentation License, it can easily be copied and distributed (for free, a nominal cost, or whatever you want to charge!) without worry about breaking copyright.

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


text:
User:Jadelrab

Mohamed Jadelrab ( a.k.a aboyousif) Diwan Aboyousif is a journalist from Tanta, egypt.

title: User:Jadelrab


text:
Hebrew/Numbers

Introduction
The numbers in Hebrew can be in masculine or feminine form, depending to the gender of the word.

title: Hebrew/Numbers


text:
User:Kellen/monobook.js

/* see /examples for basic usage */

/** * makeLink * makes a link with the specified text and href * * param text: label text to give the link * param href: url for the link **/ function makeLink(text, href) { var link = document.createElement('A'); link.appendChild(document.createTextNode(text)); link.href = href; return link; }

/** * makeNewToolsItem * makes a new item in the personal tools portlet with the specified id * * param id: id to give the new item * returns: a new item (li) on the personal tools list with specified id **/ function makeNewToolsItem(id) { var node = document.createElement('LI'); node.id = id; // add to list var preflist = document.getElementById('pt-userpage').parentNode; preflist.appendChild(node); return node; }

/** * insertAfter * adds newElement to the DOM tree after the reference node * * param reference: the node to insert after * param newElement: the element to insert **/ function insertAfter(reference, newElement) { reference.parentNode.insertBefore(newElement,reference.nextSibling); }

/** * makeNew Portlet * make a new sidebar portlet * * param id: id to give the containing div of the portlet * param label: visible label for the portlet, like "toolbox" * returns: an empty list (UL) to be filled with items (li's) **/ function makeNewPortlet(id, label) { var node = document.createElement('DIV'); node.id = id; node.className= 'portlet'; var title = document.createElement('H5'); title.appendChild(label); node.appendChild(title); var contentnode = document.createElement('DIV'); contentnode.className = 'pBody'; node.appendChild(contentnode); var listnode = document.createElement('UL'); contentnode.appendChild(listnode);

/* by default inserts under the 'toolbox'; use a different id     in place of 'p-tb' to move where the portlet gets put */ insertAfter(document.getElementById('p-tb'), node);

return listnode; }

/** * addPortletItem * add an item to a portlet * * param portlet: a list (UL, usually) * param item: a node, most often a link (A), to add to the list */ function addPortletItem(portlet, item) { var listitem = document.createElement('LI'); listitem.appendChild(item); portlet.appendChild(listitem); }

/* generates a bunch of cookbook-related interface bits */ function cookbook { // make a cookbook item in the personal tools portlet cooknode = makeNewToolsItem('pt-cookbook');

// wrap "Cookbook >" in a span so we can alter the style independently var cooklabel = document.createElement('SPAN'); cooklabel.id = 'pt-cookbook-label'; // add the links cooklabel.appendChild(makeLink('Cook', '/wiki/Cookbook:Table of Contents')); cooklabel.appendChild(makeLink('book', '/wiki/Cookbook_talk:Table of Contents')); cooklabel.appendChild(document.createTextNode('» '));

// append everything to the cookbook item cooknode.appendChild(cooklabel); cooknode.appendChild(makeLink('Changes', '/w/index.php?limit=1000&title=Special%3ARecentchanges&namespace=102')); cooknode.appendChild(document.createTextNode('/')); cooknode.appendChild(makeLink('Index', '/w/index.php?title=Special%3AAllpages&from=&namespace=102'));

// make cookbook portlet var cooktools = makeNewPortlet('p-cookbook', document.createTextNode('Cookbook')); // add a bunch of links to it addPortletItem(cooktools, makeLink('Main page', '/wiki/Cookbook:Table of Contents')); addPortletItem(cooktools, makeLink('Talk page', '/wiki/Cookbook_Talk:Table of Contents')); addPortletItem(cooktools, makeLink('Recent changes', '/w/index.php?limit=1000&title=Special%3ARecentchanges&namespace=102')); addPortletItem(cooktools, makeLink('All pages', '/w/index.php?title=Special%3AAllpages&from=&namespace=102')); addPortletItem(cooktools, makeLink('Work needed', '/wiki/Category:Cookbook_pages_needing_work')); addPortletItem(cooktools, makeLink('Stubs', '/wiki/Category:Cookbook_stubs')); }

/* run cookbook when a page is loaded */ if (window.addEventListener) window.addEventListener("load",cookbook,false); else if (window.attachEvent) window.attachEvent("onload",cookbook);

title: User:Kellen/monobook.js


text:
User:Kellen/monobook.css

font-variant: small-caps; color: black; font-size: 110%; }
 * 1) pt-cookbook-label>A {

title: User:Kellen/monobook.css


text:
WebObjects/Database Compatibility and Comparisons/Oracle

Since WebObjects make use of JDBC to connect to the Oracle server, it is fully compliant with Oracle 9i and 10g (and 8i for the most).

Last year (2005), a quite huge WebObjects deployment (40 XServes) has been demoed in combination with Oracle 10g RAC (Real Application Cluster). Press release: http://www.oracle.com/global/eu/pressreleases/10gonmac.html

What was interesting is that the standard WebObjects deployment is clustered-like, and so is 10g in its RAC version. The performances and the load-handling were quite impressive.

PS: Would you like more info on WebObjects + 10g RAC, you are more than welcome to drop a question at http://www.intelli-core.com. Probably, your Oracle rep will welcome you, too ;-)


text:
Cookbook talk:Alfredo Sauce

Italian?
I'm Italian and I know of Fettuccine Alfredo's and Alfredo sauce just from American books and movies, I don't think they can be considered typically Italian. Plch 15:13, 15 June 2006 (UTC)
 * I agree. The dish is almost unknown here in Italy. Even in Alfredo's restaurant in Rome, the reputed source of the recipe, they do not prepare it with cream. Can it be moved to North American or Italian Amercan cuisine? Djkrysa (discuss • contribs) 16:45, 15 October 2014 (UTC)

title: Cookbook talk:Alfredo Sauce


text:
Talk:Adventist Youth Honors Answer Book/Recreation/Physical Fitness

Hi Babylace. These are the requirements for the Knot Tying honor rather than the Physical Fitness honor. I'm going to move this over to where it belongs.

Also, the main page of this book indicates that we're specifying the requirements as adopted by the NAD. The ones you've outlined here are slightly different fro mthe latest version adopted by the NAD.

The easiest way to get the requirements in is by downloading them from http://www.pathfindersonline.org/html/honors/honors_ay_manual.htm and then cut and paste them from Adobe into the edit window and add the markup. It's a lot easier to add the markup than it is to re-type all the requirements.

I surround each requirement with a == and surround sub-requirements with ===.

The other thing I do when outlining the requirements is use the "honor_header" template I developed at the beginning:

=Honor Name=

2. Requirement two.
Again, thanks for your help on this project. It is very much appreciated.


text:
Cookbook:Yoda Soda

| Beverage

Yoda Soda is a fun drink that looks like Master Yoda's head.

Ingredients

 * 1 cup Mountain Dew soda

 * 2 scoops vanilla ice cream
 * 1 pinch of chocolate sprinkles

Procedure

 * 1) Fill glass with soda.
 * 2) Add ice cream.
 * 3) Drop a few chocolate sprinkles on the ice cream to look like hair.

title: Cookbook:Yoda Soda


text:
User talk:Lotusduck~enwikibooks

are you still adding to the tagalog lessons? i am really interested in learning the language. thanks. --just.blaze 16:13, 15 June 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Lotusduck. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Lotusduck~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:23, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:12, 19 April 2015 (UTC)

title: User talk:Lotusduck~enwikibooks


text:
User talk:Hockeyrw

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 17:01, 15 June 2006 (UTC)

title: User talk:Hockeyrw


text:
User:Hockeyrw

My name is Rick. The following description of myself and activities might help one understand why I'm here and what I'm going to focus my contributions on. My email is littleralphhockey@yahoo.com. I'm on AOL Instant Messenger as hckycomputer

My interest
My interest are playing hockey, building computers, listen to music, and making animations. Also, I have the wish to become an engineer.

Music
I enjoy music. I like to listen to music, like Heavy metal music. My favorite artists include Black Sabbath, Deep Purple, Iron Maiden, Led Zeppelin, Jimi Hendrix, U2, Van Halen, Judas Priest, Motörhead, Def Leppard, Kiss, Anthrax, Poison, AC/DC, Alice Cooper, Queen, and Pink Floyd

Computers
I like AMD64 because they work faster than intel processors. I enjoy using Photoshop because it is cool how you can fix photos with good results and being able to create animations

title: User:Hockeyrw


text:
Cookbook:Ensalada de Pallares (Peruvian Lima Bean Salad)

| Cuisine of Peru

Ingredients

 * 1 lb (500 g) pallares (large dried lima beans)
 * Water
 * Salt
 * 1 cup olive oil
 * 2–3 teaspoons white vinegar
 * 1 spoonful Dijon mustard
 * Pepper
 * 1 red onion, finely diced
 * 2 tomatoes, seeded and diced
 * A few sprigs of parsley

Procedure

 * 1) Soak pallares overnight or at least 6 hours. Change water 2–3 times.
 * 2) Boil the beans without salt in enough water to cover them. Use high heat until water reaches boiling point. Skim and reduce your fire. Simmer for about 1 hour. No exact timing is possible, since cooking time depends on the dryness of the beans.
 * 3) When the beans are plump and tender, take them off the heat and drain. You might reserve the boiling liquid to process leftovers into a soup.
 * 4) Season the beans lightly with salt (kosher works great) and, while the beans cool down, prepare your vinaigrette.
 * 5) Mix olive oil, vinegar, mustard, salt and pepper to taste, red onion, and tomatoes.
 * 6) Once the beans are at room temperature, check the seasoning of the vinaigrette. It should taste a bit stronger than expected.
 * 7) Carefully mix the vinaigrette with the beans, then mix in the parsley.
 * 8) Garnish the top with more parsley, and serve.


text:
Haskell/Practical monads

In this chapter, we will present some very diverse examples of monads being used for practical tasks. Consider it as bonus material, and go through it at your own pace. You can always come back later if some parts (e.g. the final example about concurrency) seem too alien right now.

Parsing monads
This section is based on the "Parsing" chapter of Jonathan Tang's Write Yourself a Scheme in 48 Hours.

In the previous chapters, we saw how monads were used for IO, and started working more extensively with some of the more rudimentary monads like,   or. Now let us try something quintessentially "practical": writing a simple parser. Monads provide a clean way of embedding a domain specific parsing language directly into Haskell without the need for external tools or code generators. For a brief and accessible presentation of the subject, we suggest the paper Functional Pearls: Monadic Parsing in Haskell, by Graham Hutton and Erik Meijer. Right now, however, is time to get our hands dirty; and for that we will be using the Parsec library, version 3 or greater.

We need an extension for this code: FlexibleContexts. This allows us to write class constraints such as, where one of the type variables is defined instead of polymorphic.

{-# LANGUAGE FlexibleContexts #-}

Start by adding this line to the import section:

import Control.Monad import Control.Monad.Identity (Identity) import System.Environment (getArgs) import Text.Parsec hiding (spaces)

This makes the Parsec library functions and getArgs available to us, except the "spaces" function, whose name conflicts with a function that we'll be defining later. In addition, the Identity monad is made available so that we can use ParsecT on Identity.

Now, we'll define a parser that recognizes one of the symbols allowed in Scheme identifiers:

symbol :: Stream s m Char => ParsecT s u m Char symbol = oneOf "!#$%&|*+-/:<=>?@^_~"

This is another example of a monad: in this case, the "extra information" that is being hidden is all the info about position in the input stream, backtracking record, first and follow sets, etc. Parsec 3 uses a monad transformer to take care of all of that for us. We need only use the Parsec library function oneOf (see Text.Parsec.Char), and it'll recognize a single one of any of the characters in the string passed to it. And as you're about to see, you can compose primitive parsers into more sophisticated productions.

The type of the function is somewhat confusing. Stream s m Char defines a "stream" of Char's of type s, wrapped around monad m. Examples are of s would be String or ByteString. Accommodating both String and ByteString is the main reason for defining our function to be polymorphic around String. Parsec contains a type called Parser, but its not as polymorphic as we would normally like - it explicitly requires a stream type of String.

ParsecT defines a parser for a stream type s, state type u (we don't really need to use state, but its useful to define our functions to be polymorphic on state), inner monad m (usually Identity if we don't want to use it as a transformer) and result type Char, which is the "normal" type argument to Monads.

Let's define a function to call our parser and handle any possible errors:

readExpr :: Stream s Identity Char => s -> String readExpr input = case parse symbol "lisp" input of    Left err -> "No match: " ++ show err Right val -> "Found value"

As you can see from the type signature, readExpr is a function (->) from a Stream (String or ByteString, most of the time) to a String. We name the parameter, and pass it, along with the   action we defined above and the name of the parser ("lisp"), to the Parsec function parse.

Parse can return either the parsed value or an error, so we need to handle the error case. Following typical Haskell convention, Parsec returns an Either data type, using the Left constructor to indicate an error and the Right one for a normal value.

We use a  construction to match the result of   against these alternatives. If we get a Left value (error), then we bind the error itself to  and return "No match" with the string representation of the error. If we get a Right value, we bind it to, ignore it, and return the string "Found value".

The  construction is an example of pattern matching, which we will see in much greater detail [evaluator1.html#primitiveval later on].

Finally, we need to change our main function to call readExpr and print out the result:

main :: IO main = do args <- getArgs putStrLn (readExpr (args !! 0))

To compile and run this, you need to specify "-package parsec -package mtl" on the command line, or else there will be link errors. For example:

debian:/home/jdtang/haskell_tutorial/code# ghc -package parsec -o simple_parser [../code/listing3.1.hs listing3.1.hs] debian:/home/jdtang/haskell_tutorial/code# ./simple_parser $ Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser a No match: "lisp" (line 1, column 1): unexpected "a"

Whitespace
Next, we'll add a series of improvements to our parser that'll let it recognize progressively more complicated expressions. The current parser chokes if there's whitespace preceding our symbol:

debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "  %" No match: "lisp" (line 1, column 1): unexpected " "

Let's fix that, so that we ignore whitespace.

First, let's define a parser that recognizes any number of whitespace characters. Incidentally, this is why we included the "hiding (spaces)" clause when we imported Parsec: there's already a function "spaces" in that library, but it doesn't quite do what we want it to. (For that matter, there's also a parser called lexeme that does exactly what we want, but we'll ignore that for pedagogical purposes.)

spaces :: Stream s m Char => ParsecT s u m spaces = skipMany1 space

Just as functions can be passed to functions, so can actions. Here we pass the Parser action space to the Parser action skipMany1, to get a Parser that will recognize one or more spaces.

Now, let's edit our parse function so that it uses this new parser:

readExpr input = case parse (spaces >> symbol) "lisp" input of    Left err -> "No match: " ++ show err Right val -> "Found value"

We touched briefly on the >> ("then") operator in lesson 1, where we mentioned that it was used behind the scenes to combine the lines of a do-block. Here, we use it explicitly to combine our whitespace and symbol parsers. However, then has completely different semantics in the Parser and IO monads. In the Parser monad, then means "Attempt to match the first parser, then attempt to match the second with the remaining input, and fail if either fails." In general, then will have wildly different effects in different monads; it's intended as a general way to structure computations, and so needs to be general enough to accommodate all the different types of computations. Read the documentation for the monad to figure out precisely what it does.

Compile and run this code. Note that since we defined spaces in terms of skipMany1, it will no longer recognize a plain old single character. Instead you have to precede a symbol with some whitespace. We'll see how this is useful shortly:

debian:/home/jdtang/haskell_tutorial/code# ghc -package parsec -o simple_parser [../code/listing3.2.hs listing3.2.hs] debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "  %" Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser % No match: "lisp" (line 1, column 1): unexpected "%" expecting space debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "  abc" No match: "lisp" (line 1, column 4): unexpected "a" expecting space

Return Values
Right now, the parser doesn't do much of anything - it just tells us whether a given string can be recognized or not. Generally, we want something more out of our parsers: we want them to convert the input into a data structure that we can traverse easily. In this section, we learn how to define a data type, and how to modify our parser so that it returns this data type.

First, we need to define a data type that can hold any Lisp value:

data LispVal = Atom String | List [LispVal] | DottedList [LispVal] LispVal | Number Integer | String String | Bool Bool

This is an example of an algebraic data type : it defines a set of possible values that a variable of type LispVal can hold. Each alternative (called a constructor and separated by |) contains a tag for the constructor along with the type of data that that constructor can hold. In this example, a LispVal can be:

 * 1) An Atom, which stores a String naming the atom
 * 2) A List, which stores a list of other LispVals (Haskell lists are denoted by brackets)
 * 3) A DottedList, representing the Scheme form (a b . c) . This stores a list of all elements but the last, and then stores the last element as another field
 * 4) A Number, containing a Haskell Integer
 * 5) A String, containing a Haskell String
 * 6) A Bool, containing a Haskell boolean value

Constructors and types have different namespaces, so you can have both a constructor named String and a type named String. Both types and constructor tags always begin with capital letters.

Next, let's add a few more parsing functions to create values of these types. A string is a double quote mark, followed by any number of non-quote characters, followed by a closing quote mark:

parseString :: Stream s m Char => ParsecT s u m LispVal parseString = do char '"'                 x <- many (noneOf "\"") char '"'                 return $ String x

We're back to using the do-notation instead of the >> operator. This is because we'll be retrieving the value of our parse (returned by many (noneOf "\"")) and manipulating it, interleaving some other parse operations in the meantime. In general, use >> if the actions don't return a value, >>= if you'll be immediately passing that value into the next action, and do-notation otherwise.

Once we've finished the parse and have the Haskell String returned from, we apply the String constructor (from our LispVal data type) to turn it into a LispVal. Every constructor in an algebraic data type also acts like a function that turns its arguments into a value of its type. It also serves as a pattern that can be used in the left-hand side of a pattern-matching expression; we saw an example of this in [#symbols Lesson 3.1] when we matched our parser result against the two constructors in the Either data type.

We then apply the built-in function return to lift our LispVal into the Parser monad. Remember, each line of a do-block must have the same type, but the result of our String constructor is just a plain old LispVal. Return lets us wrap that up in a Parser action that consumes no input but returns it as the inner value. Thus, the whole parseString action will have type Parser LispVal.

The $ operator is infix function application: it's the same as if we'd written, but $ is right-associative, letting us eliminate some parentheses. Since $ is an operator, you can do anything with it that you'd normally do to a function: pass it around, partially apply it, etc. In this respect, it functions like the Lisp function apply.

Now let's move on to Scheme variables. An atom is a letter or symbol, followed by any number of letters, digits, or symbols:

parseAtom :: Stream s m Char => ParsecT s u m LispVal parseAtom = do first <- letter <|> symbol rest <- many (letter <|> digit <|> symbol) let atom = [first] ++ rest return $ case atom of                           "#t" -> Bool True "#f" -> Bool False otherwise -> Atom atom

Here, we introduce another Parsec combinator, the choice operator <|>. This tries the first parser, then if it fails, tries the second. If either succeeds, then it returns the value returned by that parser. The first parser must fail before it consumes any input: we'll see later how to implement backtracking.

Once we've read the first character and the rest of the atom, we need to put them together. The "let" statement defines a new variable "atom". We use the list concatenation operator ++ for this. Recall that  is just a single character, so we convert it into a singleton list by putting brackets around it. If we'd wanted to create a list containing many elements, we need only separate them by commas.

Then we use a case statement to determine which LispVal to create and return, matching against the literal strings for true and false. The  alternative is a readability trick: it binds a variable named , whose value we ignore, and then always returns the value of.

Finally, we create one more parser, for numbers. This shows one more way of dealing with monadic values:

parseNumber :: Stream s m Char => ParsecT s u m LispVal parseNumber = liftM (Number . read) $ many1 digit

It's easiest to read this backwards, since both function application ($) and function composition (.) associate to the right. The parsec combinator many1 matches one or more of its argument, so here we're matching one or more digits. We'd like to construct a number LispVal from the resulting string, but we have a few type mismatches. First, we use the built-in function read to convert that string into a number. Then we pass the result to Number to get a LispVal. The function composition operator "." creates a function that applies its right argument and then passes the result to the left argument, so we use that to combine the two function applications.

Unfortunately, the result of  is actually a Parser String, so our combined   still can't operate on it. We need a way to tell it to just operate on the value inside the monad, giving us back a Parser LispVal. The standard function  does exactly that, so we apply liftM to our   function, and then apply the result of that to our Parser.

This style of programming - relying heavily on function composition, function application, and passing functions to functions - is very common in Haskell code. It often lets you express very complicated algorithms in a single line, breaking down intermediate steps into other functions that can be combined in various ways. Unfortunately, it means that you often have to read Haskell code from right-to-left and keep careful track of the types. We'll be seeing many more examples throughout the rest of the tutorial, so hopefully you'll get pretty comfortable with it.

Let's create a parser that accepts either a string, a number, or an atom:

parseExpr :: Stream s m Char => ParsecT s u m LispVal parseExpr = parseAtom <|> parseString <|> parseNumber

And edit readExpr so it calls our new parser:

readExpr :: String -> String readExpr input = case parse parseExpr "lisp" input of    Left err -> "No match: " ++ show err Right _ -> "Found value"

Compile and run this code, and you'll notice that it accepts any number, string, or symbol, but not other strings:

debian:/home/jdtang/haskell_tutorial/code# ghc -package parsec -o simple_parser [.../code/listing3.3.hs listing3.3.hs] debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "\"this is a string\"" Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser 25 Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser symbol Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser (symbol) bash: syntax error near unexpected token `symbol' debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "(symbol)" No match: "lisp" (line 1, column 1): unexpected "(" expecting letter, "\"" or digit

Recursive Parsers: Adding lists, dotted lists, and quoted datums
Next, we add a few more parser actions to our interpreter. Start with the parenthesized lists that make Lisp famous:

parseList :: Stream s m Char => ParsecT s u m LispVal parseList = liftM List $ sepBy parseExpr spaces

This works analogously to parseNumber, first parsing a series of expressions separated by whitespace and then apply the List constructor to it within the Parser monad. Note too that we can pass parseExpr to sepBy, even though it's an action we wrote ourselves.

The dotted-list parser is somewhat more complex, but still uses only concepts that we're already familiar with:

parseDottedList :: Stream s m Char => ParsecT s u m LispVal parseDottedList = do    head <- endBy parseExpr spaces tail <- char '.' >> spaces >> parseExpr return $ DottedList head tail

Note how we can sequence together a series of Parser actions with >> and then use the whole sequence on the right hand side of a do-statement. The expression  returns a , then combining that with parseExpr gives a Parser LispVal, exactly the type we need for the do-block.

Next, let's add support for the single-quote syntactic sugar of Scheme:

parseQuoted :: Stream s m Char => ParsecT s u m LispVal parseQuoted = do    char '\'' x <- parseExpr return $ List [Atom "quote", x]

Most of this is fairly familiar stuff: it reads a single quote character, reads an expression and binds it to x, and then returns, to use Scheme notation. The Atom constructor works like an ordinary function: you pass it the String you're encapsulating, and it gives you back a LispVal. You can do anything with this LispVal that you normally could, like put it in a list.

Finally, edit our definition of parseExpr to include our new parsers:

parseExpr :: Stream s m Char => ParsecT s u m LispVal parseExpr = parseAtom <|> parseString <|> parseNumber <|> parseQuoted <|> do char '('               x <- (try parseList) <|> parseDottedList                char ')' return x

This illustrates one last feature of Parsec: backtracking. parseList and parseDottedList recognize identical strings up to the dot; this breaks the requirement that a choice alternative may not consume any input before failing. The try combinator attempts to run the specified parser, but if it fails, it backs up to the previous state. This lets you use it in a choice alternative without interfering with the other alternative.

Compile and run this code:

debian:/home/jdtang/haskell_tutorial/code# ghc -package parsec -o simple_parser [../code/listing3.4.hs listing3.4.hs] debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "(a test)" Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "(a (nested) test)" Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "(a (dotted . list) test)" Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "(a '(quoted (dotted . list)) test)" Found value debian:/home/jdtang/haskell_tutorial/code# ./simple_parser "(a '(imbalanced parens)" No match: "lisp" (line 1, column 24): unexpected end of input expecting space or ")"

Note that by referring to parseExpr within our parsers, we can nest them arbitrarily deep. Thus, we get a full Lisp reader with only a few definitions. That's the power of recursion.

Stateful monads for concurrent applications
You're going to have to know about Monad transformers  before you can do these things. Although the example came up because of Concurrency, if you realize a TVar is a mutable variable of some kind, why this example came up might make some sense to you.

This is a little trick that I find makes writing stateful concurrent applications easier, especially for network applications. Lets look at an imaginary stateful server.

Each currently connected client has a thread allowing the client to update the state.

The server also has a main logic thread which also transforms the state.

So you want to allow the client to update the state of the program

It's sometimes really simple and easy to expose the whole state of the program in a TVar, but I find this can get really messy, especially when the definition of the state changes!

Also it can be very annoying if you have to do anything conditional.

So to help tidy things up ( Say your state is called World )

Make a monad over state
First, make a monad over the World type

import Control.Monad.State.Lazy

-- heres yer monad -- it can liftIO too type WorldM = StateT World IO

data World = World { objects :: [ WorldObject ] }

Now you can write some accessors in WorldM

-- maybe you have a bunch of objects each with a unique id import Data.Unique import Data.Maybe import Prelude hiding ( id )

data WorldObject = WorldObject { id :: Unique }

-- check Control.Monad.State.Lazy if you are confused about get and put addObject :: WorldObject -> WorldM addObject wO = do   wst <- get put $ World $ wO : ( objects wst )

-- presuming unique id getObject :: Unique -> WorldM ( Maybe WorldObject ) getObject id1 = do   wst <- get return $ listToMaybe $ filter ( \ wO -> id wO == id1 ) ( objects wst )

now heres a type representing a change to the World

data WorldChange = NewObj WorldObject | UpdateObj WorldObject | -- use the unique ids as replace match RemoveObj Unique -- delete obj with named id

What it looks like all there's left to do is to

type ChangeBucket = TVar [ WorldChange ]

mainLoop :: ChangeBucket -> WorldM mainLoop cB = -- do some stuff -- it's probably fun -- using your cheeky wee WorldM accessors mainLoop cB -- recurse on the shared variable

Remember, your main thread is a transformer of World and IO so it can run 'atomically' and read the changeBucket.

Now, presuming you have a function that can incorporate a WorldChange into the existing WorldM your 'wait-for-client-input' thread can communicate with the main thread of the program, and it doesn't look too nasty.

Make the external changes to the state monadic themselves
However! Since all the state inside your main thread is now hidden from the rest of the program and you communicate through a one way channel --- data goes from the client to the server, but the mainLoop keeps its state a secret --- your client thread is never going to be able to make conditional choices about the environment - the client thread runs in IO but the main thread runs in WorldM.

So the REAL type of your shared variable is  type ChangeBucket = TVar [ WorldM ( Maybe WorldChange ) ]

This can be generated from the client-input thread, but you'll be able to include conditional statements inside the code, which is only evaluated against the state when it is run from your main thread

It all sounds a little random, but it's made my life a lot easier. Heres some real working code, based on this idea

 * this takes commands from a client, and attempts change the object representing the client inside the game's state
 * the output from this function is then written to a ChangeBucket ( using the ChangeBucket definition in this section, above ) and run inside the DState of the game's main loop.

( you might want to mentally substitute DState for WorldM )

-- cmd is a command generated from parsing network input mkChange :: Unique -> Command -> DState ( Maybe WorldChange ) mkChange oid cmd = do     mp <- getObject oid -- this is maybe an object, as per the getObject definition earlier in the article -- enter the maybe monad return $ do p <- mp -- if its Nothing, the rest will be nothing case cmd of                    -- but it might be something Disconnect -> Just $ RemoveObject oid Move x y -> Just $ UpdateObject $ DO ( oid ) ( name p ) ( speed p ) ( netclient p ) ( pos p ) [ ( x, y ) ] ( method p )

A note and some more ideas.
Another design might just have type ChangeBucket = TVar [ WorldM ]

And so just update the game world as they are run. I have other uses for the WorldM ( Maybe Change ) type.

So I conclude - All I have are my monads and my word so go use your monads imaginatively and write some computer games ;)

/Not in book

title: Haskell/Practical monads


text:
User:TrackMonkey~enwikibooks

see me at wikipidea insted at TrackMonkey http://en.wikipedia.org/wiki/User:TrackMonkey

title: User:TrackMonkey~enwikibooks


text:
User talk:TrackMonkey~enwikibooks

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 19:03, 15 June 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called TrackMonkey. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name TrackMonkey~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:51, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:36, 19 April 2015 (UTC)

title: User talk:TrackMonkey~enwikibooks


text:
Haskell/Variables and functions

''All the examples in this chapter can be saved into a Haskell source file and then evaluated by loading that file into GHCi. Do not include the "Prelude>" prompts part of any example. When that prompt is shown, it means you can type the following code into an environment like GHCi. Otherwise, you should put the code in a file and run it.''

Variables
In the last chapter, we used GHCi as a calculator. Of course, that's only practical for short calculations. For longer calculations and for writing Haskell programs, we want to keep track of intermediate results.

We can store intermediate results by assigning them names. These names are called variables. When a program runs, each variable is substituted for the value to which it refers. For instance, consider the following calculation:

That is the approximate area of a circle with radius, according to the formula $$A = \pi r^2$$. Of course, it is cumbersome to type in the digits of $$\pi \approx 3.141592653$$, or even to remember more than the first few. Programming helps us avoid mindless repetition and rote memorization by delegating these tasks to a machine. That way, our minds stay free to deal with more interesting ideas. For the present case, Haskell already includes a variable named  that stores over a dozen digits of $$\pi$$ for us. This allows for not just clearer code, but also greater precision:

Note that the variable  and its value, , can be used interchangeably in calculations.

Haskell source files
Beyond momentary operations in GHCi, you will save your code in Haskell source files (basically plain text) with the extension. Work with these files using a text editor appropriate for coding (see the Wikipedia article on text editors). Proper source code editors will provide syntax highlighting, which colors the code in relevant ways to make reading and understanding easier. Vim and Emacs are popular choices among Haskell programmers.

To keep things tidy, create a directory (i.e. a folder) in your computer to save the Haskell files you will create while doing the exercises in this book. Call the directory something like. Then, create a new file in that directory called  with the following code:

That code defines the variable  as the value.

Note: make sure that there are no spaces at the beginning of the line because Haskell is sensitive to whitespace.

Next, with your terminal at the HaskellWikibook directory, start GHCi and load the Varfun.hs file using the  command:

Note that  can be abbreviated as   (as in  ).

If GHCi gives an error like, you are probably running GHCi in the wrong directory or saved your file in the wrong directory. You can use the  command to change directories within GHCi (for instance,  ).

With the file loaded, GHCi's prompt changes from "Prelude" to "*Main". You can now use the newly defined variable  in your calculations:

So, we calculated the area of a circle with radius of 5.0 using the well-known formula $$\pi r^2$$. This worked because we defined  in our Varfun.hs file and   comes from the standard Haskell libraries.

Next, we'll make the area formula easier to quickly access by defining a variable name for it. Change the contents of the source file to:

Save the file. Then, assuming you kept GHCi running with the file still loaded, type  (or abbreviate version  ):

Now we have two variables  and  :

Comments
Besides the working code itself, source files may contain text comments. In Haskell there are two types of comment. The first starts with  and continues until the end of the line:

In this case,  and   are defined in actual Haskell code, but   is not.

The second type of comment is denoted by an enclosing  and can span multiple lines:

By combining single- and multi-line commenting, it is possible to toggle between executed and commented-out code by adding or removing a single  character, respectively: vs.

We use comments for explaining parts of a program or making other notes in context. Beware of comment overuse as too many comments can make programs harder to read. Also, we must carefully update comments whenever we change the corresponding code. Outdated comments can cause significant confusion.

Variables in imperative languages
Readers familiar with imperative programming will notice that variables in Haskell seem quite different from variables in languages like C. If you have no programming experience, you could skip this section, but it will help you understand the general situation when encountering the many cases (most Haskell textbooks, for example) where people discuss Haskell in reference to other programming languages.

Imperative programming treats variables as changeable locations in a computer's memory. That approach connects to the basic operating principles of computers. Imperative programs explicitly tell the computer what to do. Higher-level imperative languages are quite removed from direct computer assembly code instructions, but they retain the same step-by-step way of thinking. In contrast, functional programming offers a way to think in higher-level mathematical terms, defining how variables relate to one another, leaving the compiler to translate these to the step-by-step instructions that the computer can process.

Let's look at an example. The following code does not work in Haskell:

An imperative programmer may read this as first setting  and then changing it to. In Haskell, however, the compiler will respond to the code above with an error: "multiple declarations of ". Within a given scope, a variable in Haskell gets defined only once and cannot change.

The variables in Haskell seem almost invariable, but they work like variables in mathematics. In a math classroom, you never see a variable change its value within a single problem.

In precise terms, Haskell variables are immutable. They vary only based on the data we enter into a program. We can't define  two ways in the same code, but we could change the value by changing the file. Let's update our code from above:

Of course, that works just fine. We can change  in the one place where it is defined, and that will automatically update the value of all the rest of the code that uses the   variable.

Real-world Haskell programs work by leaving some variables unspecified in the code. The values then get defined when the program gets data from an external file, a database, or user input. For now, however, we will stick to defining variables internally. We will cover interaction with external data in later chapters.

Here's one more example of a major difference from imperative languages:

Instead of "incrementing the variable " (i.e. updating the value in memory), this Haskell code is a recursive definition of   (i.e. defining it in terms of itself). We will explain recursion in detail later on. For this specific case, if  had been defined with any value beforehand, then   in Haskell would bring an error message. is akin to saying, in a mathematical context, that $$5 = 5 + 1$$, which is plainly wrong.

Because their values do not change within a program, variables can be defined in any order. For example, the following fragments of code do exactly the same thing:

In Haskell, there is no notion of " being declared before  " or the other way around. Of course, using  will still require a value for , but this is unimportant until you need a specific numeric value.

Functions
Changing our program every time we want to calculate the area of new circle is both tedious and limited to one circle at a time. We could calculate two circles by duplicating all the code using new variables  and   for the second circle:

Of course, to eliminate this mindless repetition, we would prefer to have simply one function for area and then apply it to different radii.

A function takes an argument value (or parameter) and gives a result value (essentially the same as in mathematical functions). Defining functions in Haskell is like defining a variable, except that we take note of the function argument that we put on the left hand side of the equals sign. For instance, the following defines a function  which depends on an argument named  :

Look closely at the syntax: the function name comes first ( in our example), followed by a space and then the argument (  in the example). Following the  sign, the function definition is a formula that uses the argument in context with other already defined terms.

Now, we can plug in different values for the argument in a call to the function. Save the code above in a file, load it into GHCi, and try the following:

Thus, we can call this function with different radii to calculate the area of any circle.

Our function here is defined mathematically as
 * $$A(r) = \pi \cdot r^2$$

In mathematics, the argument is enclosed between parentheses, as in $$A(5) = 78.54$$ or $$A(3) = 28.27$$. Many programming languages likewise surround arguments with parentheses, as in. But Haskell omits parentheses around a list of arguments (as well as commas between them):.

We still use parentheses for grouping expressions (any code that gives a value) that must be evaluated together. Note how the following expressions are parsed differently:

Note that Haskell functions take precedence over all other operators such as  and , in the same way that, for instance, multiplication is done before addition in mathematics.

Evaluation
What exactly happens when you enter an expression into GHCi? After you press the enter key, GHCi will evaluate the expression you have given. That means it will replace each function with its definition and calculate the results until a single value remains. For example, the evaluation of  proceeds as follows:

area 5 =>   { replace the left-hand side  area r = ...  by the right-hand side  ... = pi * r^2 } pi * 5 ^ 2 =>   { replace  pi  by its numerical value } 3.141592653589793 * 5 ^ 2 =>   { apply exponentiation (^) } 3.141592653589793 * 25 =>   { apply multiplication (*) } 78.53981633974483

As this shows, to apply or call a function means to replace the left-hand side of its definition by its right-hand side. When using GHCi, the results of a function call will then show on the screen.

Some more functions:

Multiple parameters
Functions can also take more than one argument. For example, a function for calculating the area of a rectangle given its length and width:

Another example that calculates the area of a triangle $$\left(A = \frac{bh}{2}\right)$$:

As you can see, multiple arguments are separated by spaces. That's also why you sometimes have to use parentheses to group expressions. For instance, to quadruple a value, you can't write:

That would apply a function named  to the two arguments   and. Note that functions can be arguments to other functions (you will see why later). To make this example work, we need to put parentheses around the argument:

Arguments are always passed in the order given. For example:

Here,  evaluates to , but   evaluates to   because the order changes.

On combining functions
Of course, you can use functions that you have already defined to define new functions, just like you can use the predefined functions like addition  or multiplication   (operators are defined as functions in Haskell). For example, to calculate the area of a square, we can reuse our function that calculates the area of a rectangle:

After all, a square is just a rectangle with equal sides.

clauses
When defining a function, we sometimes want to define intermediate results that are local to the function. For instance, consider Heron's formula $$A = \sqrt{s(s-a)(s-b)(s-c)}$$ for calculating the area of a triangle with sides,  , and  :

The variable  is half the perimeter of the triangle and it would be tedious to write it out four times in the argument of the square root function.

Simply writing the definitions in sequence does not work...

... because the variables,  ,   are only available in the right-hand side of the function  , but the definition of   as written here is not part of the right-hand side of. To make it part of the right-hand side, we use the  keyword.

Note that both the  and the local definitions are indented by 4 spaces, to distinguish them from subsequent definitions. Here is another example that shows a mix of local and top-level definitions:

Scope
If you look closely at the previous example, you'll notice that we have used the variable names,  ,   twice, once for each of the two area functions. How does that work?

Consider the following GHCi sequence:

It would have been an unpleasant surprise to return  for the area because of the earlier   definition getting in the way. That does not happen because when you defined  the second time you are talking about a different. This may seem confusing, but consider how many people have the name John, and yet for any context with only one John, we can talk about "John" with no confusion. Programming has a notion similar to context, called scope.

We will not explain the technicalities behind scope right now. Just keep in mind that the value of a parameter is strictly what you pass in when you call the function, regardless of what the variable was called in the function's definition. That said, appropriately unique names for variables do make the code easier for human readers to understand.

Summary

 * 1) Variables store values (which can be any arbitrary Haskell expression).
 * 2) Variables do not change within a scope.
 * 3) Functions help you write reusable code.
 * 4) Functions can accept more than one parameter.

We also learned about non-code text comments within a source file.

title: Haskell/Variables and functions


text:
User:Ronja Addams-Moring

Ronja Addams-Moring Registered WikiBooks user since June 15, 2006.

Edits See: Special:Contributions/Ronja_Addams-Moring.

Why I care about WikiBooks I have been an avid reader since the age of four, and the first thing I did after learning to read was to start teaching my friends in the yard to read, too. So I guess I liked to share my books already then. Furthermore, I think the whole Wikimedia phenomenon is awesome, and I would like to do my share. I see WikiBooks as an important promoter for free information and learning and a workable way to develop higher quality teaching with marginal added cost.

If you want to know more about me I am also a registered user on Wikipedia and on Wiktionary. See my web page for more details, such as my full publication list.

--Ronja Addams-Moring 22:50, 15 June 2006 (UTC)

title: User:Ronja Addams-Moring


text:
Cookbook:Pikelet (Australian Mini Pancakes)

| New Zealand | Pancake

Pikelets are small, thick pancakes, and are standards of the New Zealand kitchen. They are also made in Australia.

Ingredients

 * 125 g strong bread flour
 * 125 g plain flour
 * 1½ teaspoons bicarbonate of soda
 * 8 g fresh yeast
 * 75 ml lukewarm whole milk
 * ½ teaspoon salt
 * 250 ml lukewarm water

Procedure

 * 1) Sift the flours into a large mixing bowl, adding half a teaspoon of the bicarbonate of soda and the salt.
 * 2) Crumble the yeast into a small bowl and slowly add the water until you have a brown paste.
 * 3) Pour the liquid yeast into the mixing bowl.
 * 4) Mix it about a bit until you have a very thick batter. You can use a wooden spoon, but you get much better results if you get stuck in and use your hands.
 * 5) Cover the bowl with a warm and damp cloth and leave in a warm place for 2 hours.
 * 6) Return to the now frothy batter (if it is not then you have done something wrong). Dissolve the rest of the bicarbonate of soda in the lukewarm milk and slowly add it to the batter.
 * 7) Heat a lightly greased griddle or ordinary frying pan until very hot. Now, using one spoonful at a time, cook the mixture for about 2 minutes on each side. The indication to turn should be when the bubbles that will form dry out.


text:
Adventist Youth Honors Answer Book/Nature/Trees

1. Describe the ways in which trees and shrubs differ.
Trees are generally taller than shrubs and have a main trunk from which all the secondary branches grow. Shrubs are generally shorter and may have multiple stems rather than a single trunk. Some plants can be considered either shrubs or trees depending on their growing conditions, so the division should not be considered exact.

a. What they are used for

 * Sweet Gum: the gummy sap of this tree has been used as chewing gum.
 * Cork Oak forms a thick, rugged and corky bark. Over time this bark can develop considerable thickness, and this is harvested every 10–12 years as cork.
 * Balsam Fir: produces a resin which is known as Canadian Balsam. A balsam is the same thing as a balm, a soothing liquid - anything that soothes, heals, or restores.
 * Boxwood: produces a tight-grained wood ideal for carving or for making boxes.
 * Pine: used for furniture and making paper.

b. The surroundings or environment in which they grow

 * Mountain Ash grow in the mountainous areas of the northern US and Canada.
 * Swamp Ash live in the swamps of the southern US.

c. Some distinctive feature

 * Sugar Maple: The primary source of sugary maple syrup.
 * Hornbeam: The common English name of "hornbeam" derives from the hardness of the wood (likened to horn) and the Old English beam, meaning a tree (like the German word "baum" which we know as "tannenbaum").
 * Tulip Tree: is so named because its flowers resemble tulip flowers.

d. The geographic region in which they live

 * Brazilwood: is not named after Brazil - Brazil is actually named for the tree!
 * Cedar of Lebanon, is a coniferous tree native to the mountains of the Mediterranean region, in Lebanon, western Syria and south central Turkey
 * Mexican Buckeye is a shrub or small tree native to northeastern Mexico and adjacent western Texas and southern New Mexico.

e. Persons who first found and described them

 * Douglas Fir: The common name honors David Douglas, the Scottish botanist who first introduced the tree into cultivation in 1826.
 * Fraser Fir: named after John Fraser, a Scottish botanist. Fraser Firs are farmed and sold as Christmas trees.

4. Give the common name and tell the difference between the two great classes of trees.
The two great classes of trees are the gymnosperms and angiosperms. The gymnosperms do not produce flowers, but rather, produce naked seeds usually attached to the scale of a cone (such as a pine cone). The angiosperms do produce flowers which in turn become seed-bearing fruits (or nuts). More commonly, the gymnosperms are called evergreens, though this is not an accurate term because some angiosperms are evergreen (such as palms and the live oak). Also, the Ginkgo is a gymnosperm, but it is not evergreen. Gymnosperms and angiosperms are also commonly referred to as softwoods and hardwoods though those terms are not terribly accurate either, as several gymnosperms have hard wood and several angiosperms have soft wood.

5. Describe the importance of forest conservation in your area.
Properly managed, forests are a renewable resource. In order to ensure a continuous supply of forest products (such as lumber), forests must be properly cut and replanted. Forests also serve as an important habitat for several species, both animal and plant. When plants lose their habitat they simply die. When animals lose their habitat, some will die and others will move into other areas - notably, areas where humans live. This promotes undesirable encounters between potentially dangerous animals and humans, with the animal invariably getting the short end of the stick.

6. Name several examples of the kinds of wood used in each of the following
Such things should be recorded in the pathfinder folder as evidence for completion for inspection.
 * a. Flooring for houses: Oak, maple, pine, teak.
 * b. Common plywood: Pine, fir, spruce
 * c. Furniture: Walnut, oak, cherry, maple, pine, mahogany
 * d. Ax handles: Hickory, ash
 * e. Fence posts: Locust, cedar, redwood, fir (treated)
 * f. Railroad ties: Hardwoods and softwoods.
 * g. Support beams for construction work: Oak, hickory, ash
 * h. Bows and arrows: Osage orange, yew, and elm for bows. Cedar, spruce, and fir for arrows
 * i. Ideal for use as kindling: Softwoods such as pine and cedar.
 * j. Burns slowly and leaves a bed of hot coals: Hardwoods, especially hickory and mesquite.

7. Name two examples each of trees which
In Australia - 1. River Red Gum (Eucalyptus camaldulensis): this species is found throughout inland Australia. It is found along permanent watercourses, on seasonal floodplains and in woodlands. In general, River Red Gums can tolerate frequent flooding events lasting up to 6–8 months, but also require dry phases of similar time periods. Family: Myrtaceae. 2. Black Box (Eucalyptus largiflorens): this species is found in association with River Red Gums in the western part of NSW in periodically flooded areas, also in depressions and single species stands. It is often found higher up on the floodplain and can withstand drier conditions compared to River Red Gums. In general Black Box trees can tolerate flooding periods of up to approximately 4 months and dry conditions for 6+ years. Family: Myrtaceae. 3. River Cooba (Acacia stenophylla): this species occurs throughout the region wherever river, creeks, permanent or ephemeral wetlands are found in close association with River Red Gums. It is a straggly shrub or tree, growing to 10 m high with thin drooping leaves, with pale yellow flowers, flowering in summer and early autumn. Family: Mimosaceae.
 * a. Grow best in wet lands: Bald Cypress, Sycamore, Willow, Swamp White Oak, Swamp Chestnut Oak, Overcup Oak, Tupelo Gum and Cottonwood.

Larch, Bristlecone Pine (and many other pines), Birch, and Beech.
 * b. Grow best at high levels in mountains:

In Australia - Snow gums and alpine ash trees heavily forest the mountains. Wildflowers, heathlands, alpine herbfields and snowplains, mossbeds and snowpatch communities grow in the higher exposed areas too harsh for trees to survive.


text:
Talk:OpenGL Programming/GLStart/Tut1

I don't think the two books should be merged ... this one looks like a windows - specific book while the other looks like Mac/Linux/Win in general.

"The first parameter is the handle to the window we want to show (hWnd). The second parameter is the variable we created at the initialization of the WinMain function (nShowCmd): ShowWindow(hWnd,nShowCmd);" - Does it means nCmdShow not nShowCmd?

title: Talk:OpenGL Programming/GLStart/Tut1


text:
Managing Groups and Teams/Social Loafing

= Definition of Social Loafing =

Social loafing describes the phenomenon that occurs when individuals exert less effort when working as a group than when working independently. Research indicates that there is some degree of social loafing within every group, whether high-functioning or dysfunctional.

In 1913, a French agricultural engineer, Max Ringlemann, identified this social phenomenon. He recognized a collective group performance required less effort by individuals compared to the sum of their individual efforts (Kravitz & Martin, 1986). The effect he noted has been termed the Ringlemann Effect. In this experiment, participants pulled on a rope attached to a strain gauge. Ringlemann noted that two individuals pulling the rope only exerted 93% of their individual efforts. A group of three individuals exerted 85% and groups of eight exerted 49% of their combined individual effort. As more individuals pulled on the rope, each individual exerted themselves less. From these observations, Ringlemann determined that individuals perform below their potential when working in a group (LaFasto & Larson, 2001, p. 77).

Since Ringlemann’s observation, social loafing has been identified in numerous studies. Social loafing has several causes and effects that will be discussed in this document, as well as methods for dealing with social loafing to promote more effective group work.

Ringleman's brainchild of social loafing has now been used within a diverse variety of studies, ranging from its impact on sports teams to the affects on groups within huge conglomerates.’ (Dr Karen Virendra Patel, 2002; pg 124)

Causes of Social Loafing
Many theories explain why social loafing occurs., below are several explanations of social loafing causes:

Equitable contribution: Team members believe that others are not putting forth as much effort as themselves. Since they feel that the others in the group are slacking, they lessen their efforts too. This causes a downward cycle that ends at the point where only the minimum amount of work is performed.

Submaximal goal setting: Team members may perceive that with a well-defined goal and with several people working towards it, they can work less for it. The task then becomes optimizing rather than maximizing.

Lessened contingency between input and outcome: Team members may feel they can hide in the crowd and avoid the consequences of not contributing. Or, a team member may feel lost in the crowd and unable to gain recognition for their contributions (Latane, 1998). This description is characteristic of people driven by their uniqueness and individuality. In a group, they lose this individuality and the recognition that comes with their contributions. Therefore, these group members lose motivation to offer their full ability since it will not be acknowledged (Charbonnier et al., 1998). Additionally, large group sizes can cause individuals to feel lost in the crowd. With so many individuals contributing, some may feel that their efforts are not needed or will not be recognized (Kerr, 1989).

Lack of evaluation: Loafing begins or is strengthened in the absence of an individual evaluation structure imposed by the environment (Price & Harrison, 2006). This occurs because working in the group environment results in less self-awareness (Mullen, 1983). For example, a member of a sales team will loaf when sales of the group are measured rather than individual sales efforts.

Unequal distribution of compensation: In the workplace, compensation comes in monetary forms and promotions and in academics it is in the form of grades or positive feedback. If an individual believes compensation has not been allotted equally amongst group members, he will withdraw his individual efforts (Piezon & Donaldson, 2005).

Non-cohesive group: A group functions effectively when members have bonded and created high-quality relationships. If the group is not cohesive, members are more prone to social loafing since they are not concerned about letting down their teammates (Piezon & Donaldson, 2005).

Effects of Social Loafing
Social loafing engenders negative consequences that affect both the group as a whole as well as the individual.

Effects on Groups
As explained in the Ringlemann Effect, output decreases with increased group membership, due to social loafing. This effect is demonstrated in another study by Latane, et al. In this experiment subjects were asked to yell or clap as loudly as possible. As in Ringlemann’s study, the overall loudness increased while individual output decreased. People averaged 3.7 dynes/sq cm individually, 2.6 in pairs, 1.8 in a group of four, and 1.5 in a group of six. In this study there was no block effect (indicating tiredness or lack of practice). Due to social loafing, average output for each individual decreases due to the perception that others in the group are not putting forth as much effort as the individual.

In considering this first experiment, some individuals suggested that results might be invalid due to acoustics (i.e. voices canceling each other out or voices not synchronized). To disprove this theory, another experiment was performed. For this study, participants were placed in individual rooms and wore headphones. In repeated trials, these participants were told they were either shouting alone or as part of a group. The results demonstrated the same trend as in the first experiment--individual performance decreased as a group size increased (Latane, 1979).

In reality, there are not many groups with the objective of yelling loud, however the example above illustrates a principle that is common in business, family, education, and in social gatherings that harms the overall integrity and performance of a team by reducing the level of output, one individual at a time. The negative social cues involved with social loafing produce decreased group performance (Schnake, 1991, p. 51). Reasonable consequences of social loafing also include dissatisfaction with group members who fail to contribute equally and the creation of in groups and out groups. Additionally, groups will lack the talents that could be offered by those who choose to not contribute. All of these factors result in less productivity.

Effects on Individuals
The preceding section identifies the effect of social loafing on a group which is arguably the most prominent consequence of the group behavior. However, social loafing also has an impact on the individuals that comprise the group. There are various side effects that individuals may experience.

One potential side effect is the lack of satisfaction that a member of the group might experience, thereby becoming disappointed or depressed at the end of project. When a member of a group becomes a social loafer, the member reduces any opportunity he might have had to grow in his ability and knowledge. Today, many college level classes focus on group projects. The ability for an individual to participate in social loafing increases at the group increases in number. However, if these groups remain small the individual will not have the opportunity to become invisible to the group and their lack of input will be readily evident. The lack of identifiably in a group is a psychological production that has been documented in several studies. (Carron, Burke & Prapavessis, 2004)

Social loafing can also negatively impact individuals in the group who perform the bulk of the work. For example, in schoolwork teams are often comprised of children of varying capacities. Without individual accountability, often only one or a few group members will do most of the work to make up for what the other students lack. Cheri Yecke, Minnesota’s commissioner of education, explains that in these instances group work can be detrimental to the student(s) who feel resentment and frustration from carrying the weight of the work. Yecke recounted an experience of one child who felt she had to “slow down the pace of her learning and that she could not challenge the group, or she would be punished” with a lower grade than desired. Especially in situations where members of the group of differing abilities, social loafing negatively affects group members who carry the weight of the group.

Culture
Social loafing is more likely to occur in societies where the focus is on the individual rather than the group. This phenomenon was observed in a study comparing American managers (individualistic values) to Chinese managers (collectivistic values). Researchers found that social loafing occurred with the American managers while there was no such occurrence with the Chinese managers. The researchers explained this through a comparison between collectivistic and individualistic orientations.

A collectivistic orientation places group goals and collective action ahead of self-interests. This reinforces the participants' desires to pursue group goals in order to benefit the group. People from this orientation view their individual actions as an important contribution to the group's well-being. They also gain satisfaction and feelings of accomplishment from group outcomes. Further, collectivists anticipate that other group members will contribute to the groups' performance and so they choose to do the same in return. They view their contributions to group accomplishments as important and role-defined (Earley, 1989).

In contrast, an individualist's motive is focused on self-interest. Actions by these individuals emphasize personal gain and rewards based on their particular accomplishments. An individualist anticipates rewards contingent on individual performance. Contribution toward achieving collective goals is inconsistent with the self-interest motive unless differential awards are made by the group. Individuals whose contributions to group output go unnoticed have little incentive to contribute, since they can "loaf" without fear of consequences. As a result, an individualist can maximize personal gain without putting forth as much effort as had he/she done the work individually. The self-interest motive stresses individual outcomes and gain over the collective good (Earley, 1989).

Gender
Research indicates that women are more inclined to sustain group cohesion where men are more interested in task achievement. As a result, women, who deem collective tasks more significant than individual tasks, are less likely to engage in social loafing than men. This phenomenon is demonstrated in a study conducted by Naoki Kugihara. To determine the social loafing effect on men versus women, he had 18 Japanese men and 18 Japanese women pull on a rope, similar to the Ringlemann experiment. On the questionnaire, several participants indicated their perception that they pulled with their full strength. However, Kugihara observed the men did decrease their effort once involved in collective rope pulling. Conversely, the women did not show a change in effort once involved collectively.

In the paper reporting the results of this study, Kugihara explains some reasoning behind this different reaction between men and women. In observing Japanese junior high students, Tachibana and Koyasu found that boys engaged more earnestly in the task when they were told that achievement was being measured. When they were told they could relax and enjoy the task, the boys did not put forth as much effort. However, with the girls they did not notice any change in effort between the achievement and relaxation tasks. These results indicate that men are more likely to engage in social loafing in a group setting because they will not be driven by achievement motivation since their efforts will not be as visible. However, women tend to not be affected by achievement motivation and therefore are less likely to engage in social loafing (1999).

Confronting the Social Loafer

No one ever likes to be confronted or told what to do. So in a group setting, what is the best way to make the most out of each individual’s contributions? Especially in groups where there is no designated leader, it is difficult for one group member to confront another. However, Dan Rothwell offers advice for handling these situations.

Private confrontation: The team leader or a selected team member should confront the social loafer individually. This individual should solicit the reasons for the lackluster effort. Additionally, the loafer should be encouraged to participate and understand the importance of his contributions.

Group confrontation: The entire group can address the problem to the dissenting team member and specifically address the problem(s) they have observed. They should attempt to resolve the problem and refrain from deleterious attacks on the slacking individual.

Superior assistance: After trying to address the problem with the individual both privately and as a group, group members should seek the advice of a superior, whether it be a teacher, boss or other authority figure. Where possible, group members should provide documented evidence of the loafing engaged by the individual (De Vita, 2001). The person in authority can directly address the problem with the lackluster team member. Exclusion: The loafer should only be booted out of the group as a last resort. However, this option may not be feasible in some instances.

Circumvention: If all the above steps have been attempted without result, then the group can reorganize tasks and responsibilities. This should be done in a manner that will result in a desirable outcome whether or not the loafer contributes.

(Rothwell, 2004)

Preventing Social Loafing

In order to prevent or limit the effects of social loafing, there are a number of guidelines a team leader might initiate to manage team members’ efforts toward team goals. Though some do depend upon the nature of the team and the type of team, most of these guidelines can be adapted to provide a positive benefit to all teams.

Develop rules of conduct: Setting rules at the beginning will help all team members achieve the team objectives and performance goals. Establishing ground rules can help to prevent social loafing and free-riding behaviors by providing assurances that free-riding attempts will be dealt with (Cox, 2007).

Create appropriate group sizes: Do not create or allow a team to undertake a two-man job. For example, municipal maintenance crews often have crew members standing around watching one or two individuals work. Does that job really require that many crew members?

Establish individual accountability: This is critical for initial assignments that set the stage for the rest of the task (Team Based). Tasks that require pre-work and input from all group members produce a set of dynamics that largely prevent social loafing from happening in the first place. If this expectation is set early, individuals will avoid the consequences of being held accountable for poor work.

Encourage group loyalty: Not all cultures experience social loafing. In China, social striving, the opposite of social loafing, occurs. In these cases, individual performance is enhanced by being in a group (Davies, 2006). The individuals care more about the success of the group than their own success. They have a clear view of the group’s objective and what leads to its fulfillment. This sense of group loyalty is created by individual awareness of the team’s position in reaching the goal. If production plant employees know the goal, know how far they need to go, and where the competition is, they are more inclined to work towards the goal than if they did not have that knowledge.

Implement peer evaluation: In academic cultures, college instructors use peer evaluations to instill accountability for individual contributions in group products. These evaluations are given early in the term and are more effective in deterring social loafing than peer evaluations given later in the term (Brooks & Ammons, 2003).

Write a team contract: Confusion and miscommunication can cause social loafing. Although it may seem formal, writing a team contract is a good first step in setting group rules and preventing social loafing. This contract should include several important pieces of information such as group expectations, individual responsibilities, forms of group communication, and methods of discipline. If each group member has a measurable responsibility that they alone are accountable for, he is not able to rely on the group for his portion of responsibility.

Choose complementary team members: When possible, carefully choose individuals to join a team. Make sure they have strengths and personalities that will complement other group members rather than deter from reaching the group goal.

Minimize group size: Whenever possible, minimize the number of people within a group. The fewer people available to diffuse responsibility to, the less likely social loafing will occur.

Establish ground rules: Discuss what the team’s goals and objectives are and then develop a process to meet them. Agree to perform by team roles discussed in the initial meeting of a project. Also discuss consequences of not following rules and the process to call an individual on their negative behavior.

Specifically define the task: Clarify the importance of the task to the team and assign members to do particular assignments. Establish expectations through specific measurable and observable outcomes, such as due dates. At the end of each meeting, refresh everyone’s memories as to who is required to do what by when and offer clarification on required duties.

Create personal relationships: Provide opportunities for members to socialize and establish trusting relationships. Dedicated relationships cause people to fulfill their duties more efficiently.

Highlight achievement: Invite members of management to attend team sessions. Allow team accomplishments to shine through to superiors. Close meetings by summarizing their group’s successes. Pat them on the back and remind them of their upcoming duties.

Establish task importance: Allow team members the opportunity to demonstrate their willingness to do their work in a timely fashion.

Evaluate progress: Meet individually with team members to assess their successes and areas of improvement. Discuss ways in which the team leader may provide additional support so the task may be completed. When possible, develop an evaluation based on an individual contribution. This can be accomplished through individual group members’ evaluations of others on team.

Manage discussions: Ensure that all team members have the opportunity to speak. Make every individual feel they have a valuable role on the team and their input is important to group success.

Engage individuals: When intrinsic involvement in the task is high, workers may feel that their efforts are very important for the success of the group and thus may be unlikely to engage in social loafing even if the task visibility is low.


text:
User:M0rpheu$

I'm currently doing my Masters in Information Technology.

Current Projects
/ARM Assembly Language/ /ARM Instructions/

title: User:M0rpheu$


text:
Embedded Systems/ARM Assembly Language

We go into more detail on how to use ARM assembly language in ../ARM Microprocessors/.

title: Embedded Systems/ARM Assembly Language


text:
Suomen kieli ulkomaalaisille/Sisältö/Essiivi

Essive case
The essive or case carries the meaning of a temporary state of being, often equivalent to the English as a....

In the Finnish language, this case is marked by adding -na/-nä to the stem of the noun.

The essive case ending -na or -nä will not cause a strong grade stem to weaken.

Examples:

 * lapsena as a child, when (I/he/you) was a child.
 * lapsina as children,when (we/you'all/they) were children.
 * Hän on opettajana he is teaching (temporarily) or he is working as a teacher for the time being
 * If his profession was a teacher and is likely to remain so the statement would be Hän on opettaja He is a teacher

You can add personal suffixes to words that are in essive, although the resulting forms are not so common.

Examples:

 * lääkärinäsi as your doctor, when (I/he/you) was your doctor.
 * lääkäreinäsi as your doctors,when (we/you'all/they) were your doctors.

Some verb structures always feature essive:

 * Pitää jotakuta jonakin (regard someone as something)
 * Hän pitää minua aivan tyhmänä

 * Olla hulluna johonkin ("Be as a mad into something")
 * Hän on hulluna japanilaisiin sarjakuviin.

Pronouns have their own essive forms.

minä -> minuna, sinä -> sinuna, hän -> hänenä, me -> meinä, te -> teinä, he -> heinä

 * Teinä kiirehtisin.
 * Sinuna olisin ystävällisempi häntä kohtaan.

tämä -> tänä, tuo -> tuona, se -> sinä

 * Hän saapui tuona myrskyisenä iltana.
 * Me lähdimme sinä päivänä, kun meri oli tyyni.

nämä -> näinä, nuo -> noina, ne -> niinä

 * Laivat lähtevät pian, aivan näinä päivinä.

jokin -> jonakin, joku -> jonakuna, jompikumpi -> jompanakumpana, sellainen -> sellaisena

 * Hän sanoi että hän haluaisi esiintyä jonakin muuna hahmona tässä näytelmässä.

Essive can be used as a kind of participial phrase like in the following examples

 * Koska olen lääkäri yritän auttaa potilaita. -> Lääkärinä yritän auttaa potilaita.

 * Jos olisin lääkäri pystyisin parantamaan sinut. -> Lääkärinä pystyisin parantamaan sinut.

In Finnish, the essive case is also used for specifying times, days and dates when something happens. For

Examples:

 * maanantaina on Monday
 * tiistaina on Tuesday
 * kuudentena joulukuuta on the 6th of December.
 * Kuusi six (nominal)-> kuudes sixth (ordinal) -> kuudennen of the sixth (genetive stem weak grade kudenne-) -> kuudentena on the sixth (Essive used to express time. Note the strong grade nt compared to the weak grade genitive nn)

 * jouluna at Christmas
 * pääsiäisenä at Easter
 * tänä talvena in this winter
 * ensi talvena next winter
 * tulevana talvena in the following winter
 * Jonakin päivänä some day or one of these days.
 * The root words here are jokin päivä which is some day in a neutral form, but when inflected in the essive it is used to express that something will happen at some unspecified time
 * The rather unusal inflection pattern of the word jokin is standard in all cases, Thus we have jossakin, jostakin, johonkin etc.

Exercise Number One
Please make singular and plural essive forms of the following Finnish nominative nouns.

 * Lääkäri -> lääkärinä (singular), lääkäreinä (plural)

 * 1) Johtaja
 * 2) Opettaja
 * 3) Kirurgi
 * 4) Ohjelmoija
 * 5) Näyttelijä
 * 6) Palomies

Exercise Number Two
Please complete the sentences with the help of Finnish words that are in brackets. You must use essive.

Minä pidän sinua (ystävällinen ihminen.) -> Minä pidän sinua ystävällisenä ihmisenä. (I regard you as a friendly person)

 * 1) Minä pidän häntä (suuri johtaja).
 * 2) Minä pidän sitä (erikoinen ratkaisu).
 * 3) Hän pitää sitä (moderni rakennus).
 * 4) Pidätkö sinä häntä (ahkera lehtimies)?
 * 5) Pekka pitää vaimoaan (kaunis nainen).

 * 1) Minä pidän heitä (hyviä johtajia).
 * 2) Naapurini pitää heitä (ystävällisiä naisia).
 * 3) Minä pidän niitä (suuria rakennuksia).
 * 4) He pitävät heitä (ahkeria lääkäreitä).
 * 5) Pidätkö sinä noita (hienoja mökkejä).

Exercise Number Three
In this exercise you must form nouns that are in plural and essive. The given nouns are in singular nominative.

An example:
 * Me olemme parempia (tutkija) kuin (lääkäri) -> Me olemme parempia tutkijoina kuin lääkäreinä.

 * 1) Me olemme parempia (palomies) kuin (kirjanpitäjä).
 * 2) Me olemme parempia (johtaja) kuin (alamainen).
 * 3) Te olette parempia (seppä) kuin (sähköasentaja).
 * 4) He ovat parempia (soittaja) kuin (laulaja).

Exercise Number Four
Make sentences that state at what date your birthday is. Note that birthday (syntymäpäivät) is always in plural in Finnish. The word "päivänä" is not compulsory

 * 4.2. -> Minun syntymäpäiväni ovat neljäntenä (päivänä) helmikuuta. (My birthday is/is celebrated on the fourth of February)

 * 1) 3.1
 * 2) 5.2
 * 3) 7.3
 * 4) 10.4

 * 1) 14.1
 * 2) 16.2
 * 3) 19.3.
 * 4) 12.4

Exercise Number Five
Translate these into Finnish.

 * 1) You have done great job as the manager of this company!
 * 2) He is good as a doctor but not as a politician.
 * 3) As her I would not touch it.
 * 4) He left on Sunday and came back in the following Wednesday.
 * 5) Being foreigners they didn't understand much.
 * 6) They went on a walk in a very beautiful and misty morning.

Exercise Number One

 * 1) johtajana, johtajina
 * 2) opettajana, opettajina
 * 3) kirurgina, kirurgeina
 * 4) ohjelmoijana, ohjelmoijina
 * 5) näyttelijänä, näyttelijöinä
 * 6) palomiehenä, palomiehinä

Exercise Number Two

 * 1) Minä pidän häntä suurena johtajana.
 * 2) Minä pidän sitä erikoisena ratkaisuna.
 * 3) Hän pitää sitä modernina rakennuksena.
 * 4) Pidätkö sinä häntä ahkerana lehtimiehenä?
 * 5) Pekka pitää vaimoaan kauniina naisena.

 * 1) Minä pidän heitä hyvinä johtajina.
 * 2) Naapurini pitää heitä ystävällisinä naisina.
 * 3) Minä pidän niitä suurina rakennuksina.
 * 4) He pitävät heitä ahkerina lääkäreinä.
 * 5) Pidätkö sinä noita hienoina mökkeinä?

Exercise Number Three

 * 1) Me olemme parempia palomiehinä kuin kirjanpitäjinä.
 * 2) Me olemme parempia johtajina kuin alamaisina.
 * 3) Te olette parempia seppinä kuin sähköasentajina.
 * 4) He ovat parempia soittajina kuin laulajina.

Exercise Number Four

 * 1) 3.1 -> Minun syntymäpäiväni ovat kolmantena (päivänä) tammikuuta.
 * 2) 5.2 -> Minun syntymäpäiväni ovat viidentenä helmikuuta.
 * 3) 7.3 -> Minun syntymäpäiväni ovat seitsemäntenä maaliskuuta.
 * 4) 10.4. ->Minun syntymäpäiväni ovat kymmenentenä huhtikuuta.

 * 1) 14.1. ->Minun syntymäpäiväni ovat neljäntenätoista (päivänä) tammikuuta.
 * 2) 16.2. ->Minun syntymäpäiväni ovat kuudentenatoista helmikuuta.
 * 3) 19.3. ->Minun syntymäpäiväni ovat yhdeksäntenätoista maaliskuuta.
 * 4) 12.4. ->Minun syntymäpäiväni ovat kahdentenatoista huhtikuuta.

Exercise Number Five

 * 1) Olet tehnyt erinomaista työtä tämän yhtiön johtajana!
 * 2) Hän on hyvä lääkärinä muttei poliitikkona. (muttei = mutta ei)
 * 3) Hänenä en koskisi siihen.
 * 4) Hän lähti sunnuntaina ja tuli takaisin seuraavana keskiviikkona.
 * 5) Koska he olivat ulkomaalaisia he eivät ymmärtäneet paljoa. OR Ulkomaalaisina he eivät...
 * 6) He menivät kävelylle (eräänä/yhtenä) hyvin kauniina ja sumuisena aamuna.


text:
User talk:Phonuz

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 10:02, 16 June 2006 (UTC)

Image Copyright Problem: Image:HATROTATION.jpg
Thanks for uploading Image:HATROTATION.jpg. The Wikimedia Foundation is very careful about the images included in Wikibooks because of copyright law. We need you to specify two things on the image description page:
 * The copyright holder, and
 * The copyright status

The copyright holder is usually the creator. If the creator was paid to make this image, then their employer may be the copyright holder. If several people collaborated, then there may be more than one copyright holder. If you created this image, then you are the copyright holder.

Because of the large number of images on Wikibooks, we've sorted them using image copyright tags. Just find the right tag corresponding to the copyright status of this image, and paste it onto the image description page like this:.

There are 2 basic ways to licence an image on Wikibooks:
 * 1) An open content licence
 * Public Domain

 * The copyright holder gets the best protection of his work by licencing their work under an open content license like the Creative Commons Attribution-ShareAlike licence. If you have the express permission of the copyright holder to licence their work under the above licence, use the image copyright tag: cc-by-sa-2.5.  The GNU Free Documentation License is another choice for licencing one's work.  Again, if you have the express permission of the copyright holder, use the tag: GFDL.

 * The copyright holder can also release his work into the public domain, see here for images released into the public domain.
 * Images from certain sources are automatically release into the Public Domain. This is true for most governments like the federal United States government. However not all governments release their work into the public domain, such as the UK government .  Non-free licence governments are listed here.

For any other sources of for more information see Image copyright tags. Please remember that if you don't tag your images, they will be deleted.

 * P.S. If you have uploaded other images without including copyright tags, please go back and tag them.  Also, please tag all images that you upload in the future.

If you have any questions, just leave a message on my talk page. Thanks again.

 * Click on the link to image description page above. I can't see anything there. --Derbeth talk 08:58, 13 May 2006 (UTC) Derbeth talk 10:02, 16 June 2006 (UTC)

Copyright problem with Image:HATADJUST.jpg

 * – Mike.lifeguard  | talk 15:40, 21 September 2007 (UTC)

title: User talk:Phonuz


text:
User talk:Ken Johnston

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 10:15, 16 June 2006 (UTC)

Image copyright problem with Image:SMEs as Knowledge Engineers.PNG
Thanks for uploading Image:SMEs as Knowledge Engineers.PNG. However, the image may soon be deleted unless we can determine the copyright holder and copyright status. The Wikimedia Foundation is very careful about the images included in Wikibooks because of copyright law (see Wikibooks' Copyright policy).

The copyright holder is usually the creator, the creator's employer, or the last person who was transferred ownership rights. Copyright information on images is signified using copyright templates. The three basic license types on Wikibooks are open content, public domain, and fair use. Find the appropriate template in Image copyright tags and place it on the image page like this:.

Please signify the copyright information on any other images you have uploaded or will upload. Remember that images without this important information or giving false information can be deleted by an administrator. If you have any questions, feel free to contact me, or ask them at the Study help desk. Thank you. Derbeth talk 10:15, 16 June 2006 (UTC)

title: User talk:Ken Johnston