OpenLLM-France/wikimedia huggingface dataset:
# Java Platform, Enterprise Edition/Java EE Tutorial/An Introduction to Servlet

A Servlet is a Java class that runs in the Server machine on an HTTP request from client and creates an html as response to the client. Servlets are stored in a Servlet Container in the Web Server and are mapped to URLs, for which the servlet constructs response.

## HTTP Requests

GET, HEAD, POST, PUT, DELETE, OPTIONS and TRACE are the request methods defined by HTTP 1.1 . Among these methods GET and POST are the most common. When a client tries to access a URL, he/she is actually sending a GET request to the server while a POST request is used to submit an HTML form.

## Requirements for a Servlet

* A Servlet responds to HTTP requests (like GET,POST,etc.). In order to respond to any of these requests a servlet class has to extend HttpServlet class and contain their corresponding metod which overrides the original method in the HttpServlet class. For example to respond to a GET request from the client, the source code of the servlet should have the following structure.
In the Servlet, instructions can be written to construct or write the html file to be send. It is explained in next chapter.
* Compile the Servlet source file and place the class file(servlet) in the Servlet Container. Location of the Servlet container is corresponding the Server. For example in Apache Tomcat, the Servlet should be placed in "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ApplicationName\WEB-INF\classes\" (Assuming that "C:\Program Files\Apache Software Foundation\Tomcat 5.5" is the installed directory).
* Set the classpath to the Servlet container.
* Create(or update) the Deployment Descriptor. Deployment descriptor is an xml file with name "web.xml" which should be placed along with the classes folder in the folder, "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ApplicationName\WEB-INF\". How to set servlet properties in the web.xml is detailed in the next chapter.
In the next chapter, we will create and deploy a simple "Helloworld" servlet.
| Previous: | First Applet | Up: | Java Platform, Enterprise Edition/Java EE Tutorial | Next: | First Servlet |
# Java Platform, Enterprise Edition/Java EE Tutorial/Installing Application Server
## The example of Tomcat

Tomcat is an example of application server that implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems. Tomcat deploys the WAR files that archive the web applications.
Environment variables have to be configured, for instance, as:
    JAVA_HOME=C:\Program Files\Java\jdk1.5.0_10
    TOMCAT_HOME=C:\apache-tomcat-5.5.12
# Java Platform, Enterprise Edition/Java EE Tutorial/Writing in JSP
## Scripting Elements

Expressions of the form <%= expression %> Scriptlets of the form <% code %> Declarations of the form <%! code %>
JSP directive <%@ directive attribute="value" attribute2="value2" %>
JSP Comment <%-- JSP Comment --%>
# Java Platform, Enterprise Edition/Java EE Tutorial/First Servlet

Here we are going to create and deploy a simple servlet for an Apache Tomcat Server. The servlet will produce and send an html (with String "Hello World") to the client browser.

## Creating the Servlet

* Create the source file HelloWorld.java. The content of the source file HelloWorld.java is given below.
Note that response.getWriter is an instance of PrintWriter with which we are writing the HTML.
* Create the folder with the application name (for example, SampleApplication) inside the folder "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps".
* Create another folder namely "WEB-INF" inside the folder "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SampleApplication"
* Create another folder namely "classes" inside the folder "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SampleApplication\WEB-INF"
* Compile the servlet source file HelloWorld.java which produces HelloWorld.class
* Store the servlet(HelloWorld.class) in the folder "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SampleApplication\WEB-INF\classes". For simplicity, before compiling the source file you may move the source file to the above folder and compile it from there. The important thing is that the servlet should be in the "classes" folder.
You have created your first Servlet!

## Setting CLASSPATH

* For the servlet to be located by the JVM we have to set the CLASSPATH to "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SampleApplication\WEB-INF\classes" or any of the folder above it. For setting the CLASSPATH, right click on 'My Computer'>Properties>Advanced>Environment Variables>System Variables>CLASSPATH>Edit. Add the above mentioned folder address (alongwith a semicolon) to the Variable value.
Note that the CLASSPATH should be set as system variable as the Tomcat Apache Server will be running as the "system" user.

## Deployment Descriptor

There must be a deployment descriptor, which is actually an xml file namely web.xml, corresponding to each application inside the "WEB-INF" folder. So now we will create the web.xml file for our "SampleApplication" in the folder "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SampleApplication\WEB-INF". The content of the file is shown below:
As you can assume "servlet" tag maps the name of the servlet to the servlet class and "servlet-mapping" tag maps the URL to the servlet.

