OpenLLM-France/wikimedia huggingface dataset:
# Fortran/error handling

Typically in an error situation, your program will stop, and you'll get an error message. The only exception to this is that at the end of read and write statements' parenthesized control list, you can add, err=label to determine which line to jump to in the event of an error.
Modern Fortran (from Fortran 90 onwards) has introduced four main areas for error capture:
1) File handling and i/o operation error handling
2) IEEE floating point error detection and reporting
3) Dynamic allocation
4) Command line operations

## File handling and I/O Operations

All the external file handling statements and I/O operations (open, read, write, close, inquire, backspace, endfile, flush, rewind and wait) can now take optional iostat and iomsg clauses. iostat is an integer which returns a non-zero value if there is an error, in which case, the character variable assigned to iomsg will return a brief error message. The non-zero integers and the messages are compiler dependent but the intrinsic module, iso_fortran_env, gives access to two important values: iostat_end and iostat_eor. If an error occurs, and iostat is non-zero, execution will not stop. The ERR clause is still supported but should not be used.

### Example

Note that the length required for the message character is vendor and error dependent.

## IEEE floating point error detection and reporting

This is a big topic, but in essence modern Fortran provides access to three intrinsic modules: IEEE_arithmetic, IEEE_exceptions and IEEE_features. These features can be used to intercept errors such as divide by zero and overflow but at the expense of some performance.
The IEEE_features module controls access to the features the programmer may require, by use association in the scoping unit where the programmer places the use statement,

### Example

See Chapter 11 in Metcalf et al, Modern Fortran Explained, OUP. All the necessary basic facilities exist in order for the programmer to construct a try/catch system if desired.

## Dynamic Allocation

Modern Fortran allows run-time allocation and deallocation of arrays of any type, and a typical error might be to try to dynamically allocate an array so large that there is not enough memory, or an attempt to deallocate an array which is not already allocated. There are optional clauses stat and errmsg which can be used to prevent program failure and allow the programmer to take evasive action.

### Example

These features are available in the equivalent coarray features.

## Command Line Operations

Modern Fortran also supports error detection for the execution of command line operations,

### Example

In this example, the programmer of the my.exe program has the responsibility for what codes are returned and what error messages are exposed, except that -1 and -2 are reserved for allowing the compiler vendor indicating what features may be supported.
# Fortran/language extensions
## Procedure Overloading

Like several other languages, Fortran 90 and newer supports the ability to select the appropriate routine from a list of routines based on the arguments passed. This selection is done at compile time and is thus unencumbered by run-time performance penalties. This feature is accessed by use of modules and the interface block.
In the following example, a module is specified which contains an interface function f which can handle arguments of various types.
A program which uses this module now has access to a single interface function f which accepts arguments that are of integer, real, or complex type. The return type of the function is the same as the input type. In this way the routine is much like many of the intrinsic functions defined as part of the Fortran standard. An example program is given below:

## Intrinsic functions

One can extend intrinsic functions. This is similar to overload operators.
Here we will demonstrate this by extending the sqrt function. The intrinsic function is not implemented for arguments of integer type. This is because there is no clear idea how to define the result of non integer type (e.g. ${\sqrt {4}}=2$, but how to define ${\sqrt {5}}=2.236\ldots$). We implement a method here where the result is always the nearest integer.

## Derived Data Types

Fortran 90 and newer supports the creation of new data types which are composites of existing types. In some ways this is similar to an array, but the components need not be all of the same type and they are referenced by name, not index. Such data types must be declared before variables of that type, and the declaration must be in scope to be used. An example of a simple 2d vector type is given below.
Variables of this type can be declared much like any other variable, including variable characteristics such are pointer or dimension.
Using derived data types, the Fortran language can be extended to represent more diverse types of data than those represented by the primitive types.

## Operator Overloading

Operators can be overloaded so that derived data types support the standard operations, opening the possibility of extending the Fortran language to have new types which behave nearly like the native types.

### Assignment

The assignment operator = can be overloaded. We will demonstrate this by the following example. Here, we define how the assignment of a logical type on the left and an integer on the right should be performed.

### Intrinsic operators