## Go to the URL

Make sure that the apache server is running. In the address bar of your browser type "http://localhost:8080/SampleApplication/servlet/HelloWorld" and press "Enter".
You will see a page with "Hello World" written on it.
| Previous: | An Introduction to Servlet | Up: | Java Platform, Enterprise Edition/Java EE Tutorial | Next: | An Introduction to JSP |
# Java Programming/Arrays
## About Arrays

An array is a group of variables of the same data type and referred to by a common name. An array is contiguous block of memory locations referred by a common name.
i.e. To store 500 integer values in the variable multipleInt , you type this.

### Types of Arrays
#### One-dimensional arrays

One-dimensional array is a list of variables of the same data type.

##### Syntax to declare a one dimensional array

You can also declare and initialize arrays in the same statement.
For e.g.

##### Things you can do with arrays

You can print out all the values in the array. For e.g.
A possible output of the above will be:
20
2 4 13 6 18 12 14 10
Notice this part of the code
Notice that in this part of that code:
, the variable fillUp must be one less the length of the array. Why do we have to do this? You may ask. Remember, the index 0 is the first value in an array/String. So if the length was 11, and the program searched for the 12th value, it would not find it, and there would be an error that says something like this: Index Out of Range .

#### Two-dimensional arrays

To declare two-dimensional arrays, you need to specify multiple square brackets after the array name.

##### Syntax to declare a two dimensional array
### Advantages
#### Other Types of Arrays

You can also declare arrays like
but it will make programming with these arrays very complicated.
The 1 dimensional array and the 2 dimensional arrays are the most commonly used
* Project: Introduction to Programming in Java
* Previous: Introduction to Programming in Java/Inheritance — Java Programming/Arrays — Next: Introduction to Programming in Java/Swing
# Java Platform, Enterprise Edition/Java EE Tutorial/Tiles

For applications which are having a static header, footer, sidebar etc., Struts Tiles can be very useful.

## Why use Tiles

* can avoid overuse of 'include' directive
* styles and jsp content can be inherited.
# Java Programming

* Introduction
* Welcome to the course! Introduction to Programming in Java is part of the School of Computer Science and is designed to be an integral part of the curriculum. It is a hands-on introduction to Java for non-programmers, similar to the general-purpose and language-independent course Introduction to Programming. See also Introduction to Computer Science and Introduction to Computers for introductory courses in computer hardware.
* Prerequisites
* Introduction to Programming, as well as sufficient knowledge of computers to be able to install and configure software.
* Content summary
* This is a hands-on introduction to writing programs in the Java programming language. It is designed for students that have no previous experience with programming.
* Goals
* This learning project offers learning activities to be able to understand and use fundamental Java elements including:
* All of the Java primitives
* References, objects and arrays
* Control structures including loops, branches and functions
* There will also be an introduction to some of the most commonly used library classes.
Lessons
Subject classification: this is an information technology resource.
Educational level: this is a tertiary (university) resource.
Introduction
Integer Variables
Boolean Variables
Strings
Classes
Inheritance
Arrays
Swing :
* Readings
* Wikibooks article: Java Programming
* Wikipedia article: Java (programming language)
* Next Course
* Theory of Programming Languages - For math, theory, and the hardware/software connection.
* C++ - For practical programming.
* Previous Course
* Introduction to Programming
* See Also
* Computer Programming
# Java Programming/Answers to Exercises
## Exercise 1

Consider the evaluation of the expression at the bottom of this code.
What order are the operators evaluated in? What are the final values of the three variables?

### Answer

The operations with the highest precedence are the multiplication and the division. They associate left to right so the multiplication goes first, then the division and the addition. The assignment on the right goes next because assignment associates left to right.
Here is how it would go:
The final values of the variables are a = 1, b = 1 and c = 4.
Return

## Exercise 2

Look at the following code:
What is the output?
Extra credit: Change the declaration of k to be int k = i ++ + ++ j; What is the output now?

### Answer

First, evaluate the expression:
So the output would be:
Extra credit: First evaluate the expression:
So the output would be:
Return
# Motivation and emotion/Book/2014/Preface
## Preface