One can overload intrinsic operators, such as +,-,*.
In the following example we will overload the * operator to work as the logical .and..

### New operators

One can create newly self-created operators.
We demonstrate this by the following example: We create an unary operator .even. <int> which outputs a logical if the given integer is even as well as a binary operator <reals> .cross. <reals> that performs the standard cross product of two real vectors.
# Fortran/Mixing languages
## Types

Fortran types map quite well to intrinsic types in other compiled languages. The following is a table of Fortran-to-C types:

## Arrays

The layout of Fortran arrays in memory contrasts with arrays in C and many C-based languages. When iterating over contiguous array elements in C, the rightmost array subscript varies the fastest, while in Fortran, the leftmost array subscript varies the fastest. Hence the element following x(1,1) in contiguous memory is x(2,1), not x(1,2). Furthermore, the element sub-scripting in C starts at 0, while Fortran starts at 1 by default. An element in Fortran may be x(1), while the equivalent value in C code would be x[0]. However, when passing a Fortran array to a C function, you do not need to (and should not) reshape the array into C-style subscripts first; the compiler will automatically do this for you.

## Global Storage

See the Common Blocks section.

## Subroutine and function calls

Many languages push their arguments onto the stack, some as constants and some as addresses. In most compilers, Fortran will compile a block of pointers to variables and constants, and push the address of that block. So, if we had a Fortran procedure defined as follows:
then the C definition would be:
The C code could call the routine as follows:

## The PL/1 Special Case

In PL/1, you can define an external common block, subroutine, or procedure to be of type FORTRAN. When you do this, everything, down to subscript order, will be handled for you. Likewise, you can define a PL/1 item, such as a subroutine, to be of type FORTRAN, and it will then be callable by Fortran using Fortran's calling conventions.
# Fortran/gfortran

How do I force gfortran to stop program at first NaN?
    -ffpe-trap=invalid
How do I force gfortran to stop at a first floating point exception?
    -ffpe-trap=zero,overflow
What optimization does gfortran support?
    O0, O1, O2, O3, Os, Ofast, Og.
How do I debug?
    Use gdb.

## External links

* optimization options
# Fortran/OOP in Fortran
## Object-oriented programming
### Module
#### Overview

Data can be gathered in modules. The general form is given by

#### Data access

There are three possible access properties: public, private, protected.
* public: Outside code has read and write access.
* private: Outside code has no access.
* public, protected: Outside code has read access.

#### Using module in other code

One can include the module's public data in outside code. There are three ways.
* use <moduleName>: includes all public data and methods
* use <moduleName>, <renames>: includes all public data and methods, but renames some public data or methods
* use <moduleName>, only: <subset>: includes only some public data and methods

#### Example
##### Using modules
### Submodule

Modules can be extended using submodules. Multiple advantages arise
* splitting of large modules
* splitting of interface definitions and implementations such that dependent modules do not need to be recompiled if the implementations change
* two modules need data from each other.

#### Example
##### Splitting of definitions and implementations
### Derived data types

In Fortran one can derive structures off of other structures, so called derived data types. The derived types will have the features of the parent type as well as the newly added ones and the general syntax is given by:
The following example shows different types of people within a company.

#### Destructors

One can define procedures which will be invoked before the object is automatically deleted (out of scope). This is done with the statement final. The following example illustrates it

#### Abstract base type and deferred procedure

One can set the base type as abstract such that one cannot initialize objects of that type but one can derive sub-types of it (via extends). Specific procedures which should be defined in the sub-type need the property deferred as well as an explicit interface.
The following example illustrates their use.

#### Polymorphic Pointer

One can create pointers to child classes by using type definitions in allocate statements and the select type environment. The following example highlights its use.
# Calculus/Integration techniques/Reduction Formula

A reduction formula is one that enables us to solve an integral problem by reducing it to a problem of solving an easier integral problem, and then reducing that to the problem of solving an easier problem, and so on.
For example, if we let
    $I_{n}=\int x^{n}e^{x}dx$
Integration by parts allows us to simplify this to
    $I_{n}=x^{n}e^{x}-n\int x^{n-1}e^{x}dx=$
    $I_{n}=x^{n}e^{x}-nI_{n-1}$
which is our desired reduction formula. Note that we stop at
    $I_{0}=e^{x}$ .
Similarly, if we let
    $I_{n}=\int \sec ^{n}(\theta )d\theta$
then integration by parts lets us simplify this to
    $I_{n}=\sec ^{n-2}(\theta )\tan(\theta )-(n-2)\int \sec ^{n-2}(\theta )\tan ^{2}(\theta )d\theta$
Using the trigonometric identity, $\tan ^{2}(\theta )=\sec ^{2}(\theta )-1$ , we can now write
    $I_{n}$ $=\sec ^{n-2}(\theta )\tan(\theta )+(n-2)\left(\int \sec ^{n-2}(\theta )d\theta -\int \sec ^{n}(\theta )d\theta \right)$ $=\sec ^{n-2}(\theta )\tan(\theta )+(n-2)\left(I_{n-2}-I_{n}\right)$
Rearranging, we get
    $I_{n}={\frac {\sec ^{n-2}(\theta )\tan(\theta )}{n-1}}+{\frac {n-2}{n-1}}I_{n-2}$
Note that we stop at $n=1$ or 2 if $n$ is odd or even respectively.
As in these two examples, integrating by parts when the integrand contains a power often results in a reduction formula.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
# Calculus/Integration techniques/Trigonometric Substitution/Solutions

$\int {\frac {10}{25x^{2}+a}}dx$
    $5x={\sqrt {a}}\tan(\theta )\qquad 5dx={\sqrt {a}}\sec ^{2}(\theta )d\theta \qquad dx={\frac {{\sqrt {a}}\sec ^{2}(\theta )}{5}}d\theta$
Then
    ${\begin{aligned}\int {\frac {10}{25x^{2}+a}}dx&=10\int {\frac {{\sqrt {a}}\sec ^{2}(\theta )}{5(a\tan ^{2}(\theta )+a)}}d\theta \\&=2\int {\frac {{\sqrt {a}}\sec ^{2}(\theta )}{a\sec ^{2}(\theta )}}d\theta \\&={\frac {2{\sqrt {a}}}{a}}\int d\theta ={\frac {2\theta }{\sqrt {a}}}+C\\&\mathbf {={\frac {2}{\sqrt {a}}}\arctan {\Bigl{\frac {5x}{\sqrt {a}}}{\Bigr )}+C} \end{aligned}}$
    $5x={\sqrt {a}}\tan(\theta )\qquad 5dx={\sqrt {a}}\sec ^{2}(\theta )d\theta \qquad dx={\frac {{\sqrt {a}}\sec ^{2}(\theta )}{5}}d\theta$