The 2014 edition of the Motivation and Emotion book series provides 134 freely available online chapters about how psychological science can be used to better understand and improve specific aspects of human's motivational and emotional lives.
These chapters were developed by third year undergraduate psychology emerging academics as part of their participation in a unit called Motivation and emotion at the University of Canberra, Australia. The idea is to involve emerging academics to engage in authoring unique, openly available online book chapters as a learning and assessment exercise, but also as a socially beneficial exercise - and as a contrast to the archaic traditional requirement that students to write essays on the same topics, year after year, with their efforts largely hidden and unshared.
Each 2014 book chapter focuses on a each unique topic, but also seeks to build and extend upon earlier Motivation and emotion book chapters (developed in 2010, 2011, and 2013). In 2010, the focus was towards developing textbook style chapters. This focus evolved in 2011, 2013 and 2014 towards addressing a self-help audience by offering a psychological science viewpoints about how humans can enhance their motivational and emotional lives.
Each of the chapters is also accompanied by a 5 minute online multimedia overview.
Feel free to comment on the chapters or to improve them by editing.
# Literature/1904

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Literature/1904/Fleming $^{[^]}$
# Literature/1902

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Literature/1902/Kropotkin $^{[^]}$
* Literature/1902/Loisy $^{[^]}$
# Literature/1903/Pavlov

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &
Russian title: "Eksperimental’naiia psikhologiia i psikhopatologiia na zhivotnykh."

## Reprints

* Pavlov, Ivan P. Lectures on Conditioned Reflexes. Translated by Horsley Gantt. New York: International Publishers, 1928. Volume 1, pages 47-60. The translation of the extract in the text was provided by Gregory Razran.

### See also

* Pavlov, I. P. Conditioned Reflexes: An Investigation of the Physiological Activity of the Cerebral Cortex. Translated and Edited by G. V. Anrep. London: Oxford University Press, 1927.

## Wikimedia
### w: Ivan Pavlov
### w: Conditioned reflex

| w: Experimental psychology | w: Behaviorism |

## Chronology

* Razran, Gregory (1965). "Russian physiologists' psychology and American experimental psychology: A historical and a systematic collation and a look into the future." Psychological Bulletin, vol. 63 no. 1 (Jan 1965): 42-64. Abstract
* Orwell, George (1949). Nineteen Eighty-Four. London: Secker and Warburg, 1949. $^{[^]}$
* Skinner, B. F. (1948). Walden Two. Macmillan Co., 1948. $^{[^]}$
* Orwell, George (1945). Animal Farm: A Fairy Story. London: Secker and Warburg, 1945. $^{[^]}$
* Huxley, Aldous (1940). Words and Their Meanings. The Ward Ritchie Press, 1940. $^{[^]}$
* Wells, H. G. (1938). World Brain. Garden City, NY: Doubleday, Doran & Co. $^{[^]}$
* Korzybski, Alfred (1933). Science and Sanity: An Introduction to Non-Aristotelian Systems and General Semantics. 5th ed., Institute of General Semantics, 1994. $^{[^]}$
* Wells, H. G. (1933). The Shape of Things to Come. Hutchinson. $^{[^]}$
* Huxley, Aldous (1932). Brave New World. Harper Perennial, 1932. $^{[^]}$
* Russell, Bertrand (1931). The Scientific Outlook. London: George Allen & Unwin. $^{[^]}$
* Russell, Bertrand (1926). "The Meaning of Meaning." Dial, vol.81 (August 1926) pp. 114-121. $^{[^]}$
* Ogden, C. K. & I. A. Richards (1923). The Meaning of Meaning: A Study of the Influence of Language upon Thought and of the Science of Symbolism. London: Routledge & Kegan Paul Ltd. $^{[^]}$
* Wells, H. G. (1923). Men Like Gods. Cassell and Co., Ltd. $^{[^]}$
* Russell, Bertrand (1921). The Analysis of Mind. London: George Allen & Unwin. $^{[^]}$
* Watson, John B. (1913). "Psychology as the behaviorist views it," Psychological Review, 20, pp. 158-177. $^{[^]}$
* Wells, H. G. (1905). A Modern Utopia. New York, NY: Penguin Group, 2005. $^{[^]}$
* Pavlov, Ivan (1903). "The Experimental Psychology and Psychopathology of Animals." The 14th International Medical Congress, Madrid, Spain, April 23-30, 1903. $^{[^]}$

## Reviews

* In this paper the definition of conditioned and other reflexes was given and it was shown that a conditioned reflex should be regarded as an elementary psychological phenomenon, which at the same time is a physiological one. It followed from this that the conditioned reflex was a clue to the mechanism of the most highly developed forms of reaction in animals and humans to their environment and it made an objective study of their psychic activity possible. -- From "Pavlov," nobelprize.org, 1904
# Literature/1901

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Literature/1901/Lasswitz $^{[^]}$
* Literature/1901/Verne $^{[^]}$
* Literature/1901/Wells $^{[^]}$
# Literature/1903

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Pavlov, Ivan (1903). "The Experimental Psychology and Psychopathology of Animals." The 14th International Medical Congress, Madrid, Spain, April 23-30, 1903. $^{[^]}$
* Literature/1903/Soddy $^{[^]}$
* Literature/1903/Welby $^{[^]}$
# Literature/1905

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Literature/1905/Einstein $^{[^]}$
* Russell, Bertrand (1905). "On Denoting." Mind, vol. 14, pp. 479-493. $^{[^]}$
* Wells, H. G. (1905). A Modern Utopia. New York, NY: Penguin Group, 2005. $^{[^]}$
# Literature/1905/Russell

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Excerpts
### w: On Denoting

* Russell believes [...] that there are essentially two modes of knowing: knowledge by description and knowledge by (direct) acquaintance. Knowledge by acquaintance is limited to the sense data of the phenomenal world and to one's own private inner experiences, while knowledge of everything else (other minds, physical objects, and so on) can only be known by way of general descriptions.

## Wikimedia

* w: Descriptivist theory of names
* w: Causal theory of reference
* w: Definite descriptions
* w: Sense and Reference
* w: The Meaning of Meaning
* w: Connotation
# Literature/1906

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Literature/1906/Baldwin $^{[^]}$
* Literature/1906/Twain $^{[^]}$
# Literature/1907

Authors :
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z &

## Subpages

* Literature/1907/Bergson $^{[^]}$
# Letters of Credit

| Unit 4.5-Letters of Credit | Introduction | Letters of Credit | Types | Summary | Resources | Activities | Assessment Go to Unit 4.1 | Unit 4.2 | Unit 4.3 | Unit 4.4 | Unit 4.5 | Unit 4.6 | Unit 4.7 | Unit 4.8 | Unit 4.9 Return to Trade Finance Module 4: Payment Methods |

## Unit 4.5-Letters of Credit

An international manager needs to be able to understand the different types of letters of credit available for use in international transactions along with the risks, costs and benefits of each. The international manager must be able to communicate these opportunities to their accounting/finance department and often to their customers. The use of these types of letters of credit may be critical in meeting both the business and collection goals of an organization.

### Unit Objective

The goal of this material is to introduce you to the different types of letters of credit that are available to use for international business transactions, their risks and opportunities. This information will provide you with an understanding of the benefits of each type of letter of credit and the support they provide in obtaining timely payments for the sales of goods and/or services. By the end of this unit you will be able to
* identify the different types of letters of credit.
* identify the risks and opportunities for each type of letter of credit.
* identify the appropriate transactional scenario when each could be implemented.

### Unit Outline

* Introduction
* Letters of Credit
* Types of Letters of Credit
* Summary
* Resources
* Activities
* Assessment
Correlation: Materials from this unit correlate with NASBITE CGCP's Knowledge Statement 04/04/05: Knowledge of types of letters of credit (e.g., confirmed/unconfirmed, irrevocable, transferable, standby, with a time draft)
# Letters of Credit/Activities

| Unit 4.5-Letters of Credit | Introduction | Letters of Credit | Types | Summary | Resources | Activities | Assessment Go to Unit 4.1 | Unit 4.2 | Unit 4.3 | Unit 4.4 | Unit 4.5 | Unit 4.6 | Unit 4.7 | Unit 4.8 | Unit 4.9 Return to Trade Finance Module 4: Payment Methods |

## Activity

1. As the exporter, you have just received a confirmed transferable letter of credit. What are the characteristics of this type of letter of credit?
2. As the exporter, you have just received a confirmed standby letter of credit. What are the characteristics of this type of letter of credit and when will you use it?
3. As the importer, you have applied to your bank to issue a non-transferable irrevocable letter of credit. What are the characteristics of this type of letter of credit?
# Letters of Credit/Letters of Credit

| Unit 4.5-Letters of Credit | Introduction | Letters of Credit | Types | Summary | Resources | Activities | Assessment Go to Unit 4.1 | Unit 4.2 | Unit 4.3 | Unit 4.4 | Unit 4.5 | Unit 4.6 | Unit 4.7 | Unit 4.8 | Unit 4.9 Return to Trade Finance Module 4: Payment Methods |

## Letters of Credit

Documentary or letters of credit, as they are more commonly referred to, come in many forms. These options were created to make this banking instrument flexible and applicable to a wide variety of business transactions. The different types of letters of credit can be used in many combinations or independently. The type of letter of credit chosen for a transaction is based on the parties and countries involved, the risks associated with the transaction as well as the products or services being bought and sold.
To easily understand the different types of letters of credit, an international manager must be comfortable with the terminology and definitions of the parties and actions associated with this banking instrument, including, but not limited to, terms such as applicant, beneficiary, issuing bank, advising bank, discrepancy, and amendment.
# Letters of Credit/Resources

| Unit 4.5-Letters of Credit | Introduction | Letters of Credit | Types | Summary | Resources | Activities | Assessment Go to Unit 4.1 | Unit 4.2 | Unit 4.3 | Unit 4.4 | Unit 4.5 | Unit 4.6 | Unit 4.7 | Unit 4.8 | Unit 4.9 Return to Trade Finance Module 4: Payment Methods |

## Resources
### Publications

Exporting from Start to Finance 3rd Edition, L. Wells and K. Dulat, McGraw Hill. International Trade:Financial Services for Importers and Exporters, JP Morgan/Chase Bank, 2000. Handbook of International Credit Management, second edition, edited by B.W. Clarke. Gower Publishing, 1995. Practical Export Trade Finance, E. W Perry, Dow Jones-Irwin, 1989. The Global Entrepreneur, James Foley, 2nd Edition, Jamric Press, 2004.

### Web Resources

International Chamber of Commerce – www.iccwbo.org ICC Resources - www.iccbooksusa.com
Letters of Credit:
* www.chase.com (FAQs)
* www.informafinancial.com
* www.allbusiness.com
* www.qualitylc.com
# Letters of Credit/Assessment

| Unit 4.5-Letters of Credit | Introduction | Letters of Credit | Types | Summary | Resources | Activities | Assessment Go to Unit 4.1 | Unit 4.2 | Unit 4.3 | Unit 4.4 | Unit 4.5 | Unit 4.6 | Unit 4.7 | Unit 4.8 | Unit 4.9 Return to Trade Finance Module 4: Payment Methods |
# Letters of Credit/Summary

| Unit 4.5-Letters of Credit | Introduction | Letters of Credit | Types | Summary | Resources | Activities | Assessment Go to Unit 4.1 | Unit 4.2 | Unit 4.3 | Unit 4.4 | Unit 4.5 | Unit 4.6 | Unit 4.7 | Unit 4.8 | Unit 4.9 Return to Trade Finance Module 4: Payment Methods |

## Summary

Having completed this lesson, you should now understand the different types of letters of credit that are available. Although letters of credit can be issued in many forms, there are only a few that are regularly used today. By having a complete understanding of all forms, you can better negotiate payment terms and avoid agreeing to a situation that could increase your company’s risks.
# Lettrism

Lettrism is a French avant-garde movement, established in 1946 by the publication of the Lettrist Manifesto by Isidore Isou in Paris.
Lettrism is also the Hurufi movement (Arabic: حروفية‎ meaning "letters") which was lead by Fażlu l-Lāh Astar-Ābādī, also called Nāimī (1340–1394) and which spread in areas of western Persia, Anatolia and Azerbaijan.
Also see Hurufiyah or Huruffiya

## Practices

* Hypergraphy
* Psychogeography
* Metagraphy

## Superceded by

Situationism
# Motivation and emotion/About/Discussion

* The electronic communication channels for this unit are via the UCLearn site:
* Announcements, general announcements from teaching staff Discussion, discuss, ask questions, ask for feedback, share ideas etc. Come along to Drop-in In addition, use the:
* #emot24, hashtag on Twitter Wikiversity talk pages, every page has its own discussion page or get in touch with the Teaching team
# Motivation and emotion/About/Help

Reach out and join in:
* Discussion
* Drop-in
* Teaching team
* Wikiversity editing