Then
    ${\begin{aligned}\int {\frac {10}{25x^{2}+a}}dx&=10\int {\frac {{\sqrt {a}}\sec ^{2}(\theta )}{5(a\tan ^{2}(\theta )+a)}}d\theta \\&=2\int {\frac {{\sqrt {a}}\sec ^{2}(\theta )}{a\sec ^{2}(\theta )}}d\theta \\&={\frac {2{\sqrt {a}}}{a}}\int d\theta ={\frac {2\theta }{\sqrt {a}}}+C\\&\mathbf {={\frac {2}{\sqrt {a}}}\arctan {\Bigl{\frac {5x}{\sqrt {a}}}{\Bigr )}+C} \end{aligned}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
# Freelance Instructional Designer Handbook/E-Learning Theories, Research & Data

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer E-learning theories, research and data. Many of these areas are ever-changing due to the trends within this profession. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
E-Learning Principles
Cognitive Theories
Current Data
Yearly Industry Publications
# Freistil

Freistil
Actual annotated German texts
How to use this book · Article wishes & feedback · Participate
| Nachrichten | Tratsch | Wirtschaft | Wissenschaft | Kunst | Sprache | Übungen |
Mittelstufe  Auf fünf bis sieben Milliarden Euro schätzt die Münchener Rück die durch Orkan Kyrill verursachten Schäden. Diese Schätzung ist jedoch eine erste Bewertung; die exakte Bewertung wird wegen der vielen kleinen und mittleren Schäden noch etwas Zeit in Anspruch nehmen. So schätzt etwa die Swiss Re, der größte Rückversicherer weltweit, den Schaden auf „nur“ 3,5 Milliarden Euro. Sollte die Münchener Rück Recht behalten, war Kyrill einer der teuersten Orkane der letzten Zeit. Der teuerste Sturm bisher war „Lothar“ im Jahre 1999, der 7,2 Milliarden Euro kostete.
Adapted from Wikinews: Schäden von Orkan Kyrill auf rund sieben Milliarden Euro geschätzt. 1/27/2007 CC-BY-2.5
Edit this article · Ask a question about this article
In detail: Kyrill in Germany :
* The gale Kyrill — named after a Greek forename — swept through Europe on January 18th / 19th at top speeds of 225 kilometres per hour. Although warnings had been given out as much as two days ago, the storm claimed 13 lives in Germany and disrupted the whole of Germany's long-distance rail traffic. Much trouble was caused by a steel girder weighing several tons that came down in Berlin main station. Though the girder had not hurt anybody it revelead a constructional defect that caused the only recently inaugurated station to remain closed for hours after the incident.
Older texts in this section: M  Mannheim feiert Stadtgründung vor 400 Jahren 24.1.2007 · A  "Freiwillige Ausreise" Unwort des Jahres 2006 22.1.2007 · All texts
# Freelance Instructional Designer Handbook/The Great Tips, Tricks & Techniques

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer great tips, tricks and techniques. Many of these areas are ever-changing due to the trends within this profession. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
Software Tips
E-Learning Tips
Storyboard Templates
ID Process Documents
Resources
Links to Showcase E-Learning
# Freelance Instructional Designer Handbook/Contract Searching

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer contract searching. Many of these areas are ever-changing due to the trends within this profession. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
Where to Find a Contract?
Agencies
Job Boards
Networking
# Freelance Instructional Designer Handbook/Contracts

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer contracts. Many of these areas are ever-changing due to the trends within this profession. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
W2 or W9 or EIN or Inc.?
IRS EIN Number
The Good, Bad and Ugly of Contracts
An e-learning agency is a hiring agent for corporations, businesses and the government. They post the position for an instructional designer on all of the job boards, screen the applicants and then enter into a contract with the ID to work for the client. BE CAREFUL! This is a current trend to shift all the legal responsibility for ROI for the e-learning content to the ID. One contract I viewed required insurance in the excess of 1,500,000.00 for liability related to the effectiveness and ROI on the corporations e-learning ROI.
Payment Methods and Schedules
Monetary Exchange Rates & Your Wages
Taxes: National, State & International
ID, Design or Contractor Insurance
International Contracts
Please add any information, tools and information you may have about contracts to this area.
# Freelance Instructional Designer Handbook/Professional Organizations

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer professional organizations. Many of these areas are ever-changing due to the trends within this profession. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
E-Learning Guild
ASTD
# Freelance Instructional Designer Handbook/Marketing

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer marketing. Many of these areas are ever-changing due to the trends within this profession. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
Traditional Marketing
Social Media
LinkedIn
Search Engines
Web Site
Contests
# Freelance Instructional Designer Handbook

Introduction
This handbook is being written by the hard working instructional designers who are the dedicated freelancers who create high quality e-learning materials for our global community. You are the best! Thanks for your contributions.
Contents
    Freelance Instructional Design Defined?
       Definition
       Skills Needed
       Tools
       Training
       Certifications
       The Legal Aspect
       Your Web Site
       Your Portfolio
    Freelance Software Tools
       The Top Tools
       Rapid Development Tools
       Graphic Editing Tools
       Social Media Tools
       Testing Sites & Tools
       LMS Tools
       SCORM
       AICC
       FREE TOOLS
    Contracts
       W2 or W9 or EIN or Inc.?
       The Good, Bad and Ugly of Contracts
       Payment Methods and Schedules
       Monetary Exchange Rates & Your Wages
       Taxes: National, State & International
       ID, Design or Contractor Insurance
       International Contracts
    Marketing
       Traditional Marketing
       Social Media
       LinkedIn
       Search Engines
       Web Site
       Contests
    Contract Searching
       Where to Find a Contract?
       Agencies
       Job Boards
       Networking
    Professional Organizations
       E-Learning Guild
       ASTD
    E-Learning Theories, Research & Data
       E-Learning Principles
       Cognitive Theories
       Current Data
       Yearly Industry Publications
    The Great Tips, Tricks & Techniques
       Software Tips
       E-Learning Tips
       Storyboard Templates
       ID Process Documents
       Resources
       Links to Showcase E-Learning
# Freelance Instructional Designer Handbook/Freelance Software Tools

Return to Main Page
Introduction:
This page contains the following information about the freelance instructional designer tools. Many of these areas are ever-changing due to the technology, current trends and the market demands. Thus, they will be updated regularly by any of the authors participating in the writing of this book. Please contribute to any of the headings provided within this page by clicking EDIT in the upper right of this page.
Tools:
The Top Tools
Articulate Storyline
Lectora
Camtasia Studio
Rapid Development Tools
Graphic Editing Tools
Social Media Tools
Testing Sites & Tools
LMS Tools
SCORM
AICC
FREE TOOLS
Contractor Tools
Google Docs (Warning! Whenever using Google Drive for client invoices, documents or project timelines always backup or save your docs in another location.)
Conferencing Tools
Skype
Google Talk
Social Media Tools
Testing Sites & Tools
LMS Tools
SCORM
AICC
FREE TOOLS
# Cantonese/Lesson 8
### Introduce yourself to a stranger

| Spoken form | Written form | Pronunciation | English |
| 我叫 XYZ | 我叫 XYZ | ngo5 giu3 XXX http://forvo.com/search/%E6%88%91%E5%8F%AB/yue/ | I am called XYZ. |
| 我係 XYZ | 我是 XYZ | ngo5 hai6 XYZ http://forvo.com/search/%E6%88%91%E4%BF%82/yue/ | I am XYZ. |
| 我個名叫王明 | 我的名字是王明 | ngo5 go3 meng2 giu3 wong4 ming4 | My name is Ming Wong. |
| 我係個工程師 | 我是一個工程師 | ngo5 hai6 go3 gung1 cing4 si1 | I am an engineer. |
# Cantonese/Lesson 10

Below are the Cantonese words which have the origins of Ancient Chinese:
| Origin | Common alternative(s) | Jyutping | IPA | References | Meaning | Example(s) |
| 抓 | R | aau$^1$ | aːu˥ | | | 抓痕 |
| 眲 | 呃 | ngaak$^1$ | ŋaːk̚˥ | | to deceive/trick | 眲錢 |
# Cantonese/Lesson 5
## Introduction to measuring words

Unlike English, measuring words are needed when you need to say an object. For example we only need to say a book in English, but in Cantonese, when have to put a measuring word in front of the object, like 一本書. Here is a table of some measuring words:
| Measuring word | Pronunciation | When to use | Example |
| 本 | bun2 | a flat object, but not very thin | Book書 |
| 個 | go3 | an irregular object | Apple蘋果, orange橙 |
| 塊 | faai3 | an irregular, flatten object | cookie曲奇餅 |
| 張 | zoeng1 | a very thin and flat object | paper紙, ticket飛 |
| 隻 | zek3 | an animal that is not flat; non-elongated object | chicken雞, cow牛, egg雞蛋, watch錶 |
| 條 | tiu4 | an animal that is flat; an elongated object | fish魚, crocodile鱷魚, rope繩, belt皮帶, trousers褲, straw飲管 |
| 部 | bou6 | machine | computer電腦 |
| 對 | deoi3 | pair of | shoes鞋, socks襪 (NOT trousers) |
| 座 | zo6 | building | high-rise building大廈, tower塔 |
| 嚿（正字係䊆) | gau6 | A piece of | Use for wood 木, rice 飯 etc. |

### Practice

Imagine you are doing shopping and need to get some grocery from a shopkeeper. Study the following dialogues and make your own version with the above examples of measuring words:
店員：你想買乜嘢？
我：我想買一隻雞。
Translation:
Shopkeeper: What would you like?
Me: I want to buy a chicken